The floors

A floor that holds if something else does

The four lower bounds on this site are proofs. This one is a chain of implications with a conjecture at the top, and neither end of it is proved. The link that can be performed is performed here — checked over 55,754 formulas, 918 of them unsatisfiable — and the link that cannot is quoted and marked as quoted.

Every edit-distance table on this site is Θ(nm)\Theta(nm) cells and nobody has ever found a way to compute the distance that is not. That is a fact about the state of the art and it is not, by itself, an argument.

This collection has four arguments that a cost cannot be avoided, and each of them is a proof. Comparison sorting cannot use fewer than log2n!\log_2 n! comparisons because a decision tree with fewer leaves cannot distinguish the orderings. Connectivity cannot examine fewer than every edge, because an adversary can hide the answer in whichever one an algorithm skips. An exact one-pass distinct count needs log2(uu/2)\log_2 \binom{u}{u/2} bits and an exact count over a window of WW needs WW bits, because two inputs that must be answered differently and are held in the same state cannot be.

Nothing of that kind is known about edit distance. What is known is different in kind, and marking the difference is the whole point of this essay.

A floor that holds only if something else doesThe site's four earlier lower bounds are unconditional: a counting argument, an adversary, and two arguments about how many memory states a machine must have. This one is a chain of implications and neither end of it is proved. The upper link is performed here and checked over 55,754 formulas, 918 of them unsatisfiable. The lower link is quoted: the construction encodes each vector as a string of length proportional to d and needs the two concatenations to be long enough that the alignment cannot cross gadget boundaries; the smallest instance that demonstrates it is far past what an exhaustive check can walk, so performing it here would mean asserting it.SETHno algorithm for k-SAT beats exhaustive search for every korthogonal vectorsno N^(2-e) algorithmedit distanceno n^(2-e) algorithmperformed heresplit and list, checked on 55,754 formulasquoted, not performed herequoted, not performed heresolid: an implication performed here · dashed: one that is quoteda conditional floor
Fig. 1 The argument, drawn as what it is. Two implications, one performed here and checked over 55,754 formulas, one quoted from the literature and not performed. Neither end of the chain is a proved statement.

What the top of the chain says

Satisfiability of a formula in conjunctive normal form with nn variables can be decided by trying all 2n2^n assignments. For clauses of length kk there are algorithms faster than that — for 3-CNF the best known are around 1.31n1.31^n — and they get closer to 2n2^n as kk grows.

The strong exponential time hypothesis is the conjecture that they cannot escape: that for every ε>0\varepsilon > 0 there is a kk for which no algorithm solves kk-SAT in 2(1ε)n2^{(1-\varepsilon)n} time. Informally, exhaustive search over assignments is essentially optimal once the clauses are long enough.

It is a conjecture. It has stood for two decades, a great deal is built on it, and nobody has proved it or refuted it.

The first step from that conjecture to anything about strings is split and list, and it is short enough to do here in full.

Take a formula with nn variables and dd clauses. Split the variables into two halves. For each of the 2n/22^{n/2} assignments to the first half, write down a vector of dd bits whose entry is 1 exactly where that half fails to satisfy the clause. Do the same for the second half.

Now a pair of vectors — one from each list — is orthogonal, meaning no coordinate is 1 in both, exactly when every clause is satisfied by one half or the other. Which is exactly when the two halves together satisfy the formula.

So: the formula is satisfiable if and only if the two lists contain an orthogonal pair.

Split and list: 8 clauses on 6 variables become 16 vectorsEach row is one assignment to half the variables, written as the clauses it fails to satisfy: one column per clause, a filled square where that half leaves the clause unsatisfied. A pair of rows is orthogonal — no clause filled in both — exactly when the two halves together satisfy every clause, so the formula is satisfiable if and only if the two lists contain an orthogonal pair. This one is satisfiable, and the scan found a pair after 3 comparisons. The lists hold 8 and 8 vectors and 8 times 8 is 64, which is every assignment there is.one column per clause; filled means this half fails itvars 1..3vars 4..6#001110000#111110001#200001000#310001001#401010110#511010011#600001110#710001011#001100100#100100100#200001101#300010101#401100010#510100000#600001010#710010000rows #0 and #2 fill no clause in commonfirst 8 of 8 rows each side · 8 clausessatisfiable
Fig. 2 The construction on a formula small enough to read. Each row is one assignment to half the variables; each column is a clause; a filled square means this half leaves that clause unsatisfied. The two boxed rows share no filled column, so the formula is satisfiable — and the same conclusion follows from brute force over all sixty-four assignments.
Split and list: 20 clauses on 6 variables become 16 vectorsEach row is one assignment to half the variables, written as the clauses it fails to satisfy: one column per clause, a filled square where that half leaves the clause unsatisfied. A pair of rows is orthogonal — no clause filled in both — exactly when the two halves together satisfy every clause, so the formula is satisfiable if and only if the two lists contain an orthogonal pair. This one is unsatisfiable, and the scan made all 64 comparisons without finding one. The lists hold 8 and 8 vectors and 8 times 8 is 64, which is every assignment there is.one column per clause; filled means this half fails itvars 1..3vars 4..6#010111000100000110100#100110000000000111101#211011100100000010010#301010000000010011011#410001010010000010100#500000011000101010101#611001100011000010000#701000001001111010001#001010110110111100000#100010100110111100000#201100010110111101010#300100000110111101010#410000111001000010100#500001101001000000101#610100011001000001010#700101001001000001011no pair of rows avoids every clausefirst 8 of 8 rows each side · 20 clausesunsatisfiable
Fig. 3 And an unsatisfiable one. Twenty clauses on six variables, every one of the sixty-four pairs of rows examined, and every pair shares a filled column. Brute force agrees.

Checked by exhaustion, and the trap that check fell into

A reduction that is right on the formulas somebody thought to try is not a reduction. So this one is checked over every formula of a stated small size rather than over a sample: all formulas on four variables built from at most five of the twenty-four possible two-literal clauses, plus three hundred larger random instances, with brute-force satisfiability and the orthogonal-pair search required to agree on each.

55,754 formulas. 54,706 satisfiable, 1,048 not. No disagreement.

The first version of that check tested nothing at all, and the way it failed is worth recording because it is the failure a sweep is most likely to have.

It enumerated formulas on four variables from at most three clauses of length three — 5,488 of them — and every single one was satisfiable. Four variables give sixteen assignments and three clauses of three literals can rule out at most three of them, so there is nothing to find. A reduction that reported satisfiable unconditionally, without looking at anything, would have passed 5,488 times out of 5,488.

The gate now requires both answers to occur, in the exhaustive part and in the sampled part separately, and it carries the vacuous case as a rejection: a sweep in which every instance has the same answer must fail, whatever the reduction does.

That is the same rule this collection applies everywhere — an assertion that has never rejected anything proves nothing — arriving in a place where it is unusually easy to miss, because the sweep looked large.

Why go through orthogonal vectors at all

It would be tidier to reduce satisfiability to edit distance directly. The reason nobody does is that orthogonal vectors is a hub.

The problem is simple enough to reduce from easily — two lists of bit vectors, find a pair sharing no coordinate — and it sits at the bottom of a long list of quadratic-looking problems that turn out to be reducible from it. The same conjecture, through the same intermediate problem, gives conditional quadratic bounds for the longest common subsequence, for dynamic time warping, for the diameter of a sparse graph, and for a good many others.

So the work of connecting a conjecture about satisfiability to a fact about strings is done once, at the hub, and each subsequent bound is one gadget construction rather than a fresh argument about assignments. This essay performs the shared half and quotes the specific half, which is where the boundary between what can be checked here and what cannot happens to fall.

The reduction is exponential, and that is not a problem

One thing about split-and-list looks wrong at first sight and is worth resolving, because it is the commonest confusion about arguments of this kind.

The reduction writes down 2n/22^{n/2} vectors. That is exponential in the size of the formula. If it were an algorithm it would be a bad one.

It is not an algorithm; it is a translation used inside a proof by contradiction. The argument is: suppose a fast orthogonal-vectors algorithm existed. Then, given a formula, spend 2n/22^{n/2} time building the lists — which is already less than the 2n2^n that exhaustive search would spend — and run the fast algorithm on them. The total is 2n/2+N2ε2^{n/2} + N^{2-\varepsilon}, which is 2(1ε/2)n2^{(1-\varepsilon/2)n}, which contradicts the hypothesis.

The exponential step is affordable precisely because the thing being contradicted is also exponential. A reduction only has to be cheaper than the bound it is arguing about, and here it is cheaper by a square root.

Split and list: 14 clauses on 8 variables become 32 vectorsEach row is one assignment to half the variables, written as the clauses it fails to satisfy: one column per clause, a filled square where that half leaves the clause unsatisfied. A pair of rows is orthogonal — no clause filled in both — exactly when the two halves together satisfy every clause, so the formula is satisfiable if and only if the two lists contain an orthogonal pair. This one is satisfiable, and the scan found a pair after 25 comparisons. The lists hold 16 and 16 vectors and 16 times 16 is 256, which is every assignment there is.one column per clause; filled means this half fails itvars 1..4vars 5..8#000011110000011#100110011010010#200011010000011#300110011010010#400001000000101#500000001010100#601001000000101#701000001010100#010000100110000#110001111111010#200100100110000#300101111111010#410010100100000#510011111101110#600110100100000#700111111101110rows #1 and #8 fill no clause in commonfirst 8 of 16 rows each side · 14 clausessatisfiable
Fig. 4 The same construction on eight variables, where the two lists hold sixteen vectors each and their product is the two hundred and fifty-six assignments. The lists grow as the square root of the search space, which is what makes the exponential step affordable.

The identity that makes it a bound

The reduction being correct makes it a translation. What makes it a lower bound is arithmetic about its size.

Each list holds 2n/22^{n/2} vectors. A quadratic scan compares every vector on one side against every vector on the other, which is

2n/2×2n/2=2n2^{n/2} \times 2^{n/2} = 2^n

comparisons — exactly the number of assignments exhaustive search would try. Not asymptotically, not up to constants: the same integer.

variables vectors listed quadratic scan exhaustive search
8 32 8,192 8,192
12 128 196,608 196,608
16 512 4,194,304 4,194,304
20 2,048 83,886,080 83,886,080
The quadratic algorithm for orthogonal vectors is exhaustive searchA random 3-CNF formula on n variables and 4n clauses, split and listed. The upper series is what a quadratic scan over the two lists costs and the middle one is what exhaustive search over all assignments costs; they coincide at every point, because each list holds 2^(n/2) vectors and the product of the two lengths is 2^n exactly. The lower series is the number of vectors the reduction writes down. An algorithm for orthogonal vectors faster than N-squared by any polynomial factor would therefore beat exhaustive search for satisfiability by the same factor, which is the statement SETH denies.1010010³10⁴10⁵10⁶10⁷variables in the formulaoperations, or vectorsquadratic scan = exhaustivevectors written downboth axes logarithmic · 4n clauses of 3 literalsthe two upper series coincide
Fig. 5 The two series coinciding at every point, with the number of vectors the reduction writes down below them. The coincidence is asserted as an exact equality on every build rather than observed from the plot.

So an algorithm for orthogonal vectors running in N2εN^{2-\varepsilon} time, on N=2n/2N = 2^{n/2} vectors, would decide satisfiability in 2(1ε/2)n2^{(1-\varepsilon/2)n} — beating exhaustive search by a constant in the exponent, for every kk, which is what the hypothesis says is impossible.

If SETH holds, orthogonal vectors needs N2o(1)N^{2-o(1)}. That implication is performed here.

The second step — from orthogonal vectors to edit distance — is not performed here, and the plate says so in as many words.

The construction encodes each vector as a string, concatenates one list into one long string and the other into another, and arranges the costs so that the edit distance between the two long strings reveals whether an orthogonal pair existed. It works, it is not long, and it needs the gadgets separated by enough padding that no optimal alignment can cross a boundary in an unintended way. The smallest instance that demonstrates the property is far past anything a small exhaustive search can walk.

Which leaves two options: build it and check it on instances too small to be conclusive, or quote it and say so. This collection quotes it and says so, for the same reason the approximate space floor for streaming is quoted rather than demonstrated: a figure that measured something adjacent and let the reader assume the rest would be worse than a citation, because a citation is honest about what it is.

So the marks differ. A solid arrow for the link performed, a dashed one for the link quoted, and the word quoted on the plate.

What the conclusion actually is

Putting the chain together: if SETH is true, there is no algorithm computing edit distance in O(n2ε)O(n^{2-\varepsilon}) time for any constant ε>0\varepsilon > 0.

Four things about that sentence are worth pinning down, because each of them is a place the statement is routinely over-read.

It is conditional. If SETH is false the bound says nothing. Somebody may refute SETH tomorrow, and the day after that a sub-quadratic edit distance would be a thing worth looking for rather than a thing ruled out.

It forbids a constant in the exponent, not any improvement. An algorithm running in O(n2/log2n)O(n^2 / \log^2 n) — which exists, for constant alphabets — is entirely consistent with it, because n2/log2nn^2/\log^2 n is not O(n2ε)O(n^{2-\varepsilon}) for any constant ε\varepsilon. Logarithmic savings are permitted and have been taken.

It is about the worst case and about exactness. Approximation escapes it; so does any restriction on the input. A band of width 2k+12k+1 computes the exact distance in O(nk)O(nk) whenever the answer is at most kk, which on nearly-identical strings is nearly linear. The bound is about instances chosen adversarially, and nothing in it says a particular pair of strings is hard.

The same table inside a band of 3: 3Each cell holds the distance between a prefix of algorithm and a prefix of logarithm. The shaded run from the top left to the bottom right is one optimal alignment; where the table has ties there are others, and this one breaks them towards the diagonal. 58 of 100 cells, 42 skipped.logarithmalgorithm0123112332123443222345323345633434564443456554345654346543one unit = one subproblem given a value58 of 100 cells, 42 skipped
Fig. 6 The escape that is already here: cells outside the band are drawn as outlines because they were never computed. Nothing in the conditional bound is violated by this, because the band is exact only when the answer is small and the bound is about the instances where it is not.

It is falsifiable in a specific direction. Somebody who produces a genuinely sub-quadratic exact worst-case edit distance has not merely improved an algorithm — they have refuted SETH, and with it a large family of conditional bounds resting on the same conjecture. That is what a conditional lower bound is for: it converts “nobody has managed it” into “managing it would settle something else”.

What it does not say about any particular table

There is a reading of this bound that is tempting and wrong, and it is worth blocking explicitly because every other floor on this site invites it correctly.

The comparison-sorting floor is about a specific run: given nn elements, this run made this many comparisons, and the floor is log2n!\log_2 n!, and the gap between them is a number about that run. Every plate in the floors field is drawn that way, with a measurement and a line and a distance between them.

Nothing of the kind is available here. The conditional bound is a statement about the asymptotic worst case of any algorithm, so it does not apply to a table, to a pair of strings, or to a run. There is no line to draw beside a measured cell count, and a plate that drew one would be inventing a comparison.

What can honestly be drawn beside a measurement is the shape — the quadratic curve every method in the tables field sits on — with the bound stated as a sentence about that curve’s exponent rather than as a rule on the plot. Which is why the plates in this essay are about the reduction and about the arithmetic, and none of them puts a floor under a measured algorithm.

That is a limitation of the bound rather than of the drawing, and it is shared by every conditional bound of this kind. They rule out a family of algorithms; they say nothing about the particular one being run.

The company it keeps

Set the four unconditional floors beside it and the difference is visible in what each one rests on.

A conditional bound is a map of the escapes

The four clauses above say what the bound does not forbid, and reading them together turns a negative result into something more useful than a warning: a list of the directions in which progress is still possible, each of which this collection has already taken.

Constant factors are permitted, because n2/wn^2/w is not O(n2ε)O(n^{2-\varepsilon}). Taken: a column computed in machine words divides the work by the register width and is entirely consistent with the bound.

Parameterised savings are permitted, because the bound is about the worst case over all inputs and a parameterised algorithm is fast when its parameter is small. Taken: a band as wide as the answer is Θ(nd)\Theta(nd) and is nearly linear on the near-identical strings that are most of the real workload.

Average-case savings are permitted, for the same reason. Taken: a filter over an index computes a few hundred windows instead of the rectangle, on text where the seeds are selective.

Approximation is permitted. Not taken here, and it is the one direction this collection has not gone — approximating an edit distance to within a constant factor in sub-quadratic time is a real line of work and nothing on this site touches it.

Read that way the conditional bound is doing exactly what a good negative result should: it says the frontal assault is ruled out, and it says precisely which flanks are open, because each clause of the statement is a door. A bound with no conditions in it would be a wall; a bound with four conditions is a map.

It also explains why the tables field looks the way it does. Every method in it is one of those escapes, and none of them is an attempt at the thing the bound forbids — not because anybody consulted the bound before writing them, but because the escapes are where the achievable results are, and the bound is the statement of why.

More than one conjecture, and which one a bound rests on

One more thing about conditional bounds is worth stating, because it decides how much weight a particular one carries.

SETH is not the only hypothesis of its kind. Fine-grained complexity rests on a small number of them — that three numbers summing to zero cannot be found in sub-quadratic time, that all-pairs shortest paths cannot be computed in sub-cubic time, and SETH itself — and different problems are hard under different ones. A quadratic bound conditional on the 3SUM hypothesis and a quadratic bound conditional on SETH are not the same claim, and a problem can be hard under one while nothing is known about it under another.

The consequence is a ranking that is easy to miss: a bound resting on a weaker conjecture is a stronger result. If a problem is hard unless a widely-doubted hypothesis fails, that is weak evidence; if it is hard unless a hypothesis everybody believes fails, that is strong evidence; and if two bounds for the same problem rest on two independent conjectures, the problem is hard unless both fail, which is stronger than either alone.

None of that is demonstrated here, and it is stated because a reader who takes away “edit distance has a conditional lower bound” has taken away a sentence with a variable in it. The premise is part of the claim, the premises differ in how much they are believed, and quoting a conditional bound without its condition is the same omission this collection has spent an entire field cataloguing — arriving, this time, in the one place where the omitted clause is the load-bearing half of the sentence.

What was added here

A fifth kind of lower-bound argument, and the first on this site that is conditional.

The first four are a counting argument, an adversary argument, and two arguments about the number of memory states a machine must occupy. Each of them ends in a proof, and each is demonstrated here by exhaustive construction — the decision tree is counted, the adversary’s hidden edge is produced, the colliding memory states are found and the input that separates them is printed.

This one ends in a conjecture. What is demonstrated is one link of it, exactly, over every formula of a stated size, with the vacuous version of the same check carried as a rejection so that the sweep cannot pass by being empty. What is quoted is the other link, marked as quoted, on a plate that draws the two differently.

Subproblems given a value, against the length of the stringsFull table at a measured slope of 1.98; Rolling frontier at a measured slope of 1.98. The strings are unrelated, over an alphabet of 4. On these axes a slope of 2 is a rectangle filled and a slope of 1 is a line.10010³10⁴10⁵length of each stringsubproblems given a valueFull table · 1.98Rolling frontier · 1.98one unit = one subproblem given a valuesubproblems given a value, n from 32 to 512
Fig. 7 And the quantity the whole argument is about: cells against length, quadratic, on the curve every method in the tables field sits on. The bound says that curve’s exponent is not going to fall, provided something else is true.

That last clause is the essay. A bound with a premise is a different object from a bound without one, they are quoted in the same words, and a collection that draws them the same way is telling its reader something false about how much is known.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

Complexity classConditional lower boundEdit distanceExhaustive searchHonest limitLower boundMeasurementOrthogonal vectorsReductionSatisfiabilityWorst case guarantee