Available online at www.sciencedirect.com

SCIENCE

DIRECT

Electronic Notes in Theoretical Computer Science

ELSEVIER Electronic Notes in Theoretical Computer Science 154 (2006) 113-120

www.elsevier.com/locate/entcs

Semi-local Model of Computations on Graphs to Break the Local Symmetry

We consider finite connected undirected graphs without self-loops as a model of computer networks. The nodes of the graph represent computers or processors, while the edges of the graph correspond to the links between them. We present a model of distributed computations, called semi-local. This extension of the classical local model breaks the local symmetry. As a result, many useful tasks become deterministically solvable in every network assuming a very small initial knowledge about its graph representation. One of these tasks is a creation of a token in an arbitrary anonymous ring - an example of election of a leader. A semi-local solution to this problem is presented.

Keywords: Transformations and refinements, verification and analysis, local computations, graph relabelling systems, election, anonymous graphs, rings, token ring networks.

1 Introduction, Related Work

A finite connected labelled graph is a natural model of a computer network. Its nodes represent computers or processors, its edges stand for communication links, and its labelling represents the network state. The labelled graph is called anonymous, if its labelling is uniform. A series of transformations of graph labelling is a model of a computation in the network.

1 The author acknowledges support from the Ministry of Scientific Research and Information Technology grant No 3 T11C 006 27 for the years 2004-2005.

2 Email: wrobldob@wars.ipipan.waw.pl

Work in Progress

Dobieslaw Wroblewski1,2

Institute of Computer Science Polish Academy of Sciences Warsaw, Poland

Abstract

1571-0661/$ - see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.entcs.2005.03.036

Different models of distributed computations in undirected graphs were presented ([1,2,3,6]). They are called local models of computations. Among these models, the one presented in [3] has the most computational power - if a certain computational task is proved not to be solvable in this model, it is not solvable in the other ones, either. We refer to the model presented in [3] as to the (classical) local model.

Certain tasks are not solvable in this model. The most important example is the election problem in anonymous graphs of arbitrary structure [3]. The weakness of the local model comes from the symmetry of certain types of anonymous graphs. Such graphs are locally indistinguishable from other, not isomorphic ones.

The semi-local model of computations is the least known extension of the classical local model that breaks the local symmetry. As a result, all problems solvable with global methods are also solvable semi-locally [5]. This includes the election problem. In [5] we present a semi-local election protocol for anonymous graphs of arbitrary unknown size and structure. The main drawback of the protocol is the complexity of its definition.

In this paper we present another practical application of the same idea: a semi-local solution to the well-known problem of creation of a unique token in anonymous ring of arbitrary size. This problem is an example of the election task and is proved to be solvable locally only for rings with a priori known prime size [4]. Although the algorithm presented in [5] might be applied in this case without any modifications, we decided to define a new optimised protocol for rings by applying the general idea used in the universal protocol. The new protocol is very simple and readable when defined as a relabelling system. The protocol presented in [5] in turn, was defined in a different formalism and only shown to be definable in terms of relabelling systems (the actual definition was skipped due to its expected complexity and unreadability). Before we define the protocol, we briefly present the semi-local model and compare it with the classical local one.

Standard mathematical notation is used through the paper. The reader is assumed to be familiar with basic notions from graph theory. By convention, we use bold fonts to denote labelled graphs.

The paper is organised as follows. Section 2 introduces the semi-local model of computations. Section 3 defines a semi-local token creation protocol for rings. Then come the conclusions, including a discussion on complexity of the defined algorithm and prospects for further research.

2 Locality and semi-locality

Graph transformations are represented as binary relations in the set of labelled graphs. We say that a transformation T is a relabelling if it changes only the labelling, i.e. for all (G, G') E T the underlying graphs of G and G' are equal3.

We say that a relabelling T is local in H iff for all (G, G') E T such that H is a subgraph of G :

(a) the labelling does not change outside H, and

(b) the change does not depend on the structure or labelling of the graph outside H.

H is called a locality region of T. Note that if T is local in H, it is also local in every H' such that H C H' C G. The minimum locality region of T is denoted as reg(T).

Distributed computations are modelled by sequences of local relabellings. However, the relabellings whose locality regions do not intersect might be applied concurrently.

In the classical local model it is required that in every sequence of relabellings, all transformations are local in balls of radius 14 , i.e. the subgraphs consisting of some node linked with its neighbours (see Fig. 1).

More formally, in the classical local model, for every sequence of labelled graphs (Gi, G2,...) such that for each i E N (Gi, Gi+1) E Ti (where Ti is a relabelling), for all j E N we have:

reg(Tj) C B(Vj),

where Vj is a node of Gj.

Fig. 1. Two successive relabellings in the local model. Locality regions are indicated with grey background, their centres are pointed with arrows.

3 The requirement of equality (not just isomorphism) has its practical explanation. The underlying graph models the network and the physical structure of the network remains the same after the change of its logical state.

4 More generally, in balls of some a priori chosen radius k E N (a k-local model).

In the semi-local model we employ the fact (ignored in the local model) that a distributed protocol might gather a structural knowledge about the network in every step. Namely, if some step of the protocol is a local transformation in a ball B(v) centred in some node v, we assume that the structure of B(v) is recognised. Now, take any node w G B(v). In the local model, the next transformation (the next step of the protocol) might be local in B(w). This means, however, that the previously gathered knowledge of the structure of B(v) would be ignored despite the fact that w G B(v). Why not use B(v) U B(w) as the new locality region?

Thus, in the semi-local model we allow that in every sequence of rela-bellings, each transformation is local in some ball of radius 15, or in some connected subgraph that is a sum of such a ball and some locality regions used in the preceding transformations (see Fig. 2).

More formally, in the semi-local model, for every sequence of labelled graphs (Gi, G2,...) such that for each i G N (G», Gi+1) G T (where T is a relabelling), for all j G N we have:

reg(Tj) Ç B(v), or reg(Tj) is a connected subgraph of [reg(T1) U ... U reg(Tj_1)] U B(vj)

where vj is a node of Gj.

Fig. 2. Two successive relabellings in the semi-local model (compare Fig. 1).

This means that the initial locality regions are balls of radius 1, and then they might grow using local methods (by adding balls of radius 1). Thus, semi-local process still conforms with the intuitive meaning of a local computation, but it is capable of solving all tasks solvable with global methods. Next section provides a representative example.

3 Semi-local creation of a token in a ring

The simplest symmetric network architecture is modelled by a ring - a connected graph in which every node v has exactly two neighbours (let us call them left(v) and right(v). We assume that left(right(v)) = right(left(v)) =

5 More generally, a ball of some a priori chosen radius k € N (a k-semi-local model).

v for every node v6. Our task is to define a semi-local protocol which starts with an anonymous ring and transforms its initial uniform labelling into such a labelling in which exactly one node is labelled differently than the rest. This node will be given the token. Such a task is a typical example of a leader election and the result labelling breaks the initial symmetry.

The idea of our protocol is quite simple. Let a group be a connected subgraph of a ring. The global state of the protocol is a set of groups numbered with non-zero natural numbers. Every node can belong to at most two groups, and it can be left border, interior, or right border of any group it belongs to. If a node does not belong to any group, we call it a free node. Initially, the set of groups is empty, thus every node is free. In the subsequent steps, groups are created (from triples of free nodes), extended (by free nodes adjacent with border nodes) or merged (when two different groups have the same border node). The product of each creation, extension or merge is numbered in such a way that any two incident groups have different numbers. After a series of extensions and merges, all nodes belong to the same group and exactly one node is its left and right border. This node is selected and gets the token.

Let R be any finite ring. R is fixed till the end of Section 3. The set of R's nodes is denoted as V. The local states of nodes are described by the labelling functions l,i,r : V ^ N and t : V ^ {0, 1} where for each v E V:

• l(v) / i(v) / r(v) - a number of a group for which v is right border / interior / left border, respectively7 ; they are all 0 for free nodes; initially 0,

• t(v) - the indicator of the presence of the token in v; it is 1 if v has the token, otherwise 0; initially 0.

The labelled graph (R, l, i, r, t) is denoted R, the initial labelling is anonymous.

Let v E V. The list of protocol transformations follows. The symbols l, i, r, t denote the labelling before the transformation, whereas the primed symbols l', i', r', t' denote its result.

• If a node v is free, let w = left(v) and x = right(v). A new group is created from w, v, x, namely:

6 This global assumption simplifies our algorithm. However, it can be easily avoided: the definition of the algorithm would be approximately two times longer.

7 Note that the symbol l(v) corresponds to the text "right border". Intuitively speaking, l(v) denotes the number of the group that spans from v to the left (i.e. in the direction pointed by v's left neighbour). This means that v is right border of the group numbered l(v). The situation is symmetrical for the symbol r(v).

l(v) = i(v) = r(v) = 0 A gmax = max(l(w), r(x)) A r'(w) = i'(v) = l'(x) = 1 + gmax (see Fig. 3a).

• If a node v is left border of some group G and is not a right border of any other group8, then let w = left(v) and let x be the other border node of

G. The group G is extended by w, namely:

l(v) = i(v) =0 A r(v) > 0 A gmax = max(l(w), r(v), r(x)) A r'(w) = i'(v) = l'(x) = 1 + gmax A r'(v) =0 A Vy G G - {v, x} i'(y) = 1 + gmax (see Fig. 3b).

• If a node v is right border of some group G and left border some other group

H, then let w be the other border node of G, and x be the other border node of H. The groups G and H are merged, namely:

l(v) > 0 A i(v) = 0 A r(v) > 0 A gmax = max(l(w), l(v), r(v), r(x)) A r'(w) = i'(v) = l'(x) = 1 + gmax A l'(v) = r'(v) = 0 A Vy G (G U H) - {w, v, x} i'(y) = 1 + gmax (see Fig. 3c).

• If a node v is right border and left border of the same group G, and it does not have a token yet, then it is given the token, namely:

t(v) = 0 A l(v) > 0 A i(v) = 0 A r(v) > 0 A l(v) = r(v) A t'(v) = 1.

Fig. 3. Examples of a) creation, b) extension and c) merging of groups. The groups are indicated with grey background, their numbers are placed nearby.

The example of a full run of the defined protocol is depicted in Fig. 4

with black background.

8 The situation in which v is right border and not a left border is symmetrical.

The scope of this paper does not allow for a detailed discussion of the properties of the defined protocol. Instead, we present the most important properties in the form of the following theorem.

Theorem 3.1 The defined protocol is semi-local and creates a unique token in R using exactly |V| transformations.

Proof. The protocol is semi-local because every transformation is a local relabelling either

• in the ball of radius 1 centred in a free node, or

• in a group summed with the ball of radius 1 centred in a node that is left border of the group and is not a right border of any other group, or

• in two different groups whose intersection is a node that is right border of the first group and left border of the latter, or

• in a single node that is right border and left border of the same group, and every group is a locality region used in some previous transformation.

Every run of the protocol uses |V| transformations because:

• every transformation requires a node v such that i(v) = 0 and t(v) = 0; after the transformation one of these labels changes to non-zero value, but for v only,

• as long as there is a node v such that i(v) = 0 and t(v) = 0, a transformation might be performed,

and in the initial configuration i(v) = 0 and t(v) = 0 for all v E V.

All groups created by the transformations of the protocol are given different numbers if they intersect. Thus, if for some node v we have l(v) = r(v) > 0, then v is is right border and left border of the same group. This means that the group contains all nodes of the ring, so for all nodes w = v we have i(w) > 0, thus only v might be given the token.

On the other hand, subsequent transformations increase the number of nodes w for which i(w) > 0. At the same time the appropriate groups are created, extended or merged. As soon as for all w = v we have i(w) > 0, all

nodes belong to the same group. This means that v will be given the token.

4 Conclusions

The semi-local model of computations makes several useful tasks determinis-tically solvable without using global transformations and with employment of very little knowledge about the graph that models the network. A solution to a representative problem was presented.

Future work will include detailed discussion of the properties of the defined protocol, including its complexity measured as the number of actual changes of individual labels. We currently estimate it to be O(|V|2).

However, our main focus is to define a self-stabilising version of the protocol. We believe that the protocol for rings is a good starting point, because it is by far less complicated than the universal protocol defined in [5]. On the other hand, we hope that achieving self-stabilisation for rings will be easy to generalise for the universal case.

References

[1] Angluin, D., Local and Global Proper-ties in Networks of Processors, Proc. of the 12th Symposium on Theory of Computing (1980), 82-93.

[2] Chalopin, J., Y. Metivier, and W. Zielonka, Election, naming and cellular edge local computations, Proc. of ICGT'04, LNCS 3256 (2004) 242-256.

[3] Godard, E., and Y. Metivier, A characterization of families of graphs in which election is possible, LNCS 2303 (2002), 159-171.

[4] Mazurkiewicz, A., Solvability of the Asynchronous Ranking Problem, Information Processing Letters 28/5 (1988), 221-224.

[5] Wroblewski, D., Universal Semi-local Election Protocol Using Forward Links, Fundamenta Informaticae 67/1-3 (2005), 287-301.

[6] Yamashita M., and T. Kameda, Computing on anonymous networks: Part I - characterizing the solvable cases, IEEE Transactions on Parallel and Distributed Systems 7/1 (1996) 69-89.