Library

DPDA · Deterministic context-free

Twice as many b’s: aⁿb²ⁿ

Push two X’s for every a and pop one for every b. A change of exchange rate is all it takes — the same machine as aⁿbⁿ with a different push.

startasbsdone
The machine as drawn — 4 states, 5 transitions.

The author’s examples, run

ε → acceptabb → acceptaabbbb → acceptaaaabbbbbbbb → accepta → rejectbbb → rejectbabbbb → rejectbaaabbbbbbbb → reject