MIT, [email protected]://orcid.org/0000-0003-4844-2863Supported by NSF Grant CCF-2330048, BSF Grant 2020356 and a Simons Investigator Award.MIT, [email protected]://orcid.org/0009-0007-8381-5705 \Copyright Virginia Vassilevska Williams and Alek Westover \ccsdesc[500]Theory of computation Graph algorithms analysis \supplement \supplementdetails[subcategory=, cite=, swhid=]Softwarehttps://github.com/awestover/listing-C6s-LP
Acknowledgements.
We’d like to thank Nathan S. Sheffield, Claire Zhang, and Ce Jin for helpful discussions.\EventEditorsRaghu Meka \EventNoEds1 \EventLongTitle16th Innovations in Theoretical Computer Science Conference (ITCS 2025) \EventShortTitleITCS 2025 \EventAcronymITCS \EventYear2025 \EventDateJanuary 7–10, 2025 \EventLocationColumbia University, New York, NY, USA \EventLogo \SeriesVolume325 \ArticleNo6Listing -Cycles in Sparse Graphs
Abstract
This work considers the problem of output-sensitive listing of occurrences of -cycles for fixed constant in an undirected host graph with edges and -cycles. Recent work of Jin and Xu (and independently Abboud, Khoury, Leibowitz, and Safier) [STOC 2023] gives an time algorithm for listing -cycles, and recent work by Jin, Vassilevska Williams and Zhou [SOSA 2024] gives an time algorithm for listing -cycles in node graphs. We focus on resolving the next natural question: obtaining listing algorithms for -cycles in the sparse setting, i.e., in terms of rather than . Previously, the best known result here is the better of Jin, Vassilevska Williams and Zhou’s algorithm and Alon, Yuster and Zwick’s algorithm.
We give an algorithm for listing -cycles with running time . Our algorithm is a natural extension of Dahlgaard, Knudsen and Stöckel’s [STOC 2017] algorithm for detecting a -cycle. Our main technical contribution is the analysis of the algorithm which involves a type of “supersaturation” lemma relating the number of -cycles in a bipartite graph to the sizes of the parts in the bipartition and the number of edges. We also give a simplified analysis of Dahlgaard, Knudsen and Stöckel’s -cycle detection algorithm (with a small polylogarithmic increase in the running time), which is helpful in analyzing our listing algorithm.
keywords:
Graph algorithms, cycles listing, fine-grained complexity, sparse graphscategory:
\relatedversion1 Introduction
Listing copies of a small pattern graph that occur as subgraphs of a host graph is a fundamental problem in algorithmic graph theory. In this work, we consider the problem of listing ’s (i.e., -cycles) for fixed constant . Some examples of applications of listing include analyzing social networks [motivationSocial], and understanding causal relationships in biological interaction graphs [motivationBIO]. (See e.g. [dense_cycle_detection_YZ] for further motivation.) In the following discussion we consider an vertex edge graph with ’s (where will be clear from context and is not necessarily known).
The main reason for focusing on even length cycles is that while there are dense graphs that contain no odd cycles (e.g. bipartite graphs), a classic result of Bondy and Simonovits [evenextremal] states that any graph with at least edges contains a , for any integer . This fact enables efficient “combinatorial” algorithms for detection, in contrast to the case of odd length cycles where efficient detection algorithms are based on matrix multiplication. In fact, very simple reductions (e.g. [vthesis]) show that for any , detection is at least as hard as triangle detection, and the latter problem is known to be fine-grained subcubically equivalent to Boolean Matrix Multiplication [focsy]. Thus, fast algorithms for odd cycles cannot avoid matrix multiplication. We focus on even cycles from now on.
A classic result of Yuster and Zwick [dense_cycle_detection_YZ] shows how to determine whether a graph contains a in time for any given constant . This quadratic running time is conjectured to be optimal in general (see [short_cycle_removal, LincolnVyas, Kn17], also discussed below); in particular, [short_cycle_removal] gave concrete evidence for the hardness of detection.
Nevertheless, in the regime of sparser graphs, where improvements are possible. For ’s there is a simple algorithm [alon1997finding] that matches the performance of the algorithm of [dense_cycle_detection_YZ] for , and improves on the performance for all . Dahlgaard, Knudsen and Stöckel [Kn17] give an algorithm for detection with running time for every constant . This matches the running time from [dense_cycle_detection_YZ] for and improves on it for .
In fine-grained complexity, it is common to assume widely-believed hypotheses and use reductions to obtain conditional lower bounds for fundamental problems. For the special case of cycle detection problems, most conditional lower bounds are based on hypotheses related to triangle detection. One of the most common hypotheses is that triangle detection in -node graphs does not have a “combinatorial” 111The class of combinatorial algorithms is not well defined, but intuitively refers to algorithms that do not use fast matrix multiplication as a subroutine. time algorithm for (in the word-RAM model). Vassilevska W. and Williams [focsy] showed that this hypothesis is equivalent to the so called BMM Hypothesis that postulates that there is no time combinatorial algorithm for multiplying two Boolean matrices.
As mentioned earlier, it is easy to show that under the BMM hypothesis, detecting any odd cycle requires time. Dahlgaard, Knudsen and Stöckel [Kn17] gave lower bounds for combinatorial detection of even cycles of fixed length in sparse graphs. They show that there is no combinatorial algorithm for detection, or detection for any , with running time for . Lincoln and Vyas [LincolnVyas] give a similar conditional lower bound under a different hypothesis, extending the lower bounds for potentially non-combinatorial algorithms. Lincoln and Vyas show that, for large enough constant , a detection algorithm in graphs with with running time would imply an algorithm for -3-SAT with running time .
The problem of listing even cycles is less well-understood. Without improving the detection algorithms discussed above, the best result that we could hope for in general is an algorithm with running time , where is the number of -cycles in the graph, and in the sparse setting where . Recently, [Ab22] and [3sumLBCe] gave such an algorithm for listing. In fact, Jin and Xu’s [3sumLBCe] algorithm gives a stronger guarantee: After pre-processing time, they can (deterministically) enumerate -cycles with delay per cycle. Jin and Xu [3sumLBCe] (and concurrently by Abboud, Bringmann, and Fischer [3sumLBAmir]) shows that, under the 3SUM Hypothesis, there is no algorithm for enumeration with or pre-processing time and delay, for .
For ’s, Jin, Zhou and Vassilevska Williams [C6sCe] give an listing algorithm. For sparse listing algorithms, the previous state of the art is [alon1997finding] whose work implies an time listing algorithm. See also [bringmannclass] where the complexity of the harder problem of listing -partite222A -node is an -partite subgraph of a -partite graph with vertex set if there are vertices such that for each and the mapping is an isomorphism between and the subgraph of induced by . In other words, instead of looking for an arbitrary subgraph of isomorphic to , one only focuses on the subgraphs with exactly one node in each and such that the node picked from corresponds to node of . subgraphs is investigated.
1.1 Our contributions
We consider the problem of listing all s in an -edge graph. The best known result so far is an time algorithm that follows from the work of [alon1997finding]. Our main result is the first improvement over this 27 year old running time: {restatable*}theoremlistfast There is an algorithm for listing ’s in time .
We now summarize the ideas needed to prove Section 1.1.
Section 1.1 follows easily after establishing a certain bound on the number of capped -walks in a graph. Capped -walks are a notion introduced by Dahlgaard, Knudsen and Stöckel in [Kn17]. Roughly speaking, a capped -walk is a walk of length where the first vertex in the walk has higher degree than the remaining vertices in the walk (handling vertices of equal degree requires a bit of additional care). [Kn17]’s time detection algorithm is based on the following fact: {restatable*}theoremthmcappedwalks[Kn17] Let be a -free graph with maximum degree . Then, there are at most capped -walks in . One of our main contributions is a simplified proof of Section 1.1, although with polylogarthmically worse guarantees than [Kn17]. This simplified analysis of capped -walks is quite helpful in obtaining Section 1.1. The key lemma used to prove Section 1.1 is a generalization to bipartite graphs of Bondy and Simonovits’ classic theorem on the extremal number of ’s. Specifically, the result is:
Theorem 1.1.
[Kn17] Let be a bipartite graph with vertex parts of sizes and with edges. If then contains a .
In order to use capped -walks for a listing algorithm, it would be useful to have a
Definition 1.
supersaturation variant of Theorem 1.1, which would guarantee the presence of many ’s if the edge density is large; the fact that this supersaturation result could help with listing was communicated to us by Jin and Zhou [supersat_observation]. The supersaturation analog of Bondy and Simonovits’ [evenextremal] extremal number for ’s is known:
Theorem 1.2.
[JiangYep20] For every integer , there exist constants such that if is an -node graph with edges, then contains at least copies of .
Jin and Zhou [supersat_observation] formulated the following conjectured generalization of Theorem 1.2:
conjecturesupersatconj The Unbalanced Supersaturation Conjecture [Jin and Zhou’24]: Let be an edge bipartite graph with vertex bipartition , with ’s. Suppose . Then,
Jin and Zhou obtained the following conclusion using the approach of [Kn17]:
Fact 2 ([supersat_observation]).
If the Unbalanced Supersaturation Conjecture is true, then there is an time algorithm for -cycle listing for all .
In LABEL:thm:conditional_listing we give a simple proof of Jin and Zhou’s fact above. Thus, an approach to obtaining the conjectured optimal running time of for -listing would be to prove Theorem 1.2. Unfortunately, establishing or refuting Theorem 1.2 remains a challenging open problem.
Our main technical contribution is a proof of a weaker version of Theorem 1.2 for . Then, we show that this partial progress towards Theorem 1.2 can be used in our simplified method for analyzing capped -walks to obtain a bound on the number of capped -walks, and consequentially an improved listing algorithm in the sparse setting (namely, Section 1.1).
1.2 Open Questions
Proving or refuting Theorem 1.2 is an important open question. It also is valuable to consider other avenues towards obtaining listing algorithms, especially in case Theorem 1.2 turns out to be false. The listing algorithms of [C6sCe], [3sumLBCe], [Ab22] use a variety of combinatorial insights that could potentially be generalized to larger . It is also possible that a hybrid approach is productive: one can first use progress towards proving Theorem 1.2 to force the instance to have a specific structure, and then use different combinatorial insights to solve the structured version of the problem.
1.3 Paper Outline
In LABEL:sec:simple_capped we present our simplified analysis of [Kn17]’s detection algorithm. In LABEL:sec:listing_with_supersat we show how to modify our simple analysis of [Kn17]’s detection algorithm to get a listing algorithm, assuming the Unbalanced Supersaturation Conjecture. In LABEL:sec:supsersat_progress we present progress towards resolving the Unbalanced Supersaturation Conjecture. In LABEL:sec:listing_progress we show how to use our progress towards Theorem 1.2 in our simplified capped -walk analysis to obtain a listing algorithm for ’s with running time .
1.4 Notations
We use to denote the maximum degree of graph . We write to denote the neighborhood of vertex , and for we write to denote . For graph , we will use to denote the vertex and edge sets of . When is clear from the context we also denote by and by . We let (when the graph being discussed is clear), and assume . For vertex subsets we write to denote . A walk / path of length will refer to a walk / path with edges. Given , we will write to denote the induced subgraph on , i.e., a graph with vertex set and edge set . We will write to denote .
We write to denote the set . We use to denote the base- logarithm. Define the