English

On multidimensional generalization of binary search

Data Structures and Algorithms 2024-04-23 v1 Discrete Mathematics Combinatorics

Abstract

This work generalizes the binary search problem to a dd-dimensional domain S1××SdS_1\times\cdots\times S_d, where Si={0,1,,ni1}S_i=\{0, 1, \ldots,n_i-1\} and d1d\geq 1, in the following way. Given (t1,,td)(t_1,\ldots,t_d), the target element to be found, the result of a comparison of a selected element (x1,,xd)(x_1,\ldots,x_d) is the sequence of inequalities each stating that either ti<xit_i < x_i or ti>xit_i>x_i, for i{1,,d}i\in\{1,\ldots,d\}, for which at least one is correct, and the algorithm does not know the coordinate ii on which the correct direction to the target is given. Among other cases, we show asymptotically almost matching lower and upper bounds of the query complexity to be in Ω(nd1/d)\Omega(n^{d-1}/d) and O(nd)O(n^d) for the case of ni=nn_i=n. In particular, for fixed dd these bounds asymptotically do match. This problem is equivalent to the classical binary search in case of one dimension and shows interesting differences for higher dimensions. For example, if one would impose that each of the dd inequalities is correct, then the search can be completed in log2max{n1,,nd}\log_2\max\{n_1,\ldots,n_d\} queries. In an intermediate model when the algorithm knows which one of the inequalities is correct the sufficient number of queries is log2(n1nd)\log_2(n_1\cdot\ldots\cdot n_d). The latter follows from a graph search model proposed by Emamjomeh-Zadeh et al. [STOC 2016].

Keywords

Cite

@article{arxiv.2404.13193,
  title  = {On multidimensional generalization of binary search},
  author = {Dariusz Dereniowski and Przemysław Gordinowicz and Karolina Wróbel},
  journal= {arXiv preprint arXiv:2404.13193},
  year   = {2024}
}
R2 v1 2026-06-28T16:00:24.462Z