• Aucun résultat trouvé

Coloring Arbitrary Graphs

Dans le document To the memories of Necdet Doˇganata and (Page 142-148)

Part II Graph Theoretical Algorithms

9.6 Self-Stabilizing Vertex Coloring

9.6.2 Coloring Arbitrary Graphs

In this section, we describe the first linear-time self-stabilizing vertex coloring al-gorithm proposed by Hedetniemi [7], which usesΔ+1 colors and stabilizes in a maximum ofnmoves. This algorithm is based on Grundy Coloring, which is de-fined as follows.

Definition 9.3 (Grundy Coloring) In Grundy Coloring, nodeiis colored with the minimum color that is not used by any of its neighbors. Formally, the color of node ci=min{col≥1|(jΓ (i))(cj=col)}.

In Algorithm9.13(Grundy_Vcol), each node applies the Grundy Coloring Rule until a stable condition is reached where a node that has a color different from the smallest integer not taken by any of its neighbors sets its color to that integer as described in [7].

9.6 Self-Stabilizing Vertex Coloring 131

A node would increase its color value only if all of its neighbors are colored with colors{1, . . . , ci}. A node can make a maximum ofdi+1 decreasing moves. It can be shown that a node can in fact make a maximum ofdi+1 moves.

Theorem 9.9 Grundy_SS finds a legal coloring of a graph inO(2m+n)moves.

Proof Any move by nodeiresults in a coloringcidi+1, and nodeican make O(di+1)consecutive moves, which all decrease the value ofci. Since each node will make a maximum ofdi+1 moves, the total number of moves will ben

i=1(di+ 1)=2m+n. A detailed proof as a consequence of lemmas can be found in [7].

Based on the Grundy Coloring, Hedetniemi et al. proposed an anonymous algo-rithm (Hedet_SS) that works under a central daemon. Each nodeiin this algorithm checks whether it has a color equal to any of its neighbor colors. If this condition is met or a node has a color greater thanΔ+1, it further checks whether the colors of neighbors have filled the colors{1, . . . , di}. If this is true, it can select the color di+1 as this is the only choice. Otherwise, if one or more neighbors do not have a color assigned in the range{1, . . . , di}, nodeipicks the first available color not assigned to any of the neighbors as shown in Algorithm9.14.

Figure9.11 displays the operation of Hedet_SS in a network with six nodes, where labels represent colors, and double circles show the privileged nodes at each step. One of the nodes has a degreedi of 2 and a color of 2, which its neighbor has, and it is enabled by the central daemon as shown by the double circle in (a). It changes its color to the colordi+1, which is 3 since all its neighbors have used the colors{1, . . . , di}, which are 1 and 2, as displayed in (b). The other privileged node has a color of 5, which is greater than itsdi+1, which is 4. It is enabled and chooses a color ofdi+1, which is 4 as shown in (c). The lastly enabled node 6 can color itself with 1 as its neighbors have not used it, and the finalΔ+1 colored stabilized graph, where there are no privileged nodes, is displayed in (d).

Theorem 9.10 Hedet_SS finds a legalΔ+1 coloring of a graph inO(n)moves.

Proof When a node is privileged so that it can make a move, it will choose a color from{1, . . . , di+1}. Once it makes a move, it will be colored and stay in that state because coloring of a neighbor node does not affect its state. Therefore, as each

132 9 Vertex Coloring

Fig. 9.11 Execution of Hedet_SS

node will make a maximum of one move, the total number of moves isO(n). In stabilization, there would be at mostΔ+1 colors since if the coloring uses more thanΔ+1 colors, a node becomes privileged. A detailed proof as a consequence of

lemmas can be found in [7].

9.7 Chapter Notes

We have seen rank-based, random, reduction-based, and self-stabilizing vertex col-oring algorithms and an edge colcol-oring algorithm in this chapter. The edge color-ing algorithm is more complicated than others as colorcolor-ing an edge is related to the neighbors of the neighbors of a node and any decision should be propagated.

Although it has been studied extensively using sequential algorithms, vertex col-oring in distributed setting remains an active area of research due to a wide range of applications it has in computer networks. For deterministic vertex coloring, it was shown in [10] thatO(Δ2)coloring can be achieved inO(logn)rounds for bounded-degree graphs. In [14], a graphG is first partitioned into disjoint forests that are colored using three colors concurrently in the first phase. Using these colors,Gis recolored withO(Δ+1)colors inO(Δ2+logn)rounds. Recently, algorithms to

9.7 Chapter Notes 133 Fig. 9.12 Example graph for

Exercise1

Fig. 9.13 Example graph for Exercise2

color graphs in usingO(Δ+1)colors inO(Δ+logn)time were provided in [10]

and [2] independently.

A distributed edge coloring algorithm that achieves 2Δ−1 coloring inO(Δ+ logn)rounds is proposed as well as vertex coloring algorithm with O(Δ+1) colors inO(Δ2+logn)rounds in [14].

9.7.1 Exercises

1. Show the step-by-step execution of Seq_Vcol algorithm in the sample graph of Fig.9.12.

2. Provide a pseudocode for a synchronous distributed algorithm that greedily se-lects nodes with the highest degrees first to color. Show the synchronization mes-sages for this algorithm and work out the time and message complexities. Show also step-by-step execution of this algorithm in the example graph of Fig.9.13.

3. Provide an FSM-based implementation of Rand_Vcol by drawing the FSM dia-gram and writing the pseudocode for this algorithm. Compare this pseudocode with the code of Rand_Vcol.

4. Provide a pseudocode for an algorithm that reduces colors of ak-colored graph to a maximum ofΔ+1 colors such that all nodes send their colors and receive colors of neighbors in every round and then decide their color for the next round.

Work out the time and message complexities of this algorithm and compare its efficiency with the Rand_Vcol algorithm. Show also the operation of this algo-rithm in the example graph of Fig.9.14, which is colored by six colors as shown by the labels of the vertices.

5. Show the execution of SixTwo_Vcol algorithm step by step in the example tree of Fig.9.15, which is colored by six colors as shown by the labels of the vertices.

134 9 Vertex Coloring

1. Appel K, Haken W (1977) Solution of the four color map problem. Sci Am 237(4):108–121 2. Barenboim L, Elkin M (2010) Deterministic distributed vertex coloring polylogarithmic time.

In: Proc 29th annual ACM symposium on principles of distributed computing (PODC), Zurich, Switzerland. ACM, New York, pp 410–419

3. Bollobas B (1979) Graph theory. Springer, New York

4. Ghosh S, Karaata MH (1993) A self-stabilizing algorithm for coloring planar graphs. Distrib Comput 7:55–59

5. Goldberg AV, Plotkin SA, Shannon GE (1988) Parallel symmetrybreaking in sparse graphs.

SIAM J Discrete Math 1(4):434–446

6. Grable D, Panconesi A (1997) Nearly optimal distributed edge-coloring inO(loglogn)rounds.

Random Struct Algorithms 10(3):385–405

7. Hedetniemi ST, Jacobs DP, Srimani PK (2003) Linear time self-stabilizing colorings. Inf Pro-cess Lett 87:251–255

8. Johansson O (1999) Simple distributedΔ+1 coloring of graphs. Inf Process Lett 70(5):229–

232

9. Karp RM (1991) Probabilistic recurrence relations. In: Proc 23rd annual ACM symposium on theory of computing (STOC 91), pp 190–197

10. Kuhn F (2009) Weak graph colorings. In: Proc 21st annual ACM symposium on parallelism in algorithms and architectures. ACM, New York, pp 138–144

11. Linial N (1992) Locality in distributed graph algorithms. SIAM J Comput 21(1):193–201 12. Luby M (1993) Removing randomness in parallel computation without a processor penalty.

J Comput Syst Sci 47:250–286

13. Marathe V, Panconesi A, Risinger LD Jr (2000) An experimental study of a simple, distributed edge coloring algorithm. In: Proc SPAA 2000, pp 166–175

14. Panconesi A, Rizzi R (2001) Some simple distributed algorithms for sparse networks. Distrib Comput 14(2):97–100

15. Peleg D (2000) Distributed computing: a locality-sensitive approach. SIAM, Philadelphia.

ISBN: 0-89871-464-8

16. Skiena SS (2008) The algorithm design manual, 2nd edn. Springer, Berlin. ISBN: 1-84800-069–978-1-84800-8. Chapter 16

Chapter 10

Maximal Independent Sets

Abstract An independent set of a graph is a subset of its vertices such that there are not any two adjacent vertices in this set. Finding the maximal independent set of a graph has many important applications such as clustering in wireless networks, and independent sets can also be used to build other graph structures. In this chapter, we describe rank-based, randomized, and self-stabilizing distributed algorithms to form maximal independent sets of graphs.

10.1 Introduction

An independent set can be formally defined as follows.

Definition 10.1 (Independent set) An independent set (IS) or a stable set of a graph G(V , E)is a subset IS of the vertices ofV such that there is no edge ofGthat joins any two vertices ofS.

Definition 10.2 (Maximal and maximum independent sets) A maximal (MIS) of a graph G cannot be enlarged any further. The size of an independent set is the number of vertices it contains. A maximum independent set (MaxIS) is the largest independent set for a given graphG, and its size is denoted byα(G).

Finding the maximum independent set of a graph is an NP-hard optimization problem, and deciding whether a graph has a MIS of size k is an NP-complete problem. A set is independent if and only if it is a clique in the complement of the graph, and also a set is independent if and only if its complement is a vertex cover.

The sum ofα(G)and the size of minimum vertex cover (β(G)) is the number of vertices in the graph. Figure10.1displays IS examples where (a) is a MIS of size 1, (b) is a MIS of size 2, and (c) is a MaxIS of size 3.

In this chapter, we start by inspecting a simple sequential algorithm to find MIS which runs in polynomial time. We then describe a distributed MIS algorithm that uses identifiers of the nodes to find MIS. Randomization provides algorithms with better time complexities as shown by two synchronous randomized algorithms. The

136 10 Maximal Independent Sets

Fig. 10.1 Independent set examples

Algorithm 10.1 Seq_MIS 1: InputG(V , E)

2: SV, MIS←∅ 3: whileS=∅do

4: select an arbitrary vertexuS 5: SS\ {uΓ (u)}

6: MISMIS∪ {u}

7: end while

first algorithm is based on random decisions by the nodes with the probability re-lated to their degrees, and in the second randomized algorithm, nodes draw random values to be included in the MIS. All synchronous operations are carried over a spanning tree that is constructed prior to these algorithms, by any of the algorithms described in Chap.4. We then provide three self-stabilizing algorithms in chrono-logical order to build a MIS of a graph.

Dans le document To the memories of Necdet Doˇganata and (Page 142-148)