First lecture in Mathematics

Slides:



Advertisements
Similar presentations
Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Undirected: Optic Fiber.
Advertisements

Optical networks: Basics of WDM
1 SOFSEM 2007 Weighted Nearest Neighbor Algorithms for the Graph Exploration Problem on Cycles Eiji Miyano Kyushu Institute of Technology, Japan Joint.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Greedy Algorithms Greed is good. (Some of the time)
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Optic Fiber.
1 Routing and Wavelength Assignment in Wavelength Routing Networks.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Dynamic Wavelength Allocation in All-optical Ring Networks Ori Gerstel and Shay Kutten Proceedings of ICC'97.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Combinatorial Algorithms
Optic fiber Electronic switch the fiber serves as a transmission medium Optical networks - 1 st generation 1. Optical networks – basic notions.
1 Electronic ADM. 2 3 ADM (add-drop multiplexer)
Approximating the Traffic Grooming Problem Mordo Shalom Tel Hai Academic College & Technion.
Optimization of Pearl’s Method of Conditioning and Greedy-Like Approximation Algorithm for the Vertex Feedback Set Problem Authors: Ann Becker and Dan.
1 Distributed Computing Optical networks: switching cost and traffic grooming Shmuel Zaks ©
Lectures on Network Flows
The number of edge-disjoint transitive triples in a tournament.
Great Theoretical Ideas in Computer Science.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
Vertex Cover, Dominating set, Clique, Independent set
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
The max flow problem
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
CS420 lecture eight Greedy Algorithms. Going from A to G Starting with a full tank, we can drive 350 miles before we need to gas up, minimize the number.
 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,
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
1 Distributed Computing Optical networks: switching cost and traffic grooming Shmuel Zaks ©
1 Distributed Computing Optical networks: switching cost and traffic grooming Shmuel Zaks ©
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
APPROXIMATION ALGORITHMS VERTEX COVER – MAX CUT PROBLEMS
Design Techniques for Approximation Algorithms and Approximation Classes.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Great Theoretical Ideas in Computer Science.
Chapter 15 Approximation Algorithm Introduction Basic Definition Difference Bounds Relative Performance Bounds Polynomial approximation Schemes Fully Polynomial.
Approximation Algorithms
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
1 Distributed Computing Optical networks: switching cost and traffic grooming Shmuel Zaks ©
Lectures on Greedy Algorithms and Dynamic Programming
Markov Chains and Random Walks. Def: A stochastic process X={X(t),t ∈ T} is a collection of random variables. If T is a countable set, say T={0,1,2, …
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
Approximation Algorithms Greedy Strategies. I hear, I forget. I learn, I remember. I do, I understand! 2 Max and Min  min f is equivalent to max –f.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Approximation Algorithms based on linear programming.
Xuding Zhu National Sun Yat-sen University Circular chromatic index.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Maximum Matching in the Online Batch-Arrival Model
Algorithms and Networks
Algorithm Design and Analysis
Lectures on Network Flows
Chapter 5. Optimal Matchings
Greedy Algorithms / Interval Scheduling Yin Tat Lee
3.3 Applications of Maximum Flow and Minimum Cut
Parameterised Complexity
Coverage Approximation Algorithms
Introduction Wireless Ad-Hoc Network
Approximation Algorithms
Presentation transcript:

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

Step 1 and and Bertinoro, 5/5/08

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

Step 2 and Bertinoro, 5/5/08

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

Step 2 and hence Bertinoro, 5/5/08

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

sets elements Bertinoro, 5/5/08

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

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

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

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

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

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

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

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

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

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

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

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

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

Show: Which implies Bertinoro, 5/5/08

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

M=4 k=5 k k k k S1 S2 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

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

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

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

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

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

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

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

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

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, 12-1-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

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

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

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

≤ ≤ We show that ≤ ≤ Bertinoro, 5/5/08

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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