Greedy Scheduling

In this class, we don't have to worry too much about why some greedy algorithms are optimal. The examples I presented in class, namely coin change for US coin denominations, and interval scheduling using earliest-deadline first are greedy optimal. This visualization generates a random example of the problem and one of the optimal solutions is the set of intervals highlighted in yellow. See if you can find a larger set of non-overlapping intervals. Notice that you can always replace any set of non-overlapping intervals by one in which you replace the interval that finishes first in your schedule with the one that finishes first among all intervals, without violating the overlapping constraint. You can get a very nice free book on algorithms by Jeff Erickson, who's a professor of computer science at UIUC. This greedy argument for the algorithm is described well there.

To generate a new instance of the interval scheduling problem click generate.