(Latest Revision: Feb 27, 2020)

SOLUTION TO: Problem on Interval Scheduling and Interval Partitioning


The Assignment

Using the input below, work the same kind of problem as the example illustrates.
 8 11   A
13 15   B
 9 10   C
 8 10   D
15 16   E
16 19   F
18 19   G
 8 10   H
 9 14   I
11 16   J
17 19   K
 9 13   L
Here is the same list of intervals (stably) sorted by increasing finish time:
 9 10   C
 8 10   D
 8 10   H
 8 11   A
 9 13   L
 9 14   I
13 15   B
15 16   E
11 16   J
16 19   F
18 19   G
17 19   K
Here is the list with letters next to the intervals chosen by the "Scheduling Intervals" algorithm:
 9 10   C	#1
 8 10   D
 8 10   H
 8 11   A
 9 13   L
 9 14   I
13 15   B	#2
15 16   E	#3
11 16   J
16 19   F	#4
18 19   G
17 19   K
Here is the same list of intervals (stably) sorted by increasing start time:
 8 11   A
 8 10   D
 8 10   H
 9 10   C
 9 14   I
 9 13   L
11 16   J
13 15   B
15 16   E
16 19   F
17 19   K
18 19   G
Here is a solution chosen by the Interval Partitioning Algorithm.
It was generated with the version of the algorithm that uses a priority queue.
Classroom A:  A:8 11; F:16 19;
Classroom B:  D:8 10; J:11 16;
Classroom C:  H:8 10; B:13 15;
Classroom D:  C:9 10; E:15 16;
Classroom E:  I:9 14; G:18 19;
Classroom F:  L:9 13; K:17 19;