A P-bi-immune problem in E #
Exponential time contains P-bi-immune problems Balcázar and Schöning.
This module constructs one by a priority (slow) diagonalization over all machines,
Cslib.Complexity.BiImmune.language, and proves that it is in E
(Cslib.Complexity.BiImmune.language_mem_E) and P-bi-immune
(Cslib.Complexity.BiImmune.isBiImmune_language).
Words are enumerated by index (Cslib.Complexity.Ladner.word), as are machines: the machine with
index i is the one described at the start of the i-th word, run by the universal function
(Cslib.Complexity.Ladner.runIndexed). Requirement e concerns the machine with index e / 2.
It asks for a word accepted by that machine inside the language when e is even, and outside it
when e is odd. At stage n, requirement e is eligible (Cslib.Complexity.BiImmune.Eligible)
when e < n, it has not acted before, and the machine accepts the n-th word within n steps.
The least eligible requirement e, if any, acts (Cslib.Complexity.BiImmune.act is e + 1). The
n-th word belongs to the language exactly when the requirement acting at stage n is even.
Otherwise the word stays outside.
Each requirement acts at most once. If the machine of requirement e accepts at infinitely many
stages, then e eventually acts: past the finitely many actions of smaller requirements, e is
the least eligible requirement (Cslib.Complexity.BiImmune.exists_act_eq_succ). Let B be an
infinite problem in P, decided by a machine within a polynomial time bound, and let i be an
index of that machine. The words of B have unboundedly large indices, and from some point on
the time bound is below the index. So both requirements 2 i and 2 i + 1 act, at stages whose
words the machine accepts. These words are in B, one inside the language and one outside
(Cslib.Complexity.BiImmune.exists_act_mem). Hence the language is P-bi-immune
(Cslib.Complexity.isBiImmune_P_iff).
Stage n runs at most n machines for n steps each, so the table of the first n actions is
polynomial-time in n in unary (Cslib.Complexity.BiImmune.computableInPolyTime_table). The word
y has index below 2 ^ (|y| + 1), so its membership is computed in polynomial time from
(y, 2 ^ |y|), and the language is in E
(Cslib.Complexity.Ladner.setOf_index_mem_E_of_computableInPolyTime).
By Berman's theorem (CslibFrontier.Computability.Complexity.Classes.Immune.Complete), the language
is
not complete for E or EXP (Cslib.Complexity.BiImmune.not_polyTimeComplete_E_language,
Cslib.Complexity.BiImmune.not_polyTimeComplete_EXP_language).
The problem is decidable, so every machine deciding it runs in superpolynomial time on almost every
instance (Cslib.Complexity.BiImmune.isPolyTimeCore_univ_language): the universe is a polynomial
complexity core (CslibFrontier.Computability.Complexity.Classes.Immune.PolyTimeCore).
Main definitions #
Cslib.Complexity.BiImmune.accepts: the machine of a requirement accepts at a stage.Cslib.Complexity.BiImmune.actStep,Cslib.Complexity.BiImmune.table,Cslib.Complexity.BiImmune.act: the requirement acting at each stage.Cslib.Complexity.BiImmune.language: theP-bi-immune problem.
Main results #
Cslib.Complexity.BiImmune.act_eq_succ_iff,Cslib.Complexity.BiImmune.act_eq_zero_iff: the least eligible requirement acts.Cslib.Complexity.BiImmune.exists_act_eq_succ: a requirement whose machine accepts at infinitely many stages acts.Cslib.Complexity.BiImmune.language_mem_E: the problem is inE.Cslib.Complexity.BiImmune.isBiImmune_language: the problem isP-bi-immune.Cslib.Complexity.BiImmune.exists_mem_E_isBiImmune_P,Cslib.Complexity.BiImmune.exists_mem_EXP_isBiImmune_P:E, and soEXP, containP-bi-immune problems.Cslib.Complexity.BiImmune.not_polyTimeComplete_E_language,Cslib.Complexity.BiImmune.not_polyTimeComplete_EXP_language: the problem is not complete forEorEXPunder polynomial-time many-one reductions.Cslib.Complexity.BiImmune.isPolyTimeCore_univ_language,Cslib.Complexity.BiImmune.exists_mem_E_isPolyTimeCore_univ: every machine deciding the problem runs in superpolynomial time almost everywhere.
References #
The construction #
The machine of requirement e accepts at stage n: the machine with index e / 2 accepts the
n-th word within n steps.
The action at stage T.length, from the table T of the earlier actions: e + 1 for the
least requirement e < T.length that has not acted and whose machine accepts, or 0.
The table of the actions at the first n stages.
The action at stage n: e + 1 if requirement e acts, 0 if none does.
The P-bi-immune problem: the words whose stage is used by an even requirement.
The least eligible requirement acts #
Requirement e is eligible at stage n: e < n, it has not acted before, and its machine
accepts at stage n.
The problem is in E #
The tables of actions are polynomial-time in their length, in unary.
The actions are polynomial-time in the stage, in unary.
The problem is in E: the decision at each stage is polynomial-time in the stage
(Cslib.Complexity.Ladner.setOf_index_mem_E_of_computableInPolyTime).
The problem is P-bi-immune #
Every infinite problem in P is met by requirements of both parities: for r < 2, some
requirement 2 * i + r acts at a stage whose word is in the problem.
The problem is P-bi-immune.
E contains a P-bi-immune problem Balcázar and Schöning.
EXP contains a P-bi-immune problem.
The problem is not complete #
The problem is not complete for E under polynomial-time many-one reductions.
The problem is not hard for E under polynomial-time many-one reductions.
The problem is not complete for EXP under polynomial-time many-one reductions.
The problem is not hard for EXP under polynomial-time many-one reductions.
Every decider is slow almost everywhere #
The problem is decidable: it is decided within time c₁ 2 ^ (k n) + c₂.
Every machine deciding the problem runs in superpolynomial time almost everywhere: for every
polynomially bounded p, it halts within p |x| steps on only finitely many x.
E contains a decidable problem on which every decider runs in superpolynomial time almost
everywhere Balcázar and Schöning.