Library

DPDA · Deterministic context-free

Two balanced blocks: 0ⁿ1ⁿ0ᵐ1ᵐ

Two counts one after the other, where “nested counts” had one inside the other. The stack empties between the blocks and is reused, so the machine is two copies of the 0ⁿ1ⁿ checker joined at the moment the bottom marker reappears.

spqmidp2q2done
The machine as drawn — 7 states, 10 transitions.

The author’s examples, run

ε → accept0011 → accept001101 → accept00011100001111 → accept0 → reject1011 → reject101101 → reject10011100001111 → reject