How can I construct a PDA which accepts the language $\{a^ib^j \mid 0 \leq j \leq 2i\}$?

  • $\begingroup$ What have you tried? Where did you get stuck? $\endgroup$ – dkaeae Jan 25 '19 at 16:24
  • $\begingroup$ Also, the construction should not be too hard if you are familiar with the PDA for $\{ a^k b^k \mid k \in \mathbb{N}_0 \}$. $\endgroup$ – dkaeae Jan 25 '19 at 16:25

The description of the PDA is easy:

Read the input string. if read $b$ and the stack is empty, reject the string. If see $a$, push two $a$ to the stack. If read $b$, pop a value from the stack. Finally, if read the end of the string, it will be accepted.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.