Quantum query complexity of graph connectivity

Christoph Dürr, Mehdi Mhalla, Yaohui LeiarXiv 2003 · DOI

Abstract

Determining whether a graph is connected is a fundamental task in computer science. While classical algorithms require $O(n^2)$ queries to the adjacency matrix of an $n$-vertex graph, quantum algorithms can achieve significant polynomial speedups. This paper establishes an $\Omega(n^{3/2})$ lower bound for graph connectivity using the Ambainis adversary method and provides a near-matching $O(n^{3/2} \log n)$ upper bound based on Grover’s search. Additionally, the study explores the adjacency list model, providing tight bounds for strong connectivity in directed graphs.

Introduction

In computational complexity, "query complexity" measures the efficiency of an algorithm by the number of times it accesses its input. For a graph with $n$ vertices, a classical algorithm might need to check every possible pair of vertices to see if an edge exists—requiring $O(n^2)$ queries—to guarantee it knows if the graph is connected. While it was known that quantum computers could provide speedups for "monotone" graph properties, existing lower bounds were relatively loose. This work pinpoints the specific "quantum price" of determining connectivity in both the adjacency matrix and adjacency list models.

Methods: Bridging Classical and Quantum

The authors combine classical graph theory and quantum search techniques to establish new efficiency benchmarks.

Upper Bounds: Grover-Enhanced Traversal

The algorithmic breakthrough comes from nesting Grover’s Search Algorithm within a classical Depth-First Search (DFS). In a classical traversal, scanning all possible neighbors of a vertex takes $O(n)$ queries in the matrix model. By using Grover’s algorithm to "search" for an unvisited neighbor, this step is reduced to $O(\sqrt{n})$ queries. Since a full traversal visits $n$ vertices, the total complexity is optimized to $O(n^{1.5})$.

Lower Bounds: The Ambainis Adversary Method

To prove that no quantum algorithm can surpass a certain efficiency, the authors employ the Ambainis Adversary Method. This technique involves defining two sets of input graphs—one where the property (connectivity) holds and one where it does not—and showing they are mathematically difficult for a quantum state to distinguish.

Figure 5: The Ambainis adversary method visually explained. To prove a lower bound, researchers show that a quantum algorithm cannot easily distinguish between a connected graph (like a single cycle) and a disconnected one (like two separate paths) without a minimum number of queries.

Key Insights and Results

The paper provides a definitive map of the quantum query complexity for connectivity across different graph models:

Model Lower Bound (Required) Upper Bound (Achieved)
Matrix Model (Undirected) $\Omega(n^{1.5})$ $O(n^{1.5} \log n)$
List Model (Directed, degree $k$) $\Omega(n\sqrt{k})$ $O(n\sqrt{k} \log n)$

The Complexity of Sparsity

In the List Model, where algorithms ask for the $i$-th neighbor of a vertex, the complexity depends on the degree $k$. The authors found that for directed graphs with out-degree $k$, the complexity is $\Omega(n\sqrt{k})$, showing that even with more structured access, the number of vertices remains a fundamental bottleneck.

Figure 3: A specialized graph construction used to prove the $\Omega(n^{3/2})$ lower bound. By embedding a hard-to-solve sub-problem (represented by nodes $u_0 \dots u_3$) into the connectivity of the larger graph, the authors demonstrate the inherent difficulty of the task.

Conclusion

While a classical algorithm requires $n^2$ queries in the matrix model, the quantum algorithm only needs about $n^{1.5}$. For a graph with 1,000,000 vertices, this is the difference between a trillion queries and just a billion—a 1,000x improvement. Although a small logarithmic gap remains between the lower and upper bounds, this work solidifies the theoretical foundation for quantum graph algorithms and suggests that paradigms like Quantum Random Walks may offer further insights in the future.

Summary updated

BibTeX
@misc{durr2003quantum,
  author = {Christoph Dürr and Mehdi Mhalla and Yaohui Lei},
  title = {{Quantum query complexity of graph connectivity}},
  year = {2003},
  eprint = {quant-ph/0303169},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/quant-ph/0303169},
}
Figure