This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Terminating cases of flooding

Walter Hussak
Computer Science,
Loughborough University,
United Kingdom
W.Hussak@lboro.ac.uk
   Amitabh Trehan
Computer Science,
Loughborough University,
United Kingdom
Amitabh.Trehaan@gmail.com
Abstract

Basic synchronous flooding proceeds in rounds. Given a finite undirected (network) graph GG, a set of sources IGI\subseteq G initiate flooding in the first round by every node in II sending the same message to all of its neighbours. In each subsequent round, nodes send the message to all of their neighbours from which they did not receive the message in the previous round. Flooding terminates when no node in GG sends a message in a round. The question of termination has not been settled - rather, non-termination is implicitly assumed to be possible.

We show that flooding terminates on every finite graph. In the case of a single source g0g_{0}, flooding terminates in ee rounds if GG is bipartite and jj rounds with e<je+d+1e<j\leq e+d+1 otherwise, where ee and dd are the eccentricity of g0g_{0} and diameter of GG respectively. For communication/broadcast to all nodes, this is asymptotically time optimal and obviates the need for construction and maintenance of spanning structures. We extend to dynamic flooding initiated in multiple rounds with possibly multiple messages. The cases where a node only sends a message to neighbours from which it did not receive any message in the previous round, and where a node sends some highest ranked message to all neighbours from which it did not receive that message in the previous round, both terminate. All these cases also hold if the network graph loses edges over time. Non-terminating cases include asynchronous flooding, flooding where messages have fixed delays at edges, cases of multiple-message flooding and cases where the network graph acquires edges over time.

1 Introduction

Flooding is one of the most fundamental of all graph/network algorithms - for example, to achieve broadcast in networks [2, 31]. The algorithm that is usually implemented is: (i) initiator nodes send a message to all their neighbours, (ii) on first receipt, receiving nodes send the message to every neighbour from which they did not receive and (iii) on subsequent receipts, the receiving node does not send the message to any neighbour. This algorithm checks if the message has been received before, to ensure termination. It requires each node records a previous event in its state, making it a stateful protocol. We consider the pure version of flooding, i.e. algorithms that are ‘amnesiac’ in the sense that they hold no record or memory of any event beyond the immediate round. Thus, implemented algorithms that are stateless are amnesiac. The basic pure flooding algorithm is as follows.

Definition 1.1.

Synchronous amnesiac flooding algorithm. Let (G,E)(G,E) be an undirected graph, with vertices GG and edges EE (representing a network where the vertices represent the nodes of the network and edges represent the connections between the nodes). Computation proceeds in synchronous ‘rounds’ where each round consists of nodes receiving messages being sent from neighbours. A receiving node sends messages to some neighbours in the next round. No messages are lost in transit. The algorithm is defined by the following conditions.

  • (i)

    All nodes from a subset of sources or ‘initial nodes’ IGI\subseteq G send a message MM to all of their neighbours in round 1.

  • (ii)

    In subsequent rounds, every node that received MM from a neighbour in the previous round, sends MM to all, and only those, nodes from which it did not receive MM. Flooding terminates when MM is no longer sent to any node in the network.

Hitherto, it was not known whether a stateless flooding algorithm exists that terminates on every graph. In this paper, we show that basic amnesiac flooding is itself such an algorithm. The termination times for a single source g0g_{0} are ee rounds if GG is bipartite and jj rounds with e<je+d+1e<j\leq e+d+1 otherwise, where ee and dd are the eccentricity of g0g_{0} and diameter of GG respectively. These times are asymptotically time optimal. The difference in times between bipartite and non-bipartite graphs means that a stateless algorithm can approximate the topology or diameter/eccentricities of a network in certain cases.

Gopal, Gopal and Kutten [14] highlighted the memory requirement inherent in stateful flooding and its overhead on fast networks. For example, when multiple messages are being flooded, nodes need to keep a record of the messages they have seen and search through their data structure whenever a message arrives before deciding if it can be further flooded. This is also a limitation for low memory devices, e.g. sensor networks. We show that not only amnesiac flooding of the same message in a single round, but also amnesiac flooding of multiple messages initiated in multiple rounds, where at most one message is sent along any given edge each round, terminates.

One advantage of the stateful variant of flooding is that it can be used to construct spanning structures, such as spanning trees, which can be subsequently re-used for efficient communication [25, 2, 31, 38]. It is not easy to maintain these structures in dynamic conditions, i.e. when edges/nodes are being added or removed. We show that even when edges are being arbitrarily or adversarially removed from the graph, amnesiac flooding with the correct forwarding rules will still terminate. Under some other forwarding rules, termination is not guaranteed. Termination is also not guaranteed in asynchronous models where the delivery time of messages on edges can vary - we show this with a non-terminating delivery schedule over the edges and even with a single edge with delayed delivery in some pathological cases. Note that amnesiac flooding uses rules that avoid forwarding to the most recently chosen nodes - similar ideas have been used before in distributed computing, e.g. in social networks [10] and broadcasting [12].

There are numerous applications of flooding as a distributed algorithm. It is often used to set up spanning trees[25, 2, 31, 38] and solving leader election. For example, the time-optimal leader election of Peleg [30] utilises continuous flooding of node IDIDs to determine the node with the highest IDID while using a condition on the node IDIDs to achieve and detect termination. Kutten et al [23], on the other hand, use controlled stateful flooding and resulting spanning tree for efficient time and message leader election. Processes such as random walks [35, 36, 13, 23, 24] and its deterministic variant Rotor-Router (or Propp) machine [22, 8] can also be seen as restricted variants of flooding. Finally, in some models such as population protocols, the low memory makes termination very difficult to achieve leading to research that tries to provide termination e.g. [26].

Flooding-based algorithms (or flooding protocols) appear in areas ranging from GPUs, high performance, shared memory and parallel computing, to mobile ad-hoc networks (MANETs), Mesh Networks, Complex Networks etc [37]. Rahman et al [32] show that flooding can even be adopted as a reliable and efficient routing scheme, comparable to sophisticated point-to-point forwarding schemes, in some ad-hoc wireless mobile network applications. Adamek et al [1] and Karp and Kung [21] further offer stateless (flooding and other) solutions for routing.

This paper is structured as follows. In section 2, we prove that, for the simple case of a single message being flooded from a set of initial nodes in round 0, all nodes receive the message at most twice and hence amnesiac flooding terminates (Theorem 2.2). This result is used to derive sharp bounds for the number of rounds it takes for flooding to terminate, in section 3 (Theorem 3.9). Amnesiac flooding is extended in section 4 to dynamic cases where multiple messages are flooded in any round. The flooding algorithms are categorized by whether a node sends a chosen received message MhM_{h} to neighbours from which it did not receive any message in the previous round, or whether the node sends MhM_{h} to all neighbours from which it did not receive MhM_{h}. We show that, in the first case, and also the second case if messages are ranked, no flooded message is received more than twice and therefore flooding terminates if the number of messages is finite (Theorems 4.4 and 4.8). In section 5 we present non-terminating cases of amnesiac flooding for both single-message and multiple-message flooding. Conclusions are drawn in section 6.

Sections 2 and 3 of this paper have essentially appeared earlier as conference publications at STACS 2020 [20] and PODC 2019 [18], and on Arxiv [19]. The proof of time to termination was presented for the case of a single source, but the same proof also provides the time calculation for the multi-source case simply by replacing distances d(g0,g)d(g_{0},g) of a node gg from the initial node g0g_{0} by distances d(I,g)d(I,g) of gg from the set of initial nodes II. Since those publications, Turau [40, 41] has worked on finding optimal sets of sources of a given size that minimize termination time for multi-source flooding. The parts of this paper from section 4 onwards on dynamic flooding, which require the use of a more powerful proof method, have not been published previously.

2 Termination

Throughout this paper, when we refer to ‘flooding’ we will mean either the amnesiac flooding of Definition 1.1 or another amnesiac version of flooding defined in context in the relevant section. In this section we prove that (amnesiac) flooding initiated from any set of initial nodes, all at once, terminates.

Definition 2.1.

Let GG be the graph and IGI\subseteq G a set of initial nodes. The round-sets R0,R1,R_{0},R_{1},\ldots are defined as:

R0is the set I containing the initial nodes,Riis the set of nodes which receive a message in round i(i1).\begin{array}[]{lll}R_{0}&\hbox{\it is the set $I$ containing the initial nodes,}&\\ R_{i}&\hbox{\it is the set of nodes which receive a message in round i}&(i\geq 1).\\ \end{array}

Clearly, if Rj=R_{j}=\emptyset for some j0j\geq 0, then Ri=R_{i}=\emptyset for all iji\geq j.

Theorem 2.2.

Any node gGg\in G is contained in at most two distinct round-sets.

Proof    Define {\mathcal{R}} to be the set of finite sequences of consecutive round-sets of the form:

R¯=Rs,,Rs+d where s0,d>0and RsRs+d .\underline{R}=R_{s},\ldots,R_{s+d}\;\;\;\hbox{ {\it where} $s\geq 0,\;d>0$, {\it and} $R_{s}\cap R_{s+d}\neq\emptyset$ }. (1)

In (1), ss is the start-point s(R¯)s(\underline{R}) and dd is the duration d(R¯)d(\underline{R}) of R¯\underline{R}. Note that, a node gGg\in G belonging to RsR_{s} and Rs+dR_{s+d} may also belong to other RiR_{i} in (1). If a node gGg\in G occurs in three different round-sets Ri1R_{i_{1}}, Ri2R_{i_{2}} and Ri3R_{i_{3}}, then the duration between Ri1R_{i_{1}} and Ri2R_{i_{2}}, Ri2R_{i_{2}} and Ri3R_{i_{3}}, or Ri1R_{i_{1}} and Ri3R_{i_{3}} will be even. Consider the subset e{\mathcal{R}}^{e} of {\mathcal{R}} of sequences of the form (1) where dd is even. To prove that no node is in three round-sets, it suffices to prove that e{\mathcal{R}}^{e} is empty.

We assume that e{\mathcal{R}}^{e} is non-empty and derive a contradiction. Let d^e{\mathcal{R}}^{e}_{\hat{d}} be the subset of e{\mathcal{R}}^{e} comprising sequences of minimum (even) duration d^\hat{d}, i.e.

d^e={R¯e|R¯e.d(R¯)d(R¯)=d^}{\mathcal{R}}_{\hat{d}}^{e}=\{\underline{R}\in{\mathcal{R}}^{e}\;\;|\;\;\forall\;\underline{R}^{\prime}\in{\mathcal{R}}^{e}.\;\;d(\underline{R}^{\prime})\geq d(\underline{R})=\hat{d}\} (2)

Clearly, if e{\mathcal{R}}^{e} is non-empty then so is d^e{\mathcal{R}}^{e}_{\hat{d}}. Let R¯d^e\underline{R}^{*}\in{\mathcal{R}}^{e}_{\hat{d}} be the sequence with earliest start-point s^\hat{s}, i.e.

R¯=Rs^,,Rs^+d^\underline{R}^{*}=R_{\hat{s}},\ldots,R_{\hat{s}+\hat{d}} (3)

where

R¯d^e.s(R¯)s(R¯)=s^\forall\;\underline{R}^{\prime}\in{\mathcal{R}}_{\hat{d}}^{e}\;.\;s(\underline{R}^{\prime})\geq s(\underline{R}^{*})=\hat{s} (4)

By (1), there exists gRs^Rs^+d^g\in R_{\hat{s}}\cap R_{\hat{s}+\hat{d}}. Choose node gg^{\prime} which sends a message to gg in round s^+d^\hat{s}+\hat{d}. As gg^{\prime} is a neighbour of gg, either gg^{\prime} sends a message to gg in round s^\hat{s} or gg sends a message to gg^{\prime} in round s^+1\hat{s}+1. We show that each of these cases leads to a contradiction.

Case (i) gg^{\prime} sends a message to gg in round s^\hat{s}

In this case, there must be a round s^1\hat{s}-1 which is either round 0 and gg^{\prime} is an initial node in II, or gg^{\prime} received a message in round s^1\hat{s}-1. Thus, the sequence

R¯=Rs^1,Rs^,,Rs^+d^1 wheregRs^1Rs^+d^1\underline{R}^{*^{\prime}}=R_{\hat{s}-1},R_{\hat{s}},\ldots,R_{\hat{s}+\hat{d}-1}\;\;\;\hbox{ {\it where}}\;g^{\prime}\in R_{\hat{s}-1}\cap R_{\hat{s}+\hat{d}-1} (5)

has d(R¯)=(s^+d^1)(s^1)=d^d(\underline{R}^{*^{\prime}})=(\hat{s}+\hat{d}-1)-(\hat{s}-1)=\hat{d} which is even and so R¯d^e\underline{R}^{*^{\prime}}\in{\mathcal{R}}_{\hat{d}}^{e}. As R¯d^e\underline{R}^{*^{\prime}}\in{\mathcal{R}}_{\hat{d}}^{e}, by (4)

s(R¯)s(R¯)s(\underline{R}^{*^{\prime}})\geq s(\underline{R}^{*}) (6)

But, from (5), s(R¯)=s^1s(\underline{R}^{*^{\prime}})=\hat{s}-1 and, from (4), s(R¯)=s^s(\underline{R}^{*})=\hat{s}. Thus, by (6),

s^1=s(R¯)s(R¯)=s^\hat{s}-1=s(\underline{R}^{*^{\prime}})\geq s(\underline{R}^{*})=\hat{s}

which is a contradiction.

Case (ii) gg sends a message to gg^{\prime} in round s^+1\hat{s}+1

By the definition of e{\mathcal{R}}^{e}, the smallest possible value of d^\hat{d} is 2. However, it is not possible to have d^=2\hat{d}=2 in this case as then

R¯=Rs^,Rs^+1,Rs^+2\underline{R}^{*}=R_{\hat{s}},R_{\hat{s}+1},R_{\hat{s}+2}

and gg sends a message to gg^{\prime} in round s^+1\hat{s}+1. As we chose gg^{\prime} to be such that gg^{\prime} sends a message to gg in round s^+d^=s^+2\hat{s}+\hat{d}=\hat{s}+2 this cannot happen because gg cannot send a message to gg^{\prime} and gg^{\prime} to gg in consecutive rounds by the definition of rounds. So,

R¯=Rs^,Rs^+1,,Rs^+d^1,Rs^+d^\underline{R}^{*}=R_{\hat{s}},R_{\hat{s}+1},\ldots,R_{\hat{s}+\hat{d}-1},R_{\hat{s}+\hat{d}}

where s^+1<s^+d^1\hat{s}+1<\hat{s}+\hat{d}-1. Consider the sequence

R¯′′=Rs^+1,,Rs^+d^1\underline{R}^{*^{\prime\prime}}=R_{\hat{s}+1},\ldots,R_{\hat{s}+\hat{d}-1} (7)

As gg^{\prime} receives a message from gg in round s^+1\hat{s}+1 and gg^{\prime} sends a message to gg in round s^+d^\hat{s}+\hat{d}, it is clear that gRs^+1Rs^+d^1g^{\prime}\in R_{\hat{s}+1}\cap R_{\hat{s}+\hat{d}-1}. Thus, R¯′′\underline{R}^{*^{\prime\prime}}\in{\mathcal{R}}. As d^\hat{d} is even, so is (s^+d^1)(s^+1)=d^2(\hat{s}+\hat{d}-1)-(\hat{s}+1)=\hat{d}-2 and therefore R¯′′e\underline{R}^{*^{\prime\prime}}\in{\mathcal{R}}^{e}. Now, R¯d^e\underline{R}^{*}\in{\mathcal{R}}^{e}_{\hat{d}} and so, as R¯′′e\underline{R}^{*^{\prime\prime}}\in{\mathcal{R}}^{e}, we have, by (2),

d(R¯′′)d(R¯)d(\underline{R}^{*^{\prime\prime}})\geq d(\underline{R}^{*}) (8)

As d(R¯′′)=d^2d(\underline{R}^{*^{\prime\prime}})=\hat{d}-2 from (7) and d(R¯)=d^d(\underline{R}^{*})=\hat{d} from (3), we have, by (8),

d^2=d(R¯′′)d(R¯)=d^\hat{d}-2=d(\underline{R}^{*^{\prime\prime}})\geq d(\underline{R}^{*})=\hat{d}

This contradiction completes the proof.   

Definition 2.3.

(For section 3 only - superscripts have a different use in section 4.) Given gGg\in G, we use a superscript 1 to indicate that gg belongs to a round-set for the first time, and a superscript 2 to indicate that it belongs to a round-set for the second time, i.e.

g1Rjg^{1}\in R_{j}

means that

gRj𝑎𝑛𝑑gRifor all i with  0i<j.g\in R_{j}\;\;\;{\it and}\;\;\;g\notin R_{i}\;\;\;\hbox{{\it for all i with}}\;\;0\leq i<j.

and

g2Rjg^{2}\in R_{j}

means that

gRj𝑎𝑛𝑑gRifor some i with  0i<j.g\in R_{j}\;\;\;{\it and}\;\;\;g\in R_{i}\;\;\;\hbox{{\it for some i with}}\;\;0\leq i<j.

Theorem 2.2 implies that Ri=R_{i}=\emptyset for i2|G|i\geq 2|G|, where |G||G| is the number of vertices of GG, and therefore flooding always terminates. In the next section we give sharp bounds for the number of rounds to termination, in terms of the eccentricity of initial nodes and the diameter of GG.

3 Time to termination

The question of termination of network flooding is non-trivial when cycles are present in GG. The simple cases when GG is an even cycle and when GG is an odd cycle, as in figure 1 (where an arrow indicates a message received by a node in the given round), display quite different termination behaviours.

Refer to caption
Figure 1: Flooding in even and odd cycles

The even cycle terminates remotely from the initial node g0g_{0}, after round ee where ee is the eccentricity of g0g_{0} in GG. On the other hand, flooding on the odd cycle returns a message to the initial node g0g_{0} and terminates after round 2e+12e+1 resulting in a longer flooding process than the even cycle despite having fewer nodes and a smaller value of ee. In this section, we show that these observations can be largely generalized to arbitrary graphs. Observe that in the even cycle every node receives the message only once, whereas in the odd cycle every node receives the message twice. We show that, in general graphs, this difference is due to the absence or presence of neighbouring nodes that are equidistant from the set of initial nodes II, called ‘ec nodes’ below.

Definition 3.1.

Let (G,E)(G,E) be a graph with vertex set GG and edge set EE and let IGI\subseteq G be a set of initial nodes. We will use the following definitions.

  • (i)

    For each j0j\geq 0, the distance set DjD_{j} will denote the set of points which are a distance jj from II. i.e.

    Dj={gG:d(I,g)=j},D_{j}=\{g\in G\;:\;d(I,g)=j\},

    where, for any gGg\in G,

    d(I,g)=𝑚𝑖𝑛{d(g0,g):g0I}d(I,g)={\it min}\{d(g_{0},g)\;:\;g_{0}\in I\}

    and dd is the usual distance function in graph GG.

  • (ii)

    A node gGg\in G is an equidistantly-connected node, abbreviated ec node, iff it has a neighbour gg^{\prime} equidistant from II, i.e. iff there there exists gGg^{\prime}\in G such that d(I,g)=d(I,g)d(I,g)=d(I,g^{\prime}) and {g,g}E\{g,g^{\prime}\}\in E

  • (iii)

    The eccentricity of II, denoted e(I)e(I), is defined as

    e(I)=𝑚𝑎𝑥{d(I,g):gG}e(I)={\it max}\{d(I,g)\;:\;g\in G\}
  • (iv)

    The graph GG is ec-bipartite iff GG has no ec nodes.

Note that neighbouring initial nodes g0,g0Ig_{0},g_{0}^{\prime}\in I are ec nodes as they are both a distance 0 from II. We have the following basic properties of distance sets DjD_{j} and ecec nodes.

Lemma 3.2.

Let GG be a graph and IGI\subseteq G be a set of initial nodes.

  • (i)

    For all j0j\geq 0 and i>ji>j, DjRjD_{j}\subseteq R_{j} and RjDi=R_{j}\cap D_{i}=\emptyset.

  • (ii)

    For all j0j\geq 0, gDjg\in D_{j} and gDj+1g^{\prime}\in D_{j+1} such that gg and gg^{\prime} are neighbours, gg sends a message to gg^{\prime} in round j+1j+1, i.e. all nodes at a distance jj from II send to all their neighbours which are a distance j+1j+1 in round j+1j+1.

  • (iii)

    If j0j\geq 0 and gDjg\in D_{j} is an ecec node, then g2Rj+1g^{2}\in R_{j+1}.

Proof    For (i), clearly every node at a distance jj from II receives a message in round jj and so DjRjD_{j}\subseteq R_{j}. Furthermore, every message received in round jj will have travelled at most jj edges away from II and so could not have reached a node which is at a distance i>ji>j from II. Thus, RjDi=R_{j}\cap D_{i}=\emptyset.

For (ii), we note that the only circumstance in which a node gg in DjD_{j} (Rj\subseteq R_{j} by (i)) does not send to a neighbour gg^{\prime} in Dj+1D_{j+1} in round j+1j+1 is if gg sent a message to gg^{\prime} in round jj. This would need gg to be in the round-set Rj1R_{j-1}, i.e. gRj1Dj+1g\in R_{j-1}\cap D_{j+1} which contradicts (i) which has Rj1Dj+1=R_{j-1}\cap D_{j+1}=\emptyset as j+1>j1j+1>j-1.

For (iii), if j0j\geq 0 and gDjg\in D_{j} is an ecec node, then by Definition 3.1(ii) there is an point gg^{\prime} equidistant from II, i.e. gDjg^{\prime}\in D_{j} such that gg and gg^{\prime} are neighbours. If j=0j=0 then g,gD0(=IR0)g,g^{\prime}\in D_{0}(=I\subseteq R_{0}) and send a message to each other in round 1 and so g,gR1g,g^{\prime}\in R_{1}. This means that g2R1g^{2}\in R_{1}, as gg is an initial node and g1R0g^{1}\in R_{0}. If j1j\geq 1 then, by (i) of this lemma, DjRjD_{j}\subseteq R_{j} and so both gg and gg^{\prime} receive messages in round jj. Also, by (i), neither sends a message in round jj as Rj1Dj=R_{j-1}\cap D_{j}=\emptyset. Thus, gg and gg^{\prime} send messages to each other in round j+1j+1. As this will be the second time they receive a message we have that g2Rj+1g^{2}\in R_{j+1}   

All nodes in a graph without ecec nodes, belong to at most one round-set.

Lemma 3.3.

Let GG be a graph and IGI\subseteq G be a set of initial nodes. Then GG has an ec node if and only if GG has a node that is in two round-sets.

Proof    Suppose that GG has no ecec nodes. Assume, on the contrary, that GG has nodes that appear in two round-sets. Let RjR_{j} (j1)(j\geq 1) be the earliest round which contains a node gg such that g2Rjg^{2}\in R_{j} and hRj1h\in R_{j-1} be a neighbour of gg which sends to gg in round jj, so that h1Rj1h^{1}\in R_{j-1}. Then, hDih\in D_{i} for some i0i\geq 0 and h1Rih^{1}\in R_{i} by Lemma 3.2(i). Thus, i=j1i=j-1 and so g2Ri+1g^{2}\in R_{i+1}. As gg is a neighbour of hh, gDig\in D_{i}, Di+1D_{i+1}, or Di1D_{i-1}. If gDig\in D_{i} then gg and hh are ecec nodes contrary to our supposition that GG has no ecec nodes. If gDi+1g\in D_{i+1} then g1Ri+1g^{1}\in R_{i+1} by Lemma 3.2(i), which is contrary to the assertion that g2Rj=Ri+1g^{2}\in R_{j}=R_{i+1}. If gDi1g\in D_{i-1} then gRi1g\in R_{i-1}, by Lemma 3.2(i), and so g1Ri1g^{1}\in R_{i-1} as g2Ri+1g^{2}\in R_{i+1}. By Lemma 3.2(ii), gg sends to hh in round i=j1i=j-1. This is contrary to hh sending to gg in round jj. Thus, our assumption that GG has nodes that appear in two round-sets is false.

Conversely, suppose that GG has an ecec node gg, gDjg\in D_{j} (Rj\subseteq R_{j} by Lemma 3.2(i)) say where j1j\geq 1. Then g2Rj+1g^{2}\in R_{j+1} by Lemma 3.2(iii).   

In the case of a single initial node, bipartite graphs do not have any ecec nodes.

Lemma 3.4.

Let GG be a graph and suppose that II contains a single initial node g0g_{0} . Then, GG is bipartite iff it has no ecec nodes.

Proof    It is easy to see that nodes equidistant from the initial node g0g_{0} must belong to the same partite set. A graph is bipartite iff no edge connects two such nodes, and this is the case iff GG has no ecec nodes by Definition 3.1(ii).   

From Lemma 3.3 we see that nodes in graphs without ec nodes only receive a message once. For these graphs the time to termination is the number of rounds taken for the message to reach the most distant points from the set of initial nodes II. This is just the eccentricity of II, e(I)e(I).

Theorem 3.5.

Let GG be a graph and IGI\subseteq G be a set of initial nodes with eccentricity e(I)e(I). Then, flooding will have terminated after round e(I)e(I) if and only if GG is ec-bipartite

Proof   

G is ec-bipartiteiffG has no ec nodes(by Definition 3.1(iv))iffno node appears in 2 round-sets(by Lemma 3.3)iffdistant nodes get message lastiffRe(I) is the last non-empty round-set(by Lemma 3.2(i))\begin{array}[]{llll}\hbox{$G$ is ec-bipartite}&\hbox{iff}&\hbox{$G$ has no $ec$ nodes}&\hbox{(by Definition 3.1(iv))}\\ &\hbox{iff}&\hbox{no node appears in 2 round-sets}&\hbox{(by Lemma 3.3)}\\ &\hbox{iff}&\hbox{distant nodes get message last}&\\ &\hbox{iff}&\hbox{$R_{e(I)}$ is the last non-empty round-set}&\hbox{(by Lemma 3.2(i))}\\ \end{array}

 

Corollary 3.6.

Let GG be a graph and suppose that II contains a single initial node g0g_{0} of eccentricity ee. Then, flooding will have terminated after round ee if and only if GG is bipartite

Proof    Follows from Lemma 3.4, Theorem 3.5 and the fact that e=e(I)e=e(I).   

To find the time to termination in general graphs we need to find a bound on when nodes can belong to a round-set for the second time. As nodes can only belong to at most two round-sets, by Theorem 2.2, this will give a bound for termination of flooding in general graphs. The following lemma relates the round-sets of second occurrences of neighbouring nodes.

Lemma 3.7.

Let GG be a graph and IGI\subseteq G a set of initial nodes. If hGh\in G and h2Rjh^{2}\in R_{j} for some j1j\geq 1, and if gg is a neighbour of hh, then

g2Rj1𝑜𝑟g2Rj𝑜𝑟g2Rj+1g^{2}\in R_{j-1}\;\;{\it or}\;\;g^{2}\in R_{j}\;\;{\it or}\;\;g^{2}\in R_{j+1}

Proof    Let ii be the distance of hh from II, i.e. hDih\in D_{i}. Then, as h2Rjh^{2}\in R_{j}, j>ij>i by Lemma 3.2(i). As gg is a neighbour of hh, gDig\in D_{i} or gDi1g\in D_{i-1} or gDi+1g\in D_{i+1}.

Case gDig\in D_{i}.

As h,gDih,g\in D_{i} are neighbours they are both ecec nodes. Thus, by Lemma 3.2(iii), h2Ri+1h^{2}\in R_{i+1} and g2Ri+1g^{2}\in R_{i+1}. Therefore, j=i+1j=i+1 and g2Rjg^{2}\in R_{j}.

Case gDi1g\in D_{i-1}.

If gRjg\in R_{j} (Ri1asj>i\neq R_{i-1}\;\hbox{as}\;j>i) then, as g1Di1Ri1g^{1}\in D_{i-1}\subseteq R_{i-1} by Lemma 3.2(i), it must be the case that g2Rjg^{2}\in R_{j}. If gRjg\notin R_{j} and gRj1g\in R_{j-1} (Ri1asj>i\neq R_{i-1}\;\hbox{as}\;j>i) then, as g1Ri1g^{1}\in R_{i-1} by Lemma 3.2(i), it must be the case that g2Rj1g^{2}\in R_{j-1}. If gRjg\notin R_{j} and gRj1g\notin R_{j-1} then, as hRjh\in R_{j}, hh sends to gg in round j+1j+1 and so gRj+1g\in R_{j+1} (Ri1asj>i\neq R_{i-1}\;\hbox{as}\;j>i). As g1Ri1g^{1}\in R_{i-1}, it must be the case that g2Rj+1g^{2}\in R_{j+1}.

Case gDi+1g\in D_{i+1}, g does not send to h in round j.

In this case, as hRjh\in R_{j}, hh sends to gg in round j+1j+1. Thus, gRj+1g\in R_{j+1} (Ri+1asj>i\neq R_{i+1}\;\hbox{as}\;j>i) and therefore, as g1Di+1Ri+1g^{1}\in D_{i+1}\subseteq R_{i+1} by Lemma 3.2(i), it must be the case that g2Rj+1g^{2}\in R_{j+1}.

Case gDi+1g\in D_{i+1}, g sends to h in round j.

In this case gRj1g\in R_{j-1}. We show that g1Rj1g^{1}\notin R_{j-1}. Assume, on the contrary, that g1Rj1g^{1}\in R_{j-1}. Then, by Lemma 3.2(i), g1Di+1Ri+1g^{1}\in D_{i+1}\subseteq R_{i+1} and thus j1=i+1j-1=i+1. Hence, by Lemma 3.2(i), h1DiRi=Rj2h^{1}\in D_{i}\subseteq R_{i}=R_{j-2}. Also, gRj3g\notin R_{j-3} as g1Rj1g^{1}\in R_{j-1}. To summarize:

gRj3,h1Rj2,g1Rj1,h2Rjg\notin R_{j-3},\;\;h^{1}\in R_{j-2},\;\;g^{1}\in R_{j-1},\;\;h^{2}\in R_{j}

So, hh sends to gg in round j1j-1 and gg sends to hh in round jj by the case assumption. This is a contradiction. Thus, the assumption that g1Rj1g^{1}\in R_{j-1} is false and, as gRj1g\in R_{j-1}, it follows that g2Rj1g^{2}\in R_{j-1}. This completes the proof.   

Corollary 3.8.

Let GG be a graph and IGI\subseteq G be a set of initial nodes. Then GG has an ec node if and only if all nodes are in exactly two round-sets.

Proof    Follows from Lemmas 3.3 and 3.7.   

We can now give bounds for time to termination of flooding for graphs that have ec nodes.

Theorem 3.9.

Let GG be a graph that is not ec-bipartite with diameter dd. Then, flooding terminates after round jj where jj is in the range

e(I)<j𝑚𝑖𝑛{d(I,gec)+e(gec)+1:gecGis an ec point}.e(I)<j\leq{\it min}\{d(I,g_{ec})+e(g_{ec})+1\;:\;g_{ec}\in G\;\hbox{{\it is an ec point}}\}.

Proof    If GG is not ec-bipartite it has an ecec node gecg_{ec}, by Definition 3.1(iv). By Lemma 3.2(iii), gec2Rkg_{ec}^{2}\in R_{k} where k=d(I,gec)+1k=d(I,g_{ec})+1. Let hh be an arbitrary node in GG other than gecg_{ec}. Then, there is a path

h0=gech1hl=hh_{0}=g_{ec}\longrightarrow h_{1}\longrightarrow\ldots\longrightarrow h_{l}=h

where le(gec)l\leq e(g_{ec}). By repeated use of Lemma 3.7,

h12Rj1𝑤ℎ𝑒𝑟𝑒k1j1k+1,h22Rj2𝑤ℎ𝑒𝑟𝑒j11j2j1+1,hl2Rjl𝑤ℎ𝑒𝑟𝑒jl11jljl1+1.\begin{array}[]{llll}h_{1}^{2}\in R_{j_{1}}&{\it where}&k-1\leq j_{1}\leq k+1,&\\ h_{2}^{2}\in R_{j_{2}}&{\it where}&j_{1}-1\leq j_{2}\leq j_{1}+1,&\\ \ldots&&&\\ h_{l}^{2}\in R_{j_{l}}&{\it where}&j_{l-1}-1\leq j_{l}\leq j_{l-1}+1.&\\ \end{array}

Thus,

hl2Rjl𝑤ℎ𝑒𝑟𝑒kljlk+lh^{2}_{l}\in R_{j_{l}}\;\;\;{\it where}\;\;\;k-l\leq j_{l}\leq k+l (9)

Put j=jlj=j_{l}. From (9), as k=d(I,gec)+1k=d(I,g_{ec})+1 and as le(gec)l\leq e(g_{ec}),

hl2Rj𝑤ℎ𝑒𝑟𝑒jd(I,gec)+e(gec)+1h^{2}_{l}\in R_{j}\;\;\;{\it where}\;\;\;j\leq d(I,g_{ec})+e(g_{ec})+1

and, as gecg_{ec} is any ec node,

hl2Rj𝑤ℎ𝑒𝑟𝑒j𝑚𝑖𝑛{d(I,gec)+e(gec)+1}h^{2}_{l}\in R_{j}\;\;\;{\it where}\;\;\;j\leq{\it min}\{d(I,g_{ec})+e(g_{ec})+1\}

As GG is not ec-bipartite, j>e(I)j>e(I) by Theorem 3.5 and the proof is complete.   

Corollary 3.10.

Let GG be a graph and IGI\subseteq G be a set of initial nodes which contain an ec node. Then, flooding terminates after round jj where jj is in the range

e(I)<j𝑚𝑖𝑛{e(gec)+1:gecGis an ec point}.e(I)<j\leq{\it min}\{e(g_{ec})+1\;:\;g_{ec}\in G\;\hbox{{\it is an ec point}}\}.

Proof    Follows from Theorem 3.9 as d(I,gec)=0d(I,g_{ec})=0 for any ec node in II.   

Corollary 3.11.

Let GG be a non-bipartite graph with diameter dd and a single initial node g0Gg_{0}\in G of eccentricity ee. Then, flooding terminates after round jj where jj is in the range e<je+d+1e<j\leq e+d+1.

Proof    Put I={g0}I=\{g_{0}\} so that e(I)=ee(I)=e. Then, by Theorem 3.9, flooding terminates after jj rounds where jj is in the range

e<j𝑚𝑖𝑛{d(g0,gec)+e(gec)+1:gecGis an ec point}e+d+1.e<j\leq{\it min}\{d(g_{0},g_{ec})+e(g_{ec})+1:g_{ec}\in G\;\hbox{{\it is an ec point}}\}\leq e+d+1.

 

Figure 2 shows that the bounds are sharp. Sharpness of the upper bound is shown by the graph on the left in which flooding terminates after e+d+1=7e+d+1=7 rounds. The slightly complicated graph on the right terminates after e+1=5e+1=5 rounds, demonstrating sharpness of the lower bound and also showing that flooding can terminate in a non-bipartite graph before round dd where dd is the diameter. In both graphs g0g_{0} is the initial node.

Refer to caption
Figure 2: Sharpness of bounds

The clear separation in the termination times of bipartite and non-bipartite graphs, in the case of a single initial node, does not carry over neatly to the general case of multiple initial nodes. For the general case, it is the presence or otherwise of ec nodes that is the distinguishing property and we have defined ec-bipartite graphs for this purpose. Unlike the single node case, having ec nodes or not in the multiple initial node case cuts across the bipartite/non-bipartite boundary, i.e. bipartite graphs may have ec points and non-bipartite graphs may not. The recent work by Turau [40] looks at termination times in terms of the ‘k-flooding problem’ which aims to find a set S of size k such that amnesiac flooding when started concurrently by all nodes of S terminates in the least number of rounds.

4 Dynamic flooding

So far, we have considered flooding of a single message which initiates at a single point in time in round 0, albeit possibly from several nodes. In this section we show that amnesiac flooding will still terminate in dynamic settings where multiple floodings are initiated from multiple nodes in multiple rounds with multiple messages, even when floodings from previous initiations have not completed. We consider floodings in which nodes receiving messages in a given round only send a single message per edge in the next round. The case of ‘parallel flooding’, where multiple floodings operate independently of each other resulting in nodes possibly sending multiple messages along an edge in a round, terminates trivially given the results in sections 2 and 3.

There are two general cases in which messages M0,,Mh,M_{0},\ldots,M_{h},\ldots are being flooded by nodes xi00,,xihh,x_{i_{0}}^{0},\ldots,x_{i_{h}}^{h},\ldots with initial rounds i0,,ih,i_{0},\ldots,i_{h},\ldots respectively, such that at most one message per edge per round is sent. In the first case, a node that receives messages in a round sends one of the received messages MhM_{h} to all neighbours from which it did not receive any message. In the second case, the node sends MhM_{h} to all neighbours from which it did not receive MhM_{h}. We call these two cases ‘partial-send’ and ‘full-send’ respectively. We subdivide the second case into the subcase ‘ranked full-send’ where the messages M0,,Mh,M_{0},\ldots,M_{h},\ldots are ranked and the highest ranked received message MhM_{h} is sent on, and the subcase ‘unranked full-send’ where a random message is sent on.

Definition 4.1.

Amnesiac flooding algorithms for dynamic flooding. Let GG be a graph, xi00,,xihh,Gx_{i_{0}}^{0},\ldots,x_{i_{h}}^{h},\ldots\in G be possibly different initiating nodes flooding possibly different messages M0,,Mh,M_{0},\ldots,M_{h},\ldots with possibly different initial rounds i0,,ih,i_{0},\ldots,i_{h},\ldots respectively, where the subscript hh distinguishes the floodings (i.e hh(xihh,ih)(xihh,ih)h\neq h^{\prime}\Rightarrow(x^{h}_{i_{h}},i_{h})\neq(x^{h^{\prime}}_{i_{h^{\prime}}},i_{h^{\prime}})). We assume a node xihx_{i_{h}} does not initiate flooding (initiation means xihx_{i_{h}} sends a message to all of its neighbours in the next round) of a message in a round in which it receives a message. Consider the properties below for an algorithm for flooding multiple messages, where N(g)N(g) denotes the set of all neighbours of a node gGg\in G and Ng,i,hN(g)N_{g,i,h}\subseteq N(g) the subset of neighbours of gg from which gg receives message MhM_{h} in round ii.

  • (i)

    For all h0h\geq 0, xihhx_{i_{h}}^{h} sends message MhM_{h} to all of its neighbours in round ih+1i_{h}+1.

  • (ii)

    Suppose a node gGg\in G receives messages from neighbours in round i>0i>0. Let h0h^{\prime}\geq 0 be such that Ng,i,hN_{g,i,h^{\prime}}\neq\emptyset. Then, in round i+1i+1, gg sends MhM_{h^{\prime}} to all neighbours in N(g)h0Ng,i,hN(g)\setminus\bigcup_{h\geq 0}N_{g,i,h} and sends no other message.

  • (iii)

    Suppose a node gGg\in G receives messages from neighbours in round i>0i>0 and that the rankrank of each message MhM_{h} is the subscript hh. Let hh^{\prime} be the largest h0h^{\prime}\geq 0 such that Ng,i,hN_{g,i,h^{\prime}}\neq\emptyset. Then, in round i+1i+1, gg sends MhM_{h^{\prime}} to all neighbours in N(g)Ng,i,hN(g)\setminus N_{g,i,h^{\prime}} and sends no other message.

  • (iv)

    Suppose a node gGg\in G receives messages from neighbours in round i>0i>0. Let h0h^{\prime}\geq 0 be such that Ng,i,hN_{g,i,h^{\prime}}\neq\emptyset. Then, in round i+1i+1, gg sends MhM_{h^{\prime}} to all neighbours in N(g)Ng,i,hN(g)\setminus N_{g,i,h^{\prime}} and sends no other message.

The flooding algorithm defined by (i) and (ii) is called partial-send, that defined by (i) and (iii) is called ranked full-send and that defined by (i) and (iv) is called unranked full-send.

In 4.1 and 4.2 below we show that, in the cases of partial-send and ranked full-send flooding of multiple messages, no node receives a given message more than twice, and so flooding terminates when the number of messages is finite. As a further extension to the basic flooding model of sections 2 and 3, both of these results hold in a dynamic setting where the graph GG may lose edges or nodes over time. In section 5.3, the general case of unranked full-send flooding of multiple messages is shown not to terminate even if the number of messages is finite.

4.1 Multiple messages - partial-send flooding

It may seem that flooding initiated by a node gg in round i>0i>0 can be simulated as a round 0 flooding by adding an extra path of length ii to GG so that the message arrives at gg in round ii - in this way reducing the problem to the simple case of only round 0 floodings of sections 2 and 3. However, flooding initiations in later rounds can easily produce the same node in evenly spaced round-sets which cannot be simulated by any graph floodings from round 0 only, by the proof of Theorem 2.2. So, the suggested simulation by a larger graph is not possible in general and an alternative proof is needed.

In the remainder of the paper, for nodes x,yGx,y\in G and h0h\geq 0, xyx\rightarrow y will mean ‘xx sends some message to yy’, i.e. yy receives some message from xx, and xMhyx\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}y will mean ‘xx sends message MhM_{h} to yy’, i.e. yy receives message MhM_{h} from xx. We shall also use ↛\not\rightarrow to mean ‘does not send’ in a similar way.

Definition 4.2.

Let (G,E)(G,E) be a graph with nodes GG and edges EE. An even flooding cycle cc, abbreviated ef cycle, is a mapping c:C2nGc:C_{2n}\rightarrow G for some n2n\geq 2 where C2n={0,1,,2n1}C_{2n}=\{0,1,\ldots,2n-1\}, such that {c(i),c(i+1)}E\{c(i),c(i+1)\}\in E for all iC2ni\in C_{2n}. Arithmetic on elements of C2nC_{2n} is modulo 2n2n. Whilst C2nC_{2n} is a cycle, its image c(C2n)c(C_{2n}) is a closed walk but not necessarily a cycle in GG - see the example in figure 3. A message c(i)c(i+1)c(i)\rightarrow c(i+1), where iC2ni\in C_{2n}, in round j0j\geq 0 is a clockwise message along cc and a message c(i)c(i1)c(i)\rightarrow c(i-1), where iC2ni\in C_{2n}, is an anticlockwise message.

Refer to caption
Figure 3: Even flooding cycle example n=6n=6

In any given round, there will be a number of messages sent clockwise along cc and a number of messages anticlockwise. Our interest is in the number of messages sent in each direction from evenly spaced points of cc. (We will refer to iC2ni\in C_{2n} and c(i)Gc(i)\in G, loosely, as ‘points’ of cc.)

Lemma 4.3.

Let GG be a graph, flooding be partial-send as in Definition 4.1 and let cc be an ef cycle. For all j0j\geq 0 let

cls(even,j)={i:c(i)c(i+1)inroundj,ieven,iC2n},cl^{s}(even,j)=\{i\;:\;c(i)\rightarrow c(i+1)\;in\;round\;j,\;i\;even,\;i\in C_{2n}\},
ans(even,j)={i:c(i)c(i1)inroundj,ieven,iC2n},an^{s}(even,j)=\{i\;:\;c(i)\rightarrow c(i-1)\;in\;round\;j,\;i\;even,\;i\in C_{2n}\},
cls(odd,j)={i:c(i)c(i+1)inroundj,iodd,iC2n},cl^{s}(odd,j)=\{i\;:\;c(i)\rightarrow c(i+1)\;in\;round\;j,\;i\;odd,\;i\in C_{2n}\},
ans(odd,j)={i:c(i)c(i1)inroundj,iodd,iC2n}.an^{s}(odd,j)=\{i\;:\;c(i)\rightarrow c(i-1)\;in\;round\;j,\;i\;odd,\;i\in C_{2n}\}.

Then, for all j0j\geq 0,

|cls(even,j)|=|ans(even,j)|and|cls(odd,j)|=|ans(odd,j)|.|cl^{s}(even,j)|=|an^{s}(even,j)|\;\;and\;\;|cl^{s}(odd,j)|=|an^{s}(odd,j)|. (10)

Proof    By induction on jj. In round j=0j=0, every initial node is yet to send a message and thus there are neither clockwise nor anticlockwise messages and so (10) holds trivially. Assume that (10) holds for some j0j\geq 0. It is convenient to define the corresponding sets of points of CnC_{n} receiving messages for all j0j\geq 0:

clr(odd,j)={i+1:c(i)c(i+1)inroundj,ieven,iC2n},cl^{r}(odd,j)=\{i+1\;:\;c(i)\rightarrow c(i+1)\;in\;round\;j,\;i\;even,\;i\in C_{2n}\},
anr(odd,j)={i1:c(i)c(i1)inroundj,ieven,iC2n},an^{r}(odd,j)=\{i-1\;:\;c(i)\rightarrow c(i-1)\;in\;round\;j,\;i\;even,\;i\in C_{2n}\},
clr(even,j)={i+1:c(i)c(i+1)inroundj,iodd,iC2n},cl^{r}(even,j)=\{i+1\;:\;c(i)\rightarrow c(i+1)\;in\;round\;j,\;i\;odd,\;i\in C_{2n}\},
anr(even,j)={i1:c(i)c(i1)inroundj,iodd,iC2n}.an^{r}(even,j)=\{i-1\;:\;c(i)\rightarrow c(i-1)\;in\;round\;j,\;i\;odd,\;i\in C_{2n}\}.

Clearly,

|cls(even,j)|=|clr(odd,j)|,|ans(even,j)|=|anr(odd,j)|,|cl^{s}(even,j)|=|cl^{r}(odd,j)|,\;|an^{s}(even,j)|=|an^{r}(odd,j)|,
|cls(odd,j)|=|clr(even,j)|and|ans(odd,j)=|anr(even,j)|.|cl^{s}(odd,j)|=|cl^{r}(even,j)|\;and\;|an^{s}(odd,j)=|an^{r}(even,j)|. (11)

We show that |cls(even,j+1)|=|ans(even,j+1)||cl^{s}(even,j+1)|=|an^{s}(even,j+1)|. A clockwise message c(i)c(i+1)c(i)\rightarrow c(i+1), where ii is even, is sent in round j+1j+1 in the following cases:

  • (a)

    c(i1)c(i)c(i-1)\rightarrow c(i) and c(i+1)↛c(i)c(i+1)\not\rightarrow c(i) in round jj,

  • (b)

    c(i1)↛c(i)c(i-1)\not\rightarrow c(i) and c(i+1)↛c(i)c(i+1)\not\rightarrow c(i) in round jj, but c(i)c(i) was an initial node about to send to all neighbours or c(i)c(i) received a message from an external neighbour, i.e. other than c(i1)c(i-1) or c(i+1)c(i+1), in round jj.

The set of messages sent clockwise from c(i)c(i), for even ii, in round j+1j+1 as per case (a) is clr(even,j)anr(even,j)cl^{r}(even,j)\setminus an^{r}(even,j). We denote the set of even ii such that c(i)c(i) sends a clockwise, equivalently anticlockwise, message in round j+1j+1 as per case (b), by ext(even,j)ext(even,j). Thus,

cls(even,j+1)=(clr(even,j)anr(even,j))ext(even,j)cl^{s}(even,j+1)=(cl^{r}(even,j)\setminus an^{r}(even,j))\cup ext(even,j)

Similarly,

ans(even,j+1)=(anr(even,j)clr(even,j))ext(even,j)an^{s}(even,j+1)=(an^{r}(even,j)\setminus cl^{r}(even,j))\cup ext(even,j)

Thus,

|cls(even,j+1)||ans(even,j+1)|=|clr(even,j)anr(even,j)||anr(even,j)clr(even,j)||cl^{s}(even,j+1)|-|an^{s}(even,j+1)|=|cl^{r}(even,j)\setminus an^{r}(even,j)|-|an^{r}(even,j)\setminus cl^{r}(even,j)|
=|cls(odd,j)ans(odd,j)||ans(odd,j)cls(odd,j)|(by (11))=\;|cl^{s}(odd,j)\setminus an^{s}(odd,j)|-|an^{s}(odd,j)\setminus cl^{s}(odd,j)|\;\;\hbox{(by (11))}\;
=|cls(odd,j)||ans(odd,j)|=0(by induction).=\;|cl^{s}(odd,j)|-|an^{s}(odd,j)|=0\;\;\hbox{(by induction)}.

A similar inductive argument shows that |cls(odd,j+1)|=|ans(odd,j+1)||cl^{s}(odd,j+1)|=|an^{s}(odd,j+1)|.   

Theorem 4.4.

Let GG be a graph and flooding be partial-send. Suppose that initial node xihhx^{h}_{i_{h}} floods message MhM_{h} in round ihi_{h}. Then, if

xihhMhxih+1hMhMhxih+khx^{h}_{i_{h}}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+1}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}\ldots\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+k} (12)

is a succession of sent MhM_{h} messages, no node gGg\in G can occur more than twice in (12). Thus, no flooded message is received more than twice by a node in partial-send flooding which therefore terminates if the number of floodings of messages is finite.

Proof    Assume, on the contrary, that there is a sequence of sends (12) in which some node gGg\in G occurs at least three times. Such a sequence of sends does not occur when the flooding of MhM_{h} in round ihi_{h} is the only flooding in GG as then, by Theorem 2.2, a message cannot be received more than twice by a node. If only MhM_{h} is flooded, there is nn with 2n<k2\leq n<k such that

xihhMhxih+1hMhMhxih+nh↛Mhxih+n+1h,x^{h}_{i_{h}}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+1}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}\ldots\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+n}\stackrel{{\scriptstyle M_{h}}}{{\not\rightarrow}}x^{h}_{i_{h}+n+1}, (13)

i.e. the succession of sends in (12) cannot proceed beyond nn rounds, and therefore a sequence of sends via some nodes yih+1,,yih+n2Gy_{i_{h}+1},\ldots,y_{i_{h}+n-2}\in G

xihhMhyih+1MhMhyih+n2Mhxih+n+1hMhxih+nhx^{h}_{i_{h}}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}y_{i_{h}+1}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}\ldots\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}y_{i_{h}+n-2}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+n+1}\stackrel{{\scriptstyle M_{h}}}{{\rightarrow}}x^{h}_{i_{h}+n} (14)

preventing xih+nhx^{h}_{i_{h}+n} sending to xih+n+1hx^{h}_{i_{h}+n+1} in (13). Define an ef cycle c:C2nGc:C_{2n}\rightarrow G by:

c(i)=xih+ih(0in),c(n+1)=xih+n+1h,c(2nl)=yih+l(1ln2)c(i)=x^{h}_{i_{h}+i}\;(0\leq i\leq n),\;\;c(n+1)=x^{h}_{i_{h}+n+1},\;\;c(2n-l)=y_{i_{h}+l}\;(1\leq l\leq n-2) (15)

We now consider the messages sent clockwise and anticlockwise along edges of cc after round ihi_{h} as per the partial-send flooding of all messages in the statement of this theorem. The following notation for subsets of C2nC_{2n} will be used where 1j<j2n11\leq j<j^{\prime}\leq 2n-1:

[j,j]={iC2n:jij},(j,j)={iC2n:j<i<j},[j,j^{\prime}]=\{i\in C_{2n}:j\leq i\leq j^{\prime}\},\;\;(j,j^{\prime})=\{i\in C_{2n}:j<i<j^{\prime}\},
[j,j)={iC2n:ji<j},(j,j]={iC2n:j<ij},[0,2n]=C2n.[j,j^{\prime})=\{i\in C_{2n}:j\leq i<j^{\prime}\},\;\;(j,j^{\prime}]=\{i\in C_{2n}:j<i\leq j^{\prime}\},\;\;[0,2n]=C_{2n}.
Refer to caption
Figure 4: Proof of Theorem 4.4

We shall prove that for all jj with 0jn10\leq j\leq n-1, the number of messages sent clockwise in round ih+j+1i_{h}+j+1 along cc above the jj line in the left-hand illustration in figure 4, from points of cc of equal parity to jj, is less than or equal to the number of messages sent anticlockwise above the jj line, from points of equal parity to jj. Precisely, if

cls(j)={i:c(i)c(i+1)inroundih+j+1,(ij)even,i,i+1[j,2nj]},cl^{s}(j)=\{i\;:\;c(i)\rightarrow c(i+1)\;in\;round\;i_{h}+j+1,\;\;(i-j)\;even,\;\;i,i+1\in[j,2n-j]\},
clr(j)={i+1:c(i)c(i+1)inroundih+j+1,(ij)even,i,i+1[j,2nj]},cl^{r}(j)=\{i+1\;:\;c(i)\rightarrow c(i+1)\;in\;round\;i_{h}+j+1,\;\;(i-j)\;even,\;\;i,i+1\in[j,2n-j]\},
ans(j)={i:c(i)c(i1)inroundih+j+1,(ij)even,i,i1[j,2nj]},an^{s}(j)=\{i\;:\;c(i)\rightarrow c(i-1)\;in\;round\;i_{h}+j+1,\;\;(i-j)\;even,\;\;i,i-1\in[j,2n-j]\},
anr(j)={i1:c(i)c(i1)inroundih+j+1,(ij)even,i,i1[j,2nj]},an^{r}(j)=\{i-1\;:\;c(i)\rightarrow c(i-1)\;in\;round\;i_{h}+j+1,\;\;(i-j)\;even,\;\;i,i-1\in[j,2n-j]\},

then

|cls(j)|(=|clr(j)|)|ans(j)|(=|anr(j)|)(0jn1).|cl^{s}(j)|(=|cl^{r}(j)|)\;\leq\;|an^{s}(j)|(=|an^{r}(j)|)\;\;\;(0\leq j\leq n-1). (16)

The proof is by induction. For j=0j=0, by Lemma 4.3,

|cls(j)(=cls(even,ih))|=|ans(j)(=ans(even,ih))|.|cl^{s}(j)(=cl^{s}(even,i_{h}))|=|an^{s}(j)(=an^{s}(even,i_{h}))|.

Assume that (16) holds for some jj with 0jn20\leq j\leq n-2. We show that (16) continues to hold for j+1j+1. For 0jn10\leq j\leq n-1, define the set of points of cc above the jj line that are either initial nodes in round ih+ji_{h}+j or receive messages from neighbours external to cc:

ext(j)={i:c(i)c(i1),c(i)c(i+1)inroundih+j+1,(ij)even,i[j,2nj]}.ext(j)=\{i\;:\;c(i)\rightarrow c(i-1),c(i)\rightarrow c(i+1)\;in\;round\;i_{h}+j+1,\;\;(i-j)\;even,\;\;i\in[j,2n-j]\}.

A clockwise message c(i)c(i+1)c(i)\rightarrow c(i+1) is sent in round ih+j+2i_{h}+j+2 with points i,i+1[j+1,2n(j+1)]i,i+1\in[j+1,2n-(j+1)], i.e. i[j+1,2n(j+1))i\in[j+1,2n-(j+1)), with ii of equal parity to j+1j+1, in the following cases:

  • (a)

    c(i1)c(i)c(i-1)\rightarrow c(i) and c(i+1)↛c(i)c(i+1)\not\rightarrow c(i) in round ih+j+1i_{h}+j+1. This corresponds to ii being in the set (clr(j)anr(j))[j+1,2n(j+1))(cl^{r}(j)\setminus an^{r}(j))\cap[j+1,2n-(j+1)).

  • (b)

    c(i)c(i) is an initial node or received a message externally in round ih+j+1i_{h}+j+1. This means iext(j+1)[j+1,2n(j+1))i\in ext(j+1)\cap[j+1,2n-(j+1)). Note that, from (12) and (15), as jn2<kj\leq n-2<k, c(j)=xih+jhxih+j+1h=c(j+1)c(j)=x^{h}_{i_{h}+j}\rightarrow x^{h}_{i_{h}+j+1}=c(j+1) in round ih+j+1i_{h}+j+1. Thus, c(j+1)↛c(j)c(j+1)\not\rightarrow c(j) in round ih+j+2i_{h}+j+2 and so j+1ext(j+1)j+1\notin ext(j+1). Hence, iext(j+1)(j+1,2n(j+1))i\in ext(j+1)\cap(j+1,2n-(j+1)).

From (a) and (b),

cls(j+1)=(clr(j)anr(j))[j+1,2n(j+1))ext(j+1)(j+1,2n(j+1)).cl^{s}(j+1)=(cl^{r}(j)\setminus an^{r}(j))\cap[j+1,2n-(j+1))\cup ext(j+1)\cap(j+1,2n-(j+1)). (17)

An anticlockwise message c(i)c(i1)c(i)\rightarrow c(i-1) is sent in round ih+j+2i_{h}+j+2 with points i,i1[j+1,2n(j+1)]i,i-1\in[j+1,2n-(j+1)], i.e. i(j+1,2n(j+1)]i\in(j+1,2n-(j+1)], with ii of equal parity to j+1j+1, in the following cases:

  • (a’)

    c(i+1)c(i)c(i+1)\rightarrow c(i) and c(i1)↛c(i)c(i-1)\not\rightarrow c(i) in round ih+j+1i_{h}+j+1. This corresponds to ii being in the set (anr(j)clr(j))(j+1,2n(j+1)](an^{r}(j)\setminus cl^{r}(j))\cap(j+1,2n-(j+1)]. Note that, from (12) and (15), as jn2<kj\leq n-2<k, c(j+1)=xih+j+1hxih+j+2h=c(j+2)c(j+1)=x^{h}_{i_{h}+j+1}\rightarrow x^{h}_{i_{h}+j+2}=c(j+2) in round ih+j+2i_{h}+j+2. Thus, c(j+2)↛c(j+1)c(j+2)\not\rightarrow c(j+1) in round ih+j+1i_{h}+j+1 and so j+1anr(j)j+1\notin an^{r}(j). Hence, i(anr(j)clr(j))(j+1,2n(j+1)]=(anr(j)clr(j))[j+1,2n(j+1)]i\in(an^{r}(j)\setminus cl^{r}(j))\cap(j+1,2n-(j+1)]=(an^{r}(j)\setminus cl^{r}(j))\cap[j+1,2n-(j+1)].

  • (b’)

    c(i)c(i) is an initial node or received a message externally in round ih+j+1i_{h}+j+1. This means iext(j+1)(j+1,2n(j+1)]i\in ext(j+1)\cap(j+1,2n-(j+1)].

From (a’) and (b’),

ans(j+1)=(anr(j)clr(j))[j+1,2n(j+1)]ext(j+1)(j+1,2n(j+1)].an^{s}(j+1)=(an^{r}(j)\setminus cl^{r}(j))\cap[j+1,2n-(j+1)]\cup ext(j+1)\cap(j+1,2n-(j+1)]. (18)

Now, ext(j+1)clr(j)=ext(j+1)\cap cl^{r}(j)=\emptyset and ext(j+1)anr(j)=ext(j+1)\cap an^{r}(j)=\emptyset as points in ext(j+1)ext(j+1) send messages in both clockwise and anticlockwise directions along cc in round ih+j+2i_{h}+j+2 and therefore cannot have received messages from either direction in round ih+j+1i_{h}+j+1 and so cannot belong to either clr(j)cl^{r}(j) or anr(j)an^{r}(j). Therefore, from (17) and (18), to prove the inductive step |cls(j+1)||ans(j+1)||cl^{s}(j+1)|\leq|an^{s}(j+1)|, it suffices to prove that

|(clr(j)anr(j))[j+1,2n(j+1))||(anr(j)clr(j))[j+1,2n(j+1)]||(cl^{r}(j)\setminus an^{r}(j))\cap[j+1,2n-(j+1))|\leq|(an^{r}(j)\setminus cl^{r}(j))\cap[j+1,2n-(j+1)]| (19)

By definition, clr(j),anr(j)[j,2nj]cl^{r}(j),an^{r}(j)\subseteq[j,2n-j] are points of cc of opposite parity to jj. Thus, clr(j),anr(j)[j+1,2n(j+1)]cl^{r}(j),an^{r}(j)\subseteq[j+1,2n-(j+1)], (clr(j)anr(j))[j+1,2n(j+1))=(clr(j){2n(j+1)})anr(j)(cl^{r}(j)\setminus an^{r}(j))\cap[j+1,2n-(j+1))=(cl^{r}(j)\setminus\{2n-(j+1)\})\setminus an^{r}(j) and (anr(j)clr(j))[j+1,2n(j+1)]=anr(j)clr(j)(an^{r}(j)\setminus cl^{r}(j))\cap[j+1,2n-(j+1)]=an^{r}(j)\setminus cl^{r}(j), and so (19) follows as |clr(j)||anr(j)||cl^{r}(j)|\leq|an^{r}(j)| by induction. Thus, (16) holds for all jj with 0jn10\leq j\leq n-1.

Put j=n1j=n-1 in (16). Then, cls(n1)[n1,n+1]cl^{s}(n-1)\subseteq[n-1,n+1], c(n1)=xih+(n1)hxih+nh=c(n)c(n-1)=x^{h}_{i_{h}+(n-1)}\rightarrow x^{h}_{i_{h}+n}=c(n) in round ih+ni_{h}+n by (15) and (12), and so cls(n1)=n1cl^{s}(n-1)=n-1. As |cls(n1)||ans(n1)||cl^{s}(n-1)|\leq|an^{s}(n-1)|, ans(n1)=n+1an^{s}(n-1)=n+1. Thus, c(n+1)c(n)c(n+1)\rightarrow c(n), i.e. (by (15)) xih+n+1hxih+nhx^{h}_{i_{h}+n+1}\rightarrow x^{h}_{i_{h}+n} in round ih+ni_{h}+n. (See the right-hand illustration in figure 4.) This contradicts (12) in which xih+nhxih+n+1hx^{h}_{i_{h}+n}\rightarrow x^{h}_{i_{h}+n+1} in round ih+n+1i_{h}+n+1. Thus, the assumption that (12) contains some node more than twice is incorrect.   

An example of multiple messages being flooded by a partial-send algorithm is the flooding of the details and price of an item that a node purchases. For example, a node receiving the details and prices of purchases of the item from its neighbour nodes might select the cheapest and pass on the information of the cheapest available item to neighbours from which it did not receive messages about the item in the previous round. There would be no reason to send a message to a neighbour from which details of a more expensive item had been received in the previous round as that neighbour would already have made the purchase - hence a partial-send flooding algorithm would be used.

The special case of Theorem 4.4, where the same message is flooded by all initial nodes, generalizes multi-source flooding of sections 2 and 3 to the case where sources may initiate floodings in different rounds.

Corollary 4.5.

Flooding of a single message from multiple sources initiating in possibly different rounds always terminates.

Corollary 4.5 alongside the duality with ‘reverse’ flooding can be used to show termination of algorithms such as leader election [30] which may have deviations from the strict flooding algorithm. For example, a ‘sink’ node, which receives messages from all neighbours in a certain round ii, reverse floods a message to all neighbours in round i+1i+1 as part of the algorithm. This might occur when (forward) flooding has not completed in other parts of the graph. It is not clear that this abnormal behaviour at such a sink node is not out of step and cannot combine with other uncompleted flooding to cause non-termination. (Note that the node cannot be considered an initial node in round i+1i+1 as it received messages in round ii.)

Corollary 4.6.

Let (G,E)(G,E) be a graph which is flooded with a single message from round 1 as in Definition 1.1. Suppose that node gGg\in G is a sink node in round ii, i.e. ggg^{\prime}\rightarrow g for all neighbours gg^{\prime} of gg. Further, suppose that flooding proceeds according to the algorithm in Definition 1.1 except that in round i+1i+1 gg sends to all of its neighbours. Then, the resulting flooding process terminates.

Proof    The state of flooding SiS_{i} in any round i1i\geq 1 which determines the subsequent states of flooding is defined by a relation making GG into a bidirected graph [11] where edges may be undirected, directed one way or directed both ways as in our illustrations of rounds in figures:

SiG×G,Si={(g1,g2):{g1,g2}E,g1g2inroundi}S_{i}\subseteq G\times G,\;\;S_{i}=\{(g_{1},g_{2})\;:\;\{g_{1},g_{2}\}\in E,g_{1}\rightarrow g_{2}\;in\;round\;i\}

Let the normal flooding process, where gg adheres strictly to the flooding algorithm in round i+1i+1, terminate after round τ\tau and let the sequence of states from round 1 be:

S1,,Si,Si+1,,Sτ.S_{1},\ldots,S_{i},S_{i+1},\ldots,S_{\tau}. (20)

We need to show that flooding terminates from the state Si+1+S_{i+1}^{+} given by:

Si+1+=Si+1{(g,g):gNg}S_{i+1}^{+}=S_{i+1}\cup\{(g,g^{\prime})\;:\;g\in N_{g}\} (21)

Consider the reverse flooding of (20), in which received messages g1g2g_{1}\rightarrow g_{2} become sent messages g2g1g_{2}\rightarrow g_{1} and sink nodes become initial nodes, i.e. given by the sequence of states:

inv(Sτ),,inv(Si+1),inv(Si),,inv(S1)inv(S_{\tau}),\ldots,inv(S_{i+1}),inv(S_{i}),\ldots,inv(S_{1}) (22)

where, for any state SS, inv(S)inv(S) is the inverse relation {(g2,g1):(g1,g2)S}\{(g_{2},g_{1}):(g_{1},g_{2})\in S\}. The node gg is an initial node in inv(Si)inv(S_{i}) as gg is a sink node in state SiS_{i} in forward flooding. Let

inv(Si)=inv(Si){(g,g):gNg}inv(S_{i})^{-}=inv(S_{i})\setminus\{(g,g^{\prime})\;:\;g^{\prime}\in N_{g}\} (23)

The following

inv(Sτ),,inv(Si+1),inv(Si)inv(S_{\tau}),\ldots,inv(S_{i+1}),inv(S_{i})^{-}

are successive states of flooding as in (22) except that gg is not an initial node in inv(Si)inv(S_{i})^{-}. By Corollary 4.5, this flooding terminates say after additional succeeding states S1,,SτS_{1}^{\prime},\ldots,S_{\tau}^{\prime}:

inv(Sτ),,inv(Si+1),inv(Si),S1,,Sτinv(S_{\tau}),\ldots,inv(S_{i+1}),inv(S_{i})^{-},S_{1}^{\prime},\ldots,S_{\tau^{\prime}}^{\prime}

By duality, the sequence

inv(Sτ),,inv(S1),inv(inv(Si)),Si+1,,Sτinv(S_{\tau^{\prime}}^{\prime}),\ldots,inv(S_{1}^{\prime}),inv(inv(S_{i})^{-}),S_{i+1},\ldots,S_{\tau} (24)

terminates at SτS_{\tau}. Now, by (23), {(g,g):gNg}inv(inv(Si))=\{(g^{\prime},g):g^{\prime}\in N_{g}\}\cap inv(inv(S_{i})^{-})=\emptyset and so gg does not receive any messages in state inv(inv(Si))inv(inv(S_{i})^{-}). Thus, by Corollary 4.5, the flooding sequence of states obtained from (24), where gg is an initial node in state Si+1+S_{i+1}^{+} as in (21),

inv(Sτ),,inv(S1),inv(inv(Si)),Si+1+,inv(S_{\tau^{\prime}}^{\prime}),\ldots,inv(S_{1}^{\prime}),inv(inv(S_{i})^{-}),S_{i+1}^{+},

will terminate from the state Si+1+S_{i+1}^{+} (after some additional succeeding states).   

4.2 Multiple messages - ranked full-send flooding

Here, messages M0,,Mh,M_{0},\ldots,M_{h},\ldots are flooded as per Definition 4.1 conditions (i) and (iii). The rank of message MhM_{h} is the integer hh. Messages are ranked according to the round they were flooded, and messages flooded in the same round by different nodes also have different ranks, i.e.

h1h2ih1ih2(h1,h20)h_{1}\leq h_{2}\Rightarrow i_{h_{1}}\leq i_{h_{2}}\;\;\;(h_{1},h_{2}\geq 0) (25)

Note that, unlike in partial-send flooding, a node gg may send a message to a node from which it has just received a message. However, the message sent will be different (of higher rank) to the one received (see figure 5).

Refer to caption
Figure 5: Ranked full-send flooding

We will prove that a message cannot be received by a node more than twice in ranked full-send flooding by defining round-sets with respect to the different messages.

Definition 4.7.

Let GG be a graph flooded by ranked full-send flooding with initiating nodes and corresponding rounds denoted as in Definition 4.1. For each of these messages MhM_{h}, the round-sets RihMh,Rih+1Mh,R_{i_{h}}^{M_{h}},R_{i_{h}+1}^{M_{h}},\ldots of MhM_{h} are defined as:

RihMhis the set of initial nodes xihsuchthatih=ihandhh,Rih+jMhis the set of initial nodes or that receive message Mh, where hh, in round ih+j(j>0).\begin{array}[]{ll}R_{i_{h}}^{M_{h}}&\hbox{\it is the set of initial nodes }x_{i_{h^{\prime}}}\;such\;that\;i_{h^{\prime}}=i_{h}\;and\;h^{\prime}\geq h,\\ R_{i_{h}+j}^{M_{h}}&\hbox{\it is the set of initial nodes or that receive message $M_{h^{\prime}}$, where $h^{\prime}\geq h$, in round $i_{h}+j$}\;(j>0).\\ \end{array}

So, round-sets are defined for each message MhM_{h} after it is flooded. They comprise nodes that receive the message or a higher ranked message.

Theorem 4.8.

Given any flooded message MhM_{h} where h0h\geq 0, any node gGg\in G receives MhM_{h} at most twice. Thus, ranked full-send flooding terminates if the number of messages flooded is finite.

Proof    Assume that a node gg receives a message MhM_{h} more than twice. If gg receives MhM_{h} three or more times, then there are evenly spaced rounds ss and s+ds+d, where dd is even, in which gg receives MhM_{h}. By Definition 4.7, gg is in the corresponding round-sets of MhM_{h} for those rounds. So, if e{\mathcal{R}^{e}} is the set of finite sequences of consecutive round-sets satisfying:

R¯=RsMh,,Rs+dMh where sih,d>0,deven\underline{R}=R_{s}^{M_{h}},\ldots,R_{s+d}^{M_{h}}\;\;\;\hbox{ {\it where} $s\geq i_{h},\;d>0$},\;d\;even (26)

and

there exists gRsMhRs+dMh such that g receives message Mh in round s+d,\hbox{{\it there exists} $g\in R_{s}^{M_{h}}\cap R_{s+d}^{M_{h}}$ {\it such that} $g$ {\it receives message} $M_{h}$ {\it in round} $s+d$}, (27)

then e{\mathcal{R}^{e}} is non-empty. (For the purposes of the proof, we only require that gRsMhg\in R_{s}^{M_{h}} in round ss and do not require that gg receives MhM_{h} in that round.) Define the subset d^e{\mathcal{R}}^{e}_{\hat{d}} of e{\mathcal{R}}^{e} of sequences of minimum (even) duration d^\hat{d} and R¯\underline{R}^{*} in d^e{\mathcal{R}}^{e}_{\hat{d}} with earliest start point s^\hat{s}. By (27), there exists gRs^MhRs^+d^Mhg\in R_{\hat{s}}^{M_{h}}\cap R_{\hat{s}+\hat{d}}^{M_{h}} which receives message MhM_{h} in round s^+d^\hat{s}+\hat{d}. Choose node gg^{\prime} which sends message MhM_{h} to gg in round s^+d^\hat{s}+\hat{d}. Observe that, as gg^{\prime} sends MhM_{h} in round s^+d^\hat{s}+\hat{d} and ihs^<s^+d^1i_{h}\leq\hat{s}<\hat{s}+\hat{d}-1 and so MhM_{h} was initially flooded earlier than round s^+d^1\hat{s}+\hat{d}-1,

g𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑠Mh𝑖𝑛𝑟𝑜𝑢𝑛𝑑s^+d^1.g^{\prime}\;{\it receives}\;M_{h}\;{\it in}\;{\it round}\;\hat{s}+\hat{d}-1. (28)

Now, either gg does not send a message to gg^{\prime} in round s^+1\hat{s}+1 or gg does send a message to gg^{\prime} in round s^+1\hat{s}+1. We show that each of these cases leads to a contradiction.

Case (i) gg does not send a message to gg^{\prime} in round s^+1\hat{s}+1

As gg^{\prime} is a neighbour of gg, gg^{\prime} sends a message to gg in round s^\hat{s}. Now, gg^{\prime} does not send a lower ranked message than MhM_{h} to gg in round s^\hat{s} - otherwise gg which does receive a higher ranked message than MhM_{h} in round s^\hat{s} from some neighbour would, by the flooding algorithm in Definition 4.1(iii), send a higher ranked message to gg^{\prime} in round s^+1\hat{s}+1 contradicting the case assumption that gg does not send any message to gg^{\prime} in round s^\hat{s}. Thus, gg^{\prime} sends a message MhM_{h^{\prime}}, where hhh^{\prime}\geq h, to gg in round s^\hat{s} and so gg^{\prime} is an initial node flooding MhM_{h^{\prime}} or it receives MhM_{h^{\prime}} in round s^1\hat{s}-1. Hence, s^1ihih\hat{s}-1\geq i_{h^{\prime}}\geq i_{h} by (25) as hhh^{\prime}\geq h. Therefore, by Definition 4.7, gRs^1Mhg^{\prime}\in R_{\hat{s}-1}^{M_{h}}. Consider the sequence

R¯=Rs^1Mh,Rs^Mh,,Rs^+d^1Mh\underline{R}^{*^{\prime}}=R_{\hat{s}-1}^{M_{h}},R_{\hat{s}}^{M_{h}},\ldots,R_{\hat{s}+\hat{d}-1}^{M_{h}} (29)

By (28), we have that gg^{\prime} receives MhM_{h} in round s^+d^1\hat{s}+\hat{d}-1 and so gRs^1MhRs^+d^1Mhg^{\prime}\in R_{\hat{s}-1}^{M_{h}}\cap R_{\hat{s}+\hat{d}-1}^{M_{h}}. Also, ihs^1i_{h}\leq\hat{s}-1. Thus, R¯\underline{R}^{*^{\prime}} at (29) satisfies (26) and (27) and so R¯e\underline{R}^{*^{\prime}}\in{\mathcal{R}}^{e}. Its duration d^\hat{d} is the same as that of R¯\underline{R}^{*} but its start point s^1\hat{s}-1 is earlier, contrary to our choice of R¯\underline{R}^{*} as having the earliest start point.

Case (ii) gg sends a message to gg^{\prime} in round s^+1\hat{s}+1

Here, as gRs^Mhg\in R_{\hat{s}}^{M_{h}}, it follows that gRs^+1Mhg^{\prime}\in R_{\hat{s}+1}^{M_{h}} and so gRs^+1MhRs^+d^1Mhg^{\prime}\in R_{\hat{s}+1}^{M_{h}}\cap R_{\hat{s}+\hat{d}-1}^{M_{h}}. If d^=2\hat{d}=2, then s^+1=s^+d^1\hat{s}+1=\hat{s}+\hat{d}-1 and

R¯=Rs^Mh,Rs^+d^1Mh,Rs^+d^Mh\underline{R}^{*}=R_{\hat{s}}^{M_{h}},R_{\hat{s}+\hat{d}-1}^{M_{h}},R_{\hat{s}+\hat{d}}^{M_{h}}

As gRs^+1Mh=Rs^+d^1Mhg^{\prime}\in R_{\hat{s}+1}^{M_{h}}=R_{\hat{s}+\hat{d}-1}^{M_{h}}, gg^{\prime} receives MhM_{h} or a newer message MhM_{h}, by Definition 4.1(iii), in round s^+d^1\hat{s}+\hat{d}-1. Also, gg^{\prime} sends MhM_{h} in round s^+d^\hat{s}+\hat{d}. Thus, gg^{\prime} cannot receive MhM_{h} in round s^+d^1\hat{s}+\hat{d}-1 as that would contradict basic flooding. Neither can gg^{\prime} receive a newer MhM_{h^{\prime}} in round s^+d^1\hat{s}+\hat{d}-1 as that would mean that MhM_{h} would not be sent in round s^+d^\hat{s}+\hat{d} by Definition 4.1(iii). It follows that d^\hat{d} cannot be 2. So, we have the sequence

R¯′′=Rs^+1Mh,,Rs^+d^1Mh\underline{R}^{*^{\prime\prime}}=R_{\hat{s}+1}^{M_{h}},\ldots,R_{\hat{s}+\hat{d}-1}^{M_{h}}

As gRs^+1MhRs^+d^1Mhg^{\prime}\in R_{\hat{s}+1}^{M_{h}}\cap R_{\hat{s}+\hat{d}-1}^{M_{h}} and, by (28), gg^{\prime} receives MhM_{h} in round s^+d^1\hat{s}+\hat{d}-1, (26) and (27) are satisfied by R¯′′\underline{R}^{*^{\prime\prime}} and so R¯′′e\underline{R}^{*^{\prime\prime}}\in{\mathcal{R}}^{e}. The duration of R¯′′\underline{R}^{*^{\prime\prime}}, d^2\hat{d}-2, is smaller than the duration d^\hat{d} of R¯\underline{R}^{*} which was chosen to have the smallest even duration. This is the required contradiction and completes the proof of the theorem.   

Ranked full-send flooding may be used where time-sensitive information is being rapidly disseminated from various sources. For example, the prices of stocks and shares. A received node may act on such timely information continuously in an unspecified way and will send the newest information from the most reliable sources to all neighbours who did not forward that information. Note that the unrefined ranked full-send algorithm may result in a node receiving older information from a more distant mode later on. This may or may not present a problem depending on the way a node acts on received information.

Uses of the flooding algorithm for broadcasting will need to ensure that every message is received by any given node in some round. It is easy to see that (time-)ranked full-send flooding achieves this if the same single node floods the sequence of messages M0,,Mh,M_{0},\ldots,M_{h},\ldots to broadcast a stream of messages. If a newly flooded message MihM_{i_{h^{\prime}}} is received by a node gGg\in G in some round ii for the first time, this will be before any newer message is received by gg, and therefore gg will send MihM_{i_{h^{\prime}}}, in round i+1i+1, to all neighbours of gg which did not send MihM_{i_{h^{\prime}}} to gg in round ii. From this, it is clear that all neighbours of gg will have received MihM_{i_{h^{\prime}}} by round i+1i+1.

Corollary 4.9.

If (in ranked full-send flooding) a single node floods messages M0,,Mh,M_{0},\ldots,M_{h},\ldots with initial rounds i0<<ih<i_{0}<\ldots<i_{h}<\ldots respectively, then every node receives every message and no node receives a given message more than twice.

If different nodes flood different messages, it cannot be guaranteed that every node receives every message in either partial-send or full-send flooding. One solution is for different messages received by a node, to be sent to neighbours in different successive rounds. This would be needed if message size is restricted as in a CONGEST model [31] of message passing. The flooding process from the point of view of an observer of the progress of a given flooding of a message MhM_{h}, would appear as delays of more than one round between when MhM_{h} is received and sent by a node. Such delays could lead to non-termination of the flooding of MhM_{h}, as is discussed in subsections 5.1 and 5.2 below. Another solution, if message size is unrestricted as in the LOCAL model [31] of message passing, is basic flooding of all messages as in sections 2 and 3, independently and in parallel. This can result in growing message sizes as more and more messages of infinitely many would be flooded. A better solution is a parallel flooding version of ranked full-send flooding where a node which receives both older and some newer messages initially flooded by the same node, only sends the newer message. This reduces message size and all older and newer messages broadcast by any node are still received by every node. This follows by Corollary 4.9 applied to the observer of the sequence of floodings broadcast by a given node, which would effectively be ranked full-send flooding emanating from that node. It also means that, for the infinite sequences of messages flooded over time by a set BGB\subseteq G of broadcasting nodes, at most |B||B| messages are sent along any link in any round, thus requiring only a fixed finite size of message for transmission. Moreover, no record of previous rounds is kept.

4.3 Loss of edges or nodes during flooding

In the termination results Theorems 2.2, 4.4 and 4.8, we assume that the graph is fixed for the duration of the flooding process. Flooding proceeds in rounds acting on a fixed graph (G,E)(G,E) in all rounds, where GG is a fixed set of nodes and EE a fixed set of edges. The proofs in Theorems 2.2, 4.4 and 4.8 are unaffected if we allow the possibility of edge loss as flooding progresses, i.e. flooding proceeds in rounds on respective graphs:

(G,E0),(G,E1),,(G,Ei),(G,Ei+1),𝑤ℎ𝑒𝑟𝑒E0E1EiEi+1(G,E_{0}),(G,E_{1}),\ldots,(G,E_{i}),(G,E_{i+1}),\ldots\;\;{\it where}\;\;E_{0}\subseteq E_{1}\subseteq\ldots\subseteq E_{i}\subseteq E_{i+1}\subseteq\ldots (30)

Allowing loss of nodes follows easily. Given a graph (G,Ei)(G,E_{i}) and a node gGig\in G_{i}, let EigE_{i}^{g} be the edges in EiE_{i} not incident with gg. Then, (G{g},Eig)(G\setminus\{g\},E_{i}^{g}) is the subgraph of (G,Ei)(G,E_{i}) induced by the subset of nodes G{g}G\setminus\{g\} and (G,Eig)(G,E_{i}^{g}) is the subgraph of (G,Ei)(G,E_{i}) in which gg is isolated, i.e. with the same nodes as (G,Ei)(G,E_{i}) but with edges incident with gg removed. Clearly, given the sequence of graphs (30), flooding terminates on the sequence of graphs with monotonically decreasing sets of edges:

(G,E0),(G,E1),,(G,Eig),(G,Ei+1g),(G,E_{0}),(G,E_{1}),\ldots,(G,E_{i}^{g}),(G,E_{i+1}^{g}),\ldots

if and only if it terminates on the sequence of graphs where gg becomes isolated:

(G,E0),(G,E1),,(G{g},Eig),(G{g},Ei+1g),(G,E_{0}),(G,E_{1}),\ldots,(G\setminus\{g\},E_{i}^{g}),(G\setminus\{g\},E_{i+1}^{g}),\ldots

It follows, inductively, that flooding terminates on any sequence of graphs of the form:

(G0,E0),(G1,E1),,(Gi,Ei),(Gi+1,Ei+1),𝑤ℎ𝑒𝑟𝑒GiGi+1,EiEi+1for all i0.(G_{0},E_{0}),(G_{1},E_{1}),\ldots,(G_{i},E_{i}),(G_{i+1},E_{i+1}),\ldots\;\;{\it where}\;\;G_{i}\subseteq G_{i+1},E_{i}\subseteq E_{i+1}\;\hbox{{\it for all i}}\geq 0.

5 Non-terminating cases

In this section, cases of amnesiac floodings that do not terminate generally are given.

5.1 Asynchronous flooding

We consider firstly an asynchronous message passing model in which an adaptive adversary can cause flooding to be non-terminating. In the model, the computation still proceeds in global synchronous rounds but the adversary can decide the delay of message delivery on any link. A message cannot be lost and will eventually be delivered, but the adversary can decide in which round to deliver the message. The adaptive adversary can decide on individual link delays for a round, based on the state of the network for the present and previous rounds (i.e. node states, messages in transit and message history). Otherwise, the flooding algorithm is the same as for the synchronous case. We show that the adversary can force asynchronous flooding to be non-terminating by adaptively choosing link delays. Consider the triangle graph in figure 6. In round 0, bb has a message MM as the source node which is then flooded. Figure 6 illustrates rounds 1-5. Both aa and cc send MM to each other in round 2. In round 3, aa sends MM to bb but the adversary makes cc hold the message for one round, indicated by a circled node. After that, in round 4, bb and cc send MM to each other. In any given round, the corresponding bidirected graph determines in which ways flooding can proceed. As the bidirected graphs in rounds 2 and 4 are equivalent (by a relation- and adversary-preserving isomorphism), flooding can proceed from round 4 in similar ways as from round 2 with the edges bb and aa interchanged and the adversary acting on node cc as before. The repeated adversarial intervention can prevent flooding from terminating.

Refer to caption
Figure 6: Non-termination of asynchronous flooding

5.2 Fixed delays at edges

In the asynchronous example in figure 6 above, the delay was caused by an adversary at node cc. The duration of message transmission along the edges {b,c}\{b,c\} and {a,c}\{a,c\} depended on whether the adversary cc was receiving or sending the message. If the delay along any edge is fixed and the same in both directions on the triangle graph, then flooding terminates. This raises the question of whether flooding terminates on any graph if delays along edges are the same in both directions. Consider the example in figure 7 below. We have a weighted graph with edges labelled by positive integers representing the message transit time in either direction.

Refer to caption
Figure 7: Non-termination of flooding with fixed edge delays

Flooding proceeds with respect to a global clock, the non-negative integer ticks of which define rounds. Flooding is initiated in round 1 when node g0g_{0} sends to all neighbours. Message transit time is given in terms of the number of ticks of the clock taken. Arrowheads at nodes indicate a message being received at a node. Arrowheads not at nodes (as in round 4 of figure 7) indicate messages in transit. The arrowheaded graph in a round determines how flooding proceeds. As the arrowheaded graphs in rounds 3 and 8 are identical, flooding does not terminate.

5.3 Multiple messages - unranked full-send flooding

If a flooding algorithm for multiple messages chooses to send a received message to all neighbours from which it did not receive that message, and another node receiving the same messages chooses a different message then that can lead to non-termination. In figure 8, M0M_{0} is flooded by x0x_{0} in round 1 and M1M_{1} by x1x_{1} in round 2. Nodes gg and gg^{\prime} differ in the message they choose to forward in round 3. As a result the very same messages will be sent in round 9 and non-termination will ensue.

Refer to caption
Figure 8: Non-termination of unranked full-send flooding

5.4 Addition of edges or nodes during flooding

In the simple example in figure 9 below, node bb initiates flooding in round 1. Edge {b,c}\{b,c\} is added in round 2. The message is sent to from cc to bb along that edge in round 3 and circulates in the graph forever. In the case of graphs that are odd cycles, if ranked full-send flooding is continuous, a later higher-ranked flooded message will eventually eliminate such lower-ranked rogue messages. However, if the graph has even cycles, it is possible for such a lower-ranked message to pass higher-ranked messages and evade elimination infinitely often.

Refer to caption
Figure 9: Non-termination of flooding with addition of edges

6 Conclusion

In this paper we have shown that synchronous flooding terminates on any finite graph and that no node receives the message more than twice. From this we derived sharp bounds for termination times. We have extended to dynamic settings of potential use for applications such as broadcast and leader election algorithms, with multiple initiation times and messages. Our proofs showed that sequences of flooded messages originating from a given source could not survive longer in the presence of other dynamically flooded messages than if flooded alone from that source, and so termination and time to termination results carry over from the basic non-dynamic case. For ranked full-send flooding, we assumed that message ranking respected the order of time of initiation. This has a simpler proof. It is possible that some applications may rank messages otherwise. In fact, Theorem 4.8 can be proved without this assumption in a similar way to Theorem 4.4 using ef cycles.

Multiple-message flooding could be extended to the case where a given node floods different messages to different neighbours simultaneously when initiating a flooding. This would compound the problem of delivering every message to every node, if broadcast is the objective. This problem can be solved in network topologies which have multiple edge-disjoint Hamilton cycles - common examples include complete graphs, n-cubes [27], tori [3], star networks [33], [9] and transposition graphs [17] - or in graphs that may not be hamiltonian but may have edge-disjoint circuits [7] which visit every node in which nodes but not edges may be repeated. Multiple messages are sent in a given direction along different edge-disjoint circuits. Messages are forwarded by a node along the circuit on which they arrived. This guarantees that all messages sent by all nodes are received. However, the broadcast of a message takes at least as many rounds as there are vertices in the graph, unlike flooding which takes no more than about twice the diameter number of rounds. To improve the time taken to broadcast messages, when there are fewer such messages circulating in the network, a receiving node could forward a message received by a circuit edge further along that circuit, but also send the message to other unused edges in a ‘flooding’ fashion to hasten the broadcast. Such a flooding algorithm would be amnesiac, as the sending of messages would be determined only by the received messages in the previous round. Variations of such algorithms on different topologies can be simulated on a small scale and properties compared using temporal logic model checkers [4].

Another possible area of investigation is the design of ‘functional’ self-healing algorithms [5, 6] such that an ongoing flooding will still terminate despite nodes being adversarially deleted or inserted with judicious insertion of edges and maintaining of other invariants such as connectivity and expansion[28, 29, 16, 39, 15, 34].

References

  • [1] Jordan Adamek, Mikhail Nesterenko, James Scott Robinson, and Sébastien Tixeuil. Stateless reliable geocasting. In 36th IEEE Symposium on Reliable Distributed Systems, SRDS 2017, Hong Kong, Hong Kong, September 26-29, 2017, pages 44–53. IEEE Computer Society, 2017.
  • [2] H.Attiya and J.Welch.. Distributed Computing: Fundamentals, Simulations and Advanced Topics. John Wiley and Sons, 2004.
  • [3] M.M.Bae and B.Bose. Edge disjoint Hamiltonian cycles in k-ary n-cubes and hypercubes. IEEE Transactions on Computers 52(10) (2003) 1271-1284, 2003. DOI: https://doi.org/10.1109/TC.2003.1234525.
  • [4] R. Bani-Abdelrahman. Specification and verification of network algorithms using temporal logic. PhD thesis. Loughborough University, UK, 2019.
  • [5] Armando Castañeda, Danny Dolev, and Amitabh Trehan. Compact routing messages in self-healing trees. Theoretical Computer Science, 709:2 – 19, 2018. Special Issue of ICDCN 2016 (Distributed Computing Track). DOI: https://doi.org/10.1016/j.tcs.2016.11.022
  • [6] Armando Castañeda, Jonas Lefévre, and Amitabh Trehan. Fully compact routing in low memory self-healing trees. In Proceedings of the 21st International Conference on Distributed Computing and Networking, ICDCN 2020, New York, NY, USA, 2020. Association for Computing Machinery. DOI: doi:10.1145/3369740.3369786
  • [7] P.A.Catlin. Supereulerian graphs: a survey. J. Graph Theory 16(2) (1992) 177-196, 1992.
  • [8] Joshua N. Cooper and Jeol Spencer. Simulating a random walk with constant error. Combinatorics, Probability and Computing, 15(6):815–822, 2006.
  • [9] P.Derakhshan and W.Hussak. Optimal bounds for disjoint Hamilton cycles in star graphs. Int. J. Found. Comp. Sci 29(3) (2018) 377-389, 2018. DOI: https://doi.org/10.1142/S0129054118500090.
  • [10] B.Doerr, M.Fouz and T.Friedrich. Social networks spread rumors in sublogarithmic time. Electronic Notes in Discrete Mathematics. 38 (2011) 303-308, 2011.
  • [11] J.Edmonds and E.L.Johnson. Matching: A Well-Solved Class of Integer Linear Programs. In: M.Jünger, G.Reinelt and G.Rinaldi (eds.), Combinatorial Optimization - Eureka, You Shrink!. Lecture Notes in Computer Science 2570 (2003) 27-30, Springer, 2003. DOI: https://doi.org/10.1007/3-540-36478-1_3.
  • [12] Robert Elsässer and Thomas Sauerwald. The power of memory in randomized broadcasting. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’08, pages 218–227, Philadelphia, PA, USA, 2008. Society for Industrial and Applied Mathematics.
  • [13] C. Gkantsidis, M. Mihail, and A. Saberi. Random walks in peer-to-peer networks: Algorithms and evaluation. Performance Evaluation, 63(3):241–263, 2006.
  • [14] Ajei S. Gopal, Inder S. Gopal, and Shay Kutten. Fast broadcast in high-speed networks. IEEE/ACM Trans. Netw., 7(2):262–275, 1999.
  • [15] Tom Hayes, Navin Rustagi, Jared Saia, and Amitabh Trehan. The forgiving tree: a self-healing distributed data structure. In PODC ’08: Proceedings of the twenty-seventh ACM symposium on Principles of distributed computing, pages 203–212, New York, NY, USA, 2008. ACM.
  • [16] Thomas P. Hayes, Jared Saia, and Amitabh Trehan. The forgiving graph: a distributed data structure for low stretch under adversarial attack. Distributed Computing, pages 1–18, 2012. DOI: http://dx.doi.org/10.1007/s00446-012-0160-1.
  • [17] W.Hussak. Disjoint Hamilton cycles in transposition graphs. Disc.App.Math. 206 (2016) 56-64, 2016. DOI: https://doi.org/10.1016/j.dam.2016.02.007.
  • [18] Walter Hussak and Amitabh Trehan. On termination of a flooding process. In Peter Robinson and Faith Ellen, editors, Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29 - August 2, 2019., pages 153–155. ACM, 2019.
  • [19] Walter Hussak and Amitabh Trehan. On the termination of a flooding process. CoRR, abs/1907.07078,2019.
  • [20] Walter Hussak and Amitabh Trehan. On the Termination of Flooding. In Christophe Paul and Markus Bläser, editors, 37th International Symposium on Theoretical Aspects of Computer Science (STACS 2020), volume 154 of Leibniz International Proceedings in Informatics (LIPIcs), pages 17:1–17:13, Dagstuhl, Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum für Informatik.
  • [21] Brad Karp and H. T. Kung. Gpsr: Greedy perimeter stateless routing for wireless networks. In Proceedings of the 6th Annual International Conference on Mobile Computing and Networking, MobiCom ’00, page 243?254, New York, NY, USA, 2000. Association for Computing Machinery.
  • [22] Adrian Kosowski and Dominik Pajak. Does adding more agents make a difference? A case study of cover time for the rotor-router. J. Comput. Syst. Sci., 106:80–93, 2019.
  • [23] Shay Kutten, Gopal Pandurangan, David Peleg, Peter Robinson, and Amitabh Trehan. On the complexity of universal leader election. J. ACM, 62(1):7:1–7:27, 2015.
  • [24] Shay Kutten, Gopal Pandurangan, David Peleg, Peter Robinson, and Amitabh Trehan. Sublinear bounds for randomized leader election. Theoretical Computer Science, 561:134 – 143, 2015. Special Issue on Distributed Computing and Networking.
  • [25] N.Lynch. Distributed Algorithms. Morgan Kaufmann Publishers, San Mateo, CA,1996.
  • [26] Othon Michail and Paul G. Spirakis. Terminating population protocols via some minimal global knowledge assumptions. Journal of Parallel and Distributed Computing, 81-82:1 – 10, 2015.
  • [27] K. Okuda and S. W. Song Revisiting Hamiltonian decomposition of the hypercube. Proceedings 13th Symposium on Integrated Circuits and Systems Design 2000, IEEE Computer Society, pp. 55-60, 2000. DOI: https//doi.org/10.1109/SBCCI.2000.876008.
  • [28] Gopal Pandurangan, Peter Robinson, and Amitabh Trehan. DEX: self-healing expanders. Distributed Comput., 29(3):163–185, 2016. DOI: https://doi.org/10.1007/s00446-015-0258-3
  • [29] Gopal Pandurangan and Amitabh Trehan. Xheal: a localized self-healing algorithm using expanders. Distributed Computing, 27(1):39–54, 2014. DOI: http://dx.doi.org/10.1007/s00446-013-0192-1.
  • [30] David Peleg. Time-optimal leader election in general networks. J. Parallel Distributed Comput., 8(1):96–99, 1990.
  • [31] David Peleg. Distributed Computing: A Locality Sensitive Approach. SIAM, 2000.
  • [32] A.Rahman, W.Olesinski and P.Gburzynski. Controlled flooding in wireless ad-hoc networks, In: Proc. IWWAN’04, pp.73-78, 2004.
  • [33] M.Rosenfeld, Z.Ryjacek, R.Cada and T.Kaiser. Disjoint Hamilton cycles in the star graph. Inf. Proc. Lett. 110 (2009) 30-35, 2009. DOI: https://doi.org/10.1016/j.ipl.2009.10.001.
  • [34] Jared Saia and Amitabh Trehan. Picking up the pieces: Self-healing in reconfigurable networks. In IPDPS. 22nd IEEE International Symposium on Parallel and Distributed Processing., pages 1–12. IEEE, April 2008.
  • [35] Atish Das Sarma, Danupon Nanongkai, and Gopal Pandurangan. Fast distributed random walks. In PODC, pages 161–170, 2009.
  • [36] Atish Das Sarma, Danupon Nanongkai, Gopal Pandurangan, and Prasad Tetali. Efficient distributed random walks with applications. In PODC, 2010.
  • [37] A.Tanenbaum. Computer Networks, Pearson Prentice Hall, 2011.
  • [38] G.Tel. Introduction to Distributed Algorithms. Cambridge University Press, New York, NY, 1994.
  • [39] Amitabh Trehan. Algorithms for self-healing networks. Dissertation, University of New Mexico, 2010. URL: http://proquest.umi.com/pqdlink?did=2085415901
  • [40] V.Turau. Analysis of amnesiac flooding. arXiv:2002.10752., 2020. https://arxiv.org/abs/2002.10752
  • [41] Volker Turau. Stateless Information Dissemination Algorithms. In Structural Information and Communication Complexity - 27th International Colloquium, SIROCCO, pages 183–199, Springer, June 2020.