Quantum collision finding
The search for distinct inputs with equal function values under a specified multiplicity promise.
On this page
Definition, purpose and input assumptions
A collision is a pair x not equal to y with f(x)=f(y). Quantum collision algorithms combine a stored sample of values with search for a matching value outside that sample. Their complexity depends on the domain size, multiplicity promise and coherent access to the function and membership test.
Mathematical mechanism
For a two-to-one function on N inputs, storing roughly r sampled input-value pairs costs r queries. Searching the remaining domain for a value matching the sample has a marked fraction of order r/N and therefore costs order sqrt(N/r) queries. Balancing r and sqrt(N/r) gives r of order N^(1/3). This simple scaling explains the characteristic cube-root quantum query behavior without claiming exact constants.
Fully solved reference example
Let N=64 and choose r=4. The two leading query scales are 4 for sampling and sqrt(64/4)=4 for the subsequent search. Choosing r=1 gives scales 1 and 8; choosing r=16 gives 16 and 2. The balanced choice reduces this illustrative sum to 8 rather than 9 or 18.
For an explicit function f(x)=floor(x/2) on 0 through 7, inputs 2 and 3 collide at value 1. This transparent function is classically trivial; it illustrates the collision definition, not the black-box hardness promise.
Limitations and classical comparison
The birthday-paradox classical comparator has square-root sampling scale under suitable random-function assumptions. Different collision problems, cryptographic hash models and r-to-one promises have different bounds. Memory and coherent lookup costs cannot be hidden inside a constant-time membership oracle without disclosure.
Scientific relationships
Collision finding uses amplitude amplification but solves a different task from unstructured marked-item search. It is distinct from element distinctness, where an arbitrary list may contain only one duplicate pair.
Counting the marked partners exactly
Assume f is exactly two-to-one on a domain of sixteen labels. Choose four distinct sample inputs and query their values. If the sample already contains equal values at different inputs, it directly supplies a collision. Otherwise the four sampled values belong to four different pairs, and each has exactly one partner outside the sample. There are therefore exactly four marked external inputs, not merely an unspecified fraction of order four divided by sixteen.
Searching a uniform superposition over the twelve external labels gives marked fraction 1/3. One Grover iteration has success probability sin²(3 arcsin(1/√3))=25/27. Alternatively, search all sixteen labels while explicitly excluding the four sample inputs from the marking predicate. The marked fraction is then 1/4, and one ideal iteration succeeds exactly. Preparing the external-only superposition may cost more than preparing four Hadamards, so its larger marked fraction does not automatically provide the cheaper implementation.
The predicate must test both that an input is outside the sample and that its value equals a stored sample value. Without the exclusion test, a sampled input matches itself and is not a collision certificate. Once a search result y is obtained, the stored matching input x and the equality f(x)=f(y) can be verified classically. The required output is a pair of distinct inputs, not simply a value that occurs in the table.
The probability of finding a collision during sampling
For a uniformly chosen sample without replacement from a two-to-one domain of size N, suppose j inputs have been selected without a collision. They occupy j distinct pairs. Among the N-j remaining inputs, j are partners of already selected inputs, so N-2j avoid a collision at the next draw. The probability that a sample of size r contains no collision is therefore the product over j from zero to r-1 of (N-2j)/(N-j), as long as the terms describe a feasible sample.
For N=16 and r=4, this product is 1·(14/15)·(12/14)·(10/13)=8/13. Thus the sample itself yields a collision with probability 5/13. Conditional on no sample collision, the exact four-partner search analysis above applies. The two stages should be analyzed conditionally in this order; treating all four sampled values as distinct without checking them would omit a real branch of the algorithm.
The product also explains the classical birthday scale. For r small compared with N, each factor is approximately 1-j/N, so the logarithm of the no-collision probability is approximately -r(r-1)/(2N). A constant collision probability appears when r is on the order of √N. This approximation is a statement about the specified random sampling and multiplicity promise, not about every deterministic structured function.
Balancing sample and search costs with explicit coefficients
A simplified cost objective is C(r)=αr+β√(N/r), where α prices one stored sample and β prices the search component under a declared query model. Differentiating its continuous relaxation gives α=(β√N)/(2r^{3/2}), hence r=(β²N/(4α²))^{1/3}. The cube-root exponent survives, while the optimal constant depends on the relative costs. The chosen sample size must then be an integer in the feasible domain, and exact marked fractions can modify the finite-size comparison.
With N=64 and α=β=1, the continuous optimum is the cube root of sixteen, approximately 2.52. The simplified objective at r=2 is 2+√32, approximately 7.657; at r=3 it is 3+√(64/3), approximately 7.619; at r=4 it is eight. This calculation refines the exponent-balancing intuition but is still not an exact query count for a complete collision algorithm. Constants for state preparation, search scheduling, verification, and reversible membership are absent from the toy objective.
If the sampled outputs have w bits, a direct reversible comparison against every stored value can require work proportional to rw, together with scratch storage and uncomputation. A coherent lookup structure can change this cost, but it requires its own access and construction assumptions. Sample storage also includes the input labels, costing roughly r(log₂N+w) classical bits before any coherent-memory implementation overhead.
Promise changes and an original figure
For a one-to-one function, no collision exists, so a search procedure needs a failure or decision guarantee rather than an endless expectation of finding a partner. For a function with arbitrary multiplicities, a sample value may have many partners or none outside the sample. The exact two-to-one counting argument then no longer applies. Element distinctness, where only one duplicate pair may exist, is a different promise and supports a different optimal query exponent.
A structured function such as adjacent-pair grouping can reveal collisions through its formula with almost no search. The quantum query result concerns an otherwise unspecified oracle satisfying the promise, not the easiest available classical representation of the same function. A fair comparison supplies both algorithms with comparable information.
Sources
Verification scope
Selected source text checked ·
Full text indexed, 8 pages, 288 lines. Primary collision paper retrieved; multiplicity promise, query model and space-time tradeoff context inspected.
Access and topic assumptions inspected; no exhaustive theorem-by-theorem external review, quantum hardware execution, or empirical advantage claim. Original definitions and finite examples are not reproduced source passages.