A variable-based grammar is with disjoint nonterminals and terminals, productions between words over , and start variable . Its language is .
A type-2 rule is with one nonterminal on the left; a type-2 grammar and its language are context-free languages. The required repetition criterion is the pumping lemma for context-free languages.
This language is context-free. One grammar is
which independently chooses at least one outer pair and at least one .
It is not context-free. Intersecting it with the regular language would give , which violates the pumping lemma for context-free languages. Context-free languages are closed under intersection with regular languages.
No production introduces , so the two rules containing are unreachable. The effective derivations are
Thus the language is , which is not context-free language, although the displayed grammar itself also visibly has non-type-2 left sides.

Articles by others on the same topic (0)

There are currently no matching articles.