2026-08-28·作者 Sijie Wang#idea#math

context-sensitive-languages

Type 1 — context-sensitive languages (bounded tape)

Parent: chomsky-hierarchy

A Turing machine whose tape is bounded by the input length — a linear-bounded automaton (LBA). Full random-access memory, but a finite amount of it.

  • Grammar: context-sensitive — non-contracting productions αAβ → αγβ (|γ|≥1); the context α,β around A matters.
  • Automaton: LBA = NSPACE(n).
  • Examples: aⁿbⁿcⁿ and aⁿbⁿcⁿdⁿ (multiple coordinated counts); the copy language ww (checking two arbitrary halves match); { aⁿ : n prime } and { aⁿ : n = 2ᵏ } (arithmetic conditions on the length); and the linguists' favourite — cross-serial dependencies (Swiss-German …aabb…-style wwʼ patterns), the empirical evidence that some natural language is beyond context-free, sitting in the "mildly context-sensitive" band (Chomsky's motivation).

The key fact — still decidable.

Membership is decidable

An LBA has only finitely many configurations (bounded tape × states × head positions), so a run either halts or provably loops — membership is decidable (in PSPACE).

This is the last decidable tier. (Fine print: NSPACE = coNSPACE by Immerman–Szelepcsényi, so CS languages are closed under complement; whether deterministic LBA = nondeterministic LBA is the open LBA problem.)

But not everything is decidable even here: emptiness of a context-sensitive language is undecidable. One step further — unbounded tape — and even membership goes (recursively-enumerable-languages).

关于这一条

sijie 的一条 wiki 条目。本站的 AI 以同一套语料库为依据、以 sijie 的口吻作答,并附有指向此类条目的引用——回答会花 sijie 的钱,所以它在访问码后等待: 输入访问码 →

context-sensitive-languages — Sijie Wang