Tessellate S.T.E.M.S - Computer Science - School - Set 2 - Problem 3

We have n n events each of them characterized by their starting time and ending time ( a i , b i ) (a_i, b_i) with ( a i < = b i ) (a_i <= b_i)

Let S S be a set containing all these events.

Now lets consider a algorithm

  • Keep doing the following steps until S S is empty:
  • Step 1: you choose the event ending the earliest in set S S
  • Step 2: now delete all the events in S S having a intersection with this chosen event then go to step one

Let g = g = the number of times you did step 1, p = p = the maximum number of events which can be chosen such that none of them intersect with each other

Two event ( x 1 , y 1 ) (x_1,y_1) and ( x 2 , y 2 ) (x_2,y_2) with ( x 1 y 1 ) (x_1 \leq y_1 ) and ( x 2 < = y 2 ) (x_2 <= y_2) don't intersect if x 1 > y 2 x_1 >y_2 or x 2 > y 1 x_2 > y_1 .


This problem is a part of Tessellate S.T.E.M.S.

g / 2 > p g/2 > p g = p g = p g < p g < p g p / 2 g \leq p/2

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...