Binary Search in Graphs Revisited

Argyrios Deligkas, George B. Mertzios, Paul G. Spirakis

Abstract

In the classical binary search in a path, the aim is to detect an unknown target by asking as few queries as possible, where each query reveals the direction to the target. This binary search algorithm has been recently extended to the problem of detecting a target in an arbitrary graph. Similarly to the classical case in the path, the algorithm maintains a candidates’ set for the target, while each query asks an appropriately chosen vertex—the “median”—which minimizes a potential $\Phi$ among the vertices of the candidates’ set. In this paper, we address three open questions: (a) detecting a target when the query response is a direction to an approximately shortest path to the target, (b) detecting a target when querying a vertex that is an approximate median of the current candidates’ set, and (c) detecting multiple targets. We resolve questions (a) and (b) by providing appropriate upper and lower bounds, as well as a new potential $\Gamma$ that guarantees efficient target detection even by querying an approximate median each time. With respect to (c), we initiate a systematic study for detecting two targets in graphs and identify sufficient conditions on the queries that allow for strong lower and upper bounds.

Introduction

Binary search is a cornerstone of computer science, traditionally used to locate an element in a sorted list by repeatedly halving the search space. In recent years, this concept has been generalized to arbitrary graphs. In this model, a query at a vertex $v$ returns the direction (an incident edge) toward a hidden target $x$. This paper, published in Algorithmica, revisits this problem to address critical gaps regarding the robustness and scalability of graph-based search algorithms under non-ideal conditions.

Robustness via the $\Gamma$ Potential

The efficiency of searching in graphs often relies on querying a "median" vertex—one that minimizes the sum of distances to all current candidate vertices. Previous work utilized a potential function $\Phi$ to track progress. However, the authors demonstrate that $\Phi$ is fragile: if one uses an approximate median instead of an exact one, the query complexity can degrade significantly.

To solve this, the researchers introduced a new potential function, $\Gamma$. Unlike $\Phi$, which considers global distances, $\Gamma$ focuses on the maximum size of the candidate set remaining after a query. This shift allows for efficient target detection ($O(\log n)$ queries) even when only approximate medians are available, providing a much-needed layer of robustness for practical implementations where exact medians are computationally expensive to calculate.

The Fragility of Approximate Shortest Paths

A surprising result of the study is the extreme sensitivity of graph search to errors in direction. The authors show that if the oracle provides a direction toward an approximately shortest path (even with a small additive error of 1), the search efficiency collapses. In certain graph structures, such as modified grids, an adversary can force the algorithm to perform $\Omega(n)$ queries, effectively turning a logarithmic search into a linear scan. This highlights a fundamental difference between exact and approximate shortest-path oracles; even minor "noise" in the direction can make the problem exponentially harder.

Searching for Multiple Targets

The paper also initiates the first systematic study of detecting multiple targets in a graph. This scenario is significantly more complex because the oracle might point toward different targets at different times, creating a "noisy" feedback loop.

The authors identify that if the oracle is "unbiased"—meaning it has an equal probability of pointing to any target—deterministic search becomes inefficient. However, they provide a breakthrough for "biased" oracles. If the oracle favors one target over another, they demonstrate that the targets can be distinguished and located:

  • On Trees: Two targets can be found in $O(\log^2 n)$ queries.
  • General Graphs: Using a biased oracle, the second target can be found in $O(\Delta \log^2 n)$ queries, where $\Delta$ is the maximum degree of the graph.
  • Distance Information: If the oracle provides both direction and distance, the complexity for two targets drops to a polylogarithmic $O(\log^3 n)$.

Conclusion

This research provides a more resilient framework for graph-based searching. By introducing the $\Gamma$ potential, the authors have bridged the gap between theoretical "perfect" medians and the "approximate" medians used in real-world computing. While searching for multiple targets remains a challenge in high-degree graphs, the identified conditions for success pave the way for future optimizations in network diagnostics, database search, and distributed computing.

Summary updated

BibTeX
@inproceedings{deligkas2019binary,
  author = {Argyrios Deligkas and George B. Mertzios and Paul G. Spirakis},
  title = {{Binary Search in Graphs Revisited}},
  booktitle = {Algorithmica},
  year = {2019},
  url = {https://openreview.net/forum?id=RrdQKvMrnn},
}
Figure