Ctible intervals given n open intervals a1 b1 a2 b2


Could somebody help with these two exercises please

Exercise 1:

Compatible intervals Given n open intervals (a1, b1), (a2, b2), . . . , (an, bn) on the real line, each representing start and end times of some activity requiring the same resource, the task is to find the largest number of these intervals so that no two of them overlap.

Investigate the three greedy algorithms based on

  1. a- Earliest start first.
  2. b- Shortest duration first.
  3. c- Earliest finish first.

For each of the three algorithms, either prove that the algorithm always yields an optimal solution or give a counterexample showing this not to be the case.

Exercise 2: 

Rumor spreading problem: There are n people, each in possession of a different rumor. They want to share all the rumors with each other by sending electronic messages. Assume that a sender includes all the rumors he or she knows at the time the message is sent and that a message may only have one addressee.

  1. a- Design a greedy algorithm that always yields the minimum number of messages they need to send to guarantee that every one of them gets all the rumors
  2. b- Give the efficiency of your proposed algorithm as a function of n.

Request for Solution File

Ask an Expert for Answer!!
Chemistry: Ctible intervals given n open intervals a1 b1 a2 b2
Reference No:- TGS01159756

Expected delivery within 24 Hours