Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 (30 points): The manager of a large student union on campus comes to you with the following problem. She is in charge of

image text in transcribed

Problem 3 (30 points): The manager of a large student union on campus comes to you with the following problem. She is in charge of a group of n students, each of whom is scheduled to work one shift during the week. There are different jobs associated with these shifts (tending the main desk, helping with package delivery, rebooting cranky information kiosks, etc.), but we can view each shift as a single contiguous interval of time. There can be multiple shifts going at once She is trying to choose a subset of these n students to form a supervising committee that she can meet with once a week. She considers such a committee to be complete if, for every student not on the committee, that student's shift overlaps (at least partially) the shift of some student in the committee. In this way, each student's performance can be observed by at least one person who is serving on the committee Give an efficient algorithm that takes the schedule of n shifts and produces a complete super- vising committee containing as few students as possible. Prove or justify that your algorithm is correct Example: Suppose n = 3, and the shifts are Monday 4 PM-Monday 8 PM, Monday 6 PM-Monday 10 PM, Monday 9 PM-Monday 11 PM Then the smallest complete supervising committee would consist of just the second student, since the second shift overlaps both the first and the third. Hint: A greedy strategy works Problem 3 (30 points): The manager of a large student union on campus comes to you with the following problem. She is in charge of a group of n students, each of whom is scheduled to work one shift during the week. There are different jobs associated with these shifts (tending the main desk, helping with package delivery, rebooting cranky information kiosks, etc.), but we can view each shift as a single contiguous interval of time. There can be multiple shifts going at once She is trying to choose a subset of these n students to form a supervising committee that she can meet with once a week. She considers such a committee to be complete if, for every student not on the committee, that student's shift overlaps (at least partially) the shift of some student in the committee. In this way, each student's performance can be observed by at least one person who is serving on the committee Give an efficient algorithm that takes the schedule of n shifts and produces a complete super- vising committee containing as few students as possible. Prove or justify that your algorithm is correct Example: Suppose n = 3, and the shifts are Monday 4 PM-Monday 8 PM, Monday 6 PM-Monday 10 PM, Monday 9 PM-Monday 11 PM Then the smallest complete supervising committee would consist of just the second student, since the second shift overlaps both the first and the third. Hint: A greedy strategy works

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

Answered: 1 week ago

Answered: 1 week ago

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago