Synonyms
Definition
Givenn inputs x 1, …, x n , and an associative operation ⊗, a reduction algorithm computes the output x 1 ⊗ ⋯ ⊗ x n .Aprefix or scan algorithm computes then outputs \({x}_{1},{x}_{1} \otimes {x}_{2},\ldots,{x}_{1} \otimes \cdots \otimes {x}_{n}\).
Discussion
The reduction problem is a subset of the prefix problem, but as we shall show, the two are closely related. The reduction and scan operators are available in APL [8]: Thus+/3 7 1 computes the value 11 and +∖3 7 1 computes the vector3 10 11.The two primitives appears in other programming languages and libraries, such as MPI [10].
There are two interesting cases to consider:
Random access: The inputs \({x}_{1},\ldots,{x}_{n}\) are stored in consecutive location in an array.
Linked list: The inputs \({x}_{1},\ldots, {x}_{n}\) are stored in consecutive locations in a linked list; the links connect each element to its predecessor.
We analyze these two cases using a...
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsBibliography
Bilardi G, Preparata FP (1989) Size-time complexity of Boolean networks for prefix computations. J ACM 36:362–382
Blelloch GE (1989) Scans as primitive parallel operations. IEEE Tram Comp 38:1526–1538
Chatterjee B, Blelloch GE, Zagha M (1990) Scan primitives for vector computers. In: Proceedings of supercomputing conference. IEEE Computer Society Press, New York
Cole R, Vishkin U (1986) Deterministic coin tossing with applications to optimal parallel list ranking. Inform Control 70:32–53
Greenberg AG, Lubachevsky BD, Mitrani I (1996) Superfast parallel discrete event simulations. ACM Trans Model Comput Simul 6:107–136
Iverson KE (1962) A Programming language. Wiley, New York
Kruskal CP, Rudolph L, Snir M (1986) Efficient synchronization on multiprocessors with shared memory. ACM TOPLAS 10:579–601
Kruskal CP, Rudolph L, Snir M (1990) Efficient parallel algorithms for graph problems. Algorithmica 5:43–64
Ladner RE, Fischer MJ (1980) Parallel prefix computation. J Assoc Comput Mach 27:832–838
Message Passing Interface Forum (1994) MPI: a message-passing interface standard. Int J Supercomput Appl High Perform Comput 8:165–416
Snir M (1986) Depth-size trade-offs for parallel prefix computation. J Algorithms 7:185–201
Tarjan RE, Vishkin U (1985) An efficient parallel biconnectivity algorithm. Siam J Comput 14:862–874
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer Science+Business Media, LLC
About this entry
Cite this entry
Snir, M. (2011). Reduce and Scan. In: Padua, D. (eds) Encyclopedia of Parallel Computing. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-09766-4_120
Download citation
DOI: https://doi.org/10.1007/978-0-387-09766-4_120
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-09765-7
Online ISBN: 978-0-387-09766-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering