750 likes | 965 Views
Efficient bandwidth allocation in WDM optical networks. מציגי×: ערן מזרחי ×יתי בן ×ליעזר ××œ×’×•×¨×™×ª×ž×™× ×ž×‘×•×–×¨×™×, ×™× ×•×ר 2004. Introduction. We consider the problem of resource allocation in WDM optical networks.
E N D
Efficient bandwidth allocation in WDM optical networks מציגים: ערן מזרחי איתי בן אליעזר אלגוריתמים מבוזרים, ינואר 2004
Introduction • We consider the problem of resource allocation in WDM optical networks. • In such networks we assign a wavelength to each communication path, such that no two paths on one edge use the same wavelength. • We will limit our discussion to networks with tree topology. • In tree networks the routing of communication paths is trivial (exactly one route between each two nodes). • So we are left with the problem of wavelength allocation. • For practical reasons we would like to use a minimal number of wavelengths.
Results • The main result we will show is a polynomial time algorithm which allocates a maximum of 5L/3 wavelengths, where L is maximum number of paths on one edge. • We will show this using a reduction to the problem of coloring a constrained bipartite graph. • Finally we will also show two lower bound results: • Any greedy algorithm will need at least 5L/3 wavelengths in the worst case. • Any algorithm will need at least 5L/4 wavelengths in the worst case.
Wavelength allocation problem (cont.) • Terminology • Colors – We will refer to wavelengths as colors. • Input • A directed tree which represents our optical network topology. By directed tree we mean a tree which between each two vertices which are connected, there are two directed edges in opposite directions. • A set of communication paths – paths on the directed tree. • We will denote by L the maximal number of communications paths on one directed edge.
Wavelength allocation problem (cont.) • Without loss of generality will assume that the load of each edge is exactly L. For each edge which has a load of only k<L, we can add L-k dummy paths and at the end remove theses dummy paths from our final solution. • Output • Legal wavelength assignment – A color for each path, such that no two paths on the same directed edge have the same color.
Constrained bipartite coloring problem • Terminology • L-regular graph – A graph which the degree of each node is exactly L. • Legitimate coloring of a graph – A coloring in which no two edges with the same color touch the same vertex. • L-regular bipartite graph constrained by K colors –A L-regular bipartite graph G=({X0,…Xm},{W0,…Wm},E) which: • all the edges which touch either X0 or W0 are legally colored and the rest of the edges are not colored. • The total number of colors used for the already colored edges is exactly K.
Constrained bipartite coloring problem (cont.) • Input • A L-regular bipartite graph constrained by K. • We will assume the above bipartite graph does not contain horizontal edges – meaning edges of the form (Xi,Wi). • Output • Legitimate coloring of the bipartite graph which converges with the input coloring of X0 and W0 edges.
Coming Soon… • Wavelength allocation algorithm: • Reduction to a constrained bipartite graph coloring problem. • Division of the bipartite graph into triplets. • Coloring the triplets. • Lower bounds • Greedy algorithm • General algorithm
Reduction to a bipartite coloring • Let us show how we can solve the wavelengths allocation problem using a solution to the bipartite coloring problem: • We color the paths by going over the vertices in DFS order and for each vertex we color all the paths that touch the vertex which are not already colored. • For each vertex v, when we start processing v, all the paths between v and its father (in the DFS tree) are already colored. • The paths between v and its descendants (or paths between v`s descendants which go through v) are not colored and these are the paths we need to color.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 For each path from uj to v add (fj,ij) to E.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 For each path from v to uj add (oj,tj) to E.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 For each path from uj to ul add (fj,tl) to E.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 We apply the above three rules for each path.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 We color the uncolored edges of the bipartite graph.
Reduction to a bipartite coloring example u0 f0 t0 o0 i0 f1 t1 V o1 i1 f2 t2 u2 u1 o2 i2 The coloring of the bipartite is legal coloring of the path.
Reduction to a bipartite coloring (cont.) • As we traverse the vertices in DFS order we inductively assume that: • Invariant 1: For each vertex v we reach: The number of colors used for the already colored paths (which touch v) is at the most 4L/3 colors. • Invariant 2: All the paths which have been colored so far, are colored legally (no two paths in the same direction are colored with the same color). • Invariant 3: All the paths which have been colored so far, are colored using at most 5L/3 colors.
Reduction to a bipartite coloring (cont.) • We color the uncolored paths which touch v maintaining the above three invariants in recursive way: • Initialization – We started our DFS from a leaf r. Thereby r will have only one child v in the DFS tree. • We color all the paths between r and v with at most L colors (which is trivial since L is the maximal number of paths in each direction). • From this invariants 1,2,3 hold for v.
Reduction to a bipartite coloring (cont.) • Step – Given a vertex v we build a partially colored bipartite graph Gv. We then color Gv and use the same coloring for the paths which touch v. • Let us denote by u0 the father of v in the DFS tree and by uj the j-th child of v in the DFS tree. k is the number of children v has. • We build Gv=({f0,…,fk,o0,…,ok},{t0,…,tk,i0,…,ik},E) in the following way: • For each path from uj to v add (fj,ij) to E. • For each path from v to uj add (oj,tj) to E. • For each path from uj to ul add (fj,tl) to E.
Theorem 1 – An L-regular bipartite graph constrained by αL colors can be colored so that: • The total number of colors used by the coloring is at most (1+α/2)L colors. • Each pair of opposite vertices sees no more than max(αL,(1+α/4)L) colors. Reduction to a bipartite coloring (cont.) • The coloring of Gv will be shown later. Theorem 1 summarizes the results of coloring we will show: • We will now show that based on theorem 1, if invariants 1,2,3 hold for v, we can color the rest of v`s paths in such a way that the 3 invariants will hold for v`s children.
Reduction to a bipartite coloring (cont.) • According to invariant 1 for v, the number of colors constrained αL is at the most 4L/3 => α≤ 4/3. • Invariant 1 holds for every child uj of v: • The edges in Gv which represent paths that touch uj are edges which touch either fj or tj. • According to part B of theorem 1 the pair (fj,tj) sees at the most: max(αL,(1+α/4)L) ≤ max(4L/3,(1+1/3)L) = 4L/3 colors.
Reduction to a bipartite coloring (cont.) • We can apply the coloring given by theorem 1 in such a way that invariant 3 (and 2) will be preserved: • We will use a global pool of 5L/3 colors. • For newly colored edges in Gv (and their corresponding paths) we choose arbitrary colors from: {global color pool} – {colors already used in Gv} • According to part A of theorem 1 the number of colors used for the coloring of Gv is at most (1+α/2)L ≤ 5L/3 colors. • Therefore the global pool of 5L/3 will suffice for assigning new colors to newly colored paths and invariant 3 is preserved.
Reduction to a bipartite coloring (cont.) • Invariant 2 is preserved: • Any two previously colored paths can not collide (be the same color and pass through the same edge) since invariant 2 held before this step. • A previously colored path which does not pass through v can not collide with a newly colored one (which must pass through v) because they have no common edges. • So all the is left to show is that newly colored edges do not collide with each other.
Reduction to a bipartite coloring (cont.) • Any two paths which pass through the edge (uj,v) will be represented in Gv by edges which touch fj and therefore can not be given the same color by a legal coloring of Gv. • Similarly any two paths which pass through (v,uj) will be represented by edges which touch tj and therefore will we be colored differently.
Constrained bipartite terminology • From here on, we will denote the bipartite graph as G = (X={X0,…,Xn,}, W={W0,…,Wn}, E) • A color forced edge (CFE) is an edge which is already colored. Note that such an edge must touch either X0 or W0. • A line is a pair of opposite vertices (Xi,Wi). • double color – A color c is a double color if there are two color forced edges with the color c. • single color – A color c is a single color if there is only one color forced edge with the color c.
Constrained bipartite terminology (cont.) • D = number of double colors. • S = number of single colors • αL = number of constraining colors. Formally we will define: α = (D+S)/L • => αL = D + S • 2D + S = 2L (since our bipartite graph is L-regular).
Constrained bipartite terminology (cont.) • For example: • L = 2 • (x0,w4), (x0,w1) and (x2,w0) are the color forced edges (CFEs). • (x0,w4) is a double colored edges. • (x0,w1) and (x2,w0) are single colored edges. • D = 1; S = 2 • α = 3/2 X0 w0 X1 w1 x2 w2 x3 w3 x4 w4 x5 w5
Perfect matchings • A matching of a graph G is a set of edges of G such that no two of them share a vertex in common. A perfect matching is a matching with |V|/2 edges. • We extract L prefect matchings from our L-regular bipartite graph. It is a classical result from graphs theory that this can be done efficiently. • Each such matching will have two CFEs – one which touches X0 and the other touches W0. Note that these can not be the same edge because we build the bipartite graph so it does not contains edges which are lines.
Perfect matchings (cont.) • A double color is called separated if its two color forced edges appear in different matchings. • A double color is called preserved if its two color forced edges appear in the same matching. • For convenience, we will mark a matching [a,b] where: a is the color of its first CFE (the one which touches X0). b is the color of its second CFE (the one which touches W0).
Matchings classification • We classify the matchings according to the type of their two color forced edges:
Chains and cycles of matchings • We partition the ST,TS and TT matchings into groups. Each group is either a chain or a cycle of matchings. • Chain of matchings ST TT TT … TT TS Where each two adjacent matching share a double color. For example ([1,4],[4,5],[5,3],[3,6],[6,2]) is chain. Where 1,2 are single colors and 3,4,5,6 are double colors.
Chains and cycles of matchings • Cycle of matchings: TT TT … TT Where each two adjacent matching share a double color and the first and last matching also share a double color. For example: ([1,4],[4,2],[2,3],[3,1]) is cycle. Where 1,2,3,4 are double colors.
Minimal cycles and chains • A sequence of matchings is minimal if it does not contain any two parallel color-forced edges. • A non-minimal chain/cycle of matchings can be split to be minimal in the following way: • Assume: ([1,2],…,[5,6],[6,7],…,[10,11],[11,12]…,[15,1]) is cycle, where the second CFE of [5,6] and the second CFE of[10,11] are parallel. Lets us swap these two edges between the two matchings and we will get: ([1,2],…,[5,11],[6,7],…,[10,6],[11,12]…,[15,1]) which can be split into two cycles: ([1,2],…,[5,11],[11,12]…,[15,1]) and ([6,7],…,[10,6]).
Minimal cycles and chains (cont.) • The case which the first CFEs of two matching are parallel is identical. For the matching from our previous example will get: ([1,2],…,[4,5],[5,6],…,[9,10],[10,11],…,[15,1]) => ([1,2],…,[4,5],[10,6],…,[9,10],[5,11],…,[15,1]) => ([1,2],…,[4,5],[5,11],…,[15,1]) and ([10,6],…,[9,10]) • This will also work for chains, splitting each non-minimal chain to a chain and one or more cycles.
Extracting Triplets • Next we will group the matching into triplets: • A triplet is a group of three matching such that it contains two single color forced edges and four double color forced edges. • The extraction of triplets is done from the chains and cycles we have prepared in the previous steps. • We start this step with: • chains • cycles • standalone PP and SS matchings
Triplets Extracting Triplets (cont.) • First from each chain with a length of at least 3 we take the ST TT from its start with the TS at its end to form aST TT TS triplet. ST TT TT … TT TS, … ST TS, … TT TT .. TT, … SS, … PP, …
Triplets Extracting Triplets (cont.) • Next we group consecutive TT TT pairs from the cycles and stripped chains with standalone SS matchings to form TT TT SS triplets. ST TS, … TT TT, ... , TT TT, TT SS , … , SS PP, TT, …
Triplets Extracting Triplets (cont.) • Next we group pairs of standalone TTs (which include PPs, and leftover TTs from the previous two steps) with standalone SS matchings to form TT TT SS triplets. ST TS, … SS , … , SS , … PP , … , TT
Triplets Extracting Triplets (cont.) • If we run out of SS matching in either of the previous two steps we continue grouping triplets in the following way: • We group one TT with a ST TS chain (of length 2) so we get a TT ST TS triplet. ST TS , … TT , …
Extracting Triplets (cont.) • Now lets analyze what we have left: • If α = 4/3 then S = D = 2/3 and therefore the above algorithm will group all the matchings into triplets. • If α > 4/3 then S > D and therefore we will be left with extra SS, ST or TS matchings with no corresponding TT/PP matching. These matchings can be easily colored without using new colors (by coloring all the uncolored edges with a single color of the matching). • If α < 4/3 then S < D and therefore we will be left with extra TT matchings. These matching will be dealt with separately – we will not detail how, in this presentation.
Coloring the triplets - Overview • We will color the triplets while upholding the following two conditions: • Condition 1 – Each triplet will use at most one new color per triplet. • Condition 2 – Each line sees at most max{(1+α/4)L,αL} colors. • For α≥ 4/3, condition 2 is enforced by making sure that if a line sees a new color it does not see one of the old colors and therefore sees a maximum of max{(1+α/4)L,αL}=αL colors.
Coloring the triplets - Overview (cont.) • Lemma – The total number of colors used is at most (1+α/2)L. • Proof: • 2D + S = 2L • D + S = αL • => D = (2-α)L • According to condition 1 the maximum number of new colors is D/2 (because we have D/2 triplets, and each uses a maximum of 1 new color). • The total number of colors used is at most: D + S + D/2 = αL + (2-α)L/2 = (1+α/2)L
Theorem 1 – An L-regular bipartite graph constrained by αL colors can be colored so that: • The total number of colors used by the coloring is at most (1+α/2)L colors. • Each pair of opposite vertices sees no more than max(αL,(1+α/4)L) colors. Coloring the triplets – Overview (cont.) • From the above lemma and condition 2, theorem 1 directly follows: • Now “all” that is left to show how we color the triplets while upholding the two conditions we stated.
Active colors • Next for each triplet we select 4 unique active colors. • The active colors in each triplet will be active only in this triplet. • For each triplet we will select: • The 2 single colors of the triplet. • 2 of the 4 double colors of the triplet – in such a way that no double color is chosen to be active in more than one triplet. • The details of how we select the active double colors are not detailed here.
Triplet Types • We color the triplets according to their type. • We will divide the triplets into four types: • Type A – Triplets consisting of one SS matching and two standalone TT matchings (one or both of which may actually be PP matchings). • Type B – Triplets consisting of one SS matching and two consecutive TT matchings from the same cycle or chain. • Type C – Triplets consisting of a ST TS chain (of length 2) and one TT (which may actually be a PP matchings). • Type D – Triplets consisting of ST TT TS which where stripped from the start and end of a chain.
Coloring the triplets • We will color the uncolored edges of each triplet with the 4 unique active colors and maybe an additional new color. • This ensure two triplets do not color uncolored edges with the same color and therefore the coloring of edges in different triplets can not collide. • We will show the coloring algorithm only for triplets of type A. • Consider a type A triplet [s,t] [a,b] [c,d]. Type A implies: • s and t are single colors • a,b,c,d are double colors • a ≠ d and b ≠ c (otherwise this is actually of type B).
Coloring the triplets – easy cases • First the easy cases: • If the triplet is a SS TT PP then c=d (or a=b) and lets assume that a (or c) is the other active double color. • We color the uncolored edges of the SS matching using s or t. • We color the uncolored edges of the TT matching using a (or c). • We color the uncolored edges of the PP matching using c (or a). • If the triplet is a SS PP PP the above method works.
Coloring the triplets – hard cases • Otherwise a,b,c and d are distinct colors. • We consider the matchings [a,b] and [c,d] as one cycle cover of the bipartite graph. • For the sake of clarity we will assume that the cycle cover of the two matchings consists of only one cycle. • The coloring we will show can easily be adapted to the case when the cycle cover is of more than one cycle. • We will denote a and d as the active colors.
Coloring the triplets – hard cases (cont.) • We start coloring by alternating the two active double colors a and d. Collisions are handled using the two single active colors: W0 X0 d b c d a d a d d a a t a • The uncolored edges of the SS matching are colored using the other single active color s.
Coloring the triplets – hard cases (cont.) • Another type of collision we might run into: W0 X0 d b c d a d a d d a a t t d • The uncolored edges of the SS matching can still be colored using the other single active color s.