Given a function $f$ from the set $[N]$ to a $d$-dimensional integer grid, we consider data structures that allow efficient orthogonal range searching queries in the image of $f$, without explicitly storing it. We show that, if $f$ is of the form $[N]\to [2^{w}]^d$ for some $w=\mathrm{polylog} (N)$ and is computable in constant time, then, for any $0<\alpha <1$, we can obtain a data structure using $\tilde {O}(N^{1-\alpha / 3})$ words of space such that, for a given $d$-dimensional axis-aligned box $B$, we can search for some $x\in [N]$ such that $f(x) \in B$ in time $\tilde{O}(N^{\alpha})$. This result is obtained simply by combining integer range searching with the Fiat-Naor function inversion scheme, which was already used in data-structure problems previously. We further obtain - data structures for range counting and reporting, predecessor, selection, ranking queries, and combinations thereof, on the set $f([N])$, - data structures for preimage size and preimage selection queries for a given value of $f$, and - data structures for selection and ranking queries on geometric quantities computed from tuples of points in $d$-space. These results unify and generalize previously known results on 3SUM-indexing and string searching, and are widely applicable as a black box to a variety of problems. In particular, we give a data structure for a generalized version of gapped string indexing, and show how to preprocess a set of points on an integer grid in order to efficiently compute (in sublinear time), for points contained in a given axis-aligned box, their Theil-Sen estimator, the $k$th largest area triangle, or the induced hyperplane that is the $k$th furthest from the origin.
翻译:给定一个从集合 $[N]$ 到 $d$ 维整数网格的函数 $f$,我们考虑在无需显式存储 $f$ 像集的情况下,支持高效正交范围查询的数据结构。我们证明,若 $f$ 形如 $[N]\to [2^{w}]^d$,其中 $w=\mathrm{polylog} (N)$ 且可在常数时间内计算,则对任意 $0<\alpha <1$,我们可以构造一个使用 $\tilde {O}(N^{1-\alpha / 3})$ 字空间的数据结构,使得对于给定的 $d$ 维轴对齐盒子 $B$,能在 $\tilde{O}(N^{\alpha})$ 时间内搜索到某个满足 $f(x) \in B$ 的 $x\in [N]$。这一结果仅通过将整数范围搜索与Fiat-Naor函数反演方案相结合即可得到,而该方案此前已被用于数据结构问题中。我们进一步得到:
- 针对集合 $f([N])$ 的范围计数与报告、前驱、选择、排名查询及其组合的数据结构,
- 针对给定 $f$ 值的原像大小和原像选择查询的数据结构,
- 针对基于 $d$ 维空间中点元组计算的几何量的选择与排名查询的数据结构。
这些结果统一并推广了先前关于3SUM索引和字符串搜索的已知结论,可作为黑盒广泛适用于多种问题。特别地,我们给出了间隙字符串索引广义版本的数据结构,并展示了如何预处理整数网格上的点集,以便在亚线性时间内,对给定轴对齐盒子内包含的点高效计算:其Theil-Sen估计量、第 $k$ 大面积三角形,或距离原点第 $k$ 远的诱导超平面。