Padding argument
From Wikipedia, the free encyclopedia
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.
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 in nondeterministic time
, for some constant natural number c. Now define the padded language
where '1' is a symbol not occurring in L.
is in NP: Given input
, first verify that it has the form
and reject if it does not. If it has the correct form, verify
using M, which takes non-deterministic time
.
By the assumption P = NP, is in P, so there is a deterministic machine DM that decides
in polynomial time.
We can then decide L in deterministic exponential time. Given input , write down
, and use DM to decide if
. This takes time
.
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
such that
is computable in
time, we can define the padded language
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
. If not, return False.
- Else, check if
in nondeterministic time
.
Claim 2: If is bounded, then SAT* is NP-complete. Since
is bounded, padding takes in polynomial time, reducing SAT to SAT*.
Claim 3: If , then SAT* is not NP-complete.
Assume otherwise, then there is an algorithm , which reduces the SAT problem to SAT* in time
. Then, we can decide SAT in polynomial time as follows:
- Given some formula
, if
does not conform to the format of SAT*, return False.
- Else, by runtime upper bound,
.
- We repeat this process, each time obtaining a shorter formula
until we either
- hit a formula that does not conform to the format of SAT*, and we return False
- or obtain a formula
with length
for some constant
, in which case we simply brute force enumerate all
possible truth value assignments for
. If
is satisfiable, then return True, else return False.
Provided that is chosen large enough so that
for all
, we can make it so that every iteration reduces the length:
Thus, this requires
iterations, and thus the whole algorithm runs in time
. The idea is similar to kernelization.
Step 4: Construct an , such that
is polytime computable,
, and SAT* is not P.
Define as follows:
, and for larger
,
is the smallest positive integer
, such that
.
- For any
of length
, the Turing machine
correctly decides
with runtime
.
- If no such Turing machine exists, then simply set
.
where are two functions designed to make
computable in time
.
Claim: is well-defined and computable in
.
This is shown by induction on . The base cases are simply memorized. For the induction step, test all
Turing machines on all
possible formulas
of length
, for
steps. We also need to test whether
, which takes up to
time by checking all rows of its truth table. The total time taken is bounded above by
Now, if SAT* is in P, then let
be a machine that decides SAT* in time
. For sufficiently large
such that
, the construction allows
to be considered in the construction of
. This shows that, for all large enough
, we have
, 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 would be forced to grow towards infinity. By Claim 3, SAT* is not NP-complete.