Deterministic LBA Languages ⊆ LBA Languages #
We show that every language recognized by a deterministic linearly bounded automaton (DLBA) is also recognized by a nondeterministic linearly bounded automaton (LBA).
Strategy #
The conversion uses Option Λ as the LBA state space:
some qsimulates LBA stateq(always non-accepting in the NLBA)noneis a special accepting halt state
When the DLBA halts (transition returns none) in an accepting state, the LBA
transitions to none. This ensures the LBA accepts (reaches an accepting state)
if and only if the DLBA accepts (halts in an accepting state).
Main Results #
is_DLBA_subset_is_LBA— Every DLBA language is an (endmarker) LBA language
Conversion from DLBA to LBA #
def
DLBA.toLBA'
{Γ : Type u_1}
{Λ : Type u_2}
[DecidableEq Γ]
(M : Machine Γ Λ)
:
LBA.Machine Γ (Option Λ)
Convert a deterministic DLBA to an LBA using Option Λ states.
some qsimulates DLBA stateq(non-accepting)noneis the accepting halt state When the DLBA halts in an accepting state, we transition tonone.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Step Correspondence #
Multi-step Correspondence #
theorem
DLBA.iterateStep_implies_lba_reaches
{Γ : Type u_1}
{Λ : Type u_2}
{n : ℕ}
[DecidableEq Γ]
(M : Machine Γ Λ)
(cfg cfg' : Cfg Γ Λ n)
{k : ℕ}
(hk : iterateStep M cfg k = some cfg')
:
LBA.Reaches (toLBA' M) (liftCfg cfg) (liftCfg cfg')
Acceptance Correspondence #
theorem
DLBA.dlba_accepts_implies_lba_accepts'
{Γ : Type u_1}
{Λ : Type u_2}
{n : ℕ}
[DecidableEq Γ]
(M : Machine Γ Λ)
(cfg : Cfg Γ Λ n)
(h : Accepts M cfg)
:
LBA.Accepts (toLBA' M) (liftCfg cfg)
theorem
DLBA.toLBA'_step_cases
{Γ : Type u_1}
{Λ : Type u_2}
{n : ℕ}
[DecidableEq Γ]
(M : Machine Γ Λ)
(q : Λ)
(tape : BoundedTape Γ n)
(cfg' : Cfg Γ (Option Λ) n)
(h : LBA.Step (toLBA' M) { state := some q, tape := tape } cfg')
:
theorem
DLBA.toLBA'_reaches_inv
{Γ : Type u_1}
{Λ : Type u_2}
{n : ℕ}
[DecidableEq Γ]
(M : Machine Γ Λ)
(cfg : Cfg Γ Λ n)
(cfg' : Cfg Γ (Option Λ) n)
(h : LBA.Reaches (toLBA' M) (liftCfg cfg) cfg')
:
theorem
DLBA.lba_accepts_implies_dlba_accepts'
{Γ : Type u_1}
{Λ : Type u_2}
{n : ℕ}
[DecidableEq Γ]
(M : Machine Γ Λ)
(cfg : Cfg Γ Λ n)
(h : LBA.Accepts (toLBA' M) (liftCfg cfg))
:
Accepts M cfg
Language Definitions For DLBAs #
noncomputable def
DLBA.loadListDLBA
{Γ : Type u_1}
(w : List Γ)
(hw : w ≠ [])
:
BoundedTape Γ (w.length - 1)
Load a non-empty list onto a bounded tape for a deterministic DLBA.
Equations
Instances For
noncomputable def
DLBA.initCfgListDLBA
{Γ : Type u_1}
{Λ : Type u_2}
(M : Machine Γ Λ)
(w : List Γ)
(hw : w ≠ [])
:
Initial configuration for a non-empty list input on a deterministic DLBA.
Equations
- DLBA.initCfgListDLBA M w hw = { state := M.initial, tape := DLBA.loadListDLBA w hw }
Instances For
noncomputable def
DLBA.LanguageViaEmbedDLBA
{T : Type u_1}
{Γ : Type u_2}
{Λ : Type u_3}
(M : Machine Γ Λ)
(embed : T → Γ)
:
Recognition via an embedding from the input alphabet into the tape alphabet, for a deterministic DLBA.
Equations
- DLBA.LanguageViaEmbedDLBA M embed w = ∃ (hw : List.map embed w ≠ []), DLBA.Accepts M (DLBA.initCfgListDLBA M (List.map embed w) hw)
Instances For
Initial Configuration Correspondence #
theorem
DLBA.initCfg_lift_eq
{Γ : Type u_1}
{Λ : Type u_2}
[DecidableEq Γ]
(M : Machine Γ Λ)
(w : List Γ)
(hw : w ≠ [])
:
Main Theorem #
theorem
dlba_language_eq_lba_language
{T : Type u_1}
{Γ : Type u_2}
{Λ : Type u_3}
[DecidableEq Γ]
(M : DLBA.Machine Γ Λ)
(embed : T → Γ)
:
theorem
is_DLBA_subset_is_LBA
{T : Type}
[Fintype T]
[DecidableEq T]
{L : Language T}
(h : is_DLBA L)
:
is_LBA L