415 views

1 Answer

2 votes
2 votes

Initially, m a's will be pushed on to the stack, then n b's will be pushed on to the stack. Now, for the next n a's, we will pop out the n b's which was already on the stack. Now the stack only has m a's, so for the next m b's we will pop m a's. Here is the PDA state diagram 

Related questions

4 votes
4 votes
0 answers
1
The Capricorn asked Mar 28, 2018
740 views
Construct a PDA for the language of all those strings in which the number of $b 's$ is double the number of $a 's$. $a$ and $b$ can occur in any order. For example:$L=\{\...
0 votes
0 votes
1 answer
2
Jeevesh asked Nov 12, 2018
967 views
What should be the approach to draw the DFA - "All strings that have exactly one double letter in them" on symbols {a,b}.
0 votes
0 votes
0 answers
3
raj_uddeshya157 asked Dec 27, 2023
66 views
Can $\Sigma^{*}$ be called DCFL? If yes, what would the state transition diagram of its PDA look like?
1 votes
1 votes
1 answer
4