TMSAT is NP-complete #
TMSAT Arora and Barak, draft, Theorem 2.9 is the set of instances
⟨α, x, 1ⁿ, 1ᵗ⟩ (Cslib.Complexity.TMSATInstance) such that some witness u of exactly n bits
makes the machine described by α accept the pair ⟨x, u⟩ within t steps.
- Machines are the library's native binary multi-tape machines, described by
Turing.MultiTapeTM.Universal.Desc, and run by the universal interpreterTuring.MultiTapeTM.Universal.universal. Accepting means having halted with the output[true]after the given number of steps (Cslib.Complexity.TMSATInstance.Accepts). On the description of a machine this is the machine's own run (Cslib.Complexity.TMSATInstance.accepts_desc_iff). Every description is meaningful: the interpreter is total. - The pair
⟨x, u⟩isencPair encBits encBits (x, u) = frame x ++ u, the pairing thatNPverifiers read. - Instances are encoded by
Cslib.Complexity.encTMSATInstanceas the tuple of the description (Turing.MultiTapeTM.Universal.eDesc), the input bits, and the witness length and the step bound in unary, as1ⁿand1ᵗin the source. With a binary step bound the problem is complete for exponential time instead (Cslib.Complexity.BoundedHalting).
Membership in NP (Cslib.Complexity.TMSAT.mem_NP): the verifier reads the first n bits of
a certificate of length |enc a|, which is at least n as the witness length is written in unary,
and runs the interpreter for t steps, which is polynomial in the instance with t in unary
(Turing.MultiTapeTM.Universal.computableInPolyTime_universal).
Hardness (Cslib.Complexity.TMSAT.npHard): a problem in NP enc has a verifier computed by a
machine within time c (n + 1) ^ d on inputs of length n, with certificates of length
p |enc a|. The instance a maps to the description of that machine, the input enc a, the
witness length p |enc a| and the step bound c (2 |enc a| + p |enc a| + 2) ^ d, which bounds the
running time on every certificate of the prescribed length.
Main definitions #
Cslib.Complexity.TMSATInstance: instances⟨α, x, 1ⁿ, 1ᵗ⟩.Cslib.Complexity.encTMSATInstance: their encoding.Cslib.Complexity.TMSATInstance.Accepts: acceptance of a witness.Cslib.Complexity.TMSAT: the language.Cslib.Complexity.TMSAT.verifier: its verifier.
Main results #
Cslib.Complexity.TMSATInstance.accepts_desc_iff: acceptance on the description of a machine.Cslib.Complexity.TMSAT.mem_NP:TMSATis inNP.Cslib.Complexity.TMSAT.npHard: everyNPproblem reduces toTMSAT.Cslib.Complexity.TMSAT.npComplete:TMSATisNP-complete.
References #
An instance ⟨α, x, 1ⁿ, 1ᵗ⟩ of Cslib.Complexity.TMSAT
Arora and Barak, draft, Theorem 2.9.
- machine : Turing.MultiTapeTM.Universal.Desc
The description
αof the machine. The input
x.- witnessLength : ℕ
The length
nof the witnesses. - steps : ℕ
The step bound
t.
The tuple of the fields of encTMSATInstance.
Encoding of TMSATInstance as the tuple of the description, the input bits, and the witness
length and the step bound in unary.
Acceptance on the description of a machine: the machine, run on ⟨x, u⟩ for t steps,
has halted with output [true].
Deciding whether inst x accepts w x is computable in polynomial time whenever inst and
w are.
TMSAT Arora and Barak, draft, Theorem 2.9: the instances
⟨α, x, 1ⁿ, 1ᵗ⟩ for which some witness u of exactly n bits makes the machine described by
α accept ⟨x, u⟩ within t steps.
Membership in NP #
The verifier of TMSAT: run the machine on ⟨x, u⟩, where u is the first n bits of the
certificate.
The witness length is at most the length of the encoded instance, since it is written in unary.
TMSAT.verifier verifies TMSAT with certificates as long as the encoded instance.
The verifier of TMSAT is polynomial-time.
Hardness #
The step bound of the reduction, c (2 m + p m + 2) ^ d for an instance of encoded length
m, as a polynomial in m.
For a polynomial-time pair verifier V on encPair enc encBits, a block-length polynomial p
and block count k, construct a polynomial-time map f : α → TMSATInstance with
(f a).witnessLength = p.eval (enc a).length whose step bound suffices to simulate V (a, w) on
every word w of length k * p.eval (enc a).length.
TMSAT is NP-hard: every problem in NP, with any encoding of its instances, reduces
to it in polynomial time through a machine computing its verifier.
TMSAT is NP-complete Arora and Barak, draft, Theorem 2.9.