Generator

Nonzeros in the Cholesky factor of the 12×12 grid Laplacian, by ordering

One function in the sparse library, called 55 times across 9 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 45 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws nonzeros in the cholesky factor of the 12×12 grid laplacian, by ordering. A horizontal bar chart comparing the number of nonzero entries in the Cholesky factor under four elimination orderings, with reference marks for the matrix itself and for a dense factor.

ordering-bars is one function in lib/figures/sparse.js — sparsity — fill counted two ways, and the ordering that decides the memory. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

Nonzeros in the Cholesky factor of the 12×12 grid Laplacian, by orderingA horizontal bar chart comparing the number of nonzero entries in the Cholesky factor under four elimination orderings, with reference marks for the matrix itself and for a dense factor.natural1739reverse Cuthill–McKee1354minimum degree1026nested dissection1413matrix: 408 entries · dense factor: 10440bandwidth 12 · 4.26× the matrixbandwidth 12 · 3.32× the matrixbandwidth 123 · 2.51× the matrixbandwidth 108 · 3.46× the matrixn = 144, five-point stencilevery ordering fills in; none avoids it

A horizontal bar chart comparing the number of nonzero entries in the Cholesky factor under four elimination orderings, with reference marks for the matrix itself and for a dense factor.

show: "clique-shuffles"

The arguments are the ones A clique has no order passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

How far twenty-four shuffles of a separator's own order move the factorisation's critical path: the longest over the shortest, for every separator measuredrow 12: 3692 to 3692; row 16: 10294 to 10294; row 20: 22476 to 22476; row 24: 41050 to 41050; diagonal 12: 3316 to 3316; diagonal 16: 11445 to 11445; diagonal 20: 21266 to 21266; diagonal 24: 36144 to 36144; geometric 1: 51238 to 51238; geometric 2: 29911 to 29911; geometric 3: 38060 to 38060; thick 12: 4235 to 6412; thick 16: 11016 to 16539; thick 20: 22510 to 32618; thick 24: 48662 to 63801. The pieces are ordered by minimum degree with the separator counted in every degree and numbered last, each time.longest ÷ shortesttwo rows, 12²1.5two rows, 24²1.311.11.21.31.41.5longest ÷ shortest critical path12²16²20²24²12²16²20²24²g1g2g312²16²20²24²grid, one rowgrid, level setgeometric graphgrid, two rowsdashed: every shuffle gives the same factorfree unless the separator is thick

row 12: 3692 to 3692; row 16: 10294 to 10294; row 20: 22476 to 22476; row 24: 41050 to 41050; diagonal 12: 3316 to 3316; diagonal 16: 11445 to 11445; diagonal 20: 21266 to 21266; diagonal 24: 36144 to 36144; geometric 1: 51238 to 51238; geometric 2: 29911 to 29911; geometric 3: 38060 to 38060; thick 12: 4235 to 6412; thick 16: 11016 to 16539; thick 20: 22510 to 32618; thick 24: 48662 to 63801. The pieces are ordered by minimum degree with the separator counted in every degree and numbered last, each time.

show: "clique-share"

The arguments are the ones A clique has no order passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The share of a separator's pairs of vertices joined once the pieces are eliminated, for every separator measuredrow 12: 1.000 of pairs joined, 0 of 12 vertices touching only one side; row 16: 1.000 of pairs joined, 0 of 16 vertices touching only one side; row 20: 1.000 of pairs joined, 0 of 20 vertices touching only one side; row 24: 1.000 of pairs joined, 0 of 24 vertices touching only one side; diagonal 12: 1.000 of pairs joined, 0 of 12 vertices touching only one side; diagonal 16: 1.000 of pairs joined, 0 of 16 vertices touching only one side; diagonal 20: 1.000 of pairs joined, 0 of 20 vertices touching only one side; diagonal 24: 1.000 of pairs joined, 0 of 24 vertices touching only one side; geometric 1: 1.000 of pairs joined, 0 of 36 vertices touching only one side; geometric 2: 1.000 of pairs joined, 6 of 30 vertices touching only one side; geometric 3: 1.000 of pairs joined, 10 of 37 vertices touching only one side; thick 12: 0.522 of pairs joined, 24 of 24 vertices touching only one side; thick 16: 0.516 of pairs joined, 32 of 32 vertices touching only one side; thick 20: 0.513 of pairs joined, 40 of 40 vertices touching only one side; thick 24: 0.511 of pairs joined, 48 of 48 vertices touching only one side.not minimal, still a cliquegraph 1, one-sided vertices0graph 2, one-sided vertices6graph 3, one-sided vertices100.40.50.60.70.80.91share of separator pairs joined12²16²20²24²12²16²20²24²g1g2g312²16²20²24²grid, one rowgrid, level setgeometric graphgrid, two rowsdashed: a cliquea clique has no order

row 12: 1.000 of pairs joined, 0 of 12 vertices touching only one side; row 16: 1.000 of pairs joined, 0 of 16 vertices touching only one side; row 20: 1.000 of pairs joined, 0 of 20 vertices touching only one side; row 24: 1.000 of pairs joined, 0 of 24 vertices touching only one side; diagonal 12: 1.000 of pairs joined, 0 of 12 vertices touching only one side; diagonal 16: 1.000 of pairs joined, 0 of 16 vertices touching only one side; diagonal 20: 1.000 of pairs joined, 0 of 20 vertices touching only one side; diagonal 24: 1.000 of pairs joined, 0 of 24 vertices touching only one side; geometric 1: 1.000 of pairs joined, 0 of 36 vertices touching only one side; geometric 2: 1.000 of pairs joined, 6 of 30 vertices touching only one side; geometric 3: 1.000 of pairs joined, 10 of 37 vertices touching only one side; thick 12: 0.522 of pairs joined, 24 of 24 vertices touching only one side; thick 16: 0.516 of pairs joined, 32 of 32 vertices touching only one side; thick 20: 0.513 of pairs joined, 40 of 40 vertices touching only one side; thick 24: 0.511 of pairs joined, 48 of 48 vertices touching only one side.

show: "clique-geo"

The arguments are the ones A clique has no order passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The third random geometric graph of 300 vertices and the separator a level structure finds in it, its vertices marked by whether they touch both halvesThe separator has 37 vertices; 27 touch both halves and 10 touch only one, so it is not a minimal separator. The halves have 143 and 97 vertices. Once both halves are eliminated every pair of separator vertices is joined.separator, both sidesseparator, one sidethe two halveslines: the separator's edgesnot minimal, and a clique anyway

The separator has 37 vertices; 27 touch both halves and 10 touch only one, so it is not a minimal separator. The halves have 143 and 97 vertices. Once both halves are eliminated every pair of separator vertices is joined.

show: "clique-thick", grid: 20

The arguments are the ones A clique has no order passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The critical path of a 20 × 20 grid's factorisation with a separator two rows thick, under every order tried inside it, against a separator of one rowone row, any order: 22476; two rows, minimum degree inside: 24265; two rows, row by row: 24265; two rows, alternating: 34701; twenty-four shuffles of the two rows from 22510 to 32618. Fill: one row 3931, two rows 4079 row by row and 4079 by minimum degree inside.critical pathone row2.2·10⁴two rows, best order2.3·10⁴one row, any order22476two rows, minimum degree inside24265two rows, row by row24265two rows, alternating34701two rows, 24 shufflesdotted: the range of the shufflestrim the separator, do not order it

one row, any order: 22476; two rows, minimum degree inside: 24265; two rows, row by row: 24265; two rows, alternating: 34701; twenty-four shuffles of the two rows from 22510 to 32618. Fill: one row 3931, two rows 4079 row by row and 4079 by minimum degree inside.

show: "clique-pattern"

The arguments are the ones A clique has no order passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The separator's rows and columns of the Cholesky factor on a 12 × 12 grid: a separator of one row, and one of two rows, each numbered row by row after the piecesOne row: 78 of 78 lower-triangle entries filled — a dense triangle. Two rows: 234 of 300 filled; the empty entries are pairs that no piece connects and that elimination inside the separator does not reach in this order.one rowtwo rowsfilled squares: entries of the factora full triangle has no order to choose

One row: 78 of 78 lower-triangle entries filled — a dense triangle. Two rows: 234 of 300 filled; the empty entries are pairs that no piece connects and that elimination inside the separator does not reach in this order.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

45 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

nested dissection's speedup bound is the larger at k = 8 — checked 5 times

a dissection depth the recursion reaches

a graph small enough for every elimination order to be searched

a grid small enough for every elimination order to be searched

a grid the dial draws

a grid the study measures

a grid the study measures: 12, 16, 20 or 24

a grid the symbolic factorisation can afford at every depth

a grid the tie-break sample can afford

a kind of separator the study draws

a radius and seed the study uses

a radius the dial offers

a reading of the elimination tree this figure draws

a separator with no repeated vertex

a size every elimination order can be searched at

a view of the orderings this figure draws

and minimum degree's worst arithmetic overshoot is larger than its worst fill overshoot

and one level of dissection is worse than none on both counts

and some ordering beats the natural one

and some tie-break of it is optimal on every one

and the other orderings' are not

enough graphs for a share and few enough for a 2ⁿ search each

every constrained vertex named once

every vertex numbered exactly once

minimum degree beats a dense factorisation

minimum degree is optimal on most graphs and not all

minimum degree still fills in

minimum degree's factor is the least there is on this grid

natural beats a dense factorisation

natural still fills in

nested dissection beats a dense factorisation

nested dissection still fills in

one order attains both minima on almost every graph

one to four levels of separators

reverse Cuthill–McKee beats a dense factorisation

reverse Cuthill–McKee still fills in

the least total work is at no dissection at all

the order the search recovers does the arithmetic the search counted

the order the search recovers has the factor the search counted

the tie-breaks spread less than the gap to nested dissection

while the shortest critical path is not at one level either

Against the rule

The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.

Across the library: the rule bites on 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Sparsity, and what elimination costs

A clique has no order

Ordering a dissection's pieces with their separator in view cut the critical path by a quarter, and the next proposal was to order the separator's own vertices by how much fill each carries in. On every separator the dissections here produce — the grid's rows, its level-set diagonals, and the level sets of three irregular graphs of 300 vertices — twenty-four shuffles of the separator's order give the same factor to the last entry. The reason is one line of graph theory: once the pieces are eliminated, a separator whose vertices all touch one connected piece is a clique, and a clique's order changes nothing. The order matters only on a separator that is not a clique, and the one built here to be that — two grid rows thick — loses to a separator of one row under every order tried. The separator's size is the decision; its order is not one.

Sparsity, and what elimination costs

An ordering that buys processors, not time

Nested dissection loses to minimum degree on fill and on total work at every grid either measurement could draw. Read along the elimination tree a parallel factorisation works on, it does not win back the time either: its critical path is within 28 per cent of minimum degree's at every size from 8 to 24 points a side, in both directions, and the tree heights and widest columns are nearly the same. What it wins is the ratio. Its total work over its critical path — the most a factorisation on unbounded processors can speed up by — grows from 2.7 to 4.5 while minimum degree's stays between 2.1 and 2.6.

Sparsity, and what elimination costs

Pieces ordered blind

One level of nested dissection followed by minimum degree lengthened the factorisation's critical path, and the blame moved from the separator to the halves: minimum degree's path through a 12 × 24 half was longer than through the whole 24 × 24 grid. A 12 × 24 grid on its own has a path of 12,913, a third of the square's. What made the half expensive is that it was ordered as if the separator were not there. Count the separator's vertices in every degree and number them last, and the depth-one path falls from 53,508 to 41,050 — minimum degree's own — while the pieces' own arithmetic does not change at all. At depth two the same ordering beats full dissection.

Sparsity, and what elimination costs

The depth that is worse than both ends

Nested dissection to a chosen depth and minimum degree below it is the ordering codes ship, and sweeping the depth was supposed to find a setting that keeps most of dissection's parallelism for most of minimum degree's work. It does not exist: total work rises with the depth at every grid size, and one depth — the first — is worse than both extremes on work and on the critical path at all four sizes measured. One bisection buys nothing because there is no recursion under it to amortise the separator.

Sparsity, and what elimination costs

The halves were the price

One level of nested dissection followed by minimum degree was worse than both no dissection and full dissection on a grid, and the explanation offered was the separator's dense block sitting on every path. That predicted a sign: a separator found from the graph, rather than read off the coordinates, should make the penalty larger. It makes it smaller at every size — 44,116 against 53,508 at 24×24 — and the separator is not where the difference is: both first separators have 24 vertices and cost exactly 4,900. What differs is the path through the halves. Minimum degree takes 48,608 through a rectangular half of the 24×24 grid, longer than its 41,072 through the whole grid, and 39,216 through a triangular one.

Sparsity, and what elimination costs

The least fill there is

Finding the elimination order with the least fill is NP-hard, and that is a statement about the hardest graph and the largest size. On a graph of twenty vertices every one of the 20! orders can be searched at once, through the million sets of vertices already eliminated, and the least fill is a number. On the 4×4, 4×5 and 3×7 grids minimum degree finds it exactly. On eighty random sparse graphs of eighteen vertices it finds it on 53 and misses by at most 7.6 per cent, and on every one of the eighty some breaking of its ties finds it.

Sparsity, and what elimination costs

The order decides the memory

Four elimination orderings on one matrix give factors of 1,739, 1,354, 1,413 and 1,026 entries. All four factorisations are exact, all four return the same answer, and the one with the better asymptotics is not the one that wins.

Sparsity, and what elimination costs

The spare vertices lean one way

Every separator a dissection drew on grids and sparse geometric graphs was a clique once its pieces were eliminated, so the order inside it changed nothing; only a separator two rows thick, built by hand, was not. On geometric graphs at twice the density, level-set separators were predicted to come out several vertices thick where the level crosses a dense patch, with vertices touching only one side — failing the clique condition, making their order matter by more than five per cent, and paying more for trimming than for any order. On twenty-four graphs at three densities the spare vertices are there: up to thirteen in one separator. Not one separator fails the clique condition, because on every graph the spare vertices all touch the same piece, and two vertices that share a piece are joined through it. No shuffle of any separator moves the fill or the work by a single entry. Trimming the spare vertices into the piece they touch shortens the critical path by up to 48 per cent — and denser graphs have fewer of them, not more.

Sparsity, and what elimination costs

Two minima that are one minimum

The order that decides the memory found the operation count behaving like the square of the fill, which leaves room for an order with slightly more fill but a shorter heaviest column to do less arithmetic. Searched exactly over every elimination order on forty graphs, that order does not exist: one order attains both minima on thirty-nine of forty, and on the fortieth the least-fill order's arithmetic is 1.0099 times the least. Minimum degree attains both on the same thirty-three graphs and neither on the same seven.

The whole library · All essays · What must fail