Skip to main content

Software Implementations

  • Chapter
  • First Online:
Book cover Designing Sorting Networks

Abstract

A sorting algorithm, in software, is usually described as re-arranging an array of N keys. Each comparator in the sorting network hardware can be implemented in software as a call, C(Lo, Hi), to a subroutine that compares K[Lo] with K[Hi] and swaps them if K[Lo] > K[Hi]—K is a global array of keys and index Lo is less than index Hi in each call. Software representations of sorting networks are shown with diagrams that we call Knuth diagrams . Each key-index in the array being sorted is represented by a horizontal line in the Knuth diagram and each subroutine call, C(Lo, Hi), is represented by a vertical line between the horizontal lines of the Lo and Hi indices. Permuting the locations of the keys generates a re-labeled software program or Knuth diagram for a given sorting network. Though it looks different, the re-labeled version of the network is equivalent to the original version. However, since it looks different, the re-labeled network can help us better understand the behavior of the sorting network and this can help us discover even better networks.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.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

Institutional subscriptions

References

  1. Akl SG (1997) Parallel computation: models and methods. Prentice-Hall, NJ

    Google Scholar 

  2. Knuth D (1998) The art of computer programming: volume 3 sorting and searching, 2nd edn. Addison-Wesley Longman, USA, pp 225–228

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sherenaz W. Al-Haj Baddar .

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this chapter

Cite this chapter

Al-Haj Baddar, S.W., Batcher, K.E. (2011). Software Implementations. In: Designing Sorting Networks. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-1851-1_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4614-1851-1_2

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4614-1850-4

  • Online ISBN: 978-1-4614-1851-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics