The DFA must accept positive multiples of n but reject ε. Use n residue states after reading input, accepting residue zero, and an extra initial rejecting state with the same subsequent transitions as residue zero. These states are pairwise distinguishable by suffix length or empty-word acceptance. Thus n+1, B.
More Regular Expressions and Finite Automata questions
GATE 2011 CS (CS1) Q55– DFA D has transitions p:a→s,b→q; q:a→t,b→r; r loops on a,b; s,t are accepting and each…
GATE 2010 CS (CS1) Q49– Which regular expression denotes all binary strings with an even number of ones?
GATE 2010 CS (CS1) Q51– Let w be any binary string of length n, and L the set of all its substrings. What is the…