Presentation is loading. Please wait.

Presentation is loading. Please wait.

 On-line problem  Input arrives one at a time, and a decision is made (and cannot be changed).  In the minADM problem: lightpaths arrive one at a time,

Similar presentations


Presentation on theme: " On-line problem  Input arrives one at a time, and a decision is made (and cannot be changed).  In the minADM problem: lightpaths arrive one at a time,"— Presentation transcript:

1  On-line problem  Input arrives one at a time, and a decision is made (and cannot be changed).  In the minADM problem: lightpaths arrive one at a time, and need to be colored.  Competitive analysis  An on-line algorithm A is c -competitive if A(I)  c OPT(I) for any input sequence I. (A(I) and OPT(I) are #ADMs used by A and by an optimal offline algorithm OPT.) 6.1 on-line

2 When a new path arrives: 1. if can close a cycle 2. if can extend a path 3. else - assign same color - assign a new color #ADMs=7 6.2 algorithm ALG

3 3 2 3 2 2 1 3 2 When a new path arrives: 1. if can close a cycle 2. if can extend a path 3. else - assign same color - assign a new color

4 Theorem: ALG is 7/4-competitive on any topology. This is optimal even for a ring. Theorem: ALG is 3/2-competitive on a path. This is optimal.

5 k paths k-1 spaces: x between same color k-1-x between different colors k=12 x=6 Theorem: ALG is 3/2-competitive on a path, and this is best possible competitive ratio. 1. Lower bound

6 So far: any algorithm uses 2k ADMs now – a short path at each gap of diffferent colors (k-1-x such gaps) Any algorithm uses at least one more ADM for each (ALG uses exactly one) So: any algorithm ≥ 2k + (k-1-x) ADMs k=12, x=6, 12-1-6=5

7 now – two long paths at each of the k gap of same color So far: use ≥ 2k + (k-1-x) ADMs Any algorithm must use 2 ADMs for each So: any algorithm ≥ 2k + (k-1-x) + 4x = = 3k+3x-1 ADMs

8 OPT: the short paths ≤ 2k ADMs for the long paths 2x ADMs any algorithm/OPT  3/2 – 1/(2k) We showed: any algorithm uses ≥ 3k+3x-1 ADMs OPT  2k + 2x

9 OPT saves x ADMs ALG saves y ADMs 2. Upper bound

10 Claim: OPT – max matching at each point ≤

11 For the proof choose a specific OPT. Recall that OPT can choose any matching at each node. savings of OPT which are not savings of ALG Y - savings of ALG which are also savings of OPT

12 a b a came before b c c map 1-1

13 savings of S (y) Savings of S* (x)

14 Theorem: ALG is 7/4-competitive on any topology. This is optimal even for a ring. 1. Lower bound

15 Case a: 7/4=1.75

16 Case b: Case b1: 6/3 = 2 Case b2: 5/3 = 1.67 any algorithm ≥ 1.67 any algorithm ≥ 1.75hw:

17 #ADMs = N + #chains N lightpaths cycles chains Recall: 2. Upper bound

18 D 0 (S) – lightpath not sharing any ADM D 1 (S) – lightpath sharing ONE ADM D 2 (S) – lightpath sharing BOTH ADMs d 0 (S) = 2 d 1 (S) = 4 d 2 (S) = 19 d 0 (S) + d 1 (S) + d 2 (S) = 25 = N N=25 lightpaths Consider a solution S

19 S – ALG, Solution S=chains + cycles #ADMs = N + #chains

20 We define: and get

21 D 0 (S) – lightpath not sharing any ADM D 1 (S) – lightpath sharing ONE ADM D 2 (S) – lightpath sharing BOTH ADMs d 0 (S) = 2 d 1 (S) = 4 d 2 (S) = 19 d 0 (S) + d 1 (S) + d 2 (S) = 25 = N N=25 lightpaths example #ADMs=29

22 d 0 (S) = 2 d 2 (S) = 19 N=25 suppose #chains(OPT)=2, cost(OPT)=25+2=27

23 Lemmas 1. cost(S) - cost(OPT) = = N/2 + (d 0 (S)-d 2 (S)-2|chains(OPT)|)/2 2. d 0 (S)  d 2 (S) + |chains(OPT)| + N/2 Combining, we have |cost(S)| - |cost(OPT)|  3N/4  3 |cost(S*)|/4 next slide previous slide Theorem: cost(S)  7cost(OPT)/4 Theorem: ALG is 7/4-competitive on any topology. This is optimal even for a ring.

24 Lemma 1 d 0 (S)  d 2 (S) + |chains(S*)| + N/2 orient S* for any u  D 0 (S) 1.if u is last in some chain of S*, map u to this chain 2.else i.u’  D 0 (S)contradiction ii.u’  D 1 (S)map u to {u, u’} iii.u’  D 2 (S)map u to u’ uu’ S*

25 orient S* for u  D 0 (S) 1.if u is last in some chain of S*, map u to this chain 2.else i.u’  D 0 (S)contradiction ii.u’  D 1 (S)map u to {u, u’} iii.u’  D 2 (S)map u to u’ uu’ S* d 0 (S)  d 2 (S) + chains(S*) + N/2


Download ppt " On-line problem  Input arrives one at a time, and a decision is made (and cannot be changed).  In the minADM problem: lightpaths arrive one at a time,"

Similar presentations


Ads by Google