Concept

Dynamic programming

A method that solves a problem by solving its smaller subproblems once each and storing the answers in a table. It turns searches that would revisit the same subproblem exponentially often into computations of polynomial size.

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

The cost of running a computation backwards with a few stored states. Minimal recomputation to reverse chains of length up to 200 with 1, 2, 3, 4, 6 slots; at length 200: 1: 19900, 2: 2470, 3: 1305, 4: 948, 6: 680.

Running a computation backwards with little memory

The reverse sweep that gives a whole gradient for the price of a few evaluations needs the computation's intermediate states in reverse order, and storing them all can cost more memory than the machine has. Keep only a few and recompute the rest, and the cheapest schedule has an exact answer found by Andreas Griewank in 1992: with c stored states and no step run more than r times, the longest chain that can be reversed is the binomial coefficient C(c + r, c). Pascal's triangle is the table of what memory buys.

analysis · The derivative
How many fourth powers every number needs. Fewest fourth powers summing to n, n <= 10000000: 19 needed by 79, 159, 239, 319, 399, 479, 559; 18 by 24 numbers (last 1248); 17 by 65 (last 13792).

Nineteen fourth powers, and then sixteen

Edward Waring claimed in 1770 that every number is a sum of at most nineteen fourth powers. It is true, and it is needed: 79 takes nineteen, because its remainder on division by sixteen forces fifteen ones. But only seven numbers need nineteen, the last of them 559; the last to need eighteen is 1,248, and the last to need seventeen is 13,792. Counting every number to ten million shows the stragglers thinning out and the one obstruction that never goes away — the remainder modulo sixteen, which makes 31, 496, 7,936 and every 31·16ᵐ need sixteen for ever.

number · Sums of two squares
One function, two orders. The function a₁b₁ + a₂b₂ + a₃b₃ as a reduced decision diagram: 8 nodes with partners together, 16 nodes with them apart.

The order of the questions

Decide a Boolean function by asking about its variables one at a time, and share every state that behaves alike. For a₁b₁ + a₂b₂ + … the result has 2n + 2 nodes if partners are asked together and 2ⁿ⁺¹ if they are apart. All 40,320 orders of eight variables give anything from 10 to 32 nodes, while multiplication's middle bit grows fast in the best order of all.

logic · Truth functions
One number for each arm. Gittins indices at discount 0.9 for s successes and f failures on a uniform prior: a fresh arm has mean 0.5 and index 0.7029.

One number for each arm

Several slot machines pay at unknown rates, and each pull both earns and teaches. The problem seems to tangle every machine with every other, and in the 1940s it was thought hopeless. Then John Gittins found that each machine alone has one number, and the rule is to play the highest. An exact search over 1,187,671 states of two arms gets the same value to six places.

probability · Optimal stopping

Named alongside it

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

Exhaustive searchLower boundAdditive number theoryBayes' theoremBinomial coefficientBoolean functionChain ruleCongruenceDerivativeExpected valueFourth powerNP-hard

All concepts