0
4.8kviews
Construct PDA accepting the language L={anbn |n>0}.
1 Answer
0
382views

enter image description here

This language accepts L = {ε, ab, aabb, aaabbb, ............................. }

Here, in this example, the number of ‘a’ and ‘b’ have to be same.

• Initially we put a special symbol ‘$’** into the empty stack. • Then at state **q2**, if we encounter input **a** and top is Null, we push **a** into stack. This may iterate. And if we encounter input b and top is a, we pop this a. • Then at state **q3**, if we encounter input **b** and top is **a**, we pop this **a**. This may also iterate. And if we encounter input **b** and top is **a**, we pop the top element. • If the special symbol ‘$’ is encountered at top of the stack, it is popped out and it finally goes to the accepting state **q4.

Please log in to add an answer.