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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Reference
Knuth D (1998) The art of computer programming: volume 3 sorting and searching, 2nd edn. Addison-Wesley Longman, USA, pp 225–228
Author information
Authors and Affiliations
Corresponding author
Rights 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)