The smallest finite automaton which accepts the language length of is divisible by has
View worked solution
Answer: B
The language is defined as , where denotes the length of the string .
To determine the number of states in the minimal finite automaton (DFA) accepting , we can track the length of the input string modulo . There are three possible remainders when the length is divided by :
- Remainder 0: (represented by state )
- Remainder 1: (represented by state )
- Remainder 2: (represented by state )
Since we want to accept strings whose length is divisible by , the start state is also the only accepting (final) state.
The transition function for any alphabet symbol is defined as:
Since all three states are reachable and represent distinct equivalence classes under the Myhill-Nerode relation (as , , and ), the minimum number of states required is exactly .
Therefore, the correct option is B.
Free practice · Your answers on this page are not saved.
