[Math] Greedy Algorithm, Fewest overlaps

algorithmsdiscrete mathematics

Hi I need help doing this problem. I've been working on it for like 2 hours now and I'm no where. I'm literally about to throw my computer. I've watched youtube videos, reread my notes. The homework is due tomorrow and I don't have this done yet and I'm freaking out!

This is the question:

Show that a greedy algorithm that schedules talks in a lecture
hall, as described in Example 7, by selecting at each
step the talk that overlaps the fewest other talks, does not
always produce an optimal schedule.

Best Answer

You need to show the whole problem-we don't have access to Example 7. What is the criterion for "optimum"? Is it the most talks scheduled without overlap, the highest utilization of the hall, or what? You are probably expected to show a list of talks, show what the greedy algorithm produces, and show a better solution (according to the criterion for optimum). Do the talks come with times they have to be given, or are you setting that. This can come from the order you consider the talks-you might scatter a few at various times of the day, preventing many others from being scheduled. If the talks cannot be moved in time, you might schedule a whole batch from the hour to hour plus 5 minutes (only 5 min long), while you have a bunch of hour talks that don't fit any more. If you had scheduled the hours first, you would use the hall all day.

Related Question