Padding argument

From Wikipedia, the free encyclopedia

Template:Short description In computational complexity theory, the padding argument is a tool to conditionally prove that if some complexity classes are equal, then some other bigger classes are also equal. This type of argument is also sometimes used for space complexity classes, alternating classes, and bounded alternating classes.

Example

EXP=NEXP

Theorem. If P = NP then EXP = NEXP.

Proof. π–€π–·π–―βŠ†π–­π–€π–·π–― by definition, so it suffices to show π–­π–€π–·π–―βŠ†π–€π–·π–―.

Let L be a language in NEXP, so there is a non-deterministic Turing machine M that verifies x∈L in nondeterministic time 2|x|c, for some constant natural number c. Now define the padded language

L={x12|x|c∣x∈L},

where '1' is a symbol not occurring in L.

L is in NP: Given input x, first verify that it has the form x=x12|x|c and reject if it does not. If it has the correct form, verify x∈L using M, which takes non-deterministic time 2|x|c=π—‰π—ˆπ—…π—’(|x|).

By the assumption P = NP, L is in P, so there is a deterministic machine DM that decides L in polynomial time.

We can then decide L in deterministic exponential time. Given input x, write down x=x12|x|c, and use DM to decide if x∈L. This takes time π—‰π—ˆπ—…π—’(|x|+2|x|c)=𝖀𝖷𝖯(|x|).

Ladner's theorem

Another theorem proven by the padding argument is

Ladner's theorem. If 𝖯≠𝖭𝖯 then there exists a computational problem that is NP-intermediate: in π–­π–―βˆ–π–― but not NP-complete.

Proof. Assume that 𝖯≠𝖭𝖯. Let SAT be the satisfiable formula language. It is NP-complete. Now, given any function H:β„•β†’β„• such that H(n) is computable in π—‰π—ˆπ—…π—’(n) time, we can define the padded languageπ–²π– π–³βˆ—:={Ο•1|Ο•|H(|Ο•|):Ο•βˆˆπ–²π– π–³}Claim 1: SAT* is NP. This is demonstrated by this algorithm

  • Given a formula Ο•, if it does not conform to the format of SAT*, return False.
  • Else, remove its padding to obtain a shorter formula Ο•, and test whether the padding has length H(|Ο•|). If not, return False.
  • Else, check if Ο•βˆˆπ–²π– π–³ in nondeterministic time π—‰π—ˆπ—…π—’(|Ο•|)β‰€π—‰π—ˆπ—…π—’(|Ο•|).

Claim 2: If H is bounded, then SAT* is NP-complete. Since H is bounded, padding takes in polynomial time, reducing SAT to SAT*.

Claim 3: If Hβ†’βˆž, then SAT* is not NP-complete.

Assume otherwise, then there is an algorithm T, which reduces the SAT problem to SAT* in time nc. Then, we can decide SAT in polynomial time as follows:

  • Given some formula Ο•, if T(Ο•) does not conform to the format of SAT*, return False.
  • Else, by runtime upper bound, |Ο•1|H(|Ο•1|)+|Ο•1|=|Ο•11|Ο•1|H(|Ο•1|)|=|T(Ο•)|≀|Ο•|c.
  • We repeat this process, each time obtaining a shorter formula Ο•1,Ο•2, until we either
    • hit a formula that does not conform to the format of SAT*, and we return False
    • or obtain a formula Ο•k with length |Ο•k|≀C for some constant C, in which case we simply brute force enumerate all O(2C) possible truth value assignments for Ο•k. If Ο•k is satisfiable, then return True, else return False.

Provided that C is chosen large enough so that H(m)>2c for all m>C, we can make it so that every iteration reduces the length: |Ο•1|2≀|Ο•|,|Ο•2|2≀|Ο•1|,,|Ο•k|2k≀|Ο•|Thus, this requires k=O(lnln|Ο•|) iterations, and thus the whole algorithm runs in time π—‰π—ˆπ—…π—’(|Ο•|). The idea is similar to kernelization.

Step 4: Construct an H, such that H is polytime computable, Hβ†’βˆž, and SAT* is not P.

Define H as follows: H(0)=0,H(1)=1, and for larger n, H(n) is the smallest positive integer i, such that

  • i≀f(n).
  • For any Ο• of length |Ο•|<g(n), the Turing machine Mi correctly decides Ο•βˆˆπ–²π– π–³βˆ— with runtime ≀i|Ο•|i.
  • If no such Turing machine exists, then simply set H(n)=f(n).

where f(n)=g(n)=⌈lnlnnβŒ‰ are two functions designed to make H(n) computable in time π—‰π—ˆπ—…π—’(n).

Claim: H(n) is well-defined and computable in π—‰π—ˆπ—…π—’(n).

This is shown by induction on n. The base cases are simply memorized. For the induction step, test all f(n) Turing machines on all 2g(n) possible formulas Ο• of length |Ο•|≀g(n), for i|Ο•|i≀f(n)g(n)f(n) steps. We also need to test whether Ο•βˆˆπ–²π– π–³βˆ—, which takes up to 2g(n) time by checking all rows of its truth table. The total time taken is bounded above by f(n)2g(n)f(n)g(n)f(n)+2g(n)2g(n)β‰€π—‰π—ˆπ—…π—’(n)Now, if SAT* is in P, then let Mm be a machine that decides SAT* in time CnC. For sufficiently large n such that f(n)>max(C,C,m), the construction allows Mm to be considered in the construction of H(n). This shows that, for all large enough n, we have H(n)=m, and so by claim 2, SAT* is NP-complete, but then we have an NP-complete problem that is in P, contradicting the assumption that 𝖯≠𝖭𝖯.

Thus, SAT* is not in P. This implies that H(n) would be forced to grow towards infinity. By Claim 3, SAT* is not NP-complete.

See also

References