Logic

What a formula keeps when letters are fixed

Fix half the letters of a formula at random and most of its leaves become irrelevant: on the sixteen-leaf formula for the parity of four letters, two fixings leave four. How fast formulas shrink under random fixings is the whole engine behind the best lower bounds anyone has proved for formula size — Subbotovskaya's 3/2 in 1961, Håstad's 2 in 1998 — and the reason that engine stops at n³.

Worth reading first: The formula that cannot share · How many gates a truth table needs.

The formula that cannot share computed the smallest formula, in and, or and not, for every one of the 65,536 functions of four letters, and checked Khrapchenko’s lower bound against the exact sizes. It ended at a wall. Counting shows that almost every function of nn letters needs formulas of length about 2n/log⁡n2^n/\log n. But for any function anyone can actually write down, the best lower bound anybody has proved is about n3n^3 letters. That essay named the wall. This one draws the machine that got the bounds up to it, and shows why the machine can go no further.

The machine is called shrinkage. Fix some of a formula’s letters to constants and simplify. Many of its leaves stop mattering, because a constant under an “and” or an “or” either decides the connective’s output or drops out. If formulas lose leaves faster than the function loses complexity, a function that stays hard after fixing must have had a large formula to begin with. Every improvement in formula lower bounds from 1961 to 2014 came from proving that formulas shrink faster than the previous proof had shown.

Fixing two letters of a sixteen-leaf formula leaves four. Parity of four letters as a 16-leaf formula; fixing x3 = 0, x4 = 1 leaves 4 live leaves.
Fig. 1 The parity of four letters written as a tree with sixteen leaves, the smallest possible. Fix x3=0x_3 = 0 and x4=1x_4 = 1: every leaf on those letters becomes a constant, each constant switches off its sibling, and the four shaded leaves that survive compute ¬(x1⊕x2)\neg(x_1 \oplus x_2).

Constants that switch off their siblings

The hero figure is the whole mechanism on one example. Parity of four letters, x1⊕x2⊕x3⊕x4x_1 \oplus x_2 \oplus x_3 \oplus x_4, is true when an odd number of letters are true. Written with and, or and not, with the "not"s pushed down to the letters by De Morgan’s laws — one connective is enough showed how far that rewriting can go — its smallest formula has sixteen leaves, and that is exactly the size the formula that cannot share found for it. The tree combines x1⊕x2x_1 \oplus x_2 and x3⊕x4x_3 \oplus x_4, each written as (a∧¬b)∨(¬a∧b)(a \wedge \neg b) \vee (\neg a \wedge b).

Now fix x3x_3 to 0 and x4x_4 to 1. Each leaf reading x3x_3, ¬x3\neg x_3, x4x_4 or ¬x4\neg x_4 becomes a constant. A 0 under an “and” makes the whole “and” 0, and the other branch of that “and” stops mattering, however large it is. A 1 under an “or” does the same to its sibling. A 1 under an “and” or a 0 under an “or” simply disappears. When the dust settles, the four leaves on x3x_3 and x4x_4 have taken the other branch of their half of the tree with them. What remains is ¬(x1⊕x2)\neg(x_1 \oplus x_2) with four leaves.

Fixing half the letters removed three-quarters of the formula. A crude estimate would remove half, the leaves on the fixed letters themselves. The other quarter went because constants switch off their siblings. That multiplier — leaves lost beyond the ones on the fixed letters — is what the rest of this essay measures.

A restriction, at random

The right way to make the mechanism quantitative is to fix letters at random — to choose a random face of the cube of a formula as a corner of a cube and look at the function on it. A random restriction with parameter pp leaves each letter free with chance pp and otherwise fixes it to 0 or 1 with equal chances, independently. Apply it to a function ff and to its smallest formula, and compare the smallest formula of what is left with the original.

For four letters the expectation can be computed exactly rather than sampled. Each letter is free, fixed to 0 or fixed to 1, so there are 34=813^4 = 81 restrictions, each with a known probability. For each, the restricted function is a function of the free letters, and its smallest formula is in the table of all 65,536 sizes. One detail matters: a restriction that leaves a constant leaves a formula with no leaves at all, and the table is adjusted so that constants count as zero.

How much of a formula survives a random restriction. parity: 0.25: 0.1123, 0.5: 0.3281, 0.75: 0.6357; majority: 0.25: 0.0867, 0.5: 0.2695, 0.75: 0.5691; the 2642 hardest functions: 0.25: 0.0861, 0.5: 0.2641, 0.75: 0.5604.
Fig. 2 The expected size of the smallest formula after a random restriction, as a share of the original, for parity, majority and the 2,642 hardest functions of four letters, against the chance pp that a letter stays free, on logarithmic scales. The curves run between p3/2p^{3/2} and p2p^2, far below pp.

At p=12p = \tfrac12, half the letters free on average, parity keeps 0.3280.328 of its formula, majority 0.2700.270, and the hardest functions 0.2640.264. At p=14p = \tfrac14 the shares are 0.1120.112, 0.0870.087 and 0.0860.086. On logarithmic axes the curves are close to straight lines. Their slopes lie between 1.51.5 and 22 — far steeper than the slope of 1 that leaves on fixed letters alone would give.

Parity, where everything can be counted

Parity is the case where the exact answer has a closed form. A restriction leaving kk letters free turns parity of four letters into parity of kk letters, or its negation, whose smallest formula has a known size: 0, 1, 4, 10 and 16 leaves for k=0k = 0 to 4. The expected size is the average of those sizes over the binomial distribution of kk, which the computation reproduces exactly.

The middle value is a small surprise in its own right. Khrapchenko’s bound gives n2=9n^2 = 9 leaves for parity of three letters, and the true smallest formula has 10. The bound is exact for two and four letters and off by one at three, because a formula’s leaves must be divided among an odd number of letters as evenly as a tree allows. For larger nn the parity of nn letters needs exactly n2n^2 leaves when nn is a power of two, and is known to need more for some other nn, as it does at three. That difference is invisible to every argument in this essay, which all bound sizes only up to constants.

Since parity of kk letters needs about k2k^2 leaves and a restriction leaves about pnpn letters free, parity’s formula shrinks by about p2p^2 in expectation. That is why parity is the natural test case. It shrinks by exactly the factor that the best possible shrinkage theorem allows, so no shrinkage argument can prove a better bound for parity than n2n^2. To go beyond n2n^2 the function has to be built more cleverly, and Andreev’s function, below, is that construction.

The exponent of every function

The slope of a curve in the last figure is its shrinkage exponent — the Γ\Gamma for which the restricted size is about pΓp^\Gamma times the original. It can be read for every function of four letters at once.

Shrinkage exponents of every larger function of four letters. 48314 functions; mean exponent 1.8956, min 1.608, max 2.245.
Fig. 3 For each of the 48,314 functions of four letters whose smallest formula has eight leaves or more, the shrinkage exponent at p=12p = \tfrac12. They average 1.90 and run from 1.61 to 2.25: every one already shrinks faster than Subbotovskaya’s 3/2.

The exponents average 1.901.90. None is below 1.61.6, and some are above 2. That last fact needs care, because Johan Håstad proved in 1998 that the shrinkage exponent of and–or–not formulas is exactly 2. His theorem is about the worst case as the number of letters grows: no family of formulas can shrink more slowly than p2−o(1)p^{2 - o(1)} times its size. Individual functions of four letters can shrink faster, because constants and small sizes dominate. Rounding to whole leaves makes a function of eight leaves that loses five look like an exponent well above 2. The figure is a measurement at a size where the asymptotic statement has not yet taken hold. Its message is only that shrinkage is strong everywhere, not that 2 is exceeded.

Subbotovskaya’s step

The first shrinkage theorem, Bella Subbotovskaya’s of 1961, looks at one letter at a time. In any formula with LL leaves on nn letters, some letter appears at least L/nL/n times. Fix that letter well, and every leaf on it disappears. Moreover, each such leaf takes at least one more leaf with it, because its constant either decides its gate or vanishes, and the sibling subtree goes either way in at least half the cases. Averaged over the two values, fixing that letter removes at least a 3/(2n)3/(2n) share of the leaves. That gives a size after one fixing of at most (1−1/n)3/2(1 - 1/n)^{3/2} times the original, to first order.

One letter fixed: every formula loses at least a third. Worst ratio after the best single fixing: 0.6250; bound 0.6495.
Fig. 4 For every function of four letters with four leaves or more, its smallest formula’s size against the size left after fixing the single best letter to the best value. Every function lies on or below the line (3/4)3/2≈0.65(3/4)^{3/2} \approx 0.65 times the original; the worst keeps exactly 0.6250.625.

Every one of the functions in the figure obeys the step. Its best single fixing leaves at most (3/4)3/2≈0.65(3/4)^{3/2} \approx 0.65 of its formula, and the worst case keeps exactly 0.6250.625, five leaves of eight. Iterating the step — fixing letters one at a time until a pp share remain — gives shrinkage like p3/2p^{3/2}. Applied to parity, which stays parity under every fixing, it gives Subbotovskaya’s lower bound. After fixing all but one letter, parity still needs one leaf, so it must have started with at least about n3/2n^{3/2}.

The argument wastes something, and the waste is what later work recovered. It credits each fixed leaf with removing only one sibling on average, while in a balanced formula a constant near the leaves often decides a whole chain of gates above it. Mike Paterson and Uri Zwick improved the exponent to 1.631.63 in 1993 by tracking those chains. Håstad reached 2 by analysing what happens to a formula under many simultaneous fixings, controlling the rare cases where a formula fails to shrink.

Andreev’s function

Shrinkage alone gives bounds for parity of at most n2n^2, since parity itself shrinks like p2p^2. Alexander Andreev saw in 1987 how to use shrinkage to prove more, by building a function that does not shrink as fast as its formulas must.

Andreev's function: a table addressed by parities. Table 1011, blocks 101 111 with parities 0, 1; output t2 = 1.
Fig. 5 Andreev’s function on a small scale: half the letters are a table of 2k2^k bits, the rest are split into kk blocks whose parities, read as a binary number, address one entry of the table, which is the output.

Split nn letters in two. The first half is a table: 2k2^k bits, with 2k2^k about n/2n/2, describing an arbitrary function of kk inputs. The second half is split into kk blocks, each about n/(2k)n/(2k) letters long, and each block’s parity supplies one input. The function’s value is the table’s entry at the address the parities spell out.

Now argue from the outside in. Choose the table to be a function of kk inputs that needs about 2k/log⁡k2^k/\log k leaves, which counting guarantees exists, so that fixing the table leaves a function that is hard because the table is. Then apply a random restriction to the block letters, with pp chosen so that each block keeps about one free letter. Each block’s parity is then still a free input, and the restricted function contains the hard table function of kk inputs, needing about n/log⁡nn/\log n leaves. By shrinkage, the formula before restriction must have been larger by a factor of about p−Γp^{-\Gamma}, and with pp about k/nk/n that factor is about (n/log⁡n)Γ(n/\log n)^{\Gamma}. The bound comes out as about n1+Γn^{1 + \Gamma}: n2.5n^{2.5} with Subbotovskaya’s Γ=3/2\Gamma = 3/2, and n3n^{3} with Håstad’s Γ=2\Gamma = 2.

Sixty years of bounds

Set side by side, the history of formula lower bounds for explicit functions is a history of shrinkage exponents.

Formula lower bounds for explicit functions, 1961 to 2014. 1961: 1.5 (Subbotovskaya: shrinkage 3/2, parity); 1971: 2 (Khrapchenko: parity, n²); 1987: 2.5 (Andreev's function, shrinkage 3/2); 1993: 2.63 (Paterson–Zwick: shrinkage 1.63); 1998: 3 (Håstad: shrinkage 2); 2014: 3 (Tal: n³ up to logarithms).
Fig. 6 The best lower bound on formula size for an explicit function of nn letters, as an exponent of nn, by year: n1.5n^{1.5} in 1961, n2n^2 in 1971, n2.5n^{2.5} in 1987, n2.63n^{2.63} in 1993, n3−o(1)n^{3 - o(1)} in 1998, and n3n^3 up to logarithmic factors in 2014. Since shrinkage cannot exceed 2, the method stops at n3n^3.

Subbotovskaya’s n1.5n^{1.5} for parity came from shrinkage 3/23/2. Khrapchenko’s n2n^2 for parity, in 1971, came from a different argument, the edge-counting of the formula that cannot share. Everything after that was Andreev’s function fed a better exponent. Andreev’s own n2.5n^{2.5} used Subbotovskaya’s 3/23/2. Paterson and Zwick’s n2.63n^{2.63} used their 1.631.63. Håstad’s n3−o(1)n^{3 - o(1)} used his 22. Avishay Tal sharpened the lower-order factors in 2014, to n3n^3 divided by logarithmic terms. Since 2 is the true shrinkage exponent, Andreev’s function cannot be pushed past n3n^3 by this route, and no explicit function is known to need formulas longer than about n3n^3.

The same tool against depth

Random restrictions have a second famous use, and it came first. A circuit of constant depth — a fixed number of layers of and and or gates, each with any number of inputs — is a formula of a special shape, wide rather than deep. In 1981 Merrick Furst, James Saxe and Michael Sipser, and independently Miklós Ajtai, showed that such circuits cannot compute parity in polynomial size, by restricting at random. Håstad’s switching lemma of 1986 made the argument sharp. Under a random restriction, an “or” of small "and"s collapses with high probability into an “and” of small "or"s, so two adjacent layers of the circuit can be merged into one. Each restriction removes a layer, and after a few of them a constant-depth circuit has become a shallow decision tree. Parity, which stays parity on whatever letters are left free, cannot be one.

The two uses are cousins, and they share the reason they work. Parity is maximally sensitive — flipping any letter flips the output, the property half the cube and root n neighbours measured — so it survives restriction intact while circuits and formulas collapse. Against constant depth the collapse is exponential and the bound is exponential, 2n1/(d−1)2^{n^{1/(d-1)}} for depth dd. Against formulas the collapse is only polynomial, the factor p2p^2, and the bound is only polynomial. The difference between those two results is the difference between a wall that was broken in the 1980s and one that still stands.

Why n3n^3 is a wall and not a theorem

The wall at n3n^3 is a limit of the method, not of the functions. Almost every function needs formulas of length about 2n/log⁡n2^n/\log n, exponentially larger, and the functions in how many gates a truth table needs that can be computed by small circuits are widely believed to include some that need formulas of more than polynomial length. Proving that would separate two classes of computation — what can be done in parallel in very little time from what can be done efficiently in sequence — and is open, one of the separations that sit beside the question there is a relation such that described.

Shrinkage cannot get there because it is a statement about random restrictions, and any function computed by a formula of size ss shrinks to size about sp2s p^2. To prove a bound of n4n^4, an argument would need a function that stays much harder than that under restrictions, and the obstacle is that random restrictions destroy too much structure. They make every known explicit function simple once few enough letters remain. Other methods — communication games, the Karchmer–Wigderson characterisation, rank arguments — have each given bounds for formulas, and each has its own barrier at or below n3n^3 for explicit functions.

What four letters can show

The figures here are exact, and they are exact at a size where every asymptotic statement is distorted by constants. The shrinkage exponents of four-letter functions average 1.91.9 and include values above 2, which only shows that small formulas shrink in jumps. Subbotovskaya’s step is checked exactly, and it holds with room to spare. Håstad’s exponent 2 cannot be seen at four letters at all, since it is a statement about the limit. And Andreev’s construction is drawn rather than computed, because its smallest interesting case needs far more letters than the table of all functions reaches.

Still open: formulas longer than the cube

No explicit function is known to need formulas of length n3+ϵn^{3 + \epsilon} for any ϵ>0\epsilon > 0. The cubic barrier has stood since 1998 in essentially the same form. The Karchmer–Raz–Wigderson conjecture proposes a route beyond it: that composing functions multiplies their formula complexities, as composing parity with a hard table does in Andreev’s argument. A proof would give super-polynomial formula lower bounds for a function computable in polynomial time. Partial results confirm the conjecture for special kinds of composition and leave the general case open.

A second question is closer to this essay. For formulas over the full binary basis — allowing exclusive-or gates as well as and and or — the shrinkage exponent is 1, since parity costs only nn leaves there. The best lower bound for an explicit function is about n2/log⁡nn^2/\log n, by an older counting argument of Èduard Nechiporuk. Whether anything better than that can be proved over that basis is open, and no shrinkage argument can help, because there is no shrinkage to use.

Leaves that take their siblings with them

A formula is a tree, and fixing a letter turns its leaves into constants that switch off whole branches. That simple observation, made quantitative, is shrinkage. A random restriction leaving a pp share of letters free leaves about a p2p^2 share of a formula. The exponent 2 is exact, and every function of four letters already shrinks faster than p3/2p^{3/2}. Fed into Andreev’s construction of a table addressed by parities, shrinkage Γ\Gamma gives lower bounds of n1+Γn^{1 + \Gamma}, which is where the best bound for any explicit function has stood since 1998. The barrier is the exponent itself: formulas cannot be shown to be larger than n3n^3 by an argument whose only tool is that they shrink like p2p^2.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Boolean functionExhaustive searchFormula sizeLower boundOpen problemParity