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 Start time End time 10:30 AM 11:45 AM 10:45 AM 12:30 PM 12:15 AM 2:00 PM Cookie baking 12:45 PM Pasta making Table decoration 3:00 PM 4:30 PM 5:45 PM 2:15 PM 3:30 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?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
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
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Probability Problems
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education