Trivial languages: ∅ and Set.univ #
The two easiest languages to decide, along with their complexity. Both are
decided by writeTM — a machine that writes a fixed symbol to the output
tape and halts in constant time — and therefore belong to every standard
complexity class.
Main definitions #
Language.empty— alias for∅.Language.univ— alias forSet.univ.
Main results #
empty_in_DTIME,univ_in_DTIME— both are inDTIME (fun _ => 3).empty_mem_P,univ_mem_Pempty_mem_NP,univ_mem_NPempty_mem_BPP,univ_mem_BPPempty_mem_PSPACE,univ_mem_PSPACEempty_mem_EXP,univ_mem_EXP
The empty language (no strings accepted).
Equations
Instances For
The universal language (all strings accepted).
Equations
Instances For
Tape.init [] is the canonical output-tape initial value: cell 0 is ▷,
every other cell is □, and the head is at position 0. This is exactly
the well-formedness precondition of writeTM_hoareTime with B = 0.
writeTM halts on every input in 3 steps with sym on output cell 1.
Specialization of writeTM_hoareTime (B = 0) to the initial
configuration, packaged in the exact form required by DecidesInTime.
The empty language is decidable in constant time. writeZeroTM always
writes 0 to output cell 1 and halts in at most 3 steps.
The universal language is decidable in constant time. writeOneTM
always writes 1 to output cell 1 and halts in at most 3 steps.