Paddable languages #
A language A is paddable when arbitrary bit strings y can be appended to an instance a by a
polynomial-time map pad a y that preserves membership in A and from which y can be recovered
in polynomial time Berman and Hartmanis. Paddability turns any
polynomial-time many-one reduction into a one-one, length-increasing reduction with a
polynomial-time left inverse: pad the reduct with a self-delimiting copy of the original instance,
followed by enough filler to exceed its length. Together with the polynomial-time
Cantor–Schröder–Bernstein theorem
(Cslib.Complexity.PolyTimeInvertibleLengthIncreasingOneOneReducible.polyTimeIsomorphic), this
shows that paddable languages that are many-one interreducible are polynomial-time isomorphic, and
in particular that any two paddable NP-complete languages are.
The library's languages are sets of typed instances with injective encodings, rather than sets of
strings. Inverting the padded reduction must decode a bit string back into an instance of the
source type, so the reduction theorems assume a total polynomial-time Decoder for the source
encoding. Every standard encoding built from bits, naturals, pairs, options and lists has one.
Source and adaptations #
The source version is the 1975 Cornell technical report
Berman and Hartmanis. Locators in this file refer to that report; the
numbering of the 1977 journal version Berman and Hartmanis has not been
checked. The padding lemma below corresponds to Lemmas 3 and 5 (printed pp. 10–12), which give
length growth and the two-argument padding and read-back condition, and the isomorphism results
combine them with §III, Theorem 1 (printed pp. 7–10), formalized in
Cslib.Complexity.PolyTimeInvertibleLengthIncreasingOneOneReducible.polyTimeIsomorphic.
The report pads strings. Here pad : α → List Bool → α acts on typed instances, the read-back
unpad : α → List Bool is total, and only unpad (pad a y) = y is required of it. The padded
reduction is given a total left inverse rather than the report's partial inverse on its range; as
in the Schröder–Bernstein module, the forward-image test recovers that range. The padding carries
an encoding of the source instance. Over strings that encoding is the instance itself, while here
it must be decoded back into a typed instance, which is what the Decoder hypothesis supplies.
For bit-string sources (encBits, with Turing.MultiTapeTM.Decoder.bits) the hypothesis is met,
and Cslib.Complexity.Paddable.polyTimeIsomorphic_preimage_decode shows that a paddable typed
language is ≅ᵖ to its language of words.
Main definitions #
Cslib.Complexity.Paddable: polynomial-time paddability of a language under an encoding.
Main results #
Cslib.Complexity.Paddable.polyTimeInvertibleLengthIncreasingOneOneReducible: a many-one reduction into a paddable language upgrades to≤₁,ᵢₗ.Cslib.Complexity.Paddable.polyTimeIsomorphic: interreducible paddable languages are≅ᵖ.Cslib.Complexity.NPComplete.polyTimeIsomorphic_of_paddable: two paddableNP-complete languages are≅ᵖ.Cslib.Complexity.PolyTimeIsomorphic.paddable_iff: paddability is invariant under≅ᵖ.Cslib.Complexity.NPComplete.polyTimeIsomorphic_iff_paddable: for a paddableNP-completeB, anNP-complete language is≅ᵖtoBexactly when it is paddable.Cslib.Complexity.Paddable.infinite: a nonempty paddable language is infinite.Cslib.Complexity.Paddable.compl: paddability passes to the complement.Cslib.Complexity.Paddable.preimage_decode,Cslib.Complexity.NPComplete.preimage_decode: reading words through a total decoder preserves paddability andNP-completeness.Cslib.Complexity.Paddable.polyTimeIsomorphic_preimage_decode: a paddable typed language is≅ᵖto its language of words.
References #
- L. Berman, J. Hartmanis, On isomorphisms and density of NP and other complete sets, Cornell TR75-260 (1975), §III, Theorem 1 and Lemmas 3 and 5
- L. Berman, J. Hartmanis, On isomorphisms and density of NP and other complete sets, journal version (numbering not checked)
A language A is paddable under the encoding encA when there are a polynomial-time padding
function pad : α → List Bool → α and a polynomial-time decoding function
unpad : α → List Bool with unpad (pad a y) = y and pad a y ∈ A ↔ a ∈ A. This is the
typed form of the two-argument padding and read-back condition of
Berman and Hartmanis, Lemmas 3 and 5. Recovering the padding makes pad a
injective; nothing is required of unpad off the range of pad.
Padding lemma (Berman and Hartmanis, Lemmas 3 and 5). A
polynomial-time many-one reduction from B to a paddable language A upgrades to a
length-increasing one-one reduction with a polynomial-time left inverse, given a total
polynomial-time decoder for the instances of B. The decoder hypothesis is the typed-model
addition described in the module docstring.
The new reduction pads r b with the framed encoding of b, followed by more filler than any
polynomial bound on the decoded padding allows from an encoding no longer than encB b.
Berman–Hartmanis, paddable form. Two paddable languages that are polynomial-time many-one interreducible are polynomial-time isomorphic, given total polynomial-time decoders for both instance encodings: Berman and Hartmanis, §III, Theorem 1 combined with Lemmas 3 and 5.
Paddability transfers along polynomial-time isomorphisms: conjugate the padding function.
Paddable NP-complete languages are polynomial-time isomorphic
(Berman and Hartmanis, §III, Theorem 1 combined with Lemmas 3 and 5), for
instance types with total polynomial-time decoders.
For a paddable NP-complete language B, an NP-complete language is polynomial-time
isomorphic to B exactly when it is paddable. The reverse direction is
NPComplete.polyTimeIsomorphic_of_paddable (Berman and Hartmanis, §III,
Theorem 1 combined with Lemmas 3 and 5); the forward direction, transport of paddability along
≅ᵖ, is derived here. With B = SAT, the Berman–Hartmanis conjecture says that every
NP-complete language is paddable.
Words read through a decoder #
Reading every word through a total decoder preserves paddability: pad the decoded instance and re-encode it.
A paddable language of typed instances is polynomial-time isomorphic to the language of the
words that decode into it. So, for paddable languages, the typed instance model and the string
model agree up to ≅ᵖ.
Reading every word through a total decoder preserves NP-completeness: the decoder reduces the
word language to A, and the encoding reduces A back to it.