the initial stack symbol
/ Z0 = "zee-zero" /
When a pushdown automaton powers on, its stack is not literally empty — it starts with exactly one symbol already on it, called the initial stack symbol and usually written Z0. Think of it as a sticker on the bottom of the plate-pile that says 'this is the floor'. Without it, the machine would have no way to tell, at the very first step, whether there is anything to pop, and no reliable way to recognise later that it has popped everything back down to the start.
Concretely, the PDA begins in its start state with the stack holding just Z0. From there it pushes and pops as it reads input. The bottom symbol serves two jobs. It guarantees the first transition always has SOMETHING on top to pop and inspect, so the transition rules are never stuck for lack of a stack symbol. And it acts as a sentinel: if the machine ever sees Z0 back on top, it knows the stack has been emptied of everything it added — which is precisely the condition that signals 'all the counting cancelled out' in a language like a^n b^n.
The choice of Z0 ties directly into the acceptance modes. A machine accepting by empty stack literally pops Z0 off as its final act, leaving the stack with nothing; a machine accepting by final state often leaves Z0 sitting there and instead checks which state it is in. Either way, the initial stack symbol is the fixed, known starting note that every computation builds on top of — the anchor that makes the unbounded stack manageable.
The machine starts with stack = Z0. On a's it pushes X giving (top to bottom) X X Z0. After matching b's it pops back to Z0; seeing Z0 on top tells it every a was cancelled by a b.
Z0 is the single symbol present at start — the floor of the stack and a sentinel for 'back to the beginning'.
The stack is never truly empty during a normal run while Z0 sits at the bottom; 'empty stack' acceptance specifically means popping Z0 itself off at the end, not that the stack was emptied at every step.