An optimal snap-stabilizing wave algorithm in arbitrary graphs q Mehmet Hakan Karaata a, * , Rachid Hadid b a Department of Computer Engineering, Kuwait University, P.O. Box 5969, Safat 13060, Kuwait b Department of Computer Science, Saad City University, P.O. Box 3053, Al-Khobar 31952, Saudi Arabia article info Article history: Received 15 October 2007 Received in revised form 4 April 2008 Accepted 4 April 2008 Available online 20 April 2008 Keywords: Distributed computing Fault tolerance Propagation of information with feedback and cleaning (PFC) Self-stabilization Snap-stabilization Wave algorithms abstract A wave is a distributed computation, often made up of a broadcast phase followed by a feedback phase, requiring the participation of all the processes in a network before a particular event called decision is taken. Solutions to a large number of fundamental problems in distributed computing requires waves. In this paper, we propose a time optimal snap-stabilizing wave algorithm implementing Propagation of Information with Feedback (PIF) for arbitrary synchronous networks with O(d) rounds of delay and O(log d) bits per process, where d is the diameter of the communication network. A system is said to be snap-sta- bilizing if it always behaves according to its specification [A. Bui, A. Datta, F. Petit, V. Villain, State-optimal snap-stabilizing PIF in tree networks, in: Proceedings of the Third Workshop on Self-stabilizing Systems (published in association with ICDCS99 The 19th IEEE International Conference on Distributed Comput- ing Systems), IEEE Computer Society, Washington, DC, USA, vol. 5, 1999, pp. 78–85]. One of the main advantages of the proposed algorithm being snap-stabilizing is that the arbitrary initial configuration has limited or no effect on the pace of the broadcast propagation. Ó 2008 Elsevier B.V. All rights reserved. 1. Introduction A wave is a distributed computation, often made up of a broad- cast phase followed by a feedback phase, requiring the participa- tion of all the processes in a network in each phase before a particular event called decision is taken. Wave algorithms are widely used as the basis to solve many fundamental distributed computing problems such as spanning tree construction [2], termi- nation detection [3], leader election [4], snapshot [5], global reset [4,6,7,5], and clock synchronization [8,6,9–14]. Waves are often implemented using the propagation of informa- tion with feedback (PIF) algorithms [15,16], also referred to as echo algorithms. A state-optimal snap-stabilizing implementation of the PIF with cleaning, called the PFC scheme (propagation of informa- tion with feedback and cleaning) for tree networks was presented in [1] using three states per process. Later, generalizations of the snap-stabilizing PFC scheme to arbitrary networks was proposed in [17,18]. A system is said to be snap-stabilizing, starting from any system configuration, if it always satisfies its specification [1], whereas, a system is referred to as a self-stabilizing system if it eventually satisfies the specification and the specification is sat- isfied thereafter. Snap-stabilization can also be viewed as an ap- proach to devise protocols with optimal stabilization time. On the other hand, self-stabilization is viewed as a viable approach to devise distributed algorithms that are able to withstand tran- sient failures. We view a fault that perturbs the state of the system but not the program as a transient fault. In addition, many self-sta- bilizing algorithms are capable of gracefully dealing with the dy- namic addition and deletion of vertices or edges. Due to these desirable features, devising of self-stabilizing distributed, sensor and mobile network protocols is desirable. Since the introduction of self-stabilization by Dijkstra [19], self- stabilizing algorithms for many fundamental problems in distrib- uted systems have been proposed including the PIF algorithms. For example, self-stabilizing PIF algorithms have been proposed for tree networks in [20,1,21], and for arbitrary networks in [7,22]. The self-stabilizing PIF protocols have been used to con- struct self-stabilizing synchronizers [6,9,23], self-stabilizing reset protocols [4,6,7,24] to reset the entire system state after a transient fault is detected, and self-stabilizing snapshot algorithms [7,25]. Except for [7,22], all self-stabilizing PIF algorithms in the literature work on trees and assume an underlying self-stabilizing rooted spanning tree construction algorithm [4,6,2,24]. In [18], Cournier et al. present a snap-stabilizing PIF algorithm for arbitrary networks in the absence of a pre-constructed span- ning tree. The algorithm assumes a predefined root process with the knowledge of the size of the network. The snap-stabilization of the protocol is implemented as follows. The root process broad- casts a message to its neighbors. Upon receipt of its first message, each process broadcasts the message to all its neighbors except for 0140-3664/$ - see front matter Ó 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.comcom.2008.04.006 q This research was supported by the Kuwait University Research Administration under Grant EO-06/01. * Corresponding author. Tel.: +965 498 5842. E-mail addresses: karaata@eng.kuniv.edu.kw (M.H. Karaata), rachid.hadid@ ensi-bourges.fr (R. Hadid). Computer Communications 31 (2008) 3071–3077 Contents lists available at ScienceDirect Computer Communications journal homepage: www.elsevier.com/locate/comcom