Concept

NP-hard

The property of a problem that every problem whose solutions can be checked quickly reduces to it in polynomial time. A fast algorithm for any one such problem would give fast algorithms for all of them, and none is known.

Named by 4 essays across 3 fields — each of them below, with the objects they name alongside it.

Dodgson's rule: the fewest swaps that make a Condorcet winner. Profile of 9 ballots with no Condorcet winner; Dodgson scores A 1, B 2, C 3, D 6; Borda scores A 15, B 16, C 14, D 9; Copeland A 1, B 1, C 1, D −3.

The fewest swaps to a winner

When no candidate beats every other head to head, Charles Dodgson proposed in 1876 to elect the one that is closest to doing so — the candidate that the fewest swaps of neighbouring names on the ballots would turn into a winner of every contest. The rule is easy to state and hard to compute: the count needs a search, and deciding the winner is provably among the hardest problems of its kind. A much simpler count, the votes still to be won, usually agrees, more often the larger the electorate.

applied · Voting rules
Three-colourability as a sentence: there exist three sets such that …. Petersen graph coloured with three colours; witness sets R = {0,2,6}, G = {1,3,5,9}, B = {4,7,8}; all 25 first-order checks pass.

There is a relation such that

A graph can be coloured with three colours exactly when there are three sets of its points such that every point lies in one and no edge joins two points of the same set. The sets are a guess; once guessed, the rest is a list of simple checks. Ronald Fagin proved in 1974 that this shape of sentence — 'there exist relations such that' followed by first-order conditions — describes exactly the problems whose solutions can be checked quickly, the class called NP. The central question of computer science is therefore also a question about what sentences can say.

logic · Quantifiers
Seven towns joined with junctions and without. Seven random points: spanning tree 1.65407, Steiner tree 1.54997 with 2 junctions, ratio 0.93707.

What a junction can save

Join a set of towns by roads that may meet only at towns, and the shortest such network is easy to find. Allow junctions anywhere and the network gets shorter — but never, it is conjectured, by more than 13.4%, the saving the Fermat point makes on an equilateral triangle. Computed exactly on 1,304 random sets of up to seven towns, the average saving is about 3%. An adversarial search drives it down to the bound and no further, and a hexagon with its centre attains it exactly. The proof of the bound that was accepted for twenty years has a gap.

geometry · Triangle centres
An elimination order is a tree of bags. 3 × 3 grid, optimal order a, c, g, i, b, d, f, h, e; bags abd, bcf, dgh, fhi, bdef, defh, efh, eh, e; treewidth 3.

The order that keeps elimination narrow

Eliminating letters one at a time costs whatever the widest step costs, and the least width any order can achieve is the treewidth of the formula's graph. Finding it exactly is NP-hard, but a search over sets of letters instead of sequences finds it for small graphs, and a greedy rule that adds the fewest new edges finds it on 566 of 600 random graphs and misses by more than one only once. On Tseitin's 6 × 6 grid that rule forms twenty-four times fewer resolvents than sweeping row by row. What it cannot do is prove that its order is the best.

logic · Resolution

Named alongside it

The objects these essays reach for when they reach for this one.

Exhaustive searchApproximationBorda countCondorcet winnerConjectureDecompositionEhrenfeucht fraisse gameEquilateral triangleGraphGraph colouringGraph minorGreedy algorithm

All concepts