Global Information Lookup Global Information

Prefix sum information


In computer science, the prefix sum, cumulative sum, inclusive scan, or simply scan of a sequence of numbers x0, x1, x2, ... is a second sequence of numbers y0, y1, y2, ..., the sums of prefixes (running totals) of the input sequence:

y0 = x0
y1 = x0 + x1
y2 = x0 + x1+ x2
...

For instance, the prefix sums of the natural numbers are the triangular numbers:

input numbers  1  2  3  4  5  6 ...
prefix sums  1  3  6 10 15 21 ...

Prefix sums are trivial to compute in sequential models of computation, by using the formula yi = yi − 1 + xi to compute each output value in sequence order. However, despite their ease of computation, prefix sums are a useful primitive in certain algorithms such as counting sort,[1][2] and they form the basis of the scan higher-order function in functional programming languages. Prefix sums have also been much studied in parallel algorithms, both as a test problem to be solved and as a useful primitive to be used as a subroutine in other parallel algorithms.[3][4][5]

Abstractly, a prefix sum requires only a binary associative operator ⊕, making it useful for many applications from calculating well-separated pair decompositions of points to string processing.[6][7]

Mathematically, the operation of taking prefix sums can be generalized from finite to infinite sequences; in that context, a prefix sum is known as a partial sum of a series. Prefix summation or partial summation form linear operators on the vector spaces of finite or infinite sequences; their inverses are finite difference operators.

  1. ^ Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001), "8.2 Counting Sort", Introduction to Algorithms (2nd ed.), MIT Press and McGraw-Hill, pp. 168–170, ISBN 0-262-03293-7.
  2. ^ Cole, Richard; Vishkin, Uzi (1986), "Deterministic coin tossing with applications to optimal parallel list ranking", Information and Control, 70 (1): 32–53, doi:10.1016/S0019-9958(86)80023-7
  3. ^ Cite error: The named reference lf80 was invoked but never defined (see the help page).
  4. ^ Cite error: The named reference tv85 was invoked but never defined (see the help page).
  5. ^ Lakshmivarahan, S.; Dhall, S.K. (1994), Parallelism in the Prefix Problem, Oxford University Press, ISBN 0-19508849-2.
  6. ^ Blelloch, Guy (2011), Prefix Sums and Their Applications (Lecture Notes) (PDF), Carnegie Mellon University.
  7. ^ Callahan, Paul; Kosaraju, S. Rao (1995), "A Decomposition of Multi-Dimensional Point Sets with Applications to k-Nearest-Neighbors and n-Body Potential Fields", Journal of the ACM, 42 (1): 67–90, doi:10.1145/200836.200853, S2CID 1818562.

and 21 Related for: Prefix sum information

Request time (Page generated in 0.8562 seconds.)

Prefix sum

Last Update:

In computer science, the prefix sum, cumulative sum, inclusive scan, or simply scan of a sequence of numbers x0, x1, x2, ... is a second sequence of numbers...

Word Count : 5242

Collective operation

Last Update:

with a butterfly algorithm achieves the same asymptotic runtime. The prefix-sum or scan operation is used to collect data or partial results from different...

Word Count : 2529

Fenwick tree

Last Update:

is a data structure that can efficiently update values and calculate prefix sums in an array of values. This structure was proposed by Boris Ryabko in...

Word Count : 2290

Sum

Last Update:

algebra Minkowski addition, a sum of two subsets of a vector space Power sum symmetric polynomial, in commutative algebra Prefix sum, in computing Pushout (category...

Word Count : 596

Counting sort

Last Update:

the number of objects that possess distinct key values, and applying prefix sum on those counts to determine the positions of each key value in the output...

Word Count : 1591

Topological sorting

Last Update:

do global build prefix sum over size of Q // get offsets and total number of vertices in this step offset = nrOfVerticesProcessed + sum(Qi, i = 0 to j...

Word Count : 3176

Prefix code

Last Update:

A prefix code is a type of code system distinguished by its possession of the "prefix property", which requires that there is no whole code word in the...

Word Count : 1517

Segmented scan

Last Update:

In computer science, a segmented scan is a modification of the prefix sum with an equal-sized array of flag bits to denote segment boundaries on which...

Word Count : 227

Euler tour technique

Last Update:

of the following problems can be solved in O(Prefix sum(n)) (the time it takes to solve the prefix sum problem in parallel for a list of n items): Classifying...

Word Count : 946

Kalman filter

Last Update:

Särkkä (2021). The filter solution can then be retrieved by the use of a prefix sum algorithm which can be efficiently implemented on GPU. This reduces the...

Word Count : 20328

Scan

Last Update:

printed text or printed sheet music Port scanner, in computer networking Prefix sum, an operation on lists that is also known as the scan operator Raster...

Word Count : 454

Quicksort

Last Update:

The partitioning step is accomplished through the use of a parallel prefix sum algorithm to compute an index for each array element in its section of...

Word Count : 9985

Radix sort

Last Update:

series Card Sorters Other distribution sorts Kirkpatrick-Reisch sorting Prefix sum US 395781  and UK 327  Donald Knuth. The Art of Computer Programming,...

Word Count : 2603

Erik Demaine

Last Update:

including his work on the carpenter's rule problem, hinged dissection, prefix sum data structures, competitive analysis of binary search trees, graph minors...

Word Count : 886

Running total

Last Update:

product of the outcomes of several bets in sequence. Running average Prefix sum Programmed Data Processor-1 Manual (PDF). Maynard, Massachusetts: Digital...

Word Count : 501

Parallel external memory

Last Update:

partitioning algorithm (PEM_DIST_SORT) uses a PEM prefix sum algorithm to calculate the prefix sum with the optimal O(NPB+log⁡P){\displaystyle O\left({\frac...

Word Count : 1864

ISBN

Last Update:

ISO 2108 (the 9-digit SBN code can be converted to a 10-digit ISBN by prefixing it with a zero). Privately published books sometimes appear without an...

Word Count : 6602

Sumerian language

Last Update:

turning all prefixes into suffixes: mu-na-an-sum "he gave (something) to him", mu-na-e-sum-mu-un-ze2-en "you (plur.) gave (something) to him" – sum-mu-na-ab...

Word Count : 9376

Cyclic prefix

Last Update:

cyclic prefix refers to the prefixing of a symbol with a repetition of the end. The receiver is typically configured to discard the cyclic prefix samples...

Word Count : 779

Molar concentration

Last Update:

mol/L = 10−3 M = 1 mM = 1 mmol/L. The SI prefix "mega" (symbol M) has the same symbol. However, the prefix is never used alone, so "M" unambiguously...

Word Count : 1391

Monoid

Last Update:

operations ensures that the operation can be parallelized by employing a prefix sum or similar algorithm, in order to utilize multiple cores or processors...

Word Count : 4447

PDF Search Engine © AllGlobal.net