Let us, for the purposes of this problem only, allow a production of the form N 1

Question:

Let us, for the purposes of this problem only, allow a production of the form

N1 → rN2

where N1 and N2 are nonterminal and r is a regular expression. The meaning of this formula is that in any working string we may substitute for N1 any string wN2, where w is a word in the language defined by r. This can be considered a short hand way of writing an infinite family of productions, one for each word in the language of r.
Let a grammar be called bad if all its productions are of the two forms

N1 → rN2
N3 → Λ

Bad grammars generate languages the same way CFGs do.
Prove that even a bad grammar cannot generate a nonregular language, by showing how to construct one regular expression that defines the same language as the whole bad grammar.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: