Download presentation
Presentation is loading. Please wait.
Published byRosalyn Arleen Whitehead Modified over 9 years ago
1
Minimizing Response time in Broadcast Scheduling Nikhil Bansal Don Coppersmith and Maxim Sviridenko
2
2 Problem Statement Collection of pages 1,2,…,n at a broadcast server (satellite) Requests r 1,…,r m Request r i : [page p i, arrival time a i ] 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 b i denote when r i is satisfied Response Time: b i – a i Goal: Find broadcast schedule to Minimize average response time ( i (b i – a i )) / m
3
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 <t. 1,1,232,32,3 Total Response Time = t=0 Requests Pages {1,2,3}
4
4 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 1 t=0 Requests Pages {1,2,3}
5
5 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 <t. 1,1,232,3 Total Response Time = 1 + 1 + 1 13 t=0 Requests Pages {1,2,3}
6
6 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 123 t=0 Requests Pages {1,2,3}
7
7 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9 1233 t=0 Requests Pages {1,2,3}
8
8 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9 1233 t=0 Requests Avg=1.5 Pages {1,2,3}
9
9 NP-Hard: [Erlebach, Hall 02] Resource augmentation: Can transmit s>1 pages per time slot. s-speed, c-approx: If max I Alg s (I)/Opt 1 (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
10 NP-Hard: [Erlebach, Hall 02] Resource augmentation: Can transmit s>1 pages per time slot. s-speed, c-approx: If max I Alg s (I)/Opt 1 (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(n 1/2 ) approximation [B., Charikar, Khanna, Naor 05] O(log 2 n/log log n) approximation [B., Coppersmith, Sviridenko 06]
11
11 Previous Work (Online Case) Round Robin: Trivial O(n) competitive Most outstanding requests, Longest Wait First ? Any deterministic alg: (n) competitive [Kalyanasundaram et al 00] Any randomized alg: (n 1/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
12 In this talk Average Response time minimization : Offline Setting a) 3-speed, 3-approximation b) (1+ )-speed, O(1/ )-approximation 1-speed, O(n 1/2 ) approximation c) O(log 2 n/ log log n) approximation (all via a natural LP relaxation)
13
13 The IP Formulation Key decision variable: : Whether page p transmitted at time t ? How to express response time of a request ?
14
14 Time-indexed IP formulation n t p : # requests for page p that arrive at time t
15
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.20.50.30.8 starting t’ = t+1, … until 1 unit of page p seen 0.50.10.30.2 0.60.00.3 0.1 0.6 request for green p=1 p=2 p=3
16
16 Idea for 3-speed, 3-approximation For 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
17 More careful analysis for 2-speed For each page p, mark intervals where cumulative amount of page transmitted by LP = 1/2 Even if one transmission within each interval Some requests may end up paying much more than LP. Some additional ideas give 2-speed, O(1) approx
18
18 Idea for O(n 1/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.20.50.30.8 starting t’ = t+1, … until 1 unit of page p seen 0.50.10.30.2 0.60.00.3 0.1 0.6 request for green Observation: If transmit p at t’ with prob, Expected response time = contribution to LP
19
19 Idea for O(n 1/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 p E [cost] = LP cost Pr [p scheduled at time t = ]
20
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] · 1 E[ cost of tentative schedule] = Opt LP cost.
21
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(n 1/2 ) on average
22
22 Analysis Backlog(t) = max x<t Tentative pages in [x,t) – (t-x) t
23
23 Analysis Backlog(t) = max x<t Tentative pages in [x,t) – (t-x) E[backlog(t)] = O(n 1/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(n 1/2 ) [Standard deviation]
24
24 Overview Good Pseudo-schedule (each request satisfied “locally”). But, Independent rounding for each page p. Backlog = O(n 1/2 ) when pages 1…n merged.
25
25 Attempt 1 Why choose the offset p independently for each page p. Perhaps a better dependent way? No. An ½ integral LP instance with O(n 1/2 ) backlog no matter what offsets chosen. Intuitively, choosing offsets is not useful because choice of p determines all future transmissions of page p.
26
26 Need to abandon locality!
27
27 Idea for improved approximation 1) Relax the locality requirement for tentative schedules 2) Ensure that combining individual schedules for each page does not produce a large backlog.
28
28 When can we violate locality? 0.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
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 t t’
30
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
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 = (n 1/2 ) backlog, when all pages combined. (p,1) (p,2) (p,3) (p’,1) (p’,2)
32
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( log 2 (T+n)) Will imply: 3 OPT + log 2 (T+n) approximation
33
33 Basic Idea Original 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 102030
34
34 Basic Idea Original 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 102030
35
35 LP for choosing offsets B(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
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
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)=1 Remove these blocks and Repeat for O(log (T+n)) steps... H: Intervals of 5 log (T+n) time slots
38
38 Overview of Algorithm Each recursion adds O(log (T+n)) to backlog Final solution: 3 Opt + O(log 2 (T+n)) Can improve overall guarantee slightly to O(log 2 (T+n)/log log (T+n)) Can show wlog T = poly (n)
39
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
40 Questions?
41
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 1 f: non-zero fractional variables
42
42 Cable Repair Problem Day 0 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123
43
43 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 +
44
44 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + Day 2: Visit Town 3 Day 2
45
45 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + 6 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2
46
46 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + 6 + 9 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2 Day 4: Visit Town 1
47
47 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Avg. Wait = (2 + 6 + 6 + 9)/ 14 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2 Day 4: Visit Town 1
48
48 Traveling Repairman with release times Collection of requests r 1,…,r m Request r i = ( Vertex v i, time t i ) 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
49 Broadcast Scheduling Problem Collection of pages 1,2,…,n at a broadcast server (satellite) Requests r 1,…,r m Request r i : [page p i, arrival time a i ] 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 r i satisfied at b i Response Time: b i – a i Goal: Find broadcast schedule to Minimize average response time ( i (b i – a i )) / m
50
50 Example 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 <t. 1,1,232,32,3 Total Response Time = t=0 Requests Pages {1,2,3}
51
51 Example 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 1 t=0 Requests Pages {1,2,3}
52
52 Example 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 <t. 1,1,232,3 Total Response Time = 1 + 1 + 1 13 t=0 Requests Pages {1,2,3}
53
53 Example 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 123 t=0 Requests Pages {1,2,3}
54
54 Example 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9 1233 t=0 Requests Pages {1,2,3}
55
55 Example 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 <t. 1,1,232,32,3 Total Response Time = 1 + 1 + 1 + 3 + 1 + 2 = 9 1233 t=0 Requests Avg=1.5 Pages {1,2,3}
56
56 NP-Hard: [Erlebach, Hall 02] Resource augmentation: Can transmit s>1 pages per time slot. s-speed, c-approx: If max I Alg s (I)/Opt 1 (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(n 1/2 ) approximation [B., Charikar, Khanna, Naor 05] O(log 2 n/log log n) approximation [B., Coppersmith, Sviridenko]
57
57 Previous Work (Online Case) Any deterministic alg: (n) competitive [Kalyanasundaram et al 00] Any randomized alg: (n 1/2 )- competitive B-Equi : 4-speed, 4-competitive [Edmonds, Pruhs 02] Longest Wait First: 6-speed, O(1) compet. [Edmonds, Pruhs 04]
58
58 In this talk Approximation Algorithms without Resource Augmentation. a) O(n 1/2 ) approximation [B., Charikar, Khanna, Naor 05] b) O(log 2 n/ log log n) approximation [B., Coppersmith, Sviridenko]
59
59 Time-indexed IP formulation n t p : # requests for page p that arrive at time t
60
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.20.50.30.8 starting t’ = t+1, … until 1 unit of page p seen 0.50.10.30.2 0.60.00.3 0.1 0.6 request for green tt+1t+2 … p=1 p=2 p=3
61
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.20.50.30.8 starting t’ = t+1, … until 1 unit of page p seen 0.50.10.30.2 0.60.00.3 0.1 0.6 request for green tt+1t+2 … p=1 p=2 p=3
62
62 Rounding Procedure First obtain a tentative schedule. May assign more than one page to a time slot.
63
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 one page to a time slot. Final Cost: Cost of tentative schedule + distance moved
64
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
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 p E [cost] = LP cost Pr [p scheduled at time t] = 0.20.50.30.80.3 request for green For request (p,t), contribution to LP =
66
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] = 1 E[ cost of tentative schedule] = Opt LP cost.
67
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) = (n 1/2 ) on average
68
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
69 Expected Backlog (n 1/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(n 1/2 ) pages (standard deviation)
70
70 Overview & Local Schedules Tentative Schedule: Each request, satisfied “locally” Random offset p for page p Backlog O(n 1/2 ) Unfortunately, there are examples where any “local” schedule has backlog (n 1/2 ) Local schedules very restricted. 0.20.50.30.80.3 request for green
71
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 \alpha x(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
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
73 LP for choosing offsets B(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 More than 50% blocks have some x(p,i,j)=1.
74
74 Overview of Algorithm Solve the LP. Remove the blocks that have x(p,i,j)=1. Shrink the problem. O(log (T+n)) iterations of the process Each step adds O(log (T+n)) to the backlog. Final solution: 3 Opt + O(log 2 (T+n)) Can remove dependence on T. And improve guarantee to O(log 2 (n)/log log (n))
75
75 Concluding Remarks Best known integrality gap 28/27 ¼ 1.037 Open: Is there an O(1) approximation?
76
76 Questions?
77
77 Our Approach For 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 that 1) Cost of pseudo schedule <= 3 LP cost 2) Any interval of size t has [ t – O(log 2 n), t+ O(log 2 n)] pages assigned in the pseudo-schedule B(p,i) B(p,i+1)
78
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 LP 1 cost If solution integral … we would be done! Backlog = 0 LP for choosing offsets
79
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)=1 Remove these blocks and Repeat for O(log (T+n)) steps... Intervals of 5 log (T+n) time slots
80
80 Our Approach For 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 that 1) Cost of pseudo schedule <= 3 LP cost 2) Any interval of size t has [ t – O(log 2 (T+n)), t+ O(log 2 (T+n))] pages assigned in the pseudo-schedule B(p,i) B(p,i+1)
81
81 Analysis Backlog(t) = max x<t Tentative pages in [x,t) – (t-x) ¸ trivial · x: last time when backlog = 0 t
82
82 Idea for O(n 1/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.20.50.30.8 starting t’ = t+1, … until 1 unit of page p seen 0.50.10.30.2 0.60.00.3 0.1 0.6 request for green Observation: If transmit p at t’ with prob, Expected response time = contribution to LP
83
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)=1 Remove these blocks and Repeat for O(log (T+n)) steps... Intervals of 5 log (T+n) time slots
84
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 LP 1 cost If solution integral … we would be done! Backlog = 0 LP for choosing offsets
85
85 Cable Repair Problem Day 0 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123
86
86 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 +
87
87 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + Day 2: Visit Town 3 Day 2
88
88 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + 6 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2
89
89 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Total Wait = 2 + 6 + 6 + 9 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2 Day 4: Visit Town 1
90
90 Cable Repair Problem Day 0 Day 1 Repairman serves n towns ; requests arrive arbitrarily Can visit exactly 1 town a day Can serve all outstanding requests, in that town Goal: Minimize average wait 123 Day 1: Visit Town 1 Avg. Wait = (2 + 6 + 6 + 9)/ 14 Day 2: Visit Town 3 Day 2 Day 3: Visit Town 2 Day 4: Visit Town 1
91
91 Idea for 3-speed, 3-approximation For 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
92 More careful analysis for 2-speed For each page p, mark intervals where cumulative amount of page transmitted by LP = 1/2 Even if one transmission within each interval Some requests may end up paying much more than LP. Some additional ideas give 2-speed, O(1) approx
93
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 1 f: non-zero fractional variables
94
94 Local Approach => Backlog = (n 1/2 ) If requests satisfied locally => above type of solutions only All choices for offsets are bad A 1,…,A n ½ {1,2,…,n} |A i | = n/2 For any {-1,+1} coloring of {1,2,…,n} some | A i | > n 1/2 Half Integral LP 0.5 Even Slots
95
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)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.