00:01
So in this question to generate a context free grammar cfg for the language l, www starts and ends with the same symbol.
00:10
So you can use the following cfg.
00:12
So variables is non -terminals, s is the starting symbol and a is the non -terminal to represent the middle part of the string.
00:20
Terminal a is the symbol from the alphabet.
00:22
Production is s to asa.
00:27
A tends to a epsilon.
00:34
Now they coming to push down automaton.
00:37
So here in this the state is q0 q1 and input alphabet is a.
00:43
Stack alphabet is a z0.
00:45
Transition is q0 epsilon.
00:47
Epsilon tends to q1 z0.
00:50
And q0 a epsilon tends to q0 a z0...