Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input: A set S = { ( li , ri ) | 1 < = i < = n } of n intervals denoted by

Input: A set S ={(li
, ri)|1<= i <= n} of n intervals denoted by their left- and right-point
over a real line L =(1, M).
Objective: Using the fewest number of colors, assign a color to each interval such that no
two overlapping intervals can receive the same color. (Note that two intervals i and j when
li < ri = lj < rj are not considered overlapped.)
1
(a) Consider the following iterative greedy algorithm. Assign color 1 to as many intervals as
possible, then assign color 2 to as many intervals as possible, then assign color 3 to as many
intervals as possible, etc. Does this algorithm solve the problem? Justify your answer.
(b) Now, consider the following greedy algorithm. Process the intervals in non-decreasing order of
their left points, i.e., l1<= l2<=<= ln. Consider intervals in this order and assign colors such
that (i) interval 1 is assigned color 1,(ii) when considering interval i, if there is an interval j
such that j < i and the color assigned to j can be assigned to i, then assign that color to i,
and (iii) otherwise, assign a new color to interval i. Does this algorithm solve the problem?
Justify your answer.

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Input: A set S = { ( li , ri ) | 1 Answered: 1 week ago

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago