Tape alphabet used by the linear-space NTM deciding LADDER_DFA.
It consists of the input symbols of the DFA (ofAlpha), a separator used to encode the
pair ⟨u, v⟩, and a blank symbol.
- ofAlpha {α : Type} : α → LadderTapeSymbol α
- separator {α : Type} : LadderTapeSymbol α
- blank {α : Type} : LadderTapeSymbol α
Instances For
Instances For
The default tape symbol is blank.
The on-tape language version of LADDER_DFA: tape words w that encode some pair (u, v)
of strings such that there is a ladder y₁, …, y_k ∈ L(B) of common-length strings (consecutive
ones differing in a single symbol) with y₁ = u and y_k = v.
Instances For
The phases of the linear-space NTM that decides LADDER_DFA.
readInput: reading and buffering the input pair⟨u, v⟩from the tape.searchFwd: nondeterministically guessing the next rung of the ladder.searchBack: moving the head back to the working area between rungs.accepted/rejected: terminal states.
- readInput : LadderPhase
- searchFwd : LadderPhase
- searchBack : LadderPhase
- accepted : LadderPhase
- rejected : LadderPhase
Instances For
Internal control state of the LADDER_DFA NTM.
phaseis the current phase.bufis the buffered tape input being parsed inreadInput.yis the current rung of the ladder (a string inL(B)of the common length).vis the target endpoint of the ladder.counterbounds the number of remaining rungs to try (so the machine halts).
Note: the components buf, y, v are stored inside the state for convenience but represent
information that fits in O(n) tape cells in the simulating linear-space NTM.
- phase : LadderPhase
- buf : List (LadderTapeSymbol α)
- y : List α
- v : List α
- counter : ℕ
Instances For
Instances For
Transition relation of the linear-space NTM deciding LADDER_DFA.
At the end of readInput it parses the buffer into a pair (u, v) of equal-length strings with
u ∈ L(B), and either accepts immediately (if u = v) or enters searchFwd with y := u and
counter := |α|^|u| (the maximum possible number of rungs without repetition).
In searchFwd it nondeterministically guesses a position i and symbol a, sets
y[i] := a, checks that the new rung is in L(B), and either accepts (if it equals v) or
continues. searchBack simply moves the head left between rungs.
Instances For
The linear-space NTM deciding LADDER_DFA for the DFA B. The state space is
LadderState α, the tape alphabet is LadderTapeSymbol α, and the transition relation is
ladderNTMδ B. The input alphabet consists of the lifted DFA symbols and the separator.
Instances For
Correctness of the NTM: ladderNTM B accepts exactly the encoded ladder pairs of B.
The NTM ladderNTM B runs in linear space: there is a space-bound function g that is
asymptotically bounded by id, and ladderNTM B runs within space g.
Theorem (Lecture 17). LADDER_DFA ∈ NSPACE(n). Combining the correctness lemma
ladderNTM_language with the linear-space bound ladderNTM_runs_in_linear_space, the language
LADDER_DFA_Lang B is decided by an NTM in O(n) tape cells.
Theorem (Lecture 17). LADDER_DFA ∈ NPSPACE. Since
NSPACE(n) ⊆ NSPACE(n^1) ⊆ NPSPACE, the result follows from LADDER_DFA_in_NSPACE_n.
A uniform encoding scheme for triples ⟨B, u, v⟩ over a single fixed tape alphabet Γ,
suitable for stating LADDER_DFA as a single language. It packages:
- a tape alphabet
Γ; - an encoding function
encodefor any DFABand stringsu, v; - a decidable validity predicate
isValidEncodingcharacterising the image ofencode; - and a lower bound
|u| + |v| ≤ |encode B u v|ensuring that the encoded input is at least as long as the data it represents (so a linear-space bound on the encoding translates back to a linear bound on the underlying strings).
- Γ : Type
Instances For
The uniform formulation LADDER_DFA = {⟨B, u, v⟩ | B is a DFA and there is a ladder in L(B)fromutov} over a fixed tape alphabet, using a DFAEncoding.
Instances For
Theorem (Lecture 17). Under any reasonable uniform encoding enc, the language
LADDER_DFA_Uniform enc lies in NSPACE(n).