Clever Geek Handbook
📜 ⬆️ ⬇️

Cathill Algorithm - Mackey

Cathill-Mackey Inverse Ordering

The Cuthill – McKee Algorithm is an algorithm for reducing the width of a tape sparse symmetric matrices . It is named after the developers - Elizabeth Cuthill and James Mackey.

The reverse Cuthill – McKee algorithm ( RCM , reverse Cuthill — McKee ) is the same algorithm with reverse index numbering.

Algorithm

The original symmetric matrixn×n {\ displaystyle n \ times n} n\times n considered as a graph adjacency matrix(V,E) {\ displaystyle (V, E)} (V,E) . The Cathill – Mackey algorithm renumbers the vertices of the graph so that, as a result of the corresponding permutation of the columns and rows of the original matrix, reduce the width of its ribbon .

The algorithm builds an ordered set of verticesR {\ displaystyle R} R representing the new vertex numbering. For a connected graph, the algorithm is as follows:

  1. select a peripheral vertex (or a pseudo-peripheral vertex )v {\ displaystyle v} v for the initial value of the tupleR: =(v) {\ displaystyle R: = (v)} {\displaystyle R:=(v)} ;
  2. fori=one,2,... {\ displaystyle i = 1,2, ...} {\displaystyle i=1,2,...} while the condition is satisfied|R|<n {\ displaystyle | R | <n} {\displaystyle |R|<n} , perform steps 3-5:
  3. build an adjacency setAdj⁡(Ri) {\ displaystyle \ operatorname {Adj} (R_ {i})} {\displaystyle \operatorname {Adj} (R_{i})} forRi {\ displaystyle R_ {i}} R_i whereRi {\ displaystyle R_ {i}} R_i -i {\ displaystyle i} i componentR {\ displaystyle R} R , and exclude vertices that are already contained inR {\ displaystyle R} R , i.e:Ai: =Adj⁡(Ri)∖R {\ displaystyle A_ {i}: = \ operatorname {Adj} (R_ {i}) \ setminus R} {\displaystyle A_{i}:=\operatorname {Adj} (R_{i})\setminus R} ;
  4. sortAi {\ displaystyle A_ {i}} A_{i} ascending degrees of peaks ;
  5. addAi {\ displaystyle A_ {i}} A_{i} in the result tupleR {\ displaystyle R} R .

In other words, the algorithm numbers the vertices during the breadth-first search , at which adjacent vertices are dispensed in the order of increasing their degrees .

For a disconnected graph, the algorithm can be applied separately to each connected component [1] .

The temporal computational complexity of the RCM algorithm, provided that sorting by inserts is used for ordering,O(m|E|) {\ displaystyle O (m | E |)} {\displaystyle O(m|E|)} wherem {\ displaystyle m} m - maximum degree of apex,|E| {\ displaystyle | E |} {\displaystyle |E|} - the number of edges of the graph [2] .

Selecting the starting vertex

To get good results, you need to find the peripheral vertex of the graph.(V,E) {\ displaystyle (V, E)}   . This task is generally quite difficult, therefore, they usually look for a pseudo-peripheral vertex using one of the modifications of the Gibbs heuristic algorithm , etc.

To describe the algorithm, the concept of a root level structure is introduced. For a given vertexv {\ displaystyle v}   level structure with root inv {\ displaystyle v}   will be a splitL {\ displaystyle {\ mathcal {L}}}   many verticesV {\ displaystyle V}   :

L(v)={L0(v),Lone(v),...,Ll(v)(v)},{\ displaystyle {\ mathcal {L}} (v) = \ {L_ {0} (v), L_ {1} (v), \ dots, L_ {l (v)} (v) \},}  

where are the subsetsLi(v) {\ displaystyle L_ {i} (v)}   defined as follows:

L0(v)={v},{\ displaystyle L_ {0} (v) = \ {v \},}  
Lone(v)=Adj⁡(L0(v)){\ displaystyle L_ {1} (v) = \ operatorname {Adj} (L_ {0} (v))}  

and

Li(v)=Adj⁡(Li-one(v))-Li-2(v),i=2,3,...,l(v).{\ displaystyle L_ {i} (v) = \ operatorname {Adj} (L_ {i-1} (v)) - L_ {i-2} (v), \ qquad i = 2,3, \ dots, l (v).}  

Algorithm for finding a pseudo-peripheral vertex [3] :

  1. select arbitrary vertexr {\ displaystyle r}   ofV {\ displaystyle V}   ;
  2. build a level structure for the rootr {\ displaystyle r}   :L(r)={L0(r),Lone(r),...,Ll(r)(r)} {\ displaystyle {\ mathcal {L}} (r) = \ {L_ {0} (r), L_ {1} (r), \ dots, L_ {l (r)} (r) \}}   ;
  3. pick the top with the least degreev {\ displaystyle v}   ofLl(r)(r) {\ displaystyle L_ {l (r)} (r)}   ;
  4. build a level structure for the rootv {\ displaystyle v}   :L(v)={L0(v),Lone(v),...,Ll(v)(v)} {\ displaystyle {\ mathcal {L}} (v) = \ {L_ {0} (v), L_ {1} (v), \ dots, L_ {l (v)} (v) \}}   ;
  5. if al(v)>l(r) {\ displaystyle l (v)> l (r)}   then assignr: =v {\ displaystyle r: = v}   and go to step 3;
  6. vertexv {\ displaystyle v}   is the desired pseudo-peripheral vertex.

Notes

  1. ↑ George, Liu, 1984 , pp. 65-66.
  2. ↑ George, Liu, 1984 , p. 68.
  3. ↑ George, Liu, 1984 , pp. 70-72.

Literature

  • E. Cuthill and J. McKee. Reducing the bandwidth of sparse symmetric matrices In Proc. 24th Nat. Conf. ACM , pages 157-172, 1969.
  • George A., Liu J. Numerical solution of large sparse systems of equations = Computer Solution of Large Sparse Positive Definite Systems. - M .: Mir, 1984. - 333 p.

Links

  • Cuthill-Mackey documentation for Boost C ++ libraries .
  • Detailed explanation of the Cuthill-Mackey algorithm .
  • A detailed explanation of the Cathill-Mackey algorithm (Russian) (inaccessible link) .
  • Python Cuthill-Mackey algorithm implementation (inaccessible link) .
Source - https://ru.wikipedia.org/w/index.php?title=Cathill_ Algorithm_ — _Macchi&oldid = 99369031


More articles:

  • Chakryan, Harutyun Khachikovich
  • Kosenko, Ivan Petrovich
  • Susko, Jacob Egorovich
  • Soccer Ball
  • Treasurers, Alexander Vasilievich
  • Teters
  • Mikhailov, Alexander Alekseevich
  • Wood Awa
  • Black Island
  • Massacre in Nalibok

All articles

Clever Geek | 2019