This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Graph Searching with Predictions

Siddhartha Banerjee    Vincent Cohen-Addad    Anupam Gupta    Zhouzi Li
Abstract

Consider an agent exploring an unknown graph in search of some goal state. As it walks around the graph, it learns the nodes and their neighbors. The agent only knows where the goal state is when it reaches it. How do we reach this goal while moving only a small distance? This problem seems hopeless, even on trees of bounded degree, unless we give the agent some help. This setting with “help” often arises in exploring large search spaces (e.g., huge game trees) where we assume access to some score/quality function for each node, which we use to guide us towards the goal. In our case, we assume the help comes in the form of distance predictions: each node vv provides a prediction f(v)f(v) of its distance to the goal vertex. Naturally if these predictions are correct, we can reach the goal along a shortest path. What if the predictions are unreliable and some of them are erroneous? Can we get an algorithm whose performance relates to the error of the predictions?

In this work, we consider the problem on trees and give deterministic algorithms whose total movement cost is only O(OPT+ΔERR)O(OPT+\Delta\cdot ERR), where OPTOPT is the distance from the start to the goal vertex, Δ\Delta the maximum degree, and the ERRERR is the total number of vertices whose predictions are erroneous. We show this guarantee is optimal. We then consider a “planning” version of the problem where the graph and predictions are known at the beginning, so the agent can use this global information to devise a search strategy of low cost. For this planning version, we go beyond trees and give an algorithms which gets good performance on (weighted) graphs with bounded doubling dimension.

1 Introduction

Consider an agent (say a robot) traversing an environment modeled as an undirected graph G=(V,E)G=(V,E). It starts off at some root vertex rr, and commences looking for a goal vertex gg. However, the location of this goal is initially unknown to the agent, who gets to know it only when it visits vertex gg. So the agent starts exploring from rr, visits various vertices r=v0,v1,,vt,r=v_{0},v_{1},\cdots,v_{t},\cdots in GG one by one, until it reaches gg. The cost it incurs at timestep tt is the distance it travels to get from vt1v_{t-1} to vtv_{t}. How can the agent minimize the total cost? This framework is very general, capturing not only problems in robotic exploration, but also general questions related to game tree search: how to reach a goal state with the least effort?

Since this is a question about optimization under uncertainty, we use the notion of competitive analysis: we relate the cost incurred by the algorithm on an instance to the optimal cost incurred in hindsight. The latter is just the distance D:=d(r,g)D:=d(r,g) between the start and goal vertices. Sadly, a little thought tells us that this problem has very pessimistic guarantees in the absence of any further constraints. For example, even if the graph is known to be a complete binary tree and the goal is known to be at some distance DD from the root, the adversary can force any algorithm to incur an expected cost of Ω(2D)\Omega(2^{D}). Therefore the competitiveness is unbounded as DD gets large. This is why previous works in online algorithms enforced topological constraints on the graph, such as restricting the graph to be a path, or kk paths meeting at the root, or a grid [BYCR93].

But in many cases (such as in game-tree search) we want to solve this problem for broader classes of graphs—say for complete binary trees (which were the bad example above), or even more general settings. The redeeming feature in these settings is that we are not searching blindly: the nodes of the graph come with estimates of their quality, which we can use to search effectively. What are good algorithms in such settings? What can we prove about them?

In this paper we formalize these questions via the idea of distance predictions: each node vv gives a prediction f(v)f(v) of its distance dG(v,g)d_{G}(v,g) to the goal state. If these predictions are all correct, we can just “walk downhill”—i.e., starting with v0v_{0} being the start node, we can move at each timestep tt to a neighbor vtv_{t} of vt1v_{t-1} with f(vt)=f(vt1)1f(v_{t})=f(v_{t-1})-1. This reaches the goal along a shortest path. However, getting perfect predictions seems unreasonable, so we ask:

What if a few of the predictions are incorrect? Can we achieve an “input-sensitive” or “smooth” or “robust” bound, where we incur a cost of d(g,r)+d(g,r)+ some function of the prediction error?

We consider two versions of the problem:

The Exploration Problem. In this setting the graph GG is initially unknown to the agent: it only knows the vertex v0=rv_{0}=r, its neighbors v0\partial v_{0}, and the predictions on all these nodes. In general, at the beginning of time t1t\geq 1, it knows the vertices Vt1={v0,v1,,vt1}V_{t-1}=\{v_{0},v_{1},\cdots,v_{t-1}\} visited in the past, all their neighboring vertices Vt1\partial V_{t-1}, and the predictions for all the vertices in Vt1Vt1V_{t-1}\cup\partial V_{t-1}. The agent must use this information to move to some unvisited neighbor (which is now called vtv_{t}), paying a cost of d(vt1,vt)d(v_{t-1},v_{t}). It then observes the edges incident to vtv_{t}, along with the predictions for nodes newly observed.

The Planning Problem. This is a simpler version of the problem where the agent starts off knowing the entire graph GG, as well as the predictions at all its nodes. It just does not know which node is the goal, and hence it must traverse the graph in some order.

The cost in both cases is the total distance traveled by the agent until it reaches the goal, and the competitive ratio is the ratio of this quantity to the shortest path distance d(r,g)d(r,g) from the root to the goal.

1.1 Our Results

Our first main result is for the (more challenging) exploration problem, for the case of trees.

Theorem 1.1 (Exploration).

The (deterministic) TreeX algorithm solves the graph exploration problem on trees in the presence of predictions: on any (unweighted) tree with maximum degree Δ\Delta, for any constant δ>0\delta>0, the algorithm incurs a cost of

d(r,g)(1+δ)+O(Δ||/δ),d(r,g)(1+\delta)+O(\Delta\cdot|\mathcal{E}|/\delta),

where :={vVf(v)d(v,g)}\mathcal{E}:=\{v\in V\mid f(v)\neq d(v,g)\} is the set of vertices that give erroneous predictions.

One application of the above theorem is for the layered graph traversal problem (see §1.3 for a complete definition).

Corollary 1.2 (Robustness and Consistency for the Layered Graph Traversal problem.).

There exists an algorithm that achieves the following guarantees for the layered graph traversal problem in the presence of predictions: given an instance with maximum degree Δ\Delta and width kk, for any constant δ>0\delta>0, the algorithm incurs an expected cost of at most min(O(k2logΔ)OPT,OPT+O(Δ||))\min(O(k^{2}\log\Delta)\,OPT,OPT+O(\Delta|\mathcal{E}|)).

The proof of the above corollary is immediate: Since the input is a tree (with some additional structure that we do not require) that is revealed online, we can use the algorithm from Theorem 1.1. Hence, given an instance II of layered graph traversal (with predictions), we can use the algorithm from Theorem 1.1 in combination with the [BCR22], thereby being both consistent and robust: if the predictions are of high quality, then our algorithm ensures that the cost will be nearly optimal; otherwise if the predictions are useless, [BCR22]’s algorithm gives an upper bound in the worst case.

Moreover, we show that the guarantee obtained in Theorem 1.1 is the best possible, up to constants.

Theorem 1.3 (Exploration Lower Bound).

Any algorithm (even randomized) for the graph exploration problem with predictions must incur a cost of at least max(d(r,g),Ω(Δ||))\max(d(r,g),\Omega(\Delta\cdot|\mathcal{E}|)).

Proof.

The lower bound of d(r,g)d(r,g) is immediate. For the second term, consider the setting where the root rr has Δ\Delta disjoint paths of length DD leaving it, and the goal is guaranteed to be at one of the leaves. Suppose we are given the “null” prediction, where each vertex predicts f(v)=D+(v)f(v)=D+\ell(v) (where (v)\ell(v) is the distance of the vertex from the root, which we henceforth refer to as the level of the vertex). The erroneous vertices are the DD vertices along the rr-gg path. Since the predictions do not give any signal at all (they can be generated by the algorithm itself), this is a problem of guessing which of the leaves is the goal, and any algorithm, even randomized, must travel Ω(ΔD)=Ω(Δ||)\Omega(\Delta\cdot D)=\Omega(\Delta\cdot|\mathcal{E}|) before reaching the goal. ∎

Our next set of results are for the planning problem, where we know the graph and the predictions up-front, and must come up with a strategy with this global information.

Theorem 1.4 (Planning).

For the planning version of the graph exploration problem, there is an algorithm that incurs cost at most

  1. (i)

    d(r,g)+O(Δ||)d(r,g)+O(\Delta\cdot|\mathcal{E}|) if the graph is a tree, where Δ\Delta is the maximal degree.

  2. (ii)

    d(r,g)+2O(α)O(||2)d(r,g)+2^{O(\alpha)}\cdot O(|\mathcal{E}|^{2}) where α\alpha is the doubling dimension of GG.

Again, \mathcal{E} is the set of nodes with incorrect predictions.

Note that result (i) is very similar to that of Theorem 1.1 (for the harder exploration problem): the differences are that we do not lose any constant in the distance d(r,g)d(r,g) term, and also that the algorithm used here (for the planning problem) is simpler. Moreover, the lower bound from Theorem 1.3 continues to hold in the planning setting, since the knowledge of the graph and the predictions does not help the algorithm; hence result (i) is tight.

We do not yet know an analog of result (ii) for the exploration problem: extending Theorem 1.1 to general graphs, even those with bounded doubling metrics remains a tantalizing open problem. Moreover, we currently do not have a lower bound matching result (ii); indeed, we conjecture that a cost of d(r,g)+2O(α)||d(r,g)+2^{O(\alpha)}\cdot|\mathcal{E}| should be achievable. We leave these as questions for future investigation.

1.2 Our Techniques

To get some intuition for the problem, consider the case where given a tree and a guarantee that the goal is at distance DD from the start node rr. Suppose each node vv gives the “null” prediction of f(v)=D+d(r,v)f(v)=D+d(r,v). In case the tree is a complete binary tree, then these predictions carry no information and we would have to essentially explore all nodes within distance DD. But note that the predictions for about half of these nodes are incorrect, so these erroneous nodes can pay for this exploration. But now consider a “lopsided” example, with a binary tree on one side of the root, and a path on the other (Figure 1). Suppose the goal is at distance DD along the path. In this case, only the path nodes are incorrect, and we only have O(D+||)=O(D)O(D+|\mathcal{E}|)=O(D) budget for the exploration. In particular, we must explore more aggressively along the path, and balance the exploration on both sides of the root. But such gadgets can be anywhere in the tree, and the predictions can be far more devious than the null-prediction, so we need to generalize this idea.

rraabbgg
Figure 1: The subtree rooted on rr’s child aa is a complete binary tree, while the subtree rooted on bb is a path to the goal gg. “Null” predictions f(v)=D+d(r,v)f(v)=D+d(r,v) at every vv have a total error DD (only nodes on the path from rr to gg have errors on predictions).

We start off with a special case which we call the known-distance case. This is almost the same as the general problem, but with the additional guarantee that the prediction of the root is correct. Equivalently, we are given the distance D:=d(r,g)D:=d(r,g) of the goal vertex from the root/starting node rr. For this setting, we can get the following very sharp result:

Theorem 1.5 (Known-Distance Case).

The TreeX-KnownDist algorithm solves the graph exploration problem in the known-distance case, incurring a cost of at most d(r,g)+O(Δ||)d(r,g)+O(\Delta|\mathcal{E}|).

Hence in the zero-error case, or in low-error cases where ||D|\mathcal{E}|\ll D, the algorithm loses very little compared to the optimal-in-hindsight strategy, which just walks from the root to the goal vertex, and incurs a cost of DD. This algorithm is inspired by the “lopsided” example above: it not only balances the exploration on different subtrees, but also at multiple levels. To generalize this idea from predictions, we introduce the concepts of anchor and loads (see §2). At a high level, for each node we consider the subtrees rooted at its children, and identify subset of nodes in each of these subtrees which are erroneous depending on which subtree contains the goal gg. We ensure that these sets have near-equal sizes, so that no matter which of these subtrees contains the goal, one of them can pay for the others. This requires some delicacy, since we need to ensure this property throughout the tree. The details appear in §3.

Having proved Theorem 1.5, we use the algorithm to then solve the problem where the prediction for the root vertex may itself be erroneous. Given Theorem 1.5 and Algorithm 1, we can reduced the problem to finding some node vv such that d(v,g)d(v,g) is known; moreover this vv must not be very far from the start node rr. The idea is conceptually simple: as we explore the graph, if most predictions are correct we can use these predictions to find such a vv, otherwise these incorrect predictions give us more budget to continue exploring. Implementing this idea (and particularly, doing this deterministically) requires us to figure out how to “triangulate” with errors, which we do in §4.

Finally, we give the ideas behind the algorithms for the planning version of the problem. The main idea is to define the implied-error function φ(v):=|{uf(u)d(u,v)}|\varphi(v):=|\{u\mid f(u)\neq d(u,v)\}|, which measures the error if the goal is sitting at node vv. Since we know all the predictions and the tree structure in this version of the problem, and moreover ϕ(g)=||\phi(g)=|\mathcal{E}|, it is natural to search the graph greedily in increasing order of the implied-error. However, naively doing this may induce a large movement cost, so we bucket nodes with similar implied-error together, and then show that the total cost incurred in exploring all nodes with φ(v)2i\varphi(v)\approx 2^{i} is itself close to 2i2^{i} (times a factor that depends on the degree or the doubling dimension). It remains an interesting open problem to extend this algorithm to broader classes of graphs. The details here appear in §5.

1.3 Related Work

Graph Searching. Graph searching is a fundamental problem, and there are too many variants to comprehensively discuss: we point to the works closest to ours. Baeza-Yates, Culberson, and Rawlins [BYCR93] considered the exploration problem without predictions on the line (where it is also called the “cow-path” problem), on kk-spiders (i.e., where kk semi-infinite lines meet at the root) and in the plane: they showed tight bounds of 99 on the deterministic competitive ratio of the line, 1+2kk/(k1)k11+2k^{k}/(k-1)^{k-1} for kk-spiders, among other results. Their lower bounds (given for “monotone-increasing strategies”) were generalized by Jaillet and Stafford [JS01]; [JSG02] point out that the results for kk-spiders were obtained by Gal [Gal80] before [BYCR93] (see also [AG03]). Kao et al. [KRT96, KMSY98] give tight bounds for both deterministic and randomized algorithms, even with multiple agents.

The layered graph traversal problem [PY91] is very closely related to our model. A tree is revealed over time. At each timestep, some of the leaves of the current tree die, and others have some number of children. The agent is required to sit at one of the current (living) leaves, so if the node the agent previously sat is no longer a leaf or is dead, the agent is forced to move. The game ends when the goal state is revealed and objective is to minimize the total movement cost. The width kk of the problem is the largest number of leaves alive at any time (observe that we do not parameterize our algorithm with this parameter). This problem is essentially the cow-path problem for the case of w=2w=2, but is substantially more difficult for larger widths. Indeed, the deterministic bounds lie between Ω(2k)\Omega(2^{k}) [FFK+98] and O(k2k)O(k2^{k}) [Bur96]. Ramesh [Ram95] showed that the randomized version of this problem has a competitive ratio at least Ω(k2/(logk)1+ε)\Omega(k^{2}/(\log k)^{1+\varepsilon}) for any ε>0\varepsilon>0; moreover, his O(k13)O(k^{13})-competitive algorithm was improved to a nearly-tight bound of O(k2logΔ)O(k^{2}\log\Delta) in recent exciting result by Bubeck, Coester, and Rabani [BCR22].

Kalyanasundaram and Pruhs [KP93] study the exploration problem (which they call the searching problem) in the geometric setting of kk polygonal obstacles with bounded aspect ratio in the plane. Some of their results extend to the mapping problem, where they must determine the locations of all obstacles. Deng and Papadimitriou [DP99] study the mapping problem, where the goal is to traverse all edges of an unknown directed graph: they give an algorithm with cost 2|E|2|E| for Eulerian graphs (whereas OPT=|E|OPT=|E|), and cost exp(O(dlogd))|E|\exp(O(d\log d))|E| for graphs with imbalance at most dd. Deng, Kameda, and Papadimitriou [DKP98] give an algorithm to map two-dimensional rectilinear, polygonal environments with a bounded number of obstacles.

Kalyanasundaram and Pruhs [KP94] consider a different version of the mapping problem, where the goal is to visit all vertices of an unknown graph using a tour of least cost. They give an algorithm that is O(1)O(1)-competitive on planar graphs. Megow et al. [MMS12] extend their algorithm to graphs with bounded genus, and also show limitations of the algorithm from [KP94].

Blum, Raghavan and Schieber [BRS97] study the point-to-point navigation problem of finding a minimum-length path between two known locations ss and tt in a rectilinear environment; the obstacles are unknown axis-parallel rectangles. Their O(n)O(\sqrt{n})-competitiveness is best possible given the lower bound in [PY91]. [KRR94] give lower bounds for randomized algorithms in this setting.

Our work is related in spirit to graph search algorithms like AA^{*}-search which use score functions to choose the next leaf to explore. One line of work giving provably good algorithms is that of Goldberg and Harrelson [GH05] on computing shortest paths without exploring the entire graph. Another line of work related in spirit to ours is that of Karp, Saks, and Wigderson [KSW86] on branch-and-bound (see also [KZ93]).

Noisy Binary Search. A very closely related line of work is that of computing under noisy queries [FRPU94]. In this widely-used model, the agent can query nodes: each node “points” to a neighbor that is closer to the goal, though some of these answers may be incorrect. Some of these works include [OP06, MOW08, EKS16, DMS19, DTUW19, BFKR21]. Apart from the difference in the information model (these works imagine knowing the entire graph) and the nature of hints (“gradient” information pointing to a better node, instead of information about the quality/score of the node), these works often assume the errors are independent, or adversarial with bounded noise rate. Most of these works allow random-access to nodes and seek to minimize the number of queries instead of the distance traveled, though an exception is the work of [BFKR21]. As far as we can see, the connections between our models is only in spirit. Moreover, we show in §7.3 that results of the kind we prove are impossible if the predictions don’t give us distance information but instead just edge “gradients”.

Algorithms with Predictions. Our work is related to the exciting line of research on algorithms with predictions, such as in ad-allocation [MNS07], auction pricing [MV17], page migration [IMTMR20], flow allocation [LMRX20], scheduling [PSK18, LLMV20, Mit20], frequency estimation [HIKV19], speed scaling [BMRS20], Bloom filters [Mit18], bipartite matching and secretary problems [AGKK20, DLLV21], and online linear optimization [BCKP20].

2 Problem Setup and Definitions

We consider an underlying graph G=(V,E)G=(V,E) with a known root node rr and an unknown goal node gg. (For most of this paper, we consider the unweighted setting where all edge have unit length; §5.3 and §7.2 discuss cases where edge lengths are positive integers.) Each node has degree at most Δ\Delta. Let d(u,v)d(u,v) denote the distance between nodes u,vu,v for any u,vVu,v\in V, and let D:=d(r,g)D:=d(r,g) be the optimal distance from rr to the goal node gg.

Vt{\textstyle V_{t}}Vt{\textstyle\partial V_{t}}
Figure 2: The observed vertices VtVtV_{t}\cup\partial V_{t} (and extended subtree T¯t:=T[VtVt]\overline{T}^{t}:=T[V_{t}\cup\partial V_{t}]) at some intermediate stage of the algorithm. Visited nodes VtV_{t} are shown in red, and their un-visited neighbors Vt\partial V_{t} in blue.

Let us formally define the problem setup. An agent initially starts at root rr, and wants to visit goal gg while traversing the minimum number of edges. In each timestep t{1,2,}t\in\{1,2,\ldots\}, the agent moves from some node vt1v_{t-1} to node vtv_{t}. We denote the visited vertices at the start of round tt by Vt1V_{t-1} (with V0={r}V_{0}=\{r\}), and use Vt1\partial V_{t-1} to denote the neighboring vertices—those not in Vt1V_{t-1} but having at least one neighbor in Vt1V_{t-1}. Their union Vt1Vt1V_{t-1}\cup\partial V_{t-1} is the set of observed vertices at the end of time t1t-1. Each time tt the agent visits a new node vtv_{t} such that Vt:=Vt1{vt}V_{t}:=V_{t-1}\cup\{v_{t}\}, and it pays the movement cost d(vt1,vt)d(v_{t-1},v_{t}), where v0=rv_{0}=r. Finally, when vt=gv_{t}=g and the agent has reached the goal, the algorithm stops. The identity of the goal vertex is known when—and only when—the agent visits it, and we let τ\tau^{*} denote this timestep. Our aim is to design an algorithm that reaches the goal state with minimum total movement cost:

t=1τdt1(vt1,vt).\sum_{t=1}^{\tau^{*}}d^{t-1}(v_{t-1},v_{t}).

Within the above setting, we consider two problems:

  • In the planning problem, the agent knows the graph GG (though not the goal gg), and in addition, is given a prediction f(v)f(v)\in\mathbb{Z} for each vVv\in V of its distance to the goal gg; it can then use this information to plan its search trajectory.

  • In the exploration problem, the graph GG and the predictions f(v)f(v)\in\mathbb{Z} are initially unknown to the agent, and these are revealed only via exploration; in particular, upon visiting a node for the first time, the agent becomes aware of previously unobserved nodes in vv’s neighborhood. Thus, at the end of timestep tt, the agent knows the set of visited vertices VtV_{t}, neighboring vertices Vt\partial V_{t}, and the predictions f(v)f(v) for each observed vertex vVtVtv\in V_{t}\cup\partial V_{t}.

In both cases, we define :={vVf(v)d(g,v)}\mathcal{E}:=\{v\in V\mid f(v)\neq d(g,v)\} to be the set of erroneous nodes. Extending this notation, for the exploration problem, we define t:=Vt\mathcal{E}^{t}:=\mathcal{E}\cap V_{t} as the erroneous nodes visited by time tt.

3 Exploring with a Known Target Distance

Recall that our algorithm for the exploration problem on trees proceeds via the known-distance version of the problem: in addition to seeing the predictions at the various nodes as we explore the tree, we are promised that the distance from the starting node/root rr to the goal state gg is is exactly some value DD, i.e., d(r,g)=Dd(r,g)=D. The main result of this section is Theorem 1.5, and we restate a rigorous version here.

Theorem 3.1.

If D=d(r,g)D=d(r,g), the algorithm TreeX-KnownDist(r,D,+)\textsc{TreeX-KnownDist}(r,D,+\infty) finds the goal node gg incurring a cost of at most d(r,g)+O(Δ||)d(r,g)+O(\Delta|\mathcal{E}|).

Algorithm TreeX-KnownDist is stated in Algorithm 1. For better understanding of it, we first give some key definitions.

3.1 Definitions: Anchors, Degeneracy, and Criticality

For an unweighted tree TT, we define the level of node vv with respect to the root rr to be (v):=d(r,v)\ell(v):=d(r,v), and so level LL denotes the set of nodes vv such that d(r,v)=(v)=Ld(r,v)=\ell(v)=L. Since the tree is rooted, there are clearly defined notions of parent and child, ancestor and descendent. Each node is both an ancestor and a descendant of itself. For any node vv, let TvT_{v} denote the subtree rooted at vv. Extending this notation, we define the visited subtree Tt:=T[Vt]T^{t}:=T[V_{t}], and the extended subtree T¯t:=T[VtVt]\overline{T}^{t}:=T[V_{t}\cup\partial V_{t}], and let TvtT^{t}_{v} and T¯vt\overline{T}^{t}_{v} be the subtrees of TtT^{t} and T¯t\overline{T}^{t} rooted at vv.

Definition 3.2 (Active and Degenerate nodes).

In the exploration setting, at the end of timestep tt, a node vVtVtv\in V_{t}\cup\partial V_{t} is active if TvtT¯vtT^{t}_{v}\neq\overline{T}^{t}_{v}, i.e., there are observed descendants of vv (including itself) that have not been visited.
An active node vVtVtv\in V_{t}\cup\partial V_{t} is degenerate at the end of timestep tt if it has a unique child node in T¯t\overline{T}^{t} that is active.

In other words, all nodes which have un-visited descendants (including those in the frontier Vt\partial V_{t}) are active. Active nodes are further partitioned into degenerate nodes that have exactly one child subtree that has not been fully visited, and active nodes that have at least two active children. See Fig. 3 for an illustration.

A crucial definition for our algorithms is that of anchor nodes:

Definition 3.3 (Anchor).

For node uTu\in T, define its anchor τ(u)\tau(u) to be its ancestor in level α(u):=12(D+(u)f(u))\alpha(u):=\frac{1}{2}(D+\ell(u)-f(u)). If the value α(u)\alpha(u) is negative, or is not an integer, or node uu itself belongs at level smaller than α(u)\alpha(u), we say that uu has no anchor and that τ(u)=\tau(u)=\bot.

Fig. 3 demonstrates the location of an anchor node τ(u)\tau(u) for given node uu; it also illustrates the following claim, which forms the main rationale behind the definition:

Claim 3.4.

If the prediction for some node uu is correct, then its anchor τ(u)\tau(u) is the least common ancestor (in terms of level \ell) of uu and the goal gg. Consequently, if a node uu has no anchor, or if its anchor does not lie on the path PP^{*} from rr to gg, then uu\in\mathcal{E}.

f(u)f(u)(u)\ell(u)DDrruuggτ(u)\tau(u)(u){\textstyle\ell(u)}D+(u)f(u)2\frac{D+\ell(u)-f(u)}{2}rruuτ(u)\tau(u)rrActive and degenerate nodesAnchor nodeIllustrating Claim 3.4ccbbddaa
Figure 3: The first figure from the left illustrates active and degenerate nodes. Nodes such as aa (shaded in blue) are in Vt\partial V_{t} while the rest are visited nodes in VtV_{t}. Unshaded node bb is inactive (since it has no un-visited descendant), while all other shaded nodes (blue, yellow and red) are active. Among the active nodes, nodes such as cc (shaded in yellow) are non-degenerate nodes as they have at least two active children. Finally nodes such as dd (shaded in red) are degenerate as they have exactly one active child.
The second and third figures give an example of anchor node τ(u)\tau(u) (in yellow) at level 12(D+(u)f(u))\frac{1}{2}(D+\ell(u)-f(u)) for given node uu (in red) at level (u)\ell(u). The rightmost figure (with root rr and goal gg also indicated) illustrates Claim 3.4, showing that when uu’s prediction f(u)f(u) is correct, then its anchor is the least common ancestor of uu and goal gg (since D+(u)f(u)D+\ell(u)-f(u) is equal to twice the distance of τ(u)\tau(u) from rr).

For any node vTv\in T, define its children be χi(v)\chi_{i}(v) for i=1,2,,Δvi=1,2,\ldots,\Delta_{v}, where ΔvΔ\Delta_{v}\leq\Delta is the number of children for vv. Note that the order is arbitrary but prescribed and fixed throughout the algorithm. For any time tt, node vv, and i[Δv]i\in[\Delta_{v}], define the visited portion of the subtree rooted at the ithi^{th} child as Cit(v):=Tχi(v)tC^{t}_{i}(v):=T^{t}_{\chi_{i}(v)}.

Definition 3.5 (Loads σi\sigma_{i} and σ\sigma).

For any time tt, node vv, and index i[Δv]i\in[\Delta_{v}], define

σit(v):=|{uCit(v)τ(u)=v}|.\sigma_{i}^{t}(v):=|\{u\in C_{i}^{t}(v)\mid\tau(u)=v\}|.

In other words, σit(v)\sigma_{i}^{t}(v) is the number of nodes in Cit(v)C^{t}_{i}(v) that have vv as their anchor. Define σt(v)=i=1Δvσit(v)\sigma^{t}(v)=\sum_{i=1}^{\Delta_{v}}\sigma_{i}^{t}(v) to be the total number of nodes in Tvt{v}T^{t}_{v}\setminus\{v\} which have vv as their anchor.

Definition 3.6 (Critical Node).

For any time tt, active and non-degenerate node vv, and index j[Δv]j\in[\Delta_{v}], let qj:=argminij{σit(v)χi(v) is active at time t}q_{j}:=\arg\min_{i\neq j}\{\sigma_{i}^{t}(v)\mid\text{$\chi_{i}(v)$ is active at time $t$}\}. Call vv a critical node with respect to jj at time tt if it satisfies

  1. (i)

    σjt(v)2σqjt(v)\sigma^{t}_{j}(v)\geq 2\sigma^{t}_{q_{j}}(v), namely, the number of nodes of Cjt(v)C^{t}_{j}(v) that have vv as their anchor is at least twice larger than the number of nodes of Cqjt(v)C^{t}_{q_{j}}(v) that have vv as their anchor; and

  2. (ii)

    2σjt(v)|Cjt(v)|2\sigma^{t}_{j}(v)\geq|C^{t}_{j}(v)|, namely, at least half of the nodes of Cjt(v)C^{t}_{j}(v) have vv as their anchor.

3.2 The TreeX-KnownDist Algorithm

Equipped with the definitions in §3.1, at a high level, the main idea of the algorithm is to balance the loads (as defined in Definition 3.5) of all the nodes vv. Note that if the goal gCi(v)g\in C_{i}(v), then the nodes uCi(v)u\in C_{i}(v) that have vv as their anchor (i.e., τ(u)=v\tau(u)=v) have erroneous predictions; hence balancing the loads automatically balances the cost and the budget. To balance the loads, we use the definition of a critical node (see Definition 3.6): whenever a node vv becomes critical, the algorithm goes back and explores another subtree of vv, thereby maintaining the balance.

More precisely, our algorithm TreeX-KnownDist does the following: at each time step tt, it checks whether there is a node that is critical. If there is no such node, the algorithm performs one more step of the current DFS, giving priority to the unexplored child of vtv_{t} with smallest prediction. On the other hand, if there is a critical node vv, then this vv must be the anchor τ(vt)\tau(v_{t}). In this case the algorithm pauses the current DFS, returns to the anchor τ(vt)\tau(v_{t}) and resumes the DFS in τ(vt)\tau(v_{t})’s child subtree having the smallest load (say Cq(τ(vt))C_{q}(\tau(v_{t}))). This DFS may have been paused at some time t<tt^{\prime}<t, and hence is continued starting at node vtv_{t^{\prime}}. The variable mem(v)\operatorname{mem}(v) saves the vertex that the algorithm left the subtree rooted on vv last time. For example, in this case mem(χq(τ(vt)))=vt\operatorname{mem}(\chi_{q}(\tau(v_{t})))=v_{t^{\prime}}. If no such time tt^{\prime} exists, the algorithm starts a new DFS from some child of τ(vt)\tau(v_{t}) whose subtree has the smallest load (in this case, mem(χq(τ(vt)))=\operatorname{mem}(\chi_{q}(\tau(v_{t})))=\bot). The pseudocode appears as Algorithm 1.

0.1 v0rv_{0}\leftarrow r, t0t\leftarrow 0;
0.2 mem(r)r\operatorname{mem}(r)\leftarrow r and mem(v)\operatorname{mem}(v)\leftarrow\bot for all vrv\neq r;
0.3 while vtgv_{t}\neq g and |Vt|<B|V_{t}|<B do
0.4       if τ(vt)\tau(v_{t})\neq\bot and τ(vt)\tau(v_{t}) is active and not degenerate and τ(vt)\tau(v_{t}) is critical w.r.t. the index of the subtree containing vtv_{t} at time tt  then
0.5             qq\leftarrow the child index qq s.t. τ(vt)\tau(v_{t}) is critical w.r.t. qq;
0.6             if mem(χq(τ(vt)))=\operatorname{mem}(\chi_{q}(\tau(v_{t})))=\bot then vt+1χq(τ(vt)v_{t+1}\leftarrow\chi_{q}(\tau(v_{t}) else umem(χq(τ(vt))u\leftarrow\operatorname{mem}(\chi_{q}(\tau(v_{t}));
0.7             
0.8      else
0.9             uvtu\leftarrow v_{t}
0.10      while vt+1v_{t+1} undefined and uu has no child do
0.11             ww\leftarrow uu’s closest active ancestor ;
0.12             qargmini{σit(w)χi(w) active }q\leftarrow\arg\min_{i}\{\sigma_{i}^{t}(w)\mid\chi_{i}(w)\text{ active }\} ;
0.13             if mem(χq(w))=\operatorname{mem}(\chi_{q}(w))=\bot then vt+1χq(w)v_{t+1}\leftarrow\chi_{q}(w) else umem(χq(w))u\leftarrow\operatorname{mem}(\chi_{q}(w));
0.14             
0.15      if vt+1v_{t+1} undefined then vt+1v_{t+1}\leftarrow uu’s child with smallest prediction;
0.16       foreach ancestor uu of vt+1v_{t+1} do  mem(u)vt+1\operatorname{mem}(u)\leftarrow v_{t+1} ;
0.17       tt+1t\leftarrow t+1;
0.18      
Algorithm 1 TreeX-KnownDist(r,D,B)\textsc{TreeX-KnownDist}(r,D,B)

A few observations: (a) While D=d(r,g)D=d(r,g) does not appear explicitly in the algorithm, it is used in the definition of anchors (recall Definition 3.3). Even when d(r,g)d(r,g), the predicted distance at the root, is not the true distance to the goal (as may happen in Section 4), given any input DD in Algorithm 1, we will still define τ(v)\tau(v) to be vv’s ancestor at level α(u):=12(D+(u)f(u))\alpha(u):=\frac{1}{2}(D+\ell(u)-f(u)). (b) The new node vtv_{t} is always on the frontier: i.e., the nodes which are either leaves of TT or have unvisited children. Moreover, (c) the memory value mem(v)=\operatorname{mem}(v)=\bot if and only if vVtv\not\in V_{t}, else mem(v)\operatorname{mem}(v) is on the frontier in the subtree below vv.

3.3 Analysis for the TreeX-KnownDist Algorithm

The proof of Theorem 3.1 proceeds in two steps. The first step is to show that the total amount of “extra” exploration, i.e., the number of nodes that do not lie on the rr-gg path, is O(Δ||)O(\Delta\cdot|\mathcal{E}|). Formally, let PP^{*} denote the rr-gg path; for the rest of this section, suppose gC1(v)g\in C_{1}(v) for all vPv\in P^{*}. Define the extra exploration to be the number of nodes visited in the subtrees hanging off this path:

ExtraExp(t):=vPi1|Cit(v)|.\operatorname{ExtraExp}(t):=\sum_{v\in P^{*}}\sum_{i\neq 1}|C_{i}^{t}(v)|.
Lemma 3.7 (Bounded Extra Exploration).

For all times tt^{*}, ExtraExp(t)7Δ|t|\operatorname{ExtraExp}(t^{*})\leq 7\Delta\cdot|\mathcal{E}^{t^{*}}|.

Next, we need to control the total distance traveled, which is the second step of our analysis:

Lemma 3.8 (Bounded Cost).

For all times tt^{*},

ttd(vt1,vt)d(r,vt)+10ExtraExp(t)+16|t|.\sum_{t\leq t^{*}}d(v_{t-1},v_{t})\leq d(r,v_{t^{*}})+10\operatorname{ExtraExp}(t^{*})+16|\mathcal{E}^{t^{*}}|.

Using the lemmas above (setting tt^{*} to be the time τ\tau^{*} when we reach the goal) proves Theorem 1.5. In the following sections, we now prove Lemmas 3.7 and 3.8.

3.4 Bounding the Extra Exploration

Lemma 3.9.

For any node vTtv\in T^{t}, define xt(v)x^{t}(v) as follows:

  1. 1.

    if gTvg\notin T_{v}, then xt(v):=σt(v)x^{t}(v):=\sigma^{t}(v).

  2. 2.

    if gTv{v}g\in T_{v}\setminus\{v\}, let gTχj(v)g\in T_{\chi_{j}(v)}. Define y1t(v):=σjt(v)y_{1}^{t}(v):=\sigma_{j}^{t}(v), y2t(v):=ij(|Cit(v)|σit(v))y_{2}^{t}(v):=\sum_{i\neq j}(|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)) and xt(v):=y1t(v)+y2t(v)x^{t}(v):=y_{1}^{t}(v)+y_{2}^{t}(v).

Then vTtxt(v)2|t|\sum_{v\in T^{t}}x^{t}(v)\leq 2|\mathcal{E}^{t}|.

Proof.

Let PP^{*} be the rr-gg path in TT. If gTvg\notin T_{v} (i.e., vPv\notin P^{*}), then by Claim 3.4 all the nodes with vv as anchor belong to \mathcal{E}. Else suppose gTvg\in T_{v} (i.e., vPv\in P^{*}), and suppose gTχj(v)g\in T_{\chi_{j}(v)}. Now all nodes uu in Cj(v)C_{j}(v) having anchor vv belong to \mathcal{E}, since the least common ancestor of uu and gg can be no higher than χj(v)\chi_{j}(v). This means

vTtPxt(v)+vPy1t(v)vTt|{uτ(u)=v}||t|.\sum_{v\in T^{t}\setminus P^{*}}x^{t}(v)+\sum_{v\in P^{*}}y_{1}^{t}(v)\leq\sum_{v\in T^{t}}|\{u\in\mathcal{E}\mid\tau(u)=v\}|\leq|\mathcal{E}^{t}|.

Finally, suppose gTvg\in T_{v} (i.e., vPv\in P^{*}) and gTχj(v)g\in T_{\chi_{j}(v)}. Now for any node uTχi(v)u\in T_{\chi_{i}(v)} for iji\neq j, the least common ancestor of uu and gg is vv. Hence nodes in Tχi(v)T_{\chi_{i}(v)} for iji\neq j whose anchor is not vv must be wrongly predicted. Denote the set of such nodes by Y2t(v)Y_{2}^{t}(v). Note that |Y2t(v)|=y2t(v)|Y_{2}^{t}(v)|=y_{2}^{t}(v), and Y2t(v)Y_{2}^{t}(v) for each vPv\in P^{*} are disjoint. Hence we have

vPy2t(v)vP|Y2t(v)||t|.\sum_{v\in P^{*}}y_{2}^{t}(v)\leq\sum_{v\in P^{*}}|Y_{2}^{t}(v)|\leq|\mathcal{E}^{t}|.

Summing the two inequalities we get the proof. ∎

Lemma 3.10.

For any node vTv\in T and any index i{1,2,,Δv}i\in\{1,2,\ldots,\Delta_{v}\} such that σit(v)>minq{σqt(v)χq(v) is active at time t}\sigma_{i}^{t}(v)>\min_{q}\{\sigma_{q}^{t}(v)\mid\chi_{q}(v)\text{ is active at time }t\}. If vtTχj(v)v_{t}\in T_{\chi_{j}(v)} for some jij\neq i then vt+1Tχi(v)v_{t+1}\notin T_{\chi_{i}(v)}.

Proof.

The proof is by contradiction. Assume there is such a time tt, and let w:=argminq{σqt(v)χq(v) is active at time t}w:=\arg\min_{q}\{\sigma_{q}^{t}(v)\mid\chi_{q}(v)\text{ is active at time }t\}. Since vt+1Tχi(v)v_{t+1}\in T_{\chi_{i}(v)}, the subtree under node χi(v)\chi_{i}(v) was not fully visited at time rr and hence χi(v)\chi_{i}(v) was active. By the definition of ww and the condition on ii in the lemma statement, we have σit(v)>σwt(v)\sigma_{i}^{t}(v)>\sigma_{w}^{t}(v). Now Algorithm 1 will ensure that vt+1v_{t+1} either remains in Tχj(v)T_{\chi_{j}(v)} or moves into Tχw(v)T_{\chi_{w}(v)}. ∎

Lemma 3.11.

For any node vv on the rr-gg path PP^{*}, recall the assumption that gC1(v)g\in C_{1}(v). For any time tt and any i1i\neq 1, at least one of the following statements must hold:

  1. (I)

    σit(v)2σ1t(v)\sigma_{i}^{t}(v)\leq 2\sigma_{1}^{t}(v).

  2. (II)

    2σit(v)|Cit(v)|2\sigma_{i}^{t}(v)\leq|C_{i}^{t}(v)|.

  3. (III)

    σit(v)=|Cit(v)|=1,σ1t(v)=0\sigma_{i}^{t}(v)=|C_{i}^{t}(v)|=1,\sigma_{1}^{t}(v)=0.

Proof.

For sake of a contradiction, assume there exists t,it,i such that at time tt none of the three statements are true, and this is the first such time. If |Cit(v)|=1|C_{i}^{t}(v)|=1, then the falsity of second statement gives σit(v)>1/2|Cit(v)|=1/2\sigma_{i}^{t}(v)>\nicefrac{{1}}{{2}}\,|C_{i}^{t}(v)|=\nicefrac{{1}}{{2}}, and so σit(v)=1\sigma_{i}^{t}(v)=1. Then the first statement being false implies σ1t(v)<1/2\sigma_{1}^{t}(v)<\nicefrac{{1}}{{2}}, which means the third statement must hold.

Henceforth let us assume |Cit(v)|2|C_{i}^{t}(v)|\geq 2. Let t<tt^{\prime}<t be the latest time such vtCi(v)v_{t^{\prime}}\in C_{i}(v) and τ(vt)=v\tau(v_{t^{\prime}})=v. Because the second statement is false, σit(v)>1/2|Cit(v)|1\sigma_{i}^{t}(v)>\nicefrac{{1}}{{2}}\,|C_{i}^{t}(v)|\geq 1, and so such a time tt^{\prime} exists.

Since tt^{\prime} is the latest time satisfying the condition, we have σit(v)σit(v)+1\sigma_{i}^{t}(v)\leq\sigma_{i}^{t^{\prime}}(v)+1. Moreover, the number of nodes in Cit(v)C_{i}^{t}(v) whose anchor is not vv does not decrease, hence |Cit(v)|σit(v)|Cit(v)|σit(v)|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)\geq|C_{i}^{t^{\prime}}(v)|-\sigma_{i}^{t^{\prime}}(v). Also, the number of nodes in C1t(v)C_{1}^{t}(v) whose anchor is vv does not decrease, hence σ1t(v)σ1t(v)\sigma_{1}^{t}(v)\geq\sigma_{1}^{t^{\prime}}(v).

Thus we can get

σit(v)2σ1t(v)σit(v)2σ1t(v)10\displaystyle\sigma_{i}^{t^{\prime}}(v)-2\sigma_{1}^{t^{\prime}}(v)\geq\sigma_{i}^{t}(v)-2\sigma_{1}^{t}(v)-1\geq 0 (1)
2σit(v)|Cit(v)|2σit(v)|Cit(v)|10\displaystyle 2\sigma_{i}^{t^{\prime}}(v)-|C_{i}^{t^{\prime}}(v)|\geq 2\sigma_{i}^{t}(v)-|C_{i}^{t}(v)|-1\geq 0

Now if Cit(v)C_{i}^{t^{\prime}}(v) is completely visited, then obviously vt+1Ci(v)v_{t^{\prime}+1}\notin C_{i}(v). Otherwise, Cit(v)C_{i}^{t^{\prime}}(v) is active. Also because gC1(v)g\in C_{1}(v), hence C1(v)C_{1}(v) cannot be completely visited unless the algorithm ends, which means vv is not degenerate and C1t(v)C_{1}^{t^{\prime}}(v) is still active. Furthermore, we have inequalities (1), hence vv must be critical w.r.t. the subtree containing vtv_{t^{\prime}} (because taking q=1q=1 we get the two inequalities for critical hold, although σ1t(v)\sigma_{1}^{t^{\prime}}(v) may not be the smallest one). Hence at time t+1t^{\prime}+1 the algorithm will go to a node which is not in Ci(v)C_{i}(v).

If vtCit(v)v_{t}\notin C_{i}^{t}(v): Note that one of the three statements holds for tt^{\prime}. If one of the first two statements is true to tt^{\prime}, then the same statement is also true to tt because σit(v)=σit(v)\sigma_{i}^{t}(v)=\sigma_{i}^{t^{\prime}}(v), |Cit(v)|=|Cit(v)||C_{i}^{t}(v)|=|C_{i}^{t^{\prime}}(v)| and σ1t(v)σ1t(v)\sigma_{1}^{t}(v)\geq\sigma_{1}^{t^{\prime}}(v). Otherwise we have σit(v)=σit(v)=|Cit(v)|=|Cit(v)|=1\sigma_{i}^{t}(v)=\sigma_{i}^{t^{\prime}}(v)=|C_{i}^{t}(v)|=|C_{i}^{t^{\prime}}(v)|=1. Then if σ1t(v)=0\sigma_{1}^{t}(v)=0, then the third statement is true to tt; if σ1t(v)1\sigma_{1}^{t}(v)\geq 1, then the first statement is true to tt.

Otherwise vtCit(v)v_{t}\in C_{i}^{t}(v): By Lemma 3.10, there must exist a time t>t′′>tt>t^{\prime\prime}>t^{\prime} such that σ1t′′(v)σit′′(v)\sigma_{1}^{t^{\prime\prime}}(v)\geq\sigma_{i}^{t^{\prime\prime}}(v) (otherwise the algorithm will never enter Ci(v)C_{i}(v) since C1(v)C_{1}(v) is always active). Hence by the analysis before, we have σ1t′′(v)σit(v)1\sigma_{1}^{t^{\prime\prime}}(v)\geq\sigma_{i}^{t^{\prime}}(v)\geq 1. Because tt^{\prime} is defined as the latest time before tt when vtCi(v)v_{t}\in C_{i}(v), we have σit′′(v)=σit(v)\sigma_{i}^{t^{\prime\prime}}(v)=\sigma_{i}^{t^{\prime}}(v). Hence σit(v)σit(v)+12σit′′(v)2σ1t′′(v)2σ1t(v)\sigma_{i}^{t}(v)\leq\sigma_{i}^{t^{\prime}}(v)+1\leq 2\sigma_{i}^{t^{\prime\prime}}(v)\leq 2\sigma_{1}^{t^{\prime\prime}}(v)\leq 2\sigma_{1}^{t}(v), which is the first statement in this lemma. ∎

Lemma 3.12.

For any node vv on the rr-gg path PP^{*}, and any time tt,

  1. (i)

    if f(χi(v))=d(χi(v),g)f(\chi_{i}(v))=d(\chi_{i}(v),g) for all i[Δv]i\in[\Delta_{v}] then i1|Cit(v)|3Δxt(v)\sum_{i\neq 1}|C_{i}^{t}(v)|\leq 3\Delta x^{t}(v),

  2. (ii)

    else i1|Cit(v)|3Δxt(v)+Δ\sum_{i\neq 1}|C_{i}^{t}(v)|\leq 3\Delta x^{t}(v)+\Delta.

Proof.

For the first case: if f(χi(v))=d(χi(v),g)f(\chi_{i}(v))=d(\chi_{i}(v),g) for all ii, then f(χ1(v))f(\chi_{1}(v)) is the smallest label among all f(χi(v))f(\chi_{i}(v)) since the predictions are all correct. Hence by the algorithm, the first node reached among {χi(v)}\{\chi_{i}(v)\} must be χ1(v)\chi_{1}(v), which means the third statement in Lemma 3.11 cannot hold. By Lemma 3.11, for any i,ti,t, σit(v)2σ1t(v)\sigma_{i}^{t}(v)\leq 2\sigma_{1}^{t}(v) or 2σit(v)|Cit(v)|2\sigma_{i}^{t}(v)\leq|C_{i}^{t}(v)|.

If σit(v)2σ1t(v)\sigma_{i}^{t}(v)\leq 2\sigma_{1}^{t}(v): |Cit(v)|σit(v)+σ1t(v)σ1t(v)σit(v)/2|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)\geq\sigma_{1}^{t}(v)\geq\sigma_{i}^{t}(v)/2; If 2σit(v)|Cit(v)|2\sigma_{i}^{t}(v)\leq|C_{i}^{t}(v)|: |Cit(v)|σit(v)+σ1t(v)|Cit(v)|σit(v)σit(v)|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)\geq|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)\geq\sigma_{i}^{t}(v). Either of them can lead to a conclusion that

|Cit(v)|σit(v)+σ1t(v)σit(v)/2.|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)\geq\sigma_{i}^{t}(v)/2.

Denote xit(v):=|Cit(v)|σit(v)+σ1t(v)x_{i}^{t}(v):=|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v). Then by σ1t(v)0\sigma_{1}^{t}(v)\geq 0 and the inequality above, we have |Cit(v)|xit(v)+σit(v)3xit(v)|C_{i}^{t}(v)|\leq x_{i}^{t}(v)+\sigma_{i}^{t}(v)\leq 3x_{i}^{t}(v).

Hence i1|Cit(v)|3i1xit(v)=3i1(|Cit(v)|σit(v)+(Δ1)σ1t(v))3Δ(σ1t(v)+i1|Cit(v)|σit(v))=3Δxt(v)\sum_{i\neq 1}|C_{i}^{t}(v)|\leq 3\sum_{i\neq 1}x_{i}^{t}(v)=3\sum_{i\neq 1}(|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+(\Delta-1)\sigma_{1}^{t}(v))\leq 3\Delta(\sigma_{1}^{t}(v)+\sum_{i\neq 1}|C_{i}^{t}(v)|-\sigma_{i}^{t}(v))=3\Delta x^{t}(v). Here the last equality is because of Lemma 3.9.

Second, consider other cases. By Lemma 3.11, σit(v)2σ1t(v)+1\sigma_{i}^{t}(v)\leq 2\sigma_{1}^{t}(v)+1 or 2σit(v)|Cit(v)|+12\sigma_{i}^{t}(v)\leq|C_{i}^{t}(v)|+1.

If σit(v)2σ1t(v)+1\sigma_{i}^{t}(v)\leq 2\sigma_{1}^{t}(v)+1: |Cit(v)|σit(v)+σ1t(v)+1/2σ1t(v)+1/2σit(v)/2|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)+\nicefrac{{1}}{{2}}\geq\sigma_{1}^{t}(v)+\nicefrac{{1}}{{2}}\geq\sigma_{i}^{t}(v)/2; If 2σit(v)|Cit(v)|+12\sigma_{i}^{t}(v)\leq|C_{i}^{t}(v)|+1: |Cit(v)|σit(v)+σ1t(v)+1/2|Cit(v)|σit(v)+1/2σit(v)|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)+\nicefrac{{1}}{{2}}\geq|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\nicefrac{{1}}{{2}}\geq\sigma_{i}^{t}(v). Either of them can lead to a conclusion that

|Cit(v)|σit(v)+σ1t(v)+1/2σit(v)/2.|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v)+1/2\geq\sigma_{i}^{t}(v)/2.

Denote xit(v):=|Cit(v)|σit(v)+σ1t(v)x_{i}^{t}(v):=|C_{i}^{t}(v)|-\sigma_{i}^{t}(v)+\sigma_{1}^{t}(v), then |Cit(v)|xit(v)+σit(v)3xit(v)+1|C_{i}^{t}(v)|\leq x_{i}^{t}(v)+\sigma_{i}^{t}(v)\leq 3x_{i}^{t}(v)+1.

Consequently i1|Cit(v)|ii(3xit(v)+1)=3Δxt(v)+Δ\sum_{i\neq 1}|C_{i}^{t}(v)|\leq\sum_{i\neq i}(3x_{i}^{t}(v)+1)=3\Delta x^{t}(v)+\Delta, where the last equality is because of Lemma 3.9. ∎

We can finally bound the extra exploration.

Proof of Lemma 3.7.

Divide the set of nodes on PP^{*} into two sets A,BA,B: AA contains the nodes all of whose children are correctly labeled, and BB contains the other nodes. Then

ExtraExp(t)\displaystyle\operatorname{ExtraExp}(t^{*}) =vAi1|Cit(v)|+vBi1|Cit(v)|\displaystyle=\sum_{v\in A}\sum_{i\neq 1}|C_{i}^{t^{*}}(v)|+\sum_{v\in B}\sum_{i\neq 1}|C_{i}^{t^{*}}(v)| (2)
()vA3Δxt(v)+vB(3Δxt(v)+Δ)\displaystyle\stackrel{{\scriptstyle(\star)}}{{\leq}}\sum_{v\in A}3\Delta x^{t^{*}}(v)+\sum_{v\in B}(3\Delta x^{t^{*}}(v)+\Delta) (3)
=3ΔvPxt(v)+Δ|B|()6Δ|t|+Δ|t|=7Δ|t|.\displaystyle=3\Delta\sum_{v\in P^{*}}x^{t^{*}}(v)+\Delta|B|\stackrel{{\scriptstyle(\star\star)}}{{\leq}}6\Delta|\mathcal{E}^{t^{*}}|+\Delta|\mathcal{E}^{t^{*}}|=7\Delta|\mathcal{E}^{t^{*}}|. (4)

The inequality ()(\star) uses LABEL:lemma:_extra_exploration_boundedfor_each_node_alg2, and ()(\star\star) uses Lemma 3.9. This proves Lemma 3.7. ∎

3.5 Bounding the Movement Cost

In this subsection, we bound the total movement cost (and not just the number of visited nodes), thereby proving Lemma 3.8.

First, we partition the edge traversals made by the algorithm into downwards (from a parent to a child) and upwards (from a child to its parent) traversals, and denote the cost incurred by the downwards and upwards traversals until time tt by MdtM_{d}^{t} and MutM_{u}^{t} respectively. We start at the root and hence get Mdt=Mut+d(r,vt)M_{d}^{t}=M_{u}^{t}+d(r,v_{t}); since we care about the time tt^{*} when we reach the goal state gg, we have

Mt=Mut+Mdt=2Mut+d(r,vt).M^{t^{*}}=M_{u}^{t^{*}}+M_{d}^{t^{*}}=2M_{u}^{t^{*}}+d(r,v_{t}). (5)

It now suffices to bound the upwards movement MutM_{u}^{t^{*}}. For any edge (u,v)(u,v) with vv being the parent and uu the child, we further partition the upwards traversals along this edge into two types:

  1. (i)

    upward traversals when the if statement is true at time tt for a node vsv_{s} (which lies at or below uu) and we move the traversal to another subtree of τ(vs)\tau(v_{s}) (which lies at or above vv), and

  2. (ii)

    the unique upward traversal when we have completely visited the subtree under the edge.

The second type of traversal happens only once, and it never happens for the edges on the rr-gg path PP^{*} (since those edges contain the goal state under it, which is not visited until the very end). Hence the second type of traversals can be charged to the extra exploration ExtraExp(t)\operatorname{ExtraExp}(t^{*}). It remains to now bound the first type of upwards traversals, which we refer to as callback traversals.

We further partition the callback traversals based on the identity of the anchor which was critical at that timestep: let Mut(v)M_{u}^{t}(v) denote the callback traversal cost at those times ss when v=τ(vs)v=\tau(v_{s}). Hence the total cost of callback traversals is vTtMut(v)\sum_{v\in T^{t^{*}}}M_{u}^{t^{*}}(v), and

Mt=d(r,vt)+2(ExtraExp(t)+vTtMut(v)).\displaystyle M^{t^{*}}=d(r,v_{t})+2\bigg{(}\operatorname{ExtraExp}(t^{*})+\sum_{v\in T^{t^{*}}}M^{t^{*}}_{u}(v)\bigg{)}. (6)

We now control each term of the latter sum.

Lemma 3.13.

For any time tt and any node vTtv\in T^{t}, Mut(v)4σt(v)M_{u}^{t}(v)\leq 4\sigma^{t}(v).

Proof.

For node vv and index jj, let SS be the set of times sts\leq t for which vsCjs(v)v_{s}\in C_{j}^{s}(v) and the if condition is satisfied with τ(vs)=v\tau(v_{s})=v (i.e, τ(vs)=v\tau(v_{s})=v, vv is active and not degenerate and vv is critical w.r.t. the subtree containing vsv_{s} at time ss). The cost of the upwards movement at this time is d(vs,v)|Cjs(v)|2σjti(v)d(v_{s},v)\leq|C_{j}^{s}(v)|\leq 2\sigma_{j}^{t_{i}}(v); the latter inequality is true by criticality.

Lemma 3.10 ensures that we only enter Cj(v)C_{j}(v) from a node outside it at some time ss when jargminq{σqs(v)}j\in\arg\min_{q}\{\sigma_{q}^{s}(v)\}. Hence, if S={t1,,tm}S=\{t_{1},\ldots,t_{m}\} then for each ii there must exist a time sis_{i} satisfying ti<si<ti+1t_{i}<s_{i}<t_{i+1} such that minq{σqsi(v)}=σjsi(v)\min_{q}\{\sigma_{q}^{s_{i}}(v)\}=\sigma_{j}^{s_{i}}(v). Consequently,

σjti+12minq{σqti+1(v)}2minq{σqsi(v)}=2σjsi(v)2σjti(v).\sigma_{j}^{t_{i+1}}\geq 2\min_{q}\{\sigma_{q}^{t_{i+1}}(v)\}\geq 2\min_{q}\{\sigma_{q}^{s_{i}}(v)\}=2\sigma_{j}^{s_{i}}(v)\geq 2\sigma_{j}^{t_{i}}(v).

Hence, for each tiSt_{i}\in S,

i=1md(vti,v)i=1m2σjti(v)4σjtm(v)4σjt(v).\displaystyle\sum_{i=1}^{m}d(v_{t_{i}},v)\leq\sum_{i=1}^{m}2\sigma_{j}^{t_{i}}(v)\leq 4\sigma_{j}^{t_{m}}(v)\leq 4\sigma^{t}_{j}(v). (7)

This is the contribution due to a single subtree Tχj(v)T_{\chi_{j}(v)}; summing over all subtrees gives a bound of 4σt(v)4\sigma^{t}(v), as claimed. ∎

Proof of Lemma 3.8.

The equation (6) bounds the total movement cost MtM^{t^{*}} until time tt^{*} in terms of DD, the extra exploration, and the “callback” (upwards) traversals vMut(v)\sum_{v}M_{u}^{t^{*}}(v). LABEL:lemma:_alg2_bounded_callback_cost_foreach_node above bounds each term Mut(v)M_{u}^{t^{*}}(v) by 4σt(v)4\sigma^{t^{*}}(v). To bound this last summation,

  • For each vPv\not\in P^{*}, σt(v)=xt(v)\sigma^{t^{*}}(v)=x^{t^{*}}(v) by Lemma 3.9.

  • For each vPv\in P^{*}, recall our assumption that gC1(v)g\in C_{1}(v), so

    vPσt(v)\displaystyle\sum_{v\in P^{*}}\sigma^{t^{*}}(v) =vP(σ1t(v)+i1σit(v))\displaystyle=\sum_{v\in P^{*}}\bigg{(}\sigma^{t^{*}}_{1}(v)+\sum_{i\neq 1}\sigma^{t^{*}}_{i}(v)\bigg{)}
    vPxt(v)+vPi1|Cit(v)|=vPxt(v)+ExtraExp(t),\displaystyle\leq\sum_{v\in P^{*}}x^{t^{*}}(v)+\sum_{v\in P^{*}}\sum_{i\neq 1}|C^{t^{*}}_{i}(v)|=\sum_{v\in P^{*}}x^{t^{*}}(v)+\operatorname{ExtraExp}(t^{*}),

    where σ1t(v)xt(v)\sigma^{t^{*}}_{1}(v)\leq x^{t^{*}}(v) is directly given by definition in Lemma 3.9.

Summing over all vv (using Lemma 3.9), and substituting into (6) gives the claim. ∎

4 The General Tree Exploration Algorithm

We now build on the ideas from known-distance case to give our algorithm for the case where the true target distance d(g,r)d(g,r) is not known in advance, and we have to work merely with the predictions. Recall the guarantee we want to prove: See 1.1

Note that Algorithm TreeX-KnownDist requires knowing DD exactly in computing anchors; an approximation to DD does not suffice. Because of this, a simple black-box use of Algorithm TreeX-KnownDist using a “guess-and-double” strategy does not seem to work. The main idea behind our algorithm is clean: we explore increasing portions of the tree. If most of the predictions we see have been correct, we show how to find a node whose prediction must be correct. Now running Algorithm 1 rooted at this node can solve the problem. On the other hand, if most of predictions that we have seen are incorrect, this gives us enough budget to explore further.

4.1 Definitions

Definition 4.1 (Subtree Γ(u,v)\Gamma(u,v)).

Given a tree TT, node vv and its neighbor uu, let Γ(u,v)\Gamma(u,v) denote the set of nodes ww such that the path from ww to vv contains uu.

Lemma 4.2 (Tree Separator).

Given a tree TT with maximum degree Δ\Delta and |T|=n>2Δ|T|=n>2\Delta nodes, there exists a node vv and two neighbors a,ba,b such that |Γ(a,v)|>|T|2Δ|\Gamma(a,v)|>\frac{|T|}{2\Delta} and |Γ(b,v)|>|T|2Δ|\Gamma(b,v)|>\frac{|T|}{2\Delta}. Moreover, such v,a,bv,a,b can be found in linear time.

Proof.

Let vv be a centroid of tree TT, i.e., a vertex such that deleting vv from TT breaks it into a forest containing subtrees of size at most n/2n/2 [Jor69]. Each such subtree corresponds to some neighbor of vv. Let a,ba,b be the neighbors corresponding to the two largest subtrees. Then |Γ(a,v)|n1Δ>n2Δ|\Gamma(a,v)|\geq\frac{n-1}{\Delta}>\frac{n}{2\Delta}. Moreover the second largest subtree may contain n|Γ(a,v)|1Δ1n/21Δ1>n2Δ\frac{n-|\Gamma(a,v)|-1}{\Delta-1}\geq\frac{n/2-1}{\Delta-1}>\frac{n}{2\Delta} when Δ<n/2\Delta<n/2. ∎

Definition 4.3 (Vote γ(u,c)\gamma(u,c) and Dominating vote γ(S,c)\gamma(S,c)).

Given a center cc, let the vote of any node uTu\in T be γ(u,c):=f(u)d(u,c)\gamma(u,c):=f(u)-d(u,c). For any set of nodes SS, define the dominating vote to be γ(S,c):=x\gamma(S,c):=x if γ(u,c)=x\gamma(u,c)=x for at least half of the nodes uSu\in S. If such majority value xx does not exist, define γ(S,c):=1\gamma(S,c):=-1.

4.2 The TreeX Algorithm

Given these definitions, we can now give the algorithm. Recall that Theorem 3.1 says that Algorithm 1 finds gg in d(rρ,g)+c1Δ||d(r_{\rho},g)+c_{1}\Delta\cdot|\mathcal{E}| steps, for some constant c11c_{1}\geq 1. We proceed in rounds: in round ρ\rho we run Algorithm 1 and visit approximately Δ(c1+β)ρ\Delta\cdot(c_{1}+\beta)^{\rho} vertices, where β1\beta\geq 1 is a parameter to be chosen later. Now we focus on two disjoint and “centrally located” subtrees of size (c1+β)ρ\approx(c_{1}+\beta)^{\rho} within the visited nodes. Either the majority of these nodes have correct predictions, in which case we use their information to identify one correct node. Else a majority of them are incorrect, in which case we have enough budget to go on to the next round. A formal description appears in Algorithm 2.

0.1 r0rr_{0}\leftarrow r, D0f(v)D_{0}\leftarrow f(v), ρ0\rho\leftarrow 0;
0.2 while goal gg not found do
0.3       Bρ(c1+β)ρ(2Δ+1)B_{\rho}\leftarrow(c_{1}+\beta)^{\rho}\cdot(2\Delta+1) ;
0.4       if Bρ<Dρ/βB_{\rho}<D_{\rho}/\beta then
0.5             run TreeX-KnownDist(rρ,Dρ,Bρ)\textsc{TreeX-KnownDist}(r_{\rho},D_{\rho},B_{\rho}) ;
0.6      else
0.7             run TreeX-KnownDist(rρ,Dρ,Dρ+c1Bρ)\textsc{TreeX-KnownDist}(r_{\rho},D_{\rho},D_{\rho}+c_{1}B_{\rho}) ;
0.8            
0.9      Tρ+1T^{\rho+1}\leftarrow tree induced by nodes that have ever been visited so far ;
0.10       rρ+1,aρ+1,bρ+1r_{\rho+1},a_{\rho+1},b_{\rho+1}\leftarrow centroid for TρT^{\rho} and its two neighbors promised by Lemma 4.2;
0.11       let Da,ρ+1γ(Γ(aρ+1,rρ+1),rρ+1)D_{a,\rho+1}\leftarrow\gamma(\Gamma(a_{\rho+1},r_{\rho+1}),r_{\rho+1}) and Db,ρ+1γ(Γ(bρ+1,rρ+1),rρ+1)D_{b,\rho+1}\leftarrow\gamma(\Gamma(b_{\rho+1},r_{\rho+1}),r_{\rho+1});
0.12       define new distance estimate Dρ+1max{Da,ρ+1,Db,ρ+1}D_{\rho+1}\leftarrow\max\{D_{a,\rho+1},D_{b,\rho+1}\};
0.13       move to vertex rρ+1r_{\rho+1};
0.14       ρρ+1\rho\leftarrow\rho+1;
0.15      
Algorithm 2 TreeX(r,β)\textsc{TreeX}(r,\beta)

4.3 Analysis of the TreeX Algorithm

Lemma 4.4.

If the goal is not visited before round ρ\rho when Bρ4||(2Δ+1)B_{\rho}\geq 4|\mathcal{E}|(2\Delta+1), we have Dρ=d(rρ,g)D_{\rho}=d(r_{\rho},g).

Proof.

First, if ||=0|\mathcal{E}|=0, then the conclusion holds obviously. So next we assume ||>0|\mathcal{E}|>0. The execution of Algorithm 1 in round ρ1\rho-1 visits at least Bρ1=(c1+β)(ρ1)(2Δ+1)B_{\rho-1}=(c_{1}+\beta)^{(\rho-1)}\cdot(2\Delta+1) distinct nodes. Using the assumption on BρB_{\rho}, we have

|Tρ|4||(2Δ+1)>4Δ||>2Δ.|T^{\rho}|\geq 4|\mathcal{E}|\cdot(2\Delta+1)>4\Delta|\mathcal{E}|>2\Delta.

Lemma 4.2 now implies that both the subtrees Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) and Γ(bρ,rρ)\Gamma(b_{\rho},r_{\rho}) contain more than 12Δ|Tρ|>2||\frac{1}{2\Delta}|T^{\rho}|>2|\mathcal{E}| nodes. Since at most |||\mathcal{E}| nodes are erroneous, more than half of the nodes in each of Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) and Γ(bρ,rρ)\Gamma(b_{\rho},r_{\rho}) have correct predictions.

Finally, observe that if gΓ(aρ,rρ)g\not\in\Gamma(a_{\rho},r_{\rho}), then for any correct node xx in Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) we have f(x)=d(x,g)=d(x,rρ)+d(rρ,g)f(x)=d(x,g)=d(x,r_{\rho})+d(r_{\rho},g), and hence its vote γ(x,rρ)=d(rρ,g)\gamma(x,r_{\rho})=d(r_{\rho},g). Since a majority of nodes in Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) are correct, we get

Da,ρ=γ(Γ(aρ,rρ),rρ)=d(rρ,g).\displaystyle D_{a,\rho}=\gamma(\Gamma(a_{\rho},r_{\rho}),r_{\rho})=d(r_{\rho},g). (8)

On the other hand, if gΓ(aρ,rρ)g\in\Gamma(a_{\rho},r_{\rho}), then for any correct node xx in Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) we have f(x)=d(x,g)d(x,aρ)+d(aρ,g)<d(x,rρ)+d(rρ,g)f(x)=d(x,g)\leq d(x,a_{\rho})+d(a_{\rho},g)<d(x,r_{\rho})+d(r_{\rho},g). Thus its vote, and hence the vote of a strict majority of nodes in the subtree Γ(aρ,rρ)\Gamma(a_{\rho},r_{\rho}) have

Da,ρ<d(rρ,g).\displaystyle D_{a,\rho}<d(r_{\rho},g). (9)

If no value is in a strict majority, recall that we define Da,ρ=1D_{a,\rho}=-1, which also satisfies (9). The same arguments hold for the subtree Γ(bρ,rρ)\Gamma(b_{\rho},r_{\rho}) as well. Since the goal gg belongs to at most one of these subtrees, we have that Dρ=max(Da,ρ,Db,ρ)=d(rρ,g)D_{\rho}=\max(D_{a,\rho},D_{b,\rho})=d(r_{\rho},g), as claimed. ∎

Lemma 4.5.

For any round ρ\rho, d(rρ,r)O(Bρ)d(r_{\rho},r)\leq O(B_{\rho}). Moreover, for any round ρ\rho such that Bρ4||(2Δ+1)B_{\rho}\geq 4|\mathcal{E}|(2\Delta+1), d(rρ,r)O(Bρ1)+O(β||Δ)d(r_{\rho},r)\leq O(B_{\rho-1})+O(\beta|\mathcal{E}|\Delta).

Proof.

Since rρr_{\rho} is at distance at most (c1+c3)Bρ1=Bρ(c_{1}+c_{3})B_{\rho-1}=B_{\rho} from rρ1r_{\rho-1}, an inductive argument shows that its distance from r0=rr_{0}=r is at most (B0++Bρ)=O(Bρ)(B_{0}+\cdots+B_{\rho})=O(B_{\rho}).

Moreover, when Bρ4||(2Δ+1)B_{\rho}\geq 4|\mathcal{E}|(2\Delta+1), we have d(rρ,g)=Dρd(r_{\rho},g)=D_{\rho} by Lemma 4.4. Hence if BρDρ/βB_{\rho}\geq D_{\rho}/\beta, the algorithm finds the goal in this round by Theorem 3.1. Therefore, for any rounds ρ\rho when Bρ4||(2Δ+1)B_{\rho}\geq 4|\mathcal{E}|(2\Delta+1) except the last round, the number of nodes visited by Algorithm 1 is at most BρB_{\rho}, hence we have d(rρ+1,r)d(rρ,r)+Bρd(r_{\rho+1},r)\leq d(r_{\rho},r)+B_{\rho}. We denote ρ\rho^{\prime} to be the first round ρ\rho^{\prime} such that Bρ4||(2Δ+1)B_{\rho^{\prime}}\geq 4|\mathcal{E}|(2\Delta+1). Thus by induction we have

d(rρ,r)i=ρρ1Bi+d(rρ,r)O(Bρ1)+O(Bρ)O(Bρ1)+O(β||Δ).d(r_{\rho},r)\leq\sum_{i=\rho^{\prime}}^{\rho-1}B_{i}+d(r_{\rho^{\prime}},r)\leq O(B_{\rho-1})+O(B_{\rho^{\prime}})\leq O(B_{\rho-1})+O(\beta|\mathcal{E}|\Delta).\qed
Proof of Theorem 1.1.

Firstly, for the rounds ρ\rho when Bρ<4||(2Δ+1)B_{\rho}<4|\mathcal{E}|(2\Delta+1): in each round, Algorithm 1 at most visits (c1+β)Bρ=Bρ+1(c_{1}+\beta)B_{\rho}=B_{\rho+1} nodes, the cost incurred is at most 19Bρ+119B_{\rho+1}, by Lemma 3.8. Moreover, the distance from the ending node to rρ+1r_{\rho+1} is a further O(Bρ+1)O(B_{\rho+1}) by Lemma 4.5. Therefore, since the bounds BρB_{\rho} increase geometrically, the cost summed over all rounds until round ρ\rho is O(Bρ+1)=O(β||Δ)O(B_{\rho+1})=O(\beta|\mathcal{E}|\Delta).

Secondly, for any rounds ρ\rho when Bρ4||(2Δ+1)B_{\rho}\geq 4|\mathcal{E}|(2\Delta+1) except the last round, by Lemma 4.4 and Theorem 3.1, the number of nodes visited by Algorithm 1 is at most BρB_{\rho} (the reasoning is the same as that in Lemma 4.5). Hence the cost incurred is at most 19Bρ19B_{\rho}. Moreover, by LABEL:lemma:_D_notknown_vt_distance_new the distance from the ending node to rρ+1r_{\rho+1} is at most O(Bρ)+O(βΔ||)O(B_{\rho})+O(\beta\Delta|\mathcal{E}|), which means the total cost in round ρ\rho is at most O(Bρ)+O(βΔ||)O(B_{\rho})+O(\beta\Delta|\mathcal{E}|).

Moreover, if we denote round ρ\rho^{\prime} to be the first round such that Bρ4||(2Δ+1)B_{\rho^{\prime}}\geq 4|\mathcal{E}|(2\Delta+1), then we have, for any round ρ>ρ\rho>\rho^{\prime}, Bρ>βΔ||B_{\rho}>\beta\Delta|\mathcal{E}|. Hence the cost in round ρ\rho is O(Bρ)O(B_{\rho}).

Finally, consider the last round ρ\rho^{*}. We only need to consider the case when Bρ4||(2Δ+1)B_{\rho^{*}}\geq 4|\mathcal{E}|(2\Delta+1), otherwise the cost has been included in the first case. By Theorem 3.1, the cost incurred in this round is at most Dρ+c1Δ||d(r,g)+d(rρ,r)+c1Δ||D_{\rho^{*}}+c_{1}\Delta|\mathcal{E}|\leq d(r,g)+d(r_{\rho^{*}},r)+c_{1}\Delta|\mathcal{E}|. So summing the bounds above, the total cost is at most

O(βΔ||)+O(Bρ)+O(βΔ||)+i=ρ+1ρ1O(Bi)+d(r,g)+d(rρ,r)+c1Δ||\displaystyle O(\beta\Delta|\mathcal{E}|)+O(B_{\rho^{\prime}})+O(\beta\Delta|\mathcal{E}|)+\sum_{i=\rho^{\prime}+1}^{\rho^{*}-1}O(B_{i})+d(r,g)+d(r_{\rho^{*}},r)+c_{1}\Delta|\mathcal{E}|
d(r,g)+O(Bρ1)+O(βΔ||)d(r,g)+O(d(r,g)/β)+O(βΔ||)\displaystyle\qquad\leq d(r,g)+O(B_{\rho^{*}-1})+O(\beta\Delta|\mathcal{E}|)\leq d(r,g)+O(d(r,g)/\beta)+O(\beta\Delta|\mathcal{E}|)

Here the final inequality uses that

Bρ1Dρ1/β(d(r,g)+O(βBρ1))/β(d(r,g)+O(Bρ1))/β.B_{\rho^{*}-1}\leq D_{\rho^{*}-1}/\beta\leq(d(r,g)+O(\beta B_{\rho^{*}-1}))/\beta\leq(d(r,g)+O(B_{\rho^{*}-1}))/\beta.

Setting β=O(1/δ)\beta=O(1/\delta) gives the proof. ∎

5 The Planning Problem

In this section we consider the planning version of the problem when the entire graph GG (with unit edge lengths, except for §5.3), the starting node rr, and the entire prediction function f:Vf:V\to\mathbb{Z} are given up-front. The agent can use this information to plan its exploration of the graph. We propose an algorithm for this version and then prove the cost bound for trees, and then for a graph with bounded doubling dimension. We begin by defining the implied-error function φ(v)\varphi(v), which gives the total error if the goal is at node vv.

Definition 5.1 (Implied-error).

The implied-error function φ:V\varphi:V\to\mathbb{Z} maps each node vVv\in V to φ(v):=|{uVd(u,v)f(u)}|\varphi(v):=|\{u\in V\mid d(u,v)\neq f(u)\}|, which is the 0\ell_{0} error if the goal were at vv.

The search algorithm for this planning version is particularly simple: we visit the nodes in rounds, where round ρ\rho visits nodes with implied-error φ\varphi value at most 2ρ\approx 2^{\rho} in the cheapest possible way. The challenge is to show that the total cost incurred until reaching the goal is small. Observe that ||=φ(g)|\mathcal{E}|=\varphi(g), so if this value is at most 2ρ2^{\rho}, we terminate in round ρ\rho.

0.1 ρ0\rho\leftarrow 0, S1S_{-1}\leftarrow\emptyset, r1rr_{-1}\leftarrow r;
0.2 while gg not found do
0.3       Sρ{vTφ(v)<2ρ}(i=1ρ1Si)S_{\rho}\leftarrow\{v\in T\mid\varphi(v)<2^{\rho}\}\setminus(\cup_{i=-1}^{\rho-1}S_{i});
0.4       if SρS_{\rho}\neq\emptyset then
0.5             CρC_{\rho}\leftarrow min-length Steiner Tree on SρS_{\rho};
0.6             go to an arbitrary node rρr_{\rho} in SρS_{\rho};
0.7             visit all nodes in CρC_{\rho} using an Euler tour of cost at most 2|Cρ|2|C_{\rho}|, and return to rρr_{\rho};
0.8            
0.9      else
0.10            rρrρ1r_{\rho}\leftarrow r_{\rho-1}
0.11      ρρ+1\rho\leftarrow\rho+1;
0.12      
Algorithm 3 FullInfoX

5.1 Analysis

Recall our main claim for the planning algorithm: See 1.4

The proof relies on the fact that Algorithm 3 visits a node in SρS_{\rho} only after visiting all nodes in s<ρSs\cup_{s<\rho}S_{s} and not finding the goal gg; this serves a proof that ||=φ(g)2ρ|\mathcal{E}|=\varphi(g)\geq 2^{\rho}. The proof below shows that (a) the cost of the tour of CρC_{\rho} is bounded and (b) the total cost of each transition is small. Putting these claims together then proves Theorem 1.4. We start with a definition.

Definition 5.2 (Midpoint Set).

Given a set of nodes UU, define its midpoint set M(U)M(U) to be the set of points ww such that the distance from ww to all points in UU is equal.

Lemma 5.3 (φ\varphi-Bound Lemma).

For any two sets of nodes S,UGS,U\subseteq G, we have

vUφ(v)|SM(U)|.\sum_{v\in U}\varphi(v)\geq|S\setminus M(U)|.
Proof.

If node wSw\in S does not lie in M(U)M(U), then there are two nodes u,vUu,v\in U for which d(u,w)d(v,w)d(u,w)\neq d(v,w). This means f(w)f(w) cannot equal both of them, and hence contributes to at least one of φ(u)\varphi(u) or φ(v)\varphi(v). ∎

Corollary 5.4.

For any two nodes u,vGu,v\in G, we have d(u,v)φ(u)+φ(v)d(u,v)\leq\varphi(u)+\varphi(v).

Proof.

Apply Lemma 5.3 for set U={u,v}U=\{u,v\} and SS being a (shortest) path between them (which includes both u,vu,v). All edges have unit lengths so |S|=d(u,v)+1|S|=d(u,v)+1; moreover, |M(U)S|1|M(U)\cap S|\leq 1. ∎

5.1.1 Analysis for Trees (Theorem 1.4(i))

Lemma 5.5 (Small Steiner Tree).

If ρ=0\rho=0 then |Cρ|=1|C_{\rho}|=1 else |Cρ|O(Δ2ρ)|C_{\rho}|\leq O(\Delta\cdot 2^{\rho}).

Proof.

If ρ=0\rho=0, then SρS_{\rho} contains all nodes with φ(v)=0\varphi(v)=0; there can be only one such node. Else if |Sρ|1|S_{\rho}|\leq 1 then |Cρ|12ρ|C_{\rho}|\leq 1\leq 2^{\rho}, so assume that |Sρ|>1|S_{\rho}|>1 and let u1,u2:=argmaxu,vSρ{d(u,v)}u_{1},u_{2}:=\arg\max_{u,v\in S_{\rho}}\{d(u,v)\} be a farthest pair of nodes in SρS_{\rho}. Consider path pp from u1u_{1} to u2u_{2}: if all nodes wpw\in p have d(w,u1)d(w,u2)d(w,u_{1})\neq d(w,u_{2}), then the midpoint set |M({u1,u2})|=0|M(\{u_{1},u_{2}\})|=0, so Lemma 5.3 says |Cρ|φ(u1)+φ(u2)2×2ρ=2ρ+1|C_{\rho}|\leq\varphi(u_{1})+\varphi(u_{2})\leq 2\times 2^{\rho}=2^{\rho+1}, giving the proof. Hence, let’s consider the case where there exists wpw\in p with d(w,u1)=d(w,u2)d(w,u_{1})=d(w,u_{2}).

Let ww’s neighbors in CρC_{\rho} be q1,,qkq_{1},\ldots,q_{k} for some kΔk\leq\Delta. If we delete ww and its incident edges, let Cρ,iC_{\rho,i} be the subtree of CρC_{\rho} containing qiq_{i}; suppose that u1Cρ,1u_{1}\in C_{\rho,1} and u2Cρ,2u_{2}\in C_{\rho,2}. Choose any arbitrary vertex ui(Cρ,iSρ)u_{i}\in(C_{\rho,i}\cap S_{\rho}); such a vertex exists because CρC_{\rho} is a min-length Steiner tree connecting SρS_{\rho}. Let U:={u1,,uk}U:=\{u_{1},\ldots,u_{k}\}.

Consider any node xwx\neq w in CρC_{\rho}: this means xCρ,jx\in C_{\rho,j} for some jj. Choose i{1,2}i\in\{1,2\} such that iji\neq j. By the tree properties, d(x,ui)=d(x,w)+d(w,ui)d(x,u_{i})=d(x,w)+d(w,u_{i}). Moreover, we have d(ui,u2i)d(uj,u2i)d(u_{i},u_{2-i})\geq d(u_{j},u_{2-i}) by our choice of {u1,u2}\{u_{1},u_{2}\}, so d(w,ui)d(w,uj)d(w,u_{i})\geq d(w,u_{j}). This means

d(x,ui)=d(x,w)+d(w,ui)d(x,w)+d(w,uj)=d(x,qj)+d(uj,qj)+2>d(x,uj),d(x,u_{i})=d(x,w)+d(w,u_{i})\geq d(x,w)+d(w,u_{j})=d(x,q_{j})+d(u_{j},q_{j})+2>d(x,u_{j}),

which means xM(U)x\notin M(U). In summary, M(U)={w}M(U)=\{w\} or |M(U)|=0|M(U)|=0, so applying Lemma 5.3 in either case gives

|Cρ||CρM(U)|+1i=1kφ(ui)+1Δ(2ρ+1).|C_{\rho}|\leq|C_{\rho}\setminus M(U)|+1\leq\sum_{i=1}^{k}\varphi(u_{i})+1\leq\Delta\cdot(2^{\rho}+1).\qed
Lemma 5.6 (Small Cost for Transitions).

Consider the first round ρ0\rho_{0} such that rρ0rr_{\rho_{0}}\neq r, then d(r,rρ0)d(r,g)+||+2ρ0𝟏(ρ0>0)d(r,r_{\rho_{0}})\leq d(r,g)+|\mathcal{E}|+2^{\rho_{0}}\mathbf{1}_{({\rho_{0}}>0)}. For each subsequent round ρ>ρ0\rho>\rho_{0}, d(rρ1,rρ)2ρ+1d(r_{\rho-1},r_{\rho})\leq 2^{\rho+1}.

Proof.

If the first transition happens in round ρ0{\rho_{0}}, its cost is

d(r,rρ0)d(r,g)+d(g,rρ0)d(r,g)+φ(g)+φ(rρ0)d(r,g)+||+2ρ0𝟏(ρ0>0),d(r,r_{\rho_{0}})\leq d(r,g)+d(g,r_{\rho_{0}})\leq d(r,g)+\varphi(g)+\varphi(r_{\rho_{0}})\leq d(r,g)+|\mathcal{E}|+2^{\rho_{0}}\mathbf{1}_{({\rho_{0}}>0)},

where we used Corollary 5.4 for the second inequality. For all other transitions, Corollary 5.4 again gives d(rρ1,rρ)φ(rρ1)+φ(rρ)2ρ1+2ρ2ρ+1d(r_{\rho-1},r_{\rho})\leq\varphi(r_{\rho-1})+\varphi(r_{\rho})\leq 2^{\rho-1}+2^{\rho}\leq 2^{\rho+1}. ∎

Proof of Theorem 1.4(i).

Suppose gg belongs to SρS_{\rho}, then ||2ρ1𝟏ρ>0|\mathcal{E}|\geq 2^{\rho-1}\cdot\mathbf{1}_{\rho>0}. But now the cost over all the transitions is at most d(r,g)+||+O(2ρ)𝟏ρ>0d(r,g)+|\mathcal{E}|+O(2^{\rho})\cdot\mathbf{1}_{\rho>0} by summing the results of Lemma 5.6. The cost of the Euler tours are at most sρ2(|Cs|1)\sum_{s\leq\rho}2(|C_{s}|-1) by Lemma 5.5, which gives at most O(Δ2ρ)𝟏ρ>0O(\Delta\cdot 2^{\rho})\cdot\mathbf{1}_{\rho>0}. Combining these proves the theorem. ∎

5.2 Analysis for Bounded Doubling Dimension (Theorem 1.4(ii))

For a graph G=(V,E)G=(V,E) with doubling dimension α\alpha, and unit-length edges, we consider running LABEL:alg:_search_according_tophi, as for the tree case. We merely replace Lemma 5.5 by the following lemma, and the rest of the proof is the same as the proof of the tree case:

u\displaystyle u^{*}v\displaystyle v^{*}c\displaystyle cB(c)\displaystyle B(c)
Figure 4: Let u,vu^{*},v^{*} be the diameter of set SρS_{\rho} (i.e, u,v=argmaxu,vSρd(u,v)u^{*},v^{*}=\text{argmax}_{u,v\in S_{\rho}}d(u,v)). cc is any node in NN and B(c)B(c) is its neighbor. We show in Claim 5.8 that the size of B(c)B(c) is O(2ρ)O(2^{\rho}).
Lemma 5.7.

The total length of the tree CρC_{\rho} is at most 2O(α)22ρ2^{O(\alpha)}\cdot 2^{2\rho}.

Proof.

If |Sρ|1|S_{\rho}|\leq 1, then |Cρ|1|C_{\rho}|\leq 1. Hence next we assume that |Sρ|2|S_{\rho}|\geq 2. Define R:=maxu,vSρd(u,v)R:=\max_{u,v\in S_{\rho}}d(u,v), and let u,vSρu^{*},v^{*}\in S_{\rho} be some points at mutual distance RR. Let NN be an R/8R/8-net of SρS_{\rho}. (An ε\varepsilon-net NN for a set SS satisfies the properties (a) d(x,y)εd(x,y)\geq\varepsilon for all x,yNx,y\in N, and (b) for all sSs\in S there exists xNx\in N such that d(x,s)εd(x,s)\leq\varepsilon.) Since the metric has doubling dimension α\alpha, it follows that |N|(RR/8)O(α)=2O(α)|N|\leq(\frac{R}{R/8})^{O(\alpha)}=2^{O(\alpha)} [GKL03]. Let each point in SρS_{\rho} choose a closest net point (breaking ties arbitrarily), and let B(c)SρB(c)\subseteq S_{\rho} be the points that chose cNc\in N as their closest net point (see Figure 4 for a sketch).

Claim 5.8.

For each net point cNc\in N, we have |B(c)|O(2ρ)|B(c)|\leq O(2^{\rho}).

Proof.

Because d(v,c)+d(u,c)d(u,v)=Rd(v^{*},c)+d(u^{*},c)\geq d(u^{*},v^{*})=R, hence without loss of generality we assume d(v,c)R/2d(v^{*},c)\geq R/2. For any point wB(c)w\in B(c), d(w,v)d(v,c)d(c,w)R/2R/8>R/8d(w,c)d(w,v^{*})\geq d(v^{*},c)-d(c,w)\geq R/2-R/8>R/8\geq d(w,c). Hence ww is not in M({c,v})M(\{c,v^{*}\}). Hence by Lemma 5.3,

2ρ+1φ(c)+φ(v)|SρM({v,c})||B(c)|.2^{\rho+1}\geq\varphi(c)+\varphi(v^{*})\geq|S_{\rho}\setminus M(\{v^{*},c\})|\geq|B(c)|.\qed

There are 2O(α)2^{O(\alpha)} net points, so |Sρ|2O(α)2ρ|S_{\rho}|\leq 2^{O(\alpha)}\cdot 2^{\rho}. Finally, LABEL:cor:distance_less_than_phi holds for general unit-edge-length graphs, so the cost of connecting any two nodes in SρS_{\rho} is at most 2ρ2^{\rho}, and therefore |Cρ|2O(α)22ρ|C_{\rho}|\leq 2^{O(\alpha)}\cdot 2^{2\rho}. ∎

Using Lemma 5.7 instead of LABEL:lemma:full-info_C_bound in the proof of Theorem 1.4(i) gives the claimed bound of 2O(α)||22^{O(\alpha)}\cdot|\mathcal{E}|^{2}, and completes the proof of Theorem 1.4(ii).

5.3 Analysis for Bounded Doubling Dimension: Integer Lengths

In this part, we further generalize the proof above to the case when the edges can have positive integer lengths. Consider an graph G=(V,E)G=(V,E) with doubling dimension α\alpha and general (positive integer) edge lengths. Define the 1\ell_{1} analog of the implied-error function to be:

φ1(v):=uV|f(u)d(u,v)|.\varphi_{1}(v):=\sum_{u\in V}|f(u)-d(u,v)|.

Since we are in the full-information case, we can compute the φ1\varphi_{1} value for each node. Observe that φ1(g)\varphi_{1}(g) is the 1\ell_{1}-error; we prove the following guarantee.

Theorem 5.9.

For graph exploration on arbitrary graphs with positive integer edge lengths, the analog of Algorithm 3 that uses φ1\varphi_{1} instead of φ\varphi, incurs a cost d(r,g)+2O(α)O(φ1(g))d(r,g)+2^{O(\alpha)}\cdot O(\varphi_{1}(g)).

The proof is almost the same as that for the unit length case. We merely replace Corollary 5.4 and Claim 5.8 by the following two lemmas.

Lemma 5.10.

For any two vertices u,vu,v, their distance d(u,v)1/2(φ1(u)+φ1(v))d(u,v)\leq\nicefrac{{1}}{{2}}(\varphi_{1}(u)+\varphi_{1}(v)).

Proof.

By definition of φ1\varphi_{1} we have φ1(u)+φ1(v)|f(u)|+|f(v)d(u,v)|+|f(u)d(u,v)|+|f(v)|2d(u,v)\varphi_{1}(u)+\varphi_{1}(v)\geq|f(u)|+|f(v)-d(u,v)|+|f(u)-d(u,v)|+|f(v)|\geq 2d(u,v). ∎

Claim 5.11.

For each net point cNc\in N, we have vB(c)d(v,u)O(2ρ)\sum_{v\in B(c)}d(v,u^{*})\leq O(2^{\rho}).

Proof.

Let ww be the node among u,vu^{*},v^{*} that is further from cc; by the triangle inequality, d(c,w)R/2d(c,w)\geq R/2. By the properties of the net, d(v,c)R/8d(v,c)\leq R/8. Again using the triangle inequality, d(v,w)3R/8d(v,w)\geq 3R/8. Hence

φ1(w)+φ1(c)vB(c)(|f(v)d(v,w)|+|f(v)d(v,c)|)|B(c)|(3R/8R/8).\varphi_{1}(w)+\varphi_{1}(c)\geq\sum_{v\in B(c)}\big{(}|f(v)-d(v,w)|+|f(v)-d(v,c)|\big{)}\geq|B(c)|\cdot(\nicefrac{{3R}}{{8}}-\nicefrac{{R}}{{8}}).

Since both w,cSρw,c\in S_{\rho}, this implies that

|B(c)|R4(φ1(w)+φ1(c))O(2ρ).|B(c)|\cdot R\leq 4(\varphi_{1}(w)+\varphi_{1}(c))\leq O(2^{\rho}).

Finally, we use that d(v,u)Rd(v,u^{*})\leq R by our choice of RR to complete the proof. ∎

Now to prove Theorem 5.9, we mimic the proof of Theorem 1.4(ii), just substituting Lemma 5.10 and Claim 5.11 instead of LABEL:cor:distance_less_than_phi and Claim 5.8.

6 Closing Remarks

In this paper we study a framework for graph exploration problems with predictions: as the graph is explored, each newly observed node gives a prediction of its distance to the goal. While graph searching is a well-explored area, and previous works have also studied models where nodes give directional/gradient information (“which neighbors are better”), such distance-based predictions have not been previously studied, to the best of our knowledge. We give algorithms for exploration on trees, where the total distance traveled by the agent has a relatively benign dependence on the number of erroneous nodes. We then show results for the planning version of the problem, which gives us hope that our exploration results may be extendible to broader families of graphs. This is the first, and most natural open direction.

Another intriguing direction is to reduce the space complexity of our algorithms, which would allow us to use them on very large implicitly defined graphs (say computation graphs for large dynamic programming problems, say those arising from reinforcement learning problems, or from branch-and-bound computation trees). Can we give time-space tradeoffs? Can we extend our results to multiple agents? A more open-ended direction is to consider other forms of quantitative hints for graph searching, beyond distance estimates (studied in this paper) and gradient information (studied in previous works).

References

  • [AG03] Steve Alpern and Shmuel Gal. The theory of search games and rendezvous, volume 55 of International series in operations research and management science. Kluwer, 2003.
  • [AGKK20] Antonios Antoniadis, Themis Gouleakis, Pieter Kleer, and Pavel Kolev. Secretary and online matching problems with machine learned advice. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, NeurIPS 2020, 2020.
  • [BCKP20] Aditya Bhaskara, Ashok Cutkosky, Ravi Kumar, and Manish Purohit. Online learning with imperfect hints. In International Conference on Machine Learning, pages 822–831. PMLR, 2020.
  • [BCR22] Sébastien Bubeck, Christian Coester, and Yuval Rabani. Shortest paths without a map, but with an entropic regularizer, 2022.
  • [BFKR21] Lucas Boczkowski, Uriel Feige, Amos Korman, and Yoav Rodeh. Navigating in trees with permanently noisy advice. ACM Trans. Algorithms, 17(2):15:1–15:27, 2021.
  • [BMRS20] Étienne Bamas, Andreas Maggiori, Lars Rohwedder, and Ola Svensson. Learning augmented energy minimization via speed scaling. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, NeurIPS 2020, 2020.
  • [BRS97] Avrim Blum, Prabhakar Raghavan, and Baruch Schieber. Navigating in unfamiliar geometric terrain. SIAM J. Comput., 26(1):110–137, 1997.
  • [Bur96] William R. Burley. Traversing layered graphs using the work function algorithm. J. Algorithms, 20(3):479–511, 1996.
  • [BYCR93] R.A. Baeza-Yates, J.C. Culberson, and G.J.E. Rawlins. Searching in the plane. Information and Computation, 106(2):234–252, 1993.
  • [DKP98] Xiaotie Deng, Tiko Kameda, and Christos H. Papadimitriou. How to learn an unknown environment I: the rectilinear case. J. ACM, 45(2):215–245, 1998.
  • [DLLV21] Paul Dütting, Silvio Lattanzi, Renato Paes Leme, and Sergei Vassilvitskii. Secretaries with advice. In Péter Biró, Shuchi Chawla, and Federico Echenique, editors, EC ’21: The 22nd ACM Conference on Economics and Computation, Budapest, Hungary, July 18-23, 2021, pages 409–429. ACM, 2021.
  • [DMS19] Argyrios Deligkas, George B. Mertzios, and Paul G. Spirakis. Binary search in graphs revisited. Algorithmica, 81(5):1757–1780, 2019.
  • [DP99] Xiaotie Deng and Christos H Papadimitriou. Exploring an unknown graph. Journal of Graph Theory, 32(3):265–297, 1999.
  • [DTUW19] Dariusz Dereniowski, Stefan Tiegel, Przemyslaw Uznanski, and Daniel Wolleb-Graf. A framework for searching in graphs in the presence of errors. In Jeremy T. Fineman and Michael Mitzenmacher, editors, 2nd Symposium on Simplicity in Algorithms, SOSA 2019, January 8-9, 2019, San Diego, CA, USA, volume 69 of OASIcs, pages 4:1–4:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019.
  • [EKS16] Ehsan Emamjomeh-Zadeh, David Kempe, and Vikrant Singhal. Deterministic and probabilistic binary search in graphs. In Daniel Wichs and Yishay Mansour, editors, Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 519–532. ACM, 2016.
  • [FFK+98] Amos Fiat, Dean P. Foster, Howard J. Karloff, Yuval Rabani, Yiftach Ravid, and Sundar Vishwanathan. Competitive algorithms for layered graph traversal. SIAM J. Comput., 28(2):447–462, 1998.
  • [FRPU94] Uriel Feige, Prabhakar Raghavan, David Peleg, and Eli Upfal. Computing with noisy information. SIAM J. Comput., 23(5):1001–1018, 1994.
  • [Gal80] Shmuel Gal. Search games, volume 149 of Mathematics in Science and Engineering. Academic Press, Inc. [Harcourt Brace Jovanovich, Publishers], New York-London, 1980.
  • [GH05] Andrew V. Goldberg and Chris Harrelson. Computing the shortest path: A search meets graph theory. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2005, Vancouver, British Columbia, Canada, January 23-25, 2005, pages 156–165. SIAM, 2005.
  • [GKL03] Anupam Gupta, Robert Krauthgamer, and James R. Lee. Bounded geometries, fractals, and low-distortion embeddings. In 44th Symposium on Foundations of Computer Science (FOCS 2003), 11-14 October 2003, Cambridge, MA, USA, Proceedings, pages 534–543. IEEE Computer Society, 2003.
  • [HIKV19] Chen-Yu Hsu, Piotr Indyk, Dina Katabi, and Ali Vakilian. Learning-based frequency estimation algorithms. In International Conference on Learning Representations, 2019.
  • [IMTMR20] Piotr Indyk, Frederik Mallmann-Trenn, Slobodan Mitrović, and Ronitt Rubinfeld. Online page migration with ml advice. arXiv preprint arXiv:2006.05028, 2020.
  • [Jor69] Camille Jordan. Sur les assemblages de lignes. J. Reine Angew. Math., 70:185–190, 1869.
  • [JS01] Patrick Jaillet and Matthew Stafford. Online searching. Oper. Res., 49(4):501–515, 2001.
  • [JSG02] Patrick Jaillet, Matthew Stafford, and Shmuel Gal. Note: Online searching / on the optimality of the geometric sequences for the m ray search online searching. Oper. Res., 50(4):744–745, 2002.
  • [KMSY98] Ming-Yang Kao, Yuan Ma, Michael Sipser, and Yiqun Lisa Yin. Optimal constructions of hybrid algorithms. J. Algorithms, 29(1):142–164, 1998.
  • [KP93] Bala Kalyanasundaram and Kirk Pruhs. A competitive analysis of algorithms for searching unknown scenes. Computational Geometry, 3(3):139–155, 1993.
  • [KP94] Bala Kalyanasundaram and Kirk R Pruhs. Constructing competitive tours from local information. Theoretical Computer Science, 130(1):125–138, 1994.
  • [KRR94] Howard J. Karloff, Yuval Rabani, and Yiftach Ravid. Lower bounds for randomized k-server and motion-planning algorithms. SIAM J. Comput., 23(2):293–312, 1994.
  • [KRT96] Ming-Yang Kao, John H. Reif, and Stephen R. Tate. Searching in an unknown environment: An optimal randomized algorithm for the cow-path problem. Inf. Comput., 131(1):63–79, 1996.
  • [KSW86] Richard M. Karp, Michael E. Saks, and Avi Wigderson. On a search problem related to branch-and-bound procedures. In 27th Annual Symposium on Foundations of Computer Science, Toronto, Canada, 27-29 October 1986, pages 19–28. IEEE Computer Society, 1986.
  • [KZ93] Richard M. Karp and Yanjun Zhang. Randomized parallel algorithms for backtrack search and branch-and-bound computation. J. ACM, 40(3):765–789, 1993.
  • [LLMV20] Silvio Lattanzi, Thomas Lavastida, Benjamin Moseley, and Sergei Vassilvitskii. Online scheduling via learned weights. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1859–1877. SIAM, 2020.
  • [LMRX20] Thomas Lavastida, Benjamin Moseley, R. Ravi, and Chenyang Xu. Learnable and instance-robust predictions for online matching, flows and load balancing, 2020.
  • [Mit18] Michael Mitzenmacher. A model for learned bloom filters, and optimizing by sandwiching. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 462–471, 2018.
  • [Mit20] Michael Mitzenmacher. Scheduling with predictions and the price of misprediction. In 11th Innovations in Theoretical Computer Science Conference (ITCS 2020). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020.
  • [MMS12] Nicole Megow, Kurt Mehlhorn, and Pascal Schweitzer. Online graph exploration: New results on old and new algorithms. Theoretical Computer Science, 463:62–72, 2012.
  • [MNS07] Mohammad Mahdian, Hamid Nazerzadeh, and Amin Saberi. Allocating online advertisement space with unreliable estimates. In Jeffrey K. MacKie-Mason, David C. Parkes, and Paul Resnick, editors, Proceedings 8th ACM Conference on Electronic Commerce (EC-2007), San Diego, California, USA, June 11-15, 2007, pages 288–294. ACM, 2007.
  • [MOW08] Shay Mozes, Krzysztof Onak, and Oren Weimann. Finding an optimal tree searching strategy in linear time. In Shang-Hua Teng, editor, Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008, pages 1096–1105. SIAM, 2008.
  • [MV17] Andrés Muñoz Medina and Sergei Vassilvitskii. Revenue optimization with approximate bid predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 1856–1864, 2017.
  • [OP06] Krzysztof Onak and Pawel Parys. Generalization of binary search: Searching in trees and forest-like partial orders. In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), 21-24 October 2006, Berkeley, California, USA, Proceedings, pages 379–388. IEEE Computer Society, 2006.
  • [PSK18] Manish Purohit, Zoya Svitkina, and Ravi Kumar. Improving online algorithms via ML predictions. In Advances in Neural Information Processing Systems, pages 9661–9670, 2018.
  • [PY91] Christos H. Papadimitriou and Mihalis Yannakakis. Shortest paths without a map. Theoretical Computer Science, 84(1):127–150, 1991.
  • [Ram95] Hariharan Ramesh. On traversing layered graphs on-line. J. Algorithms, 18(3):480–512, 1995.

7 Further Discussion

7.1 0\ell_{0}-versus-1\ell_{1} Error in Suggestions

Most of the paper deals with 0\ell_{0} error: namely, we relate our costs to |||\mathcal{E}|, the number of vertices that give incorrect predictions of their distance to the goal. Another reasonable notion of error is the 1\ell_{1} error: v|f(v)d(v,g)|\sum_{v}|f(v)-d(v,g)|.

For the case of integer edge-lengths and integer predictions, both of which we assume in this paper, it is immediate that the 0\ell_{0}-error is at most the 1\ell_{1}-error: if vv is erroneous then the former counts 11 and the latter at least 11. If we are given integer edge-lengths but fractional predictions, we can round the predictions to the closest integer to get integer-valued predictions ff^{\prime}, and then run our algorithms on ff^{\prime}. Any prediction that is incorrect in ff^{\prime} must have incurred an 1\ell_{1}-error of at least 1/2\nicefrac{{1}}{{2}} in ff. Hence all our results parameterized by the 0\ell_{0} error imply results parameterized with the 1\ell_{1} error as well.

7.2 Extending to General Edge-Lengths

A natural question is whether a guarantee like the one proved in Theorem 1.1 can be shown for trees with general integer weights: let us see why such a result is not possible.

  1. 1.

    The first observation is that the notion of error needs to be changed from 0\ell_{0} error something that is homogeneous in the distances, so that scaling distances by C>0C>0 would change the error term by CC as well. One such goal is to guarantee the total movement to be

    O(d(r,g)+ some function of the p error),O(d(r,g)+\text{ some function of the $\ell_{p}$ error}),

    where p\ell_{p}-error is (v|f(v)d(v,g)|p)1/p(\sum_{v}|f(v)-d(v,g)|^{p})^{1/p}.

  2. 2.

    Consider a complete binary tree of height hh, having 2h2^{h} leaves. Let all edges between internal nodes have length 0, and edges incident to leaves have length L1L\gg 1. The goal is at one of the leaves. Let all internal nodes have f(v)=Lf(v)=L, and let all leaves have prediction 2L2L. Hence the total p\ell_{p} error is 2L2L, whereas any algorithm would have to explore half the leaves in expectation to find the goal; this would cost Θ(2hL)\Theta(2^{h}\cdot L), which is unbounded as hh gets large.

  3. 3.

    The problem is that zero-length edges allow us to simulate arbitrarily large degrees. Moreover, the same argument can be simulated by changing zero-length edges to unit-length edges; the essential idea remains the same. and setting f(v)f(v) for each node vv to be LL plus its distance to the root. Setting L2hL\geq 2^{h} gives the total p\ell_{p} error to be O(L+2h)O(L+2^{h}), whereas any algorithm would incur cost at least L2h\approx L\cdot 2^{h}.

This suggests that the right extension to general edge-lengths requires us to go beyond just parameterizing our results with the maximum degree Δ\Delta; this motivates our study of graphs with bounded doubling dimension in §5.

7.3 Gradient Information

Consider the information model where the agent gets to see gradient information: each edge is imagined to be oriented towards the endpoint with lower distance to the goal. The agent can see some noisy version of these directions, and the error is the number of edges with incorrect directions. We now show an example where both the optimal distance and the error are DD, but any algorithm must incur cost Ω(2D)\Omega(2^{D}). Indeed, take a complete binary tree of depth DD, with the goal at one of the leaves. Suppose the agent sees all edges being directed towards the root. The only erroneous edges are the DD edges on the root-goal path. But any algorithm must suffer cost Ω(2D)\Omega(2^{D}).