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

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 17:00, gggg79
What term makes it inconsistent y=2x - 4
Answers: 3
image
Mathematics, 21.06.2019 17:40, samvgesite
Divide. reduce the answer to lowest terms.5 2/3 ÷ 3 1/9
Answers: 3
image
Mathematics, 21.06.2019 18:30, jamesvazquez3135
The final cost of a sale is determined by multiplying the price on the tag by 75%. which best describes the function that represents the situation?
Answers: 1
image
Mathematics, 21.06.2019 19:00, rr3908661
Write an introductory paragraph for this corrie ten boom and her family were faced with some difficult choices after hitler came to power. some family members paid the ultimate price. write a carefully thought-out paper of at least 200 words dealing with the following concepts: --how should a christian act when evil is in power? --what do you think it would be like to live in an occupied country? remember to proofread anything you write thoroughly.
Answers: 1
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 in other subjects:

Konu
Mathematics, 20.09.2020 08:01
Konu
English, 20.09.2020 08:01