Cuthill–McKee Algorithm
   HOME

TheInfoList



OR:

In
numerical linear algebra Numerical linear algebra, sometimes called applied linear algebra, is the study of how matrix operations can be used to create computer algorithms which efficiently and accurately provide approximate answers to questions in continuous mathemati ...
, the Cuthill–McKee algorithm (CM), named after Elizabeth Cuthill and James McKee,E. Cuthill and J. McKee
the bandwidth of sparse symmetric matrices''
In Proc. 24th Nat. Conf. ACM, pages 157–172, 1969.
is an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
to permute a
sparse matrix In numerical analysis and scientific computing, a sparse matrix or sparse array is a matrix in which most of the elements are zero. There is no strict definition regarding the proportion of zero-value elements for a matrix to qualify as sparse ...
that has a
symmetric Symmetry () in everyday life refers to a sense of harmonious and beautiful proportion and balance. In mathematics, the term has a more precise definition and is usually used to refer to an object that is invariant under some transformations ...
sparsity pattern into a
band matrix In mathematics, particularly matrix theory, a band matrix or banded matrix is a sparse matrix whose non-zero entries are confined to a diagonal ''band'', comprising the main diagonal and zero or more diagonals on either side. Band matrix Bandwidt ...
form with a small
bandwidth Bandwidth commonly refers to: * Bandwidth (signal processing) or ''analog bandwidth'', ''frequency bandwidth'', or ''radio bandwidth'', a measure of the width of a frequency range * Bandwidth (computing), the rate of data transfer, bit rate or thr ...
. The reverse Cuthill–McKee algorithm (RCM) due to Alan George and Joseph Liu is the same algorithm but with the resulting index numbers reversed. In practice this generally results in less fill-in than the CM ordering when Gaussian elimination is applied.J. A. George and J. W-H. Liu, Computer Solution of Large Sparse Positive Definite Systems, Prentice-Hall, 1981 The Cuthill McKee algorithm is a variant of the standard
breadth-first search Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next dept ...
algorithm used in graph algorithms. It starts with a peripheral node and then generates Level structure, levels R_i for i=1, 2,.. until all nodes are exhausted. The set R_ is created from set R_i by listing all vertices adjacent to all nodes in R_i . These nodes are ordered according to predecessors and degree.


Algorithm

Given a symmetric n\times n matrix we visualize the matrix as the adjacency matrix of a Graph (discrete mathematics), graph. The Cuthill–McKee algorithm is then a relabeling of the vertex (graph theory), vertices of the graph to reduce the bandwidth of the adjacency matrix. The algorithm produces an ordered n-tuple, ''n''-tuple R of vertices which is the new order of the vertices. First we choose a peripheral vertex (the vertex with the lowest Degree (graph theory), degree) x and set R := ( \). Then for i = 1,2,\dots we iterate the following steps while , R, < n *Construct the adjacency set A_i of R_i (with R_i the ''i''-th component of R) and exclude the vertices we already have in R :A_i := \operatorname(R_i) \setminus R *Sort A_i ascending by minimum predecessor (the already-visited neighbor with the earliest position in R), and as a tiebreak ascending by Degree (graph theory), vertex degree.The Reverse Cuthill-McKee Algorithm in Distributed-Memor

slide 8, 2016
*Append A_i to the Result set R. In other words, number the vertices according to a particular level structure (computed by
breadth-first search Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next dept ...
) where the vertices in each level are visited in order of their predecessor's numbering from lowest to highest. Where the predecessors are the same, vertices are distinguished by degree (again ordered from lowest to highest).


See also

*Graph bandwidth *Sparse matrix


References


Cuthill–McKee documentation
for the Boost C++ Libraries.
A detailed description of the Cuthill–McKee algorithm


MATLAB's implementation of RCM.

RCM routine from SciPy written in Cython. {{DEFAULTSORT:Cuthill-McKee algorithm Matrix theory Graph algorithms Sparse matrices