Problem

Suppose you have n video streams that need to be sent, one after another, over a communica...

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 bt bits that need to be sent, at a constant rate, over a period of tt 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 your schedule starts at time 0 (and therefore ends at time, whichever order you choose). We assume that all the values bi and ti are positive integers.

Now, because you’re 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 exists a valid schedule.

Example. Suppose we have n = 3 streams, with

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

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

t = 2: half of the second stream has also been sent, and 2000 + 3000<5000 •2

Similar calculations hold for t = 3 and t = 4.

(a) Consider the following claim:

Claim: There exists a valid schedule if and only if each stream i satisfies .

Decide whether you think the claim is true or false, and give a proof of either the claim or its negation.

(b) Give an algorithm that takes a set of n streams, each specified by its number of bits bt and its time duration ti, as well as the link parameter r, and determines whether there exists a valid schedule. The running time of your algorithm should be polynomial in n.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4