The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Transposition sorting networks
A comparison network is a transposition network if each comparator connects adjacent lines, as in the network in Figure 27.3.
a. Show that any transposition sorting network with n inputs has Ω(n2) comparators.
b. Prove that a transposition network with n inputs is a sorting network if and only if it sorts the sequence ?n, n - 1,..., 1?. (Hint: Use an induction argument analogous to the one in the proof of Lemma 27.1.)
An odd-even sorting network on n inputs ?a1,a2,...,an? is a transposition sorting network with n levels of comparators connected in the "brick-like" pattern illustrated in Figure 27.13.
As can be seen in the figure, for i = 1, 2,..., n and d = 1, 2,..., n, line i is connected by a depthd comparator to line j = i + (-1)i+d if 1 ≤ j ≤ n.

Figure 27.13: An odd-even sorting network on 8 inputs.
c. Prove that odd-even sorting networks actually sort.
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------