Greedy algorithm: Interval coloring
问题 In interval scheduling, the algorithm is to pick the earliest finish time. But in interval colouring the former does not work. Is there an example or explanation on why picking earliest finish time won't work for interval colouring? The interval colouring problem is:
given
a
set
of
intervals,
we
want
to
colour all
intervals
so
that
intervals
given
the
same
colour
do
not
intersect
and
the
goal
is
to
try
to
minimize
the
number
of
colours
used. This can be thought