Question: Computer Science greedy algorithm problem. I will give a thumb up, thank you! (40 pts) An educational fair is held at Boulder High School field

Computer Science greedy algorithm problem. I will give a thumb up, thank you!

Computer Science greedy algorithm problem. I will give a thumb up, thank

(40 pts) An educational fair is held at Boulder High School field today from t0(9 am) to t 640 (5 pm). There are n schools Si,..., Sn attending the fair, and each school S, will attend during a time interval G, uil with 0-li ui-640, A school supply company wants to show its ad on a large screen television in the field several times during the day. The company has to make sure each school sees the ad but also wants to minimize the number of times the ad is shown. For example: school! [l, u 15,73 2[10,70 3[10,98) 4 [105, 160] 5 [130, 186] 6 90, 195) If the ad is shown at times t = 70 and t2-160, then all 6 schools will see the ad (a) Consider a greedy algorithm A that selects a time instance when the maximum number of schools are present simultaneously. The ad is scheduled at this time and the schools covered by this ad are then removed from further consideration The algorithm A is then applied recursively to the remaining schools. Give an example where this algorithm shows more ads than is necessary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!