\documentclass[11pt]{report} \input{defs} \setlength\overfullrule{5pt} \tolerance=10000 \sloppy \hfuzz=10pt \makeindex \begin{document} \title{An Implementation of the Multiple Minimum Degree Algorithm} \author{Jeremy G. Siek and Lie Quan Lee} \maketitle \section{Introduction} The minimum degree ordering algorithm \cite{LIU:MMD,George:evolution} reorders a matrix to reduce fill-in. Fill-in is the term used to refer to the zero elements of a matrix that become non-zero during the gaussian elimination process. Fill-in is bad because it makes the matrix less sparse and therefore consume more time and space in later stages of the elimintation and in computations that use the resulting factorization. Reordering the rows of a matrix can have a dramatic affect on the amount of fill-in that occurs. So instead of solving \begin{eqnarray} A x = b \end{eqnarray} we instead solve the reordered (but equivalent) system \begin{eqnarray} (P A P^T)(P x) = P b. \end{eqnarray} where $P$ is a permutation matrix. Finding the optimal ordering is an NP-complete problem (e.i., it can not be solved in a reasonable amount of time) so instead we just find an ordering that is ``good enough'' using heuristics. The minimum degree ordering algorithm is one such approach. A symmetric matrix $A$ is typically represented with an undirected graph, however for this function we require the input to be a directed graph. Each nonzero matrix entry $A_{ij}$ must be represented by two directed edges, $(i,j)$ and $(j,i)$, in $G$. An \keyword{elimination graph} $G_v$ is formed by removing vertex $v$ and all of its incident edges from graph $G$ and then adding edges to make the vertices adjacent to $v$ into a clique\footnote{A clique is a complete subgraph. That is, it is a subgraph where each vertex is adjacent to every other vertex in the subgraph}. quotient graph set of cliques in the graph Mass elmination: if $y$ is selected as the minimum degree node then the the vertices adjacent to $y$ with degree equal to $degree(y) - 1$ can be selected next (in any order). Two nodes are \keyword{indistinguishable} if they have identical neighborhood sets. That is, \begin{eqnarray} Adj[u] \cup \{ u \} = Adj[v] \bigcup \{ v \} \end{eqnarray} Nodes that are indistiguishable can be eliminated at the same time. A representative for a set of indistiguishable nodes is called a \keyword{supernode}. incomplete degree update external degree \section{Algorithm Overview} @d MMD Algorithm Overview @{ @ @} @d Set up a mapping from integers to vertices @{ size_type vid = 0; typename graph_traits::vertex_iterator v, vend; for (tie(v, vend) = vertices(G); v != vend; ++v, ++vid) index_vertex_vec[vid] = *v; index_vertex_map = IndexVertexMap(&index_vertex_vec[0]); @} @d Insert vertices into bucket sorter (bucket number equals degree) @{ for (tie(v, vend) = vertices(G); v != vend; ++v) { put(degree, *v, out_degree(*v, G)); degreelists.push(*v); } @} @d Eliminate isolated nodes (nodes with zero degree) @{ typename DegreeLists::stack list_isolated = degreelists[0]; while (!list_isolated.empty()) { vertex_t node = list_isolated.top(); marker.mark_done(node); numbering(node); numbering.increment(); list_isolated.pop(); } @} @d Find first non-empty degree bucket @{ size_type min_degree = 1; typename DegreeLists::stack list_min_degree = degreelists[min_degree]; while (list_min_degree.empty()) { ++min_degree; list_min_degree = degreelists[min_degree]; } @} @d Main Loop @{ while (!numbering.all_done()) { eliminated_nodes = work_space.make_stack(); if (delta >= 0) while (true) { @ @