a^n b^n as a Linear Language #
This file constructs a linear grammar for {a^n b^n} and proves that the
language is linear.
Main results #
linear_grammar_anbn_language— the grammar generates exactlyanbnanbn_is_Linear—{a^n b^n}is linear
An unrestricted grammar for the language {aⁿbⁿ | n ∈ ℕ} with linear rules.
Rules:
S → aSb (i.e., [] S [] → [a, S, b])
S → ε (i.e., [] S [] → [])
Equations
- One or more equations did not get rendered due to their size.
Instances For
The grammar linear_grammar_anbn is linear.
Derivation in linear_grammar_anbn can produce aⁿSbⁿ.
Derivation in linear_grammar_anbn: apply ε-rule to get aⁿbⁿ.
Every word in anbn is generated by linear_grammar_anbn.
Every word generated by linear_grammar_anbn is in anbn.
The grammar linear_grammar_anbn generates exactly {aⁿbⁿ}.