Figure 1. Illustration of bubble
sort
Figure 2. Illustration of bidirectional
bubble sort
Figure 3. Illustration of batcher’s
odd and even merge sort.
cursively combining half-cleaners, a Bitonic sorter can be built
which is a network that sorts bitonic sequences (Thomas et al.,
2003). For an illustration of how Bitonic sort works, consider the
usual problem of sorting the numbers: 8, 4, 3 and 2. The numbers
are sorted as follows:
Half Cleaners are used in steps 1 and 2 and Bitonic Mergers used
in steps 3 and 4.
In all, there are 6 comparisons and 4 swaps.