Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
The Night Owls Society is arranging a conference. To minimize costs, they want to schedule as many sessions as possible in
the main ballroom. Since night owls go to bed late and wake up late, they want sessions to begin as late as possible and don't
care how late they run. Each session has a fixed start time and a fixed end time, though sessions may overlap. For example,
the sessions may be as follows. (In a realistic version of this problem, there may be many more sessions.)
Session Name
Basket weaving
Floral arrangements
Cake decoration
Cookie baking
Pasta making
Start time
End time
10:30 AM
11:45 AM
10:45 AM
12:30 PM
12:15 AM
2:00 PM
12:45 PM
3:00 PM
2:15 PM
4:30 PM
Table decoration
3:30 PM
5:45 PM
a. Define what it means for this problem to have optimal substructure.
b. Show that this problem does have optimal substructure.
c. What algorithmic strategy can one use to solve a problem with optimal substructure? (Do not write out the algorithm.)
d. What does it mean for a problem to have the greedy choice property?
e. Define a greedy choice for this problem and show that this problem has the greedy choice property. (HINT: Since meetings
will run as late as possible, it makes sense to schedule from the end of the day.)
f. Now, write a greedy algorithm to schedule meetings. Use a heap to keep track of sessions that have not been scheduled.
expand button
Transcribed Image Text:The Night Owls Society is arranging a conference. To minimize costs, they want to schedule as many sessions as possible in the main ballroom. Since night owls go to bed late and wake up late, they want sessions to begin as late as possible and don't care how late they run. Each session has a fixed start time and a fixed end time, though sessions may overlap. For example, the sessions may be as follows. (In a realistic version of this problem, there may be many more sessions.) Session Name Basket weaving Floral arrangements Cake decoration Cookie baking Pasta making Start time End time 10:30 AM 11:45 AM 10:45 AM 12:30 PM 12:15 AM 2:00 PM 12:45 PM 3:00 PM 2:15 PM 4:30 PM Table decoration 3:30 PM 5:45 PM a. Define what it means for this problem to have optimal substructure. b. Show that this problem does have optimal substructure. c. What algorithmic strategy can one use to solve a problem with optimal substructure? (Do not write out the algorithm.) d. What does it mean for a problem to have the greedy choice property? e. Define a greedy choice for this problem and show that this problem has the greedy choice property. (HINT: Since meetings will run as late as possible, it makes sense to schedule from the end of the day.) f. Now, write a greedy algorithm to schedule meetings. Use a heap to keep track of sessions that have not been scheduled.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education