# Distributed Detection of Cliques in Dynamic Networks

This paper provides an in-depth study of the fundamental problems of finding small subgraphs in distributed dynamic networks. While some problems are trivially easy to handle, such as detecting a triangle that emerges after an edge insertion, we show that, perhaps somewhat surprisingly, other problems exhibit a wide range of complexities in terms of the trade-offs between their round and bandwidth complexities. In the case of triangles, which are only affected by the topology of the immediate neighborhood, some end results are: * The bandwidth complexity of 1-round dynamic triangle detection or listing is Θ(1). * The bandwidth complexity of 1-round dynamic triangle membership listing is Θ(1) for node/edge deletions, Θ(n^1/2) for edge insertions, and Θ(n) for node insertions. * The bandwidth complexity of 1-round dynamic triangle membership detection is Θ(1) for node/edge deletions, O( n) for edge insertions, and Θ(n) for node insertions. Most of our upper and lower bounds are tight. Additionally, we provide almost always tight upper and lower bounds for larger cliques.

There are no comments yet.

## Authors

• 1 publication
• 24 publications
• ### Tight Distributed Listing of Cliques

Much progress has recently been made in understanding the complexity lan...
11/14/2020 ∙ by Keren Censor-Hillel, et al. ∙ 0

• ### Fooling Views: A New Lower Bound Technique for Distributed Computations under Congestion

We introduce a novel lower bound technique for distributed graph algorit...
11/05/2017 ∙ by Amir Abboud, et al. ∙ 0

• ### Quantum Distributed Algorithm for Triangle Finding in the CONGEST Model

This paper considers the triangle finding problem in the CONGEST model o...
08/30/2019 ∙ by Taisuke Izumi, et al. ∙ 0

• ### Finding Subgraphs in Highly Dynamic Networks

In this paper we consider the fundamental problem of finding subgraphs i...
09/17/2020 ∙ by Keren Censor-Hillel, et al. ∙ 0

• ### Finding Collisions in Interactive Protocols – Tight Lower Bounds on the Round and Communication Complexities of Statistically Hiding Commitments

We study the round and communication complexities of various cryptograph...
05/04/2021 ∙ by Iftach Haitner, et al. ∙ 0

• ### Sub-pattern analysis of Chinese guarantee network

In this study, we investigate the evolution of Chinese guarantee network...
06/12/2018 ∙ by Yingli Wang, et al. ∙ 0

• ### Fast and Simple Deterministic Algorithms for Highly-Dynamic Networks

This paper provides a surprisingly simple method for obtaining fast (con...
01/13/2019 ∙ by Keren Censor-Hillel, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

A fundamental problem in many computational settings is to find small subgraphs. In distributed networks it is particularly vital for various reasons, among which is the ability to perform some tasks much faster if, say, triangles do not occur in the underlying network graph (see, eg., [29, 23]).

Finding cliques is a local task that trivially requires only a single communication round if the message size is unbounded. However, its complexity may dramatically increase when the bandwidth is restricted to the standard bits, for an -node network. For example, the complexity of detecting 4-cliques is at least  [10]. For triangles, the complexity is yet a fascinating riddle, where only recently the first non-trivial complexities of and have been given for detection and listing, respectively [24], and the current state-of-the-art is the -round algorithm of [9]. For listing, there is an lower bound [24, 27]. The only non-trivial lower bounds for detection say that a single round is insufficient, as given in [1] and extended for randomized algorithms in [17]. In [1] it was also shown that -bit algorithms require rounds, improved in [17] to .

In this paper, we address the question of detecting small cliques in dynamic networks of limited bandwidth. We consider a model that captures real-world behavior in networks that undergo changes, such as nodes joining or leaving the network, or communication links between nodes that appear or disappear. Various problems have been studied in many variants of such a setting (see Section 1.3).

The task of finding cliques is unique, in that it is trivial if the bandwidth is not restricted, and it can be easily guaranteed that at the end of each round all nodes have the correct output. This implies that one does not have to wait for stabilization and does not have to assume that the network is quiet for any positive number of rounds. If, however, the bandwidth is restricted, the solution may not be as simple, although some problems can still be solved even with very small bandwidth.

As a toy example, consider the case of triangle listing when a new edge is inserted to the graph. The endpoints of the inserted edge simply broadcast a single bit that indicates this change to all of their neighbors, and hence if a new triangle is created then its third endpoint detects this by receiving two such indications.

Nevertheless, we show that this simplified case is far from reflecting the general complexities of clique problems in such a dynamic setting. For example, the above algorithm does not solve the problem of membership-listing of triangles, in which each node should list all triangles that contain it. Indeed, we prove that this stronger variant cannot be solved with constant bandwidth, and, in fact, every solution must use at least bits.

Our contributions provide an in-depth study of various detection and listing problems of small cliques in this dynamic setting, as we formally define and summarize next.

### 1.1 Our contributions

For a subgraph we categorize four types of tasks: Detecting an appearance of in the network, for which it is sufficient that a single node does so, listing all appearances of , such that every appearance is listed at least by a single node, and their two membership variants, membership-detection and membership-listing, for which each node has to detect whether it is a member of a copy of , or list all copies of to which it belongs, respectively.

The model is explicitly defined in Section 1.4. In a nutshell, there can be one topology change in every round, followed by a standard communication round among neighboring nodes, of bits per message, where is the bandwidth. An algorithm takes rounds if the outputs of the nodes are consistent with a correct solution after communication rounds that follow the last change. In particular, a -round algorithm is an algorithm in which the outputs are correct already at the end of the round in which the topology change occurred. Hence, -round algorithms are very strong, in the sense that they work even in settings in which no round is free of changes. We note that in what follows, all of our algorithms are deterministic and all of our lower bounds hold also for randomized algorithms.

Triangles: Our upper and lower bounds for triangles () are displayed in Table 1.

Most of the complexities in this table are shown to be tight, by designing algorithms and proving matching lower bounds. The one exception is for membership detection with edge insertions, for which we show an algorithm that uses bits of bandwidth, but we do not know whether this is tight. However, we also show a -round algorithm for this problem that works with a bandwidth of , where is the maximum degree in the graph, implying that if our logarithmic algorithm is optimal, then a proof for its optimality must exhibit a worst case in which the maximum degree is .

A single round is sufficient for solving all clique problems, given enough (linear) bandwidth. Nevertheless, for the sake of comparison, we show that with just one additional communication round, all of the bandwidth complexities in Table 1 drop to , apart from membership listing of triangles, whose bandwidth complexity for -round algorithms is .

Larger Cliques: We also study the bandwidth complexities for finding cliques on nodes. Here, too, a single round is sufficient for all problems, and the goal is to find the bandwidth complexity of each problem. Some of the algorithms and lower bounds that we show for triangles carry over to larger cliques, but others do not. Yet, with additional techniques, we prove that for cliques of constant size, almost all of the -round bandwidth complexities are the same as their triangle counterparts.

Combining types of changes: In most cases, one can obtain an algorithm that handles several types of changes, by a simple combination of the corresponding algorithms. However, intriguingly, sometimes this is not the case. A prime example is when trying to combine edge insertions and node insertions for triangle detection: a node obtaining 1-bit indications of a change from two neighbors cannot tell whether this is due to an edge inserted between them, or due to an insertion of a node that is a neighbor of both. In some of these cases we provide techniques to overcome these difficulties, and use them to adjust our algorithms to cope with more than one type of change.

### 1.2 Challenges and techniques

Algorithms: The main challenge for designing algorithms is how to convey enough information about the topology changes that occur, despite non-trivial (in particular, sublinear) bandwidth. Consider, e.g., edge insertions. As described, while listing triangles is trivial with a single indication bit, this fails for membership detection or membership listing.

For membership detection we can still provide a very simple algorithm for which a logarithmic bandwidth suffices, by sending the identity of the new edge, and by helping neighbors in the triangle to know that they are such. For membership listing even this is insufficient. To overcome this challenge, we introduce a technique for sending and collecting digests of neighborhood information. When all digests from a given neighbor have been collected, one can determine the entire neighborhood of this neighbor. The caveat in using such an approach in a straightforward manner is that a node needs to list its triangles with a newly connected neighbor already at the same round in which they connected, and cannot wait to receive all of its neighbor’s digests. By our specific choice of a digests, we ensure that a newly-connected neighbor has enough information to give a correct output after a single communication round, despite receiving only a single digest from its latest neighbor.

Lower bounds: For the lower bounds, our goal is to argue that in order to guarantee that all nodes give a correct output, each node must receive enough information about the rest of the graph. To do this, we identify sequences of topology changes that exhibit a worst-case behavior, in the sense that a node cannot give a correct output if it receives too little information.

One approach for doing this is to look at a particular node , and define as many sequences as possible such that the correct output of is different for each sequence. At the same time, we ensure that the number of messages that receives from the other nodes is as small as possible. These two requirements are conflicting — if can have many different outputs, it must have many different neighbors, which implies that it receives many messages with information. Still, we are able to find such a family of sequences for each problem, and we wrap-up our constructions by using counting arguments to prove the desired lower bounds. In some cases, e.g., membership-listing under edge insertions, even this is insufficient, and we construct the sequences such that one critical edge affects the output of , but it is added last, so that it conveys as little information as possible.

The above can be seen as another step in the spirit of the fooling views framework, which was introduced in [1] for obtaining the first lower bounds for triangle detection under limited bandwidth. After being beautifully extended by [17], our paper essentially gives another indication of the power of the fooling views framework in proving lower bounds for bandwidth-restricted settings.

On the way to constructing our worst-case graph sequences, we prove combinatorial lemmas that show the existence of graphs with certain desired properties. To make our lower bounds apply also for randomized algorithms, we rely on Yao’s lemma and on additional machinery that we develop.

### 1.3 Additional related work

Dynamic distributed algorithms: Dynamic networks have been the subject of much research. A central paradigm is that of self-stabilization [11], in which the system undergoes various changes, and after some quiet time needs to converge to a stable state. The model addressed in this paper can be considered as such, but our focus is on algorithms that do not require any quiet rounds (though we also address the gain in bandwidth complexity if the system does allow them, for the sake of comparison). Yet, we assume a single topology change in each round. A single change in each round and enough time to recover is assumed in recent algorithms for maintaining a maximal independent set [8, 3, 22, 2, 13] and matchings [30], and for analyzing amortized complexity [28]. Highly-dynamic networks, in which multiple topology changes can occur in each round are analyzed in [4, 6], and it is an intriguing open question how efficient can subgraph detection be in such a setting. Various other dynamic settings in which the topology changes can be almost arbitrary have been proposed, but the questions that arise in such networks address the flow of information and agreement problems, as they are highly non-structured. A significant paper that relates to our work is [25], which differs from our setting in the bandwidth assumption. Clique detection in the latter model is trivial, and indeed their paper addresses other problems.

Distributed subgraph detection: In the CONGEST model and in related models, where the nodes synchronously communicate with bits, much research is devoted to subgraph detection, e.g., [19, 21, 26, 12, 1, 24, 9, 27].

A related problem is property-testing of subgraphs, where the nodes need to determine, for a given subgraph , whether the graph is -free or far from being -free [7, 15, 16, 18, 20, 5].

### 1.4 Preliminaries

In the dynamic setting, the network is a sequence of graphs. The initial graph, whose topology is known to the nodes, represents the state of the network at some starting point in time, and every other graph in the sequence is either identical to its preceding graph or obtained from it by a single topology change. The network is synchronized, and in each round, each node can send to each one of its neighbors a message of bits, where is the bandwidth of the network. Each node has a unique ID and knows the IDs of all its neighbors. We denote by the number of possible IDs. Hence, is an upper bound on the number of nodes that can participate in the network at all times.

Note that the nodes do not receive any indication when a topology change occurs. A node can deduce that a change has occurred by comparing the list of its neighbors in the current round and in the previous round. This implies that a node cannot distinguish between the insertion of an edge and the insertion of a node which is connected to , as the list of neighbors of is the same in both cases.

An algorithm can be designed to handle edge insertions or deletions or node insertions or deletions, or any combination of these. We say that an algorithm is an -round algorithm if the outputs of the nodes after rounds of communication starting from the last topology change are correct. The (deterministic or randomized) -round bandwidth complexity of a problem is the minimum bandwidth for which an -round (deterministic or randomized) algorithm exists. We denote by , , , and , respectively, the problems of membership listing, membership detection, listing and detection of . The following is a simple observation.

###### Observation 1.

Let be an integer and let be a graph. Denote by , , and the (deterministic or randomized) -round bandwidth complexities of , , , and , respectively, under some type of topology changes. Then: and .

Due to this observation, our exposition starts with the more challenging task of membership-listing, then addresses membership-detection, and concludes with listing and detection. Within each case, we first provide algorithms for each type of topology change, and then prove lower bounds.

## 2 Triangle problems

### 2.1 Membership listing

Table 2 summarizes our results for membership listing of triangles.

#### 2.1.1 Upper bounds

We start by showing that if only node deletions are allowed, no communication is required.

###### Theorem 2.1.1.

The deterministic -round bandwidth complexity of under node deletions is .

###### Proof.

The algorithm is very simple: the output of a node is the set of all triangles that exist in the initial graph, such that and are both neighbors of in the final graph.

Since only node deletions are allowed, every triangle that exists in the final graph must also exist in the initial graph, and all three nodes , and must exist and be connected to each other. Conversely, if a triangle exists in the initial graph and is still connected to and , then the triangle must exist in the final graph. Therefore, the output of is exactly the set of all triangles that contain in the final graph. ∎

Next, we show how to handle edge deletions with bits of bandwidth.

###### Theorem 2.1.2.

The deterministic -round bandwidth complexity of under edge deletions is .

###### Proof.

The idea of the algorithm is simple: every node needs to maintain the list of all triangles that contain it. In order to do this, needs to be able to determine, for every two of its neighbors and , whether or not the edge exists.

This can be achieved with only a single bit, as follows. Every node sends to all its neighbors an indication whether or not it lost an edge on the current round. We denote this bit by DELETED. Thus, for every triangle , whenever one of the edges of the triangle is deleted (say, ), the other node ( in this case) receives from both and . Since the only possible change in the graph is the deletion of an edge, can deduce that the edge was deleted. ∎

The above algorithm does not work as-is if both edge deletions and node deletions are allowed. For example, assume there exists a triangle . When we remove the edge , both and send to , thus knows that the edge was deleted and the triangle no longer exists. However, receives the exact same input if some other node , which is connected to both and , but not to , is deleted. Here, too, both and lose a neighbor, thus they both send to , and deduces — now incorrectly — that the triangle no longer exists and removes it from its output.

This problem can be fixed, by observing that when the edge is deleted, both and know whether or not is connected to (i.e., whether or not the triangle , or , exists). Therefore, we can have each node send to each neighbor only if the lost neighbor was connected to ; that is, sends to if it lost an edge to some node such that the triangle existed on the previous round. This information allows to distinguish between the two cases described above and give the correct output. Hence the following corollary.

###### Corollary 2.1.3.

The deterministic -round bandwidth complexity of under node/edge deletions is .

Handling edge insertions and node insertions is much more complicated. We start by showing an algorithm that handles edge insertions.

###### Theorem 2.1.4.

The deterministic -round bandwidth complexity of under edge insertions is .

###### Proof.

Let be the set of neighbours of on round . Note that can be encoded as an -bit string, which indicates, for every node , whether or not is a neighbour of on round .

The algorithm is as follows. When a new edge is inserted on round , both and send to all their neighbors the identity of their new neighbor, denoted by NEWID.

In addition, sends a bitmask of bits to , indicating, for every one of the previous rounds, whether or not one of ’s neighbors has sent a NEWID to . We denote this information by . Node sends to the same information.

Finally, encodes as an -bit string, denoted , and starts sending it to in chunks of bits per round. This process begins on round and ends on round , when the entire string has been sent. During these rounds, keeps sending NEWID to , and to all its other neighbors, as described above. Node does the same. It should be noted that this continuous communication between and is not intended for allowing them to detect triangles that appear by the insertion of the edge , as these are detected immediately due to previous information. Rather, communicating ALL allows and to detect triangles that appear by other topology changes that may occur in subsequent rounds, as we show below.

Overall, NEWID requires bits, while LAST and ALL require bits. Thus, the required bandwidth is .

We show that at the end of each round, every node has enough information to determine, for every two of its neighbors and , whether or not the edge exists.

First, since only edge insertions are considered, if the edge exists in the initial graph, it exists throughout. Also, if is inserted when at least one of the edges or already exists, then receives this information through NEWID. The only other case is when does not exist in the initial graph, and is inserted when is not yet connected to either or . That is, the initial graph does not contain any of these three edges, and is inserted before the other two. W.l.o.g. assume that is inserted before . Now, let be the round in which is inserted, and let be the round in which is inserted.

If , then when is inserted, sends a NEWID to . Therefore, when is inserted, can determine from that in round a neighbor of has sent a NEWID to . Since the only edge inserted in that round is , determines that is a neighbor of . If , then, in round , has already sent the entire string to , which indicates that is a neighbor of . Therefore, in all cases, determines whether or not the edge exists, as claimed. ∎

The algorithm given for Theorem 2.1.4 can be extended to handle edge deletions and node deletions as well, by simply having each node send to all its neighbors an indication whether or not it lost a neighbor on the current round, along with the ID of the lost neighbor (if any). This requires only bits of bandwidth, and one can verify that this extended algorithm allows every node to give the correct output in all cases, as required. Therefore:

###### Corollary 2.1.5.

The deterministic -round bandwidth complexity of under node deletions and edge deletions/insertions is .

Also, if we are promised a quiet round, the problem can be solved with bits of bandwidth, as the next theorem shows.

###### Theorem 2.1.6.

The deterministic -round bandwidth complexity of under edge insertions is .

###### Proof.

On every round, for every two neighbors and , sends two bits to :

1. An indication whether or not has a new neighbor (i.e., the edge has been inserted on the current round). We denote this information by NEW.

2. An indication whether or not any other neighbor of has sent on the previous round. We denote this information by LAST.

Consider a triangle , and assume that the edge is the last one inserted. When is inserted, both and send to . Since only one edge can be inserted on a single round, knows that the edge has been inserted, and therefore the triangle exists.

On the next round, since received from , it sends to , indicating that some other neighbor of has sent on the last round. knows that the edge is the only edge that has been inserted on the last round, hence must be a neighbor of . Therefore, can deduce that the triangle exists. Likewise, sends to , from which can deduce that the triangle exists.

It follows that all three nodes can determine that the triangle exists after two rounds of communication, as required. ∎

The above algorithm can be combined with a variant of the algorithm of Corollary 2.1.3, in order to handle node deletions and edge deletions as well. In that algorithm, every node sends a bit to every neighbor , indicating whether lost an edge on the current round. We denoted this information by DELETED. We can do the same thing here; however, we have the same problem that we encountered in Corollary 2.1.3 — when a node receives from two neighbors and on the same round, it cannot determine whether the edge between and was deleted, or some other node , which was connected to both and , was deleted. The triangle exists in the latter case, but not in the former case. Therefore, must be able to distinguish between these two cases.

In Corollary 2.1.3 we solved this problem by having every node send to a neighbor only if it lost a neighbor which is currently connected to . This is possible, because the algorithm of Corollary 2.1.3 guarantees that on every round, knows the list of all common neighbors of and .

In our case there is no such guarantee — will know whether or not its missing neighbor was connected to only in the next round. However, by using the extra quiet round, can easily distuinguish between the two problematic cases described above, by checking whether it received from some other node on the previous round.

Thus, we extend the algorithm of Theorem 2.1.6 as follows. Whenever a node loses an edge, it sends to all its neighbors. On the next round, sends to all its neighbors an indication whether or not it received from any other neighbor on the previous round. One can verify that this information allows every node to give the correct output after rounds of communication. Like the original algorithm, this uses bits of bandwidth on every round, thus the total bandwidth is still bits. This implies the following corollary, which is clearly optimal.

###### Corollary 2.1.7.

The deterministic -round bandwidth complexity of under node deletions and edge deletions/insertions is .

Node insertions are harder to handle than the other types of changes. If we are promised quiet rounds, a simple algorithm exists that uses only bits of bandwidth. As we show in Section 2.1.2, this is tight.

###### Theorem 2.1.8.

For every , the deterministic -round bandwidth complexity of under any type of change is .

###### Proof.

The algorithm is as follows: on every round, every node prepares an -bit message that specifies its current list of neighbors. Then, it breaks this message into -bit blocks, where , and sends it to all its neighbors, one block on every round.

Additionally, on every round, sends to all its neighbors one bit indicating whether or not its list of neighbors has changed on the current round. Whenever the list of neighbors changes, builds its new list of neighbors, breaks it into blocks, and starts sending it again.

After at most quiet rounds, all nodes are guaranteed to finish sending their list to all their neighbors, thus every node can determine whether any pair of its neighbors are connected to each other or not, as required. ∎

#### 2.1.2 Lower bounds

The 1-round bandwidth complexities for node and edge deletions are clearly tight. Next, we show that handling edge insertions in round requires at least bits of bandwidth. By Theorem 2.1.4, this bound is tight. We first prove the following lemma, which shows that a sufficiently dense bipartite graph includes a large enough complete bipartite subgraph. This has the same spirit as the results of Erdös [14], used in [1, 17] for bounding the number of single-bit rounds for detecting triangles, but here the sides can be of different sizes.

###### Lemma 1.

For every there exist , such that for every bipartite graph having at least edges, there are subsets and , whose sizes are and , such that for every and (i.e., the induced subgraph on is a complete bipartite graph).

###### Proof.

Let , and let be the set of all subsets of whose size is exactly . For every , we denote by the set of all vertices in which are connected to every vertex in . Consider the sum . Let . Then:

 S≤∑A∈AM=(|L|⌈α⋅|L|⌉)⋅M (1)

On the other hand, the sum can be computed by counting, for every , the number of sets such that :

 S =∑A∈A|NA|=∑A∈A∑v∈NA1=∑v∈R∑A∈A:v∈NA1=∑v∈R|{A∈A:v∈NA}|

For , let be the number of vertices in whose degree is at least . For every whose degree is we have . Therefore we can bound the above sum

Combining this with (1) gives which implies:

 (2)

We can bound as follows:

 |E| =∑v∈Rd(v)=∑v∈R:d(v)≥p⋅|L|d(v)+∑v∈R:d(v)

On the other hand we have , and therefore , which implies . Setting gives , and substituting this into (2) gives:

Finally, we bound the binomial fraction on the right-hand size as follows. For simplicity, define . Note that . Now:

 (bc)(ac) =∏ci=1(i+b−c)∏ci=1(i+a−c)=c∏i=1i+b−ci+a−c=c∏i=1(1−a−bi+a−c) ≥c∏i=1(1−a−ba−c)=c∏i=1b−ca−c=(b−ca−c)c

Therefore:

 (3)

In order to choose appropriate values for and , we now distinguish between two cases for the graph . If , then . Since there must be a vertex in having at least neighbors in , the claim holds for every and .

If , we can further develop the right hand side of (3) as follows:

 (⌈p|L|⌉−⌈α|L|⌉|L|−⌈α|L|⌉)⌈α|L|⌉ ≥(p|L|−(α|L|+1)|L|−α|L|)α|L|+1=(p−α1−α−1(1−α)|L|)α|L|+1 >(p−α1−α−1(1−α)1α)α|L|+1=(p−2α1−α)α|L|+1=(1−ε5+ε)α|L|+1

To sum it all up, we now have . Recalling the definition of , this inequality implies that there exists whose size is exactly , such that , i.e., there are more than vertices in which are connected to every vertex in . Therefore, the claim holds for every and such that: . Thus, given , the following values of satisfy the claim for every :

 α=1−ε6,β=1−ε5+ε,γ=min⎧⎨⎩1−ε,(1−ε5+ε)1−ε6⎫⎬⎭.\qed
###### Theorem 2.1.9.

The randomized -round bandwidth complexity of under edge insertions is .

###### Proof.

Let be a (randomized) -round algorithm that solves under edge insertions using bandwidth

with error probability

. Let be a parameter to be defined later, and consider a tripartite graph with nodes as in Figure 1.

Let be the set of all possible bipartite graphs with vertex sets and . Note that . For every and every , we define a sequence of changes as follows. We start with no edges. Then, we insert edges between and to get the bipartite graph . During the next rounds, we connect to every , one by one. Finally, we insert the edge . In the end of , after additional round of communication, node must output a list of all triangles containing . By construction, this list is uniquely determined by the set of neighbors of in . Thus, node needs to know the set of all neighbors of after additional round of communication.

We assume that the output of is correct with probability at least . Therefore, by Yao’s lemma, there exists a deterministic algorithm that solves the same problem correctly for at least of all inputs. We define a bipartite graph with node sets and , such that the edge exists if and only if the output of is correct for the sequence .

We have and . Also, by assumption, this graph contains at least of all possible edges. Therefore, by Lemma 1, there exists of size at least and of size at least , for some that depend only on , such that the output of is correct for the sequence for every and every .

Now, consider the input of node during any sequence . During the first stage of building the bipartite graph , is isolated and receives no input. Then, it receives a set of messages from the nodes in , and finally one additional message from . Note that the messages receives from the nodes in depend only on , and not on , since the nodes in cannot know the identity of until the final round of communication.

Now, on every round, every node in can send to any of possible messages. Altogether, during the entire sequence, the nodes of send to a set of messages. Hence, the number of possible inputs from the nodes of to is . Therefore, there exists of size at least , such that receives the same input from all nodes in for every sequence for and every . Thus, we have:

 |C2| ≥2−Bt(t+3)2|C1|≥2−Bt(t+3)2βγn−t−12t(n−t−1)=βγn−t−12t(n−t−1)−Bt(t+3)2 (4)

On the other hand, we can bound the size of by considering the number of possible neighbors of in any , for every . Recall that during the sequence , receives only one message from . Also, for every , must determine the set of all neighbors of in . Since there are only possible inputs can receive from , every can have at most possible sets of neighbors in any .

Every can have any subset of as its set of neighbors, hence it can have at most possible sets of neighbors. Now, since every is uniquely determined by set of neighbors of every , we have:

 |C2|≤⎛⎝∏w∈W12B⎞⎠⎛⎝∏w∈W∖W12t⎞⎠=2B⋅|W1|⋅2t⋅(|W|−|W1|)=2(B−t)⋅|W1|+t(n−t−1) (5)

Combining (4) and (5) gives: , and setting gives, with some algebraic manipulations, . ∎

Finally, for node insertions, we show that every -round algorithm must use at least bits of bandwidth, which is tight by Theorem 2.1.8.

###### Theorem 2.1.10.

For every , the randomized -round bandwidth complexity of under node insertions is .

###### Proof.

Let be a (randomized) -round algorithm that solves under node insertions using bandwidth with error probability . We show that .

Let be any node, and let be the set of all possible graphs on the other nodes. For every we define the sequence as follows:

• Start with an empty graph (no nodes and no edges).

• During rounds, insert one node on each round and connect it to the nodes which have been already inserted, according to the edges in . After rounds, the graph is identical to the graph .

• On round insert and connect to all the other nodes.

After quiet rounds needs to output the list of all triangles that contain . Since is connected to all the other nodes, this implies that needs to know the graph . For every , the output of is guaranteed to be correct for the sequence with probability at least . Therefore, by Yao’s lemma, there exists a deterministic algorithm, , that guarantees that the output of is correct for at least of all sequences. That is, there exists a subset , whose size is at least , such that guarantees the correct output of for sequences for all .

Now, the number of possible graphs on nodes is , hence the size of is at least . Since is deterministic, and needs to distinguish correctly between all possible , this implies that the input receives from its neighbors must have at least possible values. Every neighbor of can send any of messages on every round, thus the number of possible inputs can receive on a single round is . Therefore, during rounds of communication, the number of possible inputs to is .

Combining the above we get that , which can be simplified to , and it follows that . ∎

### 2.2 Membership detection

Table 3 summarizes the results of this subsection.

#### 2.2.1 Upper bounds

The upper bounds for node deletions and edge deletions follow from Observation 1. The following shows that edge insertions can be handled with bits of bandwidth.

###### Theorem 2.2.1.

The deterministic -round bandwidth complexity of under edge insertions is .

###### Proof.

The algorithm works as follows. On every round, every node sends to all its neighbors an indication whether or not it got a new neighbor on the current round, along with the ID of the new neighbor (if any). We denote this information by NEWID. Note that with just this information, for every pair of adjacent edges , at least one of and know that these two edges exist (specifically, the first one connected to knows that the other one is also connected to ).

Additionally, every node sends to every neighbor one bit, indicating whether knows that is part of some triangle. We denote this bit by ACCEPT.

Suppose the edge is inserted and creates at least one triangle . As explained above, in this case at least one of and knows that the triangle exists, therefore it sends to the two other nodes. Thus all three nodes know that they are part of a triangle. It follows that on each round all nodes can determine whether they are in a triangle. ∎

We can extend the algorithm of Theorem 2.2.1 to handle node/edge deletions as well. Now, in addition to NEWID, every node sends to all its neighbors an indication whether or not it has lost a neighbor on the current round, along with the ID of the lost neighbor (if any). Also, every node sends every neighbor one additional bit, indicating whether received from any other node on the last round. We denote this bit by LAST.

Now, suppose that on round the edge is inserted and creates a triangle . As in Theorem 2.2.1, after one round of communication all three nodes can determine that they are part of a triangle. Moreover, both and send the appropriate value of NEWID to all their neighbors. Then, on round , every common neighbor of and sends to both of them . From this information, and can deduce the list of all of their common neighbors.

It follows that on every round, every node knows the exact set of triangles that contained it on the previous round. This allows every node to handle node/edge deletions appropriately, and to determine when all triangles that contained it are gone.

###### Corollary 2.2.2.

The deterministic -round bandwidth complexity of under node deletions and edge deletions/insertions is .

If we only consider sequences of graphs with bounded degree , and only allow edge insertions, the complexity of Theorem 2.2.1 can be improved to , using an algorithm similar to that of Theorem 2.1.4, but with bits instead of , as follows. On every round, every node sends to all its neighbors an indication whether or not it has a new neighbor. We denote this information by NEW. Additionally, whenever a new edge is inserted, the following happens:

• sends to an indication whether or not it knows about a triangle that contains .

• For every round within the last rounds, sends to an indication whether or not it has had a new neighbor on round .

• For every round within the last rounds, sends to an indication whether or not any of its neighbors has sent on round .

• computes the list of IDs of all its current neighbors, and starts sending it to , bits on every round. Since has at most neighbors, after rounds has the complete list. Note that by the time this process completes, the list may not be up-to-date.

All of this requires a bandwidth, and it can be shown, similarly to Theorem 2.1.4, that this allows every node to give the correct output in all cases.

For a quiet round we have an upper bound of bits from Observation 1, Theorem 2.1.6, and Corollary 2.1.7.

Finally, for node insertions, we have a trivial upper bound of bits. For a quiet round, the next theorem shows an upper bound of bits.

###### Theorem 2.2.3.

The deterministic -round bandwidth complexity of under node insertions is .

###### Proof.

On every round, every node sends to every neighbor two bits:

• One bit, denoted by NEW, indicates whether or not has a new neighbor which has been inserted on the current round.

• One bit, denoted by LAST, indicates whether or not any neighbor of other than has sent on the last round.

Consider a triangle and assume that is the last node inserted. When is inserted, and send to each other. Since only one node can be inserted on a single round, both and know that is a common neighbor, hence the triangle exists.

On the next round, both and send to . This implies that some neighbor of (resp. ) has sent on the last round, i.e., some neighbor of (resp. ) has had a new neighbor inserted on the last round. Since only one node can be inserted on a single round, can determine that the new neighbor must be itself, that is, some neighbor of (resp. ) is now also a neighbor of . Hence can determine that it is part of at least one triangle, and output as required. ∎

The above algorithm can be executed in parallel with the algorithm of Corollary 2.1.7 to handle all four types of changes. However, we now have a problem combining node insertions and edge insertions, just as we had a problem in Corollary 2.1.7 when we combined edge deletions and node deletions. The problem is that when a node has a new neighbor , it does not know whether the edge was inserted on the current round, or is a new node which was inserted on the current round and may be connected to other nodes as well. For example, assume has two neighbors, and , and the edge does not exist. Then, either the edge is inserted, or a new node is inserted and connected to both and . In both cases, and send to , and cannot distinguish between the former case (in which it should output 1), and the latter case (in which it should output 0).

To solve this problem, we can have every new node indicate to all its neighbors that it is new. Thus, whenever a node has a new neighbor , after one round of communication can determine whether is a new node or not and send this information to all its neighbors. This allows all nodes to distinguish between the two problematic cases we described, and give the correct output in all cases.

###### Corollary 2.2.4.

The deterministic -round bandwidth complexity of under node/edge deletions/insertions is .

#### 2.2.2 Lower bounds

For node deletions and edge deletions, we have trivial constant lower bounds, which are tight, as shown above. For edge insertions, we have shown a general algorithm that uses bits, and also an algorithm that uses bits for graphs with bounded degree . The latter algorithm implies that showing a lower bound of bits for the bandwidth complexity of this problem would require looking at sequences of graphs with degree at least . In particular, in order to show that the algorithm of Theorem 2.2.1 is optimal, one has to consider sequences of graphs with degree at least . Other than that, it remains an open question whether or not the algorithm of Theorem 2.2.1 can be improved.

###### Open Question 1.

What is the -round bandwidth complexity of under edge insertions?

Finally, for node insertions, the following theorem shows a lower bound of bits.

###### Theorem 2.2.5.

The randomized -round bandwidth complexity of under node insertions is .

###### Proof.

Let be a (randomized) -round algorithm that solves under node insertions using bandwidth with error probability . Fix , let , and let be the set of all possible graphs on the nodes of . For every and every , define the sequence as follows:

• Start with an empty graph (no nodes and no edges).

• During rounds, insert one node of on each round and connect it to the nodes which have been already inserted, according to the edges in . After rounds, the graph is identical to the graph .

• On round insert and connect it to and .

Then, should output 1 iff the edge exists in . By our assumption, for every and every , the output is correct with probability at least . Note that during the final round, receives only one message from each of and . Also, during this final round, and do not know the identity of the other neighbor of . Hence, the message received from depends only on the identity of and the graph , and not on the identity of , and the message received from depends only on the identity of and the graph .

Now, consider the following experiment for a given graph . First, we run the sequence for some , and stop just before the last round, in which is connected to and . Then, every node generates a message to be sent to , as if it has been connected to on the final round. For every , let be the message generated by (note that

is a random variable).

Note again, that the messages generated by the nodes of depend only on the graph , and not on the other nodes that may have been connected to on the last round. Therefore, for every , given the messages generated by and , should be able to determine, with probability at least , whether or not the edge exists in .

Next, for every pair of nodes , let be the output of given the two messages and . Note that for nodes , the variables and are not necessarily independent. Now, let be the graph on the nodes of , in which the edge exists if and only if . We consider to be the result of the experiment.

Let denote the probability that at the end of the experiment we have . Since, for every , the value of corresponds to the edge in the graph with probability at least , we have . Summing the above for every we get:

 ∑CpC≥|C|⋅(1−ε)(n−12)=(2−2ε)(n−12) (6)

On the other hand, consider the set of messages generated by the nodes of at the end of the first stage of the experiment. For every possible set of messages generated by the nodes of during the first stage of the experiment, denote by the probability for generating exactly the messages of . Also, for every , let denote the probability for the result of the experiment to be equal to , given the set of generated messages . We have:

 ∑CpC=∑C∑MϕC(M)⋅ΨM(C)≤∑C∑MΨM(C)=∑M∑CΨM(C)=∑M1=|M|

where is the set of all possible values of . Since every message has exactly possible values, the number of possible sets of messages is , and hence . Combining this with (6) gives . After some simplifications we get the desired bound:

 B≥log(2−2ε)⋅n−22=Ω(n)\qed

### 2.3 Listing and detection

Table 4 summarizes the results of this subsection.

#### 2.3.1 Upper bounds

The upper bounds for node deletions and edge deletions follow from Observation 1 and the results of the last subsection.

For edge insertions, the algorithm of Theorem 2.1.6, which solves in rounds, guarantees that on every round, every triangle is known to at least one of its nodes. Hence, it can be used to solve in round.

###### Corollary 2.3.1.

The deterministic -round bandwidth complexity of under edge insertions is .

The same is true for the algorithm of Corollary 2.1.7, where we also handle node/edge deletions. Therefore:

###### Corollary 2.3.2.

The deterministic -round bandwidth complexity of under node deletions and edge deletions/insertions is .

Considering node insertions, the problem can be solved with bits of bandwidth.

###### Theorem 2.3.3.

The deterministic -round bandwidth complexity of under node insertions is .

###### Proof.

The algorithm is as follows: on every round, every node sends to each one of its neighbors an indication whether or not it got a new neighbor on the current round. Thus, whenever a node is inserted and creates a triangle , receives this indication from (and vice versa). Since also got connected to on the current round, and since only one node can be inserted on every round, can deduce that the triangle exists.

Note that also receives the same indication from , and can deduce that the triangle exists. Thus, this algorithm guarantees that every triangle is known to at least two of its nodes. ∎

In order to handle node deletions and edge deletions, we can combine the above algorithm with the technique used in Corollary 2.1.7 to distinguish between the deletion of an edge and the deletion of a node. This technique ensures that when either a noe or an edge is delete on round , all incident nodes can determine, on round , whether an edge or a node was deleted. This, combined with the guarantee that every triangle is known to at least two of its nodes, ensures that on every round at least one node can determine whether the triangle still exists, even if a node or an edge was deleted on the current round. Thus, listing all triangles is possible on every round, as required.

###### Corollary 2.3.4.

The deterministic -round bandwidth complexity of under node/edge deletions/insertions is .

By Observation 1, all upper bounds shown here for also hold for .

#### 2.3.2 Lower bounds

It is not clear whether it is possible to handle both node insertions and edge insertions with bits of bandwidth. The algorithm of Corollary 2.2.2 can be used to handle all four types of changes with bits. Other than that, the exact bandwidth complexity of this combination is an open question.

###### Open Question 2.

What is the -round bandwidth complexity of under node/edge insertions?

## 3 Larger cliques

Throughout this section, let be some constant, and denote by a clique on nodes.

### 3.1 Membership listing

Table 5 summarizes the results of this subsection.

#### 3.1.1 Upper bounds

For every node , the set of all cliques that contain is completely determined by the set of all triangles that contain . Therefore, every algorithm that solves can be used to solve under the same set of changes. All upper bounds follow thus from the upper bounds for given in Section 2.1.1.

#### 3.1.2 Lower bounds

For node deletions and edge deletions we have the trivial lower bounds of and , respectively, both of which are tight.

The lower bound for edge insertions is shown next.

###### Theorem 3.1.1.

The randomized -round bandwidth complexity of under edge insertions is .

###### Proof.

The proof is almost identical to the proof of Theorem 2.1.9, with only one difference: instead of starting with an empty tripartite graph, we add a clique on nodes, which are connected to every node in the graph except . The initial graph now looks like this:

with edges between every node in and every other node except .

As in Theorem 2.1.9, for every bipartite graph between the nodes of and and every node , we define a sequence of changes as follows. We start with the initial graph defined above. Then, we insert edges between and to get the bipartite graph . Then, during the next rounds, we connect to every node in , one by one. Finally, we insert the edge . Note that now, since is connected to all nodes in and , the set of instances of that contain is uniquely determined by the set of neighbors of in . Therefore, after a single round of communication, should be able to determine the set of all neighbors of in .

The proof proceeds as in Theorem 2.1.9. The size of is now , and the number of messages that receives from the nodes of and is now . We end up with the following inequality, where for some constants :