The Average-Case Complexity of Counting Cliques in Erdős-Rényi Hypergraphs by Enric Boix A.B., Princeton University (2018) Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 2020 ○c Massachusetts Institute of Technology 2020. All rights reserved.

Author...... Department of Electrical Engineering and Computer Science August 28, 2020

Certified by...... Guy Bresler Associate Professor of Electrical Engineering and Computer Science Thesis Supervisor

Accepted by ...... Leslie A. Kolodziejski Professor of Electrical Engineering and Computer Science Chair, Department Committee on Graduate Students 2 The Average-Case Complexity of Counting Cliques in Erdős-Rényi Hypergraphs by Enric Boix

Submitted to the Department of Electrical Engineering and Computer Science on August 28, 2020, in partial fulfillment of the requirements for the degree of Master of Science

Abstract The complexity of problems on Erdős-Rényi random graphs has become a cen- tral topic in average-case complexity. Algorithmic phase transitions in these problems have been shown to have broad connections ranging from mixing of Markov chains and statistical physics to information-computation gaps in high-dimensional statistics. We consider the problem of counting 푘-cliques in 푠-uniform Erdős-Rényi hypergraphs 퐺(푛, 푐, 푠) with edge density 푐 and show that its fine-grained average-case complex- ity can be based on its worst-case complexity. We give a worst-case to average-case reduction for counting 푘-cliques on worst-case hypergraphs given a blackbox solving the problem on 퐺(푛, 푐, 푠) with low error probability. Our approach is closely related to [Goldreich and Rothblum, FOCS18], which showed a worst-case to average-case reduction for counting cliques for an efficiently-sampleable distribution on graphs. Our reduction has the following implications:

∙ Dense Erdős-Rényi graphs and hypergraphs: Counting 푘-cliques on 퐺(푛, 푐, 푠) with 푘 and 푐 constant matches its worst-case complexity up to a polylog(푛) factor. Assuming ETH, it takes 푛Ω(푘) time to count 푘-cliques in 퐺(푛, 푐, 푠) if 푘 and 푐 are constant.

∙ Sparse Erdős-Rényi graphs and hypergraphs: When 푐 = Θ(푛−훼), for each fixed 훼 our reduction yields different average-case phase diagrams depicting a tradeoff between runtime and 푘. Assuming the best known worst-case algorithms are optimal, in the graph case of 푠 = 2, we establish that the exponent in 푛 of 휔푘 (︀푘)︀ the optimal running time for 푘-clique counting in 퐺(푛, 푐, 푠) is 3 − 퐶훼 2 + 휔 푂푘,훼(1), where 9 ≤ 퐶 ≤ 1 and 휔 is the matrix multiplication constant. In the hypergraph case of 푠 ≥ 3, we show a lower bound at the exponent of (︀푘)︀ 푘 − 훼 푠 + 푂푘,훼(1) which surprisingly is tight against algorithmic achievability exactly for the set of 푐 above the Erdős-Rényi 푘-clique percolation threshold.

Our reduction yields the first average-case hardness result for a problem over Erdős- Rényi hypergraphs based on a corresponding worst-case hardness assumption. More-

3 over, because we consider sparse Erdős-Rényi hypergraphs, for each 푛, 푘, and 푠 we actually have an entire family of problems parametrized by the edge probability 푐 and the behavior changes as a function of 푐; this is the first worst-to-average-case hardness result we are aware of for which the complexity of the same problem over worst-case versus average-case inputs is completely different. We also analyze several natural algorithms for counting 푘-cliques in 퐺(푛, 푐, 푠) that establish our upper bounds in the sparse case 푐 = Θ(푛−훼). The ingredients in our worst-case to average-case reduction include: (1) several new techniques for the self-reducibility of counting 푘-cliques as a low-degree polynomial; and (2) a finite Fourier analytic method to bound the total variation convergence of random biased binary expansions to the uniform distribution over residues in F푝.

Thesis Supervisor: Guy Bresler Title: Associate Professor of Electrical Engineering and Computer Science

4 Acknowledgments

My greatest appreciation goes to Guy Bresler, who has been a wonderful advisor over the last two years. Throughout, he has unfailingly supported me in my develop- ment as a researcher, optimistically encouraged me to explore even the wildest ideas, and constantly inspired me with his fantastic taste in problems. I would also like to express my gratitude to my incredible coauthor, Matt Brennan, without whom this master’s thesis would not have been written. Matt Brennan, Austin Stromme, Dheeraj Nagaraj, Fred Koehler, Rares Buhai, and Sinho Chewi have been the funni- est, the most nurturing, and quite simply the best group of office-mates that I could have hoped for. I’m looking forward to many more late-night conversations once we all get back on campus. I would like to thank my other coauthors in grad school, Ben Edelman, Emmanuel Abbe, Jason Altschuler, Lior Eldar, Saeed Mehraban, and Siddhartha Jayanti, for their friendship and their tenacity in tackling problems. I am also greatly indebted to the MIT community as a whole, for being the fount of many fantastic friendships. A special thank you goes to Sonia, Smita, and Imran for their warm hospitality during the writing of this thesis. Finally, my parents, brothers, and grandmother have always been a source of comfort and love. And, last but not least: much of the material in this thesis is reprinted, with permission, from [14] ○c 2019 IEEE.

5 6 Contents

1 Introduction 11 1.1 Related Work ...... 14 1.1.1 Clique Problems on Erdős-Rényi Graphs ...... 14 1.1.2 Worst-Case to Average-Case Reductions ...... 15 1.1.3 Comparison to Goldreich-Rothblum ’18 ...... 16 1.1.4 Subsequent Work ...... 17 1.2 Overview of Main Results ...... 17 1.3 Overview of Reduction Techniques ...... 21 1.4 Notation and Preliminaries ...... 24 1.5 Organization ...... 24

2 Problem Formulations and Average-Case Lower Bounds 27 2.1 Clique Problems and Worst-Case Fine-Grained Conjectures ...... 27 2.2 Average-Case Lower Bounds for Counting 푘-Cliques in 퐺(푛, 푐, 푠) ... 30

3 Worst-Case to Average-Case Reduction for 퐺(푛, 푐, 푠) 37 3.1 Worst-Case Reduction to 푘-Partite Hypergraphs ...... 39 3.2 Counting 푘-Cliques as a Low-Degree Polynomial ...... 40

3.3 Random Self-Reducibility: Reducing to Random Inputs in F푁 .... 41 3.4 Reduction to Evaluating the Polynomial on 퐺(푛푘, 푐, 푠, 푘) ...... 42 3.5 Reduction to Counting 푘-Cliques in 퐺(푛, 푐, 푠) ...... 47 3.6 Proofs of Theorems 2.2.1 and 2.2.2 ...... 48

7 4 Random Binary Expansions Modulo 푝 55

5 Algorithms for Counting 푘-Cliques in 퐺(푛, 푐, 푠) 63 5.1 Greedy Random Sampling ...... 63 5.2 Sample Complexity and Runtime of Greedy Random Sampling . . . . 65 5.3 Post-Processing with Matrix Multiplication ...... 70 5.4 Deterministic Iterative Algorithm for Counting in 퐺(푛, 푐, 푠) ...... 73

6 Extensions and Open Problems 75

8 List of Figures

1-1 Comparison of our algorithms and average-case lower bounds for count- ing 푘-cliques in sparse Erdős-Rényi Hypergraphs 퐺(푛, 푐, 푠) with 푐 = Θ(푛−훼). Green denotes runtimes 푇 feasible for each 푘, blue denotes 푇 infeasible given that the best known worst-case algorithms are optimal and gray denotes 푇 for which the complexity of counting 푘-cliques is open after this work. The left plot shows the graph case of 푠 = 2 and the right plot shows the hypergraph case of 푠 ≥ 3. For simplicity, all

quantities shown are up to constant 푂푘,훼(1) additive error. ○c 2019 IEEE. 20

3-1 Reduction To-ER-# for showing computational lower bounds for average- case #(푘, 푠)-clique on Erdős-Rényi 퐺(푛, 푐, 푠) hypergraphs based on the worst-case hardness of #(푘, 푠)-clique. ○c 2019 IEEE...... 54

9 10 Chapter 1

Introduction

(︀푉 )︀ A graph 퐺 = (푉, 퐸) consists of a set of 푛 vertices, 푉 , and a set of edges, 퐸 ⊆ 2 .A (︀푆)︀ 푘-clique in 퐺 is a subset 푆 ⊆ 푉 of 푘 pairwise-adjacent vertices, i.e., 2 ⊆ 퐸. We answer the following fundamental question: is it harder to count the number of 푘-cliques in an adversarially-chosen graph than in a uniformly-? As we discuss below, this question lies at the intersection of fine-grained complexity and average-case complexity.

Fine-grained complexity In our analysis, we will think of 푘 as a small constant. Thus, the naive brute-force algorithm that enumerates 푘-vertex subsets and checks

2(︀푛)︀ 푘 each one takes Θ(푘 푘 ) = Θ(푛 ) = poly(푛) time. This runtime is polynomial in 푛, so, from the point of view of classical complexity theory, the brute-force algorithm is efficient and the case is closed. However, the story does not quite end here: the exponential dependence in the parameter 푘 is highly unsatisfying because it means that brute force is impractical even for moderate values of 푘.A fine-grained complexity theorist would ask whether faster algorithms are possible [77]. Is the exponential dependence in 푘 unavoidable? What precisely is the best runtime that one can achieve for counting 푘-cliques? The answer, it turns out, is that if the graph is adversarially chosen then a 푛Ω(푘) worst-case runtime is unavoidable1 [20].

1Under standard complexity theory assumptions.

11 Average-case complexity However, we wish to understand how hard it is to count 푘-cliques when the graph is not adversarially chosen, but rather is chosen uniformly at random. Is 푛Ω(푘) time still necessary, or can we speed up by exploiting the random graph structure? This is a question in average-case complexity, as opposed to classical worst-case complexity, because the algorithm is not required to work for all possible inputs – just for typical inputs drawn from a distribution [58]. The average-case and worst-case complexities of a problem can differ wildly: sometimes solving a problem on a typical random input is much easier than solving it on any, potentially adversarially-chosen input. This phenomenon can be used to explain, for instance, why modern SAT solvers can efficiently solve constraint satisfaction instances that arise in practice, even though constraint satisfaction would be intractable if the instances were adversarially crafted. On the other hand, many problems are conjectured to be intractable in both the worst-case and average-case settings – indeed, the existence of such problems is a necessary assumption of secure cryptography. The average-case complexity of the 푘-clique counting on random graphs is of particular interest (i) because it is a candidate problem that could be used as a basis for constructions in the recently-minted field of fine-grained cryptography [8, 9,45, 44, 57, 24] and (ii) because the study of clique problems on random graphs is known to have an intimate connection to the computational complexity of high-dimensional statistical inference [11, 55, 21, 47, 60, 17, 18, 16].

Informal statement of results A main result of this thesis is that, for any con- stant 푘, counting 푘-cliques in a uniformly random graph is just as hard as counting 푘-cliques in an adversarially-chosen graph. More generally, we consider the average-case complexity of counting 푘-cliques in 푠-uniform Erdős-Rényi hypergraphs 퐺(푛, 푐, 푠), where every 푠-subset of the 푛 vertices is a hyperedge independently with probability 푐. We reduce counting 푘-cliques on worst-case hypergraphs to a blackbox solving the problem on 퐺(푛, 푐, 푠) with low error probability. Our reduction yields different average-case lower bounds for counting 푘-

12 cliques in 퐺(푛, 푐, 푠) in the dense and sparse cases of 푐 = Θ(1) and 푐 = Θ(푛−훼), with tradeoffs between runtime and 푐, based on the worst-case complexity of counting 푘- cliques. We also derive improved algorithms for counting 푘-cliques on sparse 퐺(푛, 푐, 푠) and show that our average-case lower bounds often match algorithmic upper bounds.

Main proof ideas Worst-case-to-average-case reduction: Our reduction is based on the classical random self-reducibility of low-degree polynomials [59] over large finite fields F. This has also recently been applied in other contexts in average-case fine- grained complexity [8, 44, 24]. The random self-reducibility of low-degree polynomials is the theorem that, given access to a blackbox 푃ˆ(푥) computing a degree-푑 polynomial

푃 (푥) on most inputs 푥 ∈ F푛, we can “correct” 푃ˆ and efficiently compute 푃 (푦) for any adversarial input 푦 ∈ F푛. The original correction algorithm, due to Lipton [59], involves picking a random

푎 ∈ F푛 and computing 푓ˆ(1),..., 푓ˆ(푑 + 1) for 푓ˆ(푡) := 푃ˆ(푦 + 푡푎). Assuming F is large enough, 푦 + 푡푎 ∈ F푛 is uniformly random for each 푡 ∈ [푑 + 1]. Thus, with high probability 푓ˆ(푡) = 푓(푡) := 푃 (푦 + 푡푎) for each 푡 ∈ [푑 + 1]. Since 푓(푡) = 푃 (푦) is a degree-푑 polynomial in 푡, we can efficiently interpolate 푓(1), . . . , 푓(푑 + 1) to compute 푓(0) = 푃 (푦). In order to apply this result to our case, we let 푃 (푥) be the function of the that counts 푘-cliques. This is a low-degree polynomial, so random self-reduction applies. However, there is a large technical obstacle that we must overcome: the above trick only proves that 푃 (푥) is hard to compute on random elements in F푛 for some large field F, but we would like hardness for vectors of independent Bernoulli variables in {0, 1}푛. The bulk of our proof is thus dedicated to appropriately converting from random field elements in F to biased Bernoulli random variables in {0, 1}. Algorithms: Our fast algorithms for 푘-clique counting in sparse Erdős-Rényi hy- pergraphs are based on an iterative greedy sampling procedure. In the graph case, we obtain an extra speedup by applying a fast matrix multiplication postprocessing trick similar to the algorithm of [64] for worst-case graphs.

13 1.1 Related Work

1.1.1 Clique Problems on Erdős-Rényi Graphs

The complexity of clique problems on Erdős-Rényi random graphs has become a central topic in average-case complexity, discrete probability and high-dimensional statistics. While the Erdős-Rényi random graph 퐺(푛, 1/2) contains cliques of size roughly 2 log2 푛, a longstanding open problem of Karp is to find a clique of size

(1 + 휖) log2 푛 in polynomial time for some constant 휖 > 0 [54]. Natural polynomial time search algorithms and the Metropolis process find cliques of size approximately log2 푛 but not (1 + 휖) log2 푛 [54, 46, 51, 61, 66]. A related line of research shows that local algorithms fail to find independent sets of size (1+휖)푛 ln(푑)/푑 in several random graph models with average degree 푑 similar to Erdős-Rényi, even though the largest independent set has size roughly 2푛 ln(푑)/푑 [39, 23, 67]. In [32], it is shown that any algorithm probing 푛2−훿 edges of 퐺(푛, 1/2) in ℓ rounds finds cliques of size at most

(2 − 휖) log2 푛. A large body of work has considered planted clique (PC), the problem of finding a 푘-clique randomly planted in 퐺(푛, 1/2). Since its introduction in [56] and [51], a number of spectral algorithms, approximate message passing, semidefinite program- ming, nuclear norm minimization and several other polynomial-time combinatorial approaches have been proposed and all appear to fail to recover the planted clique √ when 푘 = 표 ( 푛) [3, 33, 62, 35, 5, 25, 28, 22]. It has been shown that cliques of √ size 푘 = 표 ( 푛) cannot be detected by the Metropolis process [51], low-degree sum of squares (SOS) relaxations [10] and statistical query algorithms [37]. Furthermore, the √ conjecture that PC with 푘 = 표 ( 푛) cannot be solved in polynomial time has been used as an average-case assumption in cryptography [52]. An emerging line of work also shows that the PC conjecture implies a number of tight statistical-computational gaps, including in sparse PCA, community detection, universal submatrix detection, RIP certification and low-rank matrix completion [11, 55, 21, 47, 60, 17, 18, 16].Re- cently, [6] also showed that super-polynomial length regular resolution is required to certify that Erdős-Rényi graphs do not contain cliques of size 푘 = 표(푛1/4).

14 Rossman [71, 72] has studied the classical 푘-clique decision problem on sparse Erdős-Rényi random graphs 퐺 ∼ 퐺(푛, 푐) at the critical threshold 푐 = Θ (︀푛−2/(푘−1))︀, where the existence of a 푘-clique occurs with probability bounded away from 0 and 1.

The natural greedy algorithm that selects a random sequence of vertices 푣1, 푣2, . . . , 푣푡 such that 푣푖+1 is a random common neighbor of 푣1, 푣2, . . . , 푣푖 can be shown to find a clique of size ⌊(1 + 휖)푘/2⌋ if repeated 푛휖2푘/4 times. This yields an 푂 (︀푛푘/4+푂(1))︀ time algorithm for 푘-clique on 퐺(푛, 푐). Rossman showed that bounded depth circuits solving 푘-clique on 퐺(푛, 푐) must have size Ω(푛푘/4) in [71] and extended this lower bound to monotone circuits in [72]. A survey of this and related work can be found in [73]. All of the lower bounds for the clique problems on Erdős-Rényi random graphs above are against restricted classes of algorithms such as local algorithms, regular resolution, bounded-depth circuits, monotone circuits, the SOS hierarchy and sta- tistical query algorithms. One reason for this is that there are general obstacles to basing average-case complexity on worst-case complexity. For example, natural ap- proaches to polynomial-time worst-case to average-case reductions for NP-complete problems fail unless coNP ⊆ NP/poly [36, 13, 12]. The objective of this work is to show that this worst-case characterization of average-case complexity is possible in a fine-grained sense for the problem of counting 푘-cliques in 푠-uniform Erdős-Rényi hypergraphs 퐺(푛, 푐, 푠) with edge density 푐.

1.1.2 Worst-Case to Average-Case Reductions

The random self-reducibility of low-degree polynomials serves as the basis for several worst-case to average-case reductions found in the literature. One of the first appli- cations of this method was to prove that the permanent is hard to evaluate on ran- dom inputs, even with polynomially-small probability of success, unless P#P = BPP [74, 19]. (Under the slightly stronger assumption that P#P ̸= AM, and with different techniques, [34] proved that computing the permanent on large finite fields is hard even with exponentially small success probability.) Recently, [8] used the polynomial random self-reducibility result in the fine-grained setting in order to construct poly-

15 nomials that are hard to evaluate on most inputs, assuming fine-grained hardness conjectures for problems such as 3-SUM, Orthogonal-Vectors, and/or All- Pairs-Shortest-Paths. The random self-reducibility of polynomials was also used by Gamarnik [38] in order to prove that exactly computing the partition function of the Sherrington-Kirkpatrick model in statistical physics is hard on average. If a problem is random self-reducible, then random instances of the problem are essentially as hard as worst-case instances, and therefore one may generate a hard instance of the problem by simply generating a random instance. Because of this, random self-reducibility plays an important role in cryptography: it allows one to base cryptographic security on random instances of a problem, which can generally be generated efficiently. A prominent example of a random-self reducible problem with applications to cryptography is the problem of finding a short vector in a lattice. In a seminal paper, Ajtai [1] gave a worst-case to average-case reduction for this short-vector problem. His ideas were subsequently applied to prove the average- case hardness of the (LWE) problem, which underlies lattice cryptography [1, 70]. A good survey covering worst-case to average-case reductions in lattice cryptography is [69]. There are known restrictions on problems that are self-reducible. For example, non-adaptive worst-case to average-case reductions for NP-complete problems fail unless coNP ⊆ NP/poly [36, 13, 12].

1.1.3 Comparison to Goldreich-Rothblum ’18

A motivating recent work by Goldreich and Rothblum [44] also considered worst-case to average-case reductions for 푘-clique counting. They provided such a reduction mapping to an efficiently sampleable distribution on graphs with a high min-entropy of Ω(˜ 푛2). In contrast to [44], our objectives are to: (1) map precisely to the natural distribution 퐺(푛, 푐, 푠) for different edge densities 푐, including 푐 = Θ(1) and the sparse case 푐 = Θ(푛−훼); and (2) to characterize the tradeoff between the time-complexity of counting 푘-cliques in 퐺(푛, 푐, 푠) and the sparsity parameter 훼. Achieving this re- quires new techniques for the self-reducibility of counting 푘-cliques as a low-degree

16 polynomial and a tight analysis of random biased binary expansions over F푝 with finite Fourier analysis. However, our techniques also come at the cost of requiring a low error probability (1/polylog(푛) in the dense case and 1/ poly(푛) in the sparse case) for the average-case blackbox solving 푘-clique counting on 퐺(푛, 푐, 푠). This is in contrast to [44], where a very high error probability of 1 − 1/polylog(푛) is tolerated. It remains an interesting open problem to extend our results for 퐺(푛, 푐, 푠) to tolerate higher error blackboxes. This error tolerance and open problem are discussed fur- ther in Section 2.2 and Chapter 6, and how our techniques relate to those in [44] is discussed in Section 1.3 and Chapter 3.

1.1.4 Subsequent Work

Subsequent to the publication of our work, Goldreich [43] provided a simplified re- duction for counting the parity of the number of cliques in the uniform 퐺(푛, 1/2) Erdős-Rényi graph case. Goldreich obtained error tolerance exp(−푘2) in this case, which is an improvement over the error tolerance exp(−푂˜(푘2)) in our Theorem 2.2.2. Dalirrooyfard, Lincoln, and Vassilevska Williams [24] generalize our techniques to problems admitting what they call “good low-degree polynomials.” They apply this generalization to obtain average-case hardness for counting the number of copies of any graph 퐻 as an induced subgraph of an Erdős-Rényi graph 퐺. Furthermore, they also prove that simple variations of the orthogonal vectors, 3-sum and zero- weight 푘-clique problems are hard to count on average for uniform inputs. They use these results to obtain average-case fine-grained hardness for various problems such as counting the number of regular expression matchings.

1.2 Overview of Main Results

We provide two complementary main results on the fine-grained average-case com- plexity of counting 푘-cliques in 퐺(푛, 푐, 푠). The precise formulations of the problems we consider are in Section 2.1.

17 Worst-case to average-case reduction. We give a worst-case to average-case reduction from counting 푘-cliques in worst-case 푠-uniform hypergraphs to counting 푘-cliques in hypergraphs drawn from 퐺(푛, 푐, 푠). This allows us to base the average- case fine-grained complexity of 푘-clique counting over Erdős-Rényi hypergraphs on its worst-case complexity, which can be summarized as follows. Counting 푘-cliques in worst-case hypergraphs is known to take 푛Ω(푘) time assuming the Exponential Time Hypothesis (ETH)2 if 푘 = 푂(1) [20]. The best known worst-case algorithms up to subpolynomial factors are the 푂 (︀푛휔⌈푘/3⌉)︀ time algorithm of [64] in the graph case of 푠 = 2 and exhaustive 푂(푛푘) time search on worst-case hypergraphs with 푠 ≥ 3. Here, 휔 ≈ 2.373 denotes the best known matrix multiplication constant. Our reduction is the first worst-case to average-case reduction to Erdős-Rényi hy- pergraphs. It has different implications for the cases of dense and sparse hypergraphs, as described next.

1. Dense Erdős-Rényi Hypergraphs. When 푘 and 푐 are constant, our reduction con- structs an efficient 푘-clique counting algorithm that succeeds on a worst-case input hypergraph with high probability, using polylog(푛) queries to an average- case oracle that correctly counts 푘-cliques on a 1 − 1/ polylog(푛) fraction of Erdős-Rényi hypergraphs drawn from 퐺(푛, 푐, 푠). This essentially shows that 푘-clique counting in the worst-case matches that on dense Erdős-Rényi hyper- graphs. More precisely, 푘-clique counting on 퐺(푛, 푐, 푠) with 푘, 푐 and 푠 constant must take Ω˜ (︀푛휔⌊푘/3⌋)︀ time when 푠 = 2 and Ω(˜ 푛푘) time when 푠 ≥ 3, unless there are faster worst-case algorithms. Furthermore, our reduction shows that it is ETH-hard to 푘-clique count in 푛표(푘) time on 퐺(푛, 푐, 푠) with 푘, 푐 and 푠 constant.

2. Sparse Erdős-Rényi Hypergraphs. Our reduction also applies with a different multiplicative slowdown and error tolerance to the sparse case of 푐 = Θ(푛−훼), where the fine-grained complexity of 푘-clique counting on 퐺(푛, 푐, 푠) is very differ- ent than on worst-case inputs. Our reduction implies fine-grained lower bounds (︁ 휔⌈푘/3⌉−훼 푘 )︁ (︁ 푘−훼 푘 )︁ of Ω˜ 푛 (2) when 푠 = 2 and Ω˜ 푛 (푠) when 푠 ≥ 3 for inputs drawn

2ETH asserts that 3-SAT in the worst-case takes at least 2푐푛 time to solve for some constant 푐 > 0.

18 from 퐺(푛, 푐, 푠), unless there are faster worst-case algorithms. We remark that in the hypergraph case of 푠 ≥ 3, this lower bound matches the expected number of 푘-cliques up to polylog(푛) factors.

Precise statements of our results can be found in Section 2.2. For simplicity, our results should be interpreted as applying to algorithms that succeed with probability 1 − (log 푛)−휔(1) in the dense case and 1 − 푛−휔(1) in the sparse case, although our results apply in a more general context, as discussed in Section 2.2. We discuss the necessity of this error tolerance and the multiplicative slowdown in our worst-case to average-case reduction in Section 2.2. We also give a second worst-case to average- case reduction for computing the parity of the number of 푘-cliques which has weaker requirements on the error probability for the blackbox on 퐺(푛, 푐, 푠) in the dense case of 푐 = 1/2. We provide an overview of our multi-step worst-case to average-case reduction in Section 1.3. The steps are described in detail in Chapter 3.

Algorithms for 푘-clique counting on 퐺(푛, 푐, 푠). We also analyze several natural algorithms for counting 푘-cliques in sparse Erdős-Rényi hypergraphs. These include an extension of the natural greedy algorithm mentioned previously from 푘-clique to counting 푘-cliques, a modification to this algorithm using the matrix multiplication step of [64] and an iterative algorithm achieving nearly identical guarantees. These algorithms count 푘-cliques in 퐺(푛, 푐, 푠) when 푐 = Θ(푛−훼) in time:

(︁ 푘+1−훼 푘 )︁ ∙ 푂˜ 푛 (푠) if 푠 ≥ 3 and 푘 < 휏 + 1;

(︁ 휏+2−훼 휏+1 )︁ ∙ 푂˜ 푛 ( 푠 ) if 푠 ≥ 3 and 휏 + 1 ≤ 푘 ≤ 휅 + 1; and

(︁ 휔⌈푘/3⌉+휔−휔훼 ⌈푘/3⌉ )︁ ∙ 푂˜ 푛 ( 2 ) if 푠 = 2 and 푘 ≤ 휅 + 1.

(︀ 휏 )︀ (︀ 휅 )︀ Here, 휏 and 휅 are the largest positive integers satisfying that 훼 푠−1 < 1 and 훼 푠−1 < 푠. We restrict our attention to 푘 with 푘 ≤ 휅 + 1 since the probability that the largest clique in 퐺 has size 휔(퐺) > 휅 + 1 is 1/poly(푛). In the graph case of 푠 = 2,

−1 −1 2 these thresholds correspond to 훼 < 휏 and 훼 < 2휅 ≤ 푘−1 . At 푘 = 휏 + 1, the

19 log푛 푇 log푛 푇

Graphs (푠 = 2) Hypergraphs (푠 ≥ 3) (︀휏+1)︀ 휏 + 1 − 훼 푠 (︀ 푘)︀ feasible 휔훼 2 open feasible open 9 휔푘 − 3 푘)︀ (︀ 푠 훼 − 휔푘 (︀푘)︀ 푘 3 − 훼 2 infeasible infeasible 푘 푘 휔(퐺) 푘-clique percolation 휔(퐺)

Figure 1-1: Comparison of our algorithms and average-case lower bounds for counting 푘-cliques in sparse Erdős-Rényi Hypergraphs 퐺(푛, 푐, 푠) with 푐 = Θ(푛−훼). Green denotes runtimes 푇 feasible for each 푘, blue denotes 푇 infeasible given that the best known worst-case algorithms are optimal and gray denotes 푇 for which the complexity of counting 푘-cliques is open after this work. The left plot shows the graph case of 푠 = 2 and the right plot shows the hypergraph case of 푠 ≥ 3. For simplicity, all quantities shown are up to constant 푂푘,훼(1) additive error. ○c 2019 IEEE.

1 first threshold becomes 훼 < 푘−1 which is exactly the 푘-clique percolation threshold [27, 65, 29]. Given a hypergraph 퐺, define two 푘-cliques of 퐺 to be adjacent if they share (푘 −1) of their 푘 vertices. This induces a hypergraph 퐺푘 on the set of 푘-cliques. For graphs 퐺 drawn from 퐺(푛, 푐), [27] introduced the 푘-clique percolation threshold

1 1 − 푘−1 of 푐 = 푘−1 · 푛 , above which a giant component emerges in 퐺푘. This threshold and extensions were rigorously established in [15]. Following the same heuristic as in [27], our threshold 휏 + 1 is a natural extension of the 푘-clique percolation threshold to the hypergraph case of 푠 ≥ 3. A comparison of our algorithmic guarantees and average-case lower bounds based on current best known worst-case algorithms for counting 푘-cliques is shown in Figure 1-1.

1. Graph Case (푠 = 2). In the graph case, our lower and upper bounds have the same form and show that the exponent in the optimal running time is

휔푘 (︀푘)︀ 휔 −1 3 − 퐶훼 2 + 푂푘,훼(1) where 9 ≤ 퐶 ≤ 1 as long as 푘 ≤ 휅 + 1 = 2훼 + 1. As shown in Figure 1-1, our upper and lower bounds approach each other for 푘 small relative to 휅 + 1.

2. Hypergraph Case (푠 ≥ 3). In the hypergraph case of 푠 ≥ 3, the exponents in

20 (︀푘)︀ our lower and upper bounds are nearly identical at 푘 − 훼 푠 + 푂푘,훼(1) up to the 푘-clique percolation threshold. After this threshold, our lower bounds slowly deteriorate relative to our algorithms until they become trivial at the clique number of 퐺 by 푘 = 휅 + 1.

Because we consider sparse Erdős-Rényi hypergraphs, for each 푛, 푘, and 푠 we actually have an entire family of problems parametrized by the edge probability 푐 and the be- havior changes as a function of 푐; this is the first worst-to-average-case hardness result we are aware of for which the complexity of the same problem over worst-case versus average-case inputs is completely different and can be sharply characterized over the whole range of 푐 starting from the same assumption. It is surprising that our worst- case to average-case reduction techniques – which range from the self-reducibility of polynomials to random binary expansions – together yield tight lower bounds match- ing our algorithms in the hypergraph case. The fact that these lower bounds are tight exactly up the 푘-clique percolation threshold, a natural phase transition in the Erdős-Rényi model, is also unexpected a priori. Two interesting problems left open after our work are to show average-case lower bounds with an improved constant 퐶 in the graph case and to show tight average- case lower bounds beyond the 푘-clique percolation threshold in the case 푠 ≥ 3. These and other open problems as well as some extensions of our methods are discussed in Chapter 6.

1.3 Overview of Reduction Techniques

For clarity of exposition, in this section we will restrict our discussion to the graph case 푠 = 2, as well as the case of constant 푘. A key step of our worst-case to average-case reduction uses the random self- reducibility of multivariate low-degree polynomials – i.e., evaluating a polynomial on any worst-case input can be efficiently reduced to evaluating it on several random inputs. This result follows from a line of work [59, 36, 41, 42] that provides a method to efficiently compute a polynomial 푃 : F푁 → F of degree 푑 ≤ |F|/20 on any worst-

21 푁 ˜ 푁 1 1 case input 푥 ∈ F , given an oracle 푃 : F → F that agrees with 푃 on a 2 + poly(푁) fraction of inputs. Thus, for any low-degree polynomial over a large enough finite field, evaluating the polynomial on a random element in the finite field isroughlyas hard as evaluating the polynomial on any adversarially chosen input. With the random self-reducibility of polynomials in mind, a natural approach is to express the number of 푘-cliques in a graph as a low-degree polynomial of the 푛 × 푛 adjacency matrix 퐴 ∑︁ (︁ ∏︁ )︁ 푃 (퐴) = 퐴푖푗 . 푆⊂[푛] 푖<푗∈푆 |푆|=푘 This polynomial has been used in a number of papers, including by Goldreich and Rothblum [44] to construct a distribution on dense graphs for which counting 푘- cliques is provably hard on average. However, the distribution they obtain is far from Erdős-Rényi and also their approach does not yield tight bounds for sparse graphs. The significant obstacle that arises in applying the random self-reducibility of

푃 is that one needs to work over a large enough finite field F푝, so evaluating 푃 푛 on worst-case graph inputs in {0, 1}(2) only reduces to evaluating 푃 on uniformly 푛 (2) random inputs in F푝 . In order to further reduce to evaluating 푃 on graphs, given 푛 (2) a random input 퐴 ∈ F푝 [44] uses several gadgets (including replacing vertices by independent sets and taking disjoint unions of graphs) in order to create a larger unweighted random graph 퐴′ whose 푘-clique count is equal to 푘! · 푃 (퐴) (mod 푝) for appropriate 푝. However, any nontrivial gadget-based reduction seems to have little hope of arriving at something close to the Erdős-Rényi distribution, because gadgets inherently create non-uniform structure. We instead consider a different polynomial for graphs on 푛푘 vertices with 푛푘 × 푛푘 adjacency matrix 퐴,

(︃ )︃ ′ ∑︁ ∑︁ ∑︁ ∏︁ 푃 (퐴) = ··· 퐴푣푖푣푗 .

푣1∈[푛] 푣2∈[2푛]∖[푛] 푣푘∈[푘푛]∖[(푘−1)푛] 1≤푖<푗≤푘

The polynomial 푃 ′ correctly counts the number of 푘-cliques if 퐴 is 푘-partite with vertex 푘-partition [푛] ⊔ ([2푛] ∖ [푛]) ⊔ · · · ⊔ ([푘푛] ∖ [(푘 − 1)푛]). We first reduce clique-

22 counting in the worst case to computing 푃 ′ in the worst case; this is a simple step, because it is a purely worst-case reduction. Next, we construct a recursive counting procedure that reduces evaluating 푃 ′ on Erdős-Rényi graphs to counting 푘-cliques in Erdős-Rényi graphs. Therefore, it suffices to prove that if evaluating 푃 ′ is hard in the worst case, then evaluating 푃 ′ on Erdős-Rényi graphs is also hard.

Applying the Chinese Remainder theorem as well as the random self-reducibility 푛푘 of polynomials, computing 푃 ′ on worst-case inputs in {0, 1}( 2 ) reduces to computing 푛푘 ′ ( 2 ) 푃 on several uniformly random inputs in F푝 , for several different primes 푝 each on the order of Θ(log 푛). The main question is: how can one evaluate 푃 ′ on inputs 푛푘 ( 2 ) ′ 푋 ∼ Unif[F푝 ] using an algorithm that evaluates 푃 on 퐺(푛, 푐, 2) Erdős-Rényi graphs ⊗ 푛푘 (i.e., inputs 푌 ∼ Ber(푐) ( 2 ))?

To this end we introduce a method for converting finite field elements to bi- nary expansions: an efficient rejection sampling procedure tofind 푌 (0), . . . , 푌 (푡) (for 푡 = poly(푐−1(1 − 푐)−1 log(푛))) such that each 푌 (푖) is close in total variation to 푛푘 푡 ⊗( 2 ) ∑︀ 푖 (푖) Ber(푐) , and such that 푋 = 푖=0 2 푌 . The correctness of the rejection sam- pling procedure is proved via a finite Fourier analytic method that bounds the total variation convergence of random biased binary expansions to the uniform distribution over residues in F푝. This argument can be found in Chapter 4, and as discussed there the bounds we obtain are essentially optimal in their parameter dependence and this in turns yields near-optimal slowdown in the reduction. The technique appears likely to also be useful for other problems. For the unbiased case of 푐 = 1/2, this binary expansions technique had previously appeared in [45].

Now we algebraically manipulate 푃 ′ as follows:

∑︁ ∑︁ ∑︁ ∏︁ (︁ ∑︁ )︁ 푃 ′(푋) = ··· 2푙 · 푌 (푙) 푣푖푣푗 푣1∈[푛] 푣2∈[2푛]∖[푛] 푣푘∈[푘푛]∖[(푘−1)푛] 1≤푖<푗≤푘 푙∈{0,...,푡} ∑︁ (︁ ∏︁ )︁(︁ ∑︁ ∑︁ ∑︁ ∏︁ )︁ = 2푓푖푗 ··· 푌 (푓푖푗 ) 푣푖푣푗 푘 1≤푖≤푗≤푘 푣1∈[푛] 푣2∈[2푛]∖[푛] 푣푘∈[푘푛]∖[(푘−1)푛] 1≤푖<푗≤푘 푓∈{0,...,푡}(2) ∑︁ (︁ ∏︁ )︁ = 2푓푖푗 푃 ′(푌 (푓)). 푘 1≤푖≤푗≤푘 푓∈{0,...,푡}(2)

23 (푓) (푓푎¯¯푏) Here 푌 is the 푛푘-vertex graph with entries given by 푌푎푏 for 1 ≤ 푎 < 푏 ≤ 푛푘, where 푎¯ = ⌈푎/푛⌉ and ¯푏 = ⌈푏/푛⌉. We thus reduce the computation of 푃 ′(푋) to the 푘 computation of a weighted sum of poly(푐−1(1−푐)−1 log(푛))(2) different evaluations of 푃 ′ at graphs close in total variation to Erdős-Rényi 퐺(푛, 푐, 2) graphs. This concludes our reduction. Notice that working with 푃 ′ instead of 푃 was necessary for the second equality. We also give a different worst-case to average-case reduction for determining the parity of the number of 푘-cliques in Erdős-Rényi hypergraphs, as discussed in Section 2.2 and Chapter 3.

1.4 Notation and Preliminaries

A 푠-uniform hypergraph 퐺 = (푉 (퐺), 퐸(퐺)) consists of a vertex set 푉 (퐺) and a (︀푉 (퐺))︀ hyperedge set 퐸(퐺) ⊆ 푠 .A 푘-clique 퐶 in 퐺 is a subset of vertices 퐶 ⊂ 푉 (퐺) of size |퐶| = 푘 such that all of the possible hyperedges between the vertices are present (︀퐶)︀ in the hypergraph: 푠 ⊆ 퐸(퐺). We write cl푘(퐺) to denote the set of 푘-cliques of the hypergraph 퐺. One samples from the Erdős-Rényi distribution 퐺(푛, 푐, 푠) by (︀푛)︀ independently including each of the 푠 hyperedges with probability 푐. We denote the law of a random variable 푋 by ℒ(푋). We use 푇 (퐴, 푛) to denote the worst-case run-time of an algorithm 퐴 on inputs of size parametrized by 푛. We work in the Word RAM model of computation, where the words have 푂(log 푛) bits. All algorithms in this paper are randomized, and each (possibly biased) coin flip incurs constant computational cost.

1.5 Organization

Chapter 2 formally defines the various 푘-clique problems considered, and states the implications of the worst-case-to-average-case reduction proved in Chapter 3. Chap- ter 4 analyzes random binary expansions modulo a prime, which is needed in the worst-case-to-average-case reduction for sparse hypergraphs. Chapter 5 provides im-

24 proved algorithms for 푘-clique counting on sparse hypergraphs. And Chapter 6 con- cludes with extensions and open problems.

25 26 Chapter 2

Problem Formulations and Average-Case Lower Bounds

2.1 Clique Problems and Worst-Case Fine-Grained Conjectures

In this section, we formally define the problems we consider and the worst-case fine- grained complexity conjectures off of which our average-case lower bounds are based. We focus on the following computational problems.

Definition 2.1.1. #(푘, 푠)-clique denotes the problem of counting the number of 푘-cliques in an 푠-uniform hypergraph 퐺.

Definition 2.1.2. Parity-(푘, 푠)-clique denotes the problem of counting the number of 푘-cliques up to parity in an 푠-uniform hypergraph 퐺.

Definition 2.1.3. Decide-(푘, 푠)-clique denotes the problem of deciding whether or not an 푠-uniform hypergraph 퐺 contains a 푘-clique.

Both #(푘, 푠)-clique and Decide-(푘, 푠)-clique are fundamental problems that have long been studied in computational complexity theory and are conjectured to be computationally hard. When 푘 is allowed to be an unbounded input to the prob- lem, Decide-(푘, 푠)-clique is known to be NP-complete [53] and #(푘, 푠)-clique

27 is known to be #P-complete [75]. In this work, we consider the fine-grained com- plexity of these problems, where 푘 either can be viewed as a constant or a very slow-growing parameter compared to the number 푛 of vertices of the hypergraph. In this context, Parity-(푘, 푠)-clique can be interpreted as an intermediate prob- lem between the other two clique problems that we consider. The reduction from Parity-(푘, 푠)-clique to #(푘, 푠)-clique is immediate. And Decide-(푘, 푠)-clique reduces to Parity-(푘, 푠)-clique with a 푂(푘2푘)-multiplicative time overhead:

Lemma 2.1.4. Given an algorithm 퐴 for Parity-(푘, 푠)-clique that has error prob- ability < 1/3 on any 푠-uniform hypergraph 퐺, there is an algorithm 퐵 that runs in time 푂(푘2푘푇 (퐴, 푛)) and solves Decide-(푘, 푠)-clique with error < 1/3 on any 푠- uniform hypergraph 퐺.

Proof. Let cl푘(퐺) denote the set of 푘-cliques in hypergraph 퐺 = (푉, 퐸). Consider the polynomial ∑︁ ∏︁ 푃퐺(푥푉 ) = 푥푣 (mod 2),

푆∈cl푘(퐺) 푣∈푆 over the finite field F2.

If 퐺 has a 푘-clique at vertices 푆 ⊂ 푉 , then 푃퐺 is nonzero, because 푃퐺(1푆) = 1.

If 퐺 has no 푘-clique, then 푃퐺 is zero. Therefore, deciding whether 퐺 has a 푘-clique reduces to testing whether or not 푃퐺 is identically zero.

푃퐺 is of degree at most 푘, so if 푃퐺 is nonzero on at least one input, we claim that it is nonzero on at least a 2−푘 fraction of inputs. The claim holds because if we

푚 evaluate 푃퐺 at all points 푎 ∈ {0, 1} , the result is a non-zero Reed-Muller codeword in 푅푀(푘, 푚), which has distance 2푚−푘, and block-length 2푚 [63].

푘 We therefore evaluate 푃퐺 at 푐·2 independent random inputs for some large enough 푐 > 0, accept if any of the evaluations returns 1, and reject if all of the evaluations return 0. Each evaluation corresponds to calculating Parity-(푘, 푠)-clique on a hypergraph 퐺′ formed from 퐺 by removing each vertex independently with probability 1/2. As usual, we boost the error of 퐴 by running the algorithm 푂(푘) times for each evaluation, and using the majority vote.

28 When 푘 is a constant, the trivial brute-force search algorithms for these problems are efficient in the sense that they take polynomial time. However, these algorithms do not remain efficient under the lens of fine-grained complexity since brute-force search requires Θ(푛푘) time, which can grow significantly as 푘 grows. In the hypergraph case of 푠 ≥ 3, no algorithm taking time 푂(푛푘−휖) on any of these problems is known, including for Decide-(푘, 푠)-clique [78]. In the graph case of 푠 = 2, the fastest known algorithms take Θ(푛휔⌈푘/3⌉) time, where 2 ≤ 휔 < 2.4 is the fast matrix multiplication constant [48, 64]. Since this is the state of the art, one may conjecture that Decide- (푘, 푠)-clique and #(푘, 푠)-clique take 푛Ω(푘) time in the worst case. Supporting this conjecture, Razborov [68] proves that monotone circuits require Ω(˜ 푛푘) operations to solve Decide-(푘, 2)-clique in the case of constant 푘. Monotone circuit lower bounds are also known in the case when 푘 = 푘(푛) grows with 푛 [2, 4]. In [30], Decide-(푘, 2)-clique is shown to be W[1]-hard. In other words, this shows that if Decide-(푘, 2)-clique is fixed-parameter tractable – admits an algorithm taking time 푓(푘, 푠) · poly(푛) – then any algorithm in the parametrized complexity class W[1] is also fixed-parameter-tractable. This provides further evidence that Decide-(푘, 2)- clique is intractable for large 푘. Finally, [20] shows that solving Decide-(푘, 2)- clique in 푛표(푘) time is ETH-hard for constant 푘1. We therefore conjecture that the 푘-clique problems take 푛Ω(푘) time on worst-case inputs when 푘 is constant, as formalized below.

Conjecture 2.1.5 (Worst-case hardness of #(푘, 푠)-clique). Let 푘 be constant. Any randomized algorithm 퐴 for #(푘, 푠)-clique with error probability less than 1/3 takes time at least 푛Ω(푘) in the worst case for hypergraphs on 푛 vertices.

Conjecture 2.1.6 (Worst-case hardness of Parity-(푘, 푠)-clique). Let 푘 be con- stant. Any randomized algorithm 퐴 for Parity-(푘, 푠)-clique with error probability less than 1/3 takes time at least 푛Ω(푘) in the worst case for hypergraphs on 푛 vertices.

1These hardness results also apply to Decide-(푘, 푠)-clique for 푠 ≥ 3 since there is a reduction from Decide-(푘, 2)-clique to Decide-(푘, 푠)-clique in 푛푠 time. The reduction proceeds by starting with a graph 퐺 and constructing an 푠-uniform hypergraph 퐺′ that contains a 푠-hyperedge for every 푠-clique in 퐺. The 푘-cliques of 퐺 and 퐺′ are in bijection. This construction also reduces #(푘, 2)- clique to #(푘, 푠)-clique.

29 Conjecture 2.1.7 (Worst-case hardness of Decide-(푘, 푠)-clique). Let 푘 be con- stant. Any randomized algorithm 퐴 for Decide-(푘, 푠)-clique with error probability less than 1/3 takes time at least 푛Ω(푘) in the worst case for hypergraphs on 푛 vertices.

The conjectures are listed in order of increasing strength. Since Conjecture 2.1.7 is implied by ETH, they all follow from ETH. We also formulate a stronger version of the clique-counting hardness conjecture, which asserts that the current best known algorithms for 푘-clique counting are optimal.

Conjecture 2.1.8 (Strong worst-case hardness of #(푘, 푠)-clique). Let 푘 be con- stant. Any randomized algorithm 퐴 for #(푘, 푠)-clique with error probability less than 1/3 takes time Ω(˜ 푛휔⌈푘/3⌉) in the worst case if 푠 = 2 and Ω(˜ 푛푘) in the worst case if 푠 ≥ 3.

2.2 Average-Case Lower Bounds for Counting 푘-Cliques in 퐺(푛, 푐, 푠)

Our first main result is a worst-case to average-case reduction solving either #(푘, 푠)- clique or Parity-(푘, 푠)-clique on worst-case hypergraphs given a blackbox solving the problem on most Erdős-Rényi hypergraphs drawn from 퐺(푛, 푐, 푠). We discuss this error tolerance over sampling Erdős-Rényi hypergraphs as well as the multiplicative overhead in our reduction below. These results show that solving the 푘-clique prob- lems on Erdős-Rényi hypergraphs 퐺(푛, 푐, 푠) is as hard as solving them on worst-case hypergraphs, for certain choices of 푘, 푐 and 푠. Therefore the worst-case hardness as- sumptions, Conjectures 2.1.5, 2.1.6 and 2.1.8, imply average-case hardness on Erdős- Rényi hypergraphs for #(푘, 푠)-clique and Parity-(푘, 푠)-clique.

Theorem 2.2.1 (Worst-case to average-case reduction for #(푘, 푠)-clique). There is an absolute constant 퐶 > 0 such that if we define

푘 (︀ −1 −1 )︀(푠) Υ#(푛, 푐, 푠, 푘) , 퐶(푐 (1 − 푐) )(푠 log 푘 + 푠 log log 푛)(log 푛)

30 then the following statement holds. Let 퐴 be a randomized algorithm for #(푘, 푠)- clique with error probability less than 1/Υ# on hypergraphs drawn from 퐺(푛, 푐, 푠). Then there exists an algorithm 퐵 for #(푘, 푠)-clique that has error probability less than 1/3 on any hypergraph, such that

푠 푇 (퐵, 푛) ≤ (log 푛) · Υ# · (푇 (퐴, 푛푘) + (푛푘) )

For Parity-(푘, 푠)-clique we also give an alternative reduction with an improved reduction time and error tolerance in the dense case when 푐 = 1/2.

Theorem 2.2.2 (Worst-case to average-case reduction for Parity-(푘, 푠)-clique). We have that:

1. There is an absolute constant 퐶 > 0 such that if we define

(푘) (︂ (︂ (︂푘)︂ (︂푘)︂)︂)︂ 푠 Υ (푛, 푐, 푠, 푘) 퐶(푐−1(1 − 푐)−1)(푠 log 푘) 푠 log 푛 + log log 푃,1 , 푠 푠

then the following statement holds. Let 퐴 be a randomized algorithm for Parity-

(푘, 푠)-clique with error probability less than 1/Υ푃,1 on hypergraphs drawn from 퐺(푛, 푐, 푠). Then there exists an algorithm 퐵 for Parity-(푘, 푠)-clique that has error probability less than 1/3 on any hypergraph, such that

푠 푇 (퐵, 푛) ≤ Υ푃,1 · (푇 (퐴, 푛푘) + (푛푘) )

2. There is an absolute constant 퐶 > 0 such that if we define

(푘) Υ푃,2(푠, 푘) , (퐶푠 log 푘) 푠

then the following statement holds. Let 퐴 be a randomized algorithm for Parity-

(푘, 푠)-clique with error probability less than 1/Υ푃,2 on hypergraphs drawn from 퐺(푛, 1/2, 푠). Then there exists an algorithm 퐵 for Parity-(푘, 푠)-clique that

31 has error probability less than 1/3 on any hypergraph, such that

푠 푇 (퐵, 푛) ≤ Υ푃,2 · (푇 (퐴, 푛푘) + (푛푘) )

Our worst-case to average-case reductions yield the following fine-grained average- case lower bounds for 푘-clique counting and parity on Erdős-Rényi hypergraphs based on Conjectures 2.1.5 and 2.1.8. We separate these lower bounds into the two cases of dense and sparse Erdős-Rényi hypergraphs. We remark that, for all constants 푘, an error probability of less than (log 푛)−휔(1) suffices in the dense case and error probability less than 푛−휔(1) suffices in the sparse case.

Corollary 2.2.3 (Average-case hardness of #(푘, 푠)-clique on dense 퐺(푛, 푐, 푠)). If 푘, 푐, 휖 > 0 are constant, then we have that

1. Assuming Conjecture 2.1.5, then any algorithm 퐴 for #(푘, 푠)-clique that has − 푘 −휖 error probability less than (log 푛) (푠) on Erdős-Rényi hypergraphs drawn from 퐺(푛, 푐, 푠) must have runtime at least 푇 (퐴, 푛) ≥ 푛Ω(푘).

2. Assuming Conjecture 2.1.8, then any algorithm 퐴 for #(푘, 푠)-clique that − 푘 −휖 has error probability less than (log 푛) (푠) on Erdős-Rényi hypergraphs drawn from 퐺(푛, 푐, 푠) must have runtime at least 푇 (퐴, 푛) ≥ Ω˜ (︀푛휔⌈푘/3⌉)︀ if 푠 = 2 and 푇 (퐴, 푛) ≥ Ω(˜ 푛푘) if 푠 ≥ 3.

Corollary 2.2.4 (Average-case hardness of #(푘, 푠)-clique on sparse 퐺(푛, 푐, 푠)). If 푘, 훼, 휖 > 0 are constant and 푐 = Θ(푛−훼), then we have that

1. Assuming Conjecture 2.1.5, then any algorithm 퐴 for #(푘, 푠)-clique that has −훼 푘 −휖 error probability less than 푛 (푠) on Erdős-Rényi hypergraphs drawn from 퐺(푛, 푐, 푠) must have runtime at least 푇 (퐴, 푛) ≥ 푛Ω(푘).

2. Assuming Conjecture 2.1.8, then any algorithm 퐴 for #(푘, 푠)-clique that has −훼 푘 −휖 error probability less than 푛 (푠) on Erdős-Rényi hypergraphs drawn from (︁ 휔⌈푘/3⌉−훼 푘 )︁ 퐺(푛, 푐, 푠) must have runtime at least 푇 (퐴, 푛) ≥ Ω˜ 푛 (푠) if 푠 = 2 and (︁ 푘−훼 푘 )︁ 푇 (퐴, 푛) ≥ Ω˜ 푛 (푠) if 푠 ≥ 3.

32 For Parity-(푘, 푠)-clique, we consider here the implications of Theorem 2.2.2 only for 푐 = 1/2, since this is the setting in which we obtain substantially different lower bounds than for #(푘, 푠)-clique. As shown, an error probability of 표(1) on 퐺(푛, 1/2, 푠) hypergraphs suffices for our reduction to succeed.

Corollary 2.2.5 (Average-case hardness of Parity-(푘, 푠)-clique on 퐺(푛, 1/2, 푠)). Let 푘 be constant. Assuming Conjecture 2.1.6, there is a small enough constant

휖 , 휖(푘, 푠) such that if any algorithm 퐴 for Parity-(푘, 푠)-clique has error less than 휖 on 퐺(푛, 1/2, 푠) then 퐴 must have runtime at least 푇 (퐴, 푛) ≥ 푛Ω(푘).

We remark on one subtlety of our setup in the sparse case. Especially in our algorithms section, we generally restrict our attention to 푐 = Θ(푛−훼) satisfying 훼 ≤ (︀ 푘 )︀−1 푠 푠−1 , which is necessary for the expected number of 푘-cliques in 퐺(푛, 푐, 푠) to not tend to zero. However, even when this expectation is decaying, the problem #(푘, 푠)-clique as we formulate it is still nontrivial. The simple algorithm that always outputs zero fails with a polynomially small probability that does not appear to meet the 1/Υ# requirement in our worst-case to average-case reduction. A simple analysis of this error probability can be found in Lemma 5.1.1. Note that even (︀ 푘 )︀−1 when 훼 > 푠 푠−1 , greedy-random-sampling and its derivative algorithms in Chapter 5 still has guarantees and succeeds with probability 1 − 푛−휔(1). We now discuss the multiplicative overhead and error tolerance in our worst-case to average- case reduction for #(푘, 푠)-clique.

Discussion of the Multiplicative Slowdown Υ#. In the sparse case of 푐 = Θ(푛−훼), our algorithmic upper bounds in Chapter 5 imply lower bounds on the nec- essary multiplicative overhead. In the hypergraph case of 푠 ≥ 3 and below the 푘-clique (︁ 푘 )︁ ˜ 훼(푠) percolation threshold, it must follow that the overhead is at least Υ# = Ω 푛 = (︁ − 푘 )︁ Ω˜ 푐 (푠) . Otherwise, our algorithms combined with our worst-case to average-case reduction would contradict Conjecture 2.1.8. Up to polylog(푛) factors, this exactly matches the Υ# from our reduction. In the graph case of 푠 = 2, it similarly must (︁ 휔훼 푘 )︁ (︁ 휔 푘 )︁ ˜ 9 (푠) ˜ − 9 (푠) follow that the overhead is at least Υ# = Ω 푛 = Ω 푐 to not contradict

33 Conjecture 2.1.8. This matches the Υ# from our reduction up to a constant factor in the exponent.

Discussion of the Error Tolerance 1/Υ#. Notice that our worst-case to average- case reductions in Theorems 2.2.1 and 2.2.2 require that the error of the average-case blackbox on Erdős-Rényi hypergraphs go to zero as 푘 goes to infinity. This error requirement can be seen to be unavoidable when 푘 = 휔(log 푛) in the dense Erdős- Rényi graph case of 퐺(푛, 1/2). The expected number of 푘-cliques in 퐺(푛, 1/2) is 푘 (︀푛)︀ −(2) 푘 · 2 , which is also an upper bound on the probability that 퐺(푛, 1/2) contains a 푘-clique by Markov’s inequality.

푘 −푘2/2 −푘2/6 If 푘 , 3 log2 푛, then the probability of a 푘-clique is less than 푛 · 2 = 2 . The algorithm that always outputs zero therefore achieves an average-case error of

2 2−푘 /6 for #(푘, 2)-clique on 퐺(푛, 1/2). However, this trivial algorithm is useless for solving #(푘, 2)-clique on worst-case inputs in a worst-case to average-case reduc- tion. For this particular 푘 = 3 log2 푛 regime, our #(푘, 2)-clique reduction requires −푂(푘2 log log 푛) average-case error on 퐺(푛, 1/2) less than 1/Υ# = 2 . Our Parity-(푘, 2)-

2 clique reduction is more lenient, requiring error only less than 2−푂(푘 log log log 푛) on 퐺(푛, 1/2). Thus, the error bounds required by our reductions are quite close to the 2−푘2/6 error bound that is absolutely necessary for any reduction in this regime. In the regime where 푘 = 푂(1) is constant and on 퐺(푛, 1/2), our Parity-(푘, 2)-clique reduction only requires a small constant probability of error and our #(푘, 2)-clique reduction requires less than a 1/ polylog(푛) probability of error. We leave it as an in- triguing open problem whether the error tolerance of our reductions can be improved in this regime. Finally, we remark that the error tolerance of the reduction must depend on 푐. By a union-bound on the 푘-subsets of vertices, the probability that a 퐺(푛, 푐) graph contains a 푘-clique is less than (푛/푐푘/2)푘. For example, if 푐 = 1/푛 then the probability that there exists a 푘-clique is less than 푛−Ω(푘2). As a result, no worst-case to average- case reduction can tolerate average-case error more than 푛−푂(푘2) on 퐺(푛, 1/푛) graphs. And therefore our reductions for #(푘, 2)-clique and for Parity-(푘, 2)-clique are

34 close to optimal when 푐 = 1/푛, because our error tolerance in this case scales as 푛−푂(푘2 log log 푛).

35 36 Chapter 3

Worst-Case to Average-Case Reduction for 퐺(푛, 푐, 푠)

In this section, we give our main worst-case to average-case reduction that trans- forms a blackbox solving #(푘, 푠)-clique on 퐺(푛, 푐, 푠) into a blackbox solving #(푘, 푠)- clique on a worst-case input hypergraph. This also yields a worst-case to average- case reduction for Parity-(푘, 푠)-clique and proves Theorems 2.2.1 and 2.2.2. The reduction involves the following five main steps, the details of which are in Sections 3.1 to 3.5.

1. Reduce #(푘, 푠)-clique and Parity-(푘, 푠)-clique on general worst-case hyper- graphs to the worst-case problems with inputs that are 푘-partite hypergraphs with 푘 parts of equal size.

2. Reduce the worst-case problem on 푘-partite hypergraphs to the problem of

computing a low-degree polynomial 푃푛,푘,푠 on 푁 , 푁(푛, 푘, 푠) variables over a small finite field F.

3. Reduce the problem of computing 푃푛,푘,푠 on worst-case inputs to computing 푃푛,푘,푠 on random inputs in F푁 .

푁 4. Reduce the problem of computing 푃푛,푘,푠 on random inputs in F to computing 푁 푃푛,푘,푠 on random inputs in {0, 1} . This corresponds to #(푘, 푠)-clique and

37 Parity-(푘, 푠)-clique on 푘-partite Erdős-Rényi hypergraphs.

5. Reduce the average-case variants of #(푘, 푠)-clique and Parity-(푘, 푠)-clique on 푘-partite Erdős-Rényi hypergraphs to non-푘-partite Erdős-Rényi hypergraphs.

These steps are combined in Section 3.6 to complete the proofs of Theorems 2.2.1 and 2.2.2. Before proceeding to our worst-case to average-case reduction, we establish some definitions and notation, and also give pseudocode for the counting reduction in Figure 3-1 – the parity reduction is similar. The intermediate steps of our reduction crucially make use of 푘-partite hyper- graphs with 푘 parts of equal size, defined below.

Definition 3.0.1 (푘-Partite Hypergraphs). Given a 푠-uniform hypergraph 퐺 on 푛푘 vertices with vertex set 푉 (퐺) = [푛] × [푘], define the vertex labelling

퐿 :(푖, 푗) ∈ [푛] × [푘] ↦→ 푗 ∈ [푘]

If for all 푒 = {푢1, . . . , 푢푠} ∈ 퐸(퐺), the labels 퐿(푢1), 퐿(푢2), . . . , 퐿(푢푠) are distinct, then we say that 퐺 is 푘-partite with 푘 parts of equal size 푛.

In our reduction, it suffices to consider only 푘-partite hypergraphs with 푘 parts of equal size. For ease of notation, our 푘-partite hypergraphs will always have 푛푘 vertices and vertex set [푛] × [푘]. In particular, the edge set of a 푘-partite 푠-uniform hypergraph is an arbitrary subset of

퐸(퐺) ⊆ {{푢1, . . . , 푢푠} ⊂ 푉 (퐺): 퐿(푢1), . . . , 퐿(푢푠) are distinct}

Taking edge indicators yields that the 푘-partite hypergraphs on 푛푘 vertices we con-

푁 (︀푘)︀ 푠 sider are in bijection with {0, 1} , where 푁 , 푁(푛, 푘, 푠) = 푠 푛 is this size of this set of permitted hyperedges. Thus we will refer to elements 푥 ∈ {0, 1}푁 and 푘-partite 푠-uniform hypergraphs on 푛푘 vertices interchangeably. This definition also extends to Erdős-Rényi hypergraphs.

38 Definition 3.0.2 (푘-Partite Erdős-Rényi Hypergraphs). The 푘-partite 푠-uniform Erdős-Rényi hypergraph 퐺(푛푘, 푐, 푠, 푘) is a distribution over hypergraphs on 푛푘 ver- tices with vertex set 푉 (퐺) = [푛] × [푘]. A sample from 퐺(푛푘, 푐, 푠, 푘) is obtained by independently including hyperedge each 푒 = {푢1, . . . , 푢푠} ∈ 퐸(퐺) with probability 푐 for all 푒 with 퐿(푢1), 퐿(푢2), . . . , 퐿(푢푠) distinct.

Viewing the hypergraphs as elements of 퐺(푛푘, 푐, 푠, 푘) as a distribution on {0, 1}푁 , it follows that 퐺(푛푘, 푐, 푠, 푘) corresponds to the product distribution Ber(푐)⊗푁 .

3.1 Worst-Case Reduction to 푘-Partite Hypergraphs

In the following lemma, we prove that the worst-case complexity of #(푘, 푠)-clique and Parity-(푘, 푠)-clique are nearly unaffected when we restrict the inputs tobe worst-case 푘-partite hypergraphs. This step is important, because the special struc- ture of 푘-partite hypergraphs will simplify future steps in our reduction.

Lemma 3.1.1. Let 퐴 be an algorithm for #(푘, 푠)-clique, such that 퐴 has error probability less than 1/3 for any 푘-partite hypergraph 퐺 on 푛푘 vertices. Then, there is an algorithm 퐵 for #(푘, 푠)-clique with error probability less than 1/3 on any hypergraph 퐺 satisfying that 푇 (퐵, 푛) ≤ 푇 (퐴, 푛) + 푂(푘푠푛푠). Furthermore, the same result holds for Parity-(푘, 푠)-clique in place of #(푘, 푠)-clique.

Proof. Let 퐺 be an 푠-uniform hypergraph on 푛 vertices. Construct the 푠-uniform hypergraph 퐺′ on the vertex set 푉 (퐺′) = [푛] × [푘] with edge set

′ {︁ 1≤푣1<푣2<···<푣푠≤푛}︁ 퐸(퐺 ) = {(푣1, 푡1), (푣2, 푡2),..., (푣푠, 푡푠)} : {푣1, . . . , 푣푠} ∈ 퐸(퐺) and 1≤푡1<푡2<···<푡푠≤푘

The hypergraph 퐺′ can be constructed in 푂(푘푠푛푠) time. Note that 퐺′ is 푘-partite with the vertex partition 퐿 :(푖, 푗) ∈ [푛] × [푘] ↦→ 푗 ∈ [푘]. There is also a bijective correspondence between 푘-cliques in 퐺′ and 푘-cliques in 퐺 given by

{푣1, 푣2, . . . , 푣푘} ↦→ {(푣1, 1), (푣2, 2),..., (푣푘, 푘)}

39 ′ where 푣1 < 푣2 < ··· < 푣푘. Thus, the 푘-partite 푠-uniform hypergraph 퐺 on 푛푘 vertices has exactly the same number of 푘-cliques as 퐺. It suffices to run 퐴 on 퐺′ and to return its output.

A corollary to Lemma 3.1.1 is that if any worst-case hardness for #(푘, 푠)-clique and Parity-(푘, 푠)-clique general 푠-uniform hypergraphs immediately transfers to the 푘-partite case. For instance, the lower bounds of Conjectures 2.1.5, 2.1.6, and 2.1.8 imply corresponding lower bounds in the 푘-partite case. Going forward in our worst- case to average-case reduction, we may restrict our attention to 푘-partite hypergraphs without loss of generality.

3.2 Counting 푘-Cliques as a Low-Degree Polynomial

A key step in our worst-case to average-case reduction is to express the number of 푘-cliques as a low-degree polynomial in the adjacency matrix. As mentioned in the introduction, a similar step appears in the worst-case to average-case reduction of Goldreich and Rothblum [44]. In particular, the number of 푘-cliques of a 푘-partite hypergraph 퐺 with edge

푁 푁 indicators 푥 ∈ {0, 1} is a degree-퐷 polynomial 푃푛,푘,푠 : {0, 1} → Z where 퐷 , (︀푘)︀ 푁 퐷(푘, 푠) = 푠 . We identify the 푁 coordinates of 푥 ∈ {0, 1} with the 푠-subsets of [푛] × [푘] with elements with all distinct labels, and for an 푠-vertex hyperedge

푆 ⊂ 푉 (퐺), the variable 푥푆 denotes the indicator variable that the hyperedge 푆 is in the hypergraph 푥. The number of 푘-cliques in 퐺 is given by

∑︁ ∏︁ 푃푛,푘,푠(푥) = 푥푢푆 (3.1)

{푢1,...,푢푘}⊂푉 (퐺) 푆⊂[푘] ∀푖 퐿(푢푖)=푖 |푆|=푠

For any finite field F, this equation defines 푃푛,푘,푠 as a polynomial over that finite field. 푁 For clarity, we write this polynomial over F as 푃푛,푘,푠,F : F → F. Observe that for any hypergraph 푥 ∈ {0, 1}푁 , we have that

푃푛,푘,푠,F(푥) = 푃푛,푘,푠(푥) (mod char(F))

40 where char(F) is the characteristic of the finite field. We now reduce computing #(푘, 푠)-clique and Parity-(푘, 푠)-clique on a 푘-partite hypergraph 푥 ∈ {0, 1}푁 to

computing 푃푛,푘,푠,F(푥) for appropriate finite fields F. This is formalized in the following two propositions.

Proposition 3.2.1. Let 푥 ∈ {0, 1}푁 denote a 푠-uniform hypergraph that is 푘-partite ∏︀ 푘 with vertex labelling 퐿. Let 푝1, 푝2, . . . , 푝푡 be 푡 distinct primes, such that 푖 푝푖 > 푛 . Then, solving (푘, 푠) reduces to computing 푃 (푥) for all 푖 ∈ [푡], plus # -clique 푛,푘,푠,F푝푖 푂(푘 log 푛) additive computational overhead. Moreover, computing 푃 (푥) for all 푛,푘,푠,F푝푖 푖 ∈ [푡] reduces to computing #(푘, 푠)-clique, plus 푂(푡푘 log 푛) computational overhead.

푘 푘 Proof. Note that 푃푛,푘,푠(푥) ≤ 푛 since there are at most 푛 cliques in the hypergraph. So the claim follows from the Chinese Remainder Theorem and the fact that for any 푖 ∈ [푡], it holds that 푃 (푥) ≡ 푃 (푥) (mod 푝 ). 푛,푘,푠,F푝푖 푛,푘,푠 푖

Proposition 3.2.2. Let F be a finite field of characteristic 2. Let 푥 ∈ {0, 1}푁 be a 푠-uniform hypergraph that is 푘-partite with vertex labelling 퐿. Then solving Parity-

(푘, 푠)-clique for 푥 is equivalent to computing 푃푛,푘,푠,F(푥).

Proof. This is immediate from 푃푛,푘,푠,F(푥) ≡ 푃푛,푘,푠(푥) (mod char(F)).

3.3 Random Self-Reducibility: Reducing to Random

Inputs in F푁

Expressing the number and parity of cliques as low-degree polynomials allows us to perform a key step in the reduction: because polynomials over finite fields are random

self-reducible, we can reduce computing 푃푛,푘,푠,F on worst-case inputs to computing 푁 푃푛,푘,푠,F on several uniformly random inputs in F . The following well-known lemma states the random self-reducibility of low-degree polynomials. The lemma first appeared in [42]. We follow the proof of [8] in orderto present the lemma with explicit guarantees on the running time of the reduction.

41 Lemma 3.3.1 (cf. Theorem 4 of [42]). Let F be a finite field with |F| = 푞 elements. Let 푁, 퐷 > 0. Suppose 9 < 퐷 < 푞/12. Let 푓 : F푁 → F be a polynomial of degree at most 퐷. If there is an algorithm 퐴 running in time 푇 (퐴, 푁) such that

P푥∼Unif[F푁 ][퐴(푥) = 푓(푥)] > 2/3,

then there is an algorithm 퐵 running in time 푂((푁 +퐷)퐷2 log2 푞 +푇 (퐴, 푁)·퐷) such

that for any 푥 ∈ F푁 , it holds that P[퐵(푥) = 푓(푥)] > 2/3.

Proof. Our proof of the lemma is based off of the proof that appears in [8]. Theonly difference is that in [8], the lemma is stated only for finite fields whose size isaprime.

푁 푖.푖.푑 Suppose we wish to calculate 푓(푥) for 푥 ∈ F . In order to do this, choose 푦1, 푦2 ∼ 푁 2 Unif[F ], and define the polynomial 푔(푡) = 푥 + 푡푦1 + 푡 푦2 where 푡 ∈ F. We evaluate 2 퐴(푔(푡)) at 푚 different values 푡1, . . . , 푡푚 ∈ F. This takes 푂(푚푁퐷 log 푞 + 푚 · 푇 (퐴, 푁)) time. Suppose that we have the guarantee that at most (푚−2퐷)/2 of these evaluations are incorrect. Then, since 푓(푔(푡)) is a univariate polynomial of degree at most 2퐷, we may use Berlekamp-Welch to recover 푓(푔(0)) = 퐴(푥) in 푂(푚3) arithmetic operations 2 over F, each of which takes 푂(log 푞) time. 푁 Since 푔(푡푖) and 푔(푡푗) are pairwise independent and uniform in F for any distinct

푡푖, 푡푗 ̸= 0, by the second-moment method, with probability > 2/3, at most (푚−2퐷)/2 evaluations of 퐴(푔(푡)) will be incorrect if we take 푚 = 12퐷.

Lemma 3.3.1 implies that if we can efficiently compute 푃푛,푘,푠,F on at least a 2/3 fraction of randomly chosen inputs in F푁 , then we can efficiently compute the poly- 푁 nomial 푃푛,푘,푠,F over a worst-case input in F .

3.4 Reduction to Evaluating the Polynomial on 퐺(푛푘, 푐, 푠, 푘)

So far, we have reduced worst-case clique-counting over unweighted hypergraphs to the average-case problem of computing 푃푛,푘,푠,F over 푘-partite hypergraphs with ran- dom edge weights in F. It remains to reduce from computing 푃푛,푘,푠,F on inputs

42 [︀ 푁 ]︀ [︀ 푁 ]︀ 푥 ∼ Unif F to random hypergraphs, which correspond to 푥 ∼ Unif {0, 1} . Since {0, 1}푁 is an exponentially small subset of F푁 if |F| > 2, the random weighted and unweighted hypergraph problems are very different. In this section, we carry out this reduction using two different arguments for Parity-(푘, 푠)-clique and #(푘, 푠)- clique. The latter reduction is based on the total variation convergence of random binary expansion modulo 푝 to Unif[F푝] and related algorithmic corollaries from Chap- ter 4. We first present the reduction that will be applied in the caseof Parity-(푘, 푠)- (︀[푘])︀ * clique. Given a map 푎 : 푠 → {0, 1, . . . , 푡 − 1}, let 푎 :[푁] → {0, 1, . . . , 푡 − 1} denote the map induced by the labels 퐿 : 푉 (퐺) → [푘] of the vertices, when the indices of [푁] are identified with the possible 푘-partite hyperedges of 퐺. Explicitly, if 휐 is a bijection between [푁] and the set of possible 푘-partite hyperedges of 퐺 under the

* (︀푘)︀ labelling 퐿, then define 푎 (푖) = 푎(퐿(휐(푖))) for all 푖 ∈ [푁]. Recall that 퐷 = 푠 is the degree of 푃푛,푘,푠. The following lemma will be used only for the Parity-(푘, 푠)-clique case:

Lemma 3.4.1. Let 푝 be prime and 푡 ≥ 1. Suppose 퐴 is an algorithm that computes

[︀ 푁 ]︀ 푃푛,푘,푠,F푝 (푦) with error probability less than 훿 , 훿(푛) for 푦 ∼ Unif F푝 in time 푇 (퐴, 푛). Then there is an algorithm 퐵 that computes 푃 (푥) with error probability less than 푛,푘,푠,F푝푡 퐷 [︁ 푁 ]︁ (︀ 4 3 퐷 )︀ 푡 · 훿 for 푥 ∼ Unif F푝푡 in time 푇 (퐵, 푛) = 푂 푁푡 (log 푝) + 푡 · 푇 (퐴, 푛) .

[︁ 푁 ]︁ Proof. We give a reduction computing 푃 (푥) where 푥 ∼ Unif 푡 given black- 푛,푘,푠,F푝푡 F푝 푝 푝2 푝푡−1 box access to 퐴. Let 훽 be such that 훽, 훽 , 훽 , . . . , 훽 ∈ F푝푡 forms a normal basis for F푝푡 over F푝. Now for each 푖 ∈ [푁], compute the basis expansion

(0) (1) 푝 (푡−1) 푝푡−1 푥푖 = 푥푖 훽 + 푥푖 훽 + ··· + 푥푖 훽 .

2 2 One can find a generator for a normal basis 훽 ∈ F푝푡 in time 푂((푡 +log 푝)(푡 log 푝) ) by Bach et al. [7]. Computing 푥(0), . . . , 푥(푡−1) then takes time 푂(푁푡3(log 푝)3) because

3 1 푁 applications of Gaussian elimination each take at most 푂(푡 ) operations over F푝. Note that since 푥 is uniformly distributed and 훽, 훽푝, . . . , 훽푝푡−1 form a basis, it follows

1For a good survey on normal bases, we recommend [40].

43 (0) (1) (푡−1) [︀ 푁 ]︀ that 푥 , 푥 , . . . , 푥 are distributed i.i.d according to Unif F푝 . For any map (푏) 푁 (푏) (푏(푖)) 푏 :[푁] → {0, 1, . . . , 푡 − 1} define 푥 ∈ F푝 as 푥푖 = 푥푖 for all 푖 ∈ [푁]. Observe (푏) 푁 that for any fixed map 푏, the vector 푥 is uniform in F푝 . We now expand and redistribute the terms of 푃 as follows. 푛,푘,푠,F푝푡

∑︁ ∏︁ 푃 (푥) = 푥 푛,푘,푠,F푝푡 푢푆 {푢1,...,푢푘}⊂푉 (퐺) [푘] 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 (︃ 푡−1 )︃ ∑︁ ∏︁ ∑︁ 푖 = 푥(푖) 훽푝 푢푆 {푢1,...,푢푘}⊂푉 (퐺) [푘] 푖=0 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞

∑︁ ⎜ ∑︁ ∏︁ (︁ (푎(푆)) 푝푎(푆) )︁⎟ = ⎜ 푥 훽 ⎟ ⎝ 푢푆 ⎠ [푘] {푢1,...,푢푘}⊂푉 (퐺) [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞ ⎛ ⎞

∑︁ ∏︁ 푝푎(푆) ⎜ ∑︁ ∏︁ (푎(푆))⎟ = ⎜ 훽 ⎟ ⎜ 푥 ⎟ ⎝ ⎠ ⎝ 푢푆 ⎠ [푘] [푘] {푢1,...,푢푘}⊂푉 (퐺) [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 ) 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞ ∑︁ ∏︁ 푎(푆) * = ⎜ 훽푝 ⎟ 푃 (︀푥(푎 ))︀ ⎝ ⎠ 푛,푘,푠,F푝 [푘] [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 )

(푎*) [︀ 푁 ]︀ As observed above, it holds that 푥 ∼ Unif F푝 for each 푎. Thus, computing 퐷 푁 푃푛,푘,푠,F(푥) reduces to evaluating 푃푛,푘,푠,F푝 on 푡 uniformly random inputs on in F푝 and outputting a weighted sum of the evaluations. The desired bound on the error probability follows from a union bound.

We now give the reduction to evaluating 푃푛,푘,푠 on random hypergraphs drawn from 퐺(푛푘, 푐, 푠, 푘) in the case of #(푘, 푠)-clique.

Lemma 3.4.2. Let 푝 be prime and let 푐 = 푐(푛), 훾 = 훾(푛) ∈ (0, 1). Suppose that 퐴 is an algorithm that computes 푃푛,푘,푠,F푝 (푦) with error probability less than 푁 훿 , 훿(푛) when 푦 ∈ {0, 1} is drawn from 퐺(푛푘, 푐, 푠, 푘). Then, for some 푡 = −1 −1 푂(푐 (1 − 푐) log(푁푝/훾) log 푝), there is an algorithm 퐵 that evaluates 푃푛,푘,푠,F푝 (푥) 퐷 [︀ 푁 ]︀ with error probability at most 훾 + 푡 · 훿 when 푥 ∼ Unif F푝 in time 푇 (퐵, 푛) =

44 푂 (︀푁푝푡 log(푁푝/훾) + 푡퐷 · 푇 (퐴, 푛))︀.

[︀ 푁 ]︀ Proof. We give a reduction computing 푃푛,푘,푠,F푝 (푥) where 푥 ∼ Unif F푝 given blackbox access to 퐴. We first handle the case in which 푝 > 2. For each 푗 ∈ [푁], apply the (0) (1) (푡−1) algorithm from Lemma 4.0.3 to sample 푥푗 , 푥푗 , . . . , 푥푗 ∈ {0, 1} satisfying

푡−1 (︁ (0) (푡−1) ⊗푡)︁ ∑︁ 푖 (푖) 푑TV ℒ(푥푗 , . . . , 푥푗 ), Ber(푐) ≤ 휖 , 훾/푁 and 2 푥푗 ≡ 푥푗 (mod 푝) 푖=0

By Lemmas 4.0.2 and 4.0.3, we may choose 푡 = 푂(푐−1(1 − 푐)−1 log(푁푝/훾) log 푝) and this sampling can be carried out in 푂(푁푝푡 log(푁푝/훾)) time. By the total variation

(0) (푡−1) (0) (푡−1) ⊗푘 bound, for each 푗 we may couple (푥푗 , . . . , 푥푗 ) with (푍푗 , . . . , 푍푗 ) ∼ Ber(푐) , (푖) (푖) (푖) (푘) so that P[푥푗 = 푍푗 ∀푖, 푗] ≥ 1 − 훾. Moreover, we have 푥푗 ⊥⊥ 푥푙 whenever 푗 ̸= 푙, so (푖) (푖) (푘) we may choose the 푍푗 so that 푍푗 ⊥⊥ 푍푙 whenever 푗 ̸= 푙. As in the proof of Lemma 3.4.1, given any map 푏 :[푁] → {0, . . . , 푡 − 1}, we define

(푏) 푁 (푏) (푏(푗)) 푍 ∈ {0, 1} by 푍푗 = 푍푗 , for all 푗 ∈ [푁]. We also note that for any fixed 푏, the (푏) (푏) entries 푍1 , . . . , 푍푁 are independent and distributed as Ber(푐). Therefore,

푍(푏) ∼ 퐺(푛푘, 푐, 푠, 푘)

Now compute the following quantity, similarly to the calculations in Lemma 3.4.1:

(︃ 푡−1 )︃ ∑︁ ∏︁ ∑︁ 푃˜ (푍) 2푖 · 푍(푖) 푛,푘,푠,F푝 , 푢푆 {푢1,...,푢푘}⊂푉 (퐺) [푘] 푖=0 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞

∑︁ ⎜ ∑︁ ∏︁ (︀ 푎(푆) (푎(푆)))︀⎟ = ⎜ 2 · 푍 ⎟ ⎝ 푢푆 ⎠ [푘] {푢1,...,푢푘}⊂푉 (퐺) [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞ ⎛ ⎞

∑︁ ∏︁ 푎(푆) ⎜ ∑︁ ∏︁ (푎(푆))⎟ = ⎜ 2 ⎟ ⎜ 푍 ⎟ ⎝ ⎠ ⎝ 푢푆 ⎠ [푘] [푘] {푢1,...,푢푘}⊂푉 (퐺) [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 ) 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 ⎛ ⎞ ∑︁ ∏︁ * = ⎜ 2푎(푆)⎟ 푃 (푍(푎 )). ⎝ ⎠ 푛,푘,푠,F푝 [푘] [푘] 푎:( 푠 )→{0,...,푡−1} 푆∈( 푠 )

45 퐷 (푎*) We may use algorithm 퐴 to evaluate the 푡 values of 푃푛,푘,푠,F푝 (푍 ), with proba- 퐷 ˜ bility < 푡 · 훿 of any error (by a union bound). Computing 푃푛,푘,푠,F푝 (푍) reduces to computing a weighted sum over the 푡퐷 evaluations. Conditioned on the event that (푖) (푖) ˜ 푥푗 = 푍푗 ∀푖, 푗, then 푃푛,푘,푠,F푝 (푥) = 푃푛,푘,푠,F푝 (푍), because

∑︁ ∏︁ 푃푛,푘,푠,F푝 (푥) = 푥푢푆

{푢1,...,푢푘}⊂푉 (퐺) [푘] 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 (︃ 푡−1 )︃ ∑︁ ∏︁ ∑︁ = 2푖 · 푥(푖) 푢푆 {푢1,...,푢푘}⊂푉 (퐺) [푘] 푖=0 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖 (︃ 푡−1 )︃ ∑︁ ∏︁ ∑︁ = 2푖 · 푍(푖) = 푃˜ (푍). 푢푆 푛,푘,푠,F푝 {푢1,...,푢푘}⊂푉 (퐺) [푘] 푖=0 푆∈( 푠 ) ∀푖 퐿(푢푖)=푖

(푖) (푖) Since P[푥푗 = 푍푗 ∀푖, 푗] ≥ 1 − 푡 · 훾, by a union bound with the error in calculation we 퐷 have computed 푃푛,푘,푠,F푝 (푥) with probability of error ≤ 훾 + 푡 · 훿. The claim follows for the case 푝 > 2.

If 푝 = 2, then the proof is almost identical, except that since 2 ≡ 0 (mod 2), we may no longer use the result on random binary expansions of Lemma 4.0.3.

(0) (푡−1) 푁 In this case, for each 푗 ∈ [푁] we sample 푥푗 , . . . , 푥푗 ∈ {0, 1} such that each (0) (푡−1) ⊗푡 푑TV(ℒ(푥푗 , . . . , 푥푗 ), Ber(푐) ) ≤ 휖 , 훾/푁, and so that

푡−1 ∑︁ (푖) 푥푗 = 푥푗 (mod 푝). 푖=0

By Lemma 4.0.4, we may choose 푡 = 푂(푐−1(1−푐)−1 log(푁/훾)), and we may sample in (푖) (푖) time 푂(푁푡 log(푁/훾)). Again, we couple the 푥푗 variables with variables 푍푗 ∼ Ber(푐) (푖) (푖) such that the event 퐸 that 푥푗 = 푍푗 for all 푖, 푗 has probability P[퐸] ≥ 1−훾 and such (푖) (푘) that 푍푗 is independent of 푍푙 whenever 푗 ̸= 푙. By a similar, and simpler, calculation ˜ to the one for the case 푝 > 2, we have that 푃푛,푘,푠,F2 (푍) = 푃푛,푘,푠,F2 (푥) conditioned on

46 퐸, where

˜ ∑︁ (푎*) 푃푛,푘,푠,F2 (푍) , 푃푛,푘,푠,F2 (푍 ). [푘] 푎:( 푠 )→{0,...,푡−1}

This can be calculated using the algorithm 퐴 similarly to the 푝 > 2 case, because each 푍(푎*) is distributed as 퐺(푛푘, 푐, 푠, 푘).

3.5 Reduction to Counting 푘-Cliques in 퐺(푛, 푐, 푠)

So far, we have reduced Parity-(푘, 푠)-clique and #(푘, 푠)-clique for worst-case input hypergraphs to average-case inputs drawn from the 푘-partite Erdős-Rényi dis- tribution 퐺(푛푘, 푐, 푠, 푘). We now carry out the final step of the reduction, showing that Parity-(푘, 푠)-clique and #(푘, 푠)-clique on inputs drawn from 퐺(푛푘, 푐, 푠, 푘) reduce to inputs drawn from the non-푘-partite Erdős-Rényi distribution 퐺(푛, 푐, 푠). Recall that a hypergraph 퐺 drawn from 퐺(푛푘, 푐, 푠, 푘) has vertex set 푉 (퐺) = [푛] × [푘] and vertex partition given by the labels 퐿 :(푖, 푗) ∈ [푛] × [푘] ↦→ 푗 ∈ [푘].

Lemma 3.5.1. Let 훿 = 훿(푛) ∈ (0, 1) be a non-increasing function of 푛 and let 푐 = 푐(푛) ∈ (0, 1). Suppose that 퐴 is a randomized algorithm for #(푘, 푠)-clique such that for any 푛, 퐴 has error probability less than 훿(푛) on hypergraphs drawn from 퐺(푛, 푐, 푠) in 푇 (퐴, 푛) time. Then there exists an algorithm 퐵 solving #(푘, 푠)-clique that has error probability less than 2푘 · 훿(푛) on hypergraphs drawn from 퐺(푛푘, 푐, 푠, 푘) and that runs in 푇 (퐵, 푛) = 푂 (︀2푘 · 푇 (퐴, 푛푘) + 푘푠푛푠 + 푘2푘)︀ time.

Proof. It suffices to count the number of 푘-cliques in 퐺 ∼ 퐺(푛푘, 푐, 푠, 푘) given blackbox access to 퐴. Construct the hypergraph 퐻 over the same vertex set 푉 (퐻) = [푛] × [푘] (︀[푛]×[푘])︀ by adding each edge 푒 = {푣1, 푣2, . . . , 푣푠} ∈ 푠 such that |{퐿(푣1), . . . , 퐿(푣푠)}| < 푠 independently with probability 푐. In other words, independently add each edge to 퐺 containing two vertices from the same part of 퐺. It follows that 퐻 is distributed according to 퐺(푛푘, 푐, 푠). More generally, for every 푆 ⊂ [푘], 퐻푆 is distributed according −1 −1 to 퐺(|퐿 (푆)|, 푐, 푠) where 퐻푆 is the restriction of 퐻 to the vertices 퐿 (푆) ⊂ 푉 (퐻) with labels in 푆. Note that 퐻 can be constructed in 푂(푘푠푛푠) time.

47 Now observe that for each 푆 ̸= ∅, it holds that 푛 ≤ |퐿−1(푆)| ≤ 푛푘 and the algorithm 퐴 succeeds on each 퐻푆 with probability at least 1 − 훿(푛). By a union

bound, we may compute the number of 푘-cliques |cl푘(퐻푆)| in 퐻푆 for all 푆 ⊂ [푘] with error probability less than 2푘 · 훿(푛). Note that this can be done in 푂 (︀2푘 · 푇 (퐴, 푛푘))︀

time. From these counts |cl푘(퐻푆)|, we now to inductively compute

푡푑 , |{푆 ∈ cl푘(퐻): |퐿(푆)| = 푑}|

for each 푑 ∈ [푘]. Note that 푡0 = 0 in the base case 푑 = 0. Given 푡0, 푡1, . . . , 푡푑, the next

count 푡푑+1 can be expressed by inclusion-exclusion as

∑︁ 푡푑+1 = |{푆 ∈ cl푘(퐻): 퐿(푆) = 푇 }| 푇 ⊂[푘],|푇 |=푑+1

⎛ 푑 ⎞ ∑︁ ∑︁ ∑︁ = ⎝|cl푘(퐻푇 )| − |{푆 ∈ cl푘(퐻): 퐿(푆) = 푈}|⎠ 푇 ⊂[푘],|푇 |=푑+1 푖=0 푈⊂푇,|푈|=푖

⎛ ⎞ 푑 ∑︁ ∑︁ (︂ 푘 − 푖 )︂ = |cl (퐻 )| − |{푆 ∈ cl (퐻): |퐿(푆)| = 푖}| ⎝ 푘 푇 ⎠ 푑 + 1 − 푖 푘 푇 ⊂[푘],|푇 |=푑+1 푖=0 푑 ∑︁ ∑︁ (︂ 푘 − 푖 )︂ = |cl (퐻 )| − 푡 푘 푇 푑 + 1 − 푖 푖 푇 ⊂[푘],|푇 |=푑+1 푖=0

푘 After 푂(푘2 ) operations, this recursion yields the number of 푘-cliques 푡푘 = |{푆 ∈

cl푘(퐻): |퐿(푆)| = 푘}| = |cl푘(퐺)| in the original 푘-partite hypergraph 퐺, as desired.

Repeating the same proof over F2 yields an analogue of Lemma 3.5.1 for Parity- (푘, 푠)-clique, as stated below.

Lemma 3.5.2. Lemma 3.5.1 holds when #(푘, 푠)-clique is replaced by Parity- (푘, 푠)-clique.

3.6 Proofs of Theorems 2.2.1 and 2.2.2

We now combine Steps 1-5 formally in order to prove Theorems 2.2.1 and 2.2.2.

48 Proof of Theorem 2.2.1. Our goal is to construct an algorithm 퐵 that solves #(푘, 푠)- clique with error probability < 1/3 on any 푠-uniform hypergraph 푥. We are given an algorithm 퐴 that solves #(푘, 푠)-clique with probability of error

< 1/Υ# on hypergraphs drawn from 퐺(푛, 푐, 푠). We will construct the following intermediate algorithms in our reduction:

∙ Algorithm 퐴0 that solves #(푘, 푠)-clique with error probability < 1/3 for any worst-case 푘-partite hypergraph.

푁 ∙ Algorithm 퐴1(푥, 푝) that computes 푃푛,푘,푠,F푝 (푥) for any 푥 ∈ F푝 and for any prime (︀푘)︀ 푘 푝 such that 12 푠 < 푝 < 10 log 푛 , with worst-case error probability < 1/3.

(︀푘)︀ 푘 ∙ Algorithm 퐴2(푦, 푝) for primes 12 푠 < 푝 < 10 log 푛 that computes 푃푛,푘,푠,F푝 (푦) 푁 on inputs 푦 ∼ Unif[F푝 ] with error probability < 1/3.

∙ Algorithm 퐴3(푧) that computes 푃푛,푘,푠(푧) on inputs 푧 ∼ 퐺(푛푘, 푐, 푠, 푘) with error probability < 훿. (The required value of 훿 will be determined later on.)

We construct algorithm 퐵 from 퐴0, 퐴0 from 퐴1, 퐴2 from 퐴3, and 퐴3 from 퐴.

1. Reduce to computing #(푘, 푠)-clique for 푘-partite hypergraphs. We use Lemma

3.1.1 to construct 퐵 from 퐴0, such that 퐵 runs in time

푠 푇 (퐵, 푛) = 푇 (퐴0, 푛) + 푂((푛푘) ).

2. Reduce to computing 푃푛,푘,푠,F푝 on worst-case inputs. We use Proposition 3.2.1 to construct 퐴0 from 퐴1 such that 퐴0 runs in time

푘 푘 2 푇 (퐴0, 푛) ≤ 푂(푇 (퐴1, 푛) · log 푛 + (log 푛 ) ).

(︀푘)︀ The algorithm 퐴0 starts by using a sieve to find the first 푇 primes 12 푠 < 푝1 < ∏︀푇 푘 푘 ··· < 푝푇 such that 푖=1 푝푖 > 푛 . Notice that 푝푇 ≤ 10 log 푛 , so this step takes time 푂((log 푛푘)2). Then, given a 푘-partite hypergraph 푥 ∈ {0, 1}푁 , the algorithm

49 퐴 computes 푃 (푥) by computing 푃 (푥) for all 푝 , boosting the error of 퐴 0 푛,푘,푠 푛,푘,푠,F푝푖 푖 1 by repetition and majority vote. Since 푇 = 푂((log 푛푘)/(log log 푛푘)), we only need to repeat 푂(log log 푛푘) times per prime; this yields a total slowdown factor of 푂(log 푛푘).

Once we have computed 푃푛,푘,푠(푥), we recall that it is equal to the number of 푘-cliques in 푥.

푁 3. Reduce to computing 푃푛,푘,푠,F푝 on random inputs in F푝 . We use Lemma 3.3.1 to construct 퐴1 from 퐴2 such that 퐴2 runs in time

(︂푘)︂2 (︂푘)︂ 푇 (퐴 , 푛) = 푂((푁+퐷)퐷2 log2 푝+퐷·푇 (퐴 , 푛)) = 푂(푛푠 log2 log 푛푘+ ·푇 (퐴 , 푛)). 1 2 푠 푠 2

푁 4. Reduce to computing 푃푛,푘,푠 on random inputs in {0, 1} We use Lemma 3.4.2 to construct 퐴2 from 퐴3 such that 퐴2 runs in time

(푘) 푇 (퐴2, 푛) = 푂(푁푝푡 log(푁푝) + 푡 푠 · 푇 (퐴3, 푛)),

for some 푡 = 푂(푐−1(1 − 푐)−1)푠(log 푛)(log 푝)). For this step, we require the error prob-

퐷 ability 훿 of algorithm 퐴3(푧) on inputs 푧 ∼ 퐺(푛푘, 푐, 푠, 푘) to be at most 1/(4푡 ) = 푘 1/(4푡(푠)).

5. Reduce to computing #(푘, 푠)-clique for 퐺(푛, 푐, 푠) hypergraphs We use Lemma

3.5.1 to construct 퐴3 from 퐴 such that 퐴3 runs in time

푠 푘 푘 푇 (퐴3, 푛) = 푂((푛푘) + 푘2 + 2 · 푇 (퐴, 푛푘)),

푘 and such that 퐴3 has error probability at most 훿 < 2 /Υ#.

−1 −1 As in the theorem statement, let Υ#(푛, 푐, 푠, 푘) , (퐶(푐 (1 − 푐) )푠(log 푛)(log 푘 + 푘 log log 푛))(푠), where 퐶 > 0 is a large constant to be determined. If we take 퐶 large (푘) 푘 (푘) enough, then 4푡 푠 · 2 ≤ Υ#. In this case, the error 훿 of 퐴3 will be at most 1/(4푡 푠 ),

50 which is what we needed for the fourth step. Putting the runtime bounds together,

(︂ )︂2 (︂ )︂ 푠 푘 2 푘 푠 푘 2 푘 푘 푠 푇 (퐵, 푛) = 푂((푛푘) + (log 푛 ) + (log 푛 ) · (푛 푡푘 (log 푛) + · (4푡)(푠) · (푇 (퐴, 푛푘) + (푛푘) ))) 푠 푠 (︂푘)︂2 = 푂(푛푠푘3 (푐−1(1 − 푐)−1)(log 푘 + log log 푛) log4 푛 + (log 푛) · Υ · (푇 (퐴, 푛푘) + (푛푘)푠)), 푠 #

if we choose 퐶 > 0 large enough. Hence,

푠 푇 (퐵, 푛) = 푂((log 푛) · Υ# · (푇 (퐴, 푛푘) + (푛푘) )),

(︀푘)︀ as 푠 ≥ 3 without loss of generality.

Proof of Theorem 2.2.2. The proof of item 1 of Theorem 2.2.2 is analogous to the proof of Theorem 2.2.1, except that it does not use the Chinese remainder theorem.

Moreover, special care is needed in order to ensure that the field F over which we

compute the polynomial 푃푛,푘,푠,F in the intermediate steps is large enough that we may use the random self-reducibility of polynomials. Our goal is to construct an algorithm 퐵 that solves Parity-(푘, 푠)-clique with error probability < 1/3 on any 푠-uniform hypergraph 푥. We are given an algorithm 퐴 that solves Parity-(푘, 푠)-clique with probability of error < 1/Υ푃,1 on hypergraphs drawn from 퐺(푛, 푐, 푠). We will construct the following intermediate algorithms in our reduction:

∙ Algorithm 퐴0 that solves Parity-(푘, 푠)-clique with error probability < 1/3 for any worst-case 푘-partite hypergraph.

푁 ∙ Algorithm 퐴1(푤) that computes 푃푛,푘,푠,F2휅 (푤) on inputs 푤 ∼ Unif[F2휅 ] for 휅 = (︀푘)︀ ⌈log2(12 푠 )⌉, with error probability < 1/3.

푁 ∙ Algorithm 퐴2(푦) that computes 푃푛,푘,푠,F2 (푦) on inputs 푦 ∼ Unif[F2 ] with error

probability < 훿2. (The required value of 훿2 will be determined later on.)

∙ Algorithm 퐴3(푧) that computes 푃푛,푘,푠,F2 (푧) on inputs 푧 ∼ 퐺(푛푘, 푐, 푠, 푘) with

error probability < 훿3. (The required value of 훿3 will be determined later on.)

51 We construct algorithm 퐵 from 퐴0, 퐴0 from 퐴1, 퐴2 from 퐴3, and 퐴3 from 퐴.

1. Reduce to computing Parity-(푘, 푠)-clique for 푘-partite hypergraphs. We use

Lemma 3.1.1 to construct 퐵 from 퐴0, such that 퐵 runs in time

푠 푇 (퐵, 푛) = 푇 (퐴0, 푛) + 푂((푛푘) ).

푁 2. Reduce to computing 푃푛,푘,푠,F2휅 on random inputs in F2휅 . Note that by Proposi- tion 3.2 if we can compute 푃푛,푘,푠,F2휅 for worst-case inputs, then we can solve Parity-

(푘, 푠)-clique. We use Lemma 3.3.1 to construct 퐴0 from 퐴1 such that 퐴0 runs in time

(︂푘)︂2 (︂푘)︂ 푇 (퐴 , 푛) = 푂(휅2(푁 + 퐷)퐷2 + 퐷 · 푇 (퐴 , 푛)) = 푂(푛푠 log2 휅 + · 푇 (퐴 , 푛)) 0 1 푠 푠 1

푁 3. Reduce to computing 푃푛,푘,푠,F2 on random inputs in F2 .We use Lemma 3.4.1 to

construct 퐴1 from 퐴2 such that 퐴1 runs in time

4 (푘) 푇 (퐴1, 푛) ≤ 푂(푁휅 + 휅 푠 · 푇 (퐴2, 푛)),

푘 (푠) 푁 and has error probability at most 훿2 · 휅 on random inputs 푤 ∼ Unif[F2휅 ]. Thus, 퐴2 푘 (푠) 푁 must have error probability at most 훿2 < 1/(3휅 ) on random inputs in 푦 ∼ Unif[F2 ] for this step of the reduction to work.

푁 4. Reduce to computing 푃푛,푘,푠,F2 on random inputs in {0, 1} We use Lemma 3.4.2

to construct 퐴2 from 퐴3 such that 퐴2 runs in time

(푘) 푇 (퐴2, 푛) = 푂(푁푡 log(푁/훾) + 푡 푠 · 푇 (퐴3, 푛)),

−1 −1 for some 푡 = 푂(푐 (1 − 푐) (푠 log(푛) + log(1/훾))). The error probability of 퐴2 on (푘) random inputs 푧 ∼ 퐺(푛푘, 푐, 푠, 푘) will be at most 훿2 < 훿3·푡 푠 +훾. Since we require error (푘) probability at most 훿2 ≤ 1/(3휅 푠 ) of algorithm 퐴2(푧) on inputs 푧 ∼ 퐺(푛푘, 푐, 푠, 푘), we (푘) (푘) set 훾 = 1/(10휅 푠 ) and require 훿3 ≤ 1/(10(푡휅) 푠 ), which is sufficient. For this choice

52 −1 −1 (︀푘)︀ of 훾, we have 푡 = 푂(푐 (1 − 푐) (푠 log(푛) + 푠 log(푠 log 푘))). 5. Reduce to computing #(푘, 푠)-clique for 퐺(푛, 푐, 푠) hypergraphs We use Lemma

3.5.2 to construct 퐴3 from 퐴 such that 퐴3 runs in time

푠 푘 푘 푇 (퐴3, 푛) = 푂((푛푘) + 푘2 + 2 · 푇 (퐴, 푛푘)),

푘 and such that 퐴3 has error probability at most 훿3 < 2 /Υ푃,1.

As in the theorem statement, let

(푘) (︂ (︂푘)︂ (︂푘)︂ )︂ 푠 Υ (푛, 푐, 푠, 푘) 퐶(푐−1(1 − 푐)−1)푠(log 푘)(푠 log 푛 + (log log )) 푃,1 , 푠 푠

for some large enough constant 퐶. 푘 (푠) 1 −푘 If we take 퐶 large enough, then (휅푡) ≤ 10 · 2 · Υ푃,1, as desired. In this case,

the error of 퐴0 on uniformly random inputs will be at most 1/3, which is what we needed. Putting the runtime bounds together,

(︂ )︂2 (︂ )︂ (︂ )︂ 푠 푘 2 푠 푠 푘 푠 푘 4 푘 푘 푠 푇 (퐵, 푛) = 푂(푛 log 휅 + 푛 푡 log(푛 휅(푠)) + 푛 휅 + · (4휅푡)(푠) · (푇 (퐴, 푛푘) + (푛푘) )) 푠 푠 푠 (︂푘)︂2 (︂푘)︂ = 푂(푛푠(푡푘 log2 푠 log 푘 + 휅4) + Υ · (푇 (퐴, 푛푘) + (푛푘)푠)), 푠 푠 푃,1

(︀푘)︀ if we choose 퐶 > 0 large enough. Since 푠 ≥ 3 without loss of generality,

푠 푇 (퐵, 푛) = 푂(Υ푃,1 · (푇 (퐴, 푛푘) + (푛푘) )).

For item 2 of the theorem, we restrict the inputs to come from 퐺(푛, 1/2, 푠), and we

achieve a better error tolerance because algorithm 퐴3 is the same as 퐴2. This means

that we may skip step 4 of the proof of item 1. In particular, we only need 훿3 = (푘) 훿2 ≤ 1/(3휅 푠 ). So algorithm 퐴 only needs to have error < 1/Υ푃,2, for Υ푃,2(푘, 푠) , 푘 (퐶푠 log 푘)(푠). It is not hard to see that, skipping step 4, the algorithm 퐵 that we

푠 construct takes time 푇 (퐵, 푛) = 푂(Υ푃,2 · (푇 (퐴, 푛푘) + (푛푘) )).

53 Algorithm To-ER-#(퐺, 푘, 퐴, 푐) Inputs: 푠-uniform hypergraph 퐺 with vertex set [푛], parameters 푘, 푐, algorithm 퐴 for #(푘, 푠)-clique on Erdős-Rényi hypergraphs with density 푐. 1. Construct an 푠-uniform hypergraph 퐺′ on vertex set [푛] × [푘] by defining

′ {︁ 1≤푣1<푣2<···<푣푠≤푛}︁ 퐸(퐺 ) = {(푣1, 푡1), (푣2, 푡2),..., (푣푠, 푡푠)} : {푣1, . . . , 푣푠} ∈ 퐸(퐺) and . 1≤푡1<푡2<···<푡푠≤푘

Since 퐺′ is 푘-partite, view it as an indicator vector of edges 퐺′ ∈ {0, 1}푁 for 푁 := (︀푘)︀ 푠 푁(푛, 푘, 푠) = 푠 푛 .

(︀푘)︀ ∏︀푇 푘 2. Find the first 푇 primes 12 푠 < 푝1 < ··· < 푝푇 such that 푖=1 푝푖 > 푛 . 3. Define 퐿 :(푎, 푏) ∈ [푛] × [푘] ↦→ 푏 ∈ [푘], and ∑︁ ∏︁ 푃푛,푘,푠(푥) = 푥푢푆 ′ {푢1,...,푢푘}∈푉 (퐺 ) 푆⊆[푘] 퐿(푢푖)=푖 ∀푖 |푆|=푠

′ For each 1 ≤ 푡 ≤ 푇 , compute 푃푛,푘,푠(퐺 ) (mod 푝푡), as follows:

′ (1) Use the procedure of [42] in order to reduce the computation of 푃푛,푘,푠(퐺 ) (mod 푝푡) to the computation of 푃 on 푀 = 12(︀푘)︀ distinct inputs 푥 , . . . , 푥 ∼ Unif[ 푁 ]. 푛,푘,푠 푠 1 푀 F푝푡

(2) For each 1 ≤ 푚 ≤ 푀, compute 푃푛,푘,푠(푥푚) (mod 푝푡) as follows: (i) Use the rejection sampling procedure of Lemma 4.0.3 in order to sam- ple (푌 (0), . . . , 푌 (퐵)) close to (Ber(푐)⊗푁 )⊗퐵 in total variation distance, such ∑︀퐵 푏 (푏) −1 that 푥푚 ≡ 푏=0 2 · 푌 (mod 푝푡). It suffices to take 퐵 = Θ(푐 (1 − −1 푐) 푠(log 푛)(log 푝푡)). (︀[푘])︀ (푎) 푎(퐿(푆)) (ii) For each function 푎 : 푠 → {0, . . . , 퐵}, define 푌푆 = 푌 for all (︀[푛])︀ (푎) 푆 ∈ [푁] ⊂ 푠 . Note that for each 푎, the corresponding 푌 is approxi- mately distributed as Ber(푐)⊗푁 . Use algorithm 퐴 and the recursive counting (푎) procedure of Lemma 3.5.1 in order to compute 푃푛,푘,푠(푌 ) for each 푎. ′ ∑︀ |푎|1 (푎) (iii) Set 푃푛,푘,푠(퐺 ) ← [푘] 2 · 푃푛,푘,푠(푌 ). 푎:( 푠 )→{0,...,퐵}

′ 푘 ′ 4. Since 0 ≤ 푃푛,푘,푠(퐺 ) ≤ 푛 , use Chinese remaindering and the computations of 푃푛,푘,푠(퐺 ) ′ (mod 푝푖) in order to calculate and output 푃푛,푘,푠(퐺 ).

Figure 3-1: Reduction To-ER-# for showing computational lower bounds for average-case #(푘, 푠)-clique on Erdős-Rényi 퐺(푛, 푐, 푠) hypergraphs based on the worst-case hardness of #(푘, 푠)-clique. ○c 2019 IEEE.

54 Chapter 4

Random Binary Expansions Modulo 푝

In this section, we consider the distributions of random binary expansions of the form

푡 푡−1 푍푡 · 2 + 푍푡−1 · 2 + ··· + 푍0 (mod 푝)

for some prime 푝 and independent, possibly biased, Bernoulli random variables 푍푖 ∈ {0, 1}. We show that for 푡 polylogarithmic in 푝, these distributions become close

to uniformly distributed over F푝, more or less regardless of the biases of the 푍푖. This is then used to go in the other direction, producing approximately independent Bernoulli variables that are the binary expansion of a number with a given residue. The special case of this argument in which the Bernoulli variables are unbiased has already appeared in an earlier work by Goldreich and Rothblum [45]. In that case, the proof of correctness is much simpler, because the Fourier-analytic tools used below can be avoided.

Our argument uses finite Fourier analysis on F푝. Given a function 푓 : F푝 → R, ˆ ˆ ∑︀푝−1 푡푥 define its Fourier transform tobe 푓 : F푝 → C, where 푓(푡) = 푥=0 푓(푥)휔 and 2휋푖/푝 휔 = 푒 . In this section, we endow F푝 with the total ordering of {0, 1, . . . , 푝 − 1} as elements of Z. Given a set 푆, let 2푆 = {2푠 : 푠 ∈ 푆}. We begin with an simple

claim showing that sufficiently long geometric progressions with ratio 2in F푝 contain a middle residue modulo 푝.

Claim 4.0.1. Suppose that 푎1, . . . , 푎푘 ∈ F푝 is a sequence with 푎1 ̸= 0 and 푎푖+1 = 2푎푖

55 푝 2푝 for each 1 ≤ 푖 ≤ 푘 − 1. Then if 푘 ≥ 1 + log2(푝/3), there is some 푗 with 3 ≤ 푎푗 ≤ 3 .

Proof. Let 푆 = {푥 ∈ F푝 : 푥 < 푝/3} and 푇 = {푥 ∈ F푝 : 푥 > 2푝/3}. Observe that

2푆 ∩ 푇 = ∅ and 푆 ∩ 2푇 = ∅, which implies that no two consecutive 푎푖 can be in 푆

and 푇 . Therefore if (푎1, 푎2, . . . , 푎푘) contains elements of both 푆 and 푇 , there must 퐶 be some 푗 with 푎푗 ∈ (푆 ∪ 푇 ) and the claim follows. It thus suffices to shows that

(푎1, 푎2, . . . , 푎푘) cannot be entirely contained in one of 푆 or 푇 . First consider the case ′ ′ ′ ′ ′ that it is contained in 푆. Define the sequence (푎1, 푎2, . . . , 푎푘) of integers by 푎푖+1 = 2푎푖 ′ ′ for each 1 ≤ 푖 ≤ 푘 − 1 and 푎1 ∈ [1, 푝/3) is such that 푎1 ≡ 푎1 (mod 푝). It follows ′ ′ 푘−1 that 푎푖 ≡ 푎푖 (mod 푝) for each 푖 and 푎푘 ≥ 2 ≥ 푝/3. Now consider the smallest 푗 ′ ′ ′ with 푎푗 > 푝/3. Then 푝/3 ≥ 푎푗−1 = 푎푗/2 by the minimality of 푖, and 푝/3 ≤ 푎푗 ≤ 2푝/3 which is a contradiction. If the sequence is contained in 푇 , then (−푎1, −푎2,..., −푎푘) is contained in 푆 and applying the same argument to this sequence proves the claim.

We now prove the main lemma of this section bounding the total variation between the distribution of random binary expansions modulo 푝 and the uniform distribution.

Lemma 4.0.2. Let 푝 > 2 be prime. Suppose that 푐 ≤ 푞0, 푞1, . . . , 푞푡 ≤ 1 − 푐 for some 푐 ∈ (0, 1/2] and 휖 > 0. Then there is an absolute constant 퐾 > 0 such that

−1 −1 2 if 푡 ≥ 퐾 · 푐 (1 − 푐) log(푝/휖 ) log 푝 and 푍푖 ∼ Ber(푞푖) are independent, then the ∑︀푡 푖 distribution of 푆 = 푖=0 푍푖 · 2 (mod 푝) is within 휖 total variation distance of the

uniform distribution on F푝.

∑︀푡 푖 Proof. Let 푓 : F푝 → R be the probability mass function of 푖=0 2 푍푖 (mod 푝). By definition, we have that

(︃ 푡 )︃ {︃ 푡 }︃ ∑︁ ∏︁ 푧푖 1−푧푖 ∑︁ 푖 푓(푥) = 푞푖 (1 − 푞푖) 1 푧푖 · 2 ≡ 푥 (mod 푝) 푧∈{0,1}푡+1 푖=0 푖=0

This definition and factoring yields that 푓ˆ(푠) is given by

푝−1 푡 ˆ ∑︁ 푠푥 ∏︁ (︁ 2푖·푠)︁ 푓(푠) = 푓(푥)휔 = 1 − 푞푖 + 푞푖 · 휔 푥=0 푖=0

56 Note that the constant function 1 has Fourier transform 푝·1{푠=0}. By Cauchy-Schwarz and Parseval’s theorem, we have that

2 −1 2 −1 2 ˆ 2 4 · 푑TV (ℒ(푆), Unif[F푝]) = ‖푓 − 푝 · 1‖1 ≤ 푝 ·‖푓 − 푝 · 1‖2 = ‖푓 − 1{푠=0}‖2 푡 ⃒ 푖 ⃒2 ∑︁ ∏︁ ⃒ 2 ·푠⃒ = ⃒1 − 푞푖 + 푞푖 · 휔 ⃒ 푠̸=0 푖=0

푎 Note that |1 − 푞 + 푞 · 휔 | ≤ 1 by the triangle inequality for all 푎 ∈ F푝 and 푞 ∈ (0, 1).

Furthermore, if 푎 ∈ F푝 is such that 푝/3 ≤ 푎 ≤ 2푝/3 and 푞 ∈ [푐, 1 − 푐], then we have that

|1 − 푞 + 푞 · 휔푎|2 = (1 − 푞)2 + 푞2 + 2푞(1 − 푞) cos(2휋푎/푝)

= 1 − 2푞(1 − 푞) (1 − cos(2휋푎/푝))

≤ 1 − 2푐(1 − 푐) (1 − cos(4휋/3))

= 1 − 3푐(1 − 푐) since cos(푥) is maximized at the endpoints on the interval 푥 ∈ [2휋/3, 4휋/3] and 푞(1−푞) is minimized at the endpoints on the interval [푐, 1 − 푐]. Now suppose that 푡 is such that

⌈︂ log(4휖2/푝) ⌉︂ 푡 ≥ ·⌈1 + log (푝/3)⌉ = Θ (︀푐−1(1 − 푐)−1 log(푝/휖2) log 푝)︀ log(1 − 3푐(1 − 푐)) 2

Fix some 푠 ∈ F푝 with 푠 ̸= 0. By Claim 4.0.1, any ⌈1 + log2(푝/3)⌉ consecutive terms of 푡 the sequence 푠, 2푠, . . . , 2 푠 ∈ F푝 contain an element between 푝/3 and 2푝/3. Therefore ⌈︁ log(4휖2/푝) ⌉︁ this sequence contains at least 푚 = log(1−3푐(1−푐)) such terms, which implies that

푡 2 2 ∏︁ ⃒ 푖 ⃒ 푚 4휖 ⃒1 − 푞 + 푞 · 휔2 ·푠⃒ ≤ (1 − 3푐(1 − 푐)) ≤ ⃒ 푖 푖 ⃒ 푝 푖=0

57 by the inequalities above. Since this holds for each 푠 ̸= 0, it now follows that

푡 ⃒ 푖 ⃒2 2 ∑︁ ∏︁ ⃒ 2 ·푠⃒ 2 4 · 푑TV (ℒ(푆), Unif[F푝]) ≤ ⃒1 − 푞푖 + 푞푖 · 휔 ⃒ < 4휖 푠̸=0 푖=0 and thus 푑TV (ℒ(푆), Unif[F푝]) < 휖, proving the lemma.

We now briefly discuss the tightness of the bounds on 푡 in the lemma above and

how the case of 푐 = 1/2 differs from 푐 ̸= 1/2. Note that if 푞푖 = 1/2 for each 푖, then ∑︀푡 푖 푡+1 푖=0 푍푖 · 2 is uniformly distributed on {0, 1,..., 2 − 1}. It follows that

∑︁ ⃒ −1 ⃒ 푎(푝 − 푎) 푝 푑TV (ℒ(푆), Unif[ 푝]) = ⃒푝 − [푆 = 푥]⃒ = ≤ F P + 2푡+1푝 2푡+1 푥∈F푝

if 0 ≤ 푎 ≤ 푝 − 1 is such that 2푡+1 ≡ 푎 (mod 푝). Therefore 푆 is within total variation

of 1/poly(푝) of Unif[F푝] if 푡 = Ω(log 푝). However, note that for 푐 constant and 휖 = 1/poly(푝), our lemma requires that 푡 = Ω(log2 푝). This raises the question: is the additional factor of log 푝 necessary or an artefact of our analysis? We answer this question with an example suggesting that the extra log 푝 factor is in fact necessary and that the case 푐 = 1/2 is special.

Suppose that 푝 is a Mersenne prime with 푝 = 2푟 − 1 for some prime 푟 and for

simplicity, take 푞푖 = 1/3 for each 푖. Observe by the triangle inequality that

⃒ ⃒ ⃒ ⃒ ⃒ ⃒ ˆ ⃒∑︁ (︀ −1)︀ 푥⃒ ⃦ −1 ⃦ ⃒푓(1)⃒ = ⃒ 푓(푥) − 푝 · 휔 ⃒ ≤ ⃦푓 − 푝 · 1⃦ = 2 · 푑TV (ℒ(푆), Unif[F푝]) ⃒ ⃒ ⃒ ⃒ 1 ⃒푥∈F푝 ⃒

Now suppose that 푡 = 푎푟 − 1 for some positive integer 푎. As shown in the lemma, we have 푡 [︃푟−1 ]︃푎 2 ⃒ ⃒2 (︂ (︂ )︂)︂ ⃒ ⃒ ∏︁ ⃒2 1 2푖 ⃒ ∏︁ 5 4 2휋 푖 ⃒푓ˆ(1)⃒ = ⃒ + · 휔 ⃒ = + · cos · 2 ⃒ ⃒ ⃒3 3 ⃒ 9 9 푝 푖=0 푖=0 where the second equality is due to the fact that the sequence 2푖 has period 푟 modulo

58 5 4 −푥2 푝. Now observe that since 9 + 9 · cos(푥) ≥ 푒 , we have that

푟−1 (︃ 푟−1 )︃ ∏︁ (︂5 4 (︂2휋 )︂)︂ 4휋2 ∑︁ (︂ 4휋2 22푟 − 1)︂ + · cos · 2푖 ≥ exp − 22푖 = exp − · = Ω(1) 9 9 푝 푝2 푝2 3 푖=0 푖=0

which implies that 푎 should be Ω(푟) for 푓ˆ(1) to be polynomially small in 푝. Thus the extra log 푝 factor is necessary in this case and our analysis is tight. Note that in the special case of 푐 = 1/2, the factors in the expressions for 푓ˆ(푠) are of the form

1 1 2푖·푠 2 + 2 · 휔 which can be arbitrarily close to zero. We remark that the construction, as stated, relies on there being infinitely many Mersenne primes. However, it seems to suggest that the extra log 푝 factor is necessary. Furthermore, similar examples can be produced with 푝 that are not Mersenne, as long as the order of 2 modulo 푝 is relatively small. We now deduce several simple consequences of our lemma on random binary expansions that are used in the analysis of our reductions.

Lemma 4.0.3. Let 푝 > 2 be prime. Suppose that 푐 ≤ 푞1, 푞2, . . . , 푞푡 ≤ 1 − 푐 for some ∑︀푡 푖 푐 ∈ (0, 1/2] and that 푍푖 ∼ Ber(푞푖) are independent. Let 푌 = 푖=0 푍푖 · 2 and for each

푥 ∈ F푝, let 푌푥 ∼ ℒ(푌 |푌 ≡ 푥 (mod 푝)). Consider 푌푅, where 푅 is chosen uniformly

at random with 푅 ∼ Unif[F푝]. If 푆 = 푌 (mod 푝) is as in the previous lemma and −1 ∆ = 푑TV (ℒ(푆), Unif[F푝]) < 푝 , then it holds that

1. 푑TV(ℒ(푌 ), ℒ(푌푅)) ≤ ∆.

(︁ 푡 log(1/훿) )︁ 2. Given 푥 ∈ F푝, we may sample ℒ(푌푥) within 훿 total variation distance in 푂 푝−1−Δ time.

Proof. Note that the 푥 → 푌푥 defines a Markov transition sending 푆 → 푌 and 푅 → 푌푅.

The data-processing inequality yields 푑TV(ℒ(푌 ), ℒ(푌푅)) ≤ 푑TV(ℒ(푆), ℒ(푅)) = ∆, implying the first item. The second item can be achieved by rejection sampling from the distribution ℒ(푌 ) until receiving an element congruent to 푥 modulo 푝 or reaching the cutoff of

⌈︂ log 훿 ⌉︂ (︂log(1/훿))︂ 푚 = = 푂 log(1 − 푝−1 + ∆) 푝−1 − ∆

59 rounds. Each sample from ℒ(푌 ) can be obtained in 푂(푡) by sampling 푍0, 푍1, . . . , 푍푡 and forming the number 푌 with binary digits 푍푡, 푍푡−1, . . . , 푍0. If we receive a sam- ple by the 푚th round, then it is exactly sampled from the conditional distribution

ℒ(푌푥) = ℒ(푌 |푌 ≡ 푥 (mod 푝)). Therefore the total variation between the output of this algorithm and ℒ(푌푥) is upper bounded by the probability that the rejection sam- pling scheme fails to output a sample. Now note that the probability that a sample is output in a single round is

−1 −1 P[푆 = 푥] ≥ 푝 − 푑TV (ℒ(푆), Unif[F푝]) = 푝 − ∆ by the definition of total variation. By the independence of sampling in different rounds, the probability that no sample is output is at most

푚 (︀ −1 )︀푚 (1 − P[푆 = 푥]) ≤ 1 − 푝 + ∆ ≤ 훿

which completes the proof of the second item.

We conclude this section with a sampling result similar to Lemma 4.0.3, but for the 푝 = 2 case.

Lemma 4.0.4. Let 푅 ∼ Unif[F2], and let 휖 > 0 and 푐 ∈ (0, 1). Then there ex- ists 푡 = 푂(푐−1(1 − 푐)−1 log(1/휖)), so that in 푂(푡 log(1/휖)) time one may sample ∑︀푡 푋1, . . . , 푋푡 supported on {0, 1}, such that 푅 = 푖=1 푋푖 (mod 2), and such that ⊗푡 푑TV(ℒ(푋), Ber(푐) ) < 휖.

푖.푖.푑 Proof. Let 푍1, . . . , 푍푡 ∼ Ber(푐). By induction on 푡, one may show that

[︃ 푡 ]︃ ∑︁ 1 (1 − 2푐)푡 푍 ≡ 0 (mod 2) = − P 푖 2 2 푖=1

−1 −1 ∑︀푡 Let 푡 = ⌈log(휖/8)/ log(|1−2푐|)⌉+1 = 푂(푐 (1−푐) log(1/휖)), so that 푑TV(ℒ( 푖=1 푍푖), ℒ(푅)) ≤

60 휖/8. Sample the distribution

(︃ 푡 )︃ ⃒ ⃒ ∑︁ 푋 ∼ ℒ 푍 ⃒ 푍푖 ≡ 푅 (mod 2) 푖=1 within 휖/2 total variation distance by rejection sampling. This takes time 푂(푡 log(1/휖)), because it consists of at most 푂(log(1/휖)) rounds of sampling fresh copies of 푍 ∼ ⊗푡 ∑︀푡 Ber(푐) and checking if 푖=1 푍푖 = 푅. By triangle inequality, it suffices to show that ⊗푡 푡 푑TV(ℒ(푋), Ber(푐) ) ≤ 휖/2. This is true because for any 휔 ∈ {0, 1} ,

[︃ 푡 푡 ]︃ [︃ 푡 ]︃ ∑︁ ∑︁ ∑︁ P[푋 = 휔] = P 푍 = 휔| 푍 ≡ 휔푖 (mod 2) · P 푅 ≡ 휔푖 푖=1 푖=1 푖=1 [푍 = 휔] = P . [︀∑︀푡 ∑︀푡 ]︀ 2 · P 푖=1 푍 ≡ 푖=1 휔푖 (mod 2)

Hence (1 − 휖/4)P[푍 = 휔] ≤ P[푋 = 휔] ≤ (1 + 휖/4) · P[푍 = 휔] for all 휔 ∈ {0, 1}, and ⊗푡 so 푑TV(ℒ(푋), ℒ(푍)) = 푑TV(ℒ(푋), Ber(푐) ) ≤ 휖/2, as desired.

61 62 Chapter 5

Algorithms for Counting 푘-Cliques in 퐺(푛, 푐, 푠)

In this section, we consider several natural algorithms for counting 푘-cliques in 퐺(푛, 푐, 푠) with 푐 = Θ(푛−훼) for some 훼 ∈ (0, 1). The main objective of this section is to show that, when 푘 and 푠 are constant, these algorithms all run faster than all known al- gorithms for #(푘, 푠)-clique on worst-case hypergraphs and nearly match the lower bounds from our reduction for certain 푘, 푐 and 푠. This demonstrates that the average- case complexity of #(푘, 푠)-clique on Erdős-Rényi hypergraphs is intrinsically differ- ent from its worst-case complexity. As discussed in Section 2.2, this also shows the necessity of a slowdown term comparable to Υ# in our worst-case to average-case re- duction for #(푘, 푠)-clique. We begin with a randomized sampling-based algorithm for counting 푘-cliques in 퐺(푛, 푐, 푠), extending well-known greedy heuristics for finding 푘-cliques in random graphs. We then present an improvement to this algorithm in the graph case and a deterministic alternative.

5.1 Greedy Random Sampling

In this section, we consider a natural greedy algorithm greedy-random-sampling for counting 푘-cliques in a 푠-uniform hypergraph 퐺 ∼ 퐺(푛, 푐, 푠) with 푐 = Θ(푛−훼).

63 Given a subset of vertices 퐴 ⊆ [푛] of 퐺, define cn퐺(퐴) to be

cn퐺(퐴) = {푣 ∈ 푉 (퐺)∖퐴 : 퐵 ∪ {푣} ∈ 퐸(퐺) for all (푠 − 1)-subsets 퐵 ⊆ 퐴} denote the set of common neighbors of the vertices in 퐴. The algorithm greedy-random-sampling maintains a set 푆 of 푘-subsets of [푛] and for 푇 iterations does the following:

1. Sample distinct starting vertices 푣1, 푣2, . . . , 푣푠−1 uniformly at random and pro-

ceed to sample the remaining vertices 푣푠, 푣푠+1, . . . , 푣푘 iteratively so that 푣푖+1 is

chosen uniformly at random from cn퐺(푣1, 푣2, . . . , 푣푖) if it is nonempty.

2. If 푘 vertices {푣1, 푣2, . . . , 푣푘} are chosen then add {푣1, 푣2, . . . , 푣푘} to 푆 if it is not already in 푆.

This algorithm is an extension of the classical greedy algorithm for finding log2 푛 sized cliques in 퐺(푛, 1/2) in [54, 46], the Metropolis process examined in [51] and the greedy procedure solving 푘-clique on 퐺(푛, 푐) with 푐 = Θ (︀푛−2/(푘−1))︀ discussed by Rossman in [73]. These and other natural polynomial time search algorithms fail to find cliques of size (1 + 휖) log2 푛 in 퐺(푛, 1/2), even though its clique number is approximately

2 log2 푛 with high probability [61, 66]. Our algorithm greedy-random-sampling extends this greedy algorithm to count 푘-cliques in 퐺(푛, 푐, 푠). In our analysis, we will see a phase transition in the behavior of this algorithm at 푘 = 휏 for some 휏 smaller than the clique number of 퐺(푛, 푐, 푠). This is analogous to the breakdown of the natural greedy algorithm at cliques of size log2 푛 on 퐺(푛, 1/2). Before analyzing greedy-random-sampling, we state a simple classical lemma counting the number of 푘-cliques in 퐺(푛, 푐, 푠). This lemma follows from linearity of expectation and Markov’s inequality.

Lemma 5.1.1. For fixed 훼 ∈ (0, 1) and 푠, let 휅 ≥ 푠 be the largest positive integer 푘 (︀ 휅 )︀ −훼 (︀푛)︀ (푠) satisfying 훼 푠−1 < 푠. If 퐺 ∼ 퐺(푛, 푐, 푠) where 푐 = 푂(푛 ), then E[|cl푘(퐺)|] = 푘 푐 (︁ −훼푡(1−푠−1) 휅+2 )︁ and 휔(퐺) ≤ 휅 + 1 + 푡 with probability at least 1 − 푂 푛 (푠−1) for any fixed nonnegative integer 푡.

64 Proof. Let 퐶 > 0 be such that 푐 ≤ 퐶푛−훼 for sufficiently large 푛. For any given set

{푣1, 푣2, . . . , 푣푘} of 푘 vertices in [푛], the probability that all hyperedges are present (푘) among {푣1, 푣2, . . . , 푣푘} and thus these vertices form a 푘-clique in 퐺 is 푐 푠 . Linearity 푘 (︀푛)︀ (푠) of expectation implies that the expected number of 푘-cliques is E[|cl푘(퐺)|] = 푘 푐 . Now consider taking 푘 = 휅 + 2 + 푡 and note that

(︂ )︂ (︂(︂ (︂ )︂)︂ )︂ 푛 푘 푘 푘 푘 훼 푘 − 1 [|cl (퐺)|] = 푐(푠) ≤ 푛 푐(푠) ≤ 퐶(푠) · exp 1 − 푘 log 푛 E 푘 푘 푠 푠 − 1

푘 (︂(︂ 훼(︂휅 + 1)︂)︂ 훼 (︂휅 + 1)︂ )︂ ≤ 퐶(푠) · exp 1 − 푘 log 푛 − · 푡 푘 log 푛 푠 푠 − 1 푠 푠 − 2

푘 −훼푡(1−푠−1) 휅+2 ≤ 퐶(푠)푛 (푠−1)

(︀휅+1+푡)︀ (︀휅+1)︀ (︀휅+1)︀ since 푘 ≥ 휅 + 2 and 푠−1 ≥ 푠−1 + 푡 푠−2 by iteratively applying Pascal’s identity. 푘 Observe that 휅 = 푂(1) and thus 퐶(푠) = 푂(1). Now by Markov’s inequality, it

follows that P[휔(퐺) ≥ 푘] = P[|cl푘(퐺)| ≥ 1] ≤ E[|cl푘(퐺)|], completing the proof of the lemma.

In particular, this implies that the clique number of 퐺(푛, 푐, 푠) is typically at most

1 (푠!훼−1) 푠−1 + 푠 − 1. In the graph case of 푠 = 2, this simplifies to 1 + 2훼−1. In the next subsection, we give upper bounds on the number of iterations 푇 causing all 푘-cliques in 퐺 to end up in 푆 and analyze the runtime of the algorithm. The subsequent subsection improves the runtime of greedy-random-sampling for graphs when 푠 = 2 through a matrix multiplication post-processing step. The last subsection gives an alternative deterministic algorithm with a similar performance to greedy-random-sampling.

5.2 Sample Complexity and Runtime of Greedy Ran- dom Sampling

In this section, we analyze the runtime of greedy-random-sampling and prove upper bounds on the number of iterations 푇 needed for the algorithm to terminate with 푆 = cl푘(퐺). The dynamic set 푆 needs to support search and insertion of 푘- cliques. Consider labelling the vertices of 퐺 with elements of [푛] and storing the

65 elements of 푆 in a balanced binary search tree sorted according to the lexicographic

푘 order on [푛] . Search and insertion can each be carried out in 푂(log |cl푘(퐺)|) = 푂(푘 log 푛) time. It follows that each iteration of greedy-random-sampling there- fore takes 푂(푛 + 푘 log 푛) = 푂(푛) time as long as 푘 = 푂(1). Outputting |푆| in greedy-random-sampling therefore yields a 푂(푛푇 ) time algorithm for #(푘, 푠)- clique on 퐺(푛, 푐, 푠) that succeeds with high probability. We now prove upper bounds on the minimum number of iterations 푇 needed for this algorithm to terminate with 푆 = cl푘(퐺) and therefore solve #(푘, 푠)-clique.

Theorem 5.2.1. Let 푘 and 푠 be constants and 푐 = Θ(푛−훼) for some 훼 ∈ (0, 1). Let (︀ 휏 )︀ 휏 be the largest integer satisfying 훼 푠−1 < 1 and suppose that

⎧ 휏+1 ⎨2푛휏+1푐( 푠 )(log 푛)3(푘−휏)(1+휖) if 푘 ≥ 휏 + 1 푇 ≥ 푘 ⎩ 2푛푘푐(푠)(log 푛)1+휖 if 푘 < 휏 + 1 for some 휖 > 0. Then greedy-random-sampling run with 푇 iterations terminates −휔(1) with 푆 = cl푘(퐺) with probability 1−푛 over the random bits of greedy-random-sampling and with probability 1 − 푛−휔(1) over the choice of random hypergraph 퐺 ∼ 퐺(푛, 푐, 푠).

Proof. We first consider the case where 푘 ≥ 휏 + 1. Fix some 휖 > 0 and let 푣 =

(푣1, 푣2, . . . , 푣푘) be an ordered tuple of distinct vertices in [푛]. Define the random variable 푘−1 ∏︁ 푍푣 = 푛(푛 − 1) ··· (푛 − 푠 + 2) |cn퐺(푣1, 푣2, . . . , 푣푖)| 푖=푠−1 Consider the following event over the sampling 퐺 ∼ 퐺(푛, 푐, 푠)

{︁ 휏+1 (휏+1) 3(푘−1−휏)(1+휖) }︁ 퐴푣 = 푍푣 ≥ 2푛 푐 푠 (log 푛) and {푣1, 푣2, . . . , 푣푘} ∈ cl푘(퐺)

We now proceed to bound the probability of 퐴푣 through simple Chernoff and union bounds over 퐺. In the next part of the argument, we condition on the event that

{푣1, 푣2, . . . , 푣푘} forms a clique in 퐺. For each 푖 ∈ {푠 − 1, 푠, . . . , 푘 − 1}, let 푌푣,푖 be the number of common neighbors of 푣1, 푣2, . . . , 푣푖 in 푉 (퐺)∖{푣1, 푣2, . . . , 푣푘}. Note that (︁ ( 푖 ))︁ 푌푣,푖 ∼ Bin 푛 − 푘, 푐 푠−1 and that |cn퐺(푣1, 푣2, . . . , 푣푖)| = 푘 − 푖 + 푌푣,푖. The standard

66 Chernoff bound for the binomial distribution implies that forall 훿푖 > 0,

(︂ 2 )︂ [︁ ( 푖 )]︁ 훿푖 ( 푖 ) P |cn퐺(푣1, 푣2, . . . , 푣푖)| ≥ 푘 − 푖 + (1 + 훿푖)(푛 − 푘)푐 푠−1 ≤ exp − · (푛 − 푘)푐 푠−1 2 + 훿푖

Now define 휅푖 to be −1 −( 푖 ) 1+휖 휅푖 = (푛 − 푘) 푐 푠−1 · (log 푛) √ for each 푖 ∈ {푠 − 1, 푠, . . . , 푘 − 1}. Let 훿푖 = 휅푖 if 푖 ≤ 휏 and 훿푖 = 휅푖 if 푖 > 휏. Note that for sufficiently large 푛, 훿푖 < 1 if 푖 ≤ 휏 and 훿푖 ≥ 1 if 푖 > 휏. These choices of 훿푖 ensure (︀ 1 1+휖)︀ that the Chernoff upper bounds above are each at most exp − 3 (log 푛) for each (︀ 1 1+휖)︀ 푖. A union bound implies that with probability at least 1 − 푘 exp − 3 (log 푛) , it holds that

( 푖 ) ( 푖 ) |cn퐺(푣1, 푣2, . . . , 푣푖)| < 푘 − 푖 + (1 + 훿푖)(푛 − 푘)푐 푠−1 < (1 + 2훿푖)(푛 − 푘)푐 푠−1

( 푖 ) for all 푖 and sufficiently large 푛. Here, we used the fact that 훿푖(푛 − 푘)푐 푠−1 = 휔(1) for ( 푖 ) 1+휖 all 푖 by construction and 푘 = 푂(1). Observe that (1 + 2훿푖)(푛 − 푘)푐 푠−1 ≤ 3(log 푛) for all 푖 ≥ 휏 + 1. These inequalities imply that

휏 푠−1 ∑︁ (︁ ( 푖 ))︁ log 푍푣 < log 푛 + log (1 + 2훿푖)(푛 − 푘)푐 푠−1 + 3(푘 − 1 − 휏)(1 + 휖) log log 푛 푖=푠−1 휏 휏 ∑︁ (︂ 푖 )︂ ∑︁ < log 푛휏+1 + (log 푐) + log(1 + 2훿 ) + 3(푘 − 1 − 휏)(1 + 휖) log log 푛 푠 − 1 푖 푖=푠−1 푖=푠−1 휏 (︁ 휏+1 (휏+1))︁ ∑︁ ≤ log 푛 푐 푠 + 3(푘 − 1 − 휏)(1 + 휖) log log 푛 + 2 훿푖 푖=푠−1

(︁ 휏+1 휏+1 )︁ ≤ log 푛 푐( 푠 ) + 3(푘 − 1 − 휏)(1 + 휖) log log 푛 + 표(1)

1 + 휖 − 1 + 1 훼( 휏 ) The last inequality holds since 휏 = 푂(1) and since 훿푖 . (log 푛) 2 2 푛 2 2 푠−1 = 표(1) (︀ 휏 )︀ for all 푖 ≤ 휏 because of the definition that 훼 푠−1 < 1. In summary, we have shown that for sufficiently large 푛

(︂ )︂ [︁ 휏+1 휏+1 3(푘−1−휏)(1+휖) ⃒ ]︁ 1 1+휖 −휔(1) 푍 ≥ 2푛 푐( 푠 )(log 푛) ⃒ {푣 , 푣 , . . . , 푣 } ∈ cl (퐺) ≤ 푘 exp − (log 푛) = 푛 P 푣 ⃒ 1 2 푘 푘 3

67 for any 푘-tuple of vertices 푣 = (푣1, 푣2, . . . , 푣푘). Now since P [{푣1, 푣2, . . . , 푣푘} ∈ cl푘(퐺)] = (푘) (푘) −휔(1) −휔(1) 푐 푠 , we have that P[퐴푣] ≤ 푐 푠 푛 = 푛 for each 푘-tuple 푣. Now consider the event

{︁ 휏+1 (휏+1) 3(푘−1−휏)(1+휖) }︁ 퐵 = 푍푣 < 2푛 푐 푠 (log 푛) for all 푣 such that {푣1, 푣2, . . . , 푣푘} ∈ cl푘(퐺)

⋃︀ Note that 퐵 = 푘-tuples 푣 퐴푣 and thus a union bound implies that P[퐵] ≥ 1 − ∑︀ 푘 −휔(1) −휔(1) 푘 푣 P[퐴푣] ≥ 1 − 푛 · 푛 = 1 − 푛 since there are fewer than 푛 푘-tuples 푣.

We now show that as long as 퐵 holds over the random choice of 퐺, then the

algorithm greedy-random-sampling terminates with 푆 = cl푘(퐺) with probabil- ity 1 − 푛−휔(1) over the random bits of greedy-random-sampling, which com- pletes the proof of the lemma in the case 푘 > 휏 + 1. In the next part of the argument, we consider 퐺 conditioned on the event 퐵. Fix some ordering 푣 =

(푣1, 푣2, . . . , 푣푘) of some 푘-clique 풞 = {푣1, 푣2, . . . , 푣푘} in 퐺. Note that in any one of the 푇 iterations of greedy-random-sampling, the probability that the 푘 ver-

tices 푣1, 푣2, . . . , 푣푘 are chosen in that order is exactly 1/푍푣. Since the 푇 iterations of greedy-random-sampling are independent, we have that

(︂ )︂푇 (︂ )︂ 1 푇 −휔(1) P [푣 is never chosen in a round] = 1 − ≤ exp − = 푛 푍푣 푍푣

3(1+휖) since 푇 is chosen so that 푇 ≥ 푍푣(log 푛) for all 푘-tuples 푣, given the event 퐵. Since there are at most 푛푘 possible 푣, a union bound implies that every such 푣 is chosen in a round of greedy-random-sampling with probability at least 1 − 푛푘 · 푛−휔(1) = −휔(1) 1 − 푛 over the random bits of the algorithm. In this case, 푆 = cl푘(퐺) after the 푇 rounds of greedy-random-sampling. This completes the proof of the theorem in the case 푘 ≥ 휏 + 1.

We now handle the case 푘 < 휏 + 1 through a nearly identical argument. Define 휅푖 √ as in the previous case and set 훿푖 = 휅푖 for all 푖 ∈ {푠 − 1, 푠, . . . , 푘 − 1}. By the same argument, for each 푘-tuple 푣 we have with probability 1 − 푛−휔(1) over the choice of

68 퐺 that

푘−1 푠−1 ∑︁ (︁ ( 푖 ))︁ log 푍푣 < log 푛 + log (1 + 2훿푖)(푛 − 푘)푐 푠−1 푖=푠−1 푘−1 푘−1 ∑︁ (︂ 푖 )︂ ∑︁ < log 푛푘 + (log 푐) + 2 훿 푠 − 1 푖 푖=푠−1 푖=푠−1

(︁ 푘 푘 )︁ = log 푛 푐(푠) + 표(1)

1 + 휖 − 1 + 1 훼( 휏 ) where again 훿푖 . (log 푛) 2 2 푛 2 2 푠−1 = 표(1) for all 푖 ≤ 푘 − 1 < 휏. Define the event

′ {︁ 푘 (푘) 1+휖 }︁ 퐵 = 푍푣 < 2푛 푐 푠 (log 푛) for all 푣 such that {푣1, 푣2, . . . , 푣푘} ∈ cl푘(퐺)

1+휖 ′ Note that 푇 is such that 푇 ≥ 푍푣(log 푛) for all 푣 if 퐵 holds. Now repeating the rest of the argument from the 푘 ≥ 휏 + 1 case shows that P[퐵′] ≥ 1 − 푛−휔(1) and that −휔(1) greedy-random-sampling terminates with 푆 = cl푘(퐺) with probability 1 − 푛 over its random bits if 퐺 is such that 퐵′ holds. This completes the proof of the theorem.

Implementing 푆 as a balanced binary search tree and outputting |푆| in greedy- random-sampling therefore yields the following algorithmic upper bounds for #(푘, 푠)- clique with inputs sampled from 퐺(푛, 푐, 푠).

Corollary 5.2.2. Suppose that 푘 and 푠 are constants and 푐 = Θ(푛−훼) for some (︀ 휏 )︀ 훼 ∈ (0, 1). Let 휏 be the largest integer satisfying 훼 푠−1 < 1. Then it follows that

(︁ 휏+2−훼 휏+1 )︁ 1. If 푘 ≥ 휏 + 1, there is an 푂˜ 푛 ( 푠 ) time randomized algorithm solving #(푘, 푠)-clique on inputs sampled from 퐺(푛, 푐, 푠) with probability at least 1 − 푛−휔(1).

(︁ 푘+1−훼 푘 )︁ 2. If 푘 < 휏 + 1, there is an 푂˜ 푛 (푠) time randomized algorithm solving #(푘, 푠)-clique on inputs sampled from 퐺(푛, 푐, 푠) with probability at least 1 − 푛−휔(1).

By Lemma 5.1.1, the hypergraph 퐺 ∼ 퐺(푛, 푐, 푠) has clique number 휔(퐺) ≤ 휅 + 2 with probability 1 − 1/poly(푛) if where 휅 ≥ 푠 is the largest positive integer satisfying

69 (︀ 휅 )︀ 훼 푠−1 < 푠. In particular, when 푘 > 휅 + 2 in the theorem above, the algorithm outputting zero succeeds with probability 1−1/poly(푛) and #(푘, 푠)-clique is trivial. For there to typically be a nonzero number of 푘-cliques in 퐺(푛, 푐, 푠), it should hold (︀푘−1)︀−1 that 0 < 훼 ≤ 푠 푠−1 . In the graph case of 푠 = 2, this simplifies to the familiar 2 condition that 0 < 훼 ≤ 푘−1 . We also remark that when 푘 < 휏 + 1, the runtime of this algorithm is an 푂˜(푛) factor off from the expected number of 푘-cliques in 퐺 ∼ 퐺(푛, 푐, 푠).

5.3 Post-Processing with Matrix Multiplication

In this section, we improve the runtime of greedy-random-sampling as an algo- rithm for #(푘, 푠)-clique in the graph case of 푠 = 2. The improvement comes from the matrix multiplication step of Ne˘set˘riland Poljak from their 푂 (︀푛휔⌊푘/3⌋+(푘 (mod 3)))︀ time worst-case algorithm for #(푘, 2)-clique [64]. Our improved runtime for greedy-random-sampling is stated in the following theorem.

Theorem 5.3.1. Suppose that 푘 > 2 is a fixed positive integer and 푐 = Θ(푛−훼)

2 where 0 < 훼 ≤ 푘−1 is also fixed. Then there is a randomized algorithm solving #(푘, 2)-clique on inputs sampled from 퐺(푛, 푐) with probability 1 − 푛−휔(1) that runs (︁ 휔⌈푘/3⌉+휔−휔훼 ⌈푘/3⌉ )︁ in 푂˜ 푛 ( 2 ) time.

Proof. Label the vertices of an input graph 퐺 ∼ 퐺(푛, 푐) with the elements of [푛]. Con- sider the following application of greedy-random-sampling with post-processing:

1. Run greedy-random-sampling to compute the two sets of cliques 푆1 =

cl⌊푘/3⌋(퐺) and 푆2 = cl⌈푘/3⌉(퐺) with the number of iterations 푇 as given in Theorem 5.2.1.

|푆1|×|푆1| 2. Construct the matrix 푀1 ∈ {0, 1} with rows and columns indexed by the

elements of 푆1 such that (푀1)퐴,퐵 = 1 for 퐴, 퐵 ∈ 푆1 if 퐴 ∪ 퐵 forms a clique of 퐺 and all labels in 퐴 are strictly less than all labels in 퐵.

|푆1|×|푆2| 3. Construct the matrix 푀2 ∈ {0, 1} with rows indexed by the elements of

푆1 and columns indexed by the elements of 푆2 such that (푀2)퐴,퐵 = 1 for 퐴 ∈ 푆1

70 and 퐵 ∈ 푆2 under the same rule that 퐴 ∪ 퐵 forms a clique of 퐺 and all labels

in 퐴 are strictly less than all labels in 퐵. Construct the matrix 푀3 with rows

and columns indexed by 푆2 analogously.

4. Compute the matrix product

⎧ 2 ⎪ 푀1 if 푘 ≡ 0 (mod 3) ⎨⎪ 푀푃 = 푀1푀2 if 푘 ≡ 1 (mod 3) ⎪ ⎪ ⎩푀2푀3 if 푘 ≡ 2 (mod 3)

5. Output the sum of entries ∑︁ (푀푃 )퐴,퐵 (퐴,퐵)∈풮

where 풮 is the support of 푀1 if 푘 ≡ 0 (mod 3) and 풮 is the support of 푀2 if 푘 ̸≡ 0 (mod 3).

We will show that this algorithm solves #(푘, 2)-clique with probability 1 − 푛−휔(1) when 푘 ≡ 1 (mod 3). The cases when 푘 ≡ 0, 2 (mod 3) follow from a nearly identical argument. By Theorem 5.2.1, the first step applying greedy-random-sampling −휔(1) succeeds with probability 1 − 푛 . Note that (푀푃 )퐴,퐵 counts the number of ⌊푘/3⌋- cliques 퐶 in 퐺 such that the labels of 퐶 are strictly greater than those of 퐴 and less than those of 퐵 and such that 퐴 ∪ 퐶 and 퐶 ∪ 퐵 are both cliques. If it further holds that (푀2)퐴,퐵 = 1, then 퐴 ∪ 퐵 is a clique and 퐴 ∪ 퐵 ∪ 퐶 is also clique. Therefore the sum output by the algorithm exactly counts the number of triples (퐴, 퐵, 퐶) such that 퐴 ∪ 퐵 ∪ 퐶 is a clique, |퐴| = |퐶| = ⌊푘/3⌋, |퐵| = ⌈푘/3⌉ and the labels of 퐶 are greater than those of 퐴 and less than those of 퐵. Observe that any clique 풞 ∈ cl푘(퐺) is counted in this sum exactly once by the triple (퐴, 퐵, 퐶) where 퐴 consists of the lowest ⌊푘/3⌋ labels in 풞, 퐵 consists of the highest ⌈푘/3⌉ labels in 풞 and 퐶 contains the remaining vertices of 풞. Therefore this algorithm solves #(푘, 2)-clique as long as Step 1 succeeds. It suffices to analyze the additional runtime incurred by this post-processing. Ob- serve that the number of cliques output by a call to greedy-random-sampling with

71 2 푘 푇 iterations is at most 푇 . Also note that if 훼 ≤ 푘−1 , then 휏 ≥ ⌊ 2 ⌋ − 1. If 푘 푘 푘 ≥ 3, then it follows that 휏 + 1 ≥ ⌊ 2 ⌋ ≥ ⌈ 3 ⌉. It follows by Theorem 5.2.1 that (︁ ⌈푘/3⌉ )︁ ˜ ⌈푘/3⌉+1−훼( 푠 ) max{|푆1|, |푆2|} = 푂 푛 . Note that computing the matrix 푀푃 takes (︁ ⌈푘/3⌉ )︁ ˜ 휔 ˜ 휔⌈푘/3⌉+휔−휔훼( 2 ) 푂 (max{|푆1|, |푆2|} ) = 푂 푛 time. Now observe that all other steps (︁ 2⌈푘/3⌉−2훼 ⌈푘/3⌉ )︁ of the algorithm run in 푂˜ 푛 ( 푠 ) time, which completes the proof of the theorem since the matrix multiplication constant satisfies 휔 ≥ 2.

We remark that for simplicity, we have ignored minor improvements in the runtime that can be achieved by more carefully analyzing Step 4 in terms of rectangular matrix multiplication constants if 푘 ̸= 0 (mod 3). Note that the proof above implicitly used a weak large deviations bound on |cl푘(퐺)|. More precisely, it used the fact that if greedy-random-sampling with 푇 iterations succeeds, then |cl푘(퐺)| ≤ 푇 .

Theorem 5.2.1 thus implies that |cl푘(퐺)| is upper bounded by the minimal settings of 푇 in the theorem statement with probability 1 − 푛−휔(1) over 퐺 ∼ 퐺(푛, 푐, 푠). When 푘 ≤ 휏 + 1, these upper bounds are a polylog(푛) factor from the expectation of |cl푘(퐺)|. The upper tails of |cl푘(퐺)| and more generally of the counts of small subhypergraphs in 퐺(푛, 푐, 푠) have been studied extensively in the literature. We refer to [76, 50, 49, 26] for a survey of the area and recent results. Given a hypergraph 퐻, let 푁(푛, 푚, 퐻) denote the largest number of copies of 퐻 that can be constructed in an 푠-uniform hypergraph with at most 푛 vertices and 푚 hyperedges. Define the quantity

{︂ (︂ )︂ }︂ 푛 ′ ′ 푀 (푛, 푐) = max 푚 ≤ : ∀퐻′ ⊆ 퐻 it holds that 푁(푛, 푚, 퐻′) ≤ 푛|푉 (퐻 )|푐|퐸(퐻 )| 퐻 푠

The following large deviations result from [31] generalizes a graph large deviations bound from [49] to hypergraphs to obtain the following result.

Theorem 5.3.2 (Theorem 4.1 from [31]). For every 푠-uniform hypergraph 퐻 and every fixed 휖 > 0, there is a constant 퐶(휖, 퐻) such that for all 푛 ≥ |푉 (퐻)| and 푐 ∈ (0, 1), it holds that

P [푋퐻 ≥ (1 + 휖)E[푋퐻 ]] ≤ exp (−퐶(휖, 퐻) · 푀퐻 (푛, 푐))

72 where 푋퐻 is the number of copies of 퐻 in 퐺 ∼ 퐺(푛, 푐, 푠).

Proposition 4.3 in [31] shows that if 퐻 is a 푑-regular 푠-uniform hypergraph and

−푠/푑 푠 푑 푐 ≥ 푛 then 푀퐻 (푛, 푐) = Θ(푛 푐 ). This implies that

[︂ (︂ )︂ ]︂ 푛 푘 (︁ ′ 푠 푘−1 )︁ |cl (퐺)| ≥ (1 + 휖) 푐(푠) ≤ exp −퐶 (휖) · 푛 푐(푠−1) P 푘 푘 as long as 푐 ≥ 푛−푠!(푘−푠)!/(푘−1)!. This provides strong bounds on the upper tails of

|cl푘(퐺)| that will be useful in the next subsection.

5.4 Deterministic Iterative Algorithm for Counting in 퐺(푛, 푐, 푠)

In this section, we present an alternative deterministic algorithm it-gen-cliques achieving a similar runtime to greedy-random-sampling. Although they have very different analyses, the algorithm it-gen-cliques can be viewed as a determin- istic analogue of greedy-random-sampling. Both are constructing cliques one vertex at a time. The algorithm it-gen-cliques takes in cutoffs 퐶푠−1, 퐶푠, . . . , 퐶푘 and generates sets 푆푠−1, 푆푠, . . . , 푆푘 as follows:

1. Initialize 푆푠−1 to be the set of all (푠 − 1)-subsets of [푛].

2. Given the set 푆푖, for each vertex 푣 ∈ [푛], iterate through all subsets 퐴 ∈ 푆푖 and

add 퐴 ∪ {푣} to 푆푖+1 if 퐴 ∪ {푣} is a clique and 푣 is larger than the labels of all

of the vertices in 퐴. Stop if ever |푆푖+1| ≥ 퐶푖+1.

3. Stop once 푆푘 has been generated and output 푆푘.

Suppose that 퐶푡 are chosen to be any high probability upper bounds on the number of 푡-cliques in 퐺 ∼ 퐺(푛, 푐, 푠) such as the bounds in Theorem 5.3.2. Then we have the following guarantees for the algorithm it-gen-cliques.

Theorem 5.4.1. Suppose that 푘 and 푠 are constants and 푐 = Θ(푛−훼) for some 푡 (︀ 휏 )︀ 푡 (푠) 훼 ∈ (0, 1). Let 휏 be the largest integer satisfying 훼 푠−1 < 1 and 퐶푡 = 2푛 푐 for

73 each 푠 ≤ 푡 ≤ 푘. Then it-gen-cliques with the cutoffs 퐶푡 outputs 푆푘 = cl푘(퐺) with probability 1 − 푛−휔(1) where

(︁ 휏+2−훼 휏+1 )︁ 1. The runtime of it-gen-cliques is 푂 푛 ( 푠 ) if 푘 ≥ 휏 + 2.

(︁ 푘−훼 푘−1 )︁ 2. The runtime of it-gen-cliques is 푂 푛 ( 푠 ) if 푘 < 휏 + 2.

−휔(1) Proof. We first show that 푆푘 = cl푘(퐺) with probability 1−푛 in it-gen-cliques.

By a union bound and Theorem 5.3.2, it follows that |cl푡(퐺)| < 퐶푡 for each 푠 ≤ 푡 ≤ 푘 with probability at least 1−(푘−푠+1)푛−휔(1). The following simple induction argument shows that 푆푡 = cl푡(퐺) for each 푠 − 1 ≤ 푡 ≤ 푘 conditioned on this event. Note that cl푠−1(퐺) is by definition the set of all (푠 − 1)-subsets of [푛] and thus 푆푠−1 = cl푠−1(퐺).

If 푆푡 = cl푡(퐺), then each (푡+1)-clique 풞 of 퐺 is added exactly once to 푆푡+1 as 퐴∪{푣} where 푣 is the vertex of 풞 with the largest label and 퐴 = 풞∖{푣} ∈ cl푡(퐺) are the remaining vertices. Now note that the runtime of it-gen-cliques is

⎧ 휏+1 (︃ 푘−1 )︃ (︁ 휏+2−훼( ))︁ ∑︁ (︂ )︂ ⎨푂 푛 푠 if 푘 ≥ 휏 + 2 푂 푛퐶푡 = 푂 max (푛퐶푡) = 푠−1≤푡≤푘−1 (︁ 푘−훼(푘−1))︁ 푡=푠−1 ⎩ 푂 푛 푠 if 푘 < 휏 + 2

(︀ 푡 )︀ since 푘 = 푂(1). To see the second inequality, note that log푛(퐶푡+1/퐶푡) = 1 − 훼 푠−1 .

This implies that 퐶푡+1 > 퐶푡 if 푡 ≤ 휏 and 퐶푡 is maximized on 푠 ≤ 푡 ≤ 푘 when 푡 = 휏 +1. This completes the proof of the theorem.

We remark that in the case of 푘 < 휏 + 1, it-gen-cliques attains a small runtime improvement over greedy-random-sampling. However, greedy-random-sampling can be modified to match this runtime up to a polylog(푛) factor by instead generating the (푘 − 1)-cliques of 퐺 and applying the last step of it-gen-cliques to generate the 푘-cliques of 퐺. We also remark that it-gen-cliques can also be used instead of greedy-random-sampling in Step 1 of the algorithm in Theorem 5.3.1, yield- (︁ 휔⌈푘/3⌉−휔훼 ⌈푘/3⌉−1 )︁ ing a nearly identical runtime of 푂˜ 푛 ( 2 ) for #(푘, 2)-clique on inputs sampled from 퐺(푛, 푐).

74 Chapter 6

Extensions and Open Problems

In this chapter, we outline several extensions of our methods and problems left open after our work.

Improved Average-Case Lower Bounds. A natural question is whether tight average-case lower bounds for #(푘, 푠)-clique can be shown above the 푘-clique per- colation threshold when 푠 ≥ 3 and if the constant 퐶 in the exponent of our lower bounds for the graph case of 푠 = 2 can be improved from 1 to 휔/9.

Raising Error Tolerance for Average-Case Hardness. A natural question is whether the error tolerance of the worst-case to average-case reductions in Theorems 2.2.1 and 2.2.2 can be increased. We remarked in the introduction that for certain choices of 푘, the error tolerance cannot be significantly increased – for example, when

푘 = 3 log2 푛, the trivial algorithm that outputs 0 on any graph has subpolynomial error on graphs drawn from 퐺(푛, 1/2), but is useless for reductions from worst-case graphs. Nevertheless, for other regimes of 푘, such as when 푘 = 푂(1) is constant, counting 푘-cliques with error probability less than 1/4 on graphs drawn from 퐺(푛, 1/2) appears to be nontrivial. It is an open problem to prove hardness for such a regime. In general, one could hope to understand the tight tradeoffs between computation time, error tolerance, 푘, 푐, and 푠 for 푘-clique-counting on 퐺(푛, 푐, 푠).

75 Hardness of Approximating Clique Counts. Another interesting question is whether it is hard to approximate the 푘-clique counts, within some additive error 푒, of hypergraphs drawn from 퐺(푛, 푐, 푠). Since the number of 푘-cliques in 퐺(푛, 푐, 푠) 푘 concentrates around the mean 휇 ≈ 푐(푠)푛푘 with standard deviation 휎, one would have to choose 푒 ≪ 휎 for approximation to be hard.

Inhomogeneous Erdős-Rényi Hypergraphs. Consider an inhomogeneous Erdős- Rényi hypergraph model, where each hyperedge 푒 is independently chosen to be in the hypergraph with probability 푐(푒). Also suppose that we may bound 푐(푒) uniformly away from 0 and 1 (that is, 푐(푒) ∈ [푐, 1 − 푐] for all possible hyperedges 푒 and for some constant 푐). We would like to prove that #(푘, 푠)-clique and Parity-(푘, 푠)-clique are hard on average for inhomogeneous Erdős-Rényi hypergraphs. Unfortunately, this does not follow directly from our proof techniques because step 5 in the proof of Theorems 2.2.1 and 2.2.2 breaks down due to the inhomogeneity of the model. Nevertheless, steps 1-4 still hold, and therefore we can show that #(푘, 푠)-clique and Parity-(푘, 푠)-clique are average-case hard for 푘-partite inhomogeneous Erdős- Rényi hypergraphs – when only the edges 푒 that respect the 푘-partition are chosen to be in the hypergraph with inhomogeneous edge-dependent probability 푐(푒) ∈ [푐, 1−푐].

76 Bibliography

[1] Miklós Ajtai. Generating hard instances of lattice problems. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pages 99–108. ACM, 1996. [2] and Ravi B Boppana. The monotone circuit complexity of boolean functions. Combinatorica, 7(1):1–22, 1987. [3] Noga Alon, Michael Krivelevich, and Benny Sudakov. Finding a large hidden clique in a random graph. Random Structures and Algorithms, 13(3-4):457–466, 1998. [4] Kazuyuki Amano and Akira Maruoka. A superpolynomial lower bound for a circuit computing the clique function with at most (1/6) log log n negation gates. SIAM Journal on Computing, 35(1):201–216, 2005. [5] Brendan PW Ames and Stephen A Vavasis. Nuclear norm minimization for the planted clique and biclique problems. Mathematical programming, 129(1):69–89, 2011. [6] Albert Atserias, Ilario Bonacina, Susanna F de Rezende, Massimo Lauria, Jakob Nordström, and . Clique is hard on average for regular resolution. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, pages 866–877. ACM, 2018. [7] Eric Bach, James Driscoll, and Jeffrey Shallit. Factor refinement. Journal of Algorithms, 15(2):199–222, 1993. [8] Marshall Ball, Alon Rosen, Manuel Sabin, and Prashant Nalini Vasudevan. Average-case fine-grained hardness. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, pages 483–496. ACM, 2017. [9] Marshall Ball, Alon Rosen, Manuel Sabin, and Prashant Nalini Vasudevan. Proofs of work from worst-case assumptions. In Annual International Cryptology Conference, pages 789–819. Springer, 2018. [10] Boaz Barak, Samuel B Hopkins, Jonathan Kelner, Pravesh Kothari, Ankur Moitra, and Aaron Potechin. A nearly tight sum-of-squares lower bound for the planted . In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 428–437. IEEE, 2016.

77 [11] Quentin Berthet and Philippe Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT, pages 1046–1066, 2013. [12] Andrej Bogdanov and Luca Trevisan. Average-case complexity. Foundations and Trends○R in Theoretical Computer Science, 2(1):1–106, 2006. [13] Andrej Bogdanov and Luca Trevisan. On worst-case to average-case reductions for np problems. SIAM Journal on Computing, 36(4):1119–1159, 2006. [14] Enric Boix-Adserà, Matthew Brennan, and Guy Bresler. The average-case com- plexity of counting cliques in erdős-rényi hypergraphs. In 2019 IEEE 60th An- nual Symposium on Foundations of Computer Science (FOCS), pages 1256–1280. IEEE, 2019. [15] Béla Bollobás and Oliver Riordan. Clique percolation. Random Structures & Algorithms, 35(3):294–322, 2009. [16] Matthew Brennan and Guy Bresler. Optimal average-case reductions to sparse pca: From weak assumptions to strong hardness. arXiv preprint arXiv:1902.07380, 2019. [17] Matthew Brennan, Guy Bresler, and Wasim Huleihel. Reducibility and compu- tational lower bounds for problems with planted sparse structure. In Conference On Learning Theory, pages 48–166, 2018. [18] Matthew Brennan, Guy Bresler, and Wasim Huleihel. Universality of computa- tional lower bounds for submatrix detection. arXiv preprint arXiv:1902.06916, 2019. [19] Jin-Yi Cai, Aduri Pavan, and D Sivakumar. On the hardness of permanent. In Annual Symposium on Theoretical Aspects of Computer Science, pages 90–99. Springer, 1999. [20] Jianer Chen, Xiuzhen Huang, Iyad A Kanj, and Ge Xia. Strong computational lower bounds via parameterized complexity. Journal of Computer and System Sciences, 72(8):1346–1367, 2006. [21] Yudong Chen. Incoherence-optimal matrix completion. IEEE Transactions on Information Theory, 61(5):2909–2923, 2015. [22] Yudong Chen and Jiaming Xu. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and sub- matrices. Journal of Machine Learning Research, 17(27):1–57, 2016. [23] Amin Coja-Oghlan and Charilaos Efthymiou. On independent sets in random graphs. Random Structures & Algorithms, 47(3):436–486, 2015. [24] Mina Dalirrooyfard, Andrea Lincoln, and Virginia Vassilevska Williams. New techniques for proving fine-grained average-case hardness. arXiv preprint arXiv:2008.06591, 2020.

78 [25] Yael Dekel, Ori Gurel-Gurevich, and Yuval Peres. Finding hidden cliques in linear time with high probability. Combinatorics, Probability and Computing, 23(1):29–49, 2014.

[26] Robert DeMarco and Jeff Kahn. Tight upper tail bounds for cliques. Random Structures & Algorithms, 41(4):469–487, 2012.

[27] Imre Derényi, Gergely Palla, and Tamás Vicsek. Clique percolation in random networks. Physical review letters, 94(16):160202, 2005.

[28] Yash Deshpande and Andrea Montanari. Finding hidden cliques of size√︀푁/푒 in nearly linear time. Foundations of Computational Mathematics, 15(4):1069–1128, 2015.

[29] Sergey N Dorogovtsev, Alexander V Goltsev, and José FF Mendes. Critical phenomena in complex networks. Reviews of Modern Physics, 80(4):1275, 2008.

[30] Rod G Downey and Michael R Fellows. Fixed-parameter tractability and com- pleteness ii: On completeness for w [1]. Theoretical Computer Science, 141(1- 2):109–131, 1995.

[31] Andrzej Dudek, Joanna Polcyn, and Andrzej Ruciński. Subhypergraph counts in extremal and random hypergraphs and the fractional q-independence. Journal of combinatorial optimization, 19(2):184–199, 2010.

[32] , David Gamarnik, Joe Neeman, Miklós Z Rácz, and Prasad Tetali. Finding cliques using few probes. arXiv preprint arXiv:1809.06950, 2018.

[33] Uriel Feige and Robert Krauthgamer. Finding and certifying a large hidden clique in a semirandom graph. Random Structures and Algorithms, 16(2):195– 208, 2000.

[34] Uriel Feige and . On the hardness of computing the permanent of random matrices. In Proceedings of the twenty-fourth annual ACM symposium on Theory of computing, pages 643–654. ACM, 1992.

[35] Uriel Feige and Dorit Ron. Finding hidden cliques in linear time. In 21st In- ternational Meeting on Probabilistic, Combinatorial, and Asymptotic Methods in the Analysis of Algorithms (AofA’10), pages 189–204. Discrete Mathematics and Theoretical Computer Science, 2010.

[36] Joan Feigenbaum and Lance Fortnow. Random-self-reducibility of complete sets. SIAM Journal on Computing, 22(5):994–1005, 1993.

[37] Vitaly Feldman, Elena Grigorescu, Lev Reyzin, Santosh Vempala, and Ying Xiao. Statistical algorithms and a lower bound for detecting planted cliques. In Pro- ceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 655–664. ACM, 2013.

79 [38] David Gamarnik. Computing the partition function of the sherrington- kirkpatrick model is hard on average. arXiv preprint arXiv:1810.05907, 2018.

[39] David Gamarnik and . Limits of local algorithms over sparse ran- dom graphs. In Proceedings of the 5th conference on Innovations in theoretical computer science, pages 369–376. ACM, 2014.

[40] Shuhong Gao. Normal bases over finite fields. Doctoral thesis, Waterloo, 1993.

[41] Peter Gemmell, Richard Lipton, Ronitt Rubinfeld, Madhu Sudan, and . Self-testing/correcting for polynomials and for approximate func- tions. In Proceedings of the twenty-third annual ACM symposium on Theory of computing, pages 33–42. ACM, 1991.

[42] Peter Gemmell and Madhu Sudan. Highly resilient correctors for polynomials. Inf. Process. Lett., 43(4):169–174, 1992.

[43] Oded Goldreich. On counting t-cliques mod 2. 2020.

[44] Oded Goldreich and Guy Rothblum. Counting t-cliques: Worst-case to average- case reductions and direct interactive proof systems. In 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS), pages 77–88. IEEE, 2018.

[45] Oded Goldreich and Guy N Rothblum. Worst-case to average-case reductions for subclasses of p. 2017.

[46] Geoffrey R Grimmett and Colin JH McDiarmid. On colouring random graphs. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 77, pages 313–324. Cambridge University Press, 1975.

[47] Bruce E Hajek, Yihong Wu, and Jiaming Xu. Computational lower bounds for community detection on random graphs. In COLT, pages 899–928, 2015.

[48] Alon Itai and Michael Rodeh. Finding a minimum circuit in a graph. SIAM Journal on Computing, 7(4):413–423, 1978.

[49] Svante Janson, Krzysztof Oleszkiewicz, and Andrzej Ruciński. Upper tails for subgraph counts in random graphs. Israel Journal of Mathematics, 142(1):61–92, 2004.

[50] Svante Janson and Andrzej Ruciński. The infamous upper tail. Random Struc- tures & Algorithms, 20(3):317–342, 2002.

[51] . Large cliques elude the metropolis process. Random Structures & Algorithms, 3(4):347–359, 1992.

[52] Ari Juels and Marcus Peinado. Hiding cliques for cryptographic security. Designs, Codes and Cryptography, 20(3):269–280, 2000.

80 [53] Richard M Karp. Reducibility among combinatorial problems. In Complexity of computer computations, pages 85–103. Springer, 1972.

[54] Richard M Karp. Probabilistic analysis of some combinatorial search problems. In Algorithms and Complexity: New Directions and Recent Results. Academic Press, 1976.

[55] Pascal Koiran and Anastasios Zouzias. Hidden cliques and the certification of the restricted isometry property. IEEE Transactions on Information Theory, 60(8):4999–5006, 2014.

[56] Ludek Kucera. Expected complexity of graph partitioning problems. Discrete Applied Mathematics, 57(2-3):193–212, 1995.

[57] Rio LaVigne, Andrea Lincoln, and Virginia Vassilevska Williams. Public-key cryptography in the fine-grained setting. In Annual International Cryptology Conference, pages 605–635. Springer, 2019.

[58] Leonid A Levin. Average case complete problems. SIAM Journal on Computing, 15(1):285–286, 1986.

[59] Richard J Lipton. New directions in testing. and Cryp- tography, 2:191–202, 1989.

[60] Zongming Ma and Yihong Wu. Computational barriers in minimax submatrix detection. The Annals of Statistics, 43(3):1089–1116, 2015.

[61] Colin McDiarmid. Colouring random graphs. Annals of Operations Research, 1(3):183–200, 1984.

[62] Frank McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529– 537. IEEE, 2001.

[63] David E Muller. Application of boolean algebra to switching circuit design and to error detection. Transactions of the IRE professional group on electronic computers, 3:6–12, 1954.

[64] Jaroslav Nesetril and Svatopluk Poljak. On the complexity of the subgraph problem. Commentationes Mathematicae Universitatis Carolinae, 26(2):415–419, 1985.

[65] Gergely Palla, Imre Derényi, and Tamás Vicsek. The critical point of k-clique percolation in the erdős–rényi graph. Journal of Statistical Physics, 128(1-2):219– 227, 2007.

[66] B Pittel. On the probable behaviour of some algorithms for finding the stability number of a graph. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 92, pages 511–526. Cambridge University Press, 1982.

81 [67] Mustazee Rahman and Balint Virag. Local algorithms for independent sets are half-optimal. The Annals of Probability, 45(3):1543–1577, 2017.

[68] Alexander A Razborov. Lower bounds for the monotone complexity of some boolean functions. In Soviet Math. Dokl., volume 31, pages 354–357, 1985.

[69] Oded Regev. The learning with errors problem.

[70] Oded Regev. On lattices, learning with errors, random linear codes, and cryp- tography. Journal of the ACM (JACM), 56(6):34, 2009.

[71] Benjamin Rossman. On the constant-depth complexity of k-clique. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 721–730. ACM, 2008.

[72] Benjamin Rossman. The monotone complexity of k-clique on random graphs. In 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, pages 193–201. IEEE, 2010.

[73] Benjamin Rossman. Lower bounds for subgraph isomorphism, 2016.

[74] Madhu Sudan. Decoding of reed solomon codes beyond the error-correction bound. Journal of complexity, 13(1):180–193, 1997.

[75] Leslie G Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(3):410, 1979.

[76] Van H Vu. A large deviation result on the number of small subgraphs of a random graph. Combinatorics, Probability and Computing, 10(1):79–94, 2001.

[77] Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity. In Proceedings of the ICM. World Scientific, 2018.

[78] Raphael Yuster. Finding and counting cliques and independent sets in r-uniform hypergraphs. Information Processing Letters, 99(4):130–134, 2006.

82