Let P be a set of n points in ℝd. We present a linear-size data structure for answering range queries on P with constant-complexity semialgebraic sets as ranges, in time close to O(n11/d). It essentially matches the performance of similar structures for simplex range searching, and, for d ≥ 5, significantly improves earlier solutions by the first two authors obtained in 1994. This almost settles a long-standing open problem in range searching. The data structure is based on a partitioning technique of Guth and Katz [On the Erdos distinct distances problem in the plane, arXiv:1011.4105, 2010], which shows that for a parameter r, 1 < r ≤ n, there exists a d-variate polynomial f of degree O(r1/d) such that each connected component of ℝd \ Z(f) contains at most n/r points of P, where Z(f) is the zero set of f. We present an efficient randomized algorithm for computing such a polynomial partition, which is of independent interest and is likely to have additional applications.
- Cylindrical algebraic decomposition
- Ham-sandwich cuts
- Polynomial partitions
- Range searching