# Further Results on Colored Range Searching

arXiv: https://arxiv.org/abs/2003.11604 · HTML: https://mlsanity.com/paper/2003.11604/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 25 Mar 2020.

## Built on by (most cited first, 1 of 1)

- [Yes, we CANN: Constrained Approximate Nearest Neighbors for local feature-based visual localization](https://mlsanity.com/paper/2306.09012/) (2023)

## Abstract (arXiv)

We present a number of new results about range searching for colored (or "categorical") data: 1. For a set of n colored points in three dimensions, we describe randomized data structures with O(nmathoprm polylogn) space that can report the distinct colors in any query orthogonal range (axis-aligned box) in O(kmathoprm polyloglog n) expected time, where k is the number of distinct colors in the range, assuming that coordinates are in 1,ldots,n. Previous data structures require O(fraclog nloglog n + k) query time. Our result also implies improvements in higher constant dimensions. 2. Our data structures can be adapted to halfspace ranges in three dimensions (or circular ranges in two dimensions), achieving O(klog n) expected query time. Previous data structures require O(klog2n) query time. 3. For a set of n colored points in two dimensions, we describe a data structure with O(nmathoprm polylogn) space that can answer colored "type-2" range counting queries: report the number of occurrences of every distinct color in a query orthogonal range. The query time is O(fraclog nloglog n + kloglog n), where k is the number of distinct colors in the range. Naively performing k uncolored range counting queries would require O(kfraclog nloglog n) time. Our data structures are designed using a variety of techniques, including colored variants of randomized incremental construction (which may be of independent interest), colored variants of shallow cuttings, and bit-packing tricks.
