# Extended online graph edge coloring

50 %
50 %
Information about Extended online graph edge coloring
Technology

Published on March 12, 2014

Author: ijcsa

Source: slideshare.net

## Description

Graph coloring is the assignment of colors to the graph vertices and edges in the graph theory. We can
divide the graph coloring in two types. The first is vertex coloring and the second is edge coloring. The
condition which we follow in graph coloring is that the incident vertices/edges have not the same color.
There are some algorithms which solve the problem of graph coloring. Some are offline algorithm and
others are online algorithm. Where offline means the graph is known in advance and the online means that
the edges of the graph are arrive one by one as an input, and We need to color each edge as soon as it is
added to the graph and the main issue is that we want to minimize the number of colors. We cannot change
the color of an edge after colored in an online algorithm. In this paper, we improve the online algorithm
for edge coloring. There is also a theorem which proves that if the maximum degree of a graph is Δ, then it
is possible to color its edges, in polynomial time, using at most Δ+ 1 color. The algorithm provided by
Vizing is offline, i.e., it assumes the whole graph is known in advance. In online algorithm edges arrive one
by one in a random permutation. This online algorithm is inspired by a distributed offline algorithm of
Panconesi and Srinivasan, referred as PS algorithm, works on 2-rounds which we extend by reusing colors
online in multiple rounds.

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 DOI:10.5121/ijcsa.2014.4117 171 Extended Online Graph Edge Coloring Lata Naharwal1 and Dalpat Songara2 1,2 Department of Computer Science and Engineering, Govt. Mahila Engineering College, Ajmer,Rajasthan, India ABSTRACT Graph coloring is the assignment of colors to the graph vertices and edges in the graph theory. We can divide the graph coloring in two types. The first is vertex coloring and the second is edge coloring. The condition which we follow in graph coloring is that the incident vertices/edges have not the same color. There are some algorithms which solve the problem of graph coloring. Some are offline algorithm and others are online algorithm. Where offline means the graph is known in advance and the online means that the edges of the graph are arrive one by one as an input, and We need to color each edge as soon as it is added to the graph and the main issue is that we want to minimize the number of colors. We cannot change the color of an edge after colored in an online algorithm. In this paper, we improve the online algorithm for edge coloring. There is also a theorem which proves that if the maximum degree of a graph is Δ, then it is possible to color its edges, in polynomial time, using at most Δ+ 1 color. The algorithm provided by Vizing is offline, i.e., it assumes the whole graph is known in advance. In online algorithm edges arrive one by one in a random permutation. This online algorithm is inspired by a distributed offline algorithm of Panconesi and Srinivasan, referred as PS algorithm, works on 2-rounds which we extend by reusing colors online in multiple rounds. KEYWORDS Extended graph edge coloring, online algorithm, random permutation 1. INTRODUCTION] Let we want to color the edges of a graph but we do not know the edges we only have the vertices and edges arrive one by one, and We need to color each edge as soon as it is added to the graph. In edge coloring of a graph is a coloring of its edges so that no two edges incident on each other get the same color this is also called proper coloring. If the maximum degree of a graph is ∆, then obviously, every edge coloring needs at least ∆ colors. A classic theorem by Vizing [1] proves that it is possible to edge-color a graph using at most ∆ + 1 colors. However, determining whether the required number of colors is ∆ or ∆ + 1 is known to be NP complete [7] for general graphs. The proof of Vizing’s theorem is constructive and actually gives a polynomial time algorithm to find an edge coloring using at most ∆ + 1 colors. Having color the edges, we can group them into different sets. One set having all green edges, another of red and so on. This is called partitioning problem. A graph in which every edge painted with color according to a proper color is known as properly colored graph. Proper coloring requires minimum number of color to color a graph. A graph G that requires k different colors for its proper coloring, and no less than k then the graph is called k-colorable or k-chromatic graph [15] and k is called the chromatic number of that graph. For bipartite graphs there are fast algorithms to edge color using ∆ colors [3]. However, all these algorithms are offline, i.e. they assume that the graph is known in advance. In this paper, the input edges arrive in a random permutation. In which edges permuted randomly using algorithmic technique. The algorithm which we are using is nondeterministic, as

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 172 different outputs can be obtained with the same set of color and input edges because edges arrive in random permutation and algorithm also assign colors randomly. 2. Problem definition Let G = (B, T, E) be a graph. The vertices of graph are known in advance, while the edges E are unknown. Edges arrive online in a random permutation of E. We will call the vertices in B as bottom vertices, and the vertices in T as top vertices. We have to color each edge as soon as it arrives, using extended online graph edge algorithm so as to get a valid edge coloring at the end of the algorithm. The objective is to do this using the smallest number of colors possible with no changes after colored. 3. Prior work and results The prior work which has done in this field is online algorithm which works in two rounds, which colors each edge with the smallest color(in some fixed but arbitrary numbering of colors) not already used by a neighboring edge. The first such algorithm with a factor less than 2 was provided by Panconesi and Srinivasan which uses ∆≅ 1.59∆ colors. PS runs in phases, where each phase has its own palette of colors. In each phase, each bottom vertex proposes colors for all its incident edges by taking a random permutation of the colors in the palette for that phase. Thus there are no color conflicts of proposed colors at bottom vertices. In the same phase, each top vertex accepts, for each color, exactly one incident edge chosen uniformly at random among those which propose that color. If an edge gets its proposed color accepted, then its color is fixed. Otherwise, it proceeds to the next phase. This propose-accept process guarantees that there are no color conflicts at any vertex. It is possible to color the graph with 1 + + (1) ∆≤ 1.43∆ colors with high probability, in the online random-permutation model. Aggarwal et al. [4] gave an online algorithm which colors a bipartite graph using ∆ + (∆) colors in the random-permutation arrival model, when ∆ = ( ) Thus, this achieves essentially optimal performance, but in an extremely dense multi-graph. In the distributed algorithm, the top nodes use fresh randomness to make accept and reject decisions in the different rounds and different phases. In the online algorithm, on the other hand, the random permutations seen by the different palettes are highly dependent – indeed, they all come from the same global permutation of edge arrivals. 4. Analysis techniques We are using extended online algorithm for edge coloring so main difficulty is that how we analyze the multiple rounds to minimize the number of colors. In online algorithm other difficulty also lies in the correlations between the sets of reusable colors at bottom and top vertices when we process late edges. For example, it could be that bottom vertices can only use precisely those colors for late edges which the incident top vertices have already used up to color some early edges. In this pessimistic case, when the sets of available colors at bottom and top vertices are disjoint, we would not be able to reuse any colors and would get a factor of . In the optimistic case, these sets of reusable colors are identical for all vertices, and the analysis would proceed to give a factor of . A related issue is that, due to the non-independence of the reusable color sets, late edges can have unequal probabilities of succeeding to color themselves from different palettes (as opposed to early edges, where the probability of success depends only on the position in the random permutation). For example, due to the structure of the graph, some vertices may be “lucky” in the sense that their late edges succeed in coloring themselves from the first few palettes. While this is a good event as such, it leads to an uneven

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 173 and unwieldy analysis. We rectify this by smoothing out success probabilities at every edge by artificially rejecting edges which succeed more than required, by flipping a coin with an appropriate bias. 5. Previous related results on distributed algorithms There is a related sequence of results in the literature on distributed offline algorithms for edge coloring. The first such algorithm with a factor less than 2 was provided by Panconesi and Srinivasan [2] (We will refer to the algorithm as PS), which uses ∆ ≈ 1.59∆ colors. Since our algorithm is inspired by PS, We describe it at here. The online algorithm has a number of different numbers of colors. It partitions the incoming edges into two types, “Early” and “Late,” depending on the arrival time of the edge. For an early edge ( , ), the algorithm tries to color it with a random color from which b has not tried before. If it fails (because some previously arrived edge incident on t has used that color already), then it tries to color it with a random color from which b has not tried before, and so on, until success. After all the early edges have arrived, a subset ( ) of colors from has failed to be used by each bottom vertex b. The algorithm augments this set by injecting a set of new colors so that we have a sufficient number of colors. Then, for a late edge ( , ), the algorithm tries to color it using a random color chosen from ( ) ∪ which b has not tried before for a late edge. If it fails to do so, it will try to color the edge with a random color from ( ) ∪ (not tried by b for a late edge), and so on. Thus, the main idea in the algorithm is to reuse failed colors, each color from the palettes gets a second chance (at each bottom vertex) before it is discarded. 5.1 PS Algorithm PS runs in phases, where each phase has its own palette of colors. In each phase, each bottom vertex proposes colors for all its incident edges by taking a random permutation of the colors in the palette for that phase. Thus there are no color conflicts of proposed colors at bottom vertices. In the same phase, each top vertex accepts, for each color, exactly one incident edge chosen uniformly at random among those which propose that color. If an edge gets its proposed color accepted, then its color is fixed. Otherwise, it goes to the next phase. This propose-accept process guarantees that there are no color conflicts at any vertex. In each phase, some fraction of each vertex’s incident edges gets colored. It is proved that, with high probability, the vertex degrees reduce at a rate of 1/ , giving a total number of ≈ 1.58∆ colors. Online algorithm is inspired by PS. Firstly, It show how to convert the idea behind PS to work in the online random- permutation setting. Secondly (and this is our main algorithmic contribution) It introduce the idea of reusing colors of a palette which a bottom vertex failed to use, in a next round (for edges which arrive later in the online order). So, at a high level, its first round implements PS online for edges which arrive early, and the second round reuses the failed colors for late edges. 5.2 The Two Round Algorithm In two rounds algorithm let r = /( + 1). It divides the input edges into two types: edges that arrive before time ∆ are called 1 (or Early) edges, and edges which arrive later than time ∆ are called 2 (or Late) edges. The algorithm has a collection of = ( (∆/ )) main palettes , , , … , as well as L augmenting palettes , , , … , each with a distinct set of colors. Palette has size ∆( ) where ∆( ) is recursively defined by ∆(1) = ∆ − (∆), and ∆( + 1) = ∆( )/ − (∆( ) ). The size of the palette will be determined later. The algorithm also has a special palette, with (∆) colors.

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 174 1 Edges are treated as follows: For each bottom vertex b and each ∈ [1, ]. When a 1 edge ( , ) arrives, It try to color it using a random color ∗ from . If no previously arrived edge ( ′, ) was already colored ∗ , then it succeeds in coloring ( , ) with ∗ . Otherwise, it fails to color ( , ) from and tries from , and so on. If it fails to color ( , ) from all palettes , , , … , , then we greedily color ( , ) using . For each b and each ∈ [1, ], we also maintain ( ) ∈ , which is the set of colors from which b tried to use to color some 1 edges ( , ), but failed because some previously arrived edge ( ′, ) had already taken that color. 2 Edges treated in a similar manner. It is easy to see that the algorithm produces a valid coloring, i. e., it never uses the same color for two edges incident on each other: (1) Bottom vertices propose colors for their edges by sampling without replacement, so there is no color conflict at bottom vertices, (2) It accept a proposed color only if no previously arrived edge incident on the same top vertex has already been colored that color. It will prove that, by choosing the right values with high probability, the algorithm does not abort in the last step. Steps of Algorithm 1 (Early edges) For all ∈ [1, ], bottom nodes b, and top nodes t, initialize ( ) = ( ) = , and ( ) = 0. Where = ℎ 1 ( ) = ∈ ( ) = ∈ ( ) = ℎ 1 ℎ ℎ ℎ For ∈ [1, ∆], when the edge = ( , ) arrives in the online order 1. Set = 0. 2. ℎ ( < ) + +; ( ) + +; ( ) > ∆( ) then Color e greedily from ∞;

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 175 Otherwise abort ; Pick a color ∗ uniformly at random from ( ) Set ( ) = ( ) ∪ { ∗} (if no such color exists then continue) ( ∗ ) then Color e with ∗ ; ( ) = ( ) ∪ { ∗ }; 3. ( ) then Color it greedily from ; Otherwise abort ; 2 (Late edges) For all bottom vertices b and all ∈ [1, ], initialize ( ) = For ∈ [ ∆ + 1, ∆], when the edge = ( , ) arrives in the online order 1. Set i = 0 2. while (e is not colored and i < L) + +; Pick a color ∗ uniformly at random from ( ) ∪ ( ); Set ( ) = ( ) ∪ { ∗ }; (if no such color exists then continue) if no previously arrived edge incident on t has proposed ∗ , then (a) ∗ ∈ then color e with ∗ ; (b) ∗ ∈ ( ), and = ( , ) is the ℎ edge incident on t proposing from a phase i palette (namely ( ) ∪ ( ), then color e with ∗ ; 3. if (e is not yet colored) then Color it greedily from ; if no such color is available in P∞, then abort ; Online Algorithm

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 176 The discussion is in three steps: Firstly, it bound the number of colors used for 1 edges, and proves correlations between the sets of rejected colors at different vertices. Secondly, it bound the number of colors used for 2 edges. Finally it put all the bounds together to get the full count of the number of colors used. 5.3 Extended online graph edge algorithm Extended online algorithm performs more than two rounds, say to K rounds, so that each color is tried at each bottom vertex up to K times. This way, we may expect to reduce the total number of colors used. We define such an algorithm and describe it informally below. The algorithm partitions the input edges into K rounds: The first ∆ edges to arrive are called edges; the next ∆ edges are edges, and so on, where the sequence of numbers , , , … , will be chosen later. The algorithm keeps L palettes for each round, so that we have a total of KL palettes ( ∈ [1, ], ∈ [1, ]), where the size of each palette will be determined later. The algorithm also has a special palette with (∆) colors. So, as an edge ( , ) arrives, the arrival time determines which round it belongs to—says it belongs to . Vertex b proposes a random color c for this edge from the union of and the sets of colors rejected from b in the earlier palettes , , , … , . If t has not used the color c earlier, then the edge is colored c. Else, b proposes a random color for this edge from the union of and the sets of colors rejected from b in the earlier palettes , , , … , , and t decides whether or not to accept it, and so on. If after L such attempts, the edge is still not colored, we will color it greedily from . Also, as in the 2 round algorithm, we perform some additional artificial rejections of the proposed colors for an edge with random coin tosses of appropriate biases, so as to keep the success probabilities across all vertices the same. Steps of Algorithm For all bottom vertices b, all ∈ [1, ], and all ∈ [1, ], initialize ( ) = ( ) = 1. When the edge = ( , ) arrives in the online order 2. Let j be ∑ ƒ < ≤ ∑ ƒ (the edge is a Round j edge) 3. Set i = 0 4. while (e is not colored and i < L) + + ; Pick a color ∗ uniformly at random from ∪ ∪ ( ) ( ) ; Set ( ) = ( ) ∪ { ∗ } (if no such color exists then continue) if no previously arrived edge incident on t was proposed ∗ , then (a) if ∗ ∈ then color e with ∗ (b) if ∗ ∈ ( ) (for some ƒ < j) then color e with ∗ and ( ) = ( )– ∗ ; ∗ ∈ , ( ) = ( ) ∪ { ∗ } ; 5. if e is not yet colored, color it greedily from . If no such color is available in then abort. Extended online graph edge coloring

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 177 6. Counting the number of colors used For analyzing the multi-round algorithm we proceed to calculating the total number of colors used by the algorithm. The number of edges (for each vertex) reaching round j of phase i is , while the number of old colors of phase i (from rounds less than j) reaching round j of phase i is equal to the number of edges (for each vertex) reaching round j-1 of phase + 1, i. e., equal to . Therefore, we have ∀ ≥ 1, ≥ 2 ∶ = 0, – This number was 0; we would simply not introduce any new colors. However, for the calculation of the total number of colors, it is easier to drop the max with 0. This may cause us to undercount the number of colors if the second term in the max was negative. For now, we assume that in each phase of each round we need to introduce some new colors. That is, we never have more old colors remaining from the previous rounds than the degree of the nodes in the current round. We proceed with this assumption and bound the total number of colors used. 7. Future work We can improve the extended online graph edge coloring algorithm using alternate of brute force algorithm witch works when algorithm selects color from the special color set P∞. We can also extend the algorithm to fixed number of rounds K. where > 2, so that each color is tried at each bottom vertex up to K times. This way, we may expect to reduce the total number of colors used. We may hope to use a smaller number of colors by extending the algorithm to allow bottom nodes to possibly try each color more than two times. We perform some additional artificial rejections of the proposed colors for an edge with random coin tosses of appropriate biases, so as to keep the success probabilities across all vertices the same. 8. CONCLUSIONS In the real world, there are many situations to share limited resources. Number of sharing is changing while time goes by. To avoid a same resource shared with different users at the same time, online graph coloring is a good solution. To measure graph coloring algorithm, competitive ratio is not used instead performance ratio is called. And in fact, they work in similar way. Both ratios are comparing the cost of the online algorithm and the cost of / algorithm. In our main sections we have described and analyzed an algorithm which works in two rounds per phase (distributed), and equivalently, an online algorithm in which each color can be tried two times by a bottom vertex. We now describe an extension to R rounds, and equivalently, R trials per color per bottom vertex. All the proofs above conclude that online graph coloring problem is very hard, and this is also a reason for the researcher to work on graph coloring. ACKNOWLEDGEMENTS We would like to thanks our principal for providing us the platform where we can work. Also we would like to thanks our teachers for guiding us every time whenever we need them and also our friends for being there always.

International Journal on Computational Sciences & Applications (IJCSA) Vol.4, No.1, February 2014 178 REFERENCES [1] VADIM G. VIZING: On an estimate of the chromatic class of a p-graph. [2] ALESSANDRO PANCONESI, ARVIND SRINIVASAN: Randomized Distributed Edge Coloring via an Extension of the Chernoff-Hoeffding Bounds. SIAM J. computes. 26(2):350-368 (1997) [3] RICHARD COLE, KIRSTIN OST, AND STEFAN SCHIRRA: Edge-coloring bipartite multigraphs in O (E log D) time. Combinatorica, 21(1):5–12, 2001 [4] GAGAN AGGARWAL, RAJEEV MOTWANI, DEVAVRAT SHAH, and AN ZHU: Switch scheduling via randomized edge coloring. In Proc. 44th FOCS, pp. 502–512. IEEE Comp. Soc. Press, 2003. [5] BAHMAN BAHMANI, ARANYAK MEHTA, RAJEEV MOTWANI: A 1.43-Competitive Online Graph Edge Coloring Algorithm In The RandomOrder Arrival Model [6] DAVDATT P. DUBHASHI, ALESSANDRO PANCONESI: Concentration of Measure for the Analysis of Randomized Algorithms, 2005. Available at: http://www.dsi.uniroma1.it/˜ale/Papers/master.pdf [7] IAN HOLYER: The NP-Completeness of Edge-Colouring. SIAM J. Comput. 10, 718-720, 1981. [8] AMOTZ BAR-NOY, RAJEEV MOTWANI, AND JOSEPH NAOR: The greedy algorithm is optimal for online edge coloring. Inform. Process. Lett., 44(5):251–253, 1992. [doi:10.1016/0020- 0190(92)90209-E] [9] BAHMAN BAHMANI, ARANYAK MEHTA RAJEEV MOTWANI: Online Graph Edge-Coloring in the Random-Order Arrival Model [10] AMOS FIAT: Dagstuhl Seminar on On-line Algorithms June 24–28, 1996 [11] RICHARD COLE, LUKASZ KOWALIK: New Linear-Time Algorithms for Edge-Coloring Planar Graphs [12] LO YUET MEI: Report on On-line Graph Coloring (00086365) cindylo@ust.hk [13] H. ZARRABI-ZADEH: Online Coloring Co-Interval Graphs, E-mail: hzarrabi@uwaterloo.ca [14] AVERY MILLER: Online Graph Colouring: An algorithm for vertex-colouring graphs, December 6, 2004 [15] SAN SKULRATTANAKULCHAI and HAROLD N. GABOW : Coloring Algorithms on Subcubic Graphs, Boulder CO 80309-0430 USA fskulratt,halg@cs.colorado.edu Authors Lata Naharwal has received her B.Tech. Degree in Information Technology in 2012 fromRajasthan Technical University, Kota, Rajasthan (India). She is currently pursuing M.Tech. in Computer Science at Govt. Mahila Engineering College, Ajmer, Rajasthan (India). Her Area of interest in research is Computing and algorithms and Graph Coloring. Dalpat Songara has received his B.E. Degree in Computer Science Engineering in 2006 from Rajasthan University, Jaipur, Rajasthan (India) and M.Tech. Degree in Computer Science Engineering in 2010 from Jodhpur National University, Jodhpur, Rajasthan (India). He is currently working as an Assistant Professor, Department of Computer Science and Engineering at Govt. Mahila Engineering College, Ajmer, Rajasthan (India). His area of interest in research is Computing and Algorithms, Graph Theory, Game Theory and Parallel Algorithms.

 User name: Comment:

## Related pages

### Edge coloring - Wikipedia, the free encyclopedia

... an edge coloring of a graph is an assignment of "colors ... used in the online algorithm setting ... have also been extended to edge colorings.

### Acyclic edge-colouring of planar graphs. Extended abstract

A proper edge-colouring with the property that every cycle contains edges of at least three distinct colours is called an acyclic edge-colouring.

### Online Max-Edge-Coloring of Paths andTrees

Online Max-Edge-Coloring of Paths andTrees Lene M. Favrholdt ... pathcan be extended to graphs of maximum degree 2. For Edge-2-Coloring(Path), ...

### Graph coloring - Wikipedia, the free encyclopedia

... graph coloring is a special case of graph ... An edge coloring of a graph is a proper ... The technique was extended to unit disk graphs by ...

### Decompositions for edge-coloring join graphs and ...

An edge-coloring is an association of colors to the edges of a graph, ... Available online 13 February 2009. ... A k k-edge-coloring of a graph G= ...

### Online Vertex-Coloring Games in Random Graphs.pdfstartview

Online Vertex-Coloring Games in Random Graphs ... in this online fashion depends on the edge density of the ... in coloring the entire random graph ...

### Application of Edge Coloring of a Fuzzy Graph

Application of Edge Coloring of a Fuzzy Graph Poornima B. Research Scholar B.I.E.T., Davangere. Karnataka, India. ABSTRACT