18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bandwidth Reduction<br />

images near each other on the tape. This is exactly the bandwidth problem. More general formulations,<br />

such as rectangular circuit layouts and magnetic disks, inherit the same hardness and classes of heuristics<br />

from the linear versions.<br />

Unfortunately, bandwidth minimization is NP-complete. It stays NP-complete even if the input graph is a<br />

tree whose maximum vertex degree is 3, which is an unusually strong condition. Further, there is no<br />

known approximation algorithm for bandwidth reduction, even for trees. Thus our only options are<br />

brute-force search or ad hoc heuristics.<br />

Fortunately, ad hoc heuristics have been well-studied in the numerical analysis community, and<br />

production-quality implementations of the best heuristics are available. <strong>The</strong>se are based on performing a<br />

breadth-first search from a given vertex v, where v is placed at the leftmost point of the ordering. All of<br />

the vertices that are distance 1 from v are placed to its immediate right, followed by all the vertices at<br />

distance 2, and so forth until we reach the vertex furthest from v. We then continue the breadth-first<br />

search from the vertex immediately to the right of v until all vertices in G are accounted for. <strong>The</strong> popular<br />

heuristics differ according to how many different start vertices are considered and how equidistant<br />

vertices are ordered among themselves. However, breaking ties with low-degree vertices over to the left<br />

seems to be a good idea.<br />

Implementations of the most popular heuristics, the Cuthill-McKee and Gibbs-Poole-Stockmeyer<br />

algorithms, are discussed in the implementation section. <strong>The</strong> worst case of the Gibbs-Poole-Stockmeyer<br />

algorithm is , which would wash out any possible savings in solving linear systems, but its<br />

performance in practice is close to linear.<br />

Brute-force search programs can find the exact minimum bandwidth work by backtracking through the<br />

set of n! possible permutations of vertices. Considerable pruning can be achieved to reduce the search<br />

space by starting with a good heuristic bandwidth solution and alternately adding vertices to the left- and<br />

rightmost open slots in the partial permutation. <strong>The</strong> first edge connecting a vertex on the left to a vertex<br />

on the right will likely define an edge whose length is greater than our best example to date, thus leading<br />

to fast pruning. In our experience, graphs of size n=30 or so can be solved to optimality. See the<br />

discussion on backtracking in Section . However, for almost any application such an exact solution<br />

will not be worth the expense of finding it.<br />

Implementations: Fortran language implementations of both the Cuthill-McKee algorithm [CGPS76,<br />

Gib76, CM69] and the Gibbs-Poole-Stockmeyer algorithm [Lew82, GPS76] are available from Netlib.<br />

See Section . Empirical evaluations of these and other algorithms on a test suite of 30 matrices are<br />

discussed in [Eve79b], showing Gibbs-Poole-Stockmeyer to be the consistent winner.<br />

Brute-force implementations written by Ingmar Bitter, Christian Joita, and Dario Vlah in C and C++ as<br />

Stony Brook class projects and capable of solving instances of size n=30 to optimality are provided on<br />

the algorithm repository http://www.cs.sunysb.edu/ algorith.<br />

file:///E|/BOOK/BOOK3/NODE137.HTM (2 of 3) [19/1/2003 1:30:16]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!