Skip to main content
Log in

Semi-Group Range Sum Revisited: Query-Space Lower Bound Tightened

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Let \(\mathcal {D}\) be a set of n elements \(e_1,\ldots , e_n\) drawn from a commutative semigroup. Given two integers xy 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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

Notes

  1. The constant factor 256 is chosen to simplify the proof. Shrinking its value is possible but out of the scope of this paper.

  2. The last \(n - g\lambda \) positions are not in any chunk if n does not divide \(\lambda \).

References

  1. Alon, N., Schieber, B.: Optimal preprocessing for answeringon-line product queries. Technical Report TR 71/87, Tel-AvivUniversity (1987)

  2. Arya, S., Mount, D.M., Xia, J.: Tight lower bounds for halfspace range searching. Discrete Comput. Geom. 47(4), 711–730 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  3. Chan, T.M.: Optimal partition trees. Discrete Comput. Geom. 47(4), 661–690 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  4. Chazelle, B.: Lower bounds for orthogonal range searching II. The arithmetic model. JACM 37(3), 439–463 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  5. Fredman, M.L.: A lower bound on the complexity of orthogonal range queries. JACM 28(4), 696–705 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  6. Hampapuram, H., Fredman, M.L.: Optimal biweighted binary trees and the complexity of maintaining partial sums. SIAM J. Comput. 28(1), 1–9 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  7. Larsen, K.G.: On range searching in the group model and combinatorial discrepancy. SIAM J. Comput. 43(2), 673–686 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  8. Larsen, K.G.: The cell probe complexity of dynamic range counting. In: Proceedings of ACM Symposium on Theory of Computing, pp. 85–94 (2012)

  9. Matousek, J.: Range searching with efficient hiearchical cutting. Discrete Comput. Geom. 10, 157–182 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  10. Patrascu, M.: Lower bounds for 2-dimensional range counting. In: Proceedings of ACM Symposium on Theory of Computing, pp. 40–46 (2007)

  11. 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)

Download references

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

Authors

Corresponding author

Correspondence to Yufei Tao.

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

$$\begin{aligned} A_{t+2}(h - 1) < n \le A_{t+2}(h). \end{aligned}$$

We first show that \(\alpha _t^*(n) \le h - 1\). By expanding the recursive definition of \(A_{t+2}(h)\), we get

$$\begin{aligned} A_{t+2}(h) = A_t(A_{t+2}(h - 1)) = \cdots = A_t^{(h-1)}(A_{t+2}(1)) = A_t^{(h-1)}(256) \ge n. \end{aligned}$$

Therefore,

$$\begin{aligned} \alpha _t^{(h-1)}(n) \le \alpha _t^{(h-1)}\left( A_t^{(h-1)}(256)\right) = 256, \end{aligned}$$

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

$$\begin{aligned} A_t^{(h-3)}(\alpha _t^{(h-3)}(n)) \ge n> A_{t+2}(h - 1) = A_t^{(h-2)}(256) > A_t^{(h-3)}(256). \end{aligned}$$

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

$$\begin{aligned} 6l \cdot A_t(64l) \le (A_t(64l))^2 = 16^{\log _4 A_t(64l)} \le 16^{A_t(64l)}. \end{aligned}$$

For the right hand side,

$$\begin{aligned} A_t(A_t(l))= & {} A_{t-2}(A_t(A_t(l) - 1)) \ge A_2(A_t(A_t(l) - 1)) \\= & {} 16^{A_t(A_t(l) - 1) + 1} > 16^{A_t(A_t(l) - 1)}. \end{aligned}$$

Therefore, it suffices to show that

$$\begin{aligned} 16^{A_t(64l)} \le 16^{A_t(A_t(l) - 1)}\Leftarrow & {} A_t(64l) \le A_t(A_t(l) - 1) \\\Leftarrow & {} 64l \le A_t(l) - 1, \end{aligned}$$

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:

$$\begin{aligned} p(t):\hbox { for each integer } x \ge 8, A_t(64x) \le \mathbf {A}(4t, x)\\ q(t):\hbox { for each integer } x \ge 256, A_t(x) \le \mathbf {A}(4t, x). \end{aligned}$$

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

$$\begin{aligned} A_{t+2}(64x)= & {} A_t^{(64x - 1)}(256) \\\le & {} \underbrace{\mathbf {A}(4t, \mathbf {A}(4t, \ldots , \mathbf {A}(4t, 256)))}_{64x - 1 \text { instances of } \mathbf {A}} \\= & {} \mathbf {A}(4t + 1, 64x + 254) \\\le & {} \mathbf {A}(4t + 7, 128x) \\\le & {} \mathbf {A}(4t + 7, \mathbf {A}(4t + 8, x - 1)) \\= & {} \mathbf {A}(4t + 8, x). \end{aligned}$$

\(q(t + 2)\) can be proved analogously.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-017-0307-3

Keywords

Navigation