Let us analyze the given PDA:
Initial State (Start and Final State):
The start state is also an accepting (final) state.
On reading nothing (ε), it accepts the empty string ε.
On input a, it pushes X onto the stack for every a read (a,Z/XZ and a,X/XX). Since this state is an accepting state, all strings consisting solely of a's (an for n≥0) are accepted by staying in the first state.
Transition to Second State:
On reading b while the top of the stack is X, it pops an X (b,X/ε) and moves to the second state.
In the second state, it continues to pop an X for each subsequent b read (b,X/ε).
Transition to Third State (Final State):
From the second state, on ε input when the stack top is Z, it transitions to the third (accepting) state with stack unchanged (ε,Z/Z).
This path accepts strings where the number of b's matches the number of a's pushed, i.e., anbn for n≥1.
Including n=0 (which is ε), all strings of the form anbn for n≥0 are accepted.
Combining both accepting conditions:
L={an∣n≥0}∪{anbn∣n≥0} Determinism:
For any state, input symbol, and stack top, there is at most one valid move and no conflicting ε-transitions.
Specifically, from the first state, the transitions on a and b are mutually exclusive, and there is no ε-move from the start state.
Therefore, the PDA is a Deterministic Pushdown Automaton (DPDA), which means L is a Deterministic Context-Free Language (DCFL).
Thus, option (D) is correct.