Library

DPDA · Deterministic context-free

Unary addition: aⁱbʲcⁱ⁺ʲ

Every a and every b pushes an X; every c pops one. The c’s balance exactly when there are as many of them as a’s and b’s together — addition, done by stacking.

startasbscsdone
The machine as drawn — 5 states, 9 transitions.

The author’s examples, run

ε → acceptabcc → acceptac → acceptaaabbbbccccccc → accepta → rejectcbcc → rejectcc → rejectbaabbbbccccccc → reject