The smallest finite automaton which accepts the language $\{x \mid$ length of $x$ is divisible by $3\}$ has

Correct Option: B

It is $3$ states as we need a state each for length mod $3 = 0, 1$ and $2$.

Can anybody please explain why 2 states is wrong answer ?

Please find the below diagram in reference to my query.

In the question it is saying {x | length of the x is divisible by 3} not the x itself is divisible by 3 . So, the

answer should be B. 3 states but diagram would be

what about length 0,why initial state is final state?

GATE Overflow