A SELECTION-BASED SORTING
ALGORITHM
Here is one way to sort a list of size n via divide and
conquer. First identify the k 1
elements that would occupy positions n/k, 2n/k, 3n/k, . . . ,
(k 1)n/k in the sorted list, for
a suitably chosen small constant k.
WHAT IS A SORTING NETWORK
A sorting network is a circuit that receives n inputs, , and
permutes
them to produce n outputs, , such that the outputs satisfy
y0 y 1
y2 . . . yn1. For brevity, we often refer to such an ninput n-output sorting network as an
n
CONVEX HULL OF A 2D POINT SET
The 2D convex hull algorithm presented in this section is a
representative example of
geometric problems that are encountered in image
processing and computer vision applications.
It is also an excellent case study of multiwa
ALTERNATIVE SORTING
ALGORITHMS
Much of the complexity of the parallel sorting algorithm
described in Section 6.3 is
related to our insistence that the k subproblems resulting
at the end be exactly of the same
size, thus allowing us to establish an optimal
FIGURES OF MERIT FOR SORTING
NETWORKS
Is the sorting network shown in Fig. 7.4 the best possible
4-sorter? To answer this
question, we need to specify what we mean by the best nsorter. Two figures of merit
immediately suggest themselves:
Cost: the total
DESIGN OF SORTING NETWORKS
There are many ways to design sorting networks, leading
to different results with respect
to the figures of merit defined in Section 7.2. For example,
Fig. 7.7 shows a 6-sorter whose
design is based on the oddeven transposition
SEARCHING AND DICTIONARY
OPERATIONS
Searching is one of the most important operations on
digital computers and consumes
a great deal of resources. A primary reason for sorting, an
activity that has been estimated to
use up more than one-fourth of the runn
SELECTION NETWORKS
If we need the kth smallest value among n inputs, then
using a sorting network would
be an overkill in that an n-sorter does more than what is
required to solve our (n, k) selection
problem. For example, the 8-sorter of Fig. 7.15 can st
CLASSES OF SORTING NETWORKS
A class of sorting networks that possess the same
asymptotic (log2 n) delay and (n
log2 n) cost as Batcher sorting networks, but that offer
some advantages, are the periodic
balanced sorting networks [Dowd89]. An n-sorter of th
BATCHER SORTING NETWORKS
Batchers ingenious constructions date back to the early
1960s (published a few years
later) and constitute some of the earliest examples of
parallel algorithms. It is remarkable that in more than
three decades, only small improvem