Automata and Grammars
Print this page
First   |   Last   |   Prev   |   Next
Example : Consider the grammar , where N = {S}, ={a, b} and P is the set of the following production rules

{ Sab, SaSb}

Some terminal strings generated by this grammar together with their derivation is given below.

S ab

S aSbaabb

S aSbaaSbbaaabbb

It is easy to prove that the language generated by this grammar is

By using the first production, it generates the string ab ( for i =1 ).

First   |   Last   |   Prev   |   Next