Presentation is loading. Please wait.

Presentation is loading. Please wait.

First lecture in Mathematics

Similar presentations


Presentation on theme: "First lecture in Mathematics"— Presentation transcript:

1 First lecture in Mathematics
Clearly 1 + 1 = 2 But this is a complicated way to write this. Hereby we suggest some improvement. Bertinoro, 5/5/08

2 Step 1 and and Bertinoro, 5/5/08

3 1 + 1 = 2 So can be simplifid as which is clearly more intuitive
Bertinoro, 5/5/08

4 Step 2 and Bertinoro, 5/5/08

5 So 1 + 1 = 2 can be further simplifid as Bertinoro, 5/5/08

6 Step 2 and hence Bertinoro, 5/5/08

7 1 + 1 = 2 So eventually gets its final form: Now, decide for yourself:
1. which of the forms is the simplest. 2. which of the forms will make your career faster? 3. which of the forms will mostly impress your boss/boyfriend/girlfriend/mother? Bertinoro, 5/5/08

8 We are given lightpaths
1.2. Cost functions We are given lightpaths we want to get a coloring S such that cost(S) is minimal. What is cost(S) ? Bertinoro, 5/5/08

9 1. number of wavelengths 1.2. Cost functions #colors = 4
Bertinoro, 5/5/08

10 2. Switching cost OADM ADM #ADMs + #OADMs Bertinoro, 5/5/08

11 ADM OADM #ADMs + #OADMs = 12 + 8 Bertinoro, 5/5/08

12 but number of OADMs is fixed, so …
Bertinoro, 5/5/08

13 2. number of ADMs #ADMs = 12 Bertinoro, 5/5/08

14 #ADMs=12 #ADMs=9 Bertinoro, 5/5/08

15 Trade-off between #colors and #ADMs
Bertinoro, 5/5/08

16 #ADMs=8 #colors=2 #ADMs=7 #colors=3 Bertinoro, 5/5/08

17 g=2 With grooming #ADMs=9 #ADMs=8 Bertinoro, 5/5/08

18 1.3. Problems in this talk Minimize the number of ADMs
with and without grooming Complexity special networks, general networks Approximation algorithms on-line Bertinoro, 5/5/08

19 Traffic Grooming Ring On-line
Flammini, Moscardeli, Gianpierro, Shalom, Z /6/7 On-line Shalom, Wong, Zaks, 2007 Bertinoro, 5/5/08

20 ALG: #ADMs used by the algorithm
2.1 approximation ratio N: # of lightpaths ALG: #ADMs used by the algorithm OPT: #ADMs used by an optimal solution ALG  2N N  OPT ALG  2 x OPT Bertinoro, 5/5/08

21 w/out grooming: N  ALG  2N N  OPT  2N ALG  2 x OPT w/ grooming:
R: # of lightpaths ALG: #ADMs used by the algorithm OPT: #ADMs used by an optimal solution w/out grooming: N  ALG  2N N  OPT  2N ALG  2 x OPT w/ grooming: N/g  ALG  2N N/g  OPT  2N ALG  2g x OPT Bertinoro, 5/5/08

22 2.2 Basic relation Cycles are good, chains are bad N lightpaths cycles
#ADMs = N + #chains Bertinoro, 5/5/08

23 Eliminate cycles of lightpaths Find matchings of lightpaths
#ADMs = N + #chains In the approximation algorithms there are two common techniques for saving ADMs: Eliminate cycles of lightpaths Find matchings of lightpaths Bertinoro, 5/5/08

24 cost(S) = 2N-savings=26-7=19 Every connection saves 1 ADM
2.3 Note Min ADM problem: (cost=#ADMs) Connections are good, chains are bad N lightpaths N=13 cost(S) = N + chains=13+6=19 Every path costs 1 ADM cost(S) = 2N-savings=26-7=19 Every connection saves 1 ADM Bertinoro, 5/5/08

25 Assume that an optimal solution S* saves x ADMs,
2.4 a basic lemma Assume that an optimal solution S* saves x ADMs, and a solution S saves y ADMs Bertinoro, 5/5/08

26 Optimal solution S* saves x ADMs a solution S saves y ADMs
Bertinoro, 5/5/08

27 2.5 notaton N=25 lightpaths D0(S) – lightpath not sharing any ADM
D1(S) – lightpath sharing ONE ADM D2(S) – lightpath sharing BOTH ADMs N=25 lightpaths d0(S) = 2 d1(S) = 4 d2(S) = 19 d0(S) + d1(S) + d2(S) = 25 = N Bertinoro, 5/5/08

28 2.6 a basic tool Solution S=chains + cycles #ADMs = N + #chains
S – ALG, S* - OPT Bertinoro, 5/5/08

29 We define: and get Bertinoro, 5/5/08

30 2.7 example N=25 lightpaths D0(S) – lightpath not sharing any ADM
D1(S) – lightpath sharing ONE ADM D2(S) – lightpath sharing BOTH ADMs N=25 lightpaths d0(S) = 2 d1(S) = 4 #ADMs=29 d2(S) = 19 d0(S) + d1(S) + d2(S) = 25 = N Bertinoro, 5/5/08

31 suppose #chains(S*)=2, cost(S*)=25+2=27
d0(S) = 2 d2(S) = 19 Bertinoro, 5/5/08

32 3.3 minADM with grooming is NP-complete for a star
path of length 1 path of length 2 Bertinoro, 5/5/08

33 path of length 1 path of length 2 ( trivial ) Star, g=1
Bertinoro, 5/5/08

34 xi paths of length 2 yi paths of length 1
Star, g=2 The number of used ADM is exactly equal to the lower bound of needed ADM: 2 1 xi paths of length 2 yi paths of length 1 i n nodes 1,…,n node 0 Bertinoro, 5/5/08

35 Edge Partition into 3-regular graphs  Star grooming, g=3
Star, g≥ NP-complete Sketch for g=3: 3-Exact Cover  Edge Partition into 3-regular graphs  Star grooming, g=3 Bertinoro, 5/5/08

36 3-Exact Cover: Input: set A of size 3n, and a collection S of subsets of A of size 3 each. Output: are there n subsets in the collection S that cover A? Bertinoro, 5/5/08

37 Edge Partition into 3-regular graphs:
Input: undirected graph G = (V,E). Output: can E be partitioned into subsets E1,…,Em , each inducing a 3-regular subgraph G=(Vt,Et), t=1,…,m ? Bertinoro, 5/5/08

38 Edge Partition into 3-regular graphs  Star grooming, g=3
3-Exact Cover  Edge Partition into 3-regular graphs  Star grooming, g=3 Bertinoro, 5/5/08

39 sets elements Bertinoro, 5/5/08

40 Edge Partition into 3-regular graphs  Star grooming, g=3
3-Exact Cover  Edge Partition into 3-regular graphs  Star grooming, g=3 Bertinoro, 5/5/08

41 4 1 4 S G 3 1 3 2 2 Claim: there exists a solution using at most 2|E|/3 ADMs iff the edges of G can be partitioned into 3-regular graphs. Bertinoro, 5/5/08

42 4 5 5 4 3 1 1 3 2 2 =2 g=2 Bertinoro, 5/5/08

43 eliminate short cycles, then find matchings
4.1 basic algorithm eliminate short cycles, then find matchings Preprocessing: While there is a cycle C of length ≤ l do: Remove (the lightpaths of) C from the instance Processing: Designate each lightpath as a chain Do Build the matching graph M of the chains Find a maximum matching MM of M Combine chains according to MM Until M has no edges Bertinoro, 5/5/08

44 By removing the preprocessing phase (l=1) we obtain algorithm PIM(1)
The running time of the algorithm is exponential in l due to the preprocessing phase By removing the preprocessing phase (l=1) we obtain algorithm PIM(1) Recall: Bertinoro, 5/5/08

45 algorithm PIM(l) Bertinoro, 5/5/08

46 Need to prove: We will show: Bertinoro, 5/5/08

47 38 lightpaths, 5 chains, 3 cycles
Take S*: in the example : 38 lightpaths, 5 chains, 3 cycles Bertinoro, 5/5/08

48 in the example : 10 lightpaths are used to form cycles in S
preprocessing stage of S: eliminate cycles of The lightpaths that we used are colored red: in the example : 10 lightpaths are used to form cycles in S Bertinoro, 5/5/08

49 So, after preprocessing stage of S: in S
So, after preprocessing stage of S: in S* we have the following lightpaths: Bertinoro, 5/5/08

50 Now the algorithm is doing MM,MM,MM,…
We show that already after the first MM we are ok. Bertinoro, 5/5/08

51 We show that in the remaining lightpaths there is a
MM’ ≤ MM that is ok. Bertinoro, 5/5/08

52 in the example : 1 for each odd path and for each odd cycle
Bertinoro, 5/5/08

53 Show: Which implies Bertinoro, 5/5/08

54 Since there are at most N lightpath left, and each odd cycle is of size at least
Bertinoro, 5/5/08

55 1. Original chain of S* that was untouched
1 here is matched with 1 here Bertinoro, 5/5/08

56 2. A a chain of S* that was partitioned into t parts
t-1 here are matched with t-1 here 1 here is matched with 1 here Bertinoro, 5/5/08

57 3. A a cycle S* that was partitioned into t parts
Each 1 here is matched with at least 1 here Bertinoro, 5/5/08

58 4.2 basic algorithm without preprocessing
PIM(l) Preprocessing: While there is a cycle C of length ≤ l do: Remove (the lightpaths of) C from the instance Processing: Designate each lightpath as a chain Do Build the matching graph M of the chains Find a maximum matching MM of M Combine chains according to MM Until M has no edges Bertinoro, 5/5/08

59 Without preprocessing:
This is optimal. Bertinoro, 5/5/08

60 Upper bound Recall: and to show that we prove that e(S) ≤ 1/5
Bertinoro, 5/5/08

61 Orient the chains and cycles of S*.
Bertinoro, 5/5/08

62 Let LAST be the set of nodes which are last elements of the chains according to this orientation.
Bertinoro, 5/5/08

63 By mapping a path in D0(S) to either
a path of D2(S) or to a chain or to a cycle of size ≥ 5 Bertinoro, 5/5/08

64 The Mapping As the graph is finite, this process continues until p is mapped, or we re-encounter a node. In this case: C = {qi} Map p to C return It is easy to see that |C| is odd. We also show that |C| > 3. q1 q2 q3 q0=p q1 can not be in D0(S), otherwise the algorithm would add the edge (q0,q1) to the matching. If q2 is in D2(S) then: p”=q2 map p to p” return If q0 is the last node of a path of S* then: p’=q0 map p to p’ return Otherwise, q3 is the next node in q2’s path/cycle in S* Otherwise, q1 is the next node in q0’s path/cycle in S* If q2 is the last node of a path of S* then: p’=q2 map p to p’ return If q1 is in D2(S) then: p”=q1 map p to p” return Otherwise q1 has exactly one neighbor q2 in GS. Obviously q2 is not in D0(S). q3 can not be in D0(S), otherwise the above path would be an augmenting path of the maximum matching found by the algorithm. Bertinoro, 5/5/08

65 Algorithm Input: Graph G, set of lightpaths P, g > 0
Step 1: Choose a parameter k = k(g). Step 2: Consider all subsets of P of size If a subset A is 1-colorable (i.e., any edge is used at most g times) then weight[A]=endpoints(A) Bertinoro, 5/5/08

66 Step 3: COVER an approximation to the Minimum Weight Set Cover of S
S – collection of all legal sets of at most kg lightpaths, each with its switching cost. Step 3: COVER an approximation to the Minimum Weight Set Cover of S Step 4: Convert COVER to a PARTITION Output: the coloring induced by PARTITION Bertinoro, 5/5/08

67 Legal coloring For any fixed g, the number of subsets constructed in the first phase is Bertinoro, 5/5/08

68 5.2 analysis: ln(g)-approximation for a ring
Legal coloring , B is 1-colorable  A is 1-colorable ( correctness). (and cost(A)  cost(B).) Bertinoro, 5/5/08

69 for every set cover SC. Bertinoro, 5/5/08

70 Lemma: There is a set cover SC, s.t.:
Bertinoro, 5/5/08

71 Conclusion: For k = g ln g : Bertinoro, 5/5/08

72 Lemma: There is a set cover SC, s.t.:
5.3 proof of lemma Lemma: There is a set cover SC, s.t.: Bertinoro, 5/5/08

73 endpoints(Px) - the set of ADMs operating at wavelength x.
Use OPT to build SC Consider OPT x - a color of OPT. Px - paths colored x. endpoints(Px) - the set of ADMs operating at wavelength x. (assume |endpoints(Px)|= ) Partition endpoints(Px) into m sets of k consecutive nodes in the example: k=5, m=4 Bertinoro, 5/5/08

74 M=4 k=5 k k k k S S Sm {paths starting at S1}, {paths starting at S2}, …, {paths starting at Sm} Each of these sets was in S ! All these sets, for all colors, cover A Bertinoro, 5/5/08

75 w/o the assumption we have:
Bertinoro, 5/5/08

76 5.4 trees undirected: directed: Bertinoro, 5/5/08

77 On-line problem Competitive analysis 6.1 on-line
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.) Bertinoro, 5/5/08

78 When a new path arrives:
6.2 algorithm ALG When a new path arrives: if closes a unicolor cycle if any endpoint colored else (no side colored) - assign same color - assign same color - assign a new color #ADMs=7 Bertinoro, 5/5/08

79 When a new path arrives:
1. if closes a unicolor cycle 2. if any endpoint colored 3. else (no side colored) - assign same color - assign same color - assign a new color 1 2 2 2 3 3 3 2 Bertinoro, 5/5/08

80 Theorem: ALG is 3/2-competitive on a path. This is optimal.
6.3 Results 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. Bertinoro, 5/5/08

81 ALG ≥ 7/4 6.4 ALG ≥ 7/4 even for a ring ALG: ADM=7 OPT: ADM=4
Bertinoro, 5/5/08

82 6.5 any algorithm for a path ≥ 3/2
k paths k=12 x=6 k-1 spaces: x between same color k-1-x between different colors Bertinoro, 5/5/08

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

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

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

86 6.6 ALG for a path ≤ 3/2 ≤ -> ≤ ≤ ≤ ≤ ≤
Optimal solution S* saves x ADMs Our solution S saves y ADMs -> Bertinoro, 5/5/08

87 We show that Bertinoro, 5/5/08

88 optimal S* – max matching at each point
Claim: optimal S* – max matching at each point Bertinoro, 5/5/08

89 For the proof choose a specific S*
savings of S (y) savings of S* (x) Bertinoro, 5/5/08

90 b a c a came before b c map 1-1 Bertinoro, 5/5/08

91 Savings of S* (x) savings of S (y) Bertinoro, 5/5/08

92 Theorem: cost(S)  7cost(S*)/4
6.7 ALG is 7/4-competitve for any topology Lemmas 1. cost(S) - cost(S*) = = N/2 + (d0(S)-d2(S)-2|chains(S*)|)/2 2. d0(S)  d2(S) + |chains(S*)| + N/2 Combining, we have |cost(S)| - |cost(S*)|  3N/4 3 |cost(S*)|/4 previous slide next slide Theorem: cost(S)  7cost(S*)/4 Bertinoro, 5/5/08

93 Lemma 1 d0(S)  d2(S) + |chains(S*)| + N/2 orient S* for any u  D0(S)
if u is last in some chain of S*, map u to this chain else u’  D0(S) contradiction u’  D1(S) map u to {u, u’} u’  D2(S) map u to u’ S* u u’ Bertinoro, 5/5/08

94 6.8 lower bound of 7/4 , even for a ring
Case a: 7/4=1.75 Bertinoro, 5/5/08

95 any algorithm ≥ 1.67 Exercise: any algorithm ≥ 1.75- Case b: Case b1:
6/3 = 2 Case b2: 5/3 = 1.67 any algorithm ≥ 1.67 Exercise: any algorithm ≥ 1.75- Bertinoro, 5/5/08

96 6.9. a simpler lower bound of 7/4 (not for a ring)
C E D EFG F BDG G H K M so: BDG Bertinoro, 5/5/08 96

97 A B C E D EFG F BDG G H K M Bertinoro, 5/5/08 97

98 A B C E D EFG F BDG G H EABDG GFEAB #ADMS=7 K M #OPT=4
Competitive Ratio: 7/4 Bertinoro, 5/5/08 98

99 Competitive Ratio: 6/3 > 7/4
B C E D EFG F BDG G H BAE #ADMS=6 K M #OPT=3 so: BAE Competitive Ratio: 6/3 > 7/4 Bertinoro, 5/5/08 99

100 so: EFKMHG A B C E D EFG F BDG G H BAE EFKMHG K M Bertinoro, 5/5/08
100

101 A B C E D EFG F BDG G H BAE EFKMHG K M Bertinoro, 5/5/08 101

102 Competitive Ratio: 9/5 > 7/4
B C E D EFG F BDG G H BAE EFKMHG EABDCHG #ADMS=9 K M #OPT=5 Competitive Ratio: 9/5 > 7/4 Bertinoro, 5/5/08 102

103 Hw: finish this case A B C E D EFG F BDG G H BAE EFKMHG K M
Bertinoro, 5/5/08 103

104 Hw: finish this case A B C E D EFG F BDG G H BAE K M Bertinoro, 5/5/08
104

105 1st open problem: what can be said about the trade-off between #colors and #ADMs=8 ?
#colors=2, #ADMs=8 #colors=3, #ADMs=7 Bertinoro, 5/5/08

106 ALG, path ≤ 3/2 Optimal solution S* saves x ADMs
Our solution S saves y ADMs Bertinoro, 5/5/08

107 Optimal solution S* saves x ADMs Our solution S saves y ADMs
Bertinoro, 5/5/08

108 Optimal solution S* saves x ADMs Our solution S saves y ADMs
Bertinoro, 5/5/08

109 On-line algorithms when a request arrives:
if no endpoint common with others then assign a new color if one endpoint in common with other(s) then assign same color if two endpoints in common with others then assign one of the colors Bertinoro, 5/5/08

110 When a new path arrives:
Recall Algorithm ALG When a new path arrives: if closes a unicolor cycle if closes a unicolor path if any endpoint colored else (no side colored) - assign same color - assign same color - assign same color - assign a new color ADM=7 Bertinoro, 5/5/08

111 ALG-TRIANGLE When a lightpath arrives if p is length-2
if closes unicolor cycle, assign same color else assign new color if p is length-1 if closes unicolor cycle containing length-2 lightpath p’, assign same color if there are two unmarked length-1 lightpaths p’ & p’’ with different color, assign to color of either p’ or p’’ and mark p, p’, p’’ Bertinoro, 5/5/08

112 When a new path arrives: if closes a unicolor cycle
if closes a unicolor path if any endpoint colored else (no endpoint colored) - assign same color - assign same color - assign same color - assign a new color Bertinoro, 5/5/08

113 Optimal solution S* saves x ADMs Our solution S saves y ADMs
Bertinoro, 5/5/08

114 ONLINE COLORING – INPUT 2
A B C Total ADMS: 10 12 14 4 5 8 2 6 E w(EFG)=1 D w(BDG)=2 F w(BAE)=1 G H w(EFKMHG)=2 w(GFEAB)=3 w(EABDG)=4 w(BDGFE)=5 K M w(EABCDG)=6 Bertinoro, 5/5/08 114

115 OFFLINE COLORING – INPUT 2
A B C Total ADMS: 8 E w(EFG)=1 D w(BDG)=2 F w(BAE)=3 G H w(EFKMHG)=4 w(GFEAB)=2 w(EABDG)=1 w(BDGFE)=3 K M w(EABCDG)=4 Competitive Ratio: 14/8=7/4 Bertinoro, 5/5/08 115

116 ONLINE COLORING – INPUT 3
A B C Total ADMS: 4 5 9 2 7 E w(EFG)=1 D w(BDG)=2 F w(BAE)=1 G H w(EFKMHG)=3 w(EABDCHG)=4 K M Bertinoro, 5/5/08 116

117 OFFLINE COLORING – INPUT 3
A B C Total ADMS: 5 E w(EFG)=1 D w(BDG)=2 F w(BAE)=1 G H w(EFKMHG)=3 w(EABDCHG)=4 K M Competitive Ratio: 9/5 >7/4 Bertinoro, 5/5/08 117

118 ONLINE COLORING – INPUT 4
A B C Total ADMS: 14 12 10 6 5 8 4 2 E w(EFG)=1 D w(BDG)=2 F w(BAE)=2 G H w(BDCHG)=1 w(EABDG)=3 w(GFEAB)=4 w(GKFEAB)=5 K M w(EFGDB)=6 Bertinoro, 5/5/08 118

119 OFFLINE COLORING – INPUT 4
A B C Total ADMS: 8 E w(EFG)=1 D w(BDG)= 2 F w(BAE)=3 G H w(BDCHG)=4 w(EABDG)=1 w(GFEAB)=4 w(GKFEAB)=2 K M w(EFGDB)=3 Competitive Ratio: 14/8=7/4 Bertinoro, 5/5/08 119

120 ONLINE COLORING – INPUT 5
A B C Total ADMS: 4 5 9 2 7 E w(EFG)=1 D w(BDG)=2 F w(BAE)=2 G H w(BDCHG)=3 w(GHMKFEAB)=4 K M Bertinoro, 5/5/08 120

121 OFFLINE COLORING – INPUT 5
A B C Total ADMS: 5 E w(EFG)=1 D w(BDG)=2 F w(BAE)=1 G H w(BDCHG)=1 w(GHMKFEAB)=2 K M Competitive Ratio: 9/5>7/4 Bertinoro, 5/5/08 121


Download ppt "First lecture in Mathematics"

Similar presentations


Ads by Google