Abstract 1 Introduction 2 Model and Preliminary Results 3 Deterministic Even-Cycle Detection 4 Proof of Density Theorem 5 Conclusion References Appendix A Proof of Lemma 9

Deterministic Even-Cycle Detection in Broadcast CONGEST

Pierre Fraigniaud ORCID Université Paris Cité, CNRS, IRIF, Paris, France Maël Luce ORCID Nagoya University, Japan Frédéric Magniez ORCID Université Paris Cité, CNRS, IRIF, Paris, France Ioan Todinca ORCID LIFO, Université d’Orléans and INSA Centre-Val de Loire, Orléans, France
Abstract

We show that, for every k2, C2k-freeness can be decided in O(n11/k) rounds in the Broadcast CONGEST model, by a deterministic algorithm. This (deterministic) round-complexity is optimal for k=2 up to logarithmic factors thanks to the lower bound for C4-freeness by Drucker et al. [PODC 2014], which holds even for randomized algorithms. Moreover it matches the round-complexity of the best known randomized algorithms by Censor-Hillel et al. [DISC 2020] for k{3,4,5}, and by Fraigniaud et al. [PODC 2024] for k6. Our algorithm uses parallel BFS-explorations with deterministic selections of the set of paths that are forwarded at each round, in a way similar to what was done for the detection of odd-length cycles, by Korhonen and Rybicki [OPODIS 2017]. However, the key element in the design and analysis of our algorithm is a new combinatorial result bounding the “local density” of graphs without 2k-cycles, which we believe is interesting on its own.

Keywords and phrases:
local computing, CONGEST model
Category:
Track A: Algorithms, Complexity and Games
Copyright and License:
[Uncaptioned image] © Pierre Fraigniaud, Maël Luce, Frédéric Magniez, and Ioan Todinca; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Distributed algorithms
Related Version:
arXiv: https://arxiv.org/abs/2412.11195 [7]
Funding:
Research supported in part by the European QuantERA project QOPT (ERA-NET Cofund 2022-25), the French ANR project DUCAT (ANR-20-CE48-0006), the French PEPR integrated project EPiQ (ANR-22-PETQ-0007), the French project FQPS (ANR-21-CMAQ-0001), and the Japanese grants JSPS KAKENHI 24H00071, JST ASPIRE JPMJAP2302 and MEXT Q-LEAP JPMXS0120319794.
Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis

1 Introduction

In the context of distributed computing in networks, deciding H-freeness for a given (connected) graph H has attracted a lot of attention in the standard CONGEST model (see, e.g., the survey [2]). Indeed, this problem is inherently local, and thus the main concern is measuring the amount of information that must be exchanged between the nodes for solving it. Recall that the CONGEST model [11] assumes n processing nodes connected as an n-node graph G=(V,E). Computation proceeds as a sequence of rounds. During each round, every node can send an O(logn)-bit message to each of its neighbors, receive the messages sent by its neighbors, and perform some individual computation. In the broadcast version of the model, which is the one used in this paper, it is required that, at each round, each node sends the same message to all its neighbors. An algorithm decides H-freeness if, for every graph G, the following holds: If G contains a subgraph isomorphic to H then at least one node rejects, otherwise all nodes accept.

For every k3, let Ck denote the k-node cycle. It is known that, for every k2, there exists a deterministic algorithm deciding C2k+1-freeness in O(n) rounds [9], which is optimal up to logarithmic factors. It is however possible to decide the presence of even-size cycles in a sub-linear number of rounds. In particular, there exists a deterministic algorithm deciding C4-freeness in O(n) rounds [4], which is optimal up to logarithmic factors, even for randomized algorithms. For every k>2, there exist randomized algorithms deciding C2k-freeness in O(n11/k) rounds [3, 6]. The algorithms in [3], based on the “local threshold” technique, apply to 2k5, whereas the algorithms in [6], based on the “global threshold” technique, apply to all k2.

All aforementioned randomized algorithms are 1-sided, i.e., if G contains a 2k-cycle, then the probability that at least one node rejects is at least 2/3, but if G does not contain a 2k-cycle, then the probability that all nodes accept is 1. Of course, the error probability of these algorithms can be made as small as desired by mere repetition. Yet, it may still be the case that G contains a 2k-cycle that is not detected, even if this occurs with arbitrarily small probability. This raises the question of whether C2k-freeness can be decided by a deterministic algorithm (which would thus provide absolute success) without increasing the round complexity. This is the case for all odd cycles of length 5, and for 4-cycles [4, 9]. We show that this holds for all even cycles as well, by establishing the following result.

Theorem 1.

For every k2, there is a deterministic algorithm solving C2k-freeness in O(n11/k) rounds in the Broadcast CONGEST model.

Our deterministic algorithm solving C2k-freeness in O(n11/k) rounds is generic, parameterized by k. For k=2, i.e., for C4-freeness, our algorithm coincides with the one in [4]. In fact, our algorithm can be viewed as a generalisation of the latter. As for the algorithms in [3, 6], they distinguish the case of light cycles, i.e., 2k-cycles containing solely nodes with degree smaller than n1/k, from the case of heavy cycles, i.e., 2k-cycles containing at least one node with degree at least n1/k. Light cycles can be easily detected deterministically by flooding, in O(n11/k) rounds [3, 6], and the main issue is to show that heavy cycles can also be detected deterministically in O(n11/k) rounds. We show that this is indeed possible.

Our algorithm (for detecting heavy cycles) relies on combining the Representative Lemma by Monien [10], with a new “Density Theorem”. In a nutshell, the Representative Lemma can be used to show that, as already observed in [8, 9], for each source node v, it is not necessary for intermediate nodes to forward all prefixes of paths with endpoint v for eventually finding one path forming a cycle containing v, but forwarding a constant number of prefixes suffices. Our density theorem is used to show that, if a node v has to forward ω(n11/k) prefixes of paths in total (i.e., corresponding to ω(n11/k) source nodes v), then there must exist a 2k-cycle in the graph G. More precisely, our theorem states the following.

Theorem 2.

Let G=(V,E) be an n-node graph. For every vV, and every integer 1, let R(v)V be the set of nodes that are reachable from v by a simple path of length exactly . For every integer k2, if there exist vV and {1,,k1} such that

uR(v)deg(u)>6(2k)n,

then there is a 2k-cycle in G.

Combining the Representative Lemma by Monien [10] with our density theorem, our algorithm for heavy 2k-cycles boils down to flooding the network for k steps with path-prefixes originated at all heavy nodes v, under the following simple condition: at every step {1,,k}, if a node u has to forward prefixes coming from more than 6(2k)n11/k heavy nodes then u rejects.

If flooding is completed without any rejection then the Representative Lemma guarantees that a 2k-cycle will be detected if any. Instead, if flooding aborts at some rejecting nodes, then the density theorem guarantees that this rejection is legitimate as there must exist a 2k-cycle.

2 Model and Preliminary Results

This section recalls the standard (Broadcast) CONGEST model, and takes benefit of the 4-cycle detection algorithm in [4] for introducing the reader with some of the techniques that will be reused throughout the paper. This is particularly the case of the Representative Lemma by Monien [10], which is the basis for implementing a filtering technique enabling to bound the congestion of cycle-detection algorithms.

2.1 The Broadcast CONGEST Model

The CONGEST model [11] assumes n1 processing nodes connected by a network modeled as an arbitrary n-node graph G=(V,E). (All graphs are supposed to be connected and simple, i.e., no multiple edges nor self-loops.) Each node v in G has an identifier 𝗂𝖽(v) taken from a polynomial range of identifiers, and thus encoded on O(logn) bits. Each identifier is unique in the network. Computation proceeds as a sequence of synchronous rounds. All nodes start synchronously, at round 1. At each round, every node v can (1) send an O(logn)-bit message to each of its neighbors in G, i.e., to each node uN(v), (2) receive the messages sent by its neighbors, and (3) perform some individual computation. No limit is placed on the amount of computation that each node performs at each round. Initially, every node v knows its identifier 𝗂𝖽(v) and the size n of the graph it belongs to. No other information about the graph is provided to the nodes. All nodes perform the same algorithm, but the behavior of the nodes may vary along the course of execution of that algorithm, depending on the information acquired by them in each round (including their IDs).

The Broadcast CONGEST model is a restricted variant of the CONGEST model which requires each node to send the same O(logn) bit message to all its neighbors, at every round. (Of course, the messages sent by a same node v at two different rounds may be different.)

2.2 Deciding 𝑪𝟒-Freeness

The optimal (deterministic) algorithm for detecting 4-cycles in [4] can be artificially rewritten as Algorithm 1. Let us say that a node v is light if its degree satisfies deg(v)2n, and is heavy otherwise.

Phase 1 in Algorithm 1 is aiming at finding light 4-cycles, i.e., 4-cycles containing only light nodes. The for-loop of Instruction 5 consumes at most 2n rounds, as it involves light nodes only, i.e., the light node v has at most 2n neighbors, and thus at most 2n light neighbors. If a light 4-cycle is detected at Instruction 8, then v rejects appropriately.

Phase 2 is aiming at finding heavy 4-cycles, that is, 4-cycles containing at least one heavy node. The for-loop of Instruction 17 also consumes at most 2n rounds, merely because it is performed only if |𝗁𝖾𝖺𝗏𝗒(v)|2n. The main observation is that it is legal for a node v to reject if |𝗁𝖾𝖺𝗏𝗒(v)|>2n. This is due to the following simple fact.

Lemma 3.

For every n-node graph G=(V,E), if there exists vV such that the inequality uN(v)deg(u)>2n holds, then G contains a 4-cycle.

Proof.

Let U=N(v) and W=V(N(v){v}).

If there is yUW that has two distinct neighbors u and u in U, then v,u,y,u form a 4-cycle. Suppose on the contrary that every yUW has at most one neighbor in U. Then,

uUdeg(u)=deg(v)+uUdegU(u)+wWdegU(w)|U|+|U|+|W|2×|UW|2n.

Algorithm 1 Algorithm executed by every node vV for deciding C4-freeness in G=(V,E).

Thanks to Lemma 3, since |𝗁𝖾𝖺𝗏𝗒(v)|>2n implies that uN(v)deg(u)>2n, we get that G contains a 4-cycle, and thus it is indeed legal for v to reject at Instruction 15.

Our generic algorithm for detecting 2k-cycles for every k2 follows the general idea of Algorithm 1 in the sense that:

  1. 1.

    it is also split into two phases, one for light cycles (i.e., containing only nodes with degree smaller than n1/k), and one for heavy cycles (i.e., containing at least one node with degree at least n1/k), and

  2. 2.

    it also utilizes a threshold as in Instruction 14, which is tuned depending on k.

In both phases, paths are broadcast among the nodes in the network. That is, every node v participating in the broadcast sends its identifiers to its neighbors, which concatenate their identifiers, and forward the resulting 1-edge path to their neighbors. After r rounds of such a process, every node u receives a set of paths, each of the form (𝗂𝖽(w0),,𝗂𝖽(wr1)), concatenates its identifier to each of these paths, and forwards the resulting set of paths, each of the form (𝗂𝖽(w0),,𝗂𝖽(wr1),𝗂𝖽(u)) to all its neighbors. In itself, such a process would however create huge congestion. Indeed, the number of paths circulating in the network would grow exponentially. Nevertheless, reducing drastically the number of paths can be achieved thanks to a simple application of the Representative Lemma by Monien [10], as it was done in, e.g., [8, 9], which is explained a bit further in the text. Before that, let us quickly cover the study of so-called light cycles, for which broadcast works without filtering.

2.3 Detection of Light 𝟐𝒌-Cycles

For every k2, the detection of light 2k-cycles, i.e. of 2k-cycles containing only nodes of degree at most n1/k, can be done in a straightforward manner in O(n11/k) rounds. It is indeed sufficient to consider the subgraph Glight of the input graph G induced by the light nodes of G. The detection proceeds by looking for all 2k-cycles Glight passing through v, for all nodes vV(Glight) in parallel.

Specifically, the algorithm proceeds by flooding, during k phases. At the first phase (which lasts one round), every vV(Glight) forms the path P=(v) consisting of the single node v, and sends it to all its neighbors in Glight. At every phase p2, for every node vV(Glight), and for every simple path P=(u1,,up1) received by v during phase p1, if v{u1,,up1}, then v appends its identifier to P for forming the path P=(u1,,up1,v), which is forwarded to all of v’s neighbors in Glight.

After k phases, if a node v has received a simple path P=(u1,,uk) from a neighbor uk, and a simple path P=(u1,,uk) from a neighbor uk, with u1=u1, PP={u1}, and vPP, then v rejects. Otherwise v accepts. We show that this simple flooding algorithm detects light 2k-cycles in O(n11/k) rounds.

Lemma 4.

For every k2, there is a deterministic algorithm running in O(n11/k) rounds in n-node graphs under the Broadcast CONGEST model such that, for every graph G, if G contains a light 2k-cycle (i.e., a cycle containing only nodes of degree smaller than n1/k) then at least one node rejects, otherwise all nodes accept.

Proof.

We analyze the simple flooding algorithm described above. Whenever a node rejects, this is because it has received a simple path P=(u1,,uk) from uk, and a simple path P=(u1,,uk) from uk, with u1=u1, PP={u1}, and vPP, which implies that (u1,,uk,v,uk,,u2) is a 2k-cycle, i.e., there is indeed a light 2k-cycle in G. Conversely, let (w1,,w2k) be a light 2k-cycle. The two paths P=(w1,,wk) and P=(w1,w2k,,wk+1) will be received by node wk+1 after k phases, leading node wk+1 to reject, as desired.

For the round-complexity, it is sufficient to notice that, by definition, Glight has maximum degree at most n1/k. It follows that, for every vV(Glight), and for every p{0,,k1}, the number of simple paths of length p with one end equal to v is at most np/k. As a consequence, the round complexity of the flooding algorithm is

p=0k1(p+1)np/kk2n(k1)/k=k2n11/k=O(n11/k),

as claimed.

The main difficulty is detecting heavy cycles, that is, cycles containing at least one node of degree at least n1/k. Among other techniques, one needs filtered flooding, explained in the next section.

2.4 Filtered Flooding

2.4.1 Representative Lemma

Monien [10] defines a representative of a family of subsets of ground set [n]={1,,n} as follows.

Definition 5.

For every integer n1, every family 𝒜2[n] of subsets of [n], and every q[n], a family of sets 𝒜 is a q-representative of 𝒜 if, for every set X[n] of size |X|q, the following holds:

A𝒜 such that AX=B such that BX=.

Note that it follows directly from the definition that the q-representativity property is transitive, which is important as our algorithm for C2k-freeness will perform several nested iterations of computing a q-representative set.

Fact 1.

For every n1, 𝒞𝒜2[n], and q[n], if is q-representative for 𝒜, and 𝒞 is q-representative for , then 𝒞 is q-representative for 𝒜.

The following lemma says that if the sets in the family 𝒜 have bounded size p, then there exists a q-representative of 𝒜 with bounded size.

Lemma 6 (Monien [10]).

For every integer n1, every (p,q)[n]×[n] such that p+qn, and every family 𝒜2[n] of subsets of [n], if |A|p for all A𝒜, then there exists a q-representative family 𝒜 of 𝒜 such that

||(p+qp).

To get a flavor of this lemma, observe that if p+q=n and 𝒜={A[n],|A|=p}, then the bound of Lemma 6 is tight. Indeed, 𝒜 is then the set of all subsets of [n] of size p, meaning that |𝒜|=(np). Now suppose that 𝒜, then any A𝒜 is such that A([n]A)= but there is no B that does not intersect [n]A. The only q-representative family of 𝒜 is itself.

2.4.2 Application to Cycle Detection

The Representative Lemma (Lemma 6) is particularly useful in the context of 2k-cycle detection for limiting congestion. Indeed, let us assume that one is questioning whether there is a 2k-cycle in the n-node graph G=(V,E) containing a given node vV. One way to proceed is to let v broadcast its identifier for k rounds. That is, at step p=0, v sends 𝗂𝖽(v) to all its neighbors. Then, at step p=1, every neighbor uN(v) appends its identifier to encode the 1-edge path (v,u), and forwards this path to all its neighbors. More generally, if the flooding process is not filtered, then, at step p{1,,k1}, a node u receiving a simple path P=(v0,,vp1) with v0=v appends u to P whenever u{v0,,vp1}, and forwards the resulting augmented path to all its neighbors. At the end of step k1, if a node u has received two simple paths P=(v0,,vk1) and P=(v0,,vk1) with v0=v0=v, uPP, and PP={v}, then u has detected a 2k-cycle containing v.

The absence of filtering in the above process may result in an exponential increase of the number of paths to be forwarded by an intermediate node u. This can be avoided using Lemma 6 by the following filtering process. Let us assume that, at step p{1,,k1}, a node u receives a collection 𝒜 of p-node simple paths, all with endpoint v. Each path can be viewed as a set of p nodes, i.e., a subset of the n-node set V with cardinality p. Let q=2kp. Lemma 6 says that there exists 𝒜 of cardinality ||(2kp) such that, for every simple path X=(u0,,u2kp1) from u0=u to u2kp1N(v), if there exists a path A𝒜 that does not intersect with X, i.e., such that AX is a 2k-cycle containing v, then there exists a path B that does not intersect with X, i.e., such that BX is also a 2k-cycle containing v. The filtering process consists for node u to forward the family , after concatenating itself to every path in it, instead of 𝒜. By the filtering technique, we have the following.

Fact 2.

Each intermediate node u forwards at most (2kp) paths of size p+1 and of endpoint v at each round p{0,,k1}.

Hence, the number of paths forwarded by a node u is constant for a fixed k. As a consequence, we get the following.

Fact 3.

For every k2, every n-node graph G=(V,E), and every vV, checking whether there is a 2k-path in G containing v takes at most p=0k1(p+1)(2kp)<k22k rounds in the Broadcast CONGEST model.

3 Deterministic Even-Cycle Detection

This section is dedicated to the proof of Theorem 1 assuming that the density theorem holds (cf. Theorem 2). The density theorem will be established in the next section. We start here by describing our algorithm for deciding C2k-freeness, and then we proceed to the proof of Theorem 1.

3.1 Algorithm Description

Algorithm 2 solves the detection of 2k-cycles. As Algorithm 1, it is split into two phases, one aiming at detecting light 2k-cycles, and one aiming at detecting heavy 2k-cycles, where a 2k-cycle is light if it contains only nodes of degree smaller than n1/k, and it is heavy otherwise. The second phase, that is, the detection of heavy cycles, uses the filtering techniques (see Instruction 29) based on Lemma 6, and detailed in Section 2.4.2. The detection of light cycles has already been described and analyzed in Section 2.3, and this section focuses on Phase 2, i.e., the detection of heavy cycles, starting at Instruction 18.

Algorithm 2 Algorithm run by every node vV for deciding C2k-freeness in G=(V,E).

In Algorithm 2, every node v of a graph G=(V,E) maintains a collection of local variables. The set 𝗁𝖾𝖺𝗏𝗒(v) contains all heavy neighbors of v in G, thanks to Instruction 1. For every wV, the set 𝒬(w,v) contains a collection of simple paths with endpoints v and w. At the beginning of -th iteration of the for-loop of Instruction 23, 𝒬(w,v) contains paths of length exactly , which are eventually updated at the end of the -th iteration (cf. Instruction 35) to paths of length +1. At each iteration, the set W(v) is the set of nodes w such that there is at least one path from w to v in 𝒬(w,v), i.e., 𝒬(w,v) is not empty.

The main point in Algorithm 2 is the test performed at Instruction 25, which stipulates that if W(v) is too big, i.e., if v is connected to too many (heavy) nodes w by a path of length  at iteration , then v rejects. If v does not reject, then it carries on the flooding of path-prefixes, by applying filtering for preserving the fact that, for each wW(v), |𝒫(w,v)|(2k+1) at every iteration (cf. Fact 2). At the end of each iteration  of the for-loop of Instruction 23, node v appends 𝗂𝖽(v) to each path received during that iteration (see Instruction 35). That is, node v appends 𝗂𝖽(v) to each path P𝒫(w,u) not containing v, for all neighbors uN(v), and it resets 𝒬(w,v) accordingly.

Finally, if node v has received two paths P and P of length k, both in 𝒬(w,v) for some wV, i.e., both with endpoints v and w, such that the concatenation of P and P forms a 2k-cycle, then v rejects.

3.2 Proof of Theorem 1

In absence of the threshold condition at Instruction 25, Algorithm 2 merely consists of building longer and longer paths between v and some nodes wV, such that if there exists v and w for which there exists two paths P and P of length k between v and w that are internally disjoint, that is if PP form a 2k-cycle, v will detect that fact, and reject accordingly. As already discussed before, the filtering of Instruction 29 does not prevent the algorithm from finding such paths, if any. The main issue is that Algorithm 2 stops at iteration  whenever |W(v)|>6(2k)n11/k. Let us show that stopping under this condition is fine, as it implies the existence of a 2k-cycle.

Let us assume that there exists a node v such that, at iteration {1,,k1} of the for-loop of Instruction 23, |W(v)|>6(2k)n11/k. At iteration , W(v) is the set of heavy nodes w such that there is a simple path of length exactly starting at w and ending at v. Using the notation of Theorem 2, let R(v)V be the set of nodes that are reachable from v by a simple path of length exactly . We have W(v)R(v). It follows that

wR(v)deg(w)wW(v)deg(w)|W(v)|n1/k>6(2k)n11/kn1/k=6(2k)n. (1)

By Theorem 2, G contains a 2k-cycle, and thus node v rejects rightfully.

It remains to show that the round complexity of Algorithm 2 is O(n11/k). Phase 1, dedicated to the search of light 2k-cycles, takes this many rounds, as established in Lemma 4. Let us show that Phase 2, dedicated to the search of heavy 2k-cycles, has the same complexity. By Fact 3, for every node v and every heavy node w, the final set 𝒬(w,v) at iteration =k1 at Instruction 35 is built after at most k22k rounds. By the threshold condition of Instruction 25, the number of families 𝒫(w,v) to be transmitted by v is at most 6(2k)n11/k. So, in total, Phase 2 of Algorithm 2 performs in at most k22k6(2k)n11/k rounds, that is O(n11/k) rounds for a fixed k. This completes the proof of Theorem 1 (under the assumption that Theorem 2 holds). ∎

4 Proof of Density Theorem

4.1 General Construction

This section is dedicated to the proof of Theorem 2. Let G=(V,E) be an n-node graph. Let k2, {1,,k1}, and vV. Let R(v) be the set of nodes of G that are reachable from v by a simple path of length exactly , and let us assume that

wR(v)deg(w)>6(2k)n.

Our goal is to show that there is a 2k-cycle in G. In the following, we fix

τ=6(2k). (2)

Let F be the set of edges incident to at least one node in R(v). Let FintF be the set of edges whose both endpoints are in R(v), and let Fext=FFint.

Lemma 7 (S. Burr [1]).

Every m-edge graph contains a bipartite subgraph with at least m/2 edges.

Thanks to Lemma 7, there exists a bipartite subgraph of the graph G[Fint] induced by Fint with at least |Fint|/2 edges. Let FintFint be the set of edges of this bipartite graph, hence |Fint||Fint|/2.

Furthermore, Fext also induces a bipartite subgraph as all of its edges have exactly one end in R(v).

Let H be the bipartite graph defined as the subgraph of G induced by Fint if |Fint||Fext|, or as the subgraph of G induced by Fext otherwise. That is,

H={G[Fint]if |Fint||Fext|G[Fext]otherwise.

Let (X,Y) be a partition of the vertices of H, such that

XR(v).

Note that some nodes in Y may also belong to R(v). H satisfies the following.

Fact 4.

H=(X,Y,EH) is a bipartite subgraph of G with at least 16τn edges.

Proof.

We have

|F|=|Fext|+|Fint||Fext|+2|Fint|3|EH|.

Since

2|F|wR(v)deg(w)>τn,

the claim follows.

To prove the existence of a 2k-cycle in G, we will prove that there exist three simple paths P, P, and P′′ in G such that:

  • P is of length λ for some λ{1,,} connecting a node xX to some node uV.

  • P is a path in H of length 2k2λ1 connecting x to a node yY. Note that, since H is bipartite, P alternates between nodes in X and nodes in Y.

  • P′′ is a path of length λ+1 connecting y to u.

Moreover, our construction will guarantee that P, P and P′′ are internally disjoint, in the sense that PP={x}, PP′′={u}, and PP′′={y}. This is sufficient for establishing Theorem 2 as PPP′′ is a 2k-cycle in G. To exhibit these three paths, let us introduce some notations.

4.2 The Sets In and Out

For every uV, and every i{0,,}, let us denote by 𝒬i(u) the set of simple paths of length exactly i with one endpoint equal to u, and the other endpoint equal to some node in X.

For every uV, and i{0,,}, we define the two sets 𝗂𝗇i(u) and 𝗈𝗎𝗍i(u) as subsets of edges from H. Intuitively, the set 𝗈𝗎𝗍i(u) can be viewed as a set of edges that u sends to its neighbors at round i in a (virtual) distributed protocol that broadcasts sets of edges of H throughout the network G, and 𝗂𝗇i(u) can be viewed as a set of edges that u receives from its neighbors at round i of this protocol. Let EH(u) denote the set of edges incident to u in H. For every uV, let

𝗈𝗎𝗍0(u)={EH(u)if uX,otherwise. (3)

That is, 𝗈𝗎𝗍0(u) can be viewed as the initialization of the aforementioned (virtual) broadcast protocol, i.e., initially, every node in X sends its incident edges in H to its neighbors in G. Now, let us define the sets 𝗂𝗇i(u) and 𝗈𝗎𝗍i(u) for every uV and i1, where, again, 𝗂𝗇i(u) can be viewed as the set of edges received by u at round i (which were sent by u’s neighbors at round i1), and 𝗈𝗎𝗍i(u) can be viewed as the set of edges forwarded by u at round i. A key point is that u does not forward all the received edges, but a carefully chosen subset of these edges.

Formally, for every uV and every i{1,,}, let

𝗂𝗇i(u)={wN(u)P𝒬i1(w),(P,u)𝒬i(u)}𝗈𝗎𝗍i1(w). (4)

That is, 𝗂𝗇i(u) merges all edges from sets 𝗈𝗎𝗍i1(w) for all neighbors w of u such that at least one path in 𝒬i1(w) can be extended into a path in 𝒬i(u) (see Figure 1).

Figure 1: Construction of the set 𝗂𝗇i(u) from the sets 𝗈𝗎𝗍i1(w), wN(u). In the figure, 𝗂𝗇i(u)=𝗈𝗎𝗍i1(w)𝗈𝗎𝗍i1(w) because there is a simple path P (resp., P) of length i1 from w (resp., w) to X that can be extended to a simple path of length i from u to X. For every yY, 𝗂𝗇i(y,u)=EH(y)𝗂𝗇i(u).

To define 𝗈𝗎𝗍i(u), we first define the sets 𝗂𝗇i(w,u) and 𝗈𝗎𝗍i(w,u), the subsets of edges respectively in 𝗂𝗇i(u) and 𝗈𝗎𝗍i(u) incident to node wXY (see Figure 2). For every i{1,,}, for every node w of H, i.e., for every wXY, and every uV, let

𝗂𝗇i(w,u)=EH(w)𝗂𝗇i(u). (5)

For every vertex uV, and every i{1,,}, we construct the edge-set 𝗈𝗎𝗍i(u) by defining, for each yY, a subset 𝗈𝗎𝗍i(y,u) of 𝗈𝗎𝗍i(u) containing edges of 𝗈𝗎𝗍i(u) incident to y. First, for every yY and uV, we set

𝗈𝗎𝗍0(y,u)=EH(y)𝗈𝗎𝗍0(u)={{y,u}if {y,u}EHotherwise

For every uV and i{1,,}, and for every yY, we set

|𝗂𝗇i(y,u)|<(2k)i𝗈𝗎𝗍i(y,u)=𝗂𝗇i(y,u). (6)

The definition of 𝗈𝗎𝗍i(y,u) when |𝗂𝗇i(y,u)|(2k)i requires more care. Let Hi(u) be the subgraph of H induced by all edges in yY𝗂𝗇i(y,u) where one keeps only the large sets 𝗂𝗇i(y,u), that is,

Hi(u)=G[{yY:|𝗂𝗇i(y,u)|(2k)i}𝗂𝗇i(y,u)]. (7)

Note that, by construction, every edge e𝗂𝗇i(u)=yY𝗂𝗇i(y,u) is either in Hi(u), or in the set 𝗈𝗎𝗍i(y,u) where yY is incident to e.

Figure 2: Construction of the set 𝗈𝗎𝗍i(u)=yY𝗈𝗎𝗍i(y,u) from the sets 𝗂𝗇i(y,u), yY.

We are now going to update Hi(u) iteratively, by repeating the following sequence of “peeling” operations as long as they can be applied, i.e., as long as vertices can be removed. This sequence of operations bears similarities with the computation of the k-core of a graph, but the vertices of the partitions X and Y of H are here treated separately.

The peeling process applied to Hi(u)

Repeat until no nodes can be removed:

  1. 1.

    Remove from Hi(u) all vertices xX of degree smaller than k, along with their incident edges in Hi(u), and update the degree of each vertex in Hi(u) accordingly;

  2. 2.

    Remove from Hi(u) all vertices yY of degree smaller than k, along with their incident edges in Hi(u), and update the degree of each vertex in Hi(u) accordingly;

  3. 3.

    For every yY, we set

    y removed at Instruction 2𝗈𝗎𝗍i(y,u)=EHi(u)(y) (i.e. the edges removed with y; (8)

    That is, 𝗈𝗎𝗍i(y,u) is defined as the set of edges incident to y that were removed from Hi(u) together with y at this iteration.

For any triple i1, uV, and yY satisfying |𝗂𝗇i(y,u)|(2k)i, if the value of 𝗈𝗎𝗍i(y,u) has not been set in the above process, then it is set to 𝗈𝗎𝗍i(y,u)=. That is, for every yY,

Eqs. (6) and (8) do not apply𝗈𝗎𝗍i(y,u)=.

Finally, we set

𝗈𝗎𝗍i(u)=yY𝗈𝗎𝗍i(y,u). (9)

Note that, for every i1, uV, and yY, we have

𝗈𝗎𝗍i(y,u)=EH(y)𝗈𝗎𝗍i(u).

This equality is extended to define, for every triple i1, uV, and xX,

𝗈𝗎𝗍i(x,u)=EH(x)𝗈𝗎𝗍i(u).

4.3 Core Graphs

The graph resulting from the above iterated process of edge- and vertex-removal from Hi(u) is denoted by 𝖢𝗈𝗋𝖾i(u). The core graphs play an important role in our proof. Indeed, we will show (see Lemma 9) that if 𝖢𝗈𝗋𝖾i(u) is non-empty for some i1 and uV, then G contains a 2k-cycle. The density theorem will then follow from the fact (established in Lemma 10) that there exists i and u such that 𝖢𝗈𝗋𝖾i(u) is non-empty.

Before proving Lemmas 9 and 10, let us establish a collection of statements for helping understanding the construction above. The fact below illustrates why one can view the sets 𝗈𝗎𝗍i(u) and 𝗂𝗇i(u) as produced by a (virtual) protocol broadcasting edges of H throughout the network G.

Fact 5.

For every simple path (u0,,u) in G with u0X, we have that, for every i{1,,},

𝗈𝗎𝗍i1(ui1)𝗂𝗇i(ui).
Proof.

By definition of set 𝒬i(ui), the set of simple paths of length exactly i with one endpoint equal to ui, and the other endpoint equal to some node in X, we have that, for every 1<i,

(u0,,ui1)𝒬i1(ui1),and(u0,,ui1,ui)𝒬i(ui).

Then by definition (Eq. (4)) of 𝗂𝗇i(u)={wN(u)P𝒬i1(w),(P,u)𝒬i(u)}𝗈𝗎𝗍i1(w), it follows that 𝗈𝗎𝗍i1(ui1)𝗂𝗇i(ui).

Lemma 8.

For every i{0,,}, uV, and e={x,y}𝗂𝗇i(u) with xX and yY, there is a simple path (u0,,ui) in G such that u0=x, ui=u, and ej=0i1𝗈𝗎𝗍j(y,uj).

To gain intuition about this statement, one can follow the idea of the virtual distributed protocol mentioned since the beginning of Section 4.2. This lemma states that any edge e=(x,y) that was received by u during the virtual protocol was first broadcast by x itself and forwarded along a path from x to u.

Proof.

Let ui=u. We show the following statement by induction on j=i down to j=1. There is a simple path

(Pj1,uj,,ui)𝒬i(ui)

such that Pj1𝒬j1(uj1) for some node uj1N(uj), and e𝗈𝗎𝗍j1(uj1).

  • The base case is j=i. By definition of 𝗂𝗇i(ui) (cf. Eq. (4)), there exists (Pi1,ui)𝒬i(ui) such that Pi1𝒬i1(ui1) for some ui1N(ui), and e𝗈𝗎𝗍i1(ui1). Furthermore, by definition of 𝒬i(ui), we have uiPi1.

  • For the induction step, let us assume that the claim is true for j+1 where j{1,,i1}. By induction, e𝗈𝗎𝗍j(uj), and, by construction of 𝗈𝗎𝗍j(uj), it also holds that e𝗂𝗇j(uj). This follows directly from Eq. (6), or from Eq. (8) after having noticed that, thanks to Eq. (7), E(Hi(u))𝗂𝗇i(u). Using Eq. (4) as in the base case, all points in the claim are satisfied.

Applying the claim for j=1, we get that there exists a path (P0,u1,,ui) such that P0𝒬0(u0) for some node u0N(u1), ej=0i1𝗈𝗎𝗍j(uj), and uj{u0,,uj1} for all j{1,,i}. The latter ensures that the path (u0,,ui) is simple. Using the definition of the set 𝒬j for j=0, it follows that P0=(u0)=(x). Moreover, since e is incident to y, and since ej=0i1𝗈𝗎𝗍j(uj), we get ej=0i1𝗈𝗎𝗍j(y,uj).

Fact 6.

For all i{1,,} and uV, every node yY𝖢𝗈𝗋𝖾i(u) satisfies |𝗂𝗇i(y,u)|(2k)i.

Proof.

The claim follows directly from Eq. (7), and the fact that 𝖢𝗈𝗋𝖾i(u)Hi(u).

Fact 7.

For all i{1,,} and uV, every node w𝖢𝗈𝗋𝖾i(u) is of degree at least k in the graph 𝖢𝗈𝗋𝖾i(u).

Proof.

The claim follows directly from the fact that, in the construction of 𝖢𝗈𝗋𝖾i(u), all nodes wXY with degree smaller than k are removed (cf. Steps 1 and 2 in the peeling).

Fact 8.

For every i{1,,}, yY, and uV, we have |𝗈𝗎𝗍i(y,u)|<(2k)i.

Proof.

The claim follows from the construction of set 𝗈𝗎𝗍i(y,u). If the set was constructed by Eq. (6) then 𝗈𝗎𝗍i(y,u)=𝗂𝗇i(y,u), and its size is smaller than (2k)i. If the set 𝗈𝗎𝗍i(y,u) was constructed by Eq. (8) then it contains edges adjacent to y in Hi(u) that were removed, precisely because the current degree of y was smaller than k. The remaining case is 𝗈𝗎𝗍i(y,u)= for which the claim holds trivially.

Fact 9.

For every i{1,,}, uV, and xX, we have

|𝗂𝗇i(x,u)||𝗈𝗎𝗍i(x,u)|+deg𝖢𝗈𝗋𝖾i(u)(x)+k1.
Proof.

Let us consider an edge e={x,y}𝗂𝗇i(x,u) with xX and yY. By Eq. (5), we have e𝗂𝗇i(y,u). The edge e satisfies one and only one of the following four cases.

  1. 1.

    e joins 𝗈𝗎𝗍i(y,u) by applying Eq. (6);

  2. 2.

    e is removed from Hi(u) along with vertex xX (cf. Step 1 in the peeling);

  3. 3.

    e is removed from Hi(u) along with vertex yY (cf. Step 2 in the peeling) – the edge e is then added to 𝗈𝗎𝗍i(y,u) according to Eq. (8);

  4. 4.

    e is never removed from Hi(u) – in this case, e belongs to 𝖢𝗈𝗋𝖾i(u);

In the first and third cases, we have e𝗈𝗎𝗍i(u) thanks to Eq. (9), and thus e𝗈𝗎𝗍i(x,u). The second case applies to at most k1 edges from 𝗂𝗇i(x,u). Finally, at most deg𝖢𝗈𝗋𝖾i(u)(x) edges satisfy the fourth case.

We are now ready to establish one of the two main arguments in the proof of our density theorem (see proof in Appendix A).

Lemma 9.

If there exist i{1,,} and uV such that 𝖢𝗈𝗋𝖾i(u) then there is a 2k-cycle in G.

Lemma 10.

There exists i{1,,1} and uV such that 𝖢𝗈𝗋𝖾i(u).

Proof.

The proof goes by contradiction. Let us assume that, for every i{1,,1} and every uV, we have 𝖢𝗈𝗋𝖾i(u)=. We are going to show that this implies |EH|<τn/6, contradicting Fact 4 (recall that τ was defined in Equation 2). Let xXR(v). By definition of R(v), there exists a simple path (u0,,u) of length between u=v and u0=x in G. By definition, 𝒬0(x)=(x), and 𝗈𝗎𝗍0(x,x)=EH(x). For establishing the contradiction, let us revisit the recursive construction of the sets 𝗈𝗎𝗍i(x,ui) for i=1 to . By Fact 5, for all i{1,,}, we have |𝗂𝗇i(x,ui)||𝗈𝗎𝗍i1(x,ui1)|. Thus, since 𝖢𝗈𝗋𝖾i(u)=, Fact 9 yields that

|𝗈𝗎𝗍i(x,ui)||𝗂𝗇i(x,ui)|(k1)|𝗈𝗎𝗍i1(x,ui1)|(k1).

Therefore, we get that, for every xX and i{1,,},

|𝗈𝗎𝗍i(x,ui)||𝗈𝗎𝗍0(x,x)|i(k1)=|EH(x)|i(k1).

As X is one of the two parts of the bipartite graph H, Fact 8 implies that

|EH| =xX|EH(x)|
xX(|𝗈𝗎𝗍(x,u)|+(k1))
=|𝗈𝗎𝗍(u)|+xX(k1)
=yY|𝗈𝗎𝗍(y,u)|+(k1)|X|
<(2k)|Y|+(k1)|X|
<(2k)(|Y|+|X|)
(2k)n
=τ6n

The latter inequality is the desired contradiction.

Proof of Theorem 2.

By Lemma 10, there exists i{1,,1} and uV such that 𝖢𝗈𝗋𝖾i(u). The existence of a 2k-cycle can then be concluded with Lemma 9.

5 Conclusion

We have proved that, for every k2, there exists a deterministic distributed algorithm that decides whether the input graph G is C2k-free in O(n11/k) rounds under the CONGEST model. This result is based on a new result in graph theory, which essentially states that when some form of “local density” exceeds a certain threshold (that depends on k) in a graph, that graph must contain a 2k-cycle.

We point out that our deterministic algorithm for C2k-freeness can be used to solve the same problem in the Quantum CONGEST model in O~(n1/21/2k) rounds, following the same approach as in [6]. Informally, the approach consists in three steps : (1) apply the “diameter reduction” technique of [5], which allows to reduce the problem to graphs of polylogarithmic diameter, (2) operate a “congestion reduction” on Algorithm 2 to make it work in a constant number of CONGEST rounds, at the cost of reducing the probability for cycle detection to Θ(n1+1/k), and (3) eventually use an “amplification technique” based on quantum Grover search to obtain a constant probability of detecting a C2k, if exists, in O~(n1/21/2k) rounds. The same round complexity was already attained in [6], but the new algorithm is considerably simpler.

Note that the constant 6(2k) in our density theorem is not tight, at least for some values of k and . For instance, for k=2, and =1, our theorem states that if there exists vV such that uN(v)deg(u)>24n, then there is a 4-cycle in G whereas, in fact, there is a 4-cycle in G already when uN(v)deg(u)>2n. We let as an open problem the determination, for every k2 and {1,,k1}, of the smallest value τ=τ(k,) such that the existence of a node v for which uR(v)deg(u)>τn implies the existence of a 2k-cycle.

Arguably one of the main open problems in the field of distributed subgraph detection under the CONGEST model is whether O(n11/k) is the best round-complexity that can be achieved for 2k-cycle detection, whether it be by deterministic or randomized algorithms, up to polylogarithmic factors. It is known to be the case for k=2, i.e., the round-complexity of C4-freeness is Ω~(n), but it is open for k>2. In other words, is it true that, for every k2, C2k-freeness cannot be decided under the CONGEST model in o~(n11/k) rounds?

References

  • [1] Stefan A Burr. Antidirected subtrees of directed graphs. Canadian Mathematical Bulletin, 25(1):119–120, 1982.
  • [2] Keren Censor-Hillel. Distributed subgraph finding: Progress and challenges. In 48th Int. Coll. on Automata, Languages, and Programming (ICALP), volume 198 of LIPIcs, pages 3:1–3:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021.
  • [3] Keren Censor-Hillel, Orr Fischer, Tzlil Gonen, François Le Gall, Dean Leitersdorf, and Rotem Oshman. Fast distributed algorithms for girth, cycles and small subgraphs. In 34th International Symposium on Distributed Computing (DISC), volume 179 of LIPIcs, pages 33:1–33:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.DISC.2020.33.
  • [4] Andrew Drucker, Fabian Kuhn, and Rotem Oshman. On the power of the congested clique model. In 33rd ACM Symposium on Principles of Distributed Computing (PODC), pages 367–376, 2014. doi:10.1145/2611462.2611493.
  • [5] Talya Eden, Nimrod Fiat, Orr Fischer, Fabian Kuhn, and Rotem Oshman. Sublinear-time distributed algorithms for detecting small cliques and even cycles. Distributed Computing, 35(3):207–234, June 2022. doi:10.1007/S00446-021-00409-3.
  • [6] Pierre Fraigniaud, Maël Luce, Frédéric Magniez, and Ioan Todinca. Even-cycle detection in the randomized and quantum CONGEST model. In 43rd ACM Symposium on Principles of Distributed Computing (PODC), pages 209–219. ACM, 2024. doi:10.1145/3662158.3662767.
  • [7] Pierre Fraigniaud, Maël Luce, Frédéric Magniez, and Ioan Todinca. Deterministic even-cycle detection in broadcast congest, 2025. Full version of this paper. doi:10.48550/arXiv.2412.11195.
  • [8] Pierre Fraigniaud and Dennis Olivetti. Distributed detection of cycles. ACM Trans. Parallel Comput., 6(3):12:1–12:20, 2019. doi:10.1145/3322811.
  • [9] Janne H. Korhonen and Joel Rybicki. Deterministic subgraph detection in broadcast CONGEST. In 21st International Conference on Principles of Distributed Systems (OPODIS), volume 95 of LIPIcs, pages 4:1–4:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPICS.OPODIS.2017.4.
  • [10] Burkhard Monien. How to find long paths efficiently. In North-Holland Mathematics Studies, volume 109, pages 239–254. Elsevier, 1985.
  • [11] David Peleg. Distributed computing: a locality-sensitive approach. SIAM, 2000.

Appendix A Proof of Lemma 9

We construct the aforementioned paths P,P, and P′′ whose union forms a 2k-cycle (see Figure 3). Note that, as a subgraph of 𝗂𝗇i(u), which is itself a subgraph of the bipartite graph H, 𝖢𝗈𝗋𝖾i(u) is also bipartite. Its two parts are merely XV(𝖢𝗈𝗋𝖾i(u)) and YV(𝖢𝗈𝗋𝖾i(u)). Let e={x,y} be an edge of 𝖢𝗈𝗋𝖾i(u) such that xX and yY. By Lemma 8, there exists a simple path

P=(u0,,ui)

such that u0=x, ui=u, and

{x,y}j=0i1𝗈𝗎𝗍j(y,uj).

Figure 3: Construction of the paths P,P, and P′′ in the proof of Lemma 9.

We aim at constructing a path P in 𝖢𝗈𝗋𝖾i(u) that starts at x0=x, and ends at some node yki, of length 2(ki)1. We build this path iteratively, by increasing its length. For the base case, note that xX𝖢𝗈𝗋𝖾i(u), and thus, by Fact 7, we get that

deg𝖢𝗈𝗋𝖾i(u)(x)k>i.

It follows that there exists

y1N𝖢𝗈𝗋𝖾i(u)(x){u1,,ui}.

The node y1 belongs to Y, and the path P is initialized to P1=(x0,y1)=(x,y1). For the induction step, let us assume that a path

Pj=(x0,y1,x1,,yj1,xj1,yj)

has been constructed, with x0=x and 1j<ki. As yjY𝖢𝗈𝗋𝖾i(u), and since, by Fact 7,

deg𝖢𝗈𝗋𝖾i(u)(yj)k>i+j,

we get that there exists

xjN𝖢𝗈𝗋𝖾i(u)(yj){u1,,ui,x0,x1,,xj1}.

We have xjX. The path Pj can thus be extended into the path Qj=(x0,y1,x1,yj,xj). Moreover, as xjX𝖢𝗈𝗋𝖾i(u) and

deg𝖢𝗈𝗋𝖾i(u)(xj)k>i+j,

we get that there exists

yj+1N𝖢𝗈𝗋𝖾i(u)(xj){u1,,ui,y1,,yj}.

We have yj+1Y. The path Qj can thus be extended into the path

Pj+1=(x0,y1,x1,,yj,xj,yj+1).

We can proceed with the construction until we get a path

P=Pki=(x0,y1,x1,,yki1,xki1,yki)

of length 2(ki)1, as desired.

We now aim at extending PP into a 2k-cycle, by constructing a simple path P′′ starting at yki and ending at u that does not intersect PP. For this purpose, let us consider the set of edges:

A=wPPj=1i1𝗈𝗎𝗍j(yki,w).

Together, P and P contain exactly 2ki vertices. By Fact 8, we have that, for every j{1,,i1},

|𝗈𝗎𝗍j(yki,w)|(2k)j,

from which it follows that

|wPP𝗈𝗎𝗍j(yki,w)|(2ki)(2k)j.

Therefore,

|A|(2ki)j=1i1(2k)j.

Let us now consider the set Xbad of vertices in PP that are also in X, i.e.,

Xbad=(X{u1,,ui}){x0,,xki1}.

We have |Xbad|k, and thus

|A|+|Xbad| (2ki)j=1i1(2k)j+k
=(2ki)j=0i1(2k)j(2ki)+k
=(2ki)(2k)i12k1k+i
((2k)i1)k+i
<(2k)i.

Since yki𝖢𝗈𝗋𝖾i(u), it follows from Fact 6 that |𝗂𝗇i(yki,u)|(2k)i. As a consequence,

|A|+|Xbad|<|𝗂𝗇i(yki,u)|.

Therefore, there exists xkiN𝗂𝗇i(u)(yki) such that xkiPP, and, for every j{1,,i1} and every wPP,

{yki,xki}𝗈𝗎𝗍j(w).

By Lemma 8, there exists a path P′′=(u0,,ui) such that u0=xki, ui=u, and, for every j{1,,i1},

{yki,xki}𝗈𝗎𝗍j(uj).

Thus P′′ does not intersect P, and it intersects P only at u=ui. Therefore, the union of the three paths

PPP′′=(u,ui1,,u1,x0,y1,x1,,xki1,yki,xki,u1,,ui1)

forms a 2k-cycle, which concludes the proof. ∎