Algorithm Search⌘K

Proofs: Minimum degree ordering

These are the human proofs of Minimum degree ordering, at full length.

Minimum degree returns a permutation that greedily minimizes the current degree, the quotient graph computes the same degrees in bounded storage, and the approximate degree is an upper bound full

This proof shows: correctness, termination.

Let G=(V,E)G = (V, E) be the graph of a symmetric pattern, ∣V∣=n|V| = n, ∣E∣=m|E| = m. Line numbers refer to the pseudocode of the page. The elimination graphs are G0=GG_0 = G and GkG_k, obtained from Gk−1G_{k-1} by deleting the kk-th eliminated vertex vkv_k and joining all its neighbours into a clique. Nk(x)N_k(x) is the neighbourhood of xx in GkG_k and dk(x)=∣Nk(x)∣d_k(x) = |N_k(x)|.

Lemma 1 (the elimination graph models Cholesky; Parter, Rose). Let B=PAPTB = P A P^T be symmetric positive definite and assume no exact cancellation. Eliminating the first kk unknowns leaves a Schur complement whose graph is GkG_k, and column kk of the Cholesky factor has its off-diagonal nonzeros exactly at the neighbours Nk−1(vk)N_{k-1}(v_k). Hence the number of off-diagonal nonzeros of LL is ∑kdk−1(vk)\sum_k d_{k-1}(v_k), and the fill is the number of clique edges that were not already present.

Proof. One step of elimination replaces SS by S′=S22−s21s21T/s11S' = S_{22} - s_{21} s_{21}^T / s_{11}. The entry (i,j)(i, j) of s21s21Ts_{21}s_{21}^T is nonzero exactly when ii and jj are both neighbours of the pivot, so the pattern of S′S' is the old pattern on the remaining vertices together with a clique on the neighbours of the pivot, unless a sum cancels exactly. The column of LL is s21/s11s_{21}/\sqrt{s_{11}}, whose pattern is the neighbourhood of the pivot. □\square

Without the no-cancellation assumption the same argument gives inclusion: the true pattern of LL is contained in the symbolic one. The tests check both, inclusion always and equality for random values, against an exact LDLTLDL^T in rational arithmetic.

Termination and permutation. The heap holds pairs (d,v)(d, v). Invariant: for every uneliminated vv the heap holds the pair (dk(v),v)(d_k(v), v). It holds initially, and after an elimination only the neighbours of the pivot change degree, and line L7 pushes their new pairs. A popped pair is used only if vv is uneliminated and dd equals its current degree; otherwise it is discarded. Each used pair eliminates a new vertex, and each iteration removes one pair from a heap that receives at most n+∑kdk−1(vk)n + \sum_k d_{k-1}(v_k) pairs in total, so the loop ends, and by the invariant it ends only after all nn vertices are appended. Each vertex is appended once, so the output is a permutation.

Lemma 2 (greedy choice). The vertex vkv_k appended at line L4 minimizes dk−1d_{k-1} over the uneliminated vertices, with ties broken by the smallest index.

Proof. By the invariant, the heap minimum over the valid pairs is (min⁡vdk−1(v),smallest such v)(\min_v d_{k-1}(v), \text{smallest such } v), and stale pairs either have an eliminated vertex or a degree that is no longer current, so they are skipped. Stale pairs that are smaller than every valid pair are popped first and discarded. □\square

Lemma 3 (quotient graph; George and Liu). In the quotient graph version, each uneliminated variable ii keeps a set AiA_i of variables and a set EiE_i of elements, and each live element ee keeps a set LeL_e of variables. Invariants after kk eliminations:

  1. e∈Eie \in E_i if and only if i∈Lei \in L_e;
  2. for uneliminated i≠ji \ne j: {i,j}∈Gk\{i, j\} \in G_k if and only if j∈Aij \in A_i or i,j∈Lei, j \in L_e for some live element ee;
  3. Ai∩Le=∅A_i \cap L_e = \emptyset for every e∈Eie \in E_i.

Consequently Nk(i)=reach(i)=(Ai∪⋃e∈EiLe)∖{i}N_k(i) = \mathrm{reach}(i) = \big(A_i \cup \bigcup_{e \in E_i} L_e\big) \setminus \{i\}.

Proof. Initially there are no elements and Ai=N0(i)A_i = N_0(i). Suppose the invariants hold and pp is eliminated. By (2), N(p)=Ap∪⋃e∈EpLe∖{p}=LpN(p) = A_p \cup \bigcup_{e \in E_p} L_e \setminus \{p\} = L_p, the new element's list. The new graph adds the clique on LpL_p, which (2) now records through LpL_p. The absorbed elements e∈Epe \in E_p satisfy Le∖{p}⊆LpL_e \setminus \{p\} \subseteq L_p, so every pair they covered is still covered. Removing LpL_p from AiA_i loses only pairs inside the clique Lp∋iL_p \ni i, and removing pp loses only edges at the deleted vertex. So (2) holds. For (1), pp is added to EiE_i exactly for i∈Lpi \in L_p, and the absorbed elements are removed from all lists. For (3), lists AiA_i never grow, AiA_i is pruned by LpL_p when pp joins EiE_i, and an absorbed element's list is contained in its absorber's. □\square

Hence the exact-degree quotient version computes the same degrees as the elimination graph and, with the same tie-breaking, returns the same order; the tests confirm this on 150 random graphs.

Lemma 4 (storage). The quantity Z=∑i uneliminated∣Ai∣+∑e live∣Le∣Z = \sum_{i \text{ uneliminated}} |A_i| + \sum_{e \text{ live}} |L_e| never increases, so it never exceeds its initial value 2m2m.

Proof. When pp is eliminated, ∣Lp∣≤∣Ap∣+∑e∈Ep(∣Le∣−1)|L_p| \le |A_p| + \sum_{e \in E_p}(|L_e| - 1), because each absorbed LeL_e contains pp, which is not in LpL_p. The lists ApA_p and LeL_e, e∈Epe \in E_p, are freed, and LpL_p is added, so this part does not increase ZZ. The pruning of the AiA_i only removes entries. □\square

Lemma 5 (the approximate degree). Let pp be eliminated, let i∈Lpi \in L_p, let rr be the number of uneliminated variables after the step, and suppose dˉi\bar d_i was an upper bound for the old degree of ii. Then the new value

dˉi′=min⁡(r−1, dˉi+∣Lp∖{i}∣, ∣Ai∣+∣Lp∖{i}∣+∑e∈Ei, e≠p∣Le∖Lp∣)\bar d_i' = \min\Big(r - 1,\ \bar d_i + |L_p \setminus \{i\}|,\ |A_i| + |L_p \setminus \{i\}| + \sum_{e \in E_i,\ e \ne p} |L_e \setminus L_p|\Big)

satisfies dˉi′≥d(i)\bar d_i' \ge d(i), the exact new degree, with equality when ∣Ei∣≤2|E_i| \le 2.

Proof. The first term bounds any degree. For the second, Nnew(i)=(Nold(i)∖{p})∪(Lp∖{i})N_{\text{new}}(i) = (N_{\text{old}}(i) \setminus \{p\}) \cup (L_p \setminus \{i\}), so d(i)≤dold(i)−1+∣Lp∖{i}∣≤dˉi+∣Lp∖{i}∣d(i) \le d_{\text{old}}(i) - 1 + |L_p \setminus \{i\}| \le \bar d_i + |L_p \setminus \{i\}|. For the third, by Lemma 3, N(i)=Ai∪(Lp∖{i})∪⋃e≠p(Le∖Lp)N(i) = A_i \cup (L_p \setminus \{i\}) \cup \bigcup_{e \ne p} (L_e \setminus L_p), where i∉Aii \notin A_i, i∈Lpi \in L_p, and AiA_i is disjoint from LpL_p and from every LeL_e by invariant (3). So the union is a disjoint union of AiA_i, Lp∖{i}L_p \setminus \{i\} and the union of the sets Le∖LpL_e \setminus L_p, whose size is at most the sum, with equality when at most one e≠pe \ne p is present, that is, when ∣Ei∣≤2|E_i| \le 2. Then the third term is exact and the other two are upper bounds, so the minimum is exact. □\square

The degrees used by AMD are therefore upper bounds, exact in the common case of at most two adjacent elements. The ordering produced need not equal the exact minimum degree ordering.

Theorem (no fill on forests). If GG is a forest, minimum degree produces no fill.

Proof. A forest has a vertex of degree at most 11. Eliminating a vertex of degree 00 or 11 adds no edge and leaves a forest. By Lemma 2 the vertex chosen has degree at most 11 at every step. □\square

What the greedy rule does not give. Minimum degree does not minimize fill. Let GG consist of two cliques {0,1,2,3}\{0, 1, 2, 3\} and {5,6,7,8}\{5, 6, 7, 8\} and a vertex 44 adjacent to 00 and 55. Vertex 44 is the unique vertex of degree 22, so it is eliminated first and creates the fill edge {0,5}\{0, 5\}. The ordering 1,2,3,6,7,8,0,4,51, 2, 3, 6, 7, 8, 0, 4, 5 eliminates only simplicial vertices and has no fill, so the graph is chordal and its minimum fill is 00. Computing the minimum fill is NP-hard (Yannakakis, 1981), so no polynomial greedy rule can be optimal unless P = NP.

Back to Minimum degree ordering