Abstract 1 Introduction 2 Background 3 Lower Bound Construction 4 Upper Bound on BFS-width of Bounded Cutwidth Graphs 5 Graph reconstruction algorithm References

Cutwidth Versus BFS-Width with Applications to Graph Reconstruction from Distance Queries

Chirag Kaudan ORCID Oregon State University, Corvallis, OR, USA    Amir Nayyeri ORCID Oregon State University, Corvallis, OR, USA
Abstract

Eppstein, Goodrich, and Liu [ESA 2025] introduced a new graph parameter, called BFS-width, and gave polylogarithmic bounds on it for bounded bandwidth graphs. Their bounds naturally imply several applications, e.g. in graph reconstruction via shortest path distance queries, graph drawing, and matrix reordering.

We study this parameter for a broader class of graphs, namely bounded cutwidth graphs. We prove a sublinear upper bound on the BFS-width of bounded cutwidth graphs and show that our bounds are asymptotically tight. Our upper bound implies the first deterministic algorithm for reconstructing a bounded cutwidth graph with a subquadratic number of shortest path distance queries.

Keywords and phrases:
Graph algorithms, graph theory, cutwidth, pathwidth, BFS-width
Copyright and License:
[Uncaptioned image] © Chirag Kaudan and Amir Nayyeri; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Shortest paths
Funding:
The authors were supported by NSF grants CCF-1941086 and CCF-2311180.
Editor:
Pierre Fraigniaud

1 Introduction

Recently, Eppstein, Goodrich, and Liu [13] introduced the parameter BFS-width of a graph, defined as the maximum cardinality of a layer over all breadth-first search trees of the graph. More formally, for an undirected graph G=(V,E), and any vertex vV, the bfsw(G,v) is the maximum number of vertices that are at the same distance from v, i.e. maxi0|Li(v)|, where Li(v) is the set of all vertices at distance i of v. In turn, the BFS-width of the graph is defined as bfsw(G)=maxvV(bfsw(G,v)).

BFS-width is a natural parameter to study, as the width of a breadth-first search tree plays a central role in many graph algorithms, for example in the computation of small separators. Eppstein, Goodrich, and Liu study BFS-width in relation to bandwidth, a parameter whose exact computation is NP-hard [14, 15], and show polylogarithmic upper and lower bounds on the BFS-width of bounded bandwidth graphs. Consequently, simple BFS-based algorithms perform well on bounded-bandwidth graphs for a variety of tasks. Specifically, Eppstein, Goodrich, and Liu show applications in analysis of the Cuthill-McKee algorithm, graph drawing, and graph reconstruction from shortest-path distance queries.

Motivated both by this theoretical perspective and by the analysis of simple BFS-based algorithms, we investigate whether there exist families of graphs beyond bounded bandwidth that admit sublinear BFS-width.

Overview of Results

Cutwidth vs. BFS Width

The next natural family to consider is bounded cutwidth graphs. Our primary result shows that such graphs have sublinear BFS-width, although the width may still be polynomially large. Specifically, we prove that

bfsw(G)=O((cw(G))2n1ϵ(cw(G))),

where ϵ(x)=2(2x+1), and cw(G) denotes the cutwidth of G (see Theorem 7).

Moreover, we show a nearly matching lower bound by constructing an infinite family of trees such that for every tree T in the family with n vertices,

bfsw(T)=Ω(1cw(T)n1ϵ(cw(T)21)).

(see Theorem 4)

Our upper bound can be stated more generally in terms of pathwidth and maximum degree. Specifically, we prove that

bfsw(G)=O(Δ(G)2n1ϵ(pw(G))),

where pw(G) and Δ(G) denote the pathwidth and maximum degree of G, respectively. Since bounded degree together with bounded pathwidth implies bounded cutwidth (and vice versa up to constant factors), this formulation decouples the dependence on Δ(G) and pw(G) and is therefore more general. Our lower bound can similarly be expressed in terms of pathwidth.

We note that a bound on the maximum degree is necessary to obtain sublinear BFS-width. For example, a star has linear BFS-width. In particular, bounded pathwidth graphs with unbounded maximum degree may have linear BFS-width. Furthermore, even among bounded-degree trees, linear BFS-width is possible: a binary tree may have more than half of its vertices in its last layer, and therefore linear BFS-width. Thus, the family of bounded-degree trees does not, by itself, guarantee sublinear BFS-width. Hence, it appears that extending beyond bounded cutwidth – e.g., to bounded pathwidth graphs or to bounded-degree graphs of bounded treewidth – breaks the guarantee of sublinear BFS-width.

Finally, since bw(G)2bfsw(G), as shown by Eppstein, Goodrich, and Liu, our result implies a sublinear bound on the bandwidth of bounded-cutwidth graphs. In particular,

bw(G)=O((cw(G))2n1ϵ(cw(G))).

Graph Reconstruction

We apply our results to the hidden graph reconstruction problem, which asks to reconstruct a graph which has an invisible edge set using queries to an oracle that returns some information about the graph e.g. a shortest path between a pair of vertices. In this paper, the query model we consider is the shortest path distance model, which returns the shortest path length between the queried pair of vertices. We assume that graphs are connected for the graph reconstruction problem with shortest path distance queries, as there are disconnected graphs which require Ω(n2) queries to reconstruct.

A simple, natural algorithm for graph reconstruction with shortest path distance queries first constructs breadth-first search layers and then simply queries all possible edges, which we know must lie between vertices in the same or consecutive BFS layers. That is, the algorithm simply queries all pairs of vertices that lie in BFS layers at most one apart. Of course, if the BFS-width of an n vertex graph is Ω(n), then this algorithm must make Ω(n2) queries to reconstruct it. Conversely, if the graph has sublinear BFS-width then we obtain a subquadratic query reconstruction algorithm, improving on the trivial Θ(n2) query algorithm which simply queries all pairs of vertices. Eppstein, Goodrich, and Liu show that this algorithm based on BFS layers makes nearly linear queries to reconstruct any bounded bandwidth graph.

We show that this algorithm makes a subquadratic number of queries for bounded cutwidth graphs, specifically, O(cw(G)2n2122cw(G)+1) queries for any graph G on n vertices and cutwidth cw(G) (see Theorem 10). Our result is the first subquadratic deterministic algorithm to reconstruct bounded cutwidth graphs to the best of our knowledge. A randomized algorithm with O~(n3/2) queries to reconstruct bounded degree graphs was known before [18, 21].

2 Background

In this section, we first briefly review the basic definitions and notation used throughout the paper. We then provide a more detailed overview of graph width parameters, as they are the central subject of study in the paper.

2.1 Basic Definitions and Notation

In this paper, all graphs are unweighted. For a graph G=(V,E), we use |V(G)| to refer to the cardinality of the vertex set of G. We refer to this quantity |V(G)| as the order of G and the quantity |E(G)| as the size of G. For a vertex vV(G), we use NG(v) to denote the set of all neighbors of v in the graph G and NG[v] = NG(v){v}, the open and closed neighborhood of v respectively. Analogously, for a graph G=(V,E) and a set SV(G), we let NG[S]={uV(G)aS,dG(a,u)1} and NG(S)=NG[S]S be the closed neighborhood and open neighborhood of S in G respectively where dG(x,y) is the shortest path distance between vertices x and y in G. For a graph G, we let Δ(G) denote the maximum degree of G. For a subset SV(G) of a graph G, we denote the subgraph of G induced by S with G[S].

For any non-trivial tree T, we define (T) as the number of leaves in T. For the trivial tree T1 on one vertex, we explicitly define (T1)=1, despite T1 having no leaves. We define a uniform depth tree as a rooted tree in which every leaf has the same distance from the root.

For any vector x=(x1,x2,,xn)n and any real p1, we use xp to denote the p-norm of x: xp=(i=1n|xi|p)1/p.

We refer to the binary tree of height k with 2k+11 vertices as a full binary tree of height k.

2.2 Preliminaries on Width Parameters and Strahler Numbers

We formally define the graph width parameters bandwidth, pathwidth, and cutwidth, show some of the well-known relationships between them, and define the Strahler number, a well-studied graph parameter for directed rooted trees (arborescences) which we will use to develop our results.

A linear layout, or layout, of an undirected graph G with n=|V(G)| is a bijection ϕ:V(G)[n]={1,2,,n}. The length of an edge uvE(G) in a layout ϕ of G is |ϕ(u)ϕ(v)|. The bandwidth of ϕ, denoted bw(ϕ), is the maximum length of any edge uvE(G). The bandwidth bw(G) of graph G is the minimum bandwidth over all bijections φ:V(G)[n]. The notion of bandwidth is equivalent to finding the length of the longest edge on a linear layout of the graph on a number line that minimizes the longest edge length.

Given an undirected graph G=(V,E), a layout ϕ of G, and an integer i, the edge cut of ϕ at position i, denoted θ(i,ϕ,G), is defined θ(i,ϕ,G)=|{uvE(G)u{xV(G)ϕ(x)i}v{xV(G)ϕ(x)>i}}|. That is, if we imagine a layout ϕ of G as an ordering of the vertices on a number line, the edge cut of ϕ at position i is the number of edges of G crossing the vertical line between vertex i and i+1. The maximum edge cut of ϕ, denoted Θ(ϕ,G), is the maximum value of θ(i,ϕ,G) over all i. The cutwidth cw(G) of graph G is the minimum value of Θ(ϕ,G) over all bijections ϕ:V(G)[n]. We will use the informal terms “left” and “right” of an edge cut of layout ϕ of G at position i to refer to the sets {xV(G)ϕ(x)i} and {xV(G)ϕ(x)>i} respectively, viewing the layout as embedding the graph on a number line. We specifically note that both of the graph classes bounded cutwidth and bounded pathwidth are monotone graph classes i.e. they are closed under taking any subgraph (in particular, not merely induced subgraphs).

A path decomposition of G=(V,E) is a sequence of subsets of V(G), called bags, such that each edge of G is contained in a bag and each vertex appears in some contiguous subsequence of the bags. The width of a path decomposition (Vi)i1 of G is maxi|Vi|1 and the pathwidth of undirected graph G, denoted pw(G), is the minimum width over any path decomposition of G.

The Strahler number, also called the Horton-Strahler number, of a rooted, directed tree T is given by the following recursive definition.

Definition 1.

Let T be a rooted, directed tree. The Strahler number of a vertex xV(T), denoted ν(x), is defined recursively below.

ν(x)={1,if x is a leaf,1+k,if x has at least 2 distinct children, each with Strahler numberk=maxxiCh(x){ν(xi)}maxxiCh(x){ν(xi)},otherwise.

where Ch(v) denotes the set of children of a vertex in T. Note that the Strahler number of any vertex must be a positive integer. The Strahler number of a rooted, directed tree T is the Strahler number of its root, denoted ν(T).

For technical convenience, we also define a modified notion of the Strahler number called the t-shifted Strahler number which retains the recursive definition of the Strahler number but assigns t to each leaf instead of 1 as the base case, for some positive integer t.

Definition 2.

Let T be a rooted, directed tree. The t-shifted Strahler number of a vertex xV(T), denoted νt(x), is defined recursively below.
νt(x)={t,if x is a leaf,1+k,if x has at least 2 distinct children, each with Strahler numberk=maxxiCh(x){νt(xi)}maxxiCh(x){νt(xi)},otherwise.

where Ch(v) denotes the set of children of a vertex in T. Note that the t-shifted Strahler number of any vertex must be an integer at least t. The 𝐭-shifted Strahler number of a rooted, directed tree T is the t-shifted Strahler number of its root, denoted νt(T).

For any directed, rooted tree T, the relationship νt(T)=ν(T)+t1 follows immediately from the definitions of Strahler number and t-shifted Strahler number, hence the name.

We briefly discuss some of the many known relationships between these graph parameters. Firstly, note that bounded bandwidth implies bounded maximum degree and also implies bounded pathwidth, but bounded pathwidth does not imply bounded degree e.g. the star graph K1,n1 on n vertices has pathwidth 1. That bounded bandwidth implies bounded pathwidth can be seen via the following alternate definition of pathwidth: The pathwidth of G can also be seen as a layout parameter, called the vertex separation number, defined nearly identically to cutwidth but defined in terms of number of vertices with neighbors across a cut rather than number of edges crossing a cut [8, 12].

This alternate definition of pathwidth as the vertex separation number yields the inequality pw(G)cw(G)Δpw(G) for any graph G with maximum degree Δ. Also, cw(G)Δ(G)bw(G) for any graph G [10].

Furthermore, bounded BFS-width implies bounded bandwidth [13]. This can be seen by taking the linear ordering of a graph G induced by the breadth-first search tree that realizes the BFS-width of G and noting that edges of G must lie between vertices in the same or consecutive BFS layers.

In this paper, we need to work with different width parameters of trees as well as their Strahler number. Technically, the Strahler number is defined for directed rooted trees, while the width parameters are defined for undirected trees. Whenever the root is clear from the context, we abuse notation by denoting both of these directed and undirected trees by T. Specifically, we use pw(T), cw(T), and Δ(T) for a directed rooted tree T, where we mean the pathwidth, cutwidth and the maximum degree of the underlying undirected tree in order.

In this case, the inequality pw(T)ν(T)2pw(T)+2 holds [20]. The following lemma summarizes some of the most important inequalities for our purposes that were discussed above.

Lemma 3.

For a directed rooted tree T with maximum degree Δ, we have

cw(T)Δ(T)pw(T)ν(T)2pw(T)+22cw(T)+2

3 Lower Bound Construction

In this section, we prove the following theorem.

Theorem 4.

For any ν2, there exists an infinite family of (uniform depth) trees 𝒞ν of Strahler number ν and cutwidth and pathwidth at most ν such that for any T𝒞ν we have

bfsw(T)1ν1|V(T)|11/2ν1 .

We explicitly construct the infinite sequences of trees 𝒞ν=(Cν,p)pν (one sequence per each value of ν{2,3,}) with Strahler number ν2. First, we consider the case ν=2.

Base Case (𝒑=𝟐).

The tree C2,2 is a rooted full binary tree of height 1, i.e. a root with two leaves as children.

Recursive case (𝒑>𝟐).

The tree C2,p is the rooted binary tree defined by its left and right subtrees: (1) its left subtree is C2,p1, and (2) its right subtree is a rooted path of length p2, i.e. (u1,u2,,up1) with root u1. Let C2,p1 be as defined recursively with root rp1. One can also view the construction C2,p as introducing p vertices to the graph C2,p1 that form a path of length p1 (as an induced subgraph), of which one endpoint is a leaf of C2,p and the other endpoint is the root of C2,p.

Figure 1: Left: The recursive construction of C2,p: C2,2, C2,3 and C2,4 in order. Right: Layout L2,4 of C2,4, which has cutwidth 2.
Lemma 5.

For any p2, C2,p has Strahler number 2, cutwidth at most 2, p leaves, and p(p+1)/2 vertices.

Proof.

We use induction on p. The base case is a tree with three vertices, two leaves, and Strahler number two, which satisfies the statement of the lemma.

Inductively, C2,p is a tree with (C2,p1)+1 leaves, and |V(C2,p1)|+p vertices. Solving the recurrence, one obtains (C2,p)=p and |V(C2,p)|=p(p+1)/2, respectively. In addition, ν(C2,p1)=2 (that is, ν(rp1)=2) inductively and the Strahler number of the right subtree of C2,p, which is a path rooted at one of its endpoints, is one. Hence, ν(C2,p)=2 and pw(C2,p)2 by Lemma 3.

Finally, we show that C2,p has cutwidth at most two by inductively constructing a layout L2,p of cutwidth two for C2,p, with the additional property that the root is the leftmost vertex in L2,p.

For the base case p=2, let L2,2 be any layout of C2,2 in which the root is the leftmost vertex. Since the root has degree two, this layout has cutwidth at most two (in fact, the cutwidth of C2,2 is one).

For p>2, let r be the root of C2,p. The subtrees of r consist of a copy of C2,p1 with root r and a path (u1,,up1), where u1 is a child of r. We define L2,p to be the layout

r,u1,,up1L2,p1,

where the copy of L2,p1 corresponds to the inductively constructed layout of C2,p1 with r as its leftmost vertex (see Figure 1 right).

Consider any cut in this layout. Any cut occurring before r intersects at most two edges: possibly one edge from the path r,u1,,up1, and always the edge connecting r to r.

Any cut occurring after r intersects at most two edges of the copy of C2,p1 by the induction hypothesis, and no additional edges, as all other edges of C2,p are on the left side of r.

Thus every cut contains at most two edges, and therefore C2,p has cutwidth at most two.

Figure 2: The recursive construction of Cν,p. Left: C3,2 is composed of one copy of C2,4 and four copies of C2,2. Middle: Generally, Cν,p is composed of one copy of C2,p2ν2 and p2ν2 copies of Cν1,pLemma 6 shows that Cν1,p has p2ν2 leaves. Right: Lν,p construction. Copies of Lν1,p are recursively embedded next to the leaves in the layout L2,p2ν2.

Next, we build 𝒞ν=(Cν,p)pν for ν3, recursively; see Figure 2, left and middle, for an illustration. To construct Cν,p, let T be a copy of C2,p2ν2, and let T1,,Tp2ν2 be p2ν2 copies of Cν1,p. Now, construct Cν,p by taking T and identifying its leaves with the roots of T1,,Tp2ν2.

Lemma 6.

For any ν2 and any pν, Cν,p has Strahler number ν, cutwidth at most ν, p2ν11 leaves, and at most (ν1)p2ν1 vertices.

Proof.

We proceed by induction on the value ν. The basis step is provided by Lemma 5.

For the inductive step ν3, note that for each i{1,,p2ν2}, Ti is a copy of Cν1,p. Therefore, by the induction hypothesis, ν(Ti)=ν1, (Ti)=p2ν21, and |V(Ti)|(ν2)p2ν2. Also, by Lemma 5,

(T)=p2ν2|V(T)|=p2ν2(p2ν2+1)/2p2ν1, and ν(T)=2

Therefore, we have

(Cν,p)=i[(T)](Ti)=(T)p2ν21=p2ν2p2ν21=p2ν11.

Moreover, we have

|V(Cν,p)| =|V(T)|+i[(T)]|V(Ti)|(T)
p2ν1+p2ν2(ν2)p2ν2p2ν2
p2ν1+(ν2)p2ν1
=(ν1)p2ν1.

To show that the Strahler number of Cν,p is ν, we recall that by construction Cν,p consists of a copy of T=C2,p2ν2 and p2ν2 copies of Cν1,p whose roots are identified with the leaves of the copy of T. Let R be the set of vertices of Cν,p that correspond to these identified roots (i.e. the roots of the Ti’s that were identified with leaves of the copy of T). By the induction hypothesis, the Strahler number on each vertex of R is ν1. Observe then that ν(Cν,p)=νt(T) for t=ν1. Further, ν(T)=2 by Lemma 5. It follows then that ν(Cν,p)=νt(T)=ν(T)+t1=2+(ν1)1=ν.

Finally, we show that the cutwidth of Cν,p is at most ν by inductively constructing a layout Lν,p of cutwidth ν.

The base case ν=2 is shown in Lemma 5. For later use, we note an additional property of the layout L2,p constructed there: any cut that appears immediately after a leaf in the layout has width one. In particular, in the (recursive) layout

r,u1,,up1L2,p1,

the cut immediately after up1 contains exactly one edge, namely (r,r), where r is the root of the copy of C2,p1. All other cuts immediately following a leaf occur within L2,p1 and therefore have width one within L2,p1 inductively. Moreover, every edge not belonging to the copy of C2,p1 has both endpoints to the left of r in L2,p, so such edges are not crossed by those cuts.

We now construct Lν,p for ν>2; see Figure 2, right, for illustration. The tree Cν,p consists of a copy T of C2,q together with copies T1,,Tq of Cν1,t whose roots are identified with the leaves of C2,q, for appropriate values q and t (their exact values are not needed for the remainder of the proof).

To build Lν,p, start with the layout L2,q. For each leaf v in this layout, insert to its right a copy of Lν1,t, and identify the root of that copy with v. Since in Lν1,t the root is the leftmost vertex, this identification does not increase the cutwidth of Lν1,t.

Consider an arbitrary cut in Lν,p. Such a cut either: (i) crosses only edges of L2,q, or (ii) crosses one edge of L2,q together with edges from a single copy of Lν1,t.

In case (i), the cut has cardinality at most two, since L2,q has cutwidth two. In case (ii), the cut crosses at most one edge from L2,q and, by the inductive hypothesis, at most ν1 edges from the copy of Lν1,t; hence its total width is at most ν.

Therefore, Lν,p has cutwidth at most ν, completing the proof.

Using the lemmas above, we now provide a proof of Theorem 4.

Proof of Theorem 4.

Let 𝒞ν={C(ν,p)}pν. Let T=Cν,p. By Lemma 6, we have

(T)=p2ν11 ,
|V(T)| (ν1)p2ν1|V(T)|2ν112ν1((ν1)p2ν1)2ν112ν1
=(ν1)2ν112ν1p2ν11(ν1)(T).

So, (T)|V(T)|112ν1ν1. Therefore, bfsw(T)n112ν1ν1.

4 Upper Bound on BFS-width of Bounded Cutwidth Graphs

In this section, we prove the following theorem.

Theorem 7.

For any graph G=(V,E) we have

bfsw(G)2Δ2n11/22pw(G)+1=OΔ(n1ϵ(pw(G))),

where ϵ(x)=1/22x+1, Δ=Δ(G), and n=|V(G)|.

To prove Theorem 7, we will first show that any graph G contains a uniform depth tree T with (T)=bfsw(G) and Strahler number at most 2cw(G)+2. Next, we prove an upper bound on the number of leaves of any uniform depth tree with respect to its Strahler number and maximum degree Δ(G), thereby obtaining an upper bound for bfsw(G) as a function of pw(G) or cw(G) via Strahler number.

We show the following lemma.

Lemma 8.

Any graph G=(V,E) contains a uniform depth tree T with Strahler number at most 2pw(G)+2 that has exactly bfsw(G) leaves.

Proof.

We prove the statement by obtaining such a tree from G. Let =bfsw(G). We first run BFS rooted at a vertex r for which the BFS-width of G is realized i.e. any vertex r such that bfsw(G,r)=bfsw(G). Then we scan through the BFS layers and delete every layer deeper than the first layer L that has vertices. We then drop all edges of G not in the BFS tree and iteratively delete all leaves which are not in layer L. This results in a uniform depth tree T with at most |V(G)| vertices. Since T is a subgraph of G, pw(T)pw(G). Also, bfsw(T)=, as we never delete any vertices in layer L. By Lemma 3, we know that T has Strahler number at most 2pw(G)+2.

4.1 Lower Bound on Number of Vertices in a Uniform Depth Tree with Bounded Strahler Number

The following theorem gives a lower bound on the order of any uniform depth tree with a given Strahler number and a given number of leaves. This theorem, equivalently, gives an upper bound on the number of leaves of a uniform depth tree with a given Strahler number and a given order.

Theorem 9.

Let T be a uniform depth tree with Strahler number ν2 with maximum degree Δ. Then (T)2Δ2|V(T)|11/2ν1.

Proof.

We define f(ν)=2ν1/(2ν11)=(11/2ν1)1 and prove |V(T)|((T))f(ν)/(2Δ2). The statement of the lemma then follows from the following calculation

|V(T)|((T))f(ν)2Δ2(T)|V(T)|11/2ν1(2Δ2)11/2ν12Δ2|V(T)|11/2ν1.

Let PV(T) be the subset of all vertices of Strahler number ν in T. Observe that the induced subgraph T[P] is a downward path starting at the root, as (1) the root has value ν, (2) each non-root vertex of value ν has a parent of value ν, and (3) each vertex of value ν has at most one child of value ν. Let PP be the subset of P that includes vertices with at least one child outside P. As P is a subset of the downward path P, it contains no pair of vertices at the same depth. Let (p1,p2,,pt) be the set of vertices in P ordered inversely with respect to their depth.

Let QV(T) be the set of neighbors of P that are not in P, i.e. Q=NT(P). For each qQ, let Tq be the subtree of T rooted at q. We use V(Tq) to denote Tq’s vertex set, (Tq) to denote the number of its leaves, ν(Tq) to denote its Strahler number, and h(Tq) the (maximum) number of vertices in a root to leaf path in Tq, i.e. h(Tq)=height(Tq)+1.

First, we derive a lower bound on |V(T)|, from the simple lower bound |V(Tq)|h(Tq) for all qQ. Specifically, |V(T)|qQh(Tq). Further, we observe that each vertex in piP has at least one child in Q, by the definition of P. For i{1,2,,t} let qi be an arbitrary child of pi with Strahler number less than ν, and observe that h(Tqi)i. Therefore,

|V(T)|qQh(Tq)i=1th(Tqi)i=1ti=t(t+1)2t22. (1)

Now, we consider two cases based on the cardinality of Q. In what follows let =(T).

Case (I) |𝑸|𝒇(𝝂)/𝟐.

We have,

tΔ|Q|f(ν)/2tf(ν)/2Δ .

Therefore, by Equation 1, we have

|V(T)|f(ν)2Δ2 ,

as desired.

Case (II) |𝑸|𝒇(𝝂)/𝟐.

We proceed by using induction on ν.

For the base case, ν=2, the values of all vertices in VP are one. Hence T[VP] is a collection of paths, each connecting a leaf of T to a (perhaps identical) vertex in Q. Therefore, |Q|==f(ν)/2, as f(ν)=2 for ν=2. Therefore, the base case is implied by the argument of Case (I).

For the inductive step we first observe that =qQ(Tq), as each leaf of T is a descendant of exactly one vertex in Q (where a vertex is considered a descendant of itself). Next, we use Hölder’s inequality: for any pair of vectors x,y in Euclidean space and any pair α,β+ such that 1/α+1/β=1, we have xy1xαyβ. Now let x=((Tq))qQ (with an arbitrary order on Q) and y=𝟏, the all 1 vector. We have:

=qQ(Tq)(qQ((Tq))α)1α(qQ1β)1β(qQ((Tq))α)1α|Q|α1α,

where the last equality holds as 1/α+1/β=1β=α/(α1). Raising the sides to α,

αqQ((Tq))α|Q|α1. (2)

Now, we set α:=f(ν1), and observe α=f(ν1)>1 for ν3, justifying our use of Hölder’s inequality. Next, we show qQ((Tq))α2Δ2|V(T)| by showing (Tq)α2Δ2|V(Tq)| for every qQ. We consider two possible cases.

If ν(Tq)=1 then Tq is a path, possibly with just one vertex and no edge. Therefore, ((Tq))α2Δ2|V(Tq)|, as (i) (Tq)=1, (ii) |V(Tq)|1, and (iii) α=f(ν1)>0 as ν3 and (iv) Δ2 (it is important to note that Δ is the maximum degree in the original T).

Otherwise, if ν(Tq)>1, then we use the induction hypothesis. To that end, note f() is a decreasing function over the interval (1,), and ν(Tq)ν1 for all qQ. Thus,

((Tq))α=((Tq))f(ν1)((Tq))f(ν(Tq))2(Δ(Tq))2|V(Tq)|2Δ2|V(Tq)|.

Substituting in Equation 2,

f(ν1)2Δ2|V(T)||Q|f(ν1)1|V(T)|f(ν1)|Q|1f(ν1)2Δ2.

Since |Q|f(ν)/2 and 1f(ν1)<0,

f(ν1)|Q|1f(ν1)(f(ν1)+(1f(ν1))f(ν)2)=f(ν),

which completes the proof. The last equality is proved below.

f(ν1)+(1f(ν1))f(ν)/2 =2ν22ν21+(12ν22ν21)122ν12ν11
=2ν22ν21+(12ν21)2ν22ν11
=2ν22ν21(112ν11)
=2ν22ν212ν122ν11=2ν12ν11=f(ν).

4.2 Proof of Theorem 7

We conclude this section with a proof of Theorem 7 using the results from above.

Proof of Theorem 7.

By Lemma 8, G contains a uniform depth tree T of Strahler number ν(T)2pw(G)+2 with at most |V(G)| vertices and exactly bfsw(G) leaves, i.e. (T)=bfsw(G). By Theorem 9,

(T)2Δ2|V(T)|11/2ν(T)12Δ2|V(T)|11/22pw(G)+12Δ2|V(G)|11/22pw(G)+1,

which completes the proof.

5 Graph reconstruction algorithm

In this section, we apply the above results to the hidden graph reconstruction problem mentioned in the introduction. We formally define this problem, briefly summarize some of the known results, and then state our main theorem in this area.

In the hidden graph reconstruction problem, only the vertex set V(G) of a hidden graph G is visible, and the goal is to reconstruct the edge set E(G) by making queries to an oracle. A hidden graph reconstruction algorithm, referred to simply as a reconstruction algorithm, aims to discover the edge set with as few adaptively chosen queries as possible. The reconstruction task is considered complete once there is a unique graph, up to isomorphism, consistent with answers to all the queries. Several query models have been studied for graph reconstruction, including edge existence queries, edge counting, effective resistance queries, and shortest path queries [2, 3, 4, 11, 17, 22].

The query model that will be considered in this paper is the shortest path distance query model (SP query model). In the SP query model, we have access to a distance oracle: for any two vertices u,vV(G), a query returns the length of the shortest path between u and v in G and returns if no such path exists. There are several motivations and applications to studying the hidden graph reconstruction problem with the SP query model [1, 7, 9, 16, 24].

Problem Background and Prior Work

Any unweighted graph can trivially be reconstructed using (n2) SP queries simply by querying every pair of vertices to check whether they are adjacent. Importantly, this upper bound is tight even for trees if we allow unbounded degree [22]. Moreover, the bound is tight if one allows disconnected graphs; reconstructing a graph with n vertices and one edge requires Ω(n2) queries. In light of these observations, all non-trivial algorithmic results on graph reconstruction focus on connected, bounded degree graphs.

In 2013, Mathieu et al. [18, 21] showed that general bounded degree graphs can be reconstructed using O~Δ(n3/2) expected queries via a randomized algorithm, where O~(f(n)) is shorthand for O(f(n)polylog(n)). This is still the best known general upper bound today. It is unknown whether there exists a deterministic algorithm to reconstruct bounded-degree graphs in o(n2) queries. Many graph classes less general than bounded degree graphs have been studied. Nearly linear query complexity algorithms, both randomized and deterministic, have been found for graph classes like chordal graphs, nearly chordal graphs, k-chordal graphs, and bounded treelength graphs [5, 6, 23, 19] and matching lower bounds for some of these classes have also been shown [5].

Our Algorithm

Our result for hidden graph reconstruction in this paper is a deterministic reconstruction algorithm for any graph G with bounded cutwidth using a subquadratic number of queries. More generally, we characterize the number of queries with respect to the maximum degree and the pathwidth of the graph – recall a bounded degree bounded pathwidth graph has bounded cutwidth and vice versa. We note again that this implies a subquadratic query reconstruction algorithm for the class of bounded cutwidth graphs and we emphasize that this reconstruction algorithm runs without knowledge of the value of parameters pw(G) or cw(G).

Theorem 10.

Let G=(V,E) be a graph. Then there is an algorithm to reconstruct G with at most O((Δ(G))2n2ϵ(pw(G))) shortest path distance queries where ϵ(x)=1/22x+1.

Proof.

By Theorem 7,

bfsw(G)2(Δ(G))2n1ϵ(pw(G))=:b .

The algorithm selects an arbitrary vertex sV. It runs n1 queries to obtain s to v distances for all vV{s}. Then, it computes BFS layers B1,B2,,BkV with respect to s, i.e. for each i[k], Bi is the subset of vertices at distance i of s. We know all the edges of the graph are between vertices that belong to the same or consecutive layers of BFS. The algorithm, thus, queries all these pairs to find all possible edges, i.e. all pairs u,vV that belong to the same Bi or consecutive Bi and Bi+1. Hence, setting xi=|Bi|, the number of queries made in this part of the algorithm is bounded above by

i[k]xi2+i[k1]xixi+13i[k]xi2 ,

as xixi+1xi2+xi+12 for all i[k1].

Next, we show that i[k]xi2bn, hence the algorithm makes at most

3bn+n1=6Δ2n2ϵ(pw(G))+n1=O(Δ2n2ϵ(pw(G)))

queries in total.

To that end, let x=(x1,x2,,xk)k be a vector. Recall the Hölder’s inequality for two vectors f,gk is fg1fαgβ with 1/α+1/β=1. Now, we apply the inequality with f=g=x, α= and β=1. So,

i[k]xi2=xxxx1=maxi[k]|xi|i[k]|xi|bn .

References

  • [1] Dimitris Achlioptas, Aaron Clauset, David Kempe, and Cristopher Moore. On the bias of traceroute sampling: Or, power-law degree distributions in regular graphs. J. ACM, 56(4), 2009. doi:10.1145/1538902.1538905.
  • [2] Noga Alon and Vera Asodi. Learning a hidden subgraph. SIAM Journal on Discrete Mathematics, 18(4):697–712, 2005. doi:10.1137/S0895480103431071.
  • [3] Noga Alon, Richard Beigel, Simon Kasif, Steven Rudich, and Benny Sudakov. Learning a hidden matching. SIAM Journal on Computing, 33(2):487–501, 2004. doi:10.1137/S0097539702420139.
  • [4] Dana Angluin and Jiang Chen. Learning a hidden graph using o(log n) queries per edge. In John Shawe-Taylor and Yoram Singer, editors, Learning Theory, pages 210–223, Berlin, Heidelberg, 2004. Springer Berlin Heidelberg. doi:10.1007/978-3-540-27819-1_15.
  • [5] Paul Bastide and Carla Groenland. Optimal distance query reconstruction for graphs without long induced cycles, 2024. doi:10.48550/arXiv.2306.05979.
  • [6] Paul Bastide and Carla Groenland. Quasi-linear distance query reconstruction for graphs of bounded treelength. In Édouard Bonnet and Pawel Rzazewski, editors, 19th International Symposium on Parameterized and Exact Computation, IPEC 2024, September 4-6, 2024, Royal Holloway, University of London, Egham, United Kingdom, volume 321 of LIPIcs, pages 20:1–20:11. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.IPEC.2024.20.
  • [7] Zuzana Beerliova, Felix Eberhard, Thomas Erlebach, Alexander Hall, Michael Hoffmann, Matúš Mihaľák, and L. Shankar Ram. Network discovery and verification. In Dieter Kratsch, editor, Graph-Theoretic Concepts in Computer Science, pages 127–138, Berlin, Heidelberg, 2005. Springer Berlin Heidelberg. doi:10.1007/11604686_12.
  • [8] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theoretical Computer Science, 209(1):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.
  • [9] Luca Dall’Asta, Ignacio Alvarez-Hamelin, Alain Barrat, Alexei Vázquez, and Alessandro Vespignani. Exploring networks with traceroute-like probes: Theory and simulations. Theoretical Computer Science, 355(1):6–24, 2006. Complex Networks. doi:10.1016/j.tcs.2005.12.009.
  • [10] Josep Díaz, Jordi Petit, and Maria Serna. A survey of graph layout problems. ACM Comput. Surv., 34(3):313–356, 2002. doi:10.1145/568522.568523.
  • [11] W. Ellens, F.M. Spieksma, P. Van Mieghem, A. Jamakovic, and R.E. Kooij. Effective graph resistance. Linear Algebra and its Applications, 435(10):2491–2506, 2011. Special Issue in Honor of Dragos Cvetkovic. doi:10.1016/j.laa.2011.02.024.
  • [12] J.A. Ellis, I.H. Sudborough, and J.S. Turner. The vertex separation and search number of a graph. Information and Computation, 113(1):50–79, 1994. doi:10.1006/inco.1994.1064.
  • [13] David Eppstein, Michael T. Goodrich, and Songyu (Alfred) Liu. Bandwidth vs BFS Width in Matrix Reordering, Graph Reconstruction, and Graph Drawing. In 33rd Annual European Symposium on Algorithms (ESA 2025), Leibniz International Proceedings in Informatics (LIPIcs), pages 69:1–69:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.69.
  • [14] Uriel Feige. Coping with the NP-hardness of the graph bandwidth problem. In Algorithm Theory—SWAT 2000, volume 1851 of Lecture Notes in Computer Science, pages 10–19, Berlin, Heidelberg, 2000. Springer. doi:10.1007/3-540-44985-X_2.
  • [15] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, San Francisco, 1979.
  • [16] Jotun J. Hein. An optimal algorithm to reconstruct trees from additive distance data. Bulletin of Mathematical Biology, 51(5):597–603, 1989. doi:10.1016/S0092-8240(89)80102-8.
  • [17] Jeremy Hoskins, Cameron Musco, Christopher Musco, and Babis Tsourakakis. Inferring networks from random walk-based node similarities. In Advances in Neural Information Processing Systems, volume 31, 2018. URL: https://papers.nips.cc/paper/2018/hash/2f25f6e3.pdf.
  • [18] Sampath Kannan, Claire Mathieu, and Hang Zhou. Graph reconstruction and verification. ACM Trans. Algorithms, 14(4), 2018. doi:10.1145/3199606.
  • [19] Chirag Kaudan and Amir Nayyeri. Reconstructing bounded treelength graphs with linearithmic shortest path distance queries. In Shahin Kamali, editor, Proceedings of the 37th Canadian Conference on Computational Geometry (CCCG 2025), York University, Toronto, Canada, August 13-15, 2025, pages 243–248, 2025.
  • [20] Michael Luttenberger. An extension of Parikh’s theorem beyond idempotence. CoRR, abs/1112.2864, 2011. arXiv:1112.2864.
  • [21] Claire Mathieu and Hang Zhou. Graph reconstruction via distance oracles. In Fedor V. Fomin, Rūsiņš Freivalds, Marta Kwiatkowska, and David Peleg, editors, Automata, Languages, and Programming, pages 733–744, Berlin, Heidelberg, 2013. Springer Berlin Heidelberg. doi:10.1007/978-3-642-39206-1_62.
  • [22] Lev Reyzin and Nikhil Srivastava. Learning and verifying graphs using queries with a focus on edge counting. In Marcus Hutter, Rocco A. Servedio, and Eiji Takimoto, editors, Algorithmic Learning Theory, pages 285–297, Berlin, Heidelberg, 2007. Springer Berlin Heidelberg. doi:10.1007/978-3-540-75225-7_24.
  • [23] Guozhen Rong, Wenjun Li, Yongjie Yang, and Jianxin Wang. Reconstruction and verification of chordal graphs with a distance oracle. Theoretical Computer Science, 859:48–56, 2021. doi:10.1016/j.tcs.2021.01.006.
  • [24] M.S. Waterman, T.F. Smith, M. Singh, and W.A. Beyer. Additive evolutionary trees. Journal of Theoretical Biology, 64(2):199–213, 1977. doi:10.1016/0022-5193(77)90351-4.