Documentation

Complexity.Computability.Complexity.FineGrained.OrthogonalVectors

The strong exponential time hypothesis implies the orthogonal vectors hypothesis #

The split-and-list reduction of Williams [Wil05] (Cslib.Complexity.toOV) splits the n distinct variables of a formula with m clauses into halves of ⌊n / 2⌋ and ⌈n / 2⌉ variables. To each assignment of a half it assigns the vector of length m whose coordinate j is true when no literal of clause j on a variable of the half is satisfied (Cslib.Complexity.OV.clauseVector). Two such vectors, one for each half, are orthogonal exactly when every clause is satisfied by one of the two partial assignments, that is when together they satisfy the formula. So the formula is satisfiable exactly when the instance toOV φ, of 2 ^ ⌊n / 2⌋ and 2 ^ ⌈n / 2⌉ vectors of dimension m, is in OV (Cslib.Complexity.toOV_mem_OV_iff).

The reduction writes its output of about 2 ^ ⌈n / 2⌉ m bits within time 2 ^ ⌈n / 2⌉ times a polynomial in the length of the encoded formula (Cslib.Complexity.exists_computableInO_toOV). The vectors are streamed to the output one at a time (Turing.MultiTapeTM.ComputableTidilyInTimeAndSpace.iterate_unary_stream_sum); accumulating them in a list would cost time quadratic in the number of vectors. Then a decider for OV within time N ^ (2 - ε) times a polynomial in the dimension, on N vectors, decides SAT within time 2 ^ ((1 - ε / 2) n) times a polynomial, for 0 < ε ≤ 1 (Cslib.Complexity.DecidableInTimeO.decidableInExpTime_SAT), and the strong exponential time hypothesis implies the orthogonal vectors hypothesis (Cslib.Complexity.OVH_of_SETH).

The orthogonal vectors hypothesis is stated with a polynomial factor in the dimension. Its form for dimension c log N, which follows from the strong exponential time hypothesis with the sparsification lemma, is not proved here.

Main definitions #

Main results #

References #

Orthogonality #

theorem Cslib.Complexity.OV.orthogonal_map_map {γ : Type u_1} {l : List γ} {f g : γ → Bool} :
Orthogonal (List.map f l) (List.map g l) ↔ ∀ x ∈ l, f x = false ∨ g x = false

Vectors indexed by the same list are orthogonal when no index is true in both.

The split-and-list reduction #

Whether the assignment numbered by i on the variables vs satisfies a literal of the clause c on a variable of vs.

Instances For

    The vector of the assignment numbered by i on the variables vs: coordinate j is true when the assignment satisfies no literal of clause j of φ on a variable of vs.

    Instances For

      The vectors of the 2 ^ |vs| assignments numbered on the variables vs.

      Instances For

        The first ⌊n / 2⌋ of the n distinct variables.

        Instances For

          The last ⌈n / 2⌉ of the n distinct variables.

          Instances For

            The split-and-list reduction [Wil05]: the vectors of the assignments of the first ⌊n / 2⌋ and of the last ⌈n / 2⌉ of the n distinct variables of a formula.

            Instances For
              theorem Cslib.Complexity.OV.orthogonal_clauseVector_iff {φ : Logic.PL.CNF ℕ} {vs₁ vs₂ : List ℕ} (hdisj : vs₁.Disjoint vs₂) (hcover : ∀ v ∈ φ.vars, v ∈ vs₁ ∨ v ∈ vs₂) (i₁ i₂ : ℕ) :
              Orthogonal (clauseVector φ vs₁ i₁) (clauseVector φ vs₂ i₂) ↔ Logic.PL.CNF.eval (fun (v : ℕ) => if v ∈ vs₁ then Logic.PL.bitsAssignment vs₁ i₁ v else Logic.PL.bitsAssignment vs₂ i₂ v) φ = true

              Orthogonal vectors are satisfying assignments. For disjoint lists of variables vs₁ and vs₂ covering the variables of φ, the vectors of the assignments numbered by i₁ on vs₁ and by i₂ on vs₂ are orthogonal exactly when the two assignments together satisfy φ.

              The split-and-list reduction is correct [Wil05]: toOV φ ∈ OV ↔ φ ∈ SAT.

              Sizes #

              theorem Cslib.Complexity.OV.dim_le {p : List (List Bool) × List (List Bool)} {b : ℕ} (h : ∀ v ∈ p.1 ++ p.2, v.length ≤ b) :
              dim p ≤ b

              The dimension is at most a bound on the lengths of all vectors.

              The vectors of toOV φ have one coordinate for each clause.

              Running time #

              @[reducible, inline]

              The states of the stream of vectors: a formula, a list of variables, and the number of the next assignment.

              Instances For
                @[reducible, inline]

                Stream states encoded as framed tuples.

                Instances For

                  Computing the vector of a numbered assignment is polynomial-time.

                  Streaming the vectors of a half of the variables: the vectors of the 2 ^ |half φ| assignments numbered on half φ, each wrapped by wrap, followed by fin, are written within time 2 ^ |half φ| times a polynomial in the length of the encoded formula.

                  theorem Cslib.Complexity.exists_computableInO_toOV :
                  ∃ (e : ℕ), Turing.MultiTapeTM.ComputableInO toOV encCNF encOV (fun (φ : Logic.PL.CNF ℕ) => 2 ^ (φ.numVars - φ.numVars / 2) * ((encCNF φ).length + 1) ^ e) fun (φ : Logic.PL.CNF ℕ) => 2 ^ (φ.numVars - φ.numVars / 2) * ((encCNF φ).length + 1) ^ e

                  The split-and-list reduction is fast: it writes its output within time 2 ^ ⌈n / 2⌉ times a polynomial in the length of the encoded formula, on formulas with n variables.

                  Williams' theorem #

                  theorem Cslib.Complexity.DecidableInTimeO.decidableInExpTime_SAT {ε : ℝ} (hε : 0 < ε) {e : ℕ} (h : DecidableInTimeO OV encOV fun (p : List (List Bool) × List (List Bool)) => ↑(p.1.length + p.2.length) ^ (2 - ε) * (↑(OV.dim p) + 1) ^ e) :

                  Williams' theorem [Wil05]: a decider for OV within time N ^ (2 - ε) times a polynomial in the dimension, on instances of N vectors, gives a decider for SAT within time 2 ^ ((1 - ε / 2) n) times a polynomial in the length of the encoded formula, on formulas with n variables, for 0 < ε ≤ 1; for ε > 1 it gives the exponent 1 / 2 of the reduction.

                  The strong exponential time hypothesis implies the orthogonal vectors hypothesis [Wil05].