subject
Mathematics, 17.10.2019 01:30 shanua

Let x be a set of n intervals on the real line. a proper coloring of x assigns a color to each interval, so that any two overlapping intervals are assigned different colors. describe and analyze an efficient algorithm to compute the minimum number of colors needed to properly color x. assume that your input consists of two arrays l[1..n] and r[1..n], where l[i] and r[i] are the left and right endpoints of the ith interval the motivation for this problem is similar to the motivation for the interval scheduling problem we studied in class. suppose that we are given a bunch of events (e. g., courses) we need to schedule, then finding the fewest number of rooms we can schedule all of these events in, is the interval coloring problem described here. here is a brief description of a greedy algorithm, you should consider. let p-11,2, be the set of "colors" we want to use for the interevals. consider the intervals one-by-one in left-to-right order of start times and to each interval, assign the smallest color from p that is "available." you'll have to think pretty carefully about how to prove the correctness of this algorithm and how to present your proof. your proof will be graded for correctness as well as clarity.

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 14:00
Complete the truth table a. t, f, f, t b. t f f f c. f t f t d f t f t
Answers: 1
question
Mathematics, 21.06.2019 17:00
Issof claims that the scale factor is 1/2. which statement about his claim is correct
Answers: 3
question
Mathematics, 21.06.2019 17:20
How do you convert 1.27 to a percentage
Answers: 2
question
Mathematics, 22.06.2019 00:00
Jessica is organizing a guided tour of the rain forest. the average profit per person that the touring company makes is given by the rational expression 18x+35/x, where x is the number of people going on the tour. what does the numerator of this rational expression represents?
Answers: 2
You know the right answer?
Let x be a set of n intervals on the real line. a proper coloring of x assigns a color to each inter...
Questions
question
Mathematics, 26.07.2019 03:30
question
History, 26.07.2019 03:30
Questions on the website: 13722363