Skip to main content

Divide and Conquer

  • Chapter
  • First Online:
Designing Sorting Networks

Abstract

Many algorithms use the divide-and-conquer strategy. Thus, it makes sense to try to use it to construct new sorting networks. We call keys that are out of their locations “strangers”. A strategy that can be used to design faster sorting networks using the divide-and-conquer technique is proposed here. Firstly, connect the N keys together into a poset. Afterwards, define the number of keys in each of the groups. If there are g groups defined, then select g-1 brackets. Now, for each bracket count the maximum number of strangers in each of the groups. Let us call the strangers that are in the two groups separated by the bracket “Near-Strangers” and strangers that are in groups farther away from the bracket “Far-Strangers”. Add partitioning steps to eliminate all Far-Strangers of all brackets. After that, examine the maximum number of Near-Strangers for each bracket. If the maximum number of Near-Strangers is large, it’s probably best to eliminate some of them. Finally, count the number of steps in the whole sorting network. If the number looks too large, one may want to go back and define a different set of groups.

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

Reference

  1. 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). Divide and Conquer. In: Designing Sorting Networks. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-1851-1_7

Download citation

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

  • 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