Abstract
Let \(\mathcal {D}\) be a set of n elements \(e_1,\ldots , e_n\) drawn from a commutative semigroup. Given two integers x, y satisfying \(1 \le x \le y \le n\), a range sum query returns the sum of the \(y-x+1\) elements \(e_x\), \(e_{x+1}\),..., \(e_y\). The goal of indexing is to store \(\mathcal {D}\) in a data structure so that all such queries can be answered efficiently in the worst case. This paper proves a new lower bound in the semigroup model on the tradeoff between space and query time for the above problem. We show that, if the query time needs to be at most an integer t, a structure must use
space. The bound is asymptotically tight for every \(t \ge 2\), and is matched by an existing structure. Previously, the best lower bounds either had a substantially smaller non-linear factor (Yao in Space-time tradeoff for answering range queries (extended abstract). In: STOC, pp. 128–136, 1982), or were tight only for constant t (Alon and Schieber in Optimal preprocessing for answering on-line product queries. Technical Report TR 71/87, Tel-Aviv University, 1987). Our lower bound is asymptotically tight bidirectionally, namely, it also answers the following question: if the space needs to be bounded by an integer m, what is the best query time achievable? The techniques behind our lower bound are drastically different from those of Yao (Space-time tradeoff for answering range queries (extended abstract). In: STOC, pp. 128–136, 1982) and Alon and Schieber (Optimal preprocessing for answering on-line product queries. Technical Report TR 71/87, Tel-Aviv University, 1987), and reveal new insight on the characteristics of the problem.
Similar content being viewed by others
Notes
The constant factor 256 is chosen to simplify the proof. Shrinking its value is possible but out of the scope of this paper.
The last \(n - g\lambda \) positions are not in any chunk if n does not divide \(\lambda \).
References
Alon, N., Schieber, B.: Optimal preprocessing for answeringon-line product queries. Technical Report TR 71/87, Tel-AvivUniversity (1987)
Arya, S., Mount, D.M., Xia, J.: Tight lower bounds for halfspace range searching. Discrete Comput. Geom. 47(4), 711–730 (2012)
Chan, T.M.: Optimal partition trees. Discrete Comput. Geom. 47(4), 661–690 (2012)
Chazelle, B.: Lower bounds for orthogonal range searching II. The arithmetic model. JACM 37(3), 439–463 (1990)
Fredman, M.L.: A lower bound on the complexity of orthogonal range queries. JACM 28(4), 696–705 (1981)
Hampapuram, H., Fredman, M.L.: Optimal biweighted binary trees and the complexity of maintaining partial sums. SIAM J. Comput. 28(1), 1–9 (1998)
Larsen, K.G.: On range searching in the group model and combinatorial discrepancy. SIAM J. Comput. 43(2), 673–686 (2014)
Larsen, K.G.: The cell probe complexity of dynamic range counting. In: Proceedings of ACM Symposium on Theory of Computing, pp. 85–94 (2012)
Matousek, J.: Range searching with efficient hiearchical cutting. Discrete Comput. Geom. 10, 157–182 (1993)
Patrascu, M.: Lower bounds for 2-dimensional range counting. In: Proceedings of ACM Symposium on Theory of Computing, pp. 40–46 (2007)
Yao, A.C.-C.: Space-time tradeoff for answering range queries (extended abstract). In: Proceedings of ACM Symposium on Theory of Computing, pp. 128–136 (1982)
Acknowledgements
Shuigeng Zhou was supported by the Key Projects of Fundamental Research Program of Shanghai Municipal Commission of Science and Technology under grant No. 14JC1400300.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Proof of Lemma 1
Let \(h = \alpha _{t+2}(n)\), which is at least 1. Our objective is to show \(\alpha _t^*(n) \in [h-2, h-1].\) It holds by definition that
We first show that \(\alpha _t^*(n) \le h - 1\). By expanding the recursive definition of \(A_{t+2}(h)\), we get
Therefore,
which implies that \(\alpha _t^*(n) \le h - 1\).
Now we show that \(\alpha _t^*(n) > h - 3\), which is trivial if \(h \le 2\). If \(h \ge 3\), by definition we have that
Therefore, \(\alpha _t^{(h-3)}(n) > 256\), which implies that \(\alpha _t^*(n) > h-3\).
Appendix 2: Proof of Lemma 5
When \(t = 2\) and \(t = 3\), the correctness of the lemma is straightforward. Assume \(t \ge 4\). It is easy to show that \(6l \le A_t(64l)\) for any \(l \ge 256\). Now consider the inequality in the lemma. For the left hand side, we have that
For the right hand side,
Therefore, it suffices to show that
which is true as long as \(t \ge 4\) and \(l \ge 256\).
Appendix 3: Proof of Lemma 9
For each integer \(t \ge 2\), define propositions p(t) and q(t) as follows:
It suffices to show that p(t) and q(t) are true for all \(t \ge 2\).
The following statements directly follow from the definitions of the two variants of the Ackermann functions:
-
\(\mathbf {A}(x, y)\) is non-descending with x and strictly ascending with y;
-
\(128x \le \mathbf {A}(8, x - 1) \le \mathbf {A}(4t + 8, x - 1)\), for all \(t \ge 2\);
-
p(2), q(2), p(3) and q(3) are true.
Assume inductively that p(t) and q(t) are true for some \(t \ge 2\). It suffices to prove \(p(t + 2)\) and \(q(t + 2)\). For \(p(t + 2)\), we have that
\(q(t + 2)\) can be proved analogously.
Rights and permissions
About this article
Cite this article
Hu, X., Tao, Y., Yang, Y. et al. Semi-Group Range Sum Revisited: Query-Space Lower Bound Tightened. Algorithmica 80, 1315–1329 (2018). https://doi.org/10.1007/s00453-017-0307-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-017-0307-3