An exercise problem $:$
Give a deterministic PDA for the language $L = \{a^ncb^{2n} | n \geq1\}$over the alphabet $\Sigma =\{a,b,c\}$.Specify the acceptance state.
My attempt $:$
Grammar of given language is :
G: S → aSbb | c
We can recognize string of $L$ :
- Push all a's in the stack ,
- Excape 'c',
- Pop single a's from stack for every two b's of string,
- If the final stack is empty/final state then string in the given language else not .
Since , we are recognizing string of the language ,so $L$ is DCFL.
I find the PDA(see-page-no.-26) for the $L = \{a^nb^{2n} | n \geq1\}$over the alphabet $\Sigma =\{a,b\}$.
Can you please give explanation to draw DPDA for language $L = \{a^ncb^{2n} | n \geq1\}$over the alphabet $\Sigma =\{a,b,c\}$.
Try this one: $$\quad\quad\quad\quad\quad\quad$$