Deterministic Push-Down Automata

184 Views Asked by At

Does there exist Deterministic Push-Down Automata for the language below. Any kind of answer will be highly appreciated! $$L =ba^nb^n U bba^nb^{2n}$$

1

There are 1 best solutions below

0
On BEST ANSWER

Probably $U$ denotes union, and you mean $L = \{ ba^nb^n \mid\ n\ge 0\} \cup \{ bba^nb^{2n} \mid\ n\ge 0\}$.

Yes that can be done by a deterministic PDA. The first two letters of the string decide how to handle the remainder of the string. Pushing the $a$'s and popping the $b$'s in appropriate ratio is a standard task.