Introduction
In the graph collision problem, a simple undirected graph G = ( V , E ) G=(V,E) G = ( V , E ) on n n n vertices is known in advance, and we have query access to an input x ∈ { 0 , 1 } V x\in\{0,1\}^{V} x ∈ { 0 , 1 } V . A vertex v v v is marked if x v = 1 x_v=1 x v = 1 . The task is to decide whether some edge u v ∈ E uv\in E uv ∈ E has both endpoints marked. Only queries to x x x are counted; all computation involving the known graph is free.
Magniez, Santha, and Szegedy introduced graph collision as a subroutine for triangle finding and gave an O ( n 2 / 3 ) O(n^{2/3}) O ( n 2/3 ) query quantum algorithm for arbitrary graphs [21 JKLGM16] . Their algorithm uses Ambainis’s quantum walk for element distinctness [3 ] . Subsequent work improved this bound for graphs with few nonedges [JKLGM16], small independence number [7 ] , or small treewidth [ABI+13]. Other bounds depend on the degrees of vertices in independent sets [15 ABI+13] . Despite these improvements for particular graph families, the O ( n 2 / 3 ) O(n^{2/3}) O ( n 2/3 ) bound remained the best known for arbitrary graphs.
A reduction from unstructured search gives a worst case lower bound of Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) [6 ] , leaving a gap between the known upper and lower bounds. Gavinsky and Ito ask whether graph collision admits a O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) query algorithm [15 Section 6] , while Ambainis et al. and Balodis and Iraids leave an O ( n ) O(\sqrt{n}) O ( n ) bound for arbitrary graphs open [ABI+13, BI16]. Determining the quantum query complexity of graph collision also appears among the open problems in Kothari’s thesis [19 Open Problem 4.3] and in the work of Bun, Kothari, and Thaler [11 Section 7.2] . In the other direction, Cornelissen, Gilani, and Patro report that the n 2 / 3 n^{2/3} n 2/3 bound is believed by some in the community to be optimal [14 ] . Gilani, Mande, Patro, and Raja formulate a conjecture for detecting marked cliques whose k = 2 k=2 k = 2 case asserts that some graph families require Ω ( n 2 / 3 ) \Omega(n^{2/3}) Ω ( n 2/3 ) queries for graph collision [16 Conjecture 1.5] .
We refute this conjecture. We first give a relatively elementary algorithm using O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) queries in Section 3. Its central idea is to estimate the number of marked neighbors of each vertex and use these estimates to divide the edges into parts that can be tested efficiently. In § 5 , we refine the same approach to obtain the following stronger bound.
Theorem 1.1. There is a quantum algorithm that solves the graph collision problem on any n n n -vertex graph with high probability using O ~ ( n 11 / 17 ) \widetilde{O}(n^{11/17}) O ( n 11/17 ) queries.
Our upper bound also applies to functions whose positive inputs can be certified by fixing at most 2 input symbols. In § 9 , we reduce any such (partial) Boolean output function on n n n input symbols from an alphabet of size q q q to graph collision on n q nq n q vertices. By Theorem 1.1 , this gives a query bound of O ~ ( ( n q ) 11 / 17 ) \widetilde{O}((nq)^{11/17}) O (( n q ) 11/17 ) . This contrasts with the Ω ( n 2 / 3 ) \Omega(n^{2/3}) Ω ( n 2/3 ) lower bound for element distinctness over large alphabets [5 , 2 Ros14] , whose positive inputs also have certificates of size 2. More generally, our bound is o ( n 2 / 3 ) o(n^{2/3}) o ( n 2/3 ) for q = O ( n 1 / 3 − ε ) q=O(n^{1/3-\varepsilon}) q = O ( n 1/3 − ε ) and fixed ε > 0 \varepsilon>0 ε > 0 , showing the importance of the alphabet size in lower bounds based on certificate structures [12 ] .
We also improve the lower bound for graph collision. For a fixed graph this is a total Boolean function with positive certificates of size 2, so the positive adversary method cannot prove a lower bound larger than O ( n ) O(\sqrt{n}) O ( n ) [25 SS06] . We overcome this certificate barrier using the general adversary method, which allows negative weights [17 ] . Our explicit adversary matrix construction is inspired by the recent framework of Belovs [8 ] and gives the following result.
Theorem 1.2 (Informal version of Theorem 6.1 ). There is a family of graphs on n n n vertices for which the quantum query complexity of graph collision is Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) .
This rules out an O ( n ) O(\sqrt{n}) O ( n ) query algorithm for arbitrary graphs, while leaving open the possibility of a O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) query algorithm.
Technical overview
We give an informal overview of the main ideas behind our two algorithms, the reduction for functions with small positive certificates, and the lower bound. Precise statements and proofs appear in Sections 3–6.
An algorithm breaking the O ( n 2 / 3 ) O(n^{2/3}) O ( n 2/3 ) barrier
We describe the ideas behind the algorithm of Section 3, which achieves query complexity O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) . The algorithm first preprocesses the graph, then estimates neighborhood counts and uses a threshold to divide the remaining edges into two parts. We begin by explaining why such estimates suffice. The improved algorithm of § 5 builds on the same estimation and thresholding argument.
Let G = ( V , E ) G=(V,E) G = ( V , E ) be the known graph, and let M = { v : x v = 1 } M=\{v:x_v=1\} M = { v : x v = 1 } be its unknown marked set. For any set S ⊆ V S\subseteq V S ⊆ V , write ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ \ell_u(S)=|N_G(u)\cap S| ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ , where N G ( u ) N_G(u) N G ( u ) is the neighborhood of u u u in the graph G G G . In particular, ℓ u ( M ) \ell_u(M) ℓ u ( M ) counts the marked neighbors of u u u . Suppose for a moment that we knew all these counts. We could then restrict attention to vertices with positive counts and use Grover search to find a marked vertex among them. This would decide graph collision using O ( n ) O(\sqrt{n}) O ( n ) additional queries.
Approximate counts and marked volume. Computing all the counts exactly would require too many queries. We instead construct a set S S S for which the counts ℓ u ( S ) \ell_u(S) ℓ u ( S ) approximate ℓ u ( M ) \ell_u(M) ℓ u ( M ) . Our aim is to bound their total squared error
r = ∑ u ( ℓ u ( S ) − ℓ u ( M ) ) 2 . (1) r=\sum_u\left(\ell_u(S)-\ell_u(M)\right)^2. \tag*{(1)} r = u ∑ ( ℓ u ( S ) − ℓ u ( M ) ) 2 . (1)
The set S S S need not recover the marked set. We only use its neighborhood counts. Although approximate counts need not identify which vertices have a marked neighbor, they suffice to divide the edges into two parts that can be tested efficiently.
The relevant quantity for these tests is the marked volume vol ( G , x ) = ∑ v ∈ M deg G ( v ) \operatorname{vol}(G,x)=\sum_{v\in M}\deg_G(v) vol ( G , x ) = ∑ v ∈ M deg G ( v ) , the total degree of marked vertices. Given an upper bound b b b on this quantity, variable-time search gives a collision test using O ~ ( n + b ) \widetilde{O}(\sqrt{n}+\sqrt{b}) O ( n + b ) queries.
Choose a threshold τ > 0 \tau>0 τ > 0 and let P = { u : ℓ u ( S ) ≤ τ } P=\{u:\ell_u(S)\leq\tau\} P = { u : ℓ u ( S ) ≤ τ } . Consider first the edges inside P P P . The marked volume of G [ P ] G[P] G [ P ] equals ∑ u ∈ P ∣ N G ( u ) ∩ M ∩ P ∣ \sum_{u\in P}|N_G(u)\cap M\cap P| ∑ u ∈ P ∣ N G ( u ) ∩ M ∩ P ∣ . Each term in this sum is at most ℓ u ( M ) \ell_u(M) ℓ u ( M ) , which also counts marked neighbors outside P P P . The estimated counts are at most τ \tau τ on P P P , and Cauchy–Schwarz bounds the sum of the absolute errors by n r \sqrt{nr} n r . Consequently,
vol ( G [ P ] , x ) ≤ ∑ u ∈ P ℓ u ( M ) ≤ n τ + n r . \operatorname{vol}(G[P],x)\leq\sum_{u\in P}\ell_u(M)\leq n\tau+\sqrt{nr}. vol ( G [ P ] , x ) ≤ u ∈ P ∑ ℓ u ( M ) ≤ n τ + n r .
For the edges with at least one endpoint outside P P P , the set V ∖ P V\setminus P V ∖ P contains an endpoint of every such edge and is therefore a vertex cover. The same test applies with a bound on vol ( G , V ∖ P , x ) = ∑ v ∈ M ∖ P deg G ( v ) \operatorname{vol}(G,V\setminus P,x)=\sum_{v\in M\setminus P}\deg_G(v) vol ( G , V ∖ P , x ) = ∑ v ∈ M ∖ P deg G ( v ) , the sum of the degrees of marked vertices in this cover. On an input with no collision, every marked vertex has zero marked neighbors. A marked vertex outside P P P must therefore contribute more than τ 2 \tau^2 τ 2 to the squared error, which gives ∣ M ∖ P ∣ ≤ r / τ 2 |M\setminus P|\leq r/\tau^2 ∣ M ∖ P ∣ ≤ r / τ 2 . If the maximum degree is at most d d d , the marked volume of this cover is at most d r / τ 2 dr/\tau^2 d r / τ 2 .
Thus the same error bound controls both edge sets: the counts inside P P P bound their marked volume, while inaccurate counts at marked vertices outside P P P limit the marked volume of the other cover. We apply the same volume test to both parts, using P P P as the cover inside and V ∖ P V\setminus P V ∖ P as the cover outside. The volume assumptions are needed for rejection on negative inputs; a test detects a collision in its edge set with high probability even if the stated volume bound fails. We can therefore analyze the estimation error on negative inputs and still detect collisions on positive inputs. Figure 1 illustrates the two marked volume bounds.
Figure 1. Thresholding the estimated marked neighbor counts partitions the edges. Inside P P P , small estimates and controlled error bound the marked volume of the blue graph. On a negative input, every marked vertex outside P P P has a large estimation error, so there are few such vertices. Their degrees are at most d d d , giving a small marked volume for the outside cover of the orange edges. Filled vertices are marked; dotted edges belong to the other part.
Estimating neighborhood counts. The main question is how to obtain the approximate counts with few queries. Take q q q independent uniform vertices w 1 , … , w q w_1,\ldots,w_q w 1 , … , w q , query their input bits, and form the estimates
y u = n q ∑ i = 1 q x w i 1 [ w i ∈ N G ( u ) ] . y_u = \frac{n}{q}\sum_{i=1}^{q} x_{w_i}\mathbf{1}\left[w_i \in N_G(u)\right]. y u = q n i = 1 ∑ q x w i 1 [ w i ∈ N G ( u ) ] .
Each estimate is unbiased, but its sampling error may be large. The true neighborhood counts all come from the same marked set M M M . We use this common structure by choosing a single set S ⊆ V S \subseteq V S ⊆ V minimizing
∑ u ( ℓ u ( S ) − y u ) 2 . \sum_u \left(\ell_u(S)-y_u\right)^2. u ∑ ( ℓ u ( S ) − y u ) 2 .
The crucial observation is that the true set M M M is an allowed choice, so the objective value at S S S is no larger than at M M M . We can use this inequality to compare the neighborhood counts of S S S and M M M , even though we do not know M M M .
To analyze this comparison, let c v w = ∣ N G ( v ) ∩ N G ( w ) ∣ c_{vw} = \lvert N_G(v) \cap N_G(w)\rvert c v w = ∣ N G ( v ) ∩ N G ( w )∣ be the number of common neighbors of v v v and w w w . Define z v = ∑ u ∈ N G ( v ) y u z_v = \sum_{u \in N_G(v)} y_u z v = ∑ u ∈ N G ( v ) y u , which estimates the number of walks of length two from v v v to marked vertices. A sampled marked vertex w i w_i w i contributes n / q n/q n / q to this sum once for each common neighbor of v v v and w i w_i w i , so
z v = n q ∑ i = 1 q c v w i x w i , E [ z v ] = ∑ w ∈ M c v w . z_v = \frac{n}{q}\sum_{i=1}^{q} c_{vw_i}x_{w_i}, \qquad\mathbb{E}[z_v] = \sum_{w \in M} c_{vw}. z v = q n i = 1 ∑ q c v w i x w i , E [ z v ] = w ∈ M ∑ c v w .
Counting in two ways gives ∑ u ℓ u ( S ) y u = ∑ v ∈ S z v \sum_u \ell_u(S)y_u = \sum_{v \in S} z_v ∑ u ℓ u ( S ) y u = ∑ v ∈ S z v . Expanding the least squares objective leaves ψ z ( S ) = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v \psi_z(S) = \sum_u \ell_u(S)^2 - 2\sum_{v \in S}z_v ψ z ( S ) = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v , together with a term ∑ u y u 2 \sum_u y_u^2 ∑ u y u 2 that is independent of S S S . Thus it suffices to compute the common neighbor estimates z v z_v z v and minimize ψ z \psi_z ψ z . All these computations use the known graph and the sampled input bits, so they require no further queries. Algorithm 1 gives the procedure.
Comparing ψ z ( S ) \psi_z(S) ψ z ( S ) with ψ z ( M ) \psi_z(M) ψ z ( M ) now bounds the squared estimation error by
r ≤ 2 ∑ v ∣ z v − E [ z v ] ∣ . r \le2\sum_v \left|z_v-\mathbb{E}[z_v]\right|. r ≤ 2 v ∑ ∣ z v − E [ z v ] ∣ .
This is the useful consequence of choosing all the estimated counts from one set: their total squared error is controlled by the sum of the absolute errors in the sampled common neighbor sums. The improved algorithm uses the same comparison.
The variance of z v z_v z v is at most ( n / q ) ∑ w ∈ M c v w 2 (n/q)\sum_{w\in M}c_{vw}^{2} ( n / q ) ∑ w ∈ M c v w 2 . Applying Cauchy–Schwarz to the comparison above yields
E [ r ] ≤ 2 n ∑ v Var ( z v ) ≤ 2 n q ( ∑ w ∈ M ∑ v c v w 2 ) 1 / 2 . \mathbb{E}[r]\le2\sqrt{n\sum_v\operatorname{Var}(z_v)}\le\frac{2n}{\sqrt{q}}\left(\sum_{w\in M}\sum_v c_{vw}^{2}\right)^{1/2}. E [ r ] ≤ 2 n v ∑ Var ( z v ) ≤ q 2 n ( w ∈ M ∑ v ∑ c v w 2 ) 1/2 .
For fixed v , w v,w v , w , the quantity c v w 2 c_{vw}^{2} c v w 2 counts ordered pairs of common neighbors, or equivalently closed walks w , a , v , b , w w,a,v,b,w w , a , v , b , w of length four. Only walks starting at marked vertices contribute, allowing us to use the reduction in marked volume obtained by sampling even if many edges remain.
Sampling and edge deletion. The squared common neighbor counts may be too large in an arbitrary graph. We therefore preprocess the graph before estimating the counts. A separate, earlier round of sampling reduces the marked volume; further edge deletions bound the degrees and the number of closed walks starting at marked vertices. Each deletion is accompanied by a search or collision test that detects a collision among the deleted edges with high probability. The algorithm returns as soon as a test finds one.
First, take Θ ( q log n ) \Theta(q\log n) Θ ( q log n ) uniform vertex samples and query their input bits. Search the union of the neighborhoods of the marked samples for a marked vertex. A successful search gives a collision. Otherwise, delete all edges incident to this union. Any vertex with more than n / q n/q n / q marked neighbors is likely to have one of those neighbors sampled, in which case the deletion isolates it. With high probability every remaining vertex has at most n / q n/q n / q marked neighbors. Summing these counts gives vol ( G , x ) ≤ n 2 / q \operatorname{vol}(G,x)\le n^2/q vol ( G , x ) ≤ n 2 / q . Algorithm 2 gives this sampling procedure.
Next, consider the vertices of degree greater than d d d . Each marked vertex among them contributes more than d d d to the marked volume, so there are at most n 2 / ( q d ) n^2/(qd) n 2 / ( q d ) such marked vertices. The test of Lemma 2.9 uses this count bound to check all their incident edges. If the test rejects, delete those edges. The remaining graph has maximum degree at most d d d , and its marked volume is still at most n 2 / q n^2/q n 2 / q . The degree bound has two uses: it converts the bound on ∣ M ∖ P ∣ |M\setminus P| ∣ M ∖ P ∣ into a marked volume bound, and it makes the neighborhoods in the next procedure small.
Finally, whenever an edge u v uv uv in the current graph has at least h h h edges between N G ( u ) N_G(u) N G ( u ) and N G ( v ) N_G(v) N G ( v ) , record and delete that edge set. Repeat until no such edge remains. There are at most n d / h nd/h n d / h recorded graphs, since their edge sets are disjoint and each contains at least h h h edges. We use Grover search over these graphs to find one containing a collision. Each graph has at most 2 d 2d 2 d vertices and can be tested using a standard quantum walk. Algorithm 3 gives the extraction and search procedure.
Figure 2 summarizes how extraction supports both collision testing and estimation.
Figure 2. When an edge u v uv uv has at least h h h edges between N ( u ) N(u) N ( u ) and N ( v ) N(v) N ( v ) , extract those edges, shown in orange. The upper branch tests the extracted graph for a collision; it has at most 2 d 2d 2 d vertices because the maximum degree is at most d d d . Repeating the extraction leaves the graph in the lower branch with fewer closed walks of length four starting at marked vertices. This controls the error in the neighborhood estimates.
To see why this deletion controls the required walks, fix the first directed edge w a wa w a of a closed walk w , a , v , b , w w,a,v,b,w w , a , v , b , w . The edge v b vb v b joins N G ( a ) N_G(a) N G ( a ) to N G ( w ) N_G(w) N G ( w ) , and choosing its orientation determines the whole walk. At termination there are fewer than h h h choices for this edge, with at most two possible orientations. There are vol ( G , x ) \operatorname{vol}(G,x) vol ( G , x ) choices of the first directed edge with a marked initial vertex. Hence the remaining graph satisfies
∑ u ∈ M ∑ v c v w 2 ≤ 2 h vol ( G , x ) . \sum_{u\in M}\sum_v c_{vw}^{2} \le2h\,\operatorname{vol}(G,x). u ∈ M ∑ v ∑ c v w 2 ≤ 2 h vol ( G , x ) .
A larger h h h reduces the number of recorded graphs but allows a larger estimation error. Taking fresh samples for estimation after preprocessing, and using vol ( G , x ) ≤ n 2 / q \operatorname{vol}(G,x) \le n^2/q vol ( G , x ) ≤ n 2 / q , gives E [ r ] = O ( n 2 h / q ) \mathbb{E}[r] = O(n^2\sqrt{h}/q) E [ r ] = O ( n 2 h / q ) . Markov’s inequality makes a sufficiently large constant multiple of this quantity a valid error bound with high constant probability.
Algorithm 4 combines these procedures in their execution order: sample and delete edges, test the high degree vertices, extract and test the graphs between neighborhoods, take fresh samples for estimation, and apply the threshold and the two final volume tests. A collision is either detected among the deleted edges or remains in one of the final edge sets. Balancing the sampling and preprocessing costs with the two final volume bounds gives query complexity O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) . Section 3 chooses the parameters after deriving these costs.
An improved algorithm
As in Algorithm 1, we estimate the common neighbor sums ∑ w ∈ M c v w \sum_{w\in M} c_{vw} ∑ w ∈ M c v w by z v z_v z v and choose a set S S S minimizing
ψ z ( S ) = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v . \psi_z(S) = \sum_u \ell_u(S)^2 - 2\sum_{v\in S} z_v. ψ z ( S ) = u ∑ ℓ u ( S ) 2 − 2 v ∈ S ∑ z v .
The resulting counts ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ \ell_u(S)=|N_G(u)\cap S| ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ approximate the actual marked neighbor counts. Thresholding these counts determines the set P P P , as in the first algorithm. The main refinement is to use a bound on the marked volume to restrict the sets S S S considered in the minimization. We first reduce the maximum degree, then use this stronger estimation argument to reduce the marked volume repeatedly.
Degree reduction. Choose a degree bound d d d , and let H H H contain all vertices whose current degree exceeds d d d . For intuition, suppose we know k = ∣ M ∩ H ∣ k = |M \cap H| k = ∣ M ∩ H ∣ . When k > ( n / d ) 3 / 2 k > (n/d)^{3/2} k > ( n / d ) 3/2 , take Θ ( ( n / d ) log n ) \Theta((n/d)\log n) Θ (( n / d ) log n ) uniform samples from the marked vertices in H H H and search the union of their neighborhoods for a marked vertex. A successful search gives a collision. Otherwise, delete all edges incident to this union. This is the search and deletion used in Algorithm 2, now sampling from the marked vertices in H H H .
A vertex with many marked neighbors in H H H is likely to have one of them sampled, so the deletion isolates it. With high probability, every remaining vertex has at most k d / ( 2 n ) kd/(2n) k d / ( 2 n ) marked neighbors in the old set H H H . Counting in two ways bounds the sum of the remaining degrees of these marked vertices by k d / 2 kd/2 k d /2 . Hence at most k / 2 k/2 k /2 marked vertices still have degree greater than d d d . We update H H H and repeat.
After logarithmically many repetitions, H H H contains at most ( n / d ) 3 / 2 (n/d)^{3/2} ( n / d ) 3/2 marked vertices. Although H H H itself may be large, this bound lets us use Lemma 2.9 to test all edges with at least one endpoint in H H H . If no collision is found, we delete all these edges. The remaining graph has maximum degree at most d d d . Algorithm 6 gives this degree reduction procedure, with total query cost O ~ ( n 3 / 4 / d 1 / 4 ) \widetilde{O}(n^{3/4}/d^{1/4}) O ( n 3/4 / d 1/4 ) .
Repeated volume reduction. The degree bound gives marked volume at most n d nd n d . Let ℓ \ell ℓ be its current upper bound. In the first algorithm, thresholding is followed by collision tests on both the edges inside P P P and the edges outside it. Here, we test the edges outside P P P and continue reducing the graph inside P P P . Our target in each round is only to halve the marked volume.
For a general graph, we apply this argument to bipartite subgraphs separately. In each one, P P P consists of vertices with small estimated marked neighbor counts. The same thresholding argument as in the first algorithm bounds the marked volume retained inside P P P and that of the outside cover used to test the discarded edges. We choose the parameters so that, on a negative input, the total retained volume is at most ℓ / 2 \ell/2 ℓ /2 . We combine the retained edges and repeat until the volume is small enough for the final collision test. Algorithm 10 gives this iteration.
Estimating neighborhood counts. To see how the current volume bound helps, suppose for a moment that every vertex has degree d d d . Then ∣ M ∣ ≤ ℓ / d |M| \le\ell/d ∣ M ∣ ≤ ℓ / d , so we minimize ψ z ( S ) \psi_z(S) ψ z ( S ) subject to ∣ S ∣ ≤ ℓ / d |S| \le\ell/d ∣ S ∣ ≤ ℓ / d . The true marked set remains an allowed choice. If every common neighbor sum is estimated within error η \eta η , the comparison ψ z ( S ) ≤ ψ z ( M ) \psi_z(S) \le\psi_z(M) ψ z ( S ) ≤ ψ z ( M ) gives total squared error at most 4 η ℓ / d 4\eta\ell/d 4 η ℓ / d . Only vertices in S S S or M M M contribute to this comparison, and both sets have size at most ℓ / d \ell/d ℓ / d . A smaller volume bound therefore limits how many estimation errors can contribute.
For a general graph, we use a result of Chlamtáč, Dinitz and Robinson [13 ] to partition its edges into a polylogarithmic number of bipartite subgraphs with approximately uniform degrees on each side. Lower bounds on the degrees now give bounds on the number of marked vertices on each side. We impose these bounds in the minimization and choose a separate threshold for each side. The partition uses only the known graph and requires no queries.
Algorithm 1 forms its estimates from uniform vertex samples. Here, we sample marked vertices on the appropriate side and average their common neighbor counts, scaled by the estimated number of marked vertices. The same samples give estimates for every vertex, since the graph is known. When the sums ∑ v ∈ M c u v 2 \sum_{v\in M} c_{uv}^{2} ∑ v ∈ M c uv 2 are small for every u u u , a variance bound shows that few samples give accurate estimates.
To handle large common neighbor counts, we extend the extraction procedure of Algorithm 3. That procedure extracts edges between two neighborhoods. Here, we use a neighborhood N G ( u ) N_G(u) N G ( u ) and a set R R R of vertices on the same side as u u u . The number of edges between them is ∑ v ∈ R c u v \sum_{v\in R} c_{uv} ∑ v ∈ R c uv , so large common neighbor counts identify graphs that we can test separately. We select such sets R R R , test their edges using quantum walks, and delete them. This makes the remaining sums easier to estimate while checking the discarded edges for collisions. Algorithms 7 and 8 give these procedures.
The parameter analysis in § 5 balances the degree reduction with the repeated volume reduction. Choosing d = Θ ( n 7 / 17 ) d = \Theta(n^{7/17}) d = Θ ( n 7/17 ) gives the query bound O ~ ( n 11 / 17 ) \widetilde{O}(n^{11/17}) O ( n 11/17 ) .
Functions with positive certificates of size two
Section 5 shows that graph collision also captures the task of evaluating a (partial) function when every positive input has a certificate of size (at most) two. The idea is to represent possible input assignments by vertices and positive certificates by edges.
Suppose the input has n n n symbols from an alphabet of size q q q . Create a vertex ( i , a ) (i,a) ( i , a ) for each position i i i and alphabet symbol a a a , and mark it exactly when x i = a x_i = a x i = a . There are n q nq n q vertices, with exactly one marked vertex for each input position. Whenever x i = a x_i = a x i = a and x j = b x_j = b x j = b form a positive certificate, add an edge between ( i , a ) (i,a) ( i , a ) and ( j , b ) (j,b) ( j , b ) . Its endpoints are both marked exactly when the input satisfies that certificate. It follows that the constructed graph has a marked edge if and only if the original input is positive.
A query at vertex ( i , a ) (i,a) ( i , a ) only asks whether x i = a x_i = a x i = a , so it can be simulated with a constant number of queries to the original input. Applying the graph collision algorithm therefore gives a query bound of O ~ ( ( n q ) 11 / 17 ) \widetilde{O}((nq)^{11/17}) O (( n q ) 11/17 ) . The dependence on the alphabet comes from the increase in graph size. For constant alphabets the bound is O ~ ( n 11 / 17 ) \widetilde{O}(n^{11/17}) O ( n 11/17 ) , and for q = n o ( 1 ) q = n^{o(1)} q = n o ( 1 ) it is n 11 / 17 + o ( 1 ) n^{11/17+o(1)} n 11/17 + o ( 1 ) . More generally, the complexity remains o ( n 2 / 3 ) o(n^{2/3}) o ( n 2/3 ) whenever q = O ( n 1 / 33 − ε ) q = O(n^{1/33-\varepsilon}) q = O ( n 1/33 − ε ) for a fixed ε > 0 \varepsilon> 0 ε > 0 .
For binary inputs, the graph has 2 n 2n 2 n vertices and each vertex query uses one input query. Conversely, every graph collision problem has positive certificates of size at most two. Thus graph collision is as hard as any Boolean function on binary inputs with positive certificate complexity at most two, up to a constant factor in the input size (Corollary 5.4).
A lower bound breaking the Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) barrier
Section 6 proves an Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) lower bound. For a prime power q q q , let G q G_q G q be the bipartite graph with one vertex for each point of F q 2 \mathbb{F}_q^2 F q 2 and one vertex for each nonvertical line. A line with slope s s s and intercept t t t consists of the points ( u , v ) (u,v) ( u , v ) satisfying v = s u + t v = su + t v = s u + t in F q \mathbb{F}_q F q . A point vertex and a line vertex are adjacent when this equality holds. Thus there are q 2 q^2 q 2 vertices on each side, every vertex has degree q q q , and the graph has q 3 q^3 q 3 edges. The geometric property we use is that two distinct points lie on at most one common line, and two distinct lines meet in at most one point.
We compare inputs with many marked points and lines but no collision to inputs with exactly one marked edge. In our construction, a positive input is obtained from a negative input by changing bits only at one line and its incident points.
Choosing the inputs. A negative input is sampled in two stages:
Mark each line independently with probability r r r .
Mark each point lying on no marked line independently with probability p p p . Leave every other point unmarked.
Call a point uncovered if it lies on no marked line. The sampling rule prevents every collision, since a marked line forces all its incident points to be unmarked. Each point is uncovered with probability ( 1 − r ) q (1-r)^q ( 1 − r ) q , so its probability of being marked is p ( 1 − r ) q p(1-r)^q p ( 1 − r ) q .
We want many marked vertices on both sides. Marking more lines, however, leaves fewer uncovered points. We compensate by increasing p p p , choosing p ( 1 − r ) q − 1 = r p(1-r)^{q-1}=r p ( 1 − r ) q − 1 = r . Then a point is marked with probability r ( 1 − r ) r(1-r) r ( 1 − r ) , almost the same as the line probability r r r . We take r r r of order ln q / q \ln q/q ln q / q , with a sufficiently small constant factor. Each side then has order q log q q\log q q log q marked vertices in expectation, while p p p still tends to zero. This is the largest possible order of r r r under the balancing condition: if r r r grew asymptotically faster than ln q / q \ln q/q ln q / q , the probability of being uncovered would be too small to compensate with any p ≤ 1 p\le1 p ≤ 1 .
To sample a positive input:
Choose a point a a a uniformly at random, then choose a line ℓ \ell ℓ through a a a uniformly at random. This chooses an edge a ℓ a\ell a ℓ uniformly at random.
Sample a negative input conditioned on a a a being marked.
Mark ℓ \ell ℓ and unmark every point on ℓ \ell ℓ other than a a a .
All lines through a a a were initially unmarked, so the resulting input has exactly one marked edge, namely a ℓ a\ell a ℓ . We call the last step planting the edge a ℓ a\ell a ℓ . Once the edge and negative input are fixed, this operation determines a unique positive input, although different negative inputs can produce the same positive input. Each fixed edge defines its own positive distribution. These distributions have disjoint supports because the unique marked edge identifies the chosen edge. Figure 3 illustrates the transformation.
Figure 3. The hard input distributions, illustrated on G 3 G_3 G 3 . On the left, lines are marked independently, and only uncovered points may be marked. Condition on a a a being marked. On the right, marking ℓ \ell ℓ and unmarking its other points creates the unique marked edge a ℓ a\ell a ℓ , shown in orange. Blue vertices are marked, gray vertices are forced to zero, and white vertices are sampled as zero. Orange rings identify exactly the input bits that change between the panels.
Adversary matrix construction. The general adversary bound allows a real matrix Γ \Gamma Γ whose rows are positive inputs and whose columns are negative inputs, and gives
Q 2 ( gc G q ) = Ω ( ∥ Γ ∥ max v ∥ Γ ∘ Δ v ∥ ) . Q_2(\operatorname{gc}_{G_q}) = \Omega\left(\frac{\lVert\Gamma\rVert}{\max_v \lVert\Gamma\circ\Delta_v\rVert}\right). Q 2 ( gc G q ) = Ω ( max v ∥ Γ ∘ Δ v ∥ ∥ Γ ∥ ) .
Here Γ ∘ Δ v \Gamma\circ\Delta_v Γ ∘ Δ v retains an entry only when its two inputs differ at the queried vertex v v v . We first construct a matrix B B B with the same row and column sets. For a positive input y y y whose unique marked edge is a ℓ a\ell a ℓ , the entry B y , x B_{y,x} B y , x is nonzero exactly when x a = 1 x_a=1 x a = 1 and planting a ℓ a\ell a ℓ in x x x produces y y y . Thus, each row collects the negative inputs that could have produced its positive input by planting.
Let μ − ( x ) \mu^-(x) μ − ( x ) be the probability of x x x under the negative distribution, and let μ a ℓ ( y ) \mu^{a\ell}(y) μ a ℓ ( y ) be the probability of y y y under the positive distribution for the fixed edge a ℓ a\ell a ℓ . Write plant a ℓ ( x ) \operatorname{plant}_{a\ell}(x) plant a ℓ ( x ) for the operation that marks ℓ \ell ℓ and unmarks its other points. Define
B y , x = { μ − ( x ) r ( 1 − r ) μ a ℓ ( y ) , x a = 1 and y = plant a ℓ ( x ) , 0 , otherwise. B_{y,x} =
\begin{cases}
\sqrt{\dfrac{\mu^-(x)}{r(1-r)\mu^{a\ell}(y)}}, & x_a=1\text{ and }y=\operatorname{plant}_{a\ell}(x),\\
0, & \text{otherwise.}
\end{cases} B y , x = ⎩ ⎨ ⎧ r ( 1 − r ) μ a ℓ ( y ) μ − ( x ) , 0 , x a = 1 and y = plant a ℓ ( x ) , otherwise.
The weights account for the probabilities of the inputs. Since a point is marked with probability r ( 1 − r ) r(1-r) r ( 1 − r ) and the positive distribution is obtained by conditioning on x a = 1 x_a=1 x a = 1 and then planting, we have
∑ x : x a = 1 plant a ℓ ( x ) = y μ − ( x ) = r ( 1 − r ) μ a ℓ ( y ) . \sum_{\substack{x:x_a=1\\\operatorname{plant}_{a\ell}(x)=y}}\mu^-(x)=r(1-r)\mu^{a\ell}(y). x : x a = 1 plant a ℓ ( x ) = y ∑ μ − ( x ) = r ( 1 − r ) μ a ℓ ( y ) .
Consequently, applying B B B to the unit vector ( μ − ( x ) ) x (\sqrt{\mu^-(x)})_x ( μ − ( x ) ) x gives, in the rows for each fixed edge a ℓ a\ell a ℓ , the vector r ( 1 − r ) ( μ a ℓ ( y ) ) y \sqrt{r(1-r)}(\sqrt{\mu^{a\ell}(y)})_y r ( 1 − r ) ( μ a ℓ ( y ) ) y . Its squared norm is r ( 1 − r ) r(1-r) r ( 1 − r ) , since ∑ y μ a ℓ ( y ) = 1 \sum_y\mu^{a\ell}(y)=1 ∑ y μ a ℓ ( y ) = 1 . There are q 3 q^3 q 3 disjoint groups of rows, so their squared norms add, giving
∥ B ∥ ≥ q 3 r ( 1 − r ) = Ω ( q log q ) . \lVert B\rVert\ge\sqrt{q^3r(1-r)}=\Omega(q\sqrt{\log q}). ∥ B ∥ ≥ q 3 r ( 1 − r ) = Ω ( q log q ) .
Thus, combining the possible planted edges gives the desired numerator. The difficulty is to preserve this gain while bounding what remains of the matrix after restricting to inputs that differ at one queried vertex.
The additive correction. For a fixed planted edge a ℓ a\ell a ℓ , a query outside ℓ \ell ℓ and its incident points sees the same bit before and after planting. The corresponding entries of B B B are therefore removed by the restriction for that query. A query to ℓ \ell ℓ is different: planting always changes its bit from zero to one. For a fixed queried line ℓ \ell ℓ , the restriction retains contributions from all q q q possible planted points on ℓ \ell ℓ . The matrix B B B alone does not give the required denominator bound. We add a matrix C C C to cancel a contribution shared by these choices, using the signed entries allowed by the general adversary bound.
To see what should be cancelled, consider the part of the calculation involving only line bits. Before planting, every line through a a a other than ℓ \ell ℓ must be unmarked. This condition is expressed by ∏ h ≠ ℓ ( 1 − x h ) \prod_{h\ne\ell}(1-x_h) ∏ h = ℓ ( 1 − x h ) . Write each factor as ( 1 − r ) − ( x h − r ) (1-r)-(x_h-r) ( 1 − r ) − ( x h − r ) , where x h − r x_h-r x h − r is the difference between the line bit and its mean. Expanding the product separates the constant term ( 1 − r ) q − 1 (1-r)^{q-1} ( 1 − r ) q − 1 from terms containing one or more of these differences.
The constant term is the same for every possible planted point on ℓ \ell ℓ . It contains no additional line that could help identify which point was chosen. In the calculation for a query to ℓ \ell ℓ , the matrix C C C cancels the contribution from this constant term. The relation p ( 1 − r ) q − 1 = r p(1-r)^{q-1}=r p ( 1 − r ) q − 1 = r ensures that the two coefficients have the same magnitude.
After this cancellation, each remaining contribution in this restricted case contains a factor x h − r x_h-r x h − r for some additional line h ≠ ℓ h\ne\ell h = ℓ through a a a . Once ℓ \ell ℓ and h h h are fixed, the planted point must be their intersection. Thus each such line can account for at most one choice of a a a . The number of possible planted points is now bounded by the number of line factors available in the term. The corresponding counting step for a point query uses the other geometric property: a queried point and a distinct planted point determine at most one possible planted line.
The multiplicative correction. The remaining difficulty is that a term can involve many points and lines, giving many choices in these counts. The full proof organizes the expressions in a basis whose elements are products associated with sets of points and lines, extending the line expansion above. We use a diagonal matrix D D D to give smaller weights to basis elements involving more vertices. This compensates for the growth in the counting bound. A query can introduce or remove factors, so the weights decrease gradually to control the additional contribution caused by these changes.
The unit vector used for the numerator corresponds to the constant basis function, which contains no factors. We choose C C C to map this vector to zero and D D D to leave it unchanged. Consequently, adding C C C and applying D D D preserve the image used to prove the numerator bound. The additive correction removes the contribution shared by many planted edges, while the multiplicative correction limits the contributions involving many vertices.
For the resulting adversary matrix, these estimates give
max v ∥ Γ ∘ Δ v ∥ ∥ Γ ∥ = O ( 1 q log q ) . \max_v \frac{\lVert\Gamma\circ\Delta_v\rVert}{\lVert\Gamma\rVert}=O\left(\frac{1}{q\sqrt{\log q}}\right). v max ∥ Γ ∥ ∥ Γ ∘ Δ v ∥ = O ( q log q 1 ) .
The adversary bound therefore yields Ω ( q log q ) \Omega(q\sqrt{\log q}) Ω ( q log q ) queries, or Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) since n = 2 q 2 n=2q^2 n = 2 q 2 .
Organization
Section 2 gives the notation and standard quantum tools. Section 3 gives the first O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) algorithm using one round of estimation and vertex selection. Section 4 refines these steps to prove Theorem 1.1 . Section 5 gives the extension to positive certificates of size two over general alphabets. Section 6 proves the Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) lower bound. Appendix A proves the quantum procedure lemmas. Appendices B and C give the collision tests and the construction of the edge partition.
Preliminaries
Graph collision. All graphs are simple and undirected. For an input x x x , let M = { v : x v = 1 } M=\{v:x_v=1\} M = { v : x v = 1 } be the set of marked vertices. Write N G ( v ) N_G(v) N G ( v ) for the neighbors of v v v and N G ( S ) = ⋃ v ∈ S N G ( v ) N_G(S)=\bigcup_{v\in S}N_G(v) N G ( S ) = ⋃ v ∈ S N G ( v ) . An input is positive if it has a marked edge, and negative otherwise. On a negative input, M M M is an independent set: no edge joins two vertices of M M M . Edge deletions retain the vertex labels and their input bits.
We write Q 2 ( f ) Q_2(f) Q 2 ( f ) for the quantum query complexity of f f f with error at most 1 / 3 1/3 1/3 on every input. Logarithms are base two, and O ~ \widetilde{O} O , Ω ~ \widetilde{\Omega} Ω , and Θ ~ \widetilde{\Theta} Θ suppress factors polynomial in log n \log n log n .
Definition 2.1 (Marked volume). For S ⊆ V ( G ) S\subseteq V(G) S ⊆ V ( G ) , define
vol ( G , S , x ) = ∑ v ∈ S ∩ M deg G ( v ) , vol ( G , x ) = vol ( G , V ( G ) , x ) . \operatorname{vol}(G,S,x)=\sum_{v\in S\cap M}\deg_G(v),\qquad\operatorname{vol}(G,x)=\operatorname{vol}(G,V(G),x). vol ( G , S , x ) = v ∈ S ∩ M ∑ deg G ( v ) , vol ( G , x ) = vol ( G , V ( G ) , x ) .
This counts incidences between edges and marked vertices in S S S . An edge contributes once for each endpoint in S ∩ M S \cap M S ∩ M .
Lemma 2.2 (Counting marked volume). For every S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) ,
vol ( G , S , x ) = ∑ u ∈ V ( G ) ∣ N G ( u ) ∩ S ∩ M ∣ . \operatorname{vol}(G,S,x)=\sum_{u\in V(G)}\lvert N_G(u)\cap S\cap M\rvert. vol ( G , S , x ) = u ∈ V ( G ) ∑ ∣ N G ( u ) ∩ S ∩ M ∣ . If the edge sets of G 1 , … , G t G_1,\ldots,G_t G 1 , … , G t partition E ( G ) E(G) E ( G ) , then vol ( G , S , x ) = ∑ i = 1 t vol ( G i , S , x ) \operatorname{vol}(G,S,x)=\sum_{i=1}^{t}\operatorname{vol}(G_i,S,x) vol ( G , S , x ) = ∑ i = 1 t vol ( G i , S , x ) , retaining the same vertex labels.
Proof. Both identities count each edge once for each endpoint in S ∩ M S \cap M S ∩ M .
Lemma 2.3 (Bipartite reduction). Graph collision on a known graph with n n n vertices reduces to graph collision on a known bipartite graph with 2 n 2n 2 n labels, with one original query per query to the copied input.
Proof. Replace each vertex v v v by v 0 , v 1 v_0,v_1 v 0 , v 1 , both marked by x v x_v x v , and each edge u v uv uv by u 0 v 1 u_0v_1 u 0 v 1 and v 0 u 1 v_0u_1 v 0 u 1 . A marked edge exists in the new graph exactly when it exists in the original graph.
We use the bipartite reduction in the improved algorithm; the first algorithm applies directly to the input graph.
Standard quantum procedures. Grover search on a known set of a a a labels uses O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) queries. We also use the following consequences of quantum counting, amplitude amplification, variable-time search, and quantum walks.
Lemma 2.4 (Counting and marked samples [9 , 24 ] ). Let a known set of a a a labels contain r r r marked vertices. With O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) queries, quantum counting returns an integer r ^ ∈ [ 0 , a ] \hat r\in[0,a] r ^ ∈ [ 0 , a ] that, except with the assigned error probability, is zero exactly when r = 0 r=0 r = 0 and otherwise satisfies
r / 2 ≤ r ^ ≤ 2 r , ∣ r ^ − r ∣ = O ( r ) . r/2\leq\hat r\leq2r,\qquad\lvert\hat r-r\rvert=O(\sqrt{r}). r /2 ≤ r ^ ≤ 2 r , ∣ r ^ − r ∣ = O ( r ) . Given r ^ > 0 \hat r>0 r ^ > 0 , a batch of s s s independent uniform marked samples uses a fixed query limit O ~ ( ( s + 1 ) a / r ^ ) \widetilde{O}((s+1)\sqrt{a/\hat r}) O (( s + 1 ) a / r ^ ) , reporting failure if insufficient samples are obtained. On a good estimate, sampling succeeds except with the assigned error probability, and the uniform state over marked labels can be prepared to inverse polynomial precision in O ~ ( a / r ^ ) \widetilde{O}(\sqrt{a/\hat r}) O ( a / r ^ ) queries.
Lemma 2.5 (Combining tests [4 ] ). Suppose polynomially many tests have known polynomially bounded query limits q i q_i q i . Each accepts every positive input for its own edge list and rejects negative inputs satisfying its stated bound. If all these bounds hold on a global negative input, their OR can be tested in O ~ ( ∑ i q i 2 ) \widetilde{O}\left(\sqrt{\sum_i q_i^2}\right) O ( ∑ i q i 2 ) queries, accepting every positive global input.
Lemma 2.6 (Quantum walk search [MNRS11]). Consider a reversible ergodic Markov chain with spectral gap at least δ \delta δ . Suppose the set of accepting states has stationary probability at least η \eta η whenever it is nonempty. Let S S S , U U U , and C C C denote the coherent setup, update, and checking query costs, respectively. Quantum walk search decides whether an accepting state exists using
O ~ ( S + 1 η ( U δ + C ) ) \widetilde{O}\left(S+\frac{1}{\sqrt{\eta}}\left(\frac{U}{\sqrt{\delta}}+C\right)\right) O ( S + η 1 ( δ U + C ) ) queries.
Proofs and implementation details for Lemmas 2.4 and 2.5 appear in Appendix § 12 . Unless stated otherwise, samples are independent draws with replacement, sample sizes are rounded upward, and error probabilities are inverse polynomial in n n n . We write ϵ \epsilon ϵ for the error probability assigned to a subroutine. Each sampling call uses its stated query limit; if sampling fails or a subroutine returns Yes, the calling routine returns Yes.
Collision tests. The following tests have fixed query limits, and their guarantees hold with the assigned error probability. Their constructions and proofs appear in Appendix § 13 .
Lemma 2.7 (A cover of small marked volume). Let U U U be a known vertex cover of G G G . The procedure cover_test( G , U , b ) (G,U,b) ( G , U , b ) uses O ~ ( ∣ U ∣ + b ) \widetilde{O}(\sqrt{|U|}+\sqrt{b}) O ( ∣ U ∣ + b ) queries. It accepts every positive input and rejects negative inputs satisfying vol ( G , U , x ) ≤ b \operatorname{vol}(G,U,x)\le b vol ( G , U , x ) ≤ b .
Lemma 2.8 (Bipartite collision test). Let G G G be bipartite with sides A , B A,B A , B of sizes a , b a,b a , b . The procedure bipartite_test( G , A , B , k ) (G,A,B,k) ( G , A , B , k ) accepts every positive input and rejects negative inputs satisfying ∣ M ∩ B ∣ ≤ k |M\cap B|\le k ∣ M ∩ B ∣ ≤ k , with query complexity
O ~ ( a + b + ( a 2 b k ) 1 / 6 ) . (2) \widetilde{O}\left(\sqrt{a}+\sqrt{b}+(a^{2}bk)^{1/6}\right). \tag*{(2)} O ( a + b + ( a 2 bk ) 1/6 ) . (2)
Lemma 2.9 (Few marked vertices in a cover). Let G G G have at most n n n vertices and let U U U be a known vertex cover. There is a test using O ~ ( n ( 1 + k ) ) \widetilde{O}\left(\sqrt{n(1+k)}\right) O ( n ( 1 + k ) ) queries that accepts every positive input and rejects negative inputs satisfying ∣ M ∩ U ∣ ≤ k |M\cap U|\le k ∣ M ∩ U ∣ ≤ k .
The volume test applies to the whole graph with U = V ( G ) U=V(G) U = V ( G ) . For edges discarded by restricting to a vertex set, the vertices outside that set form a cover.
Adversary bound. We use the general adversary bound, which allows negative matrix entries. All matrix norms below are operator norms, and ∘ \circ ∘ denotes entrywise multiplication.
Lemma 2.10 (General adversary bound [17 ] ). Let f : D → { 0 , 1 } f:D\to\{0,1\} f : D → { 0 , 1 } , where D ⊆ { 0 , 1 } k D\subseteq\{0,1\}^{k} D ⊆ { 0 , 1 } k , and let X ⊆ f − 1 ( 0 ) X\subseteq f^{-1}(0) X ⊆ f − 1 ( 0 ) and Y ⊆ f − 1 ( 1 ) Y\subseteq f^{-1}(1) Y ⊆ f − 1 ( 1 ) . For v ∈ [ k ] v\in[k] v ∈ [ k ] , let Δ v ( y , x ) = 1 [ y v ≠ x v ] \Delta_v(y,x)=1[y_v\ne x_v] Δ v ( y , x ) = 1 [ y v = x v ] . For every nonzero matrix Γ \Gamma Γ with rows indexed by Y Y Y and columns indexed by X X X , computing f f f with error at most 1 / 3 1/3 1/3 requires
Ω ( ∥ Γ ∥ max v ∥ Γ ∘ Δ v ∥ ) \Omega\left(\frac{\lVert\Gamma\rVert}{\max_v\lVert\Gamma\circ\Delta_v\rVert}\right) Ω ( max v ∥ Γ ∘ Δ v ∥ ∥ Γ ∥ ) queries.
Proof. Apply the general adversary bound to the Hermitian matrix ( 0 Γ ∗ Γ 0 ) \begin{pmatrix}0&\Gamma^{*}\\\Gamma&0\end{pmatrix} ( 0 Γ Γ ∗ 0 ) , extended by zeros to the remaining inputs. Its norm is ∥ Γ ∥ \lVert\Gamma\rVert ∥ Γ ∥ , and its disagreement matrix at v v v has norm ∥ Γ ∘ Δ v ∥ \lVert\Gamma\circ\Delta_v\rVert ∥ Γ ∘ Δ v ∥ . □ \square □
An algorithm breaking the O ( n 2 / 3 ) O(n^{2/3}) O ( n 2/3 ) barrier
Let G = ( V , E ) G=(V,E) G = ( V , E ) be a known graph on n n n vertices, with input x ∈ { 0 , 1 } V x\in\{0,1\}^{V} x ∈ { 0 , 1 } V . In this section, we give a quantum algorithm for graph collision with query complexity exponent strictly less than 2 / 3 2/3 2/3 .
Theorem 3.1. There is a quantum algorithm that solves the graph collision problem on any n n n -vertex graph with high probability using O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) queries.
The algorithm uses estimates of the number of marked neighbors of each vertex. We first show how a bound on their error allows us to apply the collision tests from the preliminaries. We then construct the estimates from a random sample of input bits and describe the preprocessing needed to obtain a sufficiently small error. The algorithm first preprocesses the graph, then estimates the neighborhood counts, applies the threshold, and performs the two final collision tests. Algorithm 4 gives the complete procedure at the end of the section, followed by its query analysis.
Part 1: Thresholding the neighborhood counts. For S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , let ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ \ell_u(S)=|N_G(u)\cap S| ℓ u ( S ) = ∣ N G ( u ) ∩ S ∣ . Thus ℓ u ( M ) \ell_u(M) ℓ u ( M ) is the number of marked neighbors of u u u . If these numbers were known exactly, we could search for a marked vertex u u u with ℓ u ( M ) > 0 \ell_u(M)>0 ℓ u ( M ) > 0 using O ( n ) O(\sqrt{n}) O ( n ) queries. Such a vertex exists exactly when there is a collision.
Learning every count exactly is too expensive. Instead, we will find a set S S S whose counts ℓ u ( S ) \ell_u(S) ℓ u ( S ) approximate ℓ u ( M ) \ell_u(M) ℓ u ( M ) , with small total squared error. The set S S S need not resemble M M M : only their neighborhood counts matter. Choose a threshold τ > 0 \tau>0 τ > 0 and let P = { u : ℓ u ( S ) ≤ τ } P=\{u:\ell_u(S)\leq\tau\} P = { u : ℓ u ( S ) ≤ τ } .
Inside P P P , the estimated counts ℓ u ( S ) \ell_u(S) ℓ u ( S ) are at most τ \tau τ , so their sum is at most n τ n\tau n τ . The estimation error bounds the difference from the sum of the actual marked neighbor counts, giving a bound on the marked volume of G [ P ] G[P] G [ P ] . On a negative input, a marked vertex has no marked neighbors. Each marked vertex outside P P P therefore contributes more than τ 2 \tau^2 τ 2 to the total squared error. An error bound thus limits how many such vertices there can be.
Figure 1 summarizes why thresholding makes both parts easy to test.
Lemma 3.2 (Thresholding). Let S ⊆ V ( G ) S\subseteq V(G) S ⊆ V ( G ) , let r = ∑ u ( ℓ u ( S ) − ℓ u ( M ) ) 2 r=\sum_u(\ell_u(S)-\ell_u(M))^2 r = ∑ u ( ℓ u ( S ) − ℓ u ( M ) ) 2 , and let P = { u : ℓ u ( S ) ≤ τ } P=\{u:\ell_u(S)\leq\tau\} P = { u : ℓ u ( S ) ≤ τ } for τ > 0 \tau>0 τ > 0 . Then
vol ( G [ P ] , x ) ≤ n τ + n r . \operatorname{vol}(G[P],x)\leq n\tau+\sqrt{nr}. vol ( G [ P ] , x ) ≤ n τ + n r . On a negative input, ∣ M ∖ P ∣ ≤ r / τ 2 |M\setminus P|\leq r/\tau^2 ∣ M ∖ P ∣ ≤ r / τ 2 . If the input is negative and the maximum degree is at most d d d , the edges outside G [ P ] G[P] G [ P ] have cover V ( G ) ∖ P V(G)\setminus P V ( G ) ∖ P of marked volume at most d r / τ 2 dr/\tau^2 d r / τ 2 .
Proof. We first bound the marked volume inside P P P . Count each incidence between an edge of G [ P ] G[P] G [ P ] and a marked vertex from the other endpoint of that edge. This gives
vol ( G [ P ] , x ) = ∑ u ∈ P ∣ N G ( u ) ∩ M ∩ P ∣ ≤ ∑ u ∈ P ℓ u ( M ) . \operatorname{vol}(G[P],x)=\sum_{u\in P}|N_G(u)\cap M\cap P|\leq\sum_{u\in P}\ell_u(M). vol ( G [ P ] , x ) = u ∈ P ∑ ∣ N G ( u ) ∩ M ∩ P ∣ ≤ u ∈ P ∑ ℓ u ( M ) .
For every u ∈ P u\in P u ∈ P , the estimated count ℓ u ( S ) \ell_u(S) ℓ u ( S ) is at most τ \tau τ . Separating these estimates from their errors, we obtain
∑ u ∈ P ℓ u ( M ) ≤ ∣ P ∣ τ + ∑ u ∈ P ∣ ℓ u ( M ) − ℓ u ( S ) ∣ ≤ n τ + n r . \sum_{u\in P}\ell_u(M)\leq|P|\tau+\sum_{u\in P}|\ell_u(M)-\ell_u(S)|\leq n\tau+\sqrt{nr}. u ∈ P ∑ ℓ u ( M ) ≤ ∣ P ∣ τ + u ∈ P ∑ ∣ ℓ u ( M ) − ℓ u ( S ) ∣ ≤ n τ + n r .
The last inequality follows from Cauchy–Schwarz: the sum of the absolute errors over P P P is at most ∣ P ∣ \sqrt{|P|} ∣ P ∣ times the square root of their sum of squares, which is at most r \sqrt r r .
Now suppose the input is negative. Every marked vertex u u u has ℓ u ( M ) = 0 \ell_u(M)=0 ℓ u ( M ) = 0 , whereas u ∉ P u\notin P u ∈ / P implies ℓ u ( S ) > τ \ell_u(S)>\tau ℓ u ( S ) > τ . Each vertex in M ∖ P M\setminus P M ∖ P therefore contributes more than τ 2 \tau^2 τ 2 to r r r , giving ∣ M ∖ P ∣ ≤ r / τ 2 |M\setminus P|\leq r/\tau^2 ∣ M ∖ P ∣ ≤ r / τ 2 . Every edge outside G [ P ] G[P] G [ P ] has an endpoint in V ( G ) ∖ P V(G)\setminus P V ( G ) ∖ P , so this set is a vertex cover of those edges. If the maximum degree is at most d d d , each marked vertex in this cover contributes at most d d d to its marked volume. The volume is therefore at most d ∣ M ∖ P ∣ ≤ d r / τ 2 d|M\setminus P|\leq dr/\tau^2 d ∣ M ∖ P ∣ ≤ d r / τ 2 . □ \square □
Lemma 2.7 converts these volume bounds into query bounds for testing the two edge sets. The volume bounds are needed for rejection on negative inputs; a test accepts whenever its edges contain a collision, even if the supplied bound fails.
Part 2: Estimating the neighborhood counts. Take q q q independent uniform vertices w 1 , … , w q w_1,\ldots,w_q w 1 , … , w q and query their input bits. The natural estimate of the marked neighbor count at u u u is
y u = n q ∑ i = 1 q x w i 1 [ w i ∈ N G ( u ) ] . y_u=\frac{n}{q}\sum_{i=1}^{q}x_{w_i}\mathbf{1}[w_i\in N_G(u)]. y u = q n i = 1 ∑ q x w i 1 [ w i ∈ N G ( u )] .
This estimate is unbiased: E [ y u ] = ℓ u ( M ) \mathbb{E}[y_u]=\ell_u(M) E [ y u ] = ℓ u ( M ) . However, the individual estimates may be noisy. The true counts have additional structure: they all arise from the same set M M M of marked vertices. We use this structure by requiring our estimates to be the neighborhood counts of a single set S S S . We choose S S S to minimize ∑ u ( ℓ u ( S ) − y u ) 2 \sum_u(\ell_u(S)-y_u)^2 ∑ u ( ℓ u ( S ) − y u ) 2 , the total squared difference between its counts and the sampled values. Since M M M is one of the allowed choices, the objective value at S S S is no larger than at M M M . We can therefore compare the chosen set with M M M without knowing M M M , and use this comparison to bound the error in the neighborhood counts.
To expand the comparison, let c v w = ∣ N G ( v ) ∩ N G ( w ) ∣ c_{vw}=|N_G(v)\cap N_G(w)| c v w = ∣ N G ( v ) ∩ N G ( w ) ∣ and define
z v = ∑ u ∈ N G ( v ) y u = n q ∑ i = 1 q c v w i x w i . z_v=\sum_{u\in N_G(v)}y_u=\frac{n}{q}\sum_{i=1}^{q}c_{vw_i}x_{w_i}. z v = u ∈ N G ( v ) ∑ y u = q n i = 1 ∑ q c v w i x w i .
Here, a sampled marked vertex w i w_i w i contributes once for each common neighbor of v v v and w i w_i w i . Since the samples are uniform, E [ z v ] = ∑ w c v w x w \mathbb{E}[z_v]=\sum_w c_{vw}x_w E [ z v ] = ∑ w c v w x w . Thus z v z_v z v is an unbiased estimate of the common neighbor sum at v v v .
Counting the contributions of pairs u , v u,v u , v with v ∈ S v\in S v ∈ S and u ∈ N G ( v ) u\in N_G(v) u ∈ N G ( v ) in two ways gives
∑ u ℓ u ( S ) y u = ∑ v ∈ S ∑ u ∈ N G ( v ) y u = ∑ v ∈ S z v . \sum_u\ell_u(S)y_u=\sum_{v\in S}\sum_{u\in N_G(v)}y_u=\sum_{v\in S}z_v. u ∑ ℓ u ( S ) y u = v ∈ S ∑ u ∈ N G ( v ) ∑ y u = v ∈ S ∑ z v .
Expanding the square in the least squares objective therefore gives
∑ u ( ℓ u ( S ) − y u ) 2 = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v + ∑ u y u 2 . \sum_u(\ell_u(S)-y_u)^2=\sum_u\ell_u(S)^2-2\sum_{v\in S}z_v+\sum_u y_u^2. u ∑ ( ℓ u ( S ) − y u ) 2 = u ∑ ℓ u ( S ) 2 − 2 v ∈ S ∑ z v + u ∑ y u 2 .
Once the samples are fixed, the last term ∑ u y u 2 \sum_u y_u^2 ∑ u y u 2 is the same for every choice of S S S . Removing it does not change which sets minimize the objective. We may therefore minimize ψ z ( S ) = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v \psi_z(S)=\sum_u\ell_u(S)^2-2\sum_{v\in S}z_v ψ z ( S ) = ∑ u ℓ u ( S ) 2 − 2 ∑ v ∈ S z v instead.
Algorithm 1 gives the procedure for estimating the neighborhood counts from the sampled input bits.
Algorithm 1 estimate_neighborhood_counts
Input: ( G , q ) (G,q) ( G , q ) .
Take q q q fresh uniform samples w 1 , … , w q w_1,\ldots,w_q w 1 , … , w q and query their input bits.
Let z v = ( n / q ) ∑ i = 1 q c v w i x w i z_v=(n/q)\sum_{i=1}^{q}c_{vw_i}x_{w_i} z v = ( n / q ) ∑ i = 1 q c v w i x w i for every vertex v v v .
return a set S S S minimizing ψ z ( S ) \psi_z(S) ψ z ( S ) over all subsets of V ( G ) V(G) V ( G ) .
The improved algorithm uses the same objective. The comparison requires only ψ z ( S ) ≤ ψ z ( M ) \psi_z(S)\le\psi_z(M) ψ z ( S ) ≤ ψ z ( M ) , which holds whenever M M M is among the sets over which we minimize.
Lemma 3.3 (Comparison with the marked set). Let S ⊆ V ( G ) S\subseteq V(G) S ⊆ V ( G ) satisfy ψ z ( S ) ≤ ψ z ( M ) \psi_z(S)\le\psi_z(M) ψ z ( S ) ≤ ψ z ( M ) . Then
∑ u ( ℓ u ( S ) − ℓ u ( M ) ) 2 ≤ 2 ∑ v e v ( 1 [ v ∈ S ] − x v ) , e v = z v − ∑ w c v w x w . (3) \sum_u(\ell_u(S)-\ell_u(M))^2\le2\sum_v e_v(1[v\in S]-x_v),\qquad e_v=z_v-\sum_w c_{vw}x_w. \tag*{(3)} u ∑ ( ℓ u ( S ) − ℓ u ( M ) ) 2 ≤ 2 v ∑ e v ( 1 [ v ∈ S ] − x v ) , e v = z v − w ∑ c v w x w . (3)
Proof. To relate the objective inequality to the error, we count in two ways the triples ( u , v , w ) (u,v,w) ( u , v , w ) with v ∈ S v\in S v ∈ S , w ∈ M w\in M w ∈ M , and both v v v and w w w adjacent to u u u . Counting first by u u u , and then by v , w v,w v , w , gives
∑ u ℓ u ( S ) ℓ u ( M ) = ∑ v ∈ S ∑ w c v w x w . \sum_u\ell_u(S)\ell_u(M)=\sum_{v\in S}\sum_w c_{vw}x_w. u ∑ ℓ u ( S ) ℓ u ( M ) = v ∈ S ∑ w ∑ c v w x w .
The same identity with S = M S=M S = M expresses ∑ u ℓ u ( M ) 2 \sum_u\ell_u(M)^2 ∑ u ℓ u ( M ) 2 as ∑ v ∈ M ∑ w c v w x w \sum_{v\in M}\sum_w c_{vw}x_w ∑ v ∈ M ∑ w c v w x w . Substitute z v = ∑ w c v w x w + e v z_v=\sum_w c_{vw}x_w+e_v z v = ∑ w c v w x w + e v into the difference of the two objectives. These identities then give
ψ z ( S ) − ψ z ( M ) = ∑ u ( ℓ u ( S ) − ℓ u ( M ) ) 2 − 2 ∑ v e v ( 1 [ v ∈ S ] − x v ) . \psi_z(S)-\psi_z(M)=\sum_u(\ell_u(S)-\ell_u(M))^2-2\sum_v e_v(1[v\in S]-x_v). ψ z ( S ) − ψ z ( M ) = u ∑ ( ℓ u ( S ) − ℓ u ( M ) ) 2 − 2 v ∑ e v ( 1 [ v ∈ S ] − x v ) .
The left side is nonpositive by hypothesis. Moving the error term to the other side proves (3) .
Since 1 [ v ∈ S ] − x v ≤ 1 \mathbf{1}[v \in S]-x_v \le1 1 [ v ∈ S ] − x v ≤ 1 , the squared estimation error is at most 2 ∑ v ∣ e v ∣ 2\sum_v |e_v| 2 ∑ v ∣ e v ∣ . Thus we can bound the error of the estimated neighborhood counts by bounding the errors in the sampled common neighbor sums. All common neighbor counts are known from the graph, and the minimization uses no further input queries.
The accuracy needed from preprocessing. The variance of z v z_v z v depends on ∑ w ∈ M c v w 2 \sum_{w\in M}c_{vw}^2 ∑ w ∈ M c v w 2 . For fixed v , w v,w v , w , the quantity c v w 2 c_{vw}^2 c v w 2 counts pairs of common neighbors, or equivalently closed walks w , a , v , b , w w,a,v,b,w w , a , v , b , w of length four. Summing over v v v and marked w w w counts just the closed walks starting at marked vertices. We will use sampling and edge deletions to ensure that this count is at most 2 h vol ( G , x ) 2h\operatorname{vol}(G,x) 2 h vol ( G , x ) , for a parameter h ≥ 1 h\ge1 h ≥ 1 , and that vol ( G , x ) ≤ n 2 / q \operatorname{vol}(G,x)\le n^2/q vol ( G , x ) ≤ n 2 / q .
Lemma 3.4 (Accuracy of the neighborhood estimates). For h ≥ 1 h\ge1 h ≥ 1 , suppose vol ( G , x ) ≤ n 2 / q \operatorname{vol}(G,x)\le n^2/q vol ( G , x ) ≤ n 2 / q and
∑ w ∈ M ∑ v c v w 2 ≤ 2 h vol ( G , x ) . (4) \sum_{w\in M}\sum_v c_{vw}^2 \le2h\operatorname{vol}(G,x). \tag*{(4)} w ∈ M ∑ v ∑ c v w 2 ≤ 2 h vol ( G , x ) . (4) Then Algorithm 1 has expected squared estimation error O ( n 2 h / q ) O(n^2\sqrt{h}/q) O ( n 2 h / q ) .
Proof. Fix a vertex v v v . For a uniform sample w w w , the mean of n c v w x w nc_{vw}x_w n c v w x w is ∑ w ∈ M c v w \sum_{w\in M}c_{vw} ∑ w ∈ M c v w , and its second moment is n ∑ w ∈ M c v w 2 n\sum_{w\in M}c_{vw}^2 n ∑ w ∈ M c v w 2 . Thus z v z_v z v is unbiased. Since it averages q q q independent samples, its variance is
E [ e v 2 ] = Var ( z v ) = 1 q Var ( n c v w x w ) ≤ n q ∑ w ∈ M c v w 2 . \mathbb{E}[e_v^2]=\operatorname{Var}(z_v)=\frac{1}{q}\operatorname{Var}(nc_{vw}x_w)\le\frac{n}{q}\sum_{w\in M}c_{vw}^2. E [ e v 2 ] = Var ( z v ) = q 1 Var ( n c v w x w ) ≤ q n w ∈ M ∑ c v w 2 . Summing over v v v and using the two hypotheses gives
E ∑ v e v 2 ≤ n q ∑ w ∈ M ∑ v c v w 2 ≤ 2 n h q vol ( G , x ) ≤ 2 n 3 h q 2 . \mathbb{E}\sum_v e_v^2\le\frac{n}{q}\sum_{w\in M}\sum_v c_{vw}^2\le\frac{2nh}{q}\operatorname{vol}(G,x)\le\frac{2n^3h}{q^2}. E v ∑ e v 2 ≤ q n w ∈ M ∑ v ∑ c v w 2 ≤ q 2 nh vol ( G , x ) ≤ q 2 2 n 3 h . By Lemma 3.3 , the squared error in the neighborhood counts is at most 2 ∑ v ∣ e v ∣ 2\sum_v |e_v| 2 ∑ v ∣ e v ∣ . Applying Cauchy–Schwarz first to each expectation and then to the sum over vertices bounds its expectation by
2 ∑ v E ∣ e v ∣ ≤ 2 ∑ v E [ e v 2 ] ≤ 2 n E ∑ v e v 2 = O ( n 2 h / q ) . 2\sum_v\mathbb{E}|e_v|\le2\sum_v\sqrt{\mathbb{E}[e_v^2]}\le2\sqrt{n\mathbb{E}\sum_v e_v^2}=O(n^2\sqrt{h}/q). 2 v ∑ E ∣ e v ∣ ≤ 2 v ∑ E [ e v 2 ] ≤ 2 n E v ∑ e v 2 = O ( n 2 h / q ) . If G G G was obtained by earlier preprocessing, condition on any history for which the two hypotheses hold. The graph is then fixed, and the fresh samples have the distribution used above, so the same bound holds conditionally.
Reducing marked volume and maximum degree
We have analyzed estimation on a graph satisfying the volume and closed walk bounds in Lemma 3.4 . We now describe the preprocessing that establishes these properties. In this part, we first reduce the marked volume by sampling, then test and delete edges incident to vertices of degree greater than d d d . The degree bound turns the bound on the number of marked vertices outside P P P into the volume bound in Lemma 3.2, and keeps neighborhoods small for the graphs tested in Part 4. Both preprocessing procedures precede the fresh samples used to estimate the neighborhood counts.
We begin by reducing the marked volume. Sample vertices, query their input bits, and search the union of the neighborhoods of the marked samples. A marked vertex in this union gives a collision with a sampled marked vertex. If the search finds none, delete all edges incident to this union.
The reason for this deletion is simple: a vertex with many marked neighbors is likely to have one of them sampled. Such a vertex then belongs to the searched union and is isolated. Thus the remaining vertices have few marked neighbors, and their total count bounds the marked volume. Algorithm 2 gives the procedure.
Algorithm 2 sample_neighborhoods
Input: ( G , q ) (G,q) ( G , q ) , with q ≥ 1 q \ge1 q ≥ 1 .
Take Θ ( q log ( n / ϵ ) ) \Theta(q\log(n/\epsilon)) Θ ( q log ( n / ϵ )) uniform vertex samples and query their input bits.
Let Z Z Z be the marked sampled labels.
Search N G ( Z ) N_G(Z) N G ( Z ) for a marked vertex; return Yes if one is found.
Delete every edge incident to N G ( Z ) N_G(Z) N G ( Z ) and return G G G .
Lemma 3.5 (Neighborhood sampling). For q ≥ 1 q \ge1 q ≥ 1 , Algorithm 2 has cost O ~ ( q + n ) \widetilde{O}(q+\sqrt{n}) O ( q + n ) queries. Except with probability ϵ \epsilon ϵ , every remaining vertex has at most n / q n/q n / q marked neighbors and the remaining marked volume is at most n 2 / q n^2/q n 2 / q . If a collision exists, the algorithm either detects one or leaves one in the remaining graph, unless the Grover search fails.
Proof. Let t = Θ ( q log ( n / ϵ ) ) t=\Theta(q\log(n/\epsilon)) t = Θ ( q log ( n / ϵ )) be the number of samples. Querying their input bits costs t t t queries. Once these bits are known, the set N G ( Z ) N_G(Z) N G ( Z ) is known, so Grover search over it costs O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) queries.
Fix a vertex u u u with more than n / q n/q n / q marked neighbors before deletion. It lies outside N G ( Z ) N_G(Z) N G ( Z ) exactly when none of its marked neighbors is sampled. By independence, this event has probability
( 1 − ℓ u ( M ) n ) t ≤ exp ( − t ℓ u ( M ) n ) ≤ exp ( − t / q ) ≤ ϵ / n , \left(1-\frac{\ell_u(M)}{n}\right)^t \le\exp\left(-\frac{t\ell_u(M)}{n}\right) \le\exp(-t/q) \le\epsilon/n, ( 1 − n ℓ u ( M ) ) t ≤ exp ( − n t ℓ u ( M ) ) ≤ exp ( − t / q ) ≤ ϵ / n ,
for a sufficiently large constant in the choice of t t t . A union bound over the vertices shows that, except with probability ϵ \epsilon ϵ , every vertex outside N G ( Z ) N_G(Z) N G ( Z ) has at most n / q n/q n / q marked neighbors. Deleting edges cannot increase this count, and every vertex inside N G ( Z ) N_G(Z) N G ( Z ) becomes isolated. In the resulting graph, counting in two ways therefore gives vol ( G , x ) = ∑ u ∣ N G ( u ) ∩ M ∣ ≤ n 2 / q \operatorname{vol}(G,x)=\sum_u |N_G(u)\cap M|\le n^2/q vol ( G , x ) = ∑ u ∣ N G ( u ) ∩ M ∣ ≤ n 2 / q .
Finally, if a deleted edge is a collision, one of its marked endpoints lies in N G ( Z ) N_G(Z) N G ( Z ) . If the Grover search succeeds, it finds a marked vertex in this set, which forms a collision with a sampled marked neighbor in Z Z Z . If no deleted edge is a collision, any existing collision remains in the graph. □ \square □
Bounding the maximum degree. On the event guaranteed by Lemma 3.5, the remaining graph has marked volume at most n 2 / q n^2/q n 2 / q . Let H = { u : deg G ( u ) > d } H=\{u:\deg_G(u)>d\} H = { u : deg G ( u ) > d } . Each marked vertex in H H H contributes more than d d d to the volume, so H H H contains at most n 2 / ( q d ) n^2/(qd) n 2 / ( q d ) marked vertices. Algorithm 4 tests the edges incident to H H H using Lemma 2.9, then deletes them if the test rejects. The maximum degree is then at most d d d , and the volume bound is preserved.
Part 4: Bounding closed walks of length four. The volume bound alone does not control the squared common neighbor counts in (4) . This last preprocessing step supplies that bound, which controls the variance of the estimates z v z_v z v . Fix the first directed edge w a wa w a of a closed walk w , a , v , b , w w,a,v,b,w w , a , v , b , w . The edge v b vb v b joins N G ( a ) N_G(a) N G ( a ) to N G ( w ) N_G(w) N G ( w ) , and choosing its orientation determines the whole walk.
Whenever an edge w a wa w a in the current graph has at least h h h edges between N G ( a ) N_G(a) N G ( a ) and N G ( w ) N_G(w) N G ( w ) , record and delete those edges. Repeat until no such edge remains. Each remaining directed edge then starts at most 2 h 2h 2 h closed walks of length four: there are fewer than h h h choices for the middle edge and at most two orientations for each. There are vol ( G , x ) \operatorname{vol}(G,x) vol ( G , x ) directed edges starting at marked vertices, so the total number of these walks is at most 2 h vol ( G , x ) 2h\operatorname{vol}(G,x) 2 h vol ( G , x ) . This is exactly the bound needed in (4) .
We use Grover search over the recorded graphs to find one containing a collision, using Lemma 2.9 to check a graph. Each recorded graph has at most 2 d 2d 2 d vertices and can be checked by a quantum walk. The walks of length four above are ordinary graph walks used for counting; the quantum walk is the procedure used for collision testing. A larger threshold h h h gives fewer recorded graphs, but allows a larger estimation error. Algorithm 3 gives the procedure.
Figure 2 illustrates how extraction separates collision testing from estimation on the remaining graph.
Algorithm 3 extract_neighborhood_edges
Input: A graph G G G of maximum degree at most d d d , and a threshold h ≥ 1 h \ge1 h ≥ 1 .
Initialize an empty list of recorded graphs.
while an edge u v uv uv has at least h h h edges between N G ( u ) N_G(u) N G ( u ) and N G ( v ) N_G(v) N G ( v ) :
Record those edges as a graph on their endpoints.
Delete the recorded edges from G G G .
end while
Search the recorded graphs using Lemma 2.9, with count bound 2 d 2d 2 d .
Return Yes if a test accepts; otherwise return G G G .
Lemma 3.6 (Edge extraction and closed walks). Algorithm 3 costs O ~ ( n / h d 7 / 6 ) \widetilde{O}(\sqrt{n/h}\,d^{7/6}) O ( n / h d 7/6 ) queries. Its output satisfies (4) . If any deleted edge is a collision, Algorithm 3 returns Yes with high probability.
Proof. We first prove the walk bound in the remaining graph. For fixed v , w v,w v , w , each ordered pair of common neighbors a , b ∈ N G ( v ) ∩ N G ( w ) a,b \in N_G(v) \cap N_G(w) a , b ∈ N G ( v ) ∩ N G ( w ) gives the closed walk w , a , v , b , w w,a,v,b,w w , a , v , b , w . Conversely, such a walk determines v , a , b v,a,b v , a , b once its initial vertex w w w is fixed. Thus ∑ w ∈ M ∑ v c v w 2 \sum_{w\in M}\sum_{v} c_{vw}^{2} ∑ w ∈ M ∑ v c v w 2 counts exactly the closed walks of length four starting at marked vertices.
Count these walks instead by their first directed edge w a wa w a , with w w w marked. The edge v b vb v b joins N G ( a ) N_G(a) N G ( a ) to N G ( w ) N_G(w) N G ( w ) . At termination there are fewer than h h h such edges. Each undirected edge gives at most two choices for the ordered pair ( v , b ) (v,b) ( v , b ) , and each choice determines the whole walk. There are therefore at most 2 h 2h 2 h walks for each first directed edge. The number of first directed edges with a marked initial vertex is ∑ w ∈ M deg G ( w ) = vol ( G , x ) \sum_{w\in M}\deg_G(w)=\operatorname{vol}(G,x) ∑ w ∈ M deg G ( w ) = vol ( G , x ) , proving (4) . This argument also counts walks with repeated vertices: neither the ordered pair of common neighbors nor the description by a first edge requires distinct vertices.
For the query bound, each recorded graph is formed from edges between two neighborhoods of size at most d d d , so it has at most 2 d 2d 2 d vertices. The recorded edge sets are disjoint, each has at least h h h edges, and the original graph has at most n d nd n d edges. Hence at most n d / h nd/h n d / h graphs are recorded. Using all vertices of a recorded graph as its cover, Lemma 2.9 with count bound 2 d 2d 2 d tests it in O ~ ( d ( 1 + 2 d ) 1 / 6 ) = O ~ ( d 2 / 3 ) \widetilde{O}(\sqrt{d}(1+2d)^{1/6})=\widetilde{O}(d^{2/3}) O ( d ( 1 + 2 d ) 1/6 ) = O ( d 2/3 ) queries. Grover search over the recorded graphs then costs O ~ ( n d / h d 2 / 3 ) = O ~ ( n / h d 7 / 6 ) \widetilde{O}(\sqrt{nd/h}\,d^{2/3})=\widetilde{O}(\sqrt{n/h}\,d^{7/6}) O ( n d / h d 2/3 ) = O ( n / h d 7/6 ) queries. Every deleted edge belongs to a recorded graph. If such an edge is a collision, the search over the recorded graphs returns Yes with high probability. □ \square □
The complete algorithm. The preprocessing steps supply exactly the two hypotheses needed to estimate the neighborhood counts: small marked volume and few closed walks of length four from marked vertices. A fresh sample then gives approximate neighborhood counts, and thresholding divides the remaining edges into two parts handled by the same volume test. Algorithm 4 combines these steps.
Choose parameters q q q , d d d , h ≥ 1 h \ge1 h ≥ 1 and τ > 0 \tau> 0 τ > 0 , with q q q an integer. Let r r r be a sufficiently large constant multiple of n 2 h / q n^{2}\sqrt{h}/q n 2 h / q , and let b = n τ + n r + d r / τ 2 b = n\tau+ \sqrt{nr} + dr/\tau^{2} b = n τ + n r + d r / τ 2 . Lemma 3.4 and Markov’s inequality make r r r a valid error bound with high constant probability. Lemma 3.2 then makes b b b a valid marked volume bound for both final tests.
Return Yes as soon as any search or collision test returns Yes.
Algorithm 4 First algorithm
Input: ( G , q , d , h , τ ) (G, q, d, h, \tau) ( G , q , d , h , τ ) , with b b b defined above.
G ← sample_neighborhoods ( G , q ) G \leftarrow\text{sample\_neighborhoods}(G, q) G ← sample_neighborhoods ( G , q ) .
Let H = { u : deg G ( u ) > d } H = \{u : \deg_G(u) > d\} H = { u : deg G ( u ) > d } .
Test its incident edges by Lemma 2.9, with count bound n 2 / ( q d ) n^{2}/(qd) n 2 / ( q d ) .
Delete the edges incident to H H H .
G ← extract_neighborhood_edges ( G , d , h ) G \leftarrow\text{extract\_neighborhood\_edges}(G, d, h) G ← extract_neighborhood_edges ( G , d , h ) .
S ← estimate_neighborhood_counts ( G , q ) S \leftarrow\text{estimate\_neighborhood\_counts}(G, q) S ← estimate_neighborhood_counts ( G , q ) .
Let P = { u : ℓ u ( S ) ≤ τ } P = \{u : \ell_u(S) \le\tau\} P = { u : ℓ u ( S ) ≤ τ } and F = ( V ( G ) , E ( G ) ∖ E ( G [ P ] ) ) F = (V(G), E(G) \setminus E(G[P])) F = ( V ( G ) , E ( G ) ∖ E ( G [ P ])) .
Call cover_test ( F , V ( G ) ∖ P , b ) \text{cover\_test}(F, V(G) \setminus P, b) cover_test ( F , V ( G ) ∖ P , b ) .
return cover_test ( G [ P ] , P , b ) \text{cover\_test}(G[P], P, b) cover_test ( G [ P ] , P , b ) .
Proof of Theorem 3.1 . Suppose first that the input is negative. Condition on neighborhood sampling giving marked volume at most n 2 / q n^{2}/q n 2 / q . The set H H H then contains at most n 2 / ( q d ) n^{2}/(qd) n 2 / ( q d ) marked vertices, so the high degree test has a valid count bound and rejects except with its assigned error probability. Deleting its incident edges leaves maximum degree at most d d d , and further edge deletions preserve the volume bound. Lemma 3.6 establishes (4) . The fresh samples therefore satisfy the hypotheses of Lemma 3.4 . By Markov’s inequality and the choice of r r r , their squared estimation error is at most r r r with conditional probability at least 99 / 100 99/100 99/100 .
On this event, Lemma 3.2 bounds the marked volume of G [ P ] G[P] G [ P ] by n τ + n r n\tau+ \sqrt{nr} n τ + n r and that of the cover V ( G ) ∖ P V(G) \setminus P V ( G ) ∖ P for the other edges by d r / τ 2 dr/\tau^{2} d r / τ 2 . Both quantities are at most b b b . Thus both final tests have valid volume bounds and reject except with their assigned error probabilities. The other tests also reject on this negative input when their stated guarantees hold.
Now suppose the input is positive and fix a collision edge. If it is deleted during preprocessing, either an endpoint was searched in the neighborhood sampling step, or the edge was included in the high degree test or a recorded graph. The corresponding search or collision test accepts except with its assigned error probability. If the edge survives preprocessing, it either lies inside G [ P ] G[P] G [ P ] or has an endpoint outside P P P , so one of the final tests accepts. The acceptance guarantees of these tests hold on positive inputs even when the supplied count or volume bound fails. Consequently, this argument does not require the estimation error to be small on a positive input. Taking the assigned errors sufficiently small and applying a union bound gives total error at most 1 / 3 1/3 1/3 .
It remains to choose the parameters and bound the cost. Combining the sampling, high degree, extraction, and final test costs gives
O ~ ( q + n ( 1 + n 2 q d ) 1 / 6 + n h d 7 / 6 + n τ + n 3 / 4 h 1 / 8 q 1 / 4 + n d h 1 / 4 q τ ) \widetilde{O}\left(q + \sqrt{n}\left(1 + \frac{n^{2}}{qd}\right)^{1/6} + \sqrt{\frac{n}{h}}d^{7/6} + \sqrt{n\tau} + \frac{n^{3/4}h^{1/8}}{q^{1/4}} + \frac{n\sqrt{d}h^{1/4}}{\sqrt{q\tau}}\right) O ( q + n ( 1 + q d n 2 ) 1/6 + h n d 7/6 + n τ + q 1/4 n 3/4 h 1/8 + q τ n d h 1/4 )
queries. The last three terms bound b \sqrt{b} b after substituting r = O ( n 2 h / q ) r = O(n^{2}\sqrt{h}/q) r = O ( n 2 h / q ) .
Increasing q q q uses more sample queries but reduces both the marked volume after neighborhood sampling and the estimation error. A smaller d d d makes the extracted graphs cheaper to test and improves the volume bound outside P P P , but leaves more vertices for the high degree test. A larger h h h gives fewer extracted graphs, at the cost of a weaker estimation guarantee. Finally, increasing τ \tau τ improves the volume bound outside P P P while weakening the bound inside P P P . We balance these costs by choosing q = ⌈ n 92 / 139 ⌉ q = \lceil n^{92/139} \rceil q = ⌈ n 92/139 ⌉ , d = ⌈ n 51 / 139 ⌉ d = \lceil n^{51/139} \rceil d = ⌈ n 51/139 ⌉ , h = n 74 / 139 h = n^{74/139} h = n 74/139 , and τ = n 45 / 139 \tau= n^{45/139} τ = n 45/139 . Then r = O ( n 223 / 139 ) r = O(n^{223/139}) r = O ( n 223/139 ) and b = O ( n 184 / 139 ) b = O(n^{184/139}) b = O ( n 184/139 ) . Every term in the displayed query bound is O ( n 92 / 139 ) O(n^{92/139}) O ( n 92/139 ) . The total is O ~ ( n 92 / 139 ) \widetilde{O}(n^{92/139}) O ( n 92/139 ) , with the displayed query limits on every execution. Repeating the algorithm O ( log n ) O(\log n) O ( log n ) times and taking the majority gives the stated high probability guarantee.
Minimization over vertex sets may require exponential classical computation. The comparison proofs also hold for weights in [ 0 , 1 ] [0,1] [ 0 , 1 ] , giving convex quadratic minimizations with the same query bounds.
An improved algorithm
In this section, we show the full quantum algorithm for the graph collision problem, proving Theorem 1.1 . We pick a degree threshold 1 ≤ d ≤ n 1 \le d \le n 1 ≤ d ≤ n , and we divide the graph collision problem into two parts. In § 5.1 , we look for a collision between two vertices where at least one has degree greater than d d d . Then, in § 6 , we look for a collision between two low-degree vertices, i.e., for which both degrees are at most d d d . We finally balance the choice of d d d in § 8.1 .
Before turning to either of these algorithms, we introduce an algorithmic component that is important for both approaches.
Marked neighborhood sampling. We introduce a useful algorithmic building block. In a graph G G G , suppose a set S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) of size a a a contains r > 0 r > 0 r > 0 marked vertices. We can sample a marked vertex uniformly at random using O ~ ( a / r ) \widetilde{O}(\sqrt{a/r}) O ( a / r ) queries. Taking Θ ( s log ( n / ϵ ) ) \Theta(s\log(n/\epsilon)) Θ ( s log ( n / ϵ )) independent samples, with replacement, therefore costs O ~ ( s a / r ) \widetilde{O}(s\sqrt{a/r}) O ( s a / r ) queries for s ≥ 1 s \ge1 s ≥ 1 . Let Z Z Z be the set of sampled vertices. We then search its neighborhood for a marked vertex using O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) queries.
If the search finds no collision, delete every edge incident to N G ( Z ) N_G(Z) N G ( Z ) . Any vertex with more than r / s r/s r / s marked neighbors in S S S belongs to N G ( Z ) N_G(Z) N G ( Z ) with high probability and is therefore isolated by this deletion. A union bound shows that every remaining vertex has at most r / s r/s r / s marked neighbors in S S S . Every deleted collision has a marked endpoint in the searched neighborhood, so it would have been detected, except with the search error.
Algorithm 5 estimates r r r and then performs this sampling and deletion.
Algorithm 5 sample_marked_neighborhoods
Input: A graph G G G , source S ⊆ V ( G ) S \subseteq V(G) S ⊆ V ( G ) , and threshold θ > 0 \theta> 0 θ > 0 .
Estimate r = ∣ M ∩ S ∣ r = |M \cap S| r = ∣ M ∩ S ∣ by r ^ \hat{r} r ^ using Lemma 2.4.
If r ^ = 0 \hat{r} = 0 r ^ = 0 , return G G G .
Obtain Θ ( ( 1 + r ^ / θ ) log ( n / ϵ ) ) \Theta((1+\hat{r}/\theta)\log(n/\epsilon)) Θ (( 1 + r ^ / θ ) log ( n / ϵ )) uniform marked vertices from S S S .
Let Z Z Z be the sampled vertices.
Search N G ( Z ) N_G(Z) N G ( Z ) for a marked vertex; return Yes if one is found.
Delete every edge incident to N G ( Z ) N_G(Z) N G ( Z ) and return G G G .
Lemma 4.1 (Marked neighbor bound). Let S S S be a fixed source set of size a a a , let r = ∣ M ∩ S ∣ r = |M \cap S| r = ∣ M ∩ S ∣ , and let θ > 0 \theta> 0 θ > 0 . Conditional on a good count estimate, Algorithm 5 uses O ~ ( n + a r / θ ) \widetilde{O}(\sqrt{n}+\sqrt{ar}/\theta) O ( n + a r / θ ) queries. Except with the assigned error, every remaining vertex has at most θ \theta θ marked neighbors in S S S . A collision is detected or survives, except with the search error.
Proof. For a good nonzero estimate, the true count lies between r ^ / 2 \hat{r}/2 r ^ /2 and 2 r ^ 2\hat{r} 2 r ^ . A vertex with more than θ \theta θ marked source neighbors is missed by all samples with probability at most ϵ / n \epsilon/n ϵ / n . A union bound proves the neighbor bound. Any deleted collision has a marked endpoint in N G ( Z ) N_G(Z) N G ( Z ) and is detected by the preceding search.
Counting costs O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) , sampling costs O ~ ( a / r + a r / θ ) \widetilde{O}(\sqrt{a/r}+\sqrt{ar/\theta}) O ( a / r + a r / θ ) , and the search costs O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) . On a good nonzero estimate, 1 ≤ r ^ ≤ 2 r 1 \le\widehat{r} \le2r 1 ≤ r ≤ 2 r , proving the stated query bound. The sampling limit is fixed once the estimate is obtained. On a good zero estimate the source has no marked vertices, so no operation is needed. □ \square □
Case I: High-degree vertices
The core idea for high-degree vertices is as follows. Let H = { v : deg G ( v ) > d } H = \{v : \deg_G(v) > d\} H = { v : deg G ( v ) > d } , and let r r r be its number of marked vertices. If r ≤ ( n / d ) 3 / 2 r \le(n/d)^{3/2} r ≤ ( n / d ) 3/2 , we can cheaply test for a collision incident to H H H . Otherwise, we can cheaply take Θ ( ( n / d ) log ( n / ϵ ) ) \Theta((n/d)\log(n/\epsilon)) Θ (( n / d ) log ( n / ϵ )) uniform marked samples from H H H and search their neighborhood. Algorithm 5 performs this sampling and search, then deletes the edges incident to the searched neighborhood.
With high probability, every vertex in the remaining graph has at most r d / ( 2 n ) rd/(2n) r d / ( 2 n ) marked neighbors in the old set H H H . Counting in two ways bounds the sum of the remaining degrees of marked vertices in H H H by r d / 2 rd/2 r d /2 . Each vertex whose degree still exceeds d d d contributes more than d d d to this sum, so at most r / 2 r/2 r /2 such marked vertices remain. After logarithmically many iterations, their number is at most ( n / d ) 3 / 2 (n/d)^{3/2} ( n / d ) 3/2 . Algorithm 6 gives this degree reduction procedure.
Maintain an upper bound R R R on the number of marked vertices in the current high-degree set H = { u : deg G ( u ) > d } H = \{u : \deg_G(u) > d\} H = { u : deg G ( u ) > d } , starting with R = n R = n R = n . While R > 4 k R > 4k R > 4 k , apply Algorithm 5 with threshold R d / ( 8 n ) Rd/(8n) R d / ( 8 n ) . Counting in two ways then bounds the number of remaining marked high-degree vertices by R / 8 R/8 R /8 , so we may halve R R R and repeat. Once R ≤ 4 k R \le4k R ≤ 4 k , test and delete the edges incident to H H H . Only the sampling routine estimates marked counts internally.
Algorithm 6 cap_degrees
Input: A graph G G G and target degree bound d d d , with 1 ≤ d ≤ n 1 \le d \le n 1 ≤ d ≤ n . Abort the routine and output No if its total query count exceeds a sufficiently large budget O ~ ( n 3 / 4 / d 1 / 4 ) \widetilde{O}(n^{3/4}/d^{1/4}) O ( n 3/4 / d 1/4 ) .
Let k = ⌈ ( n / d ) 3 / 2 ⌉ k = \lceil(n/d)^{3/2}\rceil k = ⌈( n / d ) 3/2 ⌉ and R = n R = n R = n .
while R > 4 k R > 4k R > 4 k :
Let H = { u : deg G ( u ) > d } H = \{u : \deg_G(u) > d\} H = { u : deg G ( u ) > d } .
G ← sample_marked_neighborhoods ( G , H , R d / ( 8 n ) ) G \leftarrow\operatorname{sample\_marked\_neighborhoods}(G,H,Rd/(8n)) G ← sample_marked_neighborhoods ( G , H , R d / ( 8 n )) .
Let R ← R / 2 R \leftarrow R/2 R ← R /2 .
end while
Let H = { u : deg G ( u ) > d } H = \{u : \deg_G(u) > d\} H = { u : deg G ( u ) > d } .
Test the edges incident to H H H by Lemma 2.9, with count bound 4 k 4k 4 k .
Delete those edges and return G G G .
Lemma 4.2 (Degree reduction). For 1 ≤ d ≤ n 1 \le d \le n 1 ≤ d ≤ n , Algorithm 6 has query cost
O ~ ( n 3 / 4 d 1 / 4 ) . \widetilde{O}\left(\frac{n^{3/4}}{d^{1/4}}\right). O ( d 1/4 n 3/4 ) . On a good negative execution it returns a graph of maximum degree at most d d d , hence marked volume at most n d nd n d . On a positive input it detects a collision or preserves one, except with the assigned error.
Proof. Initially ∣ M ∩ H ∣ ≤ n = R |M \cap H| \le n = R ∣ M ∩ H ∣ ≤ n = R . Suppose this invariant holds before a sampling call, and condition on its success guarantees. Let G ′ G' G ′ be the returned graph and H ′ = { u : deg G ′ ( u ) > d } H' = \{u : \deg_{G'}(u) > d\} H ′ = { u : deg G ′ ( u ) > d } . Since H ′ ⊆ H H' \subseteq H H ′ ⊆ H , Lemma 4.1 and counting in two ways give
d ∣ M ∩ H ′ ∣ ≤ ∑ u ∣ N G ′ ( u ) ∩ M ∩ H ∣ ≤ n R d 8 n = R d 8 . d|M \cap H'| \le\sum_u |N_{G'}(u) \cap M \cap H| \le n\frac{Rd}{8n} = \frac{Rd}{8}. d ∣ M ∩ H ′ ∣ ≤ u ∑ ∣ N G ′ ( u ) ∩ M ∩ H ∣ ≤ n 8 n R d = 8 R d .
Thus halving R R R preserves the invariant. After O ( log n ) O(\log n) O ( log n ) iterations, R ≤ 4 k R \le4k R ≤ 4 k , making the final cover test valid on a good negative execution. Deleting its tested edges leaves maximum degree at most d d d . Every removed collision is covered by a neighborhood search or the final test.
Writing r = ∣ M ∩ H ∣ ≤ R r = |M \cap H| \le R r = ∣ M ∩ H ∣ ≤ R and ∣ H ∣ ≤ n |H| \le n ∣ H ∣ ≤ n , each sampling call costs, on a good count estimate,
O ~ ( n + n r R d / ( 8 n ) ) ≤ O ~ ( n + n 3 / 2 d R ) . \widetilde{O}\left(\sqrt{n} + \frac{\sqrt{nr}}{Rd/(8n)}\right) \le\widetilde{O}\left(\sqrt{n} + \frac{n^{3/2}}{d\sqrt{R}}\right). O ( n + R d / ( 8 n ) n r ) ≤ O ( n + d R n 3/2 ) .
Since R R R halves, the second terms sum geometrically to O ~ ( n 3 / 2 / ( d k ) ) \widetilde{O}(n^{3/2}/(d\sqrt{k})) O ( n 3/2 / ( d k )) . The final test costs O ~ ( n ( 1 + k ) 1 / 6 ) \widetilde{O}(\sqrt{n}(1+k)^{1/6}) O ( n ( 1 + k ) 1/6 ) , giving total cost
O ~ ( n ( 1 + k ) 1 / 6 + n 3 / 2 d k ) = O ~ ( n 3 / 4 / d 1 / 4 ) . \widetilde{O}\left(\sqrt{n}(1+k)^{1/6} + \frac{n^{3/2}}{d\sqrt{k}}\right) = \widetilde{O}(n^{3/4}/d^{1/4}). O ( n ( 1 + k ) 1/6 + d k n 3/2 ) = O ( n 3/4 / d 1/4 ) .
If the loop is skipped, only the final test is needed and the same bound holds. This runtime bound holds on every input whenever the internal counting and sampling guarantees hold, or a collision is detected earlier. A union bound over the O ( log n ) O(\log n) O ( log n ) calls makes their failure probability inverse polynomially small with any desired fixed exponent. Choose the global budget sufficiently large to cover every such good execution. The global cutoff then enforces the stated worst-case query bound, and returning No on timeout adds only this negligible probability to the error on positive inputs. It introduces no additional acceptance on negative inputs.
Case II: Low-degree vertices
We now turn to the more complicated setting where we look for a collision between two vertices with small degree, i.e., deg ( v ) ≤ d \deg(v) \le d deg ( v ) ≤ d . In other words, we simply remove all high-degree vertices from G G G , and look for a collision in the remaining graph.
The degree bound gives vol ( G , x ) ≤ n d \operatorname{vol}(G,x) \le nd vol ( G , x ) ≤ n d . Our goal is to test and delete edges until the marked volume is small enough for the cover test of Lemma 2.7. If ℓ \ell ℓ is its current upper bound, that test uses O ~ ( n + ℓ ) \widetilde{O}(\sqrt{n}+\sqrt{\ell}) O ( n + ℓ ) queries. We therefore start with ℓ = n d \ell= nd ℓ = n d and construct a routine that halves ℓ \ell ℓ on each iteration. Algorithm 10 gives this procedure.
We first analyze the minimization and thresholding steps, then give the graph preprocessing and estimation routines that supply their hypotheses. We combine these routines at the end of the section.
Part 1: Estimating the neighborhood counts. First consider a bipartite graph G G G with sides A A A and B B B . For vertices u , v u,v u , v on the same side, let c u v = ∣ N G ( u ) ∩ N G ( v ) ∣ c_{uv} = |N_G(u) \cap N_G(v)| c uv = ∣ N G ( u ) ∩ N G ( v ) ∣ . Let C A C_A C A and C B C_B C B be the corresponding matrices indexed by A A A and B B B , respectively, and let C = C A ⊕ C B C = C_A \oplus C_B C = C A ⊕ C B . Suppose that z z z approximates C 1 M C1_M C 1 M with ∥ C 1 M − z ∥ ∞ ≤ η \|C1_M-z\|_\infty\le\eta ∥ C 1 M − z ∥ ∞ ≤ η . The core idea is to approximately learn the set of vertices that have few connections to marked vertices, i.e., to find an approximation P P P of all vertices v ∈ V ( G ) v \in V(G) v ∈ V ( G ) that have at most τ \tau τ marked neighbors. Then, the marked volume of G [ P ] G[P] G [ P ] is small, because we exactly remove those vertices that are adjacent to many marked vertices. On the other hand, for a negative input, the marked volume of G G G with V ( G ) ∖ P V(G) \setminus P V ( G ) ∖ P as a source set is small as well, since all the neighbors of marked vertices are themselves unmarked. We make this intuition precise in the following lemma.
Lemma 4.3 (Separate thresholds). Let G G G be a bipartite graph with m m m edges, with vertex sets A A A and B B B on both sides of the bipartition, sizes a a a and b b b , degree upper bounds d A d_A d A and d B d_B d B , and such that ∣ M ∩ A ∣ ≤ a p |M \cap A| \le ap ∣ M ∩ A ∣ ≤ a p and ∣ M ∩ B ∣ ≤ b p |M \cap B| \le bp ∣ M ∩ B ∣ ≤ b p . Suppose that ∥ z − C 1 M ∥ ∞ ≤ η \lVert z-C1_M\rVert_\infty\le\eta ∥ z − C 1 M ∥ ∞ ≤ η . Let S S S minimize ψ z ( S ) \psi_z(S) ψ z ( S ) over subsets satisfying ∣ S ∩ A ∣ ≤ a p |S \cap A| \le ap ∣ S ∩ A ∣ ≤ a p and ∣ S ∩ B ∣ ≤ b p |S \cap B| \le bp ∣ S ∩ B ∣ ≤ b p . Define P = { u ∈ A : ℓ u ( S ) ≤ τ A } ∪ { u ∈ B : ℓ u ( S ) ≤ τ B } P = \{u \in A : \ell_u(S) \le\tau_A\} \cup\{u \in B : \ell_u(S) \le\tau_B\} P = { u ∈ A : ℓ u ( S ) ≤ τ A } ∪ { u ∈ B : ℓ u ( S ) ≤ τ B } . Then
vol ( G [ P ] , x ) ≤ a τ A + b τ B + 4 a b p η . \operatorname{vol}(G[P], x) \le a\tau_A+b\tau_B+4\sqrt{abp\eta}. vol ( G [ P ] , x ) ≤ a τ A + b τ B + 4 ab p η . On a negative input, the outside cover has marked volume at most 4 p η ( d A b / τ A 2 + d B a / τ B 2 ) 4p\eta(d_Ab/\tau_A^2+d_Ba/\tau_B^2) 4 p η ( d A b / τ A 2 + d B a / τ B 2 ) .
Proof. Replacing S ∩ B S \cap B S ∩ B by M ∩ B M \cap B M ∩ B preserves feasibility. Minimality and the comparison (3) therefore bound the squared estimation error on A A A by
2 ∑ v ∈ B e v ( 1 [ v ∈ S ] − x v ) ≤ 2 η ∣ ( S △ M ) ∩ B ∣ ≤ 2 η ( ∣ S ∩ B ∣ + ∣ M ∩ B ∣ ) ≤ 4 b p η , 2\sum_{v\in B}e_v(1[v\in S]-x_v)\le2\eta|(S\mathbin{\triangle}M)\cap B|\le2\eta(|S\cap B|+|M\cap B|)\le4bp\eta, 2 v ∈ B ∑ e v ( 1 [ v ∈ S ] − x v ) ≤ 2 η ∣ ( S △ M ) ∩ B ∣ ≤ 2 η ( ∣ S ∩ B ∣ + ∣ M ∩ B ∣ ) ≤ 4 b p η , where e v = z v − ∑ w c v w x w e_v=z_v-\sum_w c_{vw}x_w e v = z v − ∑ w c v w x w . Exchanging the sides gives error at most 4 a p η 4ap\eta 4 a p η on B B B .
Apply the thresholding argument of Lemma 3.2 separately on each side. Cauchy–Schwarz bounds the retained marked volume by
a τ A + b τ B + a ⋅ 4 b p η + b ⋅ 4 a p η = a τ A + b τ B + 4 a b p η . a\tau_A+b\tau_B+\sqrt{a\cdot4bp\eta}+\sqrt{b\cdot4ap\eta}=a\tau_A+b\tau_B+4\sqrt{abp\eta}. a τ A + b τ B + a ⋅ 4 b p η + b ⋅ 4 a p η = a τ A + b τ B + 4 ab p η . On a negative input, every marked vertex has no marked neighbors. A marked vertex outside P P P thus has estimation error greater than its side’s threshold. There are at most 4 b p η / τ A 2 4bp\eta/\tau_A^2 4 b p η / τ A 2 such vertices on A A A and 4 a p η / τ B 2 4ap\eta/\tau_B^2 4 a p η / τ B 2 on B B B . Multiplying by the respective degree bounds proves the outside-cover bound.
The two volume bounds specify the accuracy needed from estimation. The retained volume must decrease, while the outside cover must remain cheap to test. We choose the thresholds and estimation accuracy together in the final parameter analysis. We now construct estimates satisfying these requirements.
Part 2: Graph partitioning. To simplify the problem, we find an edge partition of the graph into polylogarithmically many bipartite subgraphs with roughly uniform degrees on both sides of the bipartition. If for one of the subgraphs we label the sides A A A and B B B , then we have degree bounds d A ≤ d d_A \le d d A ≤ d and d B ≤ d d_B \le d d B ≤ d such that for v ∈ A v \in A v ∈ A and w ∈ B w \in B w ∈ B ,
d A γ ≤ deg ( v ) ≤ d A , and d B γ ≤ deg ( w ) ≤ d B , \frac{d_A}{\gamma}\le\deg(v)\le d_A,\qquad\text{and}\qquad\frac{d_B}{\gamma}\le\deg(w)\le d_B, γ d A ≤ deg ( v ) ≤ d A , and γ d B ≤ deg ( w ) ≤ d B ,
for a multiplicative factor γ \gamma γ that is polylogarithmic in n n n . This construction does not require any queries to the marked set, and hence does not incur any overhead in the resulting query complexity. Lemma C.2 states the partition guarantee, and Algorithm 13 in Appendix § 14 gives the construction.
Since the marked volume is additive over edge-disjoint graphs, we observe that for any bipartite subgraph, we have the same upper bound ℓ \ell ℓ on the marked volume. Since we simultaneously have a lower bound on the degrees, this translates into an upper bound on the number of marked vertices on either side of the bipartition. Indeed, we find that
∣ M ∩ A ∣ ≤ ℓ γ d A ∈ O ~ ( ℓ d A ) , and ∣ M ∩ B ∣ ≤ ℓ γ d B ∈ O ~ ( ℓ d B ) . |M\cap A|\le\frac{\ell\gamma}{d_A}\in\widetilde{O}\left(\frac{\ell}{d_A}\right),\qquad\text{and}\qquad|M\cap B|\le\frac{\ell\gamma}{d_B}\in\widetilde{O}\left(\frac{\ell}{d_B}\right). ∣ M ∩ A ∣ ≤ d A ℓ γ ∈ O ( d A ℓ ) , and ∣ M ∩ B ∣ ≤ d B ℓ γ ∈ O ( d B ℓ ) .
Indeed, on later iterations where ℓ \ell ℓ is smaller, this sparsity bound becomes more stringent, making the routines that exploit this sparsity more efficient.
Next, we run marked neighbor sampling on both sides of the bipartition individually, to obtain upper bounds θ A \theta_A θ A and θ B \theta_B θ B with high probability.
Lemma 4.4. Let G G G be bipartite with sides A , B A,B A , B , whose degrees lie in [ d A / γ , d A ] [d_A/\gamma,d_A] [ d A / γ , d A ] and [ d B / γ , d B ] [d_B/\gamma,d_B] [ d B / γ , d B ] , respectively. Suppose vol ( G , x ) ≤ ℓ \operatorname{vol}(G,x)\le\ell vol ( G , x ) ≤ ℓ , and let θ A , θ B > 0 \theta_A,\theta_B>0 θ A , θ B > 0 . Applying Algorithm 5 with source sets A A A and B B B and thresholds θ A \theta_A θ A and θ B \theta_B θ B , respectively, uses, conditional on good count estimates,
O ~ ( ∣ A ∣ + ∣ B ∣ + ∣ A ∣ ⋅ γ ℓ d A θ A + ∣ B ∣ ⋅ γ ℓ d B θ B ) \widetilde{O}\left(\sqrt{|A|}+\sqrt{|B|}+\frac{\sqrt{|A|\cdot\frac{\gamma\ell}{d_A}}}{\theta_A}+\frac{\sqrt{|B|\cdot\frac{\gamma\ell}{d_B}}}{\theta_B}\right) O ∣ A ∣ + ∣ B ∣ + θ A ∣ A ∣ ⋅ d A γ ℓ + θ B ∣ B ∣ ⋅ d B γ ℓ queries. Except with the assigned error probability, the routine detects a collision or returns a graph in which every vertex in A A A has at most θ B \theta_B θ B marked neighbors and every vertex in B B B has at most θ A \theta_A θ A marked neighbors.
Proof. The degree lower bounds give ∣ M ∩ A ∣ ≤ ℓ / d A |M\cap A|\le\ell/d_A ∣ M ∩ A ∣ ≤ ℓ / d A and ∣ M ∩ B ∣ ≤ ℓ / d B |M\cap B|\le\ell/d_B ∣ M ∩ B ∣ ≤ ℓ / d B . Apply Lemma 4.1 on both sides and substitute these count bounds into its cost. Later edge deletions preserve the marked neighbor bounds.
C C C -preconditioning
We now study the matrix C A C_A C A , indexed by vertices from A A A , where c u v = ∣ N G ( u ) ∩ N G ( v ) ∣ c_{uv}=|N_G(u)\cap N_G(v)| c uv = ∣ N G ( u ) ∩ N G ( v ) ∣ . Thus C A C_A C A is the product of the bipartite adjacency matrix with its transpose. That is, every entry c u v c_{uv} c uv contains the number of walks of length two between u u u and v v v . Since the degrees of u u u and v v v are bounded by d A d_A d A , we obtain that c u v c_{uv} c uv is trivially bounded by d A d_A d A as well.
Let’s consider a single row of C A C_A C A , indexed by the vertex u ∈ A u\in A u ∈ A . Intuitively, if we consider a subset R ⊆ A R\subseteq A R ⊆ A , such that for all v ∈ R v\in R v ∈ R the entries c u v c_{uv} c uv are large, then there must be many edges between R ⊆ A R\subseteq A R ⊆ A and N G ( u ) ⊆ B N_G(u)\subseteq B N G ( u ) ⊆ B . In fact, the number of edges between N G ( u ) N_G(u) N G ( u ) and R R R is
c u , R : = ∑ v ∈ R c u v . c_{u,R}:=\sum_{v\in R}c_{uv}. c u , R := v ∈ R ∑ c uv .
We refer to R R R as a dense region if c u , R 2 / ∣ R ∣ ≥ s A θ A d A / ( 2 log ( n ) ) c_{u,R}^2/|R|\ge s_A\theta_A d_A/(2\log(n)) c u , R 2 /∣ R ∣ ≥ s A θ A d A / ( 2 log ( n )) . The idea is to search for such dense regions first, and check for collisions in these regions separately. Algorithm 7 makes this intuition precise.
Algorithm 7 prepare_estimates
Input: A bipartite graph G G G , with vertex sets A A A and B B B , such that for all v ∈ A v\in A v ∈ A and w ∈ B w\in B w ∈ B , deg ( v ) ≤ d A \deg(v)\le d_A deg ( v ) ≤ d A , deg ( w ) ≤ d B \deg(w)\le d_B deg ( w ) ≤ d B , and the number of marked neighbors is at most θ B \theta_B θ B and θ A \theta_A θ A , respectively. Let s A ≥ 1 s_A\ge1 s A ≥ 1 and δ > 0 \delta>0 δ > 0 .
Initialize an empty list of recorded graphs.
for each row u ∈ A u\in A u ∈ A , in any fixed order:
Let A ′ : = { v ∈ A : c u v ≥ s A } A^\prime:=\{v\in A:c_{uv}\ge s_A\} A ′ := { v ∈ A : c uv ≥ s A } , and sort it such that c u v c_{uv} c uv is decreasing.
Find the longest initial segment R R R such that c u , R 2 / ∣ R ∣ ≥ s A θ A d A / ( 2 log ( n ) ) c_{u,R}^2/|R|\ge s_A\theta_A d_A/(2\log(n)) c u , R 2 /∣ R ∣ ≥ s A θ A d A / ( 2 log ( n )) . If none exist, continue.
If c u , R ≤ δ c_{u,R}\le\delta c u , R ≤ δ , continue.
Record the edges between R R R and N G ( u ) N_G(u) N G ( u ) , then delete them.
end for
Test the recorded graphs using bipartite_test and Lemma 2.5.
return G G G .
Lemma 4.5 (Extraction and coefficient bounds). Let G G G satisfy the input conditions of Algorithm 7, and let m = ∣ E ( G ) ∣ m=|E(G)| m = ∣ E ( G ) ∣ . For any s A ≥ 1 s_A\ge1 s A ≥ 1 and δ > 0 \delta>0 δ > 0 , the algorithm records at most one graph per row u ∈ A u\in A u ∈ A and uses
O ~ ( m [ s A − 1 / 3 ( θ B / θ A ) 1 / 6 + s A − 1 / 2 + d A / δ ] ) (5) \widetilde{O}\left(\sqrt{m}\left[s_A^{-1/3}(\theta_B/\theta_A)^{1/6}+s_A^{-1/2}+\sqrt{d_A/\delta}\right]\right) \tag*{(5)} O ( m [ s A − 1/3 ( θ B / θ A ) 1/6 + s A − 1/2 + d A / δ ] ) (5)
queries. On a negative input, every row u ∈ A u \in A u ∈ A of the output graph has a set E u ⊆ A E_u \subseteq A E u ⊆ A such that
∑ v ∈ M ∩ E u c u v ≤ δ , ∑ v ∈ M ∩ ( A ∖ E u ) c u v 2 ≤ 2 s A θ A d A = : v A . (6) \sum_{v\in M\cap E_u} c_{uv} \le\delta,\qquad\sum_{v\in M\cap(A\setminus E_u)} c_{uv}^{2} \le2s_A\theta_A d_A =: v_A. \tag*{(6)} v ∈ M ∩ E u ∑ c uv ≤ δ , v ∈ M ∩ ( A ∖ E u ) ∑ c uv 2 ≤ 2 s A θ A d A =: v A . (6)
Here c u v c_{uv} c uv denotes the common neighbor count in the output graph. On a positive input, a collision is detected or survives, except with the assigned error. Running the routine with A A A and B B B exchanged gives the corresponding bounds for rows in B B B , with v B = 2 s B θ B d B v_B = 2s_B\theta_B d_B v B = 2 s B θ B d B ; subsequent edge deletions preserve these coefficient bounds.
Proof. Put T = s A θ A d A / ( 2 log n ) T = s_A\theta_A d_A/(2\log n) T = s A θ A d A / ( 2 log n ) . Consider the moment when row u u u is processed. If its longest prefix satisfying c u , R 2 / ∣ R ∣ ≥ T c_{u,R}^{2}/|R| \ge T c u , R 2 /∣ R ∣ ≥ T has c u , R ≤ δ c_{u,R} \le\delta c u , R ≤ δ , then every prefix of sum greater than δ \delta δ fails this inequality. The same holds if no such prefix exists.
Otherwise the algorithm extracts R R R . If u ∈ R u \in R u ∈ R , every edge incident to u u u is deleted, so its row becomes zero and remains zero. If u ∉ R u \notin R u ∈ / R , bipartiteness implies that extraction leaves N G ( u ) N_G(u) N G ( u ) unchanged, zeros the coefficients indexed by R R R , and leaves the other coefficients in row u u u unchanged. No remaining prefix Q Q Q can satisfy c u , Q 2 / ∣ Q ∣ ≥ T c_{u,Q}^{2}/|Q| \ge T c u , Q 2 /∣ Q ∣ ≥ T : if one did, then
c u , R + c u , Q ≥ T ( ∣ R ∣ + ∣ Q ∣ ) > T ( ∣ R ∣ + ∣ Q ∣ ) , c_{u,R}+c_{u,Q} \ge\sqrt{T}\left(\sqrt{|R|}+\sqrt{|Q|}\right) > \sqrt{T(|R|+|Q|)}, c u , R + c u , Q ≥ T ( ∣ R ∣ + ∣ Q ∣ ) > T ( ∣ R ∣ + ∣ Q ∣ ) ,
contradicting the maximal length of R R R . Subsequent edge deletions cannot increase the sum of the largest i i i coefficients for any i i i . Thus, in the final graph, every prefix of sum greater than δ \delta δ has squared sum-of-coefficients divided by its length less than T T T .
Write the final large coefficients of row u u u as c 1 ≥ c 2 ≥ ⋯ c_1 \ge c_2 \ge\cdots c 1 ≥ c 2 ≥ ⋯ . Let E u E_u E u consist of the vertices in the longest prefix with coefficient sum at most δ \delta δ . For each rank i i i outside this prefix,
c i 2 ≤ 1 i 2 ( ∑ h = 1 i c h ) 2 ≤ T i . c_i^2 \le\frac{1}{i^2}\left(\sum_{h=1}^{i}c_h\right)^2 \le\frac{T}{i}. c i 2 ≤ i 2 1 ( h = 1 ∑ i c h ) 2 ≤ i T .
Summing and using ∑ i = 1 n 1 / i ≤ 2 log n \sum_{i=1}^{n}1/i \le2\log n ∑ i = 1 n 1/ i ≤ 2 log n bounds the squared sum of these large coefficients by s A θ A d A s_A\theta_A d_A s A θ A d A . The small coefficients, including the diagonal if it is below s A s_A s A , contribute at most
∑ v ∈ M ∩ A c u v < s A c u v 2 ≤ s A ∑ w ∈ N G ( u ) ∣ N G ( w ) ∩ M ∩ A ∣ ≤ s A θ A d A . \sum_{\substack{v\in M\cap A\\c_{uv}<s_A}} c_{uv}^{2}
\le s_A\sum_{w\in N_G(u)}|N_G(w)\cap M\cap A|
\le s_A\theta_A d_A. v ∈ M ∩ A c uv < s A ∑ c uv 2 ≤ s A w ∈ N G ( u ) ∑ ∣ N G ( w ) ∩ M ∩ A ∣ ≤ s A θ A d A .
By construction, the total coefficient sum over E u E_u E u is at most δ \delta δ , so its marked contribution is also at most δ \delta δ . This proves (6) .
For each recorded graph, use the graph at the moment of extraction. Its sides are disjoint, its edge count is exactly c u , R c_{u,R} c u , R , and its neighborhood side has at most θ B \theta_B θ B marked vertices. The selection rule gives
∣ R ∣ ≤ c u , R / s A , ∣ N G ( u ) ∣ ≤ d A , c u , R > δ , d A θ B ≤ 2 c u , R 2 θ B log n s A θ A ∣ R ∣ . |R| \le c_{u,R}/s_A,\qquad|N_G(u)| \le d_A,\qquad c_{u,R}>\delta,\qquad d_A\theta_B \le\frac{2c_{u,R}^{2}\theta_B\log n}{s_A\theta_A|R|}. ∣ R ∣ ≤ c u , R / s A , ∣ N G ( u ) ∣ ≤ d A , c u , R > δ , d A θ B ≤ s A θ A ∣ R ∣ 2 c u , R 2 θ B log n .
Consequently,
( ∣ R ∣ 2 ∣ N G ( u ) ∣ θ B ) 1 / 3 ≤ ( 2 log n ) 1 / 3 c u , R s A − 2 / 3 ( θ B / θ A ) 1 / 3 . \left(|R|^{2}|N_G(u)|\theta_B\right)^{1/3}
\le(2\log n)^{1/3}c_{u,R}s_A^{-2/3}\left(\theta_B/\theta_A\right)^{1/3}. ( ∣ R ∣ 2 ∣ N G ( u ) ∣ θ B ) 1/3 ≤ ( 2 log n ) 1/3 c u , R s A − 2/3 ( θ B / θ A ) 1/3 .
There is at most one recorded graph per row, and the recorded edge lists are disjoint, so ∑ c u , R ≤ m \sum c_{u,R}\le m ∑ c u , R ≤ m . The squared bipartite test costs therefore sum to
O ~ ( m / s A + m d A / δ + m s A − 2 / 3 ( θ B / θ A ) 1 / 3 ) . \widetilde{O}\left(m/s_A+md_A/\delta+ms_A^{-2/3}\left(\theta_B/\theta_A\right)^{1/3}\right). O ( m / s A + m d A / δ + m s A − 2/3 ( θ B / θ A ) 1/3 ) .
Lemma 2.5 proves (5) . Every deleted edge belongs to a recorded graph, so a collision is detected or survives, except with the assigned test error. Exchanging the sides proves the corresponding statement for B B B . Subsequent deletions only decrease coefficients, preserving both bounds for the same exceptional sets.
Estimating common neighbor sums
Now that we have preconditioned the matrix C A C_A C A , we focus on the vector C A 1 M ∩ A C_A1_{M\cap A} C A 1 M ∩ A . This vector intuitively represents a vector indexed by A A A , counting the number of length-two walks to a marked vertex.
The goal is to estimate a vector z z z that approximates C A 1 M ∩ A C_A1_{M\cap A} C A 1 M ∩ A in ℓ ∞ \ell_\infty ℓ ∞ -norm. We can do this efficiently now, since Lemma 4.5 guarantees that the squared row sum over marked entries outside E u E_u E u is small. We can sample uniformly from M ∩ A M\cap A M ∩ A with O ~ ( n / k ) \widetilde{O}(\sqrt{n/k}) O ( n / k ) queries, where k = ∣ M ∩ A ∣ k=|M\cap A| k = ∣ M ∩ A ∣ . Thus, the u u u th entry of C A 1 M ∩ A C_A1_{M\cap A} C A 1 M ∩ A is ∑ v ∈ M ∩ A c u v = E [ k c u v ] \sum_{v\in M\cap A}c_{uv}=\mathbb{E}[kc_{uv}] ∑ v ∈ M ∩ A c uv = E [ k c uv ] , where the expectation is over a uniform vertex v ∈ M ∩ A v\in M\cap A v ∈ M ∩ A . The corresponding variance becomes
Var v ∼ M ∩ A [ k c u v ] ≤ k 2 E v ∼ M ∩ A [ c u v 2 ] = k ∑ v ∈ M ∩ A c u v 2 . \operatorname{Var}_{v\sim M\cap A}[kc_{uv}]\le k^2\mathbb{E}_{v\sim M\cap A}[c_{uv}^2]=k\sum_{v\in M\cap A}c_{uv}^2. Var v ∼ M ∩ A [ k c uv ] ≤ k 2 E v ∼ M ∩ A [ c uv 2 ] = k v ∈ M ∩ A ∑ c uv 2 .
Using concentration, we can thus show that after t t t samples, with cost O ~ ( t n / k ) \widetilde{O}(t\sqrt{n/k}) O ( t n / k ) , we have with high probability
∥ z − C A 1 M ∩ A ∥ ∞ = O ~ ( k t max u ∈ A ∑ v ∈ M ∩ A c u v 2 ) . \lVert z-C_A1_{M\cap A}\rVert_\infty=\widetilde{O}\left(\sqrt{\frac{k}{t}\max_{u\in A}\sum_{v\in M\cap A}c_{uv}^2}\right). ∥ z − C A 1 M ∩ A ∥ ∞ = O ( t k u ∈ A max v ∈ M ∩ A ∑ c uv 2 ) .
We use this general idea to estimate an approximation of C A 1 M ∩ A C_A1_{M\cap A} C A 1 M ∩ A , but we observe from Lemma 4.5 that we can’t upper bound the entire sum of squared entries of a given row labeled by u ∈ A u\in A u ∈ A . Instead, we deal with the exceptional set E u E_u E u separately in the proof. Algorithm 8 makes this idea precise.
Algorithm 8 estimate_sums
Input: A bipartite graph G G G with vertex sets A A A and B B B . Let C A C_A C A be its common neighbor matrix indexed by A A A . Let 0 < v ≤ δ 2 0<v\le\delta^2 0 < v ≤ δ 2 .
Estimate r = ∣ M ∩ A ∣ r=|M\cap A| r = ∣ M ∩ A ∣ by r ^ \widehat r r using Lemma 2.4.
If r ^ = 0 \widehat r=0 r = 0 , return the zero vector.
Let h = Θ ( 1 + r ^ v / δ 2 ) h=\Theta(1+\widehat r v/\delta^2) h = Θ ( 1 + r v / δ 2 ) .
Obtain Θ ( log ( n / ϵ ) ) \Theta(\log(n/\epsilon)) Θ ( log ( n / ϵ )) independent batches of h h h uniform marked samples from A A A .
Compute each batch average ( r ^ / h ) ∑ i = 1 h c u w i (\widehat r/h)\sum_{i=1}^{h}c_{uw_i} ( r / h ) ∑ i = 1 h c u w i for every row u u u .
Let z u z_u z u be the median of these averages, separately for each row.
return z z z .
Lemma 4.6 (Sample averages). Let A A A be a source set of size a a a , write r = ∣ M ∩ A ∣ r=|M\cap A| r = ∣ M ∩ A ∣ , and let f u = ∑ w ∈ M ∩ A c u w f_u=\sum_{w\in M\cap A}c_{uw} f u = ∑ w ∈ M ∩ A c u w . Suppose 0 < v ≤ δ 2 0<v\le\delta^2 0 < v ≤ δ 2 and that, on a good negative execution, each row has a set E u ⊆ A E_u\subseteq A E u ⊆ A such that
∑ w ∈ M ∩ E u c u w ≤ δ , ∑ w ∈ M ∩ ( A ∖ E u ) c u w 2 ≤ v . \sum_{w\in M\cap E_u}c_{uw}\le\delta,\qquad\sum_{w\in M\cap(A\setminus E_u)}c_{uw}^2\le v. w ∈ M ∩ E u ∑ c u w ≤ δ , w ∈ M ∩ ( A ∖ E u ) ∑ c u w 2 ≤ v . Then Algorithm 8 returns estimates with ∣ f u − z u ∣ ∈ O ( δ ) |f_u-z_u|\in O(\delta) ∣ f u − z u ∣ ∈ O ( δ ) for every row, conditional on a good count estimate and except with the assigned error. The sets E u E_u E u are used only in the proof. Conditional on a good count estimate, its query cost, including counting, is
O ~ ( a + a ∣ M ∩ A ∣ v / δ 2 ) . (7) \widetilde{O}\left(\sqrt{a}+\sqrt{a|M\cap A|}\,v/\delta^2\right). \tag*{(7)} O ( a + a ∣ M ∩ A ∣ v / δ 2 ) . (7)
Proof. First suppose r = ∣ M ∩ A ∣ > 0 r = |M \cap A| > 0 r = ∣ M ∩ A ∣ > 0 . Fix a row and split one batch average into the contributions from E u E_u E u and A ∖ E u A \setminus E_u A ∖ E u . The latter contribution has variance at most 2 r ^ v / h 2\hat r v/h 2 r ^ v / h . Replacing r r r by r ^ \hat r r ^ in its normalization changes its mean by at most
∣ r ^ − r ∣ v / r = O ( v ) = O ( δ ) . |\hat r-r|\sqrt{v/r}=O(\sqrt{v})=O(\delta). ∣ r ^ − r ∣ v / r = O ( v ) = O ( δ ) .
Chebyshev’s inequality therefore bounds its error by O ( δ ) O(\delta) O ( δ ) with probability at least 7 / 8 7/8 7/8 , for a sufficiently large batch constant.
The contribution from E u E_u E u is nonnegative and has expectation at most 2 δ 2\delta 2 δ , since r ^ / r ≤ 2 \hat r/r \le2 r ^ / r ≤ 2 . Markov’s inequality bounds it by O ( δ ) O(\delta) O ( δ ) with probability at least 7 / 8 7/8 7/8 . Its true contribution is at most δ \delta δ . Thus the full batch average differs from f u f_u f u by O ( δ ) O(\delta) O ( δ ) with probability at least 3 / 4 3/4 3/4 .
Independent batches and a median give failure probability at most ϵ / n \epsilon/n ϵ / n for each row. A union bound gives the claimed simultaneous two-sided accuracy. If r = 0 r = 0 r = 0 , a good count estimate is zero and the algorithm correctly returns the zero vector.
Counting costs O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) queries. For r ^ > 0 \hat r > 0 r ^ > 0 , the total sampling limit is O ~ ( a / r ^ + r ^ v / δ 2 ) \widetilde{O}(\sqrt{a/\hat r}+\sqrt{\hat r}v/\delta^2) O ( a / r ^ + r ^ v / δ 2 ) . On a good estimate, r ^ ≤ 2 r \hat r \le2r r ^ ≤ 2 r and r ^ ≥ 1 \hat r \ge1 r ^ ≥ 1 , proving (7) . If r = 0 r = 0 r = 0 , a good estimate returns zero and only the counting cost remains. The sampling limit is fixed once r ^ \hat r r ^ is obtained; the bound in terms of the true marked count holds except with the assigned counting error. □
Total volume reduction subroutine. Algorithm 9 combines the preceding routines with arbitrary sampling, extraction, and threshold parameters. Let v A = 2 s A θ A d A v_A = 2s_A\theta_A d_A v A = 2 s A θ A d A and v B = 2 s B θ B d B v_B = 2s_B\theta_B d_B v B = 2 s B θ B d B . Algorithm 6 stays within its query budget on every input when its counting and sampling calls succeed. Here the budget is guaranteed only on negative inputs satisfying the marked count bounds, so we return Yes on timeout to preserve acceptance on positive inputs.
Algorithm 9 reduce_volume
Input: A bipartite graph G with side sizes a, b, degree bounds d_A, d_B, marked fraction bound p \in [0, 1], and parameters \theta_A, \theta_B, \delta, \tau_A, \tau_B > 0, s_A, s_B \ge 1, with v_A, v_B \le \delta^2. Return Yes if the total query count exceeds a sufficiently large budget \widetilde{O}(Q) from Lemma 4.7.
1: G \leftarrow sample_marked_neighborhoods(G, A, \theta_A) and G \leftarrow sample_marked_neighborhoods(G, B, \theta_B).
2: Run prepare_estimates on G with the supplied parameters, first for rows in A and then with the sides exchanged.
3: Estimate each side’s common neighbor sums by estimate_sums, with bounds (v_A, \delta) and (v_B, \delta) respectively.
4: Minimize \psi_z(S) subject to |S \cap A| \le ap and |S \cap B| \le bp.
5: Let P = \{u \in A : \ell_u(S) \le \tau_A\} \cup \{u \in B : \ell_u(S) \le \tau_B\}.
6: Test the edges outside G[P] with cover_test, cover V(G) \setminus P, and bound b_{\mathrm{out}}.
7: Return G[P].
Lemma 4.7 (Piece reduction). Let G G G have m m m edges and satisfy the input conditions of Algorithm 9. Suppose ∣ M ∩ A ∣ ≤ a p |M \cap A| \le ap ∣ M ∩ A ∣ ≤ a p and ∣ M ∩ B ∣ ≤ b p |M \cap B| \le bp ∣ M ∩ B ∣ ≤ b p on the negative inputs under consideration. On a good negative execution the output has marked volume at most
a τ A + b τ B + O ( a b p δ ) . a\tau_A+b\tau_B+O(\sqrt{abp\delta}). a τ A + b τ B + O ( ab p δ ) . On the same good negative execution, the edges discarded after estimating the counts have a cover of marked volume at most
b o u t = c 0 p δ ( d A b τ A 2 + d B a τ B 2 ) , b_{\mathrm{out}}=c_0p\delta\left(\frac{d_A b}{\tau_A^2}+\frac{d_B a}{\tau_B^2}\right), b out = c 0 p δ ( τ A 2 d A b + τ B 2 d B a ) ,
for a sufficiently large absolute constant c 0 c_0 c 0 . The query complexity is O ~ ( Q ) \widetilde{O}(Q) O ( Q ) , where
Q = a + b + a p θ A + b p θ B + Q e x t r a c t + p ( a v A + b v B ) δ 2 + b o u t . Q = \sqrt{a+b}+\frac{a\sqrt{p}}{\theta_A}+\frac{b\sqrt{p}}{\theta_B}+Q_{\mathrm{extract}}+\frac{\sqrt{p}(av_A+bv_B)}{\delta^2}+\sqrt{b_{\mathrm{out}}}. Q = a + b + θ A a p + θ B b p + Q extract + δ 2 p ( a v A + b v B ) + b out .
Q e x t r a c t = m [ s A − 1 / 3 ( θ B / θ A ) 1 / 6 + s B − 1 / 3 ( θ A / θ B ) 1 / 6 + s A − 1 / 2 + s B − 1 / 2 + d A / δ + d B / δ ] . Q_{\mathrm{extract}}=\sqrt{m}\left[s_A^{-1/3}\left(\theta_B/\theta_A\right)^{1/6}+s_B^{-1/3}\left(\theta_A/\theta_B\right)^{1/6}+s_A^{-1/2}+s_B^{-1/2}+\sqrt{d_A/\delta}+\sqrt{d_B/\delta}\right]. Q extract = m [ s A − 1/3 ( θ B / θ A ) 1/6 + s B − 1/3 ( θ A / θ B ) 1/6 + s A − 1/2 + s B − 1/2 + d A / δ + d B / δ ] .
On a positive input, a collision is detected or survives, except with the assigned error.
Proof. Keep side labels, sizes, and degree bounds fixed during deletions. Lemma 4.1 bounds the two sampling costs by O ~ ( a + b + a p / θ A + b p / θ B ) \widetilde{O}(\sqrt{a+b}+a\sqrt{p}/\theta_A+b\sqrt{p}/\theta_B) O ( a + b + a p / θ A + b p / θ B ) on good count estimates. It establishes the marked-neighbor bounds required by Lemma 4.5 . Applying that lemma on both sides costs O ~ ( Q e x t r a c t ) \widetilde{O}(Q_{\mathrm{extract}}) O ( Q extract ) and supplies exceptional contributions at most δ \delta δ and squared-sum bounds v A , v B v_A,v_B v A , v B . The second application preserves the first application’s bounds under edge deletions.
Lemma 4.6, using fresh samples from the graph remaining after preprocessing, gives coordinate error O ( δ ) O(\delta) O ( δ ) at cost O ~ ( a + b + p ( a v A + b v B ) / δ 2 ) \widetilde{O}(\sqrt{a+b}+\sqrt{p}(av_A+bv_B)/\delta^2) O ( a + b + p ( a v A + b v B ) / δ 2 ) . Lemma 4.3 now gives the retained volume bound and the outside-cover bound b o u t b_{\mathrm{out}} b out . Testing this cover costs O ~ ( a + b + b o u t ) \widetilde{O}(\sqrt{a+b}+\sqrt{b_{\mathrm{out}}}) O ( a + b + b out ) by Lemma 2.7. Adding the costs proves the claimed bound on good negative executions.
Choose the global budget large enough to cover these executions. A union bound over the internal error events makes timeout negligible on allowed negative inputs, and the cutoff enforces the worst-case query bound. Every deleted edge is covered by a preceding collision test or neighborhood search. Thus a positive input is detected or retains a collision; returning Yes on timeout preserves this guarantee even when the marked count bounds fail.
Parameter optimization. Fix a target query parameter t ≥ n t \ge\sqrt{n} t ≥ n and a base cutoff s ≥ 1 s \ge1 s ≥ 1 . At current volume bound ℓ \ell ℓ , partition the edges into j = O ( ( log n ) 3 ) j=O((\log n)^3) j = O (( log n ) 3 ) pieces. For a piece with sides of sizes a , b a,b a , b and m > t 2 m>t^2 m > t 2 edges, use the explicit choices
p = min { 1 , γ ℓ / m } , τ A = ℓ 32 j a , τ B = ℓ 32 j b , δ = c ℓ t 2 j 2 γ 2 a b , p=\min\{1,\gamma\ell/m\},\qquad\tau_A=\frac{\ell}{32ja},\qquad\tau_B=\frac{\ell}{32jb},\qquad\delta=\frac{c\ell t^2}{j^2\gamma^2ab}, p = min { 1 , γ ℓ / m } , τ A = 32 j a ℓ , τ B = 32 j b ℓ , δ = j 2 γ 2 ab c ℓ t 2 ,
θ A = a p t , θ B = b p t , s A = s b / a , s B = s a / b . (8) \theta_A=\frac{a\sqrt{p}}{t},\qquad\theta_B=\frac{b\sqrt{p}}{t},\qquad s_A=s\sqrt{b/a},\qquad s_B=s\sqrt{a/b}. \tag*{(8)} θ A = t a p , θ B = t b p , s A = s b / a , s B = s a / b . (8)
where c > 0 c>0 c > 0 is a sufficiently small absolute constant. As before, put v A = 2 s A θ A d A v_A=2s_A\theta_A d_A v A = 2 s A θ A d A and v B = 2 s B θ B d B v_B=2s_B\theta_B d_B v B = 2 s B θ B d B .
Algorithm 10 Collision search with bounded maximum degree
Input: A known bipartite graph G G G on at most n n n labels of maximum degree at most d d d , where 1 ≤ d ≤ n 1\le d\le n 1 ≤ d ≤ n .
Let T = max { n 13 / 22 d 3 / 22 , n 1 / 2 d 1 / 3 } T=\max\{n^{13/22}d^{3/22},n^{1/2}d^{1/3}\} T = max { n 13/22 d 3/22 , n 1/2 d 1/3 } and t = K log 10 ( 2 n ) T t=K\log^{10}(2n)T t = K log 10 ( 2 n ) T , for a sufficiently large absolute constant K K K .
If t ≥ n d t\ge\sqrt{nd} t ≥ n d , return cover_test( G , V ( G ) , n d ) (G,V(G),nd) ( G , V ( G ) , n d ) .
Let s = ( n d ) 3 / 2 / t 3 s=(nd)^{3/2}/t^3 s = ( n d ) 3/2 / t 3 .
Let ℓ = n d \ell=nd ℓ = n d .
while ℓ > t 2 \ell>t^2 ℓ > t 2 :
If G G G is edgeless, return No.
Partition G G G using partition_edges; let j j j be the number of pieces.
Search each piece with at most t 2 t^2 t 2 edges directly; return Yes on a collision, and otherwise discard it.
For every remaining piece, call reduce_volume with the parameters in (8) and retain its returned edge list.
Replace G G G by the union of the retained edge lists and let ℓ ← ℓ / 2 \ell\leftarrow\ell/2 ℓ ← ℓ /2 .
end while
Return cover_test( G , V ( G ) , t 2 ) (G,V(G),t^2) ( G , V ( G ) , t 2 ) .
Lemma 4.8 (Iterated volume reduction). Algorithm 10 decides graph collision with bounded error for bipartite graphs on at most n n n labels of maximum degree at most d d d , using
O ~ ( min { n d , max { n 13 / 22 d 3 / 22 , n 1 / 2 d 1 / 3 } } ) \widetilde{O}\left(\min\left\{\sqrt{nd},\max\left\{n^{13/22}d^{3/22},n^{1/2}d^{1/3}\right\}\right\}\right) O ( min { n d , max { n 13/22 d 3/22 , n 1/2 d 1/3 } } ) queries. Its parameter choices satisfy s A , s B ≥ 1 s_A,s_B \ge1 s A , s B ≥ 1 and v A , v B ≤ δ 2 v_A,v_B \le\delta^2 v A , v B ≤ δ 2 in every call to reduce_volume.
Proof. Initially the marked volume is at most n d nd n d . On a good negative execution, each partition piece has marked volume at most ℓ \ell ℓ . By Lemma C.1 , its minimum degrees imply ∣ M ∩ A ∣ ≤ a p |M \cap A| \le ap ∣ M ∩ A ∣ ≤ a p and ∣ M ∩ B ∣ ≤ b p |M \cap B| \le bp ∣ M ∩ B ∣ ≤ b p . The threshold terms sum to ℓ / ( 16 j ) \ell/(16j) ℓ / ( 16 j ) , and
a b p δ ≤ c ℓ j γ t m ≤ c ℓ j γ . \sqrt{abp\delta} \le\frac{\sqrt{c\ell}}{j\sqrt{\gamma}}\frac{t}{\sqrt{m}} \le\frac{\sqrt{c\ell}}{j\sqrt{\gamma}}. ab p δ ≤ j γ c ℓ m t ≤ j γ c ℓ . Thus Lemma 4.7 retains volume at most ℓ / ( 4 j ) \ell/(4j) ℓ / ( 4 j ) per piece for sufficiently small c c c . Summing the disjoint retained edge lists gives volume at most ℓ / 4 \ell/4 ℓ /4 , so halving ℓ \ell ℓ preserves the invariant. The final cover test rejects on good negative executions. On positive inputs, every deleted collision is covered by a preceding search or test, so a collision is detected or survives. The prescribed reduction cutoffs return Yes and add only their assigned error on negative inputs.
We bound the costs in Lemma 4.7 . Sampling costs O ~ ( t ) \widetilde{O}(t) O ( t ) . Since θ B / θ A = b / a \theta_B/\theta_A=b/a θ B / θ A = b / a , the first extraction term on either side is at most n d s − 1 / 3 \sqrt{nd}\,s^{-1/3} n d s − 1/3 . Since m ≤ min { a , b } d m \le\min\{a,b\}d m ≤ min { a , b } d , we have m a / b ≤ m ⋅ a d ≤ a d ≤ n d m\sqrt{a/b} \le\sqrt{m}\cdot ad \le ad \le nd m a / b ≤ m ⋅ a d ≤ a d ≤ n d . Hence m / s A ≤ n d / s m/s_A \le nd/s m / s A ≤ n d / s , and symmetrically m / s B ≤ n d / s m/s_B \le nd/s m / s B ≤ n d / s . Also,
m d A / δ , m d B / δ ≤ O ~ ( n 3 / 2 d t ℓ ) ≤ O ~ ( n 3 / 2 d t 2 ) , \sqrt{md_A/\delta},\ \sqrt{md_B/\delta} \le\widetilde{O}\left(\frac{n^{3/2}d}{t\sqrt{\ell}}\right) \le\widetilde{O}\left(\frac{n^{3/2}d}{t^2}\right), m d A / δ , m d B / δ ≤ O ( t ℓ n 3/2 d ) ≤ O ( t 2 n 3/2 d ) , using ℓ > t 2 \ell>t^2 ℓ > t 2 , m ≤ n d m\le nd m ≤ n d , and d A , d B ≤ d d_A,d_B\le d d A , d B ≤ d . For estimation, p d A ≤ γ 2 ℓ / a pd_A\le\gamma^2\ell/a p d A ≤ γ 2 ℓ / a gives
a p v A δ 2 ≤ O ~ ( s ( a b ) 5 / 2 ℓ t 5 ) ≤ O ~ ( s n 5 t 7 ) , \frac{a\sqrt{p}\,v_A}{\delta^2} \le\widetilde{O}\left(\frac{s(ab)^{5/2}}{\ell t^5}\right) \le\widetilde{O}\left(\frac{sn^5}{t^7}\right), δ 2 a p v A ≤ O ( ℓ t 5 s ( ab ) 5/2 ) ≤ O ( t 7 s n 5 ) , and the same holds on B B B . Finally, the outside-cover bound is b o u t = O ( c t 2 ) b_{\mathrm{out}}=O(ct^2) b out = O ( c t 2 ) because p m ≤ γ ℓ pm\le\gamma\ell p m ≤ γ ℓ and d A ≤ γ m / a d_A\le\gamma m/a d A ≤ γ m / a , d B ≤ γ m / b d_B\le\gamma m/b d B ≤ γ m / b , so its test costs O ~ ( t ) \widetilde{O}(t) O ( t ) . Direct searches and the final cover test also cost O ~ ( t ) \widetilde{O}(t) O ( t ) each. Summing over logarithmically many rounds and pieces proves the bound. A union bound with sufficiently small elementary errors gives bounded error overall.
It remains to verify the parameter choices. If t ≥ n d t\ge\sqrt{nd} t ≥ n d , the direct cover test costs O ~ ( n d ) \widetilde{O}(\sqrt{nd}) O ( n d ) . This is within a logarithmic factor of the stated minimum. Otherwise s = ( n d / t ) 3 ≥ 1 s=(\sqrt{nd}/t)^3\ge1 s = ( n d / t ) 3 ≥ 1 . A piece with m > t 2 m>t^2 m > t 2 has a , b > t 2 / d a,b>t^2/d a , b > t 2 / d and a , b ≤ n a,b\le n a , b ≤ n , so
s A , s B ≥ s t n d = n d t 2 > 1. s_A,s_B \ge\frac{st}{\sqrt{nd}}=\frac{nd}{t^2}>1. s A , s B ≥ n d s t = t 2 n d > 1. For the variance condition, a d A ≤ γ m ad_A\le\gamma m a d A ≤ γ m , p ≤ γ ℓ / m p\le\gamma\ell/m p ≤ γ ℓ / m , and d A ≤ d d_A\le d d A ≤ d imply p d A 2 ≤ γ 2 ℓ d / a pd_A^2\le\gamma^2\ell d/a p d A 2 ≤ γ 2 ℓ d / a . Hence
v A δ 2 ≤ O ~ ( s ( a b ) 5 / 2 p d A ℓ 2 t 5 ) ≤ O ~ ( s n 9 / 2 d t 8 ) = O ~ ( n 6 d 2 t 11 ) , \frac{v_A}{\delta^2} \le\widetilde{O}\left(\frac{s(ab)^{5/2}\sqrt{p}\,d_A}{\ell^2t^5}\right) \le\widetilde{O}\left(\frac{sn^{9/2}\sqrt{d}}{t^8}\right) = \widetilde{O}\left(\frac{n^6d^2}{t^{11}}\right), δ 2 v A ≤ O ( ℓ 2 t 5 s ( ab ) 5/2 p d A ) ≤ O ( t 8 s n 9/2 d ) = O ( t 11 n 6 d 2 ) , using ℓ > t 2 \ell>t^2 ℓ > t 2 . Since d ≤ n d\le n d ≤ n and T 11 ≥ n 13 / 2 d 3 / 2 ≥ n 6 d 2 T^{11}\ge n^{13/2}d^{3/2}\ge n^6d^2 T 11 ≥ n 13/2 d 3/2 ≥ n 6 d 2 , the logarithmic slack in t t t ensures v A ≤ δ 2 v_A\le\delta^2 v A ≤ δ 2 . The same argument applies to v B v_B v B .
The cost calculation above gives
O ~ ( t + n d s − 1 / 3 + n d / s + n 3 / 2 d t 2 + s n 5 t 7 ) . \widetilde{O}\left(t+\sqrt{nd}\,s^{-1/3}+\sqrt{nd/s}+\frac{n^{3/2}d}{t^2}+\frac{sn^5}{t^7}\right). O ( t + n d s − 1/3 + n d / s + t 2 n 3/2 d + t 7 s n 5 ) .
The second term equals t t t , and the third is at most t t t because s ≥ 1 s \ge1 s ≥ 1 . The fourth is at most t t t by T 3 ≥ n 3 / 2 / d T^3 \ge n^{3/2}/d T 3 ≥ n 3/2 / d . The last equals n 13 / 2 d 3 / 2 / t 10 n^{13/2}d^{3/2}/t^{10} n 13/2 d 3/2 / t 10 and is at most t t t by the definition of T T T . Thus the iterative branch costs O ~ ( T ) \widetilde{O}(T) O ( T ) , proving the claim.
Finishing the argument
We can now combine the low- and high-degree algorithms and optimize the degree cut-off d d d to minimize the resulting query complexity. This gives the final query complexity bound stated in the introduction.
Proof of Theorem 1.1. Choose a degree threshold d d d . First apply Lemma 4.2, which detects a collision or returns a graph of maximum degree at most d d d , preserving a collision if one exists, except with the assigned error. This costs O ~ ( n 3 / 4 / d 1 / 4 ) \widetilde{O}(n^{3/4}/d^{1/4}) O ( n 3/4 / d 1/4 ) queries. Apply Lemma 2.3 to the returned graph; this gives a bipartite graph on 2 n 2n 2 n labels whose maximum degree is still at most d d d . Apply Lemma 4.8 to this bipartite graph. Its cost is at most
O ~ ( max { n 13 / 22 d 3 / 22 , n 1 / 2 d 1 / 3 } ) . \widetilde{O}\left(\max\left\{n^{13/22}d^{3/22},n^{1/2}d^{1/3}\right\}\right). O ( max { n 13/22 d 3/22 , n 1/2 d 1/3 } ) .
Balancing the high-degree cost with the first low-degree term gives
n 3 / 4 d 1 / 4 = n 13 / 22 d 3 / 22 , d = ⌈ n 7 / 17 ⌉ . \frac{n^{3/4}}{d^{1/4}}=n^{13/22}d^{3/22},\qquad d=\lceil n^{7/17}\rceil. d 1/4 n 3/4 = n 13/22 d 3/22 , d = ⌈ n 7/17 ⌉ .
Both balanced terms are O ~ ( n 11 / 17 ) \widetilde{O}(n^{11/17}) O ( n 11/17 ) . The remaining term is smaller:
n 1 / 2 d 1 / 3 = O ( n 65 / 102 ) = O ( n 11 / 17 ) . n^{1/2}d^{1/3}=O(n^{65/102})=O(n^{11/17}). n 1/2 d 1/3 = O ( n 65/102 ) = O ( n 11/17 ) .
Thus the total query complexity is O ~ ( n 11 / 17 ) \widetilde{O}(n^{11/17}) O ( n 11/17 ) . On a negative input both routines reject, and on a positive input the first detects a collision or preserves one for the second. Amplifying each routine to error at most 1 / 6 1/6 1/6 gives total error at most 1 / 3 1/3 1/3 . For bounded n n n , query all input bits. Repeating the algorithm O ( log n ) O(\log n) O ( log n ) times and taking the majority gives the stated high probability guarantee.
Functions with positive certificates of size two
The preceding algorithm also applies to functions with positive certificates of size at most two over an arbitrary finite alphabet.
Let Σ \Sigma Σ be an alphabet of size q q q , and let f : D → { 0 , 1 } f:D\to\{0,1\} f : D → { 0 , 1 } , where D ⊆ Σ n D\subseteq\Sigma^n D ⊆ Σ n . A positive certificate is a partial assignment that forces the value 1 1 1 among inputs in D D D . Let C 1 ( f ) C_1(f) C 1 ( f ) be the least nonnegative integer such that every positive input has a positive certificate of size at most C 1 ( f ) C_1(f) C 1 ( f ) . Write Q 2 ( f ) Q_2(f) Q 2 ( f ) for the quantum query complexity with error at most 1 / 3 1/3 1/3 .
Lemma 5.1 (Reduction to graph collision). Let f : D → { 0 , 1 } f:D\to\{0,1\} f : D → { 0 , 1 } be a (partial) function, where D ⊆ Σ n D\subseteq\Sigma^n D ⊆ Σ n , n ≥ 2 n\ge2 n ≥ 2 , ∣ Σ ∣ = q |\Sigma|=q ∣Σ∣ = q , and C 1 ( f ) ≤ 2 C_1(f)\le2 C 1 ( f ) ≤ 2 . There is a known simple graph G G G on n q nq n q vertices and a
bit string y ( x ) y(x) y ( x ) such that, for every x ∈ D x \in D x ∈ D ,
f ( x ) = gc G ( y ( x ) ) , gc G ( y ) = ⋁ { u , v } ∈ E ( G ) ( y u ∧ y v ) . f(x) = \operatorname{gc}_{G}(y(x)), \qquad\operatorname{gc}_{G}(y) = \bigvee_{\{u,v\}\in E(G)} (y_u \wedge y_v). f ( x ) = gc G ( y ( x )) , gc G ( y ) = { u , v } ∈ E ( G ) ⋁ ( y u ∧ y v ) .
Each query to y ( x ) y(x) y ( x ) can be simulated with at most two queries to x x x . Consequently, Q 2 ( f ) ≤ 2 Q 2 ( gc G ) Q_2(f) \le2Q_2(\operatorname{gc}_{G}) Q 2 ( f ) ≤ 2 Q 2 ( gc G ) . For binary inputs, one query suffices and the factor 2 can be omitted.
Proof. Suppose first that f f f is nonconstant on D D D . Let V ( G ) = [ n ] × Σ V(G) = [n] \times\Sigma V ( G ) = [ n ] × Σ and y ( i , a ) ( x ) = 1 [ x i = a ] y_{(i,a)}(x) = \mathbf{1}[x_i = a] y ( i , a ) ( x ) = 1 [ x i = a ] . Thus the vertex ( i , a ) (i,a) ( i , a ) is marked exactly when x i = a x_i = a x i = a .
For each positive certificate { ( i , a ) , ( j , b ) } \{(i,a),(j,b)\} {( i , a ) , ( j , b )} of size two, include the edge { ( i , a ) , ( j , b ) } \{(i,a),(j,b)\} {( i , a ) , ( j , b )} in E ( G ) E(G) E ( G ) . For each singleton positive certificate { ( i , a ) } \{(i,a)\} {( i , a )} , choose a coordinate j ≠ i j \ne i j = i and include the edges { ( i , a ) , ( j , b ) } \{(i,a),(j,b)\} {( i , a ) , ( j , b )} for all b ∈ Σ b \in\Sigma b ∈ Σ , adding each edge only once throughout the construction.
An edge arising from a certificate of size two has both endpoints marked exactly when x x x satisfies that certificate. For a singleton certificate { ( i , a ) } \{(i,a)\} {( i , a )} , exactly one vertex ( j , b ) (j,b) ( j , b ) is marked, so one of the added edges has both endpoints marked exactly when x i = a x_i = a x i = a . Thus G G G has a marked edge if and only if x x x satisfies a positive certificate of size at most two. Since C 1 ( f ) ≤ 2 C_1(f) \le2 C 1 ( f ) ≤ 2 , this is equivalent to f ( x ) = 1 f(x) = 1 f ( x ) = 1 for every x ∈ D x \in D x ∈ D .
For constant value 0, use the same input bits on an edgeless graph. For constant value 1, include every edge between { 1 } × Σ \{1\} \times\Sigma { 1 } × Σ and { 2 } × Σ \{2\} \times\Sigma { 2 } × Σ . Exactly one vertex in each part is marked, so a collision always exists.
To simulate a query to y ( i , a ) y_{(i,a)} y ( i , a ) , query x i x_i x i into a work register, flip the answer bit if x i = a x_i = a x i = a , and uncompute the work register. This uses two input queries and implements the oracle for y y y .
For binary inputs, y ( i , a ) ( x ) = x i ⊕ ( 1 ⊕ a ) y_{(i,a)}(x) = x_i \oplus(1 \oplus a) y ( i , a ) ( x ) = x i ⊕ ( 1 ⊕ a ) . Query x i x_i x i directly into the answer bit and flip that bit when a = 0 a = 0 a = 0 . This uses one query. □
Theorem 5.2 (Query bound for an arbitrary alphabet). Let f : D → { 0 , 1 } f : D \to\{0,1\} f : D → { 0 , 1 } be a (partial) function, where D ⊆ Σ n D \subseteq\Sigma^n D ⊆ Σ n , ∣ Σ ∣ = q |\Sigma| = q ∣Σ∣ = q , and C 1 ( f ) ≤ 2 C_1(f) \le2 C 1 ( f ) ≤ 2 . Then Q 2 ( f ) = O ~ ( ( n q ) 11 / 17 ) Q_2(f) = \widetilde{O}((nq)^{11/17}) Q 2 ( f ) = O (( n q ) 11/17 ) .
Proof. Apply Lemma 5.1 and Theorem 1.1 to the graph on n q nq n q vertices. Two queries to x x x per query to y y y give the stated bound. □
Corollary 5.3 (Bounds for different alphabet sizes). For every function f f f as in Theorem 5.2 :
(i) If q = O ( 1 ) q = O(1) q = O ( 1 ) , then Q 2 ( f ) = O ~ ( n 11 / 17 ) Q_2(f) = \widetilde{O}(n^{11/17}) Q 2 ( f ) = O ( n 11/17 ) .
(ii) If q = n o ( 1 ) q = n^{o(1)} q = n o ( 1 ) , then Q 2 ( f ) ≤ n 11 / 17 + o ( 1 ) = o ( n 2 / 3 ) Q_2(f) \le n^{11/17+o(1)} = o(n^{2/3}) Q 2 ( f ) ≤ n 11/17 + o ( 1 ) = o ( n 2/3 ) .
(iii) If q = O ( n 1 / 33 − ε ) q = O(n^{1/33-\varepsilon}) q = O ( n 1/33 − ε ) for some fixed ε > 0 \varepsilon> 0 ε > 0 , then Q 2 ( f ) = o ( n 2 / 3 ) Q_2(f) = o(n^{2/3}) Q 2 ( f ) = o ( n 2/3 ) .
Proof. Substitute the three bounds on q q q into Theorem 5.2 . In the third case, ( n q ) 11 / 17 = O ( n 2 / 3 − 11 ε / 17 ) (nq)^{11/17} = O(n^{2/3-11\varepsilon/17}) ( n q ) 11/17 = O ( n 2/3 − 11 ε /17 ) , so the logarithmic factors do not affect the strict improvement. □
Corollary 5.4 (Equivalence for binary inputs). Let
q c e r t ( n ) = max f : { 0 , 1 } n → { 0 , 1 } C 1 ( f ) ≤ 2 Q 2 ( f ) , q c o l l ( n ) = max ∣ V ( G ) ∣ = n Q 2 ( gc G ) . q_{\mathrm{cert}}(n) = \max_{\substack{f:\{0,1\}^n \to\{0,1\}\\ C_1(f)\le2}} Q_2(f), \qquad q_{\mathrm{coll}}(n) = \max_{|V(G)|=n} Q_2(\operatorname{gc}_{G}). q cert ( n ) = f : { 0 , 1 } n → { 0 , 1 } C 1 ( f ) ≤ 2 max Q 2 ( f ) , q coll ( n ) = ∣ V ( G ) ∣ = n max Q 2 ( gc G ) . Then q c o l l ( n ) ≤ q c e r t ( n ) ≤ q c o l l ( 2 n ) q_{\mathrm{coll}}(n) \le q_{\mathrm{cert}}(n) \le q_{\mathrm{coll}}(2n) q coll ( n ) ≤ q cert ( n ) ≤ q coll ( 2 n ) .
Proof. Every graph collision function has positive certificate complexity at most two, since the two marked endpoints of an edge certify a positive input. This gives the first inequality. The binary case of Lemma 5.1 gives the second. □
A lower bound breaking the Ω ( n ) \Omega(\sqrt{n}) Ω ( n ) barrier
We now give a family of graphs for which graph collision requires Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) queries. The graphs are incidence graphs of points and lines over a finite field. The proof uses the fact that two points determine at most one line and two lines meet in at most one point.
Let q q q be a prime power. Let P P P and L L L be disjoint copies of F q 2 \mathbb{F}_q^2 F q 2 , representing points and nonvertical lines, respectively. A point ( a , b ) (a,b) ( a , b ) is incident to a line ( s , t ) (s,t) ( s , t ) when b = s a + t b=sa+t b = s a + t . Let G q G_q G q be the Levi graph associated to this incidence structure, i.e., the bipartite graph with one independent set of vertices corresponding to the set of points in P P P and the other independent set of vertices corresponding to the set of lines in L L L . Place an edge ( u , v ) (u,v) ( u , v ) in E ( G q ) E(G_q) E ( G q ) if the point in P P P corresponding to u u u is contained in the line in L L L corresponding to v v v . Thus, the graph G q G_q G q has 2 q 2 2q^2 2 q 2 vertices, degree q q q , and q 3 q^3 q 3 edges.
Theorem 6.1. For all sufficiently large prime powers q q q , we have Q 2 ( g c G q ) = Ω ( q log q ) Q_2(\mathrm{gc}_{G_q})=\Omega(q\sqrt{\log q}) Q 2 ( gc G q ) = Ω ( q log q ) . Consequently, for sufficiently large values of n n n , there is an n n n -vertex graph G G G with Q 2 ( g c G ) = Ω ( n log n ) Q_2(\mathrm{gc}_G)=\Omega(\sqrt{n\log n}) Q 2 ( gc G ) = Ω ( n log n ) .
By Lemma 2.10 , it suffices to construct a matrix Γ \Gamma Γ with rows indexed by positive inputs and columns indexed by negative inputs, such that ∥ Γ ∥ / max v ∥ Γ ∘ Δ v ∥ = Ω ( q log q ) \|\Gamma\|/\max_v\|\Gamma\circ\Delta_v\|=\Omega(q\sqrt{\log q}) ∥Γ∥/ max v ∥Γ ∘ Δ v ∥ = Ω ( q log q ) . The matrix Γ ∘ Δ v \Gamma\circ\Delta_v Γ ∘ Δ v keeps only entries whose two inputs disagree at the queried vertex v v v . We want the norm of the full matrix to be large compared to the norm of each such restriction.
Construction of the adversary matrix
We compare inputs with no marked edge to inputs with exactly one marked edge a ℓ a\ell a ℓ , where a ∈ P a\in P a ∈ P and ℓ ∈ L \ell\in L ℓ ∈ L . We first specify distributions on these inputs.
Input distributions. Let
r = ln q 8 q , p = r ( 1 − r ) − ( q − 1 ) , r ˉ = 1 − r , p ˉ = 1 − p . r=\frac{\ln q}{8q},\qquad p=r(1-r)^{-(q-1)},\qquad\bar{r}=1-r,\qquad\bar{p}=1-p. r = 8 q ln q , p = r ( 1 − r ) − ( q − 1 ) , r ˉ = 1 − r , p ˉ = 1 − p .
Here r r r is the probability of marking a line, and p p p is the probability of marking an uncovered point. We say a point is uncovered if it is not contained in any marked line. We have p = q − 7 / 8 + o ( 1 ) p=q^{-7/8+o(1)} p = q − 7/8 + o ( 1 ) . For sufficiently large q q q ,
4 r ≤ p < 1 4 , q p ≥ 1 , q p 2 ≤ 1. (9) 4r\le p<\frac{1}{4},\qquad qp\ge1,\qquad qp^2\le1. \tag*{(9)} 4 r ≤ p < 4 1 , q p ≥ 1 , q p 2 ≤ 1. (9)
For an input x x x , let free u ( x ) = ∏ h ∈ N ( u ) ( 1 − x h ) \operatorname{free}_u(x)=\prod_{h\in N(u)}(1-x_h) free u ( x ) = ∏ h ∈ N ( u ) ( 1 − x h ) . Thus u u u is uncovered exactly when free u ( x ) = 1 \operatorname{free}_u(x)=1 free u ( x ) = 1 . For the negative distribution μ − \mu^- μ − , mark the lines independently with probability r r r , and then mark each uncovered point independently with probability p p p . For an edge a ℓ a\ell a ℓ , define μ a ℓ \mu^{a\ell} μ a ℓ by fixing x a = x ℓ = 1 x_a=x_\ell=1 x a = x ℓ = 1 , fixing the other points on ℓ \ell ℓ and the other lines through a a a to zero, and using the same sampling rule on the remaining vertices. The only marked edge is a ℓ a\ell a ℓ . In particular, the positive distributions have disjoint supports.
The negative sampling rule prevents a collision at every point: a marked line forces all its incident points to zero. The positive distribution can also be obtained by conditioning a negative sample on x a = 1 x_a=1 x a = 1 , marking ℓ \ell ℓ , and setting the other points on ℓ \ell ℓ to zero. All lines through a a a were already unmarked, and all other bits remain unchanged. Thus the two distributions are related by a change confined to one line and its incident points. Figure 3 illustrates the two distributions.
Choice of probabilities. The aim is to have many marked points and lines among which to hide the planted edge. The two sides compete: marking more lines leaves fewer points available to be marked. Each point lies on q q q lines, so it has q r qr q r marked incident lines on average and is uncovered with probability ( 1 − r ) q (1-r)^q ( 1 − r ) q .
We compensate for this loss by marking uncovered points with the larger probability p p p . The relation p ( 1 − r ) q − 1 = r p(1-r)^{q-1}=r p ( 1 − r ) q − 1 = r makes the probability that a given point is marked equal to p ( 1 − r ) q = r ( 1 − r ) p(1-r)^q=r(1-r) p ( 1 − r ) q = r ( 1 − r ) , almost the same as the line probability r r r . Thus the two sides have nearly the same density of marked vertices. If r r r is of order 1 / q 1/q 1/ q , each side has only order q q q marked vertices on average. With r = ln q / ( 8 q ) r=\ln q/(8q) r = ln q / ( 8 q ) , each side instead has order q ln q q\ln q q ln q marked vertices on average, while the sampling rule still prevents every collision on a negative input.
Why not mark even more lines? The probability of being uncovered decreases exponentially in q r qr q r , so the compensating probability p = r ( 1 − r ) − ( q − 1 ) p=r(1-r)^{-(q-1)} p = r ( 1 − r ) − ( q − 1 ) grows rapidly. In particular, p ≥ r e ( q − 1 ) r p\ge re^{(q-1)r} p ≥ r e ( q − 1 ) r , and taking r r r asymptotically larger than ln q / q \ln q/q ln q / q would force p > 1 p>1 p > 1 . The logarithmic scale therefore allows many more marked vertices while preserving this balance. The small factor 1 / 8 1/8 1/8 keeps the conditional point probability small as well: ( 1 − r ) q = q − 1 / 8 + o ( 1 ) (1-r)^q=q^{-1/8+o(1)} ( 1 − r ) q = q − 1/8 + o ( 1 ) and p = q − 7 / 8 + o ( 1 ) p=q^{-7/8+o(1)} p = q − 7/8 + o ( 1 ) .
Bases indexed by independent sets. The input bits are dependent, since a marked line forces its neighboring points to zero. Under μ − \mu^{-} μ − , once the line bits are fixed, the uncovered point bits are independent with mean p p p , and every covered point bit is zero. Thus the conditional expectation of x u x_u x u is p ⋅ free u ( x ) p\cdot\operatorname{free}_u(x) p ⋅ free u ( x ) . Subtracting this expectation gives a function with conditional mean zero; this subtraction is called centering. Dividing by p p ‾ \sqrt{p\overline{p}} p p then gives conditional second moment one at uncovered points. For a line bit, we similarly subtract its mean r r r and divide by r r ‾ \sqrt{r\overline{r}} r r . In each distribution space, use the inner product ⟨ f , g ⟩ = E [ f g ] \langle f,g\rangle=\mathbb{E}[fg] ⟨ f , g ⟩ = E [ f g ] . Let
ξ u = x u − p free u ( x ) p p ‾ , η h = x h − r r r ‾ , ξ S = ∏ u ∈ S ξ u , η T = ∏ h ∈ T η h . \xi_u=\frac{x_u-p\operatorname{free}_u(x)}{\sqrt{p\overline{p}}},\qquad
\eta_h=\frac{x_h-r}{\sqrt{r\overline{r}}},\qquad
\xi_S=\prod_{u\in S}\xi_u,\qquad
\eta_T=\prod_{h\in T}\eta_h. ξ u = p p x u − p free u ( x ) , η h = r r x h − r , ξ S = u ∈ S ∏ ξ u , η T = h ∈ T ∏ η h .
As usual, N ( S ) = ⋃ u ∈ S N ( u ) N(S)=\bigcup_{u\in S}N(u) N ( S ) = ⋃ u ∈ S N ( u ) . Define functions
ϕ S , T − ‾ = r ‾ − ∣ N ( S ) ∣ / 2 ξ S η T , S ⊆ P , T ⊆ L ∖ N ( S ) , \phi^{\overline{-}}_{S,T}=\overline{r}^{-|N(S)|/2}\xi_S\eta_T,\qquad
S\subseteq P,\qquad T\subseteq L\setminus N(S), ϕ S , T − = r − ∣ N ( S ) ∣/2 ξ S η T , S ⊆ P , T ⊆ L ∖ N ( S ) ,
ϕ S , T a l = r ‾ − ∣ N ( S ) ∖ N ( a ) ∣ / 2 ξ S η T , S ⊆ P ∖ ℓ , T ⊆ L ∖ ( N ( a ) ∪ N ( S ) ) . \phi^{\mathrm{al}}_{S,T}=\overline{r}^{-|N(S)\setminus N(a)|/2}\xi_S\eta_T,\qquad
S\subseteq P\setminus\ell,\qquad T\subseteq L\setminus\bigl(N(a)\cup N(S)\bigr). ϕ S , T al = r − ∣ N ( S ) ∖ N ( a ) ∣/2 ξ S η T , S ⊆ P ∖ ℓ , T ⊆ L ∖ ( N ( a ) ∪ N ( S ) ) .
Here P ∖ ℓ P\setminus\ell P ∖ ℓ excludes the points incident to ℓ \ell ℓ . The sets S S S and T T T index basis vectors; they are not the marked sets of an input.
Each basis vector is a function of the input x x x . The product ξ S \xi_S ξ S vanishes unless every line in N ( S ) N(S) N ( S ) is unmarked. On those inputs, the functions η h \eta_h η h for h ∈ N ( S ) h\in N(S) h ∈ N ( S ) are constant, so only lines outside N ( S ) N(S) N ( S ) need separate indices. This explains why the basis is indexed by independent sets. The normalizing factors account for the probability that the required lines are unmarked.
For example, ϕ { u } , ∅ − ‾ = r ‾ − q / 2 ξ u \phi^{\overline{-}}_{\{u\},\varnothing}=\overline{r}^{-q/2}\xi_u ϕ { u } , ∅ − = r − q /2 ξ u is zero when a marked line covers u u u . When u u u is uncovered, ξ u = ( x u − p ) / p p ‾ \xi_u=(x_u-p)/\sqrt{p\overline{p}} ξ u = ( x u − p ) / p p . Adding a line h ∉ N ( u ) h\notin N(u) h ∈ / N ( u ) to the index set multiplies this function by η h \eta_h η h . A line h ∈ N ( u ) h\in N(u) h ∈ N ( u ) supplies no additional factor that varies on its support: there x h = 0 x_h=0 x h = 0 , so η h \eta_h η h is constant. The indices therefore specify which functions ξ u \xi_u ξ u and η h \eta_h η h occur in the product.
Lemma 6.2 (Independent set bases). The functions ϕ S , T − ‾ \phi^{\overline{-}}_{S,T} ϕ S , T − form an orthonormal basis for functions on the support of μ − \mu^{-} μ − , and the functions ϕ S , T a l \phi^{\mathrm{al}}_{S,T} ϕ S , T al form an orthonormal basis for functions on the support of μ a l \mu^{\mathrm{al}} μ al , with the inner products above.
Proof. Condition on the line bits. The functions ξ u \xi_u ξ u occurring in the products are independent and have mean zero, and E [ ξ u ∣ ( x h ) h ∈ L ] = free u ( x ) \mathbb{E}[\xi_u\mid(x_h)_{h\in L}]=\operatorname{free}_u(x) E [ ξ u ∣ ( x h ) h ∈ L ] = free u ( x ) . Distinct point sets are therefore orthogonal. For equal point sets S S S , the second moment forces every line in N ( S ) N(S) N ( S ) to be zero. The remaining line bits are independent, so the products of their functions η h \eta_h η h are orthonormal. The displayed powers of r ˉ \bar r r ˉ normalize the squared norms, taking account of the lines through a a a that are already fixed in the positive distribution.
For the negative distribution, both the basis indices and the supported inputs are the independent sets of G q G_q G q . For the positive distribution, both are the independent sets of the graph remaining after deleting the points on ℓ \ell ℓ and the lines through a a a . Their cardinalities agree, so the orthonormal families are complete.
Let U − U^- U − and U + U^+ U + be the matrices taking these basis coordinates to input coordinates. Their entries are
U x , ( S , T ) − = μ − ( x ) ϕ S , T − ( x ) , U y , ( a , ℓ , S , T ) + = μ a ℓ ( y ) ϕ S , T a ℓ ( y ) , U^-_{x,(S,T)}=\sqrt{\mu^-(x)}\,\phi_{S,T}^-(x),\qquad U^+_{y,(a,\ell,S,T)}=\sqrt{\mu^{a\ell}(y)}\,\phi_{S,T}^{a\ell}(y), U x , ( S , T ) − = μ − ( x ) ϕ S , T − ( x ) , U y , ( a , ℓ , S , T ) + = μ a ℓ ( y ) ϕ S , T a ℓ ( y ) ,
where the latter entry is zero unless y y y has unique marked edge a ℓ a\ell a ℓ . These matrices are orthogonal by Lemma 6.2 and the disjointness of the positive supports.
Write Π v − \Pi^-_v Π v − for multiplication by x v x_v x v in the negative basis, and Π v + \Pi^+_v Π v + for multiplication by x v x_v x v in the direct sum of the positive bases. These are orthogonal projections onto functions supported on inputs whose bit at v v v is one.
The planting map. To obtain an input with marked edge a ℓ a\ell a ℓ , start with a negative input whose point a a a is marked, mark ℓ \ell ℓ , and unmark the other points on ℓ \ell ℓ . Every line through a a a is initially unmarked, so this operation creates exactly one marked edge. We construct matrix B B B by expressing this operation in the bases above.
The condition that a a a is marked has two contributions in the centered basis. Indeed, the definition of ξ a \xi_a ξ a gives
x a p = p free a ( x ) + p ˉ ξ a ( x ) . \frac{x_a}{\sqrt{p}}=\sqrt{p}\,\operatorname{free}_a(x)+\sqrt{\bar p}\,\xi_a(x). p x a = p free a ( x ) + p ˉ ξ a ( x ) .
The first term requires all lines through a a a to be unmarked, and the second contains the point index a a a . This explains the two terms and their coefficients in B B B .
For a set F F F of lines, let z F z_F z F be the unit vector indexed by J ⊆ F J\subseteq F J ⊆ F with coordinates z F ( J ) = ( − r ˉ ) ∣ J ∣ r ˉ ( ∣ F ∣ − ∣ J ∣ ) / 2 z_F(J)=(-\sqrt{\bar r})^{|J|}\bar r^{(|F|-|J|)/2} z F ( J ) = ( − r ˉ ) ∣ J ∣ r ˉ ( ∣ F ∣ − ∣ J ∣ ) /2 . The binomial theorem gives its unit norm, and expanding the product gives
∑ J ⊆ F z F ( J ) η J = r ˉ − ∣ F ∣ / 2 ∏ h ∈ F ( 1 − x h ) . (10) \sum_{J\subseteq F}z_F(J)\eta_J=\bar r^{-|F|/2}\prod_{h\in F}(1-x_h). \tag*{(10)} J ⊆ F ∑ z F ( J ) η J = r ˉ − ∣ F ∣/2 h ∈ F ∏ ( 1 − x h ) . (10)
Thus z F z_F z F represents the condition that all lines in F F F are unmarked.
For a positive row ( a , ℓ , S , T ) (a,\ell,S,T) ( a , ℓ , S , T ) , the lines in N ( a ) ∩ N ( S ) N(a)\cap N(S) N ( a ) ∩ N ( S ) are already unmarked wherever ξ S \xi_S ξ S is nonzero. Thus only the lines in F = N ( a ) ∖ N ( S ) F=N(a)\setminus N(S) F = N ( a ) ∖ N ( S ) need to be included in z F z_F z F . In particular, ℓ ∈ F \ell\in F ℓ ∈ F . Every point in S S S covers at most one line through a a a , so
∣ F ∣ ≥ q − ∣ S ∣ . (11) |F|\ge q-|S|. \tag*{(11)} ∣ F ∣ ≥ q − ∣ S ∣. (11)
With the normalizations of our bases, the two contributions above give the planting map
( B f ) a , ℓ , S , T = p ∑ J ⊆ F z F ( J ) f S , T ∪ J + p ˉ f S ∪ { a } , T . (Bf)_{a,\ell,S,T}=\sqrt{p}\sum_{J\subseteq F}z_F(J)f_{S,T\cup J}+\sqrt{\bar p}f_{S\cup\{a\},T}. ( B f ) a , ℓ , S , T = p J ⊆ F ∑ z F ( J ) f S , T ∪ J + p ˉ f S ∪ { a } , T .
for a vector f f f in the negative basis. The first term removes a subset of lines through a a a , and the second removes the point index a a a . The signs come from (10) , and ∣ z F ( J ) ∣ 2 |z_F(J)|^2 ∣ z F ( J ) ∣ 2 is the probability of selecting exactly J J J when each line in F F F is selected independently with probability r r r .
Lemma 6.3 (Planting an edge). On a negative input with x a = 1 x_a=1 x a = 1 , let plant a ℓ \operatorname{plant}_{a\ell} plant a ℓ mark ℓ \ell ℓ and unmark every other point on ℓ \ell ℓ . If B a ℓ B^{a\ell} B a ℓ is the block of B B B associated with a ℓ a\ell a ℓ , then, for every function f f f on positive inputs,
( ( B a ℓ ) ∗ f ) ( x ) = { ( r r ˉ ) − 1 / 2 f ( plant a ℓ ( x ) ) , x a = 1 , 0 , x a = 0. ((B^{a\ell})^*f)(x)=
\begin{cases}
(r\bar r)^{-1/2}f(\operatorname{plant}_{a\ell}(x)), & x_a=1,\\
0, & x_a=0.
\end{cases} (( B a ℓ ) ∗ f ) ( x ) = { ( r r ˉ ) − 1/2 f ( plant a ℓ ( x )) , 0 , x a = 1 , x a = 0. Consequently, Π v + B a ℓ = B a ℓ Π v − \Pi_v^+B^{a\ell}=B^{a\ell}\Pi_v^- Π v + B a ℓ = B a ℓ Π v − for every bit preserved by this operation, and B a ℓ Π ℓ − = 0 B^{a\ell}\Pi_\ell^-=0 B a ℓ Π ℓ − = 0 .
Proof. Expanding the subset sum using (10) gives
( B a ℓ ) ∗ ϕ S , T a ℓ = r ˉ − ∣ N ( S ∪ { a } ) ∣ / 2 ξ S η T x a p . (B^{a\ell})^*\phi^{a\ell}_{S,T}=\bar r^{-|N(S\cup\{a\})|/2}\xi_S\eta_T\frac{x_a}{\sqrt p}. ( B a ℓ ) ∗ ϕ S , T a ℓ = r ˉ − ∣ N ( S ∪ { a }) ∣/2 ξ S η T p x a .
Now ∣ N ( S ∪ { a } ) ∣ = q + ∣ N ( S ) ∖ N ( a ) ∣ |N(S\cup\{a\})|=q+|N(S)\setminus N(a)| ∣ N ( S ∪ { a }) ∣ = q + ∣ N ( S ) ∖ N ( a ) ∣ and p r ˉ q = r r ˉ p\bar r^q=r\bar r p r ˉ q = r r ˉ . Planting changes only ℓ \ell ℓ and its incident points. Since S S S contains no point on ℓ \ell ℓ and ℓ ∉ T \ell\notin T ℓ ∈ / T , the factors ξ S η T \xi_S\eta_T ξ S η T are unchanged. This proves the formula on every basis vector. Preserved bits give the projection identities, and x a x ℓ = 0 x_ax_\ell=0 x a x ℓ = 0 on negative inputs gives the last assertion. □
The additive correction. Planting changes the input bit at ℓ \ell ℓ from zero to one. A query to ℓ \ell ℓ therefore distinguishes each input from its planted image. We add a map C C C to cancel part of this contribution. Signed entries are allowed in the general adversary bound.
Consider first S = ∅ S=\varnothing S = ∅ and the source coordinates without the point index a a a . On the two line coordinates 1 , η ℓ 1,\eta_\ell 1 , η ℓ , the normalized condition x ℓ = 0 x_\ell=0 x ℓ = 0 is represented by ( r ˉ , − r ˉ ) (\sqrt{\bar r},-\sqrt{\bar r}) ( r ˉ , − r ˉ ) . The vector z F z_F z F is a product of these unit vectors. Taking the inner product in the ℓ \ell ℓ coordinate therefore removes that coordinate from the subset term of B B B . Its coefficient at the empty subset of F ∖ { ℓ } F\setminus\{\ell\} F ∖ { ℓ } becomes p r ˉ ( q − 1 ) / 2 = r \sqrt p\,\bar r^{(q-1)/2}=\sqrt r p r ˉ ( q − 1 ) /2 = r . In contrast, the coordinate containing just the line index ℓ \ell ℓ has inner product − r -\sqrt r − r with the same condition. This suggests removing the line index with coefficient one. Define
( C f ) a , ℓ , S , T = f S , T ∪ { ℓ } . (Cf)_{a,\ell,S,T}=f_{S,T\cup\{\ell\}}. ( C f ) a , ℓ , S , T = f S , T ∪ { ℓ } .
The two empty subset coefficients now cancel. Every other subset contribution contains an additional line through a a a . Knowing such a line restricts the possible choices of a a a to its points. For nonempty S S S , the same calculation leaves the coefficient p r ˉ ( ∣ F ∣ − 1 ) / 2 − r \sqrt p\,\bar r^{(|F|-1)/2}-\sqrt r p r ˉ ( ∣ F ∣ − 1 ) /2 − r . Its difference from zero comes only from the lines in N ( a ) ∩ N ( S ) N(a)\cap N(S) N ( a ) ∩ N ( S ) , which are already forced to be unmarked. There are at most ∣ S ∣ |S| ∣ S ∣ such lines, since each point of S S S lies on at most one line through a a a .
The multiplicative correction. We implement the multiplicative correction by weighting the columns. A source coordinate with many point and line indices offers more choices for the planted edge: a point removed by B B B specifies a a a , and a line removed by C C C specifies ℓ \ell ℓ . We give smaller weights to columns with more indices to limit their combined contribution. At the same time, we keep weight one at the coordinate indexed by S = T = ∅ S=T=\varnothing S = T = ∅ , which contributes to every planted edge. Let
k = ⌊ 1 q p 2 ⌋ , d S , T = k k + ∣ S ∣ + ∣ T ∣ . k=\left\lfloor\frac{1}{qp^2}\right\rfloor,\qquad d_{S,T}=\frac{k}{k+|S|+|T|}. k = ⌊ q p 2 1 ⌋ , d S , T = k + ∣ S ∣ + ∣ T ∣ k .
These weights decrease gradually as indices are added: they are at least 1 / 2 1/2 1/2 when ∣ S ∣ + ∣ T ∣ ≤ k |S|+|T|\le k ∣ S ∣ + ∣ T ∣ ≤ k , and decrease in proportion to k / ( ∣ S ∣ + ∣ T ∣ ) k/(|S|+|T|) k / ( ∣ S ∣ + ∣ T ∣ ) above this scale. They also have a direct interpretation. Uniformly order the ∣ S ∣ + ∣ T ∣ |S|+|T| ∣ S ∣ + ∣ T ∣ indices together with k k k auxiliary elements. The weight d S , T d_{S,T} d S , T is the probability that the first element is auxiliary. Let D D D be diagonal with these entries, and define
Γ ~ = ( B + C ) D , Γ = U Γ ~ ( U ) ∗ . (12) \widetilde{\Gamma}=(B+C)D,\qquad\Gamma=U\widetilde{\Gamma}(U)^*. \tag*{(12)} Γ = ( B + C ) D , Γ = U Γ ( U ) ∗ . (12)
The matrix Γ ~ \widetilde{\Gamma} Γ is written in the point and line bases, while Γ \Gamma Γ is written in input coordinates. All three operations from a source coordinate receive the same weight, and point and line indices are treated equally. We have ∥ D ∥ ≤ 1 \lVert D\rVert\le1 ∥ D ∥ ≤ 1 , and the source coordinate indexed by S = T = ∅ S=T=\varnothing S = T = ∅ has weight one. The rows of Γ \Gamma Γ are indexed by positive inputs and its columns by negative inputs, as in Lemma 2.10 .
Both corrections are designed to control the denominator of the adversary ratio. The additive correction C C C creates cancellations, and the multiplicative correction D D D reduces the weights of columns with many indices. Both preserve the image of the coordinate indexed by S = T = ∅ S=T=\varnothing S = T = ∅ . Let e ∅ e_{\varnothing} e ∅ be the corresponding unit vector. We have C e ∅ = 0 Ce_{\varnothing}=0 C e ∅ = 0 and D e ∅ = e ∅ De_{\varnothing}=e_{\varnothing} D e ∅ = e ∅ , so
Γ ~ e ∅ = ( B + C ) D e ∅ = B e ∅ . \widetilde{\Gamma}e_{\varnothing}=(B+C)De_{\varnothing}=Be_{\varnothing}. Γ e ∅ = ( B + C ) D e ∅ = B e ∅ .
Since U + U^{+} U + and U − U^{-} U − are orthogonal, this gives ∥ Γ ∥ = ∥ Γ ~ ∥ ≥ ∥ B e ∅ ∥ \lVert\Gamma\rVert=\lVert\widetilde{\Gamma}\rVert\ge\lVert Be_{\varnothing}\rVert ∥ Γ ∥ = ∥ Γ ∥ ≥ ∥ B e ∅ ∥ . Thus the corrections preserve this lower bound on the numerator.
The numerator. We evaluate B e ∅ Be_{\varnothing} B e ∅ to obtain the lower bound on the numerator.
Each possible planted edge contributes to a different positive coordinate. These contributions are orthogonal, so their squared magnitudes add over all q 3 q^{3} q 3 edges. The choice of r r r makes this sum of order q 2 log q q^{2}\log q q 2 log q , which explains the additional factor log q \sqrt{\log q} log q in the lower bound.
Lemma 6.4 (Numerator bound). The matrices in (12) satisfy ∥ Γ ∥ = ∥ Γ ~ ∥ ≥ q 3 r ˉ r = Ω ( q log q ) \lVert\Gamma\rVert=\lVert\widetilde{\Gamma}\rVert\ge\sqrt{q^{3}\bar r r}=\Omega(q\sqrt{\log q}) ∥ Γ ∥ = ∥ Γ ∥ ≥ q 3 r ˉ r = Ω ( q log q ) .
Proof. We have ∥ Γ ∥ = ∥ Γ ~ ∥ ≥ ∥ B e ∅ ∥ \lVert\Gamma\rVert=\lVert\widetilde{\Gamma}\rVert\ge\lVert Be_{\varnothing}\rVert ∥ Γ ∥ = ∥ Γ ∥ ≥ ∥ B e ∅ ∥ . For each planted edge a ℓ a\ell a ℓ , the vector B e ∅ Be_{\varnothing} B e ∅ has coefficient p r ˉ q / 2 = r r ˉ \sqrt{p}\,\frac{\bar r}{q/2}=\sqrt{r\bar r} p q /2 r ˉ = r r ˉ in the positive coordinate with S = T = ∅ S=T=\varnothing S = T = ∅ . These q 3 q^{3} q 3 coordinates are orthogonal, and their squared coefficients sum to q 3 r r ˉ q^{3}r\bar r q 3 r r ˉ , proving the claim.
The denominator and the adversary ratio
The denominator measures how much of the adversary matrix connects inputs that differ at one queried vertex. A map that preserves this input bit gives the same result whether we restrict to inputs with that bit equal to one before or after applying the map. The corresponding difference between the two operators is therefore zero. We bound ∥ Γ ∘ Δ v ∥ \lVert\Gamma\circ\Delta_v\rVert ∥ Γ ∘ Δ v ∥ by calculating in the bases above. In input coordinates, the matrix with entries ( y v − x v ) Γ y , x (y_v-x_v)\Gamma_{y,x} ( y v − x v ) Γ y , x becomes Γ ∘ Δ v \Gamma\circ\Delta_v Γ ∘ Δ v after multiplying column x x x by 1 − 2 x v 1-2x_v 1 − 2 x v . These sign changes preserve the norm. Changing to the point and line bases therefore gives
∥ Γ ∘ Δ v ∥ = ∥ Π v + Γ ~ − Γ ~ Π v − ∥ . (13) \lVert\Gamma\circ\Delta_v\rVert=\lVert\Pi_v^{+}\widetilde{\Gamma}-\widetilde{\Gamma}\Pi_v^{-}\rVert. \tag*{(13)} ∥ Γ ∘ Δ v ∥ = ∥ Π v + Γ − Γ Π v − ∥ . (13)
There are two contributions to this difference. The first comes from applying the query projection before or after B + C B+C B + C . The second comes from the column weights: the query projection can mix basis coordinates with different values of ∣ S ∣ + ∣ T ∣ |S|+|T| ∣ S ∣ + ∣ T ∣ , and hence different weights. Let E v = Π v + ( B + C ) − ( B + C ) Π v − E_v=\Pi_v^{+}(B+C)-(B+C)\Pi_v^{-} E v = Π v + ( B + C ) − ( B + C ) Π v − . Adding and subtracting ( B + C ) Π v − D (B+C)\Pi_v^{-}D ( B + C ) Π v − D gives
Π v + Γ ~ − Γ ~ Π v − = E v D + ( B + C ) ( Π v − D − D Π v − ) . \Pi_v^{+}\widetilde{\Gamma}-\widetilde{\Gamma}\Pi_v^{-}=E_vD+(B+C)(\Pi_v^{-}D-D\Pi_v^{-}). Π v + Γ − Γ Π v − = E v D + ( B + C ) ( Π v − D − D Π v − ) .
We will bound the first contribution by counting. For the second, the reciprocal form of the weights reduces the calculation to the change in the number of indices. Let N N N be diagonal with entries ∣ S ∣ + ∣ T ∣ |S|+|T| ∣ S ∣ + ∣ T ∣ . Since D − 1 = I + N / k D^{-1}=I+N/k D − 1 = I + N / k , expanding the right side gives the identity
Π v − D − D Π v − = − 1 k D ( Π v − N − N Π v − ) D . \Pi_v^{-}D-D\Pi_v^{-}=-\frac{1}{k}D(\Pi_v^{-}N-N\Pi_v^{-})D. Π v − D − D Π v − = − k 1 D ( Π v − N − N Π v − ) D .
Using (13) , ∥ Γ ~ ∥ = ∥ Γ ∥ \|\widetilde{\Gamma}\| = \|\Gamma\| ∥ Γ ∥ = ∥Γ∥ , and ∥ D ∥ ≤ 1 \|D\| \le1 ∥ D ∥ ≤ 1 , we obtain
∥ Γ ∘ Δ v ∥ ∥ Γ ∥ ≤ ∥ E v D ∥ ∥ Γ ~ ∥ + ∥ Π v − N − N Π v − ∥ k . (14) \frac{\|\Gamma\circ\Delta_v\|}{\|\Gamma\|} \le\frac{\|E_vD\|}{\|\widetilde{\Gamma}\|} + \frac{\|\Pi_v^-N-N\Pi_v^-\|}{k}. \tag*{(14)} ∥Γ∥ ∥Γ ∘ Δ v ∥ ≤ ∥ Γ ∥ ∥ E v D ∥ + k ∥ Π v − N − N Π v − ∥ . (14)
The factor ( B + C ) D = Γ ~ (B+C)D=\widetilde{\Gamma} ( B + C ) D = Γ in the second contribution has norm ∥ Γ ∥ \|\Gamma\| ∥Γ∥ and disappears when we divide by this norm. Thus we only need to control how the query changes the number of indices; no separate bound on ∥ B + C ∥ \|B+C\| ∥ B + C ∥ is required.
We will show that ∥ E v D ∥ = O ( 1 ) \|E_vD\|=O(1) ∥ E v D ∥ = O ( 1 ) and ∥ Π v − N − N Π v − ∥ = O ( p ( 1 + q r ) ) \|\Pi_v^-N-N\Pi_v^-\|=O(\sqrt{p}(1+qr)) ∥ Π v − N − N Π v − ∥ = O ( p ( 1 + q r )) . Together with Lemma 6.4 , these estimates give the required adversary ratio. We first describe the local query projections and bound the change in the number of indices. We then bound E v E_v E v by counting and apply the column weights.
The action of a query. A query to a free line acts on the two coordinates in which that line index is absent or present. A point query has a slightly larger block. When the point index u u u is present, the independent set condition excludes every line through u u u . When u u u is absent, the free lines through u u u can occur in any subset. Fixing all other indices groups these possibilities into one block. For one line, write z = ( r , − r ) T z=(\sqrt{r},-\sqrt{r})^{\mathsf T} z = ( r , − r ) T . The following lemma gives the query projections on these blocks.
Lemma 6.5 (Local query projections). On the two coordinates of a free line, its query projection is
I − z z ∗ = ( r r r ‾ r r ‾ r ‾ ) . I-zz^*=\begin{pmatrix}r & \sqrt{r\overline{r}}\\ \sqrt{r\overline{r}} & \overline{r}\end{pmatrix}. I − z z ∗ = ( r r r r r r ) . For a point u ∉ S u\notin S u ∈ / S , fix the line indices outside N ( S ) ∪ N ( u ) N(S)\cup N(u) N ( S ) ∪ N ( u ) and let F = N ( u ) ∖ N ( S ) F=N(u)\setminus N(S) F = N ( u ) ∖ N ( S ) . The negative point projection on the coordinates ( S , T ∪ J ) (S,T\cup J) ( S , T ∪ J ) , J ⊆ F J\subseteq F J ⊆ F , and ( S ∪ { u } , T ) (S\cup\{u\},T) ( S ∪ { u } , T ) is
Π u − = m F m F ∗ , m F = p z F ⊕ p ‾ . (15) \Pi_u^- = m_Fm_F^*, \qquad m_F=\sqrt{p}\,z_F\oplus\sqrt{\overline{p}}. \tag*{(15)} Π u − = m F m F ∗ , m F = p z F ⊕ p . (15) In a positive space, the same formula holds after deleting the lines in N ( a ) N(a) N ( a ) . The projections at a a a and ℓ \ell ℓ are the identity; those at the other points on ℓ \ell ℓ and the other lines through a a a are zero.
Proof. The line formula follows by multiplying the functions 1 , η h 1,\eta_h 1 , η h by x h x_h x h . For a point, use (10) and the identities
x u = p f r e e u + p p ‾ ξ u , x u ξ u = p ‾ ξ u + p p ‾ f r e e u . x_u=p\,\mathrm{free}_u+\sqrt{p\overline{p}}\,\xi_u,\qquad x_u\xi_u=\overline{p}\xi_u+\sqrt{p\overline{p}}\,\mathrm{free}_u. x u = p free u + p p ξ u , x u ξ u = p ξ u + p p free u .
Order the subset coordinates first and the point coordinate last. By (10) , multiplication by f r e e u \mathrm{free}_u free u on the subset coordinates is the projection z F z F ∗ z_Fz_F^* z F z F ∗ . The two identities above, with the normalizations in the basis definitions, give the blocks
Π u − = ( p z F z F ∗ p p ‾ z F p p ‾ z F ∗ p ‾ ) = m F m F ∗ . \Pi_u^-=\begin{pmatrix}p z_Fz_F^* & \sqrt{p\overline{p}}z_F\\ \sqrt{p\overline{p}}z_F^* & \overline{p}\end{pmatrix}=m_Fm_F^*. Π u − = ( p z F z F ∗ p p z F ∗ p p z F p ) = m F m F ∗ .
The off-diagonal blocks exchange the point coordinate with the combination z F z_F z F of subset coordinates. Since ∥ z F ∥ = 1 \|z_F\|=1 ∥ z F ∥ = 1 , we have ∥ m F ∥ 2 = p + p ‾ = 1 \|m_F\|^2=p+\overline{p}=1 ∥ m F ∥ 2 = p + p = 1 , so this is a rank one orthogonal projection. The positive formulas follow from the fixed input bits.
The number of indices changed by a query. The second term of (14) depends only on the difference between the sizes occurring in a local query block. A point query compares a subset of free lines with a single point index.
The squared coefficients of z F z_F z F describe independent line selections with probability r r r . Thus the size change is controlled by the second moment of the number of selected lines. The coefficient p \sqrt{p} p in the point query vector supplies the additional small factor in the bound.
Lemma 6.6 (Change in the number of indices). For every vertex v v v ,
∥ Π v − N − N Π v − ∥ = O ( p ( 1 + q r ) ) . \lVert\Pi_v^- \mathrm{N} - \mathrm{N}\Pi_v^- \rVert= O\bigl(\sqrt{p}(1+qr)\bigr). ∥ Π v − N − N Π v − ∥ = O ( p ( 1 + q r ) ) .
Proof. Consider a point query block from (15) , with base point set S S S and external line set T T T . Subtract ( ∣ S ∣ + ∣ T ∣ + 1 ) I (|S|+|T|+1)I ( ∣ S ∣ + ∣ T ∣ + 1 ) I from N \mathrm{N} N , which leaves its commutator with the query projection unchanged. The shifted diagonal entries are ∣ J ∣ − 1 |J|-1 ∣ J ∣ − 1 on subset coordinates and zero on the point coordinate. Hence
∥ ( N − ( ∣ S ∣ + ∣ T ∣ + 1 ) I ) m F ∥ 2 = p E [ ( j − 1 ) 2 ] , j ∼ Bin ( ∣ F ∣ , r ) . \left\lVert\bigl(\mathrm{N}-(|S|+|T|+1)I\bigr)m_F\right\rVert^2
=p\mathbb{E}\bigl[(j-1)^2\bigr],\qquad j\sim\operatorname{Bin}(|F|,r). ( N − ( ∣ S ∣ + ∣ T ∣ + 1 ) I ) m F 2 = p E [ ( j − 1 ) 2 ] , j ∼ Bin ( ∣ F ∣ , r ) .
Counting selected lines and ordered pairs gives E [ ( j − 1 ) 2 ] = 1 − ∣ F ∣ r + ∣ F ∣ ( ∣ F ∣ − 1 ) r 2 ≤ ( 1 + q r ) 2 \mathbb{E}[(j-1)^2]=1-|F|r+|F|(|F|-1)r^2\leq(1+qr)^2 E [( j − 1 ) 2 ] = 1 − ∣ F ∣ r + ∣ F ∣ ( ∣ F ∣ − 1 ) r 2 ≤ ( 1 + q r ) 2 . Expanding the difference with the rank one projection m F m F ∗ m_Fm_F^* m F m F ∗ as two rank one maps bounds its norm by twice the displayed vector norm.
A free line query changes the total size by one. On its two coordinates, the commutator block is
Π h − N − N Π h − = ( 0 r r ˉ − r r ˉ 0 ) . \Pi_h^- \mathrm{N}-\mathrm{N}\Pi_h^-=
\begin{pmatrix}
0 & \sqrt{r\bar r}\\
-\sqrt{r\bar r} & 0
\end{pmatrix}. Π h − N − N Π h − = ( 0 − r r ˉ r r ˉ 0 ) .
whose norm is r r ˉ ≤ p \sqrt{r\bar r}\leq\sqrt{p} r r ˉ ≤ p . A line fixed to zero gives no contribution. The local blocks are orthogonal, so their largest norm proves the claim. □
Counting the contributions. We now turn to the first term of (14) and bound E v E_v E v by counting compatible planted edges. For each type of contribution, we bound the norm of a local map and then count how many such maps can use a fixed source coordinate. Orthogonal target spaces allow us to add squared norms. Thus a source used by at most t t t maps of norm at most p \sqrt{p} p receives a squared bound of at most p t pt pt . The following observation makes this calculation valid for arbitrary vectors, even when different maps use some of the same source coordinates.
Lemma 6.7 (Weighted counting). Suppose maps D j D_j D j have orthogonal target spaces, each D j D_j D j reads only source coordinates in I j I_j I j , and ∥ D j ∥ ≤ w j \lVert D_j\rVert\leq w_j ∥ D j ∥ ≤ w j . Then
∥ ∑ j D j f ∥ 2 ≤ ∑ i ( ∑ j : i ∈ I j w j 2 ) ∣ f i ∣ 2 . \left\lVert\sum_j D_jf\right\rVert^2
\leq\sum_i\left(\sum_{j:i\in I_j}w_j^2\right)|f_i|^2. j ∑ D j f 2 ≤ i ∑ j : i ∈ I j ∑ w j 2 ∣ f i ∣ 2 .
Proof. Let Q j Q_j Q j project onto I j I_j I j . Since D j = D j Q j D_j=D_jQ_j D j = D j Q j , we have ∥ D j f ∥ 2 ≤ w j 2 ∥ Q j f ∥ 2 \lVert D_jf\rVert^2\leq w_j^2\lVert Q_jf\rVert^2 ∥ D j f ∥ 2 ≤ w j 2 ∥ Q j f ∥ 2 . Orthogonality of the target spaces gives
∥ ∑ j D j f ∥ 2 = ∑ j ∥ D j f ∥ 2 ≤ ∑ j w j 2 ∑ i ∈ I j ∣ f i ∣ 2 . \left\lVert\sum_jD_jf\right\rVert^2
=\sum_j\lVert D_jf\rVert^2
\leq\sum_jw_j^2\sum_{i\in I_j}|f_i|^2. j ∑ D j f 2 = j ∑ ∥ D j f ∥ 2 ≤ j ∑ w j 2 i ∈ I j ∑ ∣ f i ∣ 2 .
Interchanging the two sums gives the claimed bound. Each source coordinate is counted once for every local map that can use it. □
For a fixed planted edge, fixing the point indices and the line indices outside the queried neighborhoods gives the local blocks to which this lemma applies. A point query groups together the coordinates with its point index absent and present. Distinct planted edges have orthogonal target spaces. We split the matrix into a constant number of types of contributions; combining their bounds costs only a constant factor.
We next explain the cancellation supplied by C C C . For a query to the planted line ℓ \ell ℓ , the positive bit is fixed to one, so the difference on this block is ( B + C ) ( I − Π ℓ − ) (B+C)(I-\Pi_{\ell}^{-}) ( B + C ) ( I − Π ℓ − ) . In the subset and line removal terms, ℓ \ell ℓ is a free line coordinate. On these coordinates, I − Π ℓ − = z z ∗ I-\Pi_{\ell}^{-}=zz^* I − Π ℓ − = z z ∗ , so we first multiply the corresponding part of the row by z z z . Suppose S = ∅ S=\varnothing S = ∅ . Among the terms with no other line through a a a , the subset term of B B B contributes p r ˉ ( q − 1 ) / 2 \sqrt{p}\,\bar{r}^{(q-1)/2} p r ˉ ( q − 1 ) /2 , and the line removal term C C C contributes − r -\sqrt{r} − r . These are equal in magnitude by our choice of p p p , so they cancel.
The terms left after this cancellation contain another line through a a a , whose presence will restrict the possible planted edges. For nonempty S S S , the lines in N ( a ) ∩ N ( S ) N(a)\cap N(S) N ( a ) ∩ N ( S ) must already be unmarked wherever ξ S \xi_S ξ S is nonzero. This changes the empty subset coefficient, but each point in S S S can account for at most one such line. The next lemma separates the nonempty subsets from this remaining coefficient. It also gives the corresponding formula for a query to another point on the planted line.
Lemma 6.8 (Queries on the planted line). Fix a positive row ( a , ℓ , S , T ) (a,\ell,S,T) ( a , ℓ , S , T ) , and let H = F ∖ { ℓ } H=F\setminus\{\ell\} H = F ∖ { ℓ } . Let g g g be the part of this row of B + C B+C B + C on source coordinates without the point index a a a . Then
g z = p ( z H − r ˉ ∣ H ∣ / 2 ∣ ∅ ⟩ ) ∗ + ϵ ∅ ⟨ ∅ ∣ , ϵ ∅ = p r ˉ ( ∣ F ∣ − 1 ) / 2 − r . (16) gz=\sqrt{p}\left(z_H-\bar{r}^{|H|/2}|\varnothing\rangle\right)^*+\epsilon_{\varnothing}\langle\varnothing|,
\qquad
\epsilon_{\varnothing}=\sqrt{p}\,\bar{r}^{(|F|-1)/2}-\sqrt{r}. \tag*{(16)} g z = p ( z H − r ˉ ∣ H ∣/2 ∣ ∅ ⟩ ) ∗ + ϵ ∅ ⟨ ∅ ∣ , ϵ ∅ = p r ˉ ( ∣ F ∣ − 1 ) /2 − r . (16) The first term has norm at most p \sqrt{p} p and is supported on nonempty subsets of H H H . For a query to ℓ \ell ℓ , we have g ( I − Π ℓ − ) = ( g z ) z ∗ g(I-\Pi_{\ell}^{-})=(gz)z^* g ( I − Π ℓ − ) = ( g z ) z ∗ . For a query to u ∈ ℓ ∖ { a } u\in\ell\setminus\{a\} u ∈ ℓ ∖ { a } , let F u = N ( u ) ∖ ( N ( S ) ∪ N ( a ) ) F_u=N(u)\setminus(N(S)\cup N(a)) F u = N ( u ) ∖ ( N ( S ) ∪ N ( a )) . Grouping the output line indices in F u F_u F u gives
g Π u − = p ( g z ) ⊗ ∣ z F u ⟩ m ∗ { ℓ } ∪ F u . (17) g\Pi_u^{-}=\sqrt{p}\,(gz)\otimes|z_{F_u}\rangle_m^*{}_{\{\ell\}\cup F_u}. \tag*{(17)} g Π u − = p ( g z ) ⊗ ∣ z F u ⟩ m ∗ { ℓ } ∪ F u . (17) Thus this point query multiplies the norm of each term in (6.8) by p \sqrt{p} p .
Proof. The subset term of B B B and the line removal term C C C give
g = p z H ∗ ⊗ z ∗ + ∣ ∅ ⟩ ⊗ ⟨ { ℓ } ∣ . g=\sqrt{p}\,z_H^*\otimes z^*+|\varnothing\rangle\otimes\langle\{\ell\}|. g = p z H ∗ ⊗ z ∗ + ∣ ∅ ⟩ ⊗ ⟨{ ℓ } ∣. Multiplying in the ℓ \ell ℓ coordinate and using z ∗ z = 1 z^*z=1 z ∗ z = 1 and ⟨ { ℓ } ∣ z = − r \langle\{\ell\}|z=-\sqrt{r} ⟨{ ℓ } ∣ z = − r gives
g z = p z H ∗ − r ⟨ ∅ ∣ . gz=\sqrt{p}\,z_H^*-\sqrt{r}\,\langle\varnothing|. g z = p z H ∗ − r ⟨ ∅ ∣. The empty subset coordinate of z H z_H z H is r ˉ ∣ H ∣ / 2 \bar{r}^{|H|/2} r ˉ ∣ H ∣/2 . Separating this coordinate gives exactly (6.8), since ∣ H ∣ = ∣ F ∣ − 1 |H|=|F|-1 ∣ H ∣ = ∣ F ∣ − 1 . Deleting one coordinate from the unit vector z H z_H z H leaves a vector of norm at most one, so the nonempty part has norm at most p \sqrt{p} p . The line query formula follows from I − Π ℓ − = z z ∗ I-\Pi_{\ell}^{-}=zz^* I − Π ℓ − = z z ∗ .
For a point u ∈ ℓ ∖ { a } u\in\ell\setminus\{a\} u ∈ ℓ ∖ { a } , the positive bit is fixed to zero, so the corresponding difference uses the negative point projection. The only line through both a a a and u u u is ℓ \ell ℓ . The free lines in the negative point query are therefore { ℓ } ∪ F u \{\ell\}\cup F_u { ℓ } ∪ F u . Its part without the point index is p z ⊗ z F u \sqrt{p}\,z\otimes z_{F_u} p z ⊗ z F u . Multiplying its ℓ \ell ℓ coordinate by g g g gives the same vector g z gz g z , now with the additional factor p \sqrt{p} p , and proves (6.9). The two remaining vectors have norm one, and the query leaves the indices in H H H unchanged. □ \square □
The remaining estimates count how the source indices restrict the planted edge. For example, a line in the source line set and the queried line meet in at most one point, which fixes the planted point if it exists. The incidence structure therefore limits how many output blocks can use a given source coordinate. Lemma 6.7 converts these counts into a bound valid for arbitrary vectors.
Lemma 6.9 (A bound for E v E_v E v ). For every vertex v v v and vector f f f in the negative basis,
∥ E v f ∥ 2 = O ( 1 ) ∑ S , T ( 1 + q p 2 ( ∣ S ∣ + ∣ T ∣ ) ) 2 ∣ f S , T ∣ 2 . \lVert E_v f\rVert^2 = O(1)\sum_{S,T}\left(1+q p^2(|S|+|T|)\right)^2 |f_{S,T}|^2. ∥ E v f ∥ 2 = O ( 1 ) S , T ∑ ( 1 + q p 2 ( ∣ S ∣ + ∣ T ∣ ) ) 2 ∣ f S , T ∣ 2 .
Proof. Fix a source ( S , T ) (S,T) ( S , T ) , and write s = ∣ S ∣ s=|S| s = ∣ S ∣ and t = ∣ T ∣ t=|T| t = ∣ T ∣ . We first bound the endpoint terms by partial matchings. For the remaining terms, we identify a point or line in the source that restricts the planted edge, count the possible edges, and multiply this count by the squared local norm. The empty subset contribution has no line to use in this way; its small coefficient is instead controlled by the points in S S S .
Contributions at the planted endpoints. For a queried point u u u , let C u C_u C u be the restriction of C C C to edges with planted point u u u . A target has no line index through u u u , and C u C_u C u removes only the planted line. Thus every contributing source ( S , T ) (S,T) ( S , T ) contains exactly one line through u u u . That line determines the planted edge and the target label. Conversely, each target reads one source with coefficient one. The map therefore copies distinct source coordinates into distinct target coordinates, so it is a partial matching matrix and ∥ C u ∥ ≤ 1 \lVert C_u\rVert\leq1 ∥ C u ∥ ≤ 1 . Planting preserves x u x_u x u , so its contribution is zero. Since the positive bit at u u u is one, the remaining contribution to E u E_u E u is C u ( I − Π u − ) C_u(I-\Pi_u^-) C u ( I − Π u − ) , of norm at most one.
For a queried line ℓ \ell ℓ , a target has no point index on ℓ \ell ℓ . The point removal map therefore uses a source ( S , T ) (S,T) ( S , T ) with exactly one point in S S S on ℓ \ell ℓ . This point determines the planted edge and the target label. As above, distinct contributing sources have distinct targets. The map is a partial matching multiplied by p ˉ \sqrt{\bar p} p ˉ , so its norm is at most one. Since S S S contains a point on ℓ \ell ℓ , its basis function vanishes whenever x ℓ = 1 x_\ell=1 x ℓ = 1 . The negative line projection is consequently zero on this source, and the contribution to E ℓ E_\ell E ℓ is the map itself.
Contributions from point indices. For a query to u ∈ ℓ ∖ { a } u\in\ell\setminus\{a\} u ∈ ℓ ∖ { a } , consider the point removal term. Every source it uses contains the planted point a a a . Choosing a ∈ S a\in S a ∈ S leaves at most one possible planted line, namely the line through a a a and u u u . There are therefore at most s s s compatible planted edges. For each edge, group the free line indices through u u u . Point removal has coefficient p ˉ \sqrt{\bar p} p ˉ , while the part of the point query vector without the index u u u has norm p \sqrt p p . The squared local norm is at most p p ˉ ≤ p p\bar p\leq p p p ˉ ≤ p . Lemma 6.7 therefore assigns each source squared weight at most p s ≤ q p 2 s ps\leq qp^2s p s ≤ q p 2 s .
The empty part of (16) is also controlled by point indices. For a local block, let c = q − ∣ F ∣ c=q-|F| c = q − ∣ F ∣ be the number of lines through a a a covered by its row’s point set. This set is contained in every source read by the term, so (11) gives c ≤ s c\leq s c ≤ s . Using p r ˉ q − 1 = r p\bar r^{q-1}=r p r ˉ q − 1 = r ,
ϵ ∅ = p r ˉ ( ∣ F ∣ − 1 ) / 2 ( 1 − r ˉ c / 2 ) ≤ p r c ≤ p r s . \epsilon_{\varnothing}=\sqrt p\,\bar r^{(|F|-1)/2}(1-\bar r^{c/2})\leq\sqrt p\,rc\leq\sqrt p\,rs. ϵ ∅ = p r ˉ ( ∣ F ∣ − 1 ) /2 ( 1 − r ˉ c /2 ) ≤ p r c ≤ p r s .
The bound follows from ∣ F ∣ ≥ 1 |F|\geq1 ∣ F ∣ ≥ 1 and the union bound 1 − r ˉ c / 2 ≤ c ( 1 − r ˉ ) ≤ c r 1-\bar r^{c/2}\leq c(1-\sqrt{\bar r})\leq cr 1 − r ˉ c /2 ≤ c ( 1 − r ˉ ) ≤ cr . In particular, ϵ ∅ = 0 \epsilon_{\varnothing}=0 ϵ ∅ = 0 when c = 0 c=0 c = 0 .
For a queried line ℓ \ell ℓ , the planted point can be any of its q q q points. The squared coefficient is at most p r 2 s 2 pr^2s^2 p r 2 s 2 , so the total squared weight is at most q p r 2 s 2 qpr^2s^2 q p r 2 s 2 . For a queried point u ∈ ℓ ∖ { a } u\in\ell\setminus\{a\} u ∈ ℓ ∖ { a } , choose one of the q q q lines through u u u and one of its other q − 1 q-1 q − 1 points as a a a . Equation (17) supplies an extra squared factor p p p , giving total squared weight at most q ( q − 1 ) p 2 r 2 s 2 q(q-1)p^2r^2s^2 q ( q − 1 ) p 2 r 2 s 2 . Within each edge, the local blocks have orthogonal targets and disjoint source supports; distinct edges also have orthogonal targets. Since q p ≥ 1 qp\geq1 q p ≥ 1 , Lemma 6.7 bounds both totals by
O ( q 2 p 2 r 2 s 2 ) ≤ O ( ( q p 2 s ) 2 ) , O(q^2p^2r^2s^2)\leq O((qp^2s)^2), O ( q 2 p 2 r 2 s 2 ) ≤ O (( q p 2 s ) 2 ) ,
where we used r ≤ p r\leq p r ≤ p .
Contributions from line indices. For the nonempty part of a query to ℓ \ell ℓ , the source line set T T T contains a line h ∈ H h \in H h ∈ H . This line differs from ℓ \ell ℓ and passes through the planted point a a a . For each choice of h ∈ T h \in T h ∈ T , its intersection with the queried line fixes a a a , if an intersection exists. Thus at most t t t planted edges can use this source. The local norm in (16) is at most p \sqrt{p} p , so each edge contributes at most p p p to the squared bound. Lemma 6.7 gives total squared weight at most p t pt pt .
For the nonempty part of a query to u ∈ ℓ ∖ { a } u \in\ell\setminus\{a\} u ∈ ℓ ∖ { a } , the source still contains a line in H H H : none of these lines passes through u u u , so the point query leaves their indices unchanged. Choose such a line from T T T , then choose a a a among its q q q points. The pair a , u a,u a , u determines at most one line ℓ \ell ℓ , giving at most q t qt q t compatible planted edges. Equation (17) gives local norm at most p p p , whose square is p 2 p^2 p 2 . The total squared weight is therefore at most q p 2 t qp^2t q p 2 t .
For a queried line h ∈ N ( a ) ∖ { ℓ } h \in N(a) \setminus\{\ell\} h ∈ N ( a ) ∖ { ℓ } , planting preserves x h x_h x h , so its contribution to E h E_h E h is zero. The positive bit is fixed to zero. In the line removal term, the h h h coordinate is absent, and ∥ ⟨ ∅ ∣ Π h ∥ = r \lVert\langle\varnothing\vert\Pi_h \rVert= \sqrt{r} ∥⟨ ∅ ∣ Π h ∥ = r .
Every source used by this term still contains ℓ \ell ℓ , since the query only changes the h h h coordinate. Choosing ℓ ∈ T \ell\in T ℓ ∈ T fixes a a a as the intersection of ℓ \ell ℓ and h h h , if it exists. There are at most t t t compatible edges, each with squared local norm at most r r r , giving total squared weight at most r t rt r t .
For a point query u ∉ ℓ u \notin\ell u ∈ / ℓ , planting preserves the queried bit. It remains to consider C C C . When u u u is added to S S S , the newly covered lines through a a a form ( N ( u ) ∖ N ( S ) ) ∩ N ( a ) (N(u) \setminus N(S)) \cap N(a) ( N ( u ) ∖ N ( S )) ∩ N ( a ) . This set contains at most one line, since u ≠ a u \ne a u = a and two distinct points lie on at most one line. If no new line is covered, the local query formulas agree before and after line removal, so the contribution to E u E_u E u is zero. Otherwise, let h h h be that new line. It is fixed to zero in the positive space but is free in the part of the negative block without the point index u u u .
The correction C C C removes only ℓ \ell ℓ . Since the target cannot contain the index h h h , the source must already omit h h h . On the subset coordinates this is the functional ⟨ ∅ ∣ h \langle\varnothing\vert_h ⟨ ∅ ∣ h , which selects the coordinate without h h h . On the point coordinate, h h h is already excluded by the presence of u u u , so the map is the identity. After omitting unaffected coordinates, the local map is
( I ⊗ ⟨ ∅ ∣ h ) ⊕ 1. (I \otimes\langle\varnothing\vert_h) \oplus1. ( I ⊗ ⟨ ∅ ∣ h ) ⊕ 1.
For comparison, z h z_h z h represents the normalized function 1 [ x h = 0 ] / r ˉ \mathbf{1}[x_h = 0]/\sqrt{\bar r} 1 [ x h = 0 ] / r ˉ by (10) . Taking its inner product with a line function gives r ˉ \sqrt{\bar r} r ˉ times that function’s value at x h = 0 x_h = 0 x h = 0 . Thus z h ∗ z_h^* z h ∗ accounts for fixing the line bit to zero, using both line coordinates. We compare the actual map with ( I ⊗ z h ∗ ) ⊕ 1 (I \otimes z_h^*) \oplus1 ( I ⊗ z h ∗ ) ⊕ 1 , which satisfies the following identity for the point projections:
Π a + ( ( I ⊗ z h ∗ ) ⊕ 1 ) = ( ( I ⊗ z h ∗ ) ⊕ 1 ) Π a − . \Pi_a^+((I \otimes z_h^*) \oplus1) = ((I \otimes z_h^*) \oplus1)\Pi_a^-. Π a + (( I ⊗ z h ∗ ) ⊕ 1 ) = (( I ⊗ z h ∗ ) ⊕ 1 ) Π a − .
Indeed, it sends p ( z F u ⊗ z h ) ⊕ p ˉ \sqrt{p}(z_{F_u} \otimes z_h) \oplus\sqrt{\bar p} p ( z F u ⊗ z h ) ⊕ p ˉ to p z F u ⊕ p ˉ \sqrt{p}z_{F_u} \oplus\sqrt{\bar p} p z F u ⊕ p ˉ , and its adjoint sends the latter vector back. Here F u F_u F u consists of the other free lines through u u u . The difference between the two maps is zero on the part with the point index. On the part without that index it has norm ∥ ⟨ ∅ ∣ − z h ∗ ∥ = 2 ( 1 − r ˉ ) = O ( r ) \lVert\langle\varnothing\vert- z_h^* \rVert= \sqrt{2(1-\sqrt{\bar r})} = O(\sqrt{r}) ∥⟨ ∅ ∣ − z h ∗ ∥ = 2 ( 1 − r ˉ ) = O ( r ) , and either point projection restricted to this part has norm p \sqrt{p} p . Subtracting the displayed identity expresses the contribution as two terms, each bounded by the product of these norms. Its local norm is therefore O ( p r ) O(\sqrt{pr}) O ( p r ) . Every source still contains ℓ \ell ℓ , since u ∉ ℓ u \notin\ell u ∈ / ℓ and the query at u u u leaves that line index unchanged. There are at most t t t choices of ℓ ∈ T \ell\in T ℓ ∈ T and q t qt q t choices of a ∈ ℓ a \in\ell a ∈ ℓ . Multiplying these q t qt q t possibilities by the squared local bound O ( p r ) O(pr) O ( p r ) gives O ( q p r t ) ≤ O ( q p 2 t ) O(qprt) \le O(qp^2t) O ( q p r t ) ≤ O ( q p 2 t ) .
These cases cover every possible queried vertex. For a point query, the point is a a a , another point on ℓ \ell ℓ , or a point outside ℓ \ell ℓ , all treated above. For a line query, the line is ℓ \ell ℓ , another line through a a a , or a line outside N ( a ) N(a) N ( a ) . In the last case planting preserves the bit, and removing the index ℓ \ell ℓ leaves the queried line’s local projection unchanged. Both contributions are therefore zero. The same reasoning accounts for the zero contributions already omitted in the other cases, by Lemma 6.3 and the local query formulas.
A compatible planted edge may be counted more than once if several source lines determine it; this only increases the upper bound. The endpoint contractions contribute at most O ( ∥ f ∥ 2 ) O(\lVert f\rVert^2) O (∥ f ∥ 2 ) . Combining this with the counts assigns each source coordinate total squared weight
O ( 1 + p s + ( q p 2 s ) 2 + ( p + q p 2 ) t ) = O ( ( 1 + q p 2 ( s + t ) ) 2 ) . O(1+ps+(qp^2s)^2+(p+qp^2)t)=O((1+qp^2(s+t))^2). O ( 1 + p s + ( q p 2 s ) 2 + ( p + q p 2 ) t ) = O (( 1 + q p 2 ( s + t ) ) 2 ) .
Here (9) gives p ≤ q p 2 p\le qp^2 p ≤ q p 2 . Lemma 6.7 now gives the claimed bound.
Applying the column weight. The squared counting bound grows quadratically with the number of indices, while the squared column weight decreases at the matching rate. Their product is uniformly bounded, which gives the required bound on E v D E_vD E v D . Since k q p 2 ≤ 2 kqp^2\le2 k q p 2 ≤ 2 , we have d S , T ( 1 + q p 2 ( ∣ S ∣ + ∣ T ∣ ) ) ≤ 2 d_{S,T}(1+qp^2(|S|+|T|))\le2 d S , T ( 1 + q p 2 ( ∣ S ∣ + ∣ T ∣ )) ≤ 2 . Applying Lemma 6.9 to D f D_f D f therefore gives ∥ E v D f ∥ = O ( ∥ f ∥ ) \lVert E_vD_f\rVert=O(\lVert f\rVert) ∥ E v D f ∥ = O (∥ f ∥) , and hence ∥ E v D ∥ = O ( 1 ) \lVert E_vD\rVert=O(1) ∥ E v D ∥ = O ( 1 ) .
Proof of Theorem 6.1. By (14) and Lemmas 6.4 , 6.9 , and 6.6 ,
max v ∥ Γ ∘ Δ v ∥ ∥ Γ ∥ = O ( 1 q log q + p ( 1 + q r ) k ) ≤ O ( 1 q log q + q p 5 / 2 ( 1 + q r ) ) = O ( 1 q log q ) . \max_v\frac{\lVert\Gamma\circ\Delta_v\rVert}{\lVert\Gamma\rVert}
=O\left(\frac{1}{q\sqrt{\log q}}+\frac{\sqrt{p}(1+qr)}{k}\right)
\le O\left(\frac{1}{q\sqrt{\log q}}+qp^{5/2}(1+qr)\right)
=O\left(\frac{1}{q\sqrt{\log q}}\right). v max ∥ Γ ∥ ∥ Γ ∘ Δ v ∥ = O ( q log q 1 + k p ( 1 + q r ) ) ≤ O ( q log q 1 + q p 5/2 ( 1 + q r ) ) = O ( q log q 1 ) .
The last bound uses p = q − 7 / 8 + o ( 1 ) p=q^{-7/8+o(1)} p = q − 7/8 + o ( 1 ) and q r = ln q / 8 qr=\ln q/8 q r = ln q /8 . Applying the standard adversary bound of Lemma 2.10 proves Q 2 ( g c G q ) = Ω ( q log q ) Q_2(\mathrm{gc}_{G_q})=\Omega(q\sqrt{\log q}) Q 2 ( gc G q ) = Ω ( q log q ) .
For arbitrary sufficiently large n n n , choose a power of two q q q with 2 q 2 ≤ n < 8 q 2 2q^2\le n<8q^2 2 q 2 ≤ n < 8 q 2 and add isolated vertices to G q G_q G q . Restricting their input bits to zero recovers the original problem, so the lower bound is Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) .
Acknowledgments
AC is supported by ERC Starting Grant 101163189. ASG received support from the National Science Foundation (grant 26-17356). SP acknowledges support from the Dutch Ministry of Education, Culture, and Science through Gravitation project “Challenges in Cyber Security - 024.006.037” for this work. XZ is supported by NSERC Grant RGPIN-2024-06493.
Use of generative AI. OpenAI’s GPT-6 Astra proposed the core proof ideas of this paper and was used extensively in developing the results and preparing the manuscript. For the upper bounds, it first produced an algorithm and analysis with query exponent 13/20. By studying the ideas in that algorithm, we obtained, with further assistance from GPT-6 Astra, the simpler algorithm with exponent 92/139 presented here. In parallel, continued work with GPT-6 Astra led to the improved exponent 11/17.
For the lower bound, we built on Belovs’s approach [8 ] , with substantial assistance from GPT-6 Astra in developing the additional constructions and estimates yielding the Ω ( n log n ) \Omega(\sqrt{n\log n}) Ω ( n log n ) bound.
The authors retain full responsibility for all mathematical claims and the final text.
Standard quantum procedures
Lemma 2.4 (restated). Let a known set of a a a labels contain r r r marked vertices. With O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) queries, quantum counting returns an integer r ^ ∈ [ 0 , a ] \hat{r} \in[0,a] r ^ ∈ [ 0 , a ] that, except with the assigned error probability, is zero exactly when r = 0 r=0 r = 0 and otherwise satisfies
r / 2 ≤ r ^ ≤ 2 r , ∣ r ^ − r ∣ = O ( r ) . r/2 \le\hat{r} \le2r,\qquad|\hat{r}-r|=O(\sqrt{r}). r /2 ≤ r ^ ≤ 2 r , ∣ r ^ − r ∣ = O ( r ) . Given r ^ > 0 \hat{r}>0 r ^ > 0 , a batch of s s s independent uniform marked samples uses a fixed query limit O ~ ( ( s + 1 ) a / r ^ ) \widetilde{O}((s+1)\sqrt{a/\hat{r}}) O (( s + 1 ) a / r ^ ) , reporting failure if insufficient samples are obtained. On a good estimate, sampling succeeds except with the assigned error probability, and the uniform state over marked labels can be prepared to inverse polynomial precision in O ~ ( a / r ^ ) \widetilde{O}(\sqrt{a/\hat{r}}) O ( a / r ^ ) queries.
Proof. The claims follow from quantum counting and amplitude amplification [9 ] . Count to additive r / 10 + 1 / 100 \sqrt{r}/10+1/100 r /10 + 1/100 and round. For sampling, use verified randomized Grover trials of length O ( a / r ^ ) O(\sqrt{a/\hat{r}}) O ( a / r ^ ) , allowing O ( s + log ( 1 / ϵ ) ) O(s+\log(1/\epsilon)) O ( s + log ( 1/ ϵ )) trials. On a good estimate each trial succeeds with constant probability and, conditional on success, returns a uniform marked label. Independent trials give the stated samples and failure bound. For coherent preparation, use amplitude amplification with the lower bound r ^ / ( 2 a ) \hat{r}/(2a) r ^ / ( 2 a ) on the marked fraction [24 ] . Its query limit is fixed by the estimate and precision.
Lemma 2.5 (restated). Suppose polynomially many tests have known polynomially bounded query limits q i q_i q i . Each accepts every positive input for its own edge list and rejects negative inputs satisfying its stated bound. If all these bounds hold on a global negative input, their OR can be tested in O ~ ( ∑ i q i 2 ) \widetilde{O}(\sqrt{\sum_i q_i^2}) O ( ∑ i q i 2 ) queries, accepting every positive global input.
Proof. Apply standard variable-time search with known costs [4 ] , with error reduction. The restriction to negative inputs causes no difficulty: in a group of r r r comparable costs, a uniform coherent choice of child accepts with probability at least ( 1 − δ ) / r (1-\delta)/r ( 1 − δ ) / r if any child is positive, regardless of the other children. On an allowed negative input its acceptance probability is at most δ \delta δ . Reducing each child’s error to δ ≤ 1 / ( 4 r ) \delta\le1/(4r) δ ≤ 1/ ( 4 r ) costs an O ( log r ) O(\log r) O ( log r ) factor and separates the two cases by a constant factor. Standard amplification distinguishes these cases; grouping costs between consecutive powers of two gives the stated bound.
Collision tests
The tests below have fixed query limits. Their bounds are required on negative inputs; a collision is accepted except with the assigned error probability whether or not those bounds hold.
Algorithm 11 cover_test
Input: ( G , U , b ) (G,U,b) ( G , U , b ) , where U U U is a known vertex cover.
Group the positive degree vertices of U U U by d ≤ deg G ( u ) < 2 d d \le\deg_G(u) < 2d d ≤ deg G ( u ) < 2 d .
for each nonempty group, with d d d a power of two:
Estimate its marked count by r ^ \hat{r} r ^ .
If r ^ d > 2 b \hat{r}d>2b r ^ d > 2 b , return Yes; if r ^ = 0 \hat{r}=0 r ^ = 0 , skip this group.
Amplify the following trial O ( r ^ ) O(\sqrt{\hat{r}}) O ( r ^ ) times: Prepare a uniform marked group vertex and search its neighborhood.
Return Yes if a verified marked edge is found.
end for
return No.
Lemma 2.7 (restated). Let U U U be a known vertex cover of G G G . The procedure cover_test ( G , U , b ) \operatorname{cover\_test}(G,U,b) cover_test ( G , U , b ) uses O ~ ( ∣ U ∣ + b ) \widetilde{O}(\sqrt{|U|}+\sqrt{b}) O ( ∣ U ∣ + b ) queries. It accepts every positive input and rejects negative inputs satisfying vol ( G , U , x ) ≤ b \operatorname{vol}(G,U,x)\le b vol ( G , U , x ) ≤ b .
Proof. Failed preparations in the amplified trial are nonaccepting; the trial accepts only a verified marked edge. For a group of size a a a with r r r marked vertices, a good estimate satisfies r / 2 ≤ r ^ ≤ 2 r r/2\le\widehat{r}\le2r r /2 ≤ r ≤ 2 r . On an allowed negative input, r d ≤ b rd\le b r d ≤ b , so the count check cannot accept. If a collision has a marked endpoint in the group, a trial finds a verified edge with probability Ω ( 1 / r ) \Omega(1/r) Ω ( 1/ r ) . Every collision has an endpoint in U U U , proving acceptance on positive inputs.
Counting costs O ~ ( a ) \widetilde{O}(\sqrt{a}) O ( a ) . Each trial before amplification costs O ~ ( a / r ^ + d ) \widetilde{O}(\sqrt{a/\widehat{r}}+\sqrt{d}) O ( a / r + d ) , so the total for a group is O ~ ( a + r d ) ≤ O ~ ( a + b ) \widetilde{O}(\sqrt{a}+\sqrt{rd})\le\widetilde{O}(\sqrt{a}+\sqrt{b}) O ( a + r d ) ≤ O ( a + b ) . Summing over the logarithmically many groups proves the bound. For b = 0 b=0 b = 0 , any nonzero estimate accepts immediately; an empty cover needs no queries. □
Algorithm 12 bipartite_test
Input: ( G , A , B , k ) (G,A,B,k) ( G , A , B , k ) , with ∣ A ∣ = a |A|=a ∣ A ∣ = a and ∣ B ∣ = b |B|=b ∣ B ∣ = b .
If a side is empty, return No; otherwise let k ← min ( k , b ) k\leftarrow\min(k,b) k ← min ( k , b ) .
Estimate the number of marked vertices in B B B by r ^ \widehat{r} r .
If r ^ = 0 \widehat{r}=0 r = 0 , return No; if r ^ > 2 k \widehat{r}>2k r > 2 k , return Yes.
Let s = min { r ^ , max { 1 , ⌈ ( a r ^ 2 / b ) 1 / 3 ⌉ } } s=\min\{\widehat{r},\max\{1,\lceil(a\widehat{r}^{2}/b)^{1/3}\rceil\}\} s = min { r , max { 1 , ⌈( a r 2 / b ) 1/3 ⌉}} .
Run quantum walk search on ordered lists of s s s marked vertices from B B B .
Setup: prepare the uniform superposition over lists, allowing repetition.
Update: replace a random entry by a fresh uniform marked vertex.
Check: search A A A for a marked neighbor of some list entry.
Use gap bound 1 / s 1/s 1/ s and accepting fraction bound s / ( 3 r ^ ) s/(3\widehat{r}) s / ( 3 r ) .
return the outcome of the walk search.
Lemma 2.8 (restated). Let G G G be bipartite with sides A , B A,B A , B of sizes a , b a,b a , b . The procedure bipartite_test ( G , A , B , k ) \operatorname{bipartite\_test}(G,A,B,k) bipartite_test ( G , A , B , k ) accepts every positive input and rejects negative inputs satisfying ∣ M ∩ B ∣ ≤ k |M\cap B|\le k ∣ M ∩ B ∣ ≤ k , with query complexity
O ~ ( a + b + ( a 2 b k ) 1 / 6 ) . \widetilde{O}\left(\sqrt{a}+\sqrt{b}+(a^{2}bk)^{1/6}\right). O ( a + b + ( a 2 bk ) 1/6 ) .
Proof. Condition first on a good count estimate. If r = 0 r=0 r = 0 , no collision exists. If r ^ > 2 k \widehat{r}>2k r > 2 k , returning Yes is safe because this cannot occur on a negative input satisfying r ≤ k r\le k r ≤ k . Otherwise r / 2 ≤ r ^ ≤ 2 r r/2\le\widehat{r}\le2r r /2 ≤ r ≤ 2 r and 1 ≤ s ≤ r ^ 1\le s\le\widehat{r} 1 ≤ s ≤ r .
The walk has uniform stationary distribution on ordered lists from ( M ∩ B ) s (M\cap B)^s ( M ∩ B ) s . Refreshing one of s s s independent coordinates gives spectral gap 1 / s 1/s 1/ s when r ≥ 2 r\ge2 r ≥ 2 ; when r = 1 r=1 r = 1 , there is only one list and its check suffices. If a collision has endpoint v ∈ B v\in B v ∈ B , a list containing v v v is accepting. Its stationary probability is at least
1 − ( 1 − 1 / r ) s ≥ 1 − e − s / r ≥ s r + s ≥ s 3 r ^ . 1-(1-1/r)^s\ge1-e^{-s/r}\ge\frac{s}{r+s}\ge\frac{s}{3\widehat{r}}. 1 − ( 1 − 1/ r ) s ≥ 1 − e − s / r ≥ r + s s ≥ 3 r s .
On a negative input no list is accepting. Since the graph is known, adjacency to the stored list is computed without queries. An update prepares a uniform index i i i and a uniform marked vertex w w w , and writes the list y y y obtained by replacing x i x_i x i with w w w . If y ≠ x y\ne x y = x , then i i i and w w w are determined by x x x and y y y and can be uncomputed. If y = x y=x y = x , then w = x i w=x_i w = x i can be uncomputed, and the index register, which is uniform, is returned to its initial state. Lemma 2.4 supplies coherent preparation and updates, giving
S = O ~ ( s b / r ^ ) , U = O ~ ( b / r ^ ) , C = O ~ ( a ) . S=\widetilde{O}\left(s\sqrt{b/\widehat{r}}\right),\qquad U=\widetilde{O}\left(\sqrt{b/\widehat{r}}\right),\qquad C=\widetilde{O}(\sqrt{a}). S = O ( s b / r ) , U = O ( b / r ) , C = O ( a ) .
Lemma 2.6 therefore bounds the cost, including counting, by
O ~ ( s b r ^ + b + a r ^ s ) . \widetilde{O}\left(s\sqrt{\frac{b}{\hat{r}}}+\sqrt{b}+\sqrt{\frac{a\hat{r}}{s}}\right). O ( s r ^ b + b + s a r ^ ) .
When ( a r ^ 2 / b ) 1 / 3 (a\hat{r}^{2}/b)^{1/3} ( a r ^ 2 / b ) 1/3 lies between 1 1 1 and r ^ \hat{r} r ^ , the first and last terms balance at ( a 2 b r ^ ) 1 / 6 (a^{2}b\hat{r})^{1/6} ( a 2 b r ^ ) 1/6 , up to a constant from rounding. If it is below 1 1 1 , these terms are O ( b ) O(\sqrt{b}) O ( b ) ; if it exceeds r ^ \hat{r} r ^ , they are O ( a ) O(\sqrt{a}) O ( a ) . Since every estimate reaching the walk satisfies r ^ ≤ 2 k \hat{r}\leq2k r ^ ≤ 2 k , the fixed query limits give (2) on every execution. Good estimates and the walk guarantee acceptance on every positive input, and rejection on every negative input satisfying the count bound. Counting errors are included in the assigned error probability.
For the implementation errors, preparing a state within Euclidean distance η \eta η of its target gives, by preparation, phase reversal, and uncomputation, a reflection within operator norm 4 η 4\eta 4 η of the exact reflection. The same estimate holds for preparations controlled by a stored list. Reducing the checking error probability to O ( η 2 ) O(\eta^{2}) O ( η 2 ) gives a coherent check with operator norm error O ( η ) O(\eta) O ( η ) on the subspace where its work registers are initialized. There are only polynomially many such operations, so choosing η \eta η sufficiently small and inverse polynomial in n n n makes the sum of these errors at most ϵ \epsilon ϵ . A telescoping expansion of the products of operations then bounds the change in the final state by ϵ \epsilon ϵ . The additional precision costs only logarithmic factors.
Lemma 2.9 (restated). Let G G G have at most n n n vertices and let U U U be a known vertex cover. There is a test using O ~ ( n ( 1 + k ) 1 / 6 ) \widetilde{O}(\sqrt{n}(1+k)^{1/6}) O ( n ( 1 + k ) 1/6 ) queries that accepts every positive input and rejects negative inputs satisfying ∣ M ∩ U ∣ ≤ k |M\cap U|\leq k ∣ M ∩ U ∣ ≤ k .
Proof. Make a bipartite graph whose first side is a copy of all vertices and whose second side is a copy of U U U , joined by the original incidences. Apply the bipartite test of Lemma 2.8. Each query to a copied input bit costs one original query, and a marked edge exists in the copy exactly when it exists in the original graph.
Constructing the edge partition
Lemma C.1 (Marked counts in a piece). Let a piece have sides A A A , B B B , sizes a a a , b b b , and m m m edges. Its degrees on A A A lie between m / ( γ a ) m/(\gamma a) m / ( γ a ) and γ m / a \gamma m/a γ m / a , and similarly on B B B . If its marked volume is at most ℓ \ell ℓ , let p = min { 1 , γ ℓ / m } p = \min\{1,\gamma\ell/m\} p = min { 1 , γ ℓ / m } . Then ∣ M ∩ A ∣ ≤ a p |M \cap A| \le ap ∣ M ∩ A ∣ ≤ a p and ∣ M ∩ B ∣ ≤ b p |M \cap B| \le bp ∣ M ∩ B ∣ ≤ b p . These marked count bounds remain valid after edge deletions when the side labels are fixed.
Proof. On either side the maximum and minimum degrees differ by at most γ \gamma γ . Comparing them with the average degree gives the stated degree bounds for pieces from Lemma C.2 . Each marked vertex on A A A contributes at least m / ( γ a ) m/(\gamma a) m / ( γ a ) to marked volume. There are therefore at most γ a ℓ / m \gamma a\ell/m γ a ℓ / m such vertices, and at most a a a trivially. The argument on B B B is identical. Edge deletions do not change the input bits of the fixed labels, so the marked count bounds remain valid.
The improved algorithm from § 5 needs pieces with comparable degrees on each side and disjoint edge lists. The following construction (adapted from [13 Lemma 11] ) uses only the known graph. It supplies the degree bounds used in Lemma C.1 ; its query cost is zero. Algorithm 13 gives the construction.
Algorithm 13 partition_edges
Input: A bipartite graph G G G .
Initialize an empty list of pieces.
while edges remain:
Group side i i i by degrees in ( d i / 2 , d i ] (d_i/2,d_i] ( d i /2 , d i ] , for powers of two d i d_i d i .
Choose a pair of groups containing the most edges; copy those edges to F F F .
Repeatedly remove from F F F a vertex on side i i i of degree below d i / γ d_i/\gamma d i / γ .
Record F F F and its maximum degree on each side.
Delete exactly E ( F ) E(F) E ( F ) from G G G .
end while
return the recorded pieces.
Lemma C.2 (Exact partition). Algorithm 13 partitions a known bipartite graph into j = O ( ( log n ) 3 ) j = O((\log n)^3) j = O (( log n ) 3 ) nonempty pieces, without input queries. It returns triples ( F , d 1 , d 2 ) (F,d_1,d_2) ( F , d 1 , d 2 ) , where F F F is an exact edge list on its incident labels and every vertex on side i i i has degree in [ d i / γ , d i ] [d_i/\gamma,d_i] [ d i / γ , d i ] , for γ = 32 ( log n ) 2 \gamma= 32(\log n)^2 γ = 32 ( log n ) 2 . Marked volume is additive over the pieces.
Proof. Edges removed from F F F during trimming remain in G G G for subsequent iterations.
If the current graph has m m m edges, some pair contains at least m / ( 4 ( log n ) 2 ) m/(4(\log n)^2) m / ( 4 ( log n ) 2 ) edges. Each selected side has at most 2 m / d i 2m/d_i 2 m / d i vertices. Charging a trimmed edge to its first removed endpoint gives total charge at most
2 m d 1 d 1 γ + 2 m d 2 d 2 γ = m 8 ( log n ) 2 . \frac{2m}{d_1}\frac{d_1}{\gamma}+\frac{2m}{d_2}\frac{d_2}{\gamma}
=\frac{m}{8(\log n)^2}. d 1 2 m γ d 1 + d 2 2 m γ d 2 = 8 ( log n ) 2 m .
At least m / ( 8 ( log n ) 2 ) m/(8(\log n)^2) m / ( 8 ( log n ) 2 ) edges are recorded. Repeated removal of this fraction gives j = O ( ( log n ) 3 ) j = O((\log n)^3) j = O (( log n ) 3 ) . Each piece has the claimed degree bounds. Recording the actual maximum degree on each side preserves the degree ratio and ensures that the recorded bounds do not exceed the maximum degree of the input graph. Its edge list is disjoint from all others, proving both exactness and additivity.