arXiv:2611.12619cs.DSNov 2026

Manuscript Offprint

arXiv:2611.12619

Better Bounds For Graph Reconstruction

Antoni Buraczewski, Paweł Gawrychowski

Abstract

The goal in graph reconstruction problems is to learn an initially unknown graph using only a few queries of a specific type. Possibly the most natural query type is retrieving the distance between any two vertices of a connected, undirected, and unweighted graph. For a bounded-degree graph on nn vertices, Kannan, Mathieu, and Zhou [TALG 2018] showed a randomized algorithm that uses only O~(n3/2)\tilde{\mathcal{O}}(n^{3/2}) such queries. On the lower bound side, it is only known that any randomized algorithm needs Ω(nlog⁡n)\Omega(n \log n) queries. We make a significant step forward to bridging these bounds by designing a randomized algorithm that uses n4/3+o(1)n^{4/3+o(1)} queries. This requires extending the original approach based on Voronoi diagrams into a recursive procedure that partitions a cell into smaller cells. While such a recursive approach has been used in the related graph verification problem, in the more general graph reconstruction problem we need to operate without knowing the graph, which requires a new (and more technical) approach.

1 Introduction

Consider a large unknown graph on nn vertices that can only be accessed by querying for the distance between any two vertices. We want to reconstruct the whole graph with only a few such queries. This naturally captures the setting where the queries are slow or expensive. We stress that we want to minimise the number of queries, and do not concern ourselves with the time necessary to actually reconstruct the graph based on the answers (nor the time to figure out which query should be asked next). However, ideally it should be polynomial in the size of the graph.

There are at least two interesting scenarios in which we might be interested in such a task. First, we have the network reconstruction problem [ACKM09, BEE⁺06, DAB⁺06, TLP09], in which we want to recover a hidden network topology using a tool such as traceroute. Second, we have the evolutionary tree recovery problem [RS07b, KZZ03, Hei89, WSSB77], in which we want to recover a hidden evolutionary tree by computing similarities between some species.

Reyzin and Srivastava [RS07a] provided an elementary information-theoretical argument establishing that reconstructing a general (connected, undirected, and unweighted) graph on nn vertices requires Ω(n2)\Omega(n^2) queries. The lower bound already holds for a constant-depth tree. However, the difficult instance contains a root of degree Ω(n)\Omega(n). This motivated Kannan, Mathieu, and Zhou [KMZ18] to consider the more restricted but still well-justified from the point of view of the above applications case of bounded-degree graphs. Under such an assumption, they showed that O~(n3/2)1\tilde{\mathcal{O}}(n^{3/2})^1 queries are always sufficient in expectation to recover the graph (that is, the algorithm always correctly recovers the graph, and the number of queries is a random variable with the expected

*Partially supported by the Polish National Science Centre grant number 2023/51/B/ST6/01505. ¹In this paper, O~(f(n))\tilde{\mathcal{O}}(f(n)) denotes O(f(n)polylog n)\mathcal{O}(f(n)\text{polylog } n).

value upper bounded by O~(n3/2)\tilde{\mathcal{O}}(n^{3/2})). However, they were only able to show that Ω(nlog⁡n/log⁡log⁡n)\Omega(n \log n / \log \log n) queries are necessary for such graphs. For random regular graphs (with small degree), Mathieu and Zhou [MZ23] showed that O~(n)\tilde{\mathcal{O}}(n) queries are enough (and, in fact, the same simple procedure recovers an arbitrary bounded-degree graph with O~(n5/3)\tilde{\mathcal{O}}(n^{5/3}) queries). Krivelevich and Zhukovskii [KZ25] considered the same question in the more standard binomial random graph model G(n,p)G(n,p) and obtained both lower and upper bounds parameterized by the density. Kannan, Mathieu, and Zhou [KMZ18] considered the reconstruction problem for chordal and outerplanar graphs, showing that in both cases O~(n)\tilde{\mathcal{O}}(n) queries are enough (see also [RLYW21] for better bounds for chordal graphs). Bastide and Groenland [BG25] considered the reconstruction problem for trees, chordal graphs, and graphs with bounded treelength, obtaining tight results. Interestingly, they were able to establish that any randomized algorithm requires Ω(nlog⁡n)\Omega(n \log n) queries to reconstruct a bounded-degree tree on nn nodes, which remains the highest known lower bound for this problem, leaving a large gap between the lower bound of Ω(nlog⁡n)\Omega(n \log n) and the upper bound of O~(n32)\tilde{\mathcal{O}}(n^{\frac{3}{2}}). Eppstein, Goodrich, and Liu [EGL25] considered reconstructing graphs with small BFS width, and Kaudan and Nayyeri [KN26] considered reconstructing graphs with bounded cutwidth.

Kannan, Mathieu, and Zhou [KMZ18] showed that natural greedy algorithms are enough to recover the graph with n1+o(1)n^{1+o(1)} queries that return not only the distance but the actual shortest path, and to verify a given graph with n1+o(1)n^{1+o(1)} distance queries. This suggests that perhaps n1+o(1)n^{1+o(1)} queries are enough to recover an arbitrary bounded-degree graph with distance queries, but decreasing the upper bound of O~(n3/2)\tilde{\mathcal{O}}(n^{3/2}) remains an important open problem in this area.

In an attempt to understand the limitations of the known algorithms for reconstructing a graph with distance queries, Abrahamsen, Bodwin, Rotenberg, and Stöckel [ABRS16] introduced the weaker betweenness queries, which given three vertices x,y,zx, y, z return whether yy lies on a shortest path between xx and zz. Surprisingly, they were able to show a randomized algorithm that uses only O~(n3/2)\tilde{\mathcal{O}}(n^{3/2}) queries. This suggests that improving the bound on the number of distance queries should exploit the actual distances.

Our results We design an algorithm that recovers an arbitrary bounded-degree graph on nn vertices with only n4/3+o(1)n^{4/3+o(1)} distance queries in expectation. More formally, we show the following theorem.

Theorem 1.1. There is a randomized algorithm that, given access to a connected nn-vertex graph in which every vertex has degree at most Δ\Delta through queries that return the distance between any two vertices, recovers the graph using n4/3⋅(Δlog⁡n)O(log⁡log⁡n)n^{4/3} \cdot (\Delta \log n)^{\mathcal{O}(\log \log n)} queries in expectation.

In particular, for Δ=polylog n\Delta = \text{polylog } n this is n4/3+o(1)n^{4/3+o(1)}.

We stress that we will measure the complexity of all algorithms only in the number of queries. However, it is actually not difficult to verify that our algorithm can be implemented efficiently, that is, in polynomial time. Further, when presenting some of the procedures we will only show that the claims on their correctness and running time hold with constant probability. However, in every recursive call the procedures will be repeated until they achieve the desired guarantees on the sizes of the cells, so in fact the whole algorithm is Las Vegas.

Related work There is a vast body of work concerned with reconstructing an nn-vertex graph with queries of different types. Perhaps the simplest are independent set queries [GK98], where we can query whether, for a set of vertices SS, the subgraph induced by SS contains at least one edge. It is known that in this model O(log⁡n)\mathcal{O}(\log n) queries per edge suffice [AC08]. The more powerful additive queries return the number of edges in the subgraph induced by SS, allowing one to achieve an asymptotically optimal bound for dense [GK00] and sparse [CK08] graphs, and also some restricted classes of graphs [ABK⁺04]. Queries that return the number of connected components [BMSX25] or an adversarially chosen maximal independent set [KOT25] have also been considered. Another example is cut queries that, for two disjoint sets of vertices SS and TT, return the number of edges with one endpoint in SS and the other in TT. However, such queries are usually considered in the context of connectivity (for example, computing the global min cut, or the s−ts-t cut) [RSW18, AEG⁺22, JNS26, KK26, KK25, LSZ21]. A separate line of work concerns edge queries, see [LY91] for a thorough introduction.

References (35)