(Latest Revision:
Feb 11, 2022 (no content change)
Nov 02, 2021)
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 (stably) 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, with letters next to the intervals chosen by the "Scheduling Intervals" algorithm:
(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)
Here is what you get when you take the original list of intervals and sort it (stably) 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)
Here is the solution chosen by the Interval Partitioning Algorithm (the version that uses a priority queue):
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 kind of problem as the example above illustrates.
Show the same kind of work that is shown in the example 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!)
(03, 06)
(01, 12)
(14, 22)
(28, 31)
(08, 24)
(13, 20)
(26, 29)
(10, 19)
(17, 26)
(23, 27)
(18, 25)
(04, 11)
(09, 16)
(02, 05)
Directions For Submitting Solution:
- Prepare your solution to the problem.
- COPY AND PASTE the text of your solution into an e-mail.
- DO NOT attach a file to your e-mail.
- DO copy and paste the text of your solution into the message window of the e-mail.
- DO Make the following exact text the subject line of your e-mail.
CS 4440 Interval Scheduling Problem
- DO copy the exact text above and & PASTE IT IN as the subject line of your e-mail
to make sure it is correct.
- Get it right, or get no credit!
- Send the E-mail to tester2@cs.csustan.edu