First, why w2 cannot have the form Ba.
Take the following grammar with the letter W as the starting character:
W -> lambda W -> aX X -> Wb
it spawns {a n b n : n natural}, which is not a regular language. Therefore, this limitation is important if you want to generate only ordinary languages. Alternatively, you can enable w2 = Ba, but prohibit rules of the form w2 = aB - this also gives regular languages. This grammar builds the word back.
If you allow both types of rules, you will get a class known as linear languages .
Secondly, why lambda is allowed only for the initial character.
This is not a mandatory limitation.
You can exclude all uses of lambda for nonterminal characters: take some rule W β lambda, delete it and replace all the rules U β aW with U β aW and U β a. Obviously, you cannot rule out the use of lambda for a terminal character (the language will no longer generate an empty word).
So, every type 3 grammar that uses lambda in many places can be βnormalizedβ to a grammar that uses lambda only for the start character.
sdcvvc
source share