Fault Tolerant Algorithms for Orderings and Colorings - CiteSeerX

1 downloads 0 Views 170KB Size Report
tain three self-stabilizing (s-s) algorithms for finding a k- forward numbering .... time s-s list-coloring algorithm that assumes a k-forward numbering is given.
Fault Tolerant Algorithms for Orderings and Colorings ∗ Wayne Goddard, Stephen T. Hedetniemi, David P. Jacobs, Pradip K. Srimani Clemson University Department of Computer Science Clemson, SC 29634–0974 {goddard,hedet,dpj,srimani}@cs.clemson.edu Abstract A k-forward numbering of a graph is a labeling of the nodes with integers such that each node has less than k neighbors whose labels are equal or larger. We obtain three self-stabilizing (s-s) algorithms for finding a kforward numbering, provided one exists. One such algorithm also finds the k-height numbering of graph, generalizing s-s algorithms by Bruell et al. [2] and Antonoiu et al. [1] for finding the center of a tree. Another k-forward numbering algorithm runs in polynomial time. There is a strong connection between k-forward numberings and colorings of graphs. We use a k-forward numbering algorithm to obtain an s-s algorithm that is more general than previous coloring algorithms in the literature, and which kcolors any graph having a k-forward numbering. Special cases of the algorithm 6-color planar graphs, thus generalizing an s-s algorithm by Ghosh and Karaata [9], as well as 2-color trees and 3-color series-parallel graphs. We discuss how our s-s algorithms can be extended to the synchronous model.

1. Introduction One of the most important requirements of modern distributed systems is robustness. A goal of a distributed system is that the system should function correctly in spite of intermittent faults. Ideally the global state of the system should remain in the legitimate state. Often, however, malfunctions or perturbations bring the system to some illegitimate state, and it is desirable that the system be automatically brought back to the legitimate state without the interference of an external agent. The traditional approach to fault tolerance uses fault masking and is pessimistic in the sense that it assumes the ∗ The authors thank the National Science Foundation for NSF Grant ANI-0218495 which helped support this research.

worst case scenario and protects the system against such an eventuality; validity is guaranteed in the presence of faulty processes, which necessitates restrictions on the number of faults and on the fault model. Fault masking is not free; it requires additional hardware or software, and it considerably increases the cost of the system. This additional cost may not be an economic option, especially when most faults are transient in nature and a temporary unavailability of a system service is acceptable for a short period of time. Systems that reach the legitimate state starting from any illegitimate state in a finite number of steps are called selfstabilizing systems [4, 5]. This kind of property is highly desirable for any distributed system, since without having a global memory, global synchronization is achieved in finite time and thus the system can correct itself automatically from spurious perturbation or failures. Self-stabilization [7] is an optimistic way of looking at system fault tolerance because it provides a built-in safeguard against transient failures that might corrupt the data in a distributed system. The objective of self-stabilization (as opposed to masking faults) is to recover from failure in a reasonable amount of time and without intervention by any external agency. Since the faults are transient (eventual repair is assumed), it is no longer necessary to assume a bound on the number of failures. Self-stabilization has potential uses in ad-hoc networks [8], sensor networks [13], and peer-to-peer communication [3]. We assume the state-reading model in which each node v can read the variables of its neighbors N (v), and can make decisions based on the contents of its neighbors’ local variables. The contents of a node’s local variables determine its local state. A node may change its local state by making a move, that is, changing the values of its local variables. Self-stabilizing algorithms are given as a set of rules of the form if p(v) then M , where p(v) is a predicate and M is a move. A node v becomes privileged if p(v) is true. When a node becomes privileged, it may execute the corresponding move (i.e., change its local variables). When no further nodes are privileged, we say that the system is stable.

Proceedings of the 18th International Parallel and Distributed Processing Symposium (IPDPS’04)

0-7695-2132-0/04/$17.00 (C) 2004 IEEE

Unless otherwise specified, all algorithms in this paper are self-stabilizing or s-s algorithms. For most of this paper we assume that there exists a (not necessarily fair) central daemon which selects one of the privileged nodes to move, such that no two nodes move at the same time. Also, we present our algorithms for an anonymous network where nodes do not have ID’s. In Section 5, however, we consider how our s-s algorithms are effected under other distributed models, namely the so-called synchronous distributed model and the distributed daemon model.

2. Overview of results An important concept in this paper is a k-forward numbering. We say that a function on a node set V c:V →N which assigns to the nodes, not necessarily distinct, nonnegative integers, is a k-forward numbering if each node has less than k neighbors which are assigned equal or larger numbers. That is, for any node v, |{u ∈ N (v) : c(u) ≥ c(v)}| < k. It will be convenient to define a k-forward ordering as a total ordering v1 , . . . , vn that is a k-forward numbering. That is, |{vj ∈ N (vi ) : j > i}| < k, for any i. It is easy to see that any tree has a 2-forward numbering. Indeed, a graph has a 2-forward numbering if and only if it is a forest. Throughout this paper, k ≥ 2 is an integer. The primary focus of this paper is s-s algorithms for finding k-forward numberings. Three such algorithms are given. On the surface, the algorithms appear simple in that each uses only a single nonnegative integer variable and has a single rule for comparing its value with the value of its neighbors. However, their analyses and correctness proofs are not simple. But what is most surprising is that the subtle differences in the three algorithms produce vastly different behaviors and running times. In Section 3.1 we give the simplest of our algorithms, which tries to resolve local conflicts by always increasing a local variable to be larger than its neighbors. The algorithm finds a k-forward numbering if and only if one exists, but we show, by example, that the number of moves can be exponential. In Section 3.2 we give an s-s algorithm for finding a special kind of k-forward numbering, called a k-height numbering. This algorithm generalizes the algorithms of Bruell et al. [2] and Antonoiu et al. [1] for finding the center of a tree. In Section 3.3 we give a k-forward numbering algorithm that stabilizes in time that is polynomial in n, the network size, and W , the largest number at initialization. All three of these numbering algorithms find 2-forward numberings on trees, 3-forward numberings

on series-parallel graphs, 6-forward numberings on planar graphs, and k-forward numberings on partial (k − 1)-trees. A second focus of this paper is on s-s coloring algorithms. A coloring of a graph G is an assignment of integers (or colors) to the nodes such that no two adjacent nodes receive the same color. The chromatic number of a graph G is the minimum number of colors used in a coloring, and is denoted χ(G). A well-known theorem of Brooks [12] says that any for any graph G, χ(G) ≤ ∆(G) + 1, where ∆(G) denotes the maximum degree of a node in G. S-s algorithms which find (∆ + 1)-colorings, under various models, are presented by Dolev and Herman [6], Gradinariu and Tixeuil [10], and Hedetniemi et al. [11]. Ghosh and Karaata in [9] give an s-s algorithm to find a 6-coloring of a planar graph, using the fact that every planar graph has a node of degree less than 6. The coloring number of a graph G, denoted col (G), is the smallest number k such that G has a k-forward numbering. Since any k-forward numbering can be used to greedily k-color a graph [12], it follows that χ(G) ≤ col (G) ≤ ∆(G) + 1, which is a strengthening of Brooks’ Theorem. In a list coloring, each node is assigned a list of available colors, and the algorithm must produce a coloring, using a color from each node’s list. In Section 4.1 we give a lineartime s-s list-coloring algorithm that assumes a k-forward numbering is given. In Section 4.2 we give an s-s coloring algorithm that will k-color any graph having a k-forward numbering. Special cases of this algorithm 6-color any planar graph, thus generalizing an s-s algorithm of Ghosh and Karaata [9], 2-color any tree and 3-color any series-parallel graph. In Section 5 we show that our algorithms self-stabilize even with the synchronous (maximal parallelism) model, thus generalizing results of Shukla et al. [14].

3. k-forward number In this section, we examine three algorithms for finding k-forward numberings. The first algorithm, which we call Leap, is the natural generalization of an algorithm by Ghosh and Karaata [9]. However, we show that, while it is efficient for k = 2, their algorithm can take exponentially many moves. The second algorithm, which we call Slide, is a generalization of center-finding algorithms by Bruell et al. [2] and Antonoiu et al. [1]. This algorithm has the advantage of producing a special numbering, called a k-height numbering, which identifies a generalization of centers in other graphs. However the complexity of Algorithm Slide remains undetermined. The third algorithm, which we call UpSlide, is new. We show that it has a guaranteed quadratic performance. The following is trivial. Lemma 1 A graph G has a k-forward ordering if and only if it has a k-forward numbering.

Proceedings of the 18th International Parallel and Distributed Processing Symposium (IPDPS’04)

0-7695-2132-0/04/$17.00 (C) 2004 IEEE

variable: nonnegative integer w(v) leap: if | {u ∈ N (v) : w(u) ≥ w(v)} | ≥ k set w(v) = 1 + max{ w(u) : u ∈ N (v) }

Figure 1. Algorithm Leap P ROOF. By definition, k-forward orderings are k-forward numberings. Conversely, if w : V → N is a k-forward numbering, then we may order the vertices so that

Since v was privileged, |S| ≥ k. Let S = {vj1 , . . . , vjs }, and without loss of generality, we may assume j1 < j2 < . . . < js . Note that j1 < i, for otherwise we would not have a kforward ordering. Therefore, the move causes the edge vj1 vi to change from bad to good. Let A = { vu | u ∈ S }, and A = { vu | u ∈ N (v) − S }. We have observed that the minimum member of A changes from bad to good. The status of each edge in A , however, remains unchanged, as does the status of all edges not incident with v. Therefore Bt+1 < Bt . QED

w(v1 ) ≤ w(v2 ) ≤ . . . ≤ w(vn ). It is easy to see that the total order v1 , . . . , vn is a k-forward ordering. QED

3.1. k -forward numbering: Leap In this section we present Algorithm Leap, shown in Figure 1, an s-s algorithm for finding a k-forward numbering. Each node v maintains a single integer variable w(v). The algorithm has a single rule: if a node v has at least k neighbors having the same number or larger number, it sets w(v) to be one larger than the maximum number of a neighbor. This is the natural generalization an s-s algorithm of Ghosh and Karaata [9], while avoiding the use of IDs. The fact that IDs are unnecessary was observed by Shukla et al. in [14]. Let G = (V, E) be a graph, and let (v1 , . . . , vn ) be any fixed, total ordering of V . Assuming that edges e = vi vj , are always written with i < j, this induces a total ordering (E, (v)

Let us say that a move, made by a neighbor u of v, is injurious if c(u) becomes c(v). Besides its initial move, a node v can make at most one move for every injurious move made by a member of N≥ (v). But moves made by members of N= (v) are never injurious. Hence  m(u). (2) m(v) ≤ 1 + u ∈ N> (v)

We now order the nodes v1 , v2 , . . . , vn such that w(v1 ) ≥ w(v2 ) ≥ . . . ≥ w(vn ). By induction on i we claim that each m(vi ) is finite. Clearly m(v1 ) ≤ 1. Inequality (2) completes the induction. QED

In [10] and [11], s-s algorithms for (∆ + 1)-colorings are given that run in n moves. Note that any numbering, say assigning all numbers w(v) to be equal, is a (∆+1)-forward numbering. In this case, the set Fw (v) is the full set of colors in N (v). It is clear that in this case our algorithm runs in at most n moves. Therefore Algorithm ColorByNumber obtains a (∆ + 1)-list-coloring, providing a generalization of the s-s algorithms in [10] and [11]. Algorithm ColorByNumber extends some of the results of Shukla et al. [14]. In particular, since a ring has a 3forward numbering, Algorithm ColorByNumber can 3-list color rings without requiring an orientation, and since trees have 2-forward numberings, Algorithm ColorByNumber can 2-list-color trees.

Figure 7. Algorithm k-Coloring does not require an a-priori k-forward numbering. This algorithm is shown in Figure 7. As before, one obtains an ordinary k-coloring algorithm by taking the lists to be {1, . . . , k}. The algorithm stabilizes if and only if G has coloring number less than or equal to k. Our approach is modeled after Ghosh and Karaata [9], who obtain a selfstabilizing algorithm for 6-coloring planar graphs. The idea is to combine the two rules upslide and recolor from Algorithms UpSlide and ColorByNumber, respectively. Rule upslide is exactly the k-forward numbering rule from Algorithm UpSlide. Rule recolor is the list coloring rule of Algorithm ColorByNumber with an additional boolean constraint; a node must have less than k larger neighbors before it can change its color. This ensures that a new color is available. Lemma 9 If G has a k-forward ordering, Algorithm kColoring makes at most nW + n2 upslide moves. P ROOF. The upslide moves use only variable w and this variable is not modified by the recolor moves. Therefore this is obvious in light of Theorem 5. QED Lemma 10 Algorithm k-Coloring can make only a finite number of consecutive recolor moves. P ROOF. Assume that there is an arbitrary numbering w, and we will consider a sequence of consecutive recoloring moves. Some nodes v can not move at all because | N≥ (v) | ≥ k. But in any case, after its first move, a node v can move at most once for every injurious move made by a member of N> (v). Thus the same induction argument used in Theorem 7 may be applied to show that QED m(v) is finite.

4.2. Coloring algorithm

Theorem 8 If G has a k-forward ordering, Algorithm kColoring stabilizes, and produces a k-coloring.

By composing Algorithm ColorByNumber with any of the k-forward numbering algorithms we can obtain a general s-s algorithm for list k-coloring a graph G, which

P ROOF. It follows from Lemma 9 and Lemma 10 that Algorithm k-Coloring must stabilize. At this time, the values w(v) must form a k-forward numbering, or else some node

Proceedings of the 18th International Parallel and Distributed Processing Symposium (IPDPS’04)

0-7695-2132-0/04/$17.00 (C) 2004 IEEE

could execute the upslide rule. The values c(v) must form a coloring, for otherwise, if there were a monochromatic edge vu with w(v) ≤ w(u), since the k-forward numbering is in place, node v could execute the recolor move. QED Any forest has a 2-forward numbering. It is also known [12] that series-parallel graphs have 3-forward numberings, and planar graphs 6-forward numberings. Therefore we have: Corollary 1 Any forest is 2-colored by Algorithm kColoring. Corollary 2 Any series-parallel graph is 3-colored by Algorithm k-Coloring. Corollary 3 Any planar graph is 6-colored by Algorithm kColoring. Corollary 4 For any surface S there is a constant cS such that all graphs embeddable on that surface are cS -colored by Algorithm k-Coloring. P ROOF. It is known [12] that the coloring number for all such graphs is bounded. QED Let G be a graph having maximum degree ∆. Brooks’ Theorem guarantees the existence of a (∆+1)-coloring, and if G is not an odd cycle or a complete graph, there exists a ∆-coloring. It is easy to show that graphs having maximum degree k = ∆, that are not regular, must have a k-height numbering. Thus we have Corollary 5 Any non-regular graph having maximum degree ∆ is ∆-colored by Algorithm k-Coloring.

5. Other models: distributed daemon and synchronous In the distributed daemon model, the daemon may select an arbitrary subset of privileged nodes. The serial-model algorithms of this paper can be converted to s-s algorithms under the distributed daemon model at the cost of IDs and time. In the synchronous model, all privileged nodes move simultaneously. All three of our k-forward numbering algorithms run correctly under this model. We know that at least one of these, Algorithm Slide, converges very fast.

References [1] G. Antonoiu and P.K. Srimani. A self-stabilizing distributed algorithm to find the center of a tree graph. Parallel Algorithms and Applications, 10:237–248, 1997. [2] S.C. Bruell, S. Ghosh, M.H. Karaata, and S.V. Pemmaraju. Self-stabilizing algorithms for finding centers and medians of trees. SIAM Journal on Computing, 29(2):600–614, 1999. [3] M. Demirbas and H. Ferhatosmanoglu. Peer-to-peer spatial queries in sensor networks. In 3rd IEEE International Conference on Peer-to-Peer Computing, (P2P ’03). Link¨oping, Sweden, September 2003. [4] E. W. Dijkstra. Self-stabilizing systems in spite of distributed control. Communications of the ACM, 17(11):643– 644, November 1974. [5] E. W. Dijkstra. A belated proof of self-stabilization. Distributed Computing, 1(1):5–6, 1986. [6] S. Dolev and T. Herman. Superstabilizing protocols for dynamic distributed systems. Chicago Journal of Theoretical Computer Science, 3(4), 1997. [7] S. Dolev. Self-stabilization, MIT Press, 2000. [8] S. Dolev, E. Schiller, and J. Welch. Random walk for selfstabilizing group communication in ad-hoc networks. In Proc. 21st IEEE Symposium on Reliable Distributed Systems, pages 70–79, 2002. [9] S. Ghosh and M.H. Karaata. A self-stabilizing algorithm for coloring planar graphs. Distributed Computing, 7:55–59, 1993. [10] M. Gradinariu and S. Tixeuil. Self-stabilizing vertex coloration of arbitrary graphs. In 4th International Conference On Principles Of Distributed Systems, OPODIS’2000, pages 55–70. Studia Informatica Universalis, 2000. [11] S. T. Hedetniemi, D. P. Jacobs, and P.K. Srimani. Lineartime self-stabilizing colorings. Information Processing Letters, 87:251–255, 2003. [12] T.R. Jensen and B. Toft. Graph Coloring Problems. Wiley, 1994. [13] S. S. Kulkarni and U. Arumugam. Collision-free communication in sensor networks. In Proceedings Self-Stabilizing Systems: 6th International Symposium, SSS 2003, San Francisco, pages 17 – 31, Springer-Verlag, Heidelberg, 2003 [14] S. Shukla, D. Rosenkrantz, and S. Ravi. Developing selfstabilizing coloring algorithms via systematic randomization. In Proceedings of the International Workshop on Parallel Processing, pages 668–673, Bangalore, India, 1994. TataMcGraw Hill, New Delhi.

Theorem 9 Under the synchronous model, Algorithm Slide stabilizes if and only if its graph G has a k-forward numbering. In this case, it stabilizes in at most n steps.

Proceedings of the 18th International Parallel and Distributed Processing Symposium (IPDPS’04)

0-7695-2132-0/04/$17.00 (C) 2004 IEEE

Suggest Documents