Padding #
If P = NP, then EXP = NEXP and E = NE Arora and Barak, Section 2.6:
collapses of polynomial classes translate upwards, by the padding argument of Book
Book. The proof pads instances until a slow nondeterministic machine is fast in the
length of the padded instance, decides the padded problem deterministically, and pays for writing
the padding.
Timed reductions #
The general timed-reduction API lives in
CslibFrontier.Computability.Complexity.Classes.Time. In particular,
Cslib.Complexity.preimage_mem_DTIME computes a reduction and then tidily decides its output;
the padding arguments below apply this API to their padded instances. The unconditional
deterministic exponential-padding lemma
Cslib.Complexity.setOf_mem_E_of_computableInPolyTime_pad lives in
CslibFrontier.Computability.Complexity.Classes.EXP.
The padded problem #
A nondeterministic machine ntm decides A within time t. The padded problem
Turing.MultiTapeNTM.padded ntm c consists of the bit words x such that some c * |x| coins
encode an accepting computation of ntm on the word unframe x framed at the start of x, read
as coins of the choice table (Turing.MultiTapeNTM.checkChoices). The general certificate
characterization Turing.MultiTapeNTM.DecidesInTime.mem_iff_exists_checkChoices lives with
checkChoices in CslibFrontier.Computability.Complexity.Classes.NP.Nondeterministic. The padded
problem is in NP with respect to encBits by definition: checking the coins is polynomial-time.
If every computation path on
enc a with at least t a steps has halted, and c * |x| is at least M * t a for the number
M of actions, the padded word x = frame (enc a) ++ u is in the padded problem exactly when
a ∈ A (Turing.MultiTapeNTM.DecidesInTime.frame_append_mem_padded_iff). So every problem in
NTIME t is decided by a problem in NP on the words frame (enc a) ++ u with t |enc a| ≤ |u|
(Cslib.Complexity.exists_mem_NP_frame_append_mem_iff_of_mem_NTIME), and for exponential padding
u = 1^{2 ^ f n} the padded word is written within time 2 ^ O(f n)
(Cslib.Complexity.exists_computableInO_frame_append_two_pow).
The translation lemma #
If NP ⊆ P for problems on bit words, and t n is computable in unary from any word of length n
within time O(T n), then NTIME t ⊆ ⋃ d, DTIME ((n + T n + 1) ^ d)
(Cslib.Complexity.NTIME_subset_iUnion_DTIME_of_NP_subset_P): the padded problem with padding
t n is decided in time polynomial in n + t n. For t n = 2 ^ f n with f computable in unary
in polynomial time and n ≤ f n, 2 ^ f n is computed in unary by doubling, within time
O((f n + 1) * 2 ^ f n) using the quantitative machine API
(Turing.MultiTapeTM.ComputableInO.unary_two_pow), and
NTIME (2 ^ f n) ⊆ ⋃ d, DTIME (2 ^ (d * f n))
(Cslib.Complexity.NTIME_two_pow_subset_iUnion_DTIME_of_NP_subset_P). With f n = (k + 1) * n
and f n = n ^ (k + 1) this gives NE ⊆ E and NEXP ⊆ EXP.
The hypothesis is NP ⊆ P for problems on bit words, under encBits; the conclusions hold for
problems on any type, under any encoding.
The proof only uses the P decider of a padded problem on padded instances. So the translation
lemma holds under the weaker hypothesis that every problem in NP agrees with some problem in P
on the padded words frame u ++ 1^{t |u|}
(Cslib.Complexity.NTIME_subset_iUnion_DTIME_of_agree_padded). For exponential padding this is
Cslib.Complexity.ExpPaddedNPEasy, the hypothesis that NP is easy on exponentially padded
instances. It gives NE ⊆ E and NEXP ⊆ EXP, and it also follows from easiness of NP on
average (CslibFrontier.Computability.Complexity.Classes.AverageCase.WorstCase).
The unconditional pullback lemmas Cslib.Complexity.preimage_mem_NTIME_of_mem_NP and
Cslib.Complexity.preimage_pad_mem_NEXP compose a timed deterministic map with an NP verifier;
exponential padding yields an NEXP decider without a collapse hypothesis.
Main definitions #
Turing.MultiTapeNTM.checkPadded: the verifier of padded instances.Turing.MultiTapeNTM.padded: the padded problem of a nondeterministic machine.Cslib.Complexity.ExpPaddedNPEasy: every problem inNPagrees with a problem inPon exponentially padded instances.
Main results #
Cslib.Complexity.preimage_mem_NTIME_of_mem_NP,Cslib.Complexity.preimage_pad_mem_NEXP,Cslib.Complexity.preimage_append_two_pow_mem_NEXP: unconditional timed pullback ofNP, including exponentially padded inputs.Cslib.Complexity.preimage_pad_prod_id_mem_EXP,Cslib.Complexity.preimage_pad_prod_two_pow_mem_EXP: unconditional exponential-padding pullback ofPon paired inputs intoEXP.Turing.MultiTapeNTM.padded_mem_NP,Turing.MultiTapeNTM.DecidesInTime.frame_append_mem_padded_iff: the padded problem is inNP, and decides the original problem on padded instances.Cslib.Complexity.exists_mem_NP_frame_append_mem_iff_of_mem_NTIME: every problem inNTIME tis decided on instances padded by at leastt nbits by a problem inNP.Cslib.Complexity.exists_computableInO_frame_append_two_pow: exponentially padded instances are written within time2 ^ O(f n).Cslib.Complexity.NTIME_subset_iUnion_DTIME_of_NP_subset_P: the translation lemma;Cslib.Complexity.NTIME_subset_iUnion_DTIME_of_agree_padded: the same from agreement on padded instances.Cslib.Complexity.NE_subset_E_of_expPaddedNPEasy,Cslib.Complexity.NEXP_subset_EXP_of_expPaddedNPEasy: ifNPis easy on exponentially padded instances, thenNE ⊆ EandNEXP ⊆ EXP.Cslib.Complexity.NEXP_subset_EXP_of_NP_subset_P,Cslib.Complexity.EXP_eq_NEXP_of_P_eq_NP: ifP = NP, thenEXP = NEXP.Cslib.Complexity.NE_subset_E_of_NP_subset_P,Cslib.Complexity.E_eq_NE_of_P_eq_NP: ifP = NP, thenE = NE.
References #
The verifier of padded instances. It accepts when the certificate, read as coins of the
choice table, replays a computation path of ntm on the word framed at the start of the instance
that halts with output [true]; the rest of the instance is padding.
Checking a padded instance is polynomial-time.
The padded problem is in NP, with certificates of length c * |x|.
Padded instances. If ntm decides A within t, then the padded word
frame (enc a) ++ u is in the padded problem of ntm with c coins per bit exactly when a ∈ A,
as soon as c * |frame (enc a) ++ u| is at least M * t a, for the number M of actions.
The translation lemma #
NP is easy on exponentially padded instances: every problem B ∈ NP agrees with some
problem B' ∈ P on the words frame u ++ 1^m with 2 ^ |u| ≤ m. This holds if NP ⊆ P
(Cslib.Complexity.expPaddedNPEasy_of_NP_subset_P), and also if every distributional NP problem
with a polynomial-time computable ensemble has a polynomial-time heuristic scheme
(Cslib.Complexity.expPaddedNPEasy_of_DistNP_subset_HeurP). It suffices for the padding
arguments below.
If NP ⊆ P, then NP is easy on exponentially padded instances.
Writing padded instances #
Writing an exponentially padded instance. If f is computable in unary in polynomial time
and n ≤ f n, then a ↦ frame (enc a) ++ 1^{2 ^ f |enc a|} is computable within time
O(2 ^ (d * f n)) for some d.
Padding into NP. A problem A decidable by a nondeterministic machine within time
O(t n) is decided on padded instances by a problem in NP: some B ∈ NP contains
frame (enc a) ++ u, for every padding u of length at least t |enc a|, exactly when a ∈ A.
The problem B is the padded problem of the machine (Turing.MultiTapeNTM.padded).
The translation lemma on padded instances. Suppose every problem in NP agrees with some
problem in P on the words frame u ++ 1^{t |u|}, and t n is computable in unary from any word
of length n within time O(T n). Then every problem decidable by a nondeterministic machine
within time O(t n) is decidable deterministically within time O((n + T n + 1) ^ d) for some
d: the padded problem with padding t n agrees with a problem in P on padded instances, and
the padding is written within time O(n + T n).
The translation lemma. If NP ⊆ P for problems on bit words, and t n is computable in
unary from any word of length n within time O(T n), then every problem decidable by a
nondeterministic machine within time O(t n) is decidable deterministically within time
O((n + T n + 1) ^ d) for some d: the padded problem with padding t n is in NP, hence in
P, and the padding is written within time O(n + T n).
Padding exponential time on padded instances. If NP is easy on exponentially padded
instances, and f is computable in unary in polynomial time with n ≤ f n, then every problem
decidable by a nondeterministic machine within time O(2 ^ f n) is decidable deterministically
within time O(2 ^ (d * f n)) for some d.
Padding exponential time. If NP ⊆ P for problems on bit words, and f is computable in
unary in polynomial time with n ≤ f n, then every problem decidable by a nondeterministic machine
within time O(2 ^ f n) is decidable deterministically within time O(2 ^ (d * f n)) for some
d.
Exponential time #
If NP is easy on exponentially padded instances, then NE ⊆ E, by the padding argument
of Book Book.
If NP ⊆ P, then NE ⊆ E, by padding Book.
If NP is easy on exponentially padded instances, then NEXP ⊆ EXP, by padding.
If NP ⊆ P, then NEXP ⊆ EXP Arora and Barak, Section 2.6.
If P = NP, then E = NE, by padding Book.
If P = NP, then EXP = NEXP Arora and Barak, Section 2.6.
Upward translation from NP to NTIME and NEXP #
Pulling back a problem B ∈ NP encBits along a function g : α → List Bool computable within
time O(T₀ (enc a).length) places g ⁻¹' B in NTIME enc (fun n => (T₀ n + 1) ^ d) for
some d: a deterministic machine writes g a to a buffer tape and hands off to the halting
fair-coin certificate verifier for B.
Pulling back B ∈ NP encBits along the exponential-padding map
a ↦ frame (enc a) ++ List.replicate (2 ^ f (enc a).length) true, where f is polynomial-time in
unary with n ≤ f n, gives a problem in NEXP enc.
Pulling back B ∈ NP encBits along x ↦ x ++ List.replicate (2 ^ x.length) true gives a
problem in NEXP encBits.
Pulling back B ∈ P (encPair encBits encBits) along
(a, y) ↦ (frame (enc a) ++ List.replicate (2 ^ f (enc a).length) true, y), where f is
polynomial-time in unary, gives a problem in EXP (encPair enc encBits).
Pulling back B ∈ P (encPair encBits encUnary) along
a ↦ (frame (enc a) ++ List.replicate (2 ^ f (enc a).length) true, 2 ^ g (enc a).length), where
f and g are polynomial-time in unary with n ≤ f n, gives a problem in EXP enc.