NPDA · Context-free
aⁿbⁿ or aⁿb²ⁿ
Each half is deterministic, but their union is not: having read aⁿbⁿ, a deterministic machine cannot both accept and keep counting for the other n b’s. Nondeterminism postpones the choice — the standard proof that DPDAs are weaker than NPDAs.
The author’s examples, run
ε → acceptaabb → acceptab → acceptaaaaaaabbbbbbb → accepta → rejectbabb → rejectbb → rejectbaaaaaabbbbbbb → reject