(Latest Revision: Oct 08, 2022

Problem on Interval Scheduling and Interval Partitioning


An Example Problem

We begin with a list of intervals:
(08, 13)
(16, 23)
(20, 26)
(07, 14)
(24, 27)
(21, 25)
(15, 19)
(03, 10)
(11, 17)
(00, 05)
(12, 18)
(06, 22)
(01, 04)
(02, 09)
Here is the same list of intervals sorted by increasing finish time:
(01, 04)
(00, 05)
(02, 09)
(03, 10)
(08, 13)
(07, 14)
(11, 17)
(12, 18)
(15, 19)
(06, 22)
(16, 23)
(21, 25)
(20, 26)
(24, 27)
Here is the list sorted by finish time, except that now the letters A-D are placed next to the intervals that would be chosen by the Interval Scheduling Algorithm we have been studying (the first algorithm in section 4.1 of our text):
(01, 04)   A
(00, 05)
(02, 09)
(03, 10)
(08, 13)   B
(07, 14)
(11, 17)
(12, 18)
(15, 19)   C
(06, 22)
(16, 23)
(21, 25)   D
(20, 26)
(24, 27)
Now here is what we get when we take the original list of intervals and sort it by increasing start time:
(00, 05)
(01, 04)
(02, 09)
(03, 10)
(06, 22)
(07, 14)
(08, 13)
(11, 17)
(12, 18)
(15, 19)
(16, 23)
(20, 26)
(21, 25)
(24, 27)
Now, suppose that we use the same original list of intervals as the input to the Interval Partitioning Algorithm (the second algorithm discussed in section 4.1 of our text). Assume we're using the version of the algorithm that uses a priority queue. Here is the solution that would be chosen by the algorithm:
Classroom A: (00, 05) (07, 14) (16, 23)
Classroom B: (01, 04) (06, 22)
Classroom C: (02, 09) (11, 17) (20, 26)
Classroom D: (03, 10) (12, 18) (21, 25)
Classroom E: (08, 13) (15, 19)(24, 27)
Click here to see, step-by-step, how the Interval Partitioning Algorithm finds the answer above.

The Assignment

Using the input below, work the same kinds of problems as the examples above illustrate. Show the same kinds of work that is shown in the examples above. (You don't have to show the part of the work that you see when you follow the "Click here" link, but other than that, don't leave anything out!) So, in other words, your assignment is to show work for what two algorithms would output given the input below. Namely, you must show what both the Interval Scheduling Algorithm and the Interval Partitioning Algorithm would do with this input:
(07, 23)
(19, 30)
(09, 17)
(26, 29)
(05, 14)
(04, 08)
(00, 03)
(25, 28)
(20, 27)
(02, 05)
(15, 22)
(11, 18)
(12, 21)
(06, 13)
Directions For Submitting Solution: