Skip to main content

Reduce and Scan

  • Reference work entry

Synonyms

Parallel Prefix Sums; Prefix; Prefix Reduction

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   1,600.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   1,799.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Bibliography

  1. Bilardi G, Preparata FP (1989) Size-time complexity of Boolean networks for prefix computations. J ACM 36:362–382

    Article  MATH  MathSciNet  Google Scholar 

  2. Blelloch GE (1989) Scans as primitive parallel operations. IEEE Tram Comp 38:1526–1538

    Article  Google Scholar 

  3. Chatterjee B, Blelloch GE, Zagha M (1990) Scan primitives for vector computers. In: Proceedings of supercomputing conference. IEEE Computer Society Press, New York

    Google Scholar 

  4. Cole R, Vishkin U (1986) Deterministic coin tossing with applications to optimal parallel list ranking. Inform Control 70:32–53

    Article  MATH  MathSciNet  Google Scholar 

  5. Greenberg AG, Lubachevsky BD, Mitrani I (1996) Superfast parallel discrete event simulations. ACM Trans Model Comput Simul 6:107–136

    Article  MATH  Google Scholar 

  6. Iverson KE (1962) A Programming language. Wiley, New York

    MATH  Google Scholar 

  7. Kruskal CP, Rudolph L, Snir M (1986) Efficient synchronization on multiprocessors with shared memory. ACM TOPLAS 10:579–601

    Article  Google Scholar 

  8. Kruskal CP, Rudolph L, Snir M (1990) Efficient parallel algorithms for graph problems. Algorithmica 5:43–64

    Article  MATH  MathSciNet  Google Scholar 

  9. Ladner RE, Fischer MJ (1980) Parallel prefix computation. J Assoc Comput Mach 27:832–838

    Article  MathSciNet  Google Scholar 

  10. Message Passing Interface Forum (1994) MPI: a message-passing interface standard. Int J Supercomput Appl High Perform Comput 8:165–416

    Google Scholar 

  11. Snir M (1986) Depth-size trade-offs for parallel prefix computation. J Algorithms 7:185–201

    Article  MATH  MathSciNet  Google Scholar 

  12. Tarjan RE, Vishkin U (1985) An efficient parallel biconnectivity algorithm. Siam J Comput 14:862–874

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics