Minimizing Response time in Broadcast Scheduling Nikhil Bansal Don Coppersmith and Maxim Sviridenko

Preview:

DESCRIPTION

3 Problem Statement Response Time of r i = b i – a i b i : time r i satisfied a i : arrival time of r i Broadcasting page p at time t satisfies all outstanding requests for p that arrive at

Citation preview

Minimizing Response time in

Broadcast Scheduling

Nikhil Bansal

Don Coppersmith and Maxim Sviridenko

2

Problem StatementCollection of pages 1,2,…,n at a broadcast server (satellite)Requests r1,…,rm Request ri: [page pi, arrival time ai]

Many requests may arrive at a time slot.

Server transmits 1 page per time slot. Page p broadcast at time t, satisfies all outstanding requests

for p that arrived at time <t

Given a schedule, let bi denote when ri is satisfiedResponse Time: bi – ai

Goal: Find broadcast schedule to Minimize average response time (i (bi – ai)) / m

3

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time =

t=0

Requests

Pages {1,2,3}

4

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1

1t=0

Requests

Pages {1,2,3}

5

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1

1 3t=0

Requests

Pages {1,2,3}

6

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1

1 23t=0

Requests

Pages {1,2,3}

7

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9

1 23 3t=0

Requests

Pages {1,2,3}

8

Problem StatementResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9

1 23 3t=0

Requests Avg=1.5

Pages {1,2,3}

9

NP-Hard: [Erlebach, Hall 02]

Resource augmentation: Can transmit s>1 pages per time slot.s-speed, c-approx: If maxI Algs(I)/Opt1(I) · c

3-speed, 3-approx [Kalyanasundaram et al 00]6-speed, 1-approx [Erlebach, Hall 02] 2-speed, 2-approx & 4-speed, 1-approx [Gandhi et al 02]2-speed, 1-approx [Gandhi et al 02](1+)-speed, O(1/)-approx [B., Charikar, Khanna, Naor 05]

Resource augmentation vs No speed-up Requests (1,2) ( 3,4) (5,6) …Speed 2: Avg resp time = O(1) Speed 1: O(n)

10

NP-Hard: [Erlebach, Hall 02]

Resource augmentation: Can transmit s>1 pages per time slot.s-speed, c-approx: If maxI Algs(I)/Opt1(I) · c

3-speed, 3-approx [Kalyanasundaram et al 00]6-speed, 1-approx [Erlebach, Hall 02] 2-speed, 2-approx & 4-speed, 1-approx [Gandhi et al 02]2-speed, 1-approx [Gandhi et al 02](1+)-speed, O(1/)-approx [B., Charikar, Khanna, Naor 05]

Without speedup: Trivial O(n) approximation, Round RobinO(n1/2) approximation [B., Charikar, Khanna, Naor 05]O(log2n/log log n) approximation [B., Coppersmith, Sviridenko 06]

11

Previous Work (Online Case)Round Robin: Trivial O(n) competitiveMost outstanding requests , Longest Wait First ?

Any deterministic alg: (n) competitive [Kalyanasundaram et al 00]

Any randomized alg: (n1/2)- competitive

B-Equi : 4-speed, 4-competitive [Edmonds, Pruhs 02]

Longest Wait First : 6-speed, O(1)-compet. [Edmonds, Pruhs 04]

Minimize Max resp time: O(1) approx [Bartal, Muthukrishnan 00]

Throughput Maximization: 3/4 approx [Gandhi et al 02]

12

In this talkAverage Response time minimization : Offline Setting

a) 3-speed, 3-approximation

b) (1+)-speed, O(1/)-approximation 1-speed, O(n1/2) approximation

c) O(log2 n/ log log n) approximation

(all via a natural LP relaxation)

13

The IP Formulation

Key decision variable: : Whether page p transmitted at time t ?

How to express response time of a request ?

14

Time-indexed IP formulation

ntp: # requests for page p that arrive at time t

15

LP Solution : probability page p broadcast at t’ : probability, request for p at t, satisfied at t’>t

For request (p,t), contribution to LP

0.2 0.5 0.3 0.8 starting t’ = t+1, …until 1 unit of page p seen

0.50.1 0.3 0.2

0.20.6 0.00.3

0.3

0.1

0.6

request for green

p=1

p=2

p=3

16

Idea for 3-speed, 3-approximationFor each page p, mark intervals where cumulative amount

of page transmitted by LP = 1/3

If can ensure that one transmission of page p during each such interval => 3 approximation

Simple greedy algorithm (EDF type) ensures this.

17

More careful analysis for 2-speedFor each page p, mark intervals where cumulative amount

of page transmitted by LP = 1/2

Even if one transmission within each intervalSome requests may end up paying much more than LP.

Some additional ideas give 2-speed, O(1) approx

18

Idea for O(n1/2) approx : probability page p broadcast at t’ : probability, request for p at t, satisfied at t’>t

For request (p,t), contribution to LP

0.2 0.5 0.3 0.8 starting t’ = t+1, …until 1 unit of page p seen

0.50.1 0.3 0.2

0.20.6 0.00.3

0.3

0.1

0.6

request for green

Observation: If transmit p at t’ with prob , Expected response time = contribution to LP

19

Idea for O(n1/2) approx

Simple observation:Consider page p, choose 2 [0,1) uniformly at random

Mark times where cumulative page p transmitted thus far first becomes ¸ i+ for i=0,1,2,…

1+

2+

For any request for pE[cost] = LP cost

Pr [p scheduled at time t = ]

20

Rounding Procedure (Tentative)For each page p, choose p 2 [0,1) u.a.r

Tentative Schedule: Schedule p wherever cumulative amount first exceeds i+ p, for i=0,1,…

E[ # of tentative pages at any time] · 1E[ cost of tentative schedule] = Opt LP cost.

21

Tentative ! Proper Schedule

Greedily assign tentatively scheduled pages to a free time slot in the future

Tentative transmission at t, pushed ahead by Backlog(t)Will show Backlog(t) = O(n1/2) on average

22

Analysis

Backlog(t) = maxx<t Tentative pages in [x,t) – (t-x)

t

23

AnalysisBacklog(t) = maxx<t Tentative pages in [x,t) – (t-x)

E[backlog(t)] = O(n1/2) If (1+)-speed, E[Backlog(t)] = O(1/)

In interval J=[x,t], if LP has l(p) amount of page p,then tentative schedule has d l(p) e w/ prob frac(l(p)) or b l(p) c w/ prob 1- frac(l(p))

Size(J) = p l(p)|Tentative pages in J – Size(J)| = O(n1/2) [Standard deviation]

24

OverviewGood Pseudo-schedule (each request satisfied “locally”).

But, Independent rounding for each page p.Backlog = O(n1/2) when pages 1…n merged.

25

Attempt 1Why choose the offset p independently for each page p.

Perhaps a better dependent way?

No. An ½ integral LP instance with O(n1/2) backlog no matter what offsets chosen.

Intuitively, choosing offsets is not useful becausechoice of p determines all future transmissions of page p.

26

Need to abandon locality!

27

Idea for improved approximation1) Relax the locality requirement for tentative schedules

2) Ensure that combining individual schedules for each page does not produce a large backlog.

28

When can we violate locality?

0.5 0.50.50.5

Non-local: Requests here not satisfied locally.

Region1 Region 2

However Not a problem if: If region 1 and region 2 had similar # of requests for page p

Problem only if: Much fewer requests in region 2 than region 1

Suppose transmit here

29

Blocks For each page p, partition time into Blocks B(p,i)

Can choose offset (p,i) for B(p,i) u.a.r in [0,1]

B(p,i) B(p,i+1)

Expected cost for any request · 3 ¢ wait in LP

tt’

30

Semi-Local Schedules

In each block B(p,i) if choose offset (p,i) u.a.r 2 [0,1]Tentative (semi-local) Schedule: Cost · 3 times Opt cost

In each block B(p,i), LP transmits ¼ log(T+n) units of page p

(p,1) (p,2) (p,3)(p’,1) (p’,2)

31

Semi-Local Schedules

We will form a semi-local tentative schedule by choosing offsets (p,i) for each block B(p,i)

But, we will not do it randomly. Though low cost, it has high = (n1/2) backlog, when all pages combined.

(p,1) (p,2) (p,3)(p’,1) (p’,2)

32

Issue to address

How to determine offsets (p,i) ?

Will solve a sequence of LP’s Can choose offsets such that 1) Cost of pseudo-schedule · 3 OPT 2) Backlog O( log2 (T+n))

Will imply: 3 OPT + log2 (T+n) approximation

33

Basic IdeaOriginal LP constraint:For each time unit, 1 cumulative unit of page transmitted.

Relax it: Suppose only want 10 units of page in each group of 10 time units.

If solution integral : Great! Backlog <= 20

10 20 30

34

Basic IdeaOriginal LP constraint:For each time unit, 1 cumulative unit of page transmitted.

Relax it: Suppose only want 10 units of page in each group of 10 time units.

If only 50% variables integral: Still Great! Recurse: Backlog <= 20 ¢ log T

10 20 30

35

LP for choosing offsetsB(p,i) B(p,i+1)

What offset (p,i) to choose for block B(p,i) ?

Assume (p,i) 2 { j } j=1,2,…,1/Define variable x(p,i,j) s.t. x(p,i,j) = 1 iff (p,i) = j

Let R(B(p,i,j)) = contribution to total cost if (p,i) is j (coefficients of objective function)

36

Minimize p i j R(B(p,i,j)) x(p,i,j)j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,t) x(p,i,j) = 1 8 time t

c(p,i,j,t) =1 iff offset j for B(p,i) implies page p at time t

Number of constraints = |Blocks | + |time units|A LP soln with · |Blocks| + |time units| non-zero vars

If some x(p,i,j) fractional, ¸ 2 non-zero variables for B(p,i)Suppose |time units| < |Blocks|/2 … ¸ 50% good blocks|Blocks| ¼ (T+n)/ log (T+n)

LP for choosing offsets

37

Minimize p i j R(B(p,i,j)) x(p,i,j)j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,H) x(p,i,j) = Size(H) 8 intervals H

c(p,i,j,H) : units of page p in H if choose offset j for B(p,i)

Main Idea: Relax Constraints

¸ 50% of blocks have an x(p,i,j)=1Remove these blocks and Repeat for O(log (T+n)) steps ...

H: Intervals of 5 log (T+n) time slots

38

Overview of Algorithm

Each recursion adds O(log (T+n)) to backlog

Final solution: 3 Opt + O(log2 (T+n))

Can improve overall guarantee slightly toO(log2 (T+n)/log log (T+n))

Can show wlog T = poly (n)

39

Concluding Remarks

Best known integrality gap 1.027 Open: Is there an O(1) approximation?

Online Case: Best known: 4-speed, 4-competitive [Edmonds, Pruhs 02]

Is there a (1+)-speed, O(1)-competitive algorithm?

40

Questions?

41

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,H) x(p,i,j) = Size(H) 8 intervals H

|constraints| = |blocks| + |intervals| · (T+n)/log(T+n) + (T+n)/ 5 log(T+n)f + i · |constraints| (Basic LP soln)f/2 + i ¸ |blocks|

i ¸ |blocks| – 2 |intervals| ¸ 0.5 |blocks|

At least 50% blocks removed

i: variables set to 1f: non-zero fractional variables

42

Cable Repair Problem

Day 0

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3

43

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 +

44

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 +

Day 2: Visit Town 3

Day 2

45

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 + 6

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2

46

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 + 6 + 9

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2Day 4: Visit Town 1

47

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Avg. Wait = (2 + 6 + 6 + 9)/ 14

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2Day 4: Visit Town 1

48

Traveling Repairman with release timesCollection of requests r1,…,rm

Request ri = ( Vertex vi , time ti )A vertex may submit more than 1 request.

If repairmen visits v at time t it satisfies all outstanding requests at v made before time t.

Goal: Minimize average waiting time to satisfy request.

Considerably harder!

Very restricted case: All distances are 1.Also referred to as broadcast scheduling problem.

49

Broadcast Scheduling ProblemCollection of pages 1,2,…,n at a broadcast server (satellite)Requests r1,…,rm Request ri: [page pi, arrival time ai]

Many requests may arrive at a time slot.

Server transmits 1 page per time slot. Page p broadcast at time t, satisfies all outstanding requests

for p that arrived at time <t

If request ri satisfied at bi Response Time: bi – ai

Goal: Find broadcast schedule to Minimize average response time (i (bi – ai)) / m

50

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time =

t=0

Requests

Pages {1,2,3}

51

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1

1t=0

Requests

Pages {1,2,3}

52

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1

1 3t=0

Requests

Pages {1,2,3}

53

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1

1 23t=0

Requests

Pages {1,2,3}

54

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9

1 23 3t=0

Requests

Pages {1,2,3}

55

ExampleResponse Time of ri = bi – ai

bi : time ri satisfied ai : arrival time of ri

Broadcasting page p at time t satisfies all outstanding requests for p that arrive at <t.

1,1,2 3 2,3

Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9

1 23 3t=0

Requests Avg=1.5

Pages {1,2,3}

56

NP-Hard: [Erlebach, Hall 02]

Resource augmentation: Can transmit s>1 pages per time slot.s-speed, c-approx: If maxI Algs(I)/Opt1(I) · c

3-speed, 3-approx [Kalyanasundaram et al 00]6-speed, 1-approx [Erlebach, Hall 02] 2-speed, 2-approx & 4-speed, 1-approx [Gandhi et al 02]2-speed, 1-approx [Gandhi et al 02](1+)-speed, O(1/)-approx [B., Charikar, Khanna, Naor 05]

Without speedup: Trivial O(n) approximation, Round Robin

O(n1/2) approximation [B., Charikar, Khanna, Naor 05]O(log2n/log log n) approximation [B., Coppersmith, Sviridenko]

57

Previous Work (Online Case)

Any deterministic alg: (n) competitive [Kalyanasundaram et al 00]

Any randomized alg: (n1/2)- competitive

B-Equi : 4-speed, 4-competitive [Edmonds, Pruhs 02]

Longest Wait First: 6-speed, O(1) compet. [Edmonds, Pruhs 04]

58

In this talk

Approximation Algorithms without Resource Augmentation.

a) O(n1/2) approximation [B., Charikar, Khanna, Naor 05]

b) O(log2 n/ log log n) approximation [B., Coppersmith, Sviridenko]

59

Time-indexed IP formulation

ntp: # requests for page p that arrive at time t

60

LP Solution : amount of page p broadcast at t’ : request for p at t, amount satisfied at t’>t

For request (p,t), contribution to LP

0.2 0.5 0.3 0.8 starting t’ = t+1, …until 1 unit of page p seen

0.50.1 0.3 0.2

0.20.6 0.00.3

0.3

0.1

0.6

request for green

t t+1 t+2 …

p=1

p=2

p=3

61

LP Solution : amount of page p broadcast at t’ : request for p at t, amount satisfied at t’>t

For request (p,t), contribution to LP

0.2 0.5 0.3 0.8 starting t’ = t+1, …until 1 unit of page p seen

0.50.1 0.3 0.2

0.20.6 0.00.3

0.3

0.1

0.6

request for green

t t+1 t+2 …

p=1p=2p=3

62

Rounding Procedure

First obtain a tentative schedule. May assign more than onepage to a time slot.

63

Rounding Procedure

Greedily assign tentatively scheduled pages to a free time slot in the future

First obtain a tentative schedule. May assign more than onepage to a time slot.

Final Cost: Cost of tentative schedule + distance moved

64

Rounding Procedure (Tentative)Consider page p, choose 2 [0,1) uniformly at random

Mark times where cumulative page p transmitted thus far in LP solution first becomes ¸ i+ for i=0,1,2,…

1+

2+

65

Rounding Procedure (Tentative)Consider page p, choose 2 [0,1) uniformly at random

Mark times where cumulative page p transmitted thus far in LP solution first becomes ¸ i+ for i=0,1,2,…

For any request for page pE[cost] = LP cost

Pr [p scheduled at time t] = 0.2 0.5 0.3 0.80.3

request for green

For request (p,t), contribution to LP =

66

Rounding Procedure (Tentative)For each page p, choose p 2 [0,1) u.a.r

Tentative Schedule: Schedule p wherever cumulative amount first exceeds i+ p, for i=0,1,…

E[ # of tentative pages at any time] = 1E[ cost of tentative schedule] = Opt LP cost.

67

Tentative ! Proper Schedule

Greedily assign tentatively scheduled pages to a free time slot in the future

Tentative transmission at t, pushed ahead by Backlog(t)

Backlog(t) = (n1/2) on average

68

Analysis

Backlog at time t : No more than b, if every interval [t-x,t] has at most x+b

pages assigned to it.

t

69

Expected Backlog (n1/2)

Consider interval [t-x,t]If LP schedules l(p) amount of page p,

Tentative schedule has d l(p) e w/ prob frac(l(p)) or b l(p) c w/ prob 1- frac(l(p))

Example: If LP sends 10.3 units of page 1, tentative schedule has 11 pages with prob 0.3 10 pages with prob 0.7

x = p l(p)

Interval [t-x,t] has x § O(n1/2) pages (standard deviation)

70

Overview & Local SchedulesTentative Schedule: Each request, satisfied “locally”

Random offset p for page p Backlog O(n1/2)

Unfortunately, there are examples where any “local” schedule has backlog (n1/2)

Local schedules very restricted.

0.2 0.5 0.3 0.80.3

request for green

71

How does this apply here?

We reduced our problem to determining offset \alpha(p,i) for each block B(p,i)

Write an LP to determine \alpha(p,i)Suppose \alphax(p,i,j)

Block B(p,i) contains at most 2 log T units of page p.So, number of blocks \geq T/2\log T

Need 1 offset per block,

72

How to choose the offsets?

Suppose we partition time into intervals of size 3.

Tentative schedule with Property: Any interval of size 3 is assigned at most 3 transmissions.

Then Backlog at most 6.

73

LP for choosing offsetsB(p,i) B(p,i+1)

Write an LP for choosing offsets for each block B(p,i)x(p,i,j) =1 : If offset = j/(n+T)2 for block B(p,i) j 2 [1,(n+T)2]

Partition time into intervals with 5 log (T+n) time slots each. Constraint: Each interval has exactly 5 log (T+n) pages assigned in the tentative schedule.

Constraints < Number of blocks / 2 => More than 50% blocks have some x(p,i,j)=1.

74

Overview of AlgorithmSolve the LP.Remove the blocks that have x(p,i,j)=1.Shrink the problem.

O(log (T+n)) iterations of the processEach step adds O(log (T+n)) to the backlog.Final solution: 3 Opt + O(log2 (T+n))

Can remove dependence on T.And improve guarantee to O(log2 (n)/log log (n))

75

Concluding Remarks

Best known integrality gap 28/27 ¼ 1.037 Open: Is there an O(1) approximation?

76

Questions?

77

Our ApproachFor each page p, partition time into blocks B(p,i) Cumulative page p broadcast during B(p,i) 2 [log(T+n) ,2 log(T+n)]

We will choose offsets (p,i) 2 [0,1] for each B(p,i), such that1) Cost of pseudo schedule <= 3 LP cost2) Any interval of size t has [ t – O(log2 n), t+ O(log2 n)] pages assigned in the pseudo-schedule

B(p,i) B(p,i+1)

78

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,t) x(p,i,j) = 1 8 time t

c(p,i,j,t) =1 iff offset j for B(p,i) implies page p at time t

Choosing each offset uniformly (x(p,i,j) = )Feasible with value <= 3 LP1 cost

If solution integral … we would be done! Backlog = 0

LP for choosing offsets

79

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,H) x(p,i,j) = Size(H) 8 intervals H

c(p,i,j,H) : units of page p in H if choose offset j for B(p,i)

Relax constraints:

Main Idea: Relax Constraints

If integral solution, then Backlog = O(log (T+n))Can show ¸ 50% of blocks have an x(p,i,j)=1Remove these blocks and Repeat for O(log (T+n)) steps ...

Intervals of 5 log (T+n) time slots

80

Our ApproachFor each page p, partition time into blocks B(p,i) Schedule is local within each block B(p,i)

We will choose offsets (p,i) 2 [0,1] for each B(p,i), such that1) Cost of pseudo schedule <= 3 LP cost2) Any interval of size t has [ t – O(log2 (T+n)), t+ O(log2 (T+n))] pages assigned in the pseudo-schedule

B(p,i) B(p,i+1)

81

Analysis

Backlog(t) = maxx<t Tentative pages in [x,t) – (t-x)

¸ trivial · x: last time when backlog = 0

t

82

Idea for O(n1/2) approx : amount of page p broadcast at t’ : request for p at t, amount satisfied at t’>t

For request (p,t), contribution to LP

0.2 0.5 0.3 0.8 starting t’ = t+1, …until 1 unit of page p seen

0.50.1 0.3 0.2

0.20.6 0.00.3

0.3

0.1

0.6

request for green

Observation: If transmit p at t’ with prob , Expected response time = contribution to LP

83

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,H) x(p,i,j) = Size(H) 8 intervals H

c(p,i,j,H) : units of page p in H if choose offset j for B(p,i)

Relax constraints:

Main Idea: Relax Constraints

If integral solution, then Backlog = O(log (T+n))Can show ¸ 50% of blocks have an x(p,i,j)=1Remove these blocks and Repeat for O(log (T+n)) steps ...

Intervals of 5 log (T+n) time slots

84

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,t) x(p,i,j) = 1 8 time t

c(p,i,j,t) =1 iff offset j for B(p,i) implies page p at time t

Choosing each offset uniformly (x(p,i,j) = )Feasible with value <= 3 LP1 cost

If solution integral … we would be done! Backlog = 0

LP for choosing offsets

85

Cable Repair Problem

Day 0

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3

86

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 +

87

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 +

Day 2: Visit Town 3

Day 2

88

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 + 6

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2

89

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Total Wait = 2 + 6 + 6 + 9

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2Day 4: Visit Town 1

90

Cable Repair Problem

Day 0

Day 1

Repairman serves n towns ; requests arrive arbitrarily

Can visit exactly 1 town a dayCan serve all outstanding requests, in that town

Goal: Minimize average wait

1 2 3Day 1: Visit Town 1

Avg. Wait = (2 + 6 + 6 + 9)/ 14

Day 2: Visit Town 3

Day 2

Day 3: Visit Town 2Day 4: Visit Town 1

91

Idea for 3-speed, 3-approximationFor each page p, mark intervals where cumulative amount

of page transmitted by LP = 1/3

If can ensure that one transmission of page p during each such interval => 3 approximation

Simple greedy algorithm (EDF type) ensures this.

92

More careful analysis for 2-speedFor each page p, mark intervals where cumulative amount

of page transmitted by LP = 1/2

Even if one transmission within each intervalSome requests may end up paying much more than LP.

Some additional ideas give 2-speed, O(1) approx

93

Minimize p i j R(B(p,i,j)) x(p,i,j)

j x(p,i,j) = 1 8 Blocks B(p,i)p i j c(p,i,j,H) x(p,i,j) = Size(H) 8 intervals H

|constraints| = |blocks| + |intervals| · (T+n)/log(T+n) + (T+n)/ 5 log(T+n)f + i · |constraints| (Basic LP soln)f/2 + i ¸ |blocks|

i ¸ |blocks| – 2 |intervals| ¸ 0.5 |blocks|

At least 50% blocks removed

i: variables set to 1f: non-zero fractional variables

94

Local Approach => Backlog = (n1/2)

If requests satisfied locally => above type of solutions only

All choices for offsets are bad

A1,…,An ½ {1,2,…,n} |Ai| = n/2

For any {-1,+1} coloring of {1,2,…,n} some | Ai | > n1/2

Half Integral LP

0.5 0.50.50.5

Even Slots

95

Defining blocks

B(p,i) B(p,i+1)

t

r(p,t) : LP wait time for request for page p, that arrives at t

Tail of B(p,i)

Tail of B(p,i) : Interval when last 1 unit of page p transmitted by LP

Intuitively, allows us to move request arriving at t’ to t.

Every interval that transmits >= log(T+n) units of p, has such t.

r(p,t) · 2 r(p,t’) for all t’ in tail of B(p,i)

Recommended