Consider the regular grammar:
S → Xa ∣ Ya
W → Sa
X → Za
Y → Wa
Z → Sa ∣ ϵ
Where S is the starting symbol, the set of terminals is {a} and the set of non-terminals is { S, W, Y, Z}. We wish to construct a deterministic finite automaton (DFA) to recognize the same language. What is the minimum number of states required for the DFA?