Library

Counter · One-counter

Bank account: never overdrawn

Deposits (+) and withdrawals (−) where the balance never goes negative and ends at exactly zero. One counter separates this from anything a DFA could ever check.

balancesettled
The machine as drawn — 2 states, 3 transitions.

The author’s examples, run

+- → accept++-- → accept+-+- → accept+--+ → reject++- → reject- → reject