Misplaced Pages

Cuthill–McKee algorithm

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Cuthill-McKee ordering of a matrix
RCM ordering of the same matrix

In numerical linear algebra, the Cuthill–McKee algorithm (CM), named after Elizabeth Cuthill and James McKee, is an algorithm to permute a sparse matrix that has a symmetric sparsity pattern into a band matrix form with a small bandwidth. 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.

The Cuthill McKee algorithm is a variant of the standard breadth-first search algorithm used in graph algorithms. It starts with a peripheral node and then generates levels R i {\displaystyle R_{i}} for i = 1 , 2 , . . {\displaystyle i=1,2,..} until all nodes are exhausted. The set R i + 1 {\displaystyle R_{i+1}} is created from set R i {\displaystyle R_{i}} by listing all vertices adjacent to all nodes in R i {\displaystyle R_{i}} . These nodes are ordered according to predecessors and degree.

Algorithm

Given a symmetric n × n {\displaystyle n\times n} matrix we visualize the matrix as the adjacency matrix of a graph. The Cuthill–McKee algorithm is then a relabeling of the vertices of the graph to reduce the bandwidth of the adjacency matrix.

The algorithm produces an ordered n-tuple R {\displaystyle R} of vertices which is the new order of the vertices.

First we choose a peripheral vertex (the vertex with the lowest degree) x {\displaystyle x} and set R := ( { x } ) {\displaystyle R:=(\{x\})} .

Then for i = 1 , 2 , {\displaystyle i=1,2,\dots } we iterate the following steps while | R | < n {\displaystyle |R|<n}

  • Construct the adjacency set A i {\displaystyle A_{i}} of R i {\displaystyle R_{i}} (with R i {\displaystyle R_{i}} the i-th component of R {\displaystyle R} ) and exclude the vertices we already have in R {\displaystyle R}
A i := Adj ( R i ) R {\displaystyle A_{i}:=\operatorname {Adj} (R_{i})\setminus R}
  • Sort A i {\displaystyle A_{i}} ascending by minimum predecessor (the already-visited neighbor with the earliest position in R), and as a tiebreak ascending by vertex degree.
  • Append A i {\displaystyle A_{i}} to the Result set R {\displaystyle R} .

In other words, number the vertices according to a particular level structure (computed by breadth-first search) 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

References

  1. E. Cuthill and J. McKee. Reducing the bandwidth of sparse symmetric matrices In Proc. 24th Nat. Conf. ACM, pages 157–172, 1969.
  2. "Ciprian Zavoianu - weblog: Tutorial: Bandwidth reduction - The CutHill-McKee Algorithm". 15 January 2009.
  3. J. A. George and J. W-H. Liu, Computer Solution of Large Sparse Positive Definite Systems, Prentice-Hall, 1981
  4. The Reverse Cuthill-McKee Algorithm in Distributed-Memory , slide 8, 2016
Categories: