Computing partial sums in multidimensional arrays

Bernard Chazelle, Burton J Rosenberg

Research output: Chapter in Book/Report/Conference proceedingConference contribution

31 Citations (Scopus)

Abstract

The central theme of this paper is the complexity of the partial-sum problem: Given a d-dimensional array A with n entries in a semigroup and a d-rectangle q = [a1, b1] x. x [ad, bd], compute the sum o(A, q) = σ A[k1,..,kd.(k1 k1)Eq . This problem comes in two distinct flavors. In query mode, preprocessing is allowed and q is a query to be answered on-line. In &line mode, we are given the array A and a set of d-rectangles q1, . . . , qm, and we must compute the m sums a(A,qi). Partial-sum is a special case of the classical orthogonal range searching problem: Given n weighted points in d-space and a query d-rectangle q, compute the cumulative weight of the points in q (see e.g. [3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 18, 19, 20, 21, 221). The dynamic version of partial-sum in query-mode was studied by Fredman [IO], who showed that a mixed sequence of n insertions, deletions, and queries may require n(n logd n) time, which is optimal (Willard and Lueker [20]). This result was partially extended to groups by Willard in [19]. For the case where only insertions and queries are allowed, a lower bound of n(n log n/log log n) was proven in the one-dimensional case (Yao [22]), and later extended to Q(n(log n/ log log R)~), f or any fixed dimension d (Chazelle [S]). Regarding static one-dimensional partial-sum, Yao proved that if m units of storage are used then any query can be answered in time O(a(m,n)), which is optimal in the arithmetic model [21]. The function a(m, n) is the functional inverse of Ackermann s function defined by Tarjan [15]. See also Alon and Schieber [2] for related upper and lower bounds. Our main results are a nonlinear lower bound for onedimensional partial-sum in off-line mode and a space-Time Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. 0 1989 ACM O-89791-318-3/89/0006/0131 $1.50 tradeoff for partial-sum in query mode in any fixed dimension. More precisely, we prove that for any n and m, there exist m partial sums whose evaluations require 0 (n + ma(m, n)) t ime. This is a rare case where the function a arises in an off-line problem. Noticeable instances are the complexity of union-find (Tarjan [15]) and the length of Davenport-Schinzel sequences (Hart and Sharir [ll], Agarwal et al. [l]). Interestingly, the proof technique we use does not involve reductions from these problems. Our result implies that, given a sequence of n numbers, computing partial sums over a well-chosen set of n intervals requires a nonlinear number of additions. This might come as a surprise in light of the fact that there is a trivial linear-Time algorithm as soon as we allow subtraction. The lower bound can be regarded as a generalization of a result of Tarjan [16] concerning the off-line evaluation of functions defined over the paths of a tree. As in [16] our result also leads to an improved lower bound on the minimum depth of a monotone circuit for computing conjunctions. The other contribution of this paper is an algorithm which can answer any partial-sum query in time O(αdd(m,n)), where m is the amount of storage available. This generalizes Yao s one-dimensional upper bound [21] to fixed arbitrary dimension d. Since our algorithm works on a RAM, we can use it as the inner loop of standard multidimensional searching structures. For example, consider the classical orthogonal range searching problem on n weighted points in d-space. Lueker and Willard [20] have described a data structure of size O (nlogd-1 n) which can answer any range query in time O((αdn) (over a semigroup). We improve the time bound to O(logd n). The remainder of this. abstract is devoted to the proofs of the lower and upper bounds. Except for a few technical lemmas whose proofs have been omitted, our exposition is complete and self-contained.

Original languageEnglish (US)
Title of host publicationProceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989
PublisherAssociation for Computing Machinery
Pages131-139
Number of pages9
VolumePart F130124
ISBN (Electronic)0897913183
DOIs
StatePublished - Jun 5 1989
Externally publishedYes
Event5th Annual Symposium on Computational Geometry, SCG 1989 - Saarbruchen, Germany
Duration: Jun 5 1989Jun 7 1989

Other

Other5th Annual Symposium on Computational Geometry, SCG 1989
CountryGermany
CitySaarbruchen
Period6/5/896/7/89

Fingerprint

Multidimensional Arrays
Partial Sums
Query
Computing
Rectangle
Range Searching
Lower bound
Copying
Flavors
Random access storage
D-space
Line
Machinery
Data structures
Insertion
Upper and Lower Bounds
Semigroup
Networks (circuits)
Range Query
Evaluation

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Geometry and Topology
  • Computational Mathematics

Cite this

Chazelle, B., & Rosenberg, B. J. (1989). Computing partial sums in multidimensional arrays. In Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989 (Vol. Part F130124, pp. 131-139). Association for Computing Machinery. https://doi.org/10.1145/73833.73848

Computing partial sums in multidimensional arrays. / Chazelle, Bernard; Rosenberg, Burton J.

Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989. Vol. Part F130124 Association for Computing Machinery, 1989. p. 131-139.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Chazelle, B & Rosenberg, BJ 1989, Computing partial sums in multidimensional arrays. in Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989. vol. Part F130124, Association for Computing Machinery, pp. 131-139, 5th Annual Symposium on Computational Geometry, SCG 1989, Saarbruchen, Germany, 6/5/89. https://doi.org/10.1145/73833.73848
Chazelle B, Rosenberg BJ. Computing partial sums in multidimensional arrays. In Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989. Vol. Part F130124. Association for Computing Machinery. 1989. p. 131-139 https://doi.org/10.1145/73833.73848
Chazelle, Bernard ; Rosenberg, Burton J. / Computing partial sums in multidimensional arrays. Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989. Vol. Part F130124 Association for Computing Machinery, 1989. pp. 131-139
@inproceedings{0b6f854357314abb99b5041bd5d5c63a,
title = "Computing partial sums in multidimensional arrays",
abstract = "The central theme of this paper is the complexity of the partial-sum problem: Given a d-dimensional array A with n entries in a semigroup and a d-rectangle q = [a1, b1] x. x [ad, bd], compute the sum o(A, q) = σ A[k1,..,kd.(k1 k1)Eq . This problem comes in two distinct flavors. In query mode, preprocessing is allowed and q is a query to be answered on-line. In &line mode, we are given the array A and a set of d-rectangles q1, . . . , qm, and we must compute the m sums a(A,qi). Partial-sum is a special case of the classical orthogonal range searching problem: Given n weighted points in d-space and a query d-rectangle q, compute the cumulative weight of the points in q (see e.g. [3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 18, 19, 20, 21, 221). The dynamic version of partial-sum in query-mode was studied by Fredman [IO], who showed that a mixed sequence of n insertions, deletions, and queries may require n(n logd n) time, which is optimal (Willard and Lueker [20]). This result was partially extended to groups by Willard in [19]. For the case where only insertions and queries are allowed, a lower bound of n(n log n/log log n) was proven in the one-dimensional case (Yao [22]), and later extended to Q(n(log n/ log log R)~), f or any fixed dimension d (Chazelle [S]). Regarding static one-dimensional partial-sum, Yao proved that if m units of storage are used then any query can be answered in time O(a(m,n)), which is optimal in the arithmetic model [21]. The function a(m, n) is the functional inverse of Ackermann s function defined by Tarjan [15]. See also Alon and Schieber [2] for related upper and lower bounds. Our main results are a nonlinear lower bound for onedimensional partial-sum in off-line mode and a space-Time Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. 0 1989 ACM O-89791-318-3/89/0006/0131 $1.50 tradeoff for partial-sum in query mode in any fixed dimension. More precisely, we prove that for any n and m, there exist m partial sums whose evaluations require 0 (n + ma(m, n)) t ime. This is a rare case where the function a arises in an off-line problem. Noticeable instances are the complexity of union-find (Tarjan [15]) and the length of Davenport-Schinzel sequences (Hart and Sharir [ll], Agarwal et al. [l]). Interestingly, the proof technique we use does not involve reductions from these problems. Our result implies that, given a sequence of n numbers, computing partial sums over a well-chosen set of n intervals requires a nonlinear number of additions. This might come as a surprise in light of the fact that there is a trivial linear-Time algorithm as soon as we allow subtraction. The lower bound can be regarded as a generalization of a result of Tarjan [16] concerning the off-line evaluation of functions defined over the paths of a tree. As in [16] our result also leads to an improved lower bound on the minimum depth of a monotone circuit for computing conjunctions. The other contribution of this paper is an algorithm which can answer any partial-sum query in time O(αdd(m,n)), where m is the amount of storage available. This generalizes Yao s one-dimensional upper bound [21] to fixed arbitrary dimension d. Since our algorithm works on a RAM, we can use it as the inner loop of standard multidimensional searching structures. For example, consider the classical orthogonal range searching problem on n weighted points in d-space. Lueker and Willard [20] have described a data structure of size O (nlogd-1 n) which can answer any range query in time O((αdn) (over a semigroup). We improve the time bound to O(logd n). The remainder of this. abstract is devoted to the proofs of the lower and upper bounds. Except for a few technical lemmas whose proofs have been omitted, our exposition is complete and self-contained.",
author = "Bernard Chazelle and Rosenberg, {Burton J}",
year = "1989",
month = "6",
day = "5",
doi = "10.1145/73833.73848",
language = "English (US)",
volume = "Part F130124",
pages = "131--139",
booktitle = "Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989",
publisher = "Association for Computing Machinery",

}

TY - GEN

T1 - Computing partial sums in multidimensional arrays

AU - Chazelle, Bernard

AU - Rosenberg, Burton J

PY - 1989/6/5

Y1 - 1989/6/5

N2 - The central theme of this paper is the complexity of the partial-sum problem: Given a d-dimensional array A with n entries in a semigroup and a d-rectangle q = [a1, b1] x. x [ad, bd], compute the sum o(A, q) = σ A[k1,..,kd.(k1 k1)Eq . This problem comes in two distinct flavors. In query mode, preprocessing is allowed and q is a query to be answered on-line. In &line mode, we are given the array A and a set of d-rectangles q1, . . . , qm, and we must compute the m sums a(A,qi). Partial-sum is a special case of the classical orthogonal range searching problem: Given n weighted points in d-space and a query d-rectangle q, compute the cumulative weight of the points in q (see e.g. [3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 18, 19, 20, 21, 221). The dynamic version of partial-sum in query-mode was studied by Fredman [IO], who showed that a mixed sequence of n insertions, deletions, and queries may require n(n logd n) time, which is optimal (Willard and Lueker [20]). This result was partially extended to groups by Willard in [19]. For the case where only insertions and queries are allowed, a lower bound of n(n log n/log log n) was proven in the one-dimensional case (Yao [22]), and later extended to Q(n(log n/ log log R)~), f or any fixed dimension d (Chazelle [S]). Regarding static one-dimensional partial-sum, Yao proved that if m units of storage are used then any query can be answered in time O(a(m,n)), which is optimal in the arithmetic model [21]. The function a(m, n) is the functional inverse of Ackermann s function defined by Tarjan [15]. See also Alon and Schieber [2] for related upper and lower bounds. Our main results are a nonlinear lower bound for onedimensional partial-sum in off-line mode and a space-Time Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. 0 1989 ACM O-89791-318-3/89/0006/0131 $1.50 tradeoff for partial-sum in query mode in any fixed dimension. More precisely, we prove that for any n and m, there exist m partial sums whose evaluations require 0 (n + ma(m, n)) t ime. This is a rare case where the function a arises in an off-line problem. Noticeable instances are the complexity of union-find (Tarjan [15]) and the length of Davenport-Schinzel sequences (Hart and Sharir [ll], Agarwal et al. [l]). Interestingly, the proof technique we use does not involve reductions from these problems. Our result implies that, given a sequence of n numbers, computing partial sums over a well-chosen set of n intervals requires a nonlinear number of additions. This might come as a surprise in light of the fact that there is a trivial linear-Time algorithm as soon as we allow subtraction. The lower bound can be regarded as a generalization of a result of Tarjan [16] concerning the off-line evaluation of functions defined over the paths of a tree. As in [16] our result also leads to an improved lower bound on the minimum depth of a monotone circuit for computing conjunctions. The other contribution of this paper is an algorithm which can answer any partial-sum query in time O(αdd(m,n)), where m is the amount of storage available. This generalizes Yao s one-dimensional upper bound [21] to fixed arbitrary dimension d. Since our algorithm works on a RAM, we can use it as the inner loop of standard multidimensional searching structures. For example, consider the classical orthogonal range searching problem on n weighted points in d-space. Lueker and Willard [20] have described a data structure of size O (nlogd-1 n) which can answer any range query in time O((αdn) (over a semigroup). We improve the time bound to O(logd n). The remainder of this. abstract is devoted to the proofs of the lower and upper bounds. Except for a few technical lemmas whose proofs have been omitted, our exposition is complete and self-contained.

AB - The central theme of this paper is the complexity of the partial-sum problem: Given a d-dimensional array A with n entries in a semigroup and a d-rectangle q = [a1, b1] x. x [ad, bd], compute the sum o(A, q) = σ A[k1,..,kd.(k1 k1)Eq . This problem comes in two distinct flavors. In query mode, preprocessing is allowed and q is a query to be answered on-line. In &line mode, we are given the array A and a set of d-rectangles q1, . . . , qm, and we must compute the m sums a(A,qi). Partial-sum is a special case of the classical orthogonal range searching problem: Given n weighted points in d-space and a query d-rectangle q, compute the cumulative weight of the points in q (see e.g. [3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 18, 19, 20, 21, 221). The dynamic version of partial-sum in query-mode was studied by Fredman [IO], who showed that a mixed sequence of n insertions, deletions, and queries may require n(n logd n) time, which is optimal (Willard and Lueker [20]). This result was partially extended to groups by Willard in [19]. For the case where only insertions and queries are allowed, a lower bound of n(n log n/log log n) was proven in the one-dimensional case (Yao [22]), and later extended to Q(n(log n/ log log R)~), f or any fixed dimension d (Chazelle [S]). Regarding static one-dimensional partial-sum, Yao proved that if m units of storage are used then any query can be answered in time O(a(m,n)), which is optimal in the arithmetic model [21]. The function a(m, n) is the functional inverse of Ackermann s function defined by Tarjan [15]. See also Alon and Schieber [2] for related upper and lower bounds. Our main results are a nonlinear lower bound for onedimensional partial-sum in off-line mode and a space-Time Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. 0 1989 ACM O-89791-318-3/89/0006/0131 $1.50 tradeoff for partial-sum in query mode in any fixed dimension. More precisely, we prove that for any n and m, there exist m partial sums whose evaluations require 0 (n + ma(m, n)) t ime. This is a rare case where the function a arises in an off-line problem. Noticeable instances are the complexity of union-find (Tarjan [15]) and the length of Davenport-Schinzel sequences (Hart and Sharir [ll], Agarwal et al. [l]). Interestingly, the proof technique we use does not involve reductions from these problems. Our result implies that, given a sequence of n numbers, computing partial sums over a well-chosen set of n intervals requires a nonlinear number of additions. This might come as a surprise in light of the fact that there is a trivial linear-Time algorithm as soon as we allow subtraction. The lower bound can be regarded as a generalization of a result of Tarjan [16] concerning the off-line evaluation of functions defined over the paths of a tree. As in [16] our result also leads to an improved lower bound on the minimum depth of a monotone circuit for computing conjunctions. The other contribution of this paper is an algorithm which can answer any partial-sum query in time O(αdd(m,n)), where m is the amount of storage available. This generalizes Yao s one-dimensional upper bound [21] to fixed arbitrary dimension d. Since our algorithm works on a RAM, we can use it as the inner loop of standard multidimensional searching structures. For example, consider the classical orthogonal range searching problem on n weighted points in d-space. Lueker and Willard [20] have described a data structure of size O (nlogd-1 n) which can answer any range query in time O((αdn) (over a semigroup). We improve the time bound to O(logd n). The remainder of this. abstract is devoted to the proofs of the lower and upper bounds. Except for a few technical lemmas whose proofs have been omitted, our exposition is complete and self-contained.

UR - http://www.scopus.com/inward/record.url?scp=0002298298&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0002298298&partnerID=8YFLogxK

U2 - 10.1145/73833.73848

DO - 10.1145/73833.73848

M3 - Conference contribution

VL - Part F130124

SP - 131

EP - 139

BT - Proceedings of the 5th Annual Symposium on Computational Geometry, SCG 1989

PB - Association for Computing Machinery

ER -