to check whether the representation of input


To check whether the representation of input elements does not affect the running time of an algorithm.

Suppose you have n video streams that need to be sent, one after another, over a communication link. Stream I consists of a total of bi bits that need to be sent, at a constant rate, over a period of ti seconds. You cannot send two streams at the same time, so you need to determine a schedule for the streams: an order in which to send them. Whichever order you choose, there cannot be any delays between the end of one stream and the start of the next. Suppose you schedule starts at time 0(and therefore ends at time ∑ni=0 ti ,whichever order you chose).we assume that all the values b and ti  are positive integers.

Now, because you are just one user ,the link does not want you taking up too much bandwidth, so it imposes the following constraint ,using a fixed parameter r:

(*) for each natural number t>0,the total number of bits you send over the time interval from 0 to t cannot exceed rt.

Note that this constraint is only imposed for time intervals that start at 0, not for time intervals that start at any other value.

We say that a schedule is valid if it satisfies the constraint (*) imposed by the link.

The problem given a set of n streams, each specified by its number of bits bi and its time duration ti ,as well as the link parameter r, determine whether there exist a valid schedule.

Example: suppose we have n=3 streams, with

(b1, t1)=(2000,1)       (b2, t2)=(6000,2)         (b3, t3)=(2000,1)

and suppose the link's parameter is r=5000.then the schedule that n runs the streams in the order 1,2,3 is valid, since the constant (*) is satisfied:

t=1; the whole first stream has been sent, and 2000<5000

t=2 ; half of the second stream has also been sent.

and 2000+3000 <5000

Similar calculations hold for t=3 and t=4

Give an algorithm that takes a set of n streams, each specified by its number of bits bi and its time duration ti, as well as the link parameter r, and determine whether e there exists a valid schedule .the running time of you algorithm should be polynomial in n.

Request for Solution File

Ask an Expert for Answer!!
Mathematics: to check whether the representation of input
Reference No:- TGS0452903

Expected delivery within 24 Hours