The smallest finite automation which accepts the language { x | length of x is…

2002

The smallest finite automation which accepts the language { x | length of x is divisible by 3 } has

  1. A.

    2 states

  2. B.

    3 states

  3. C.

    4 states

  4. D.

    5 states

Attempted by 63 students.

Show answer & explanation

Correct answer: B

To accept strings with length divisible by 3, the automaton must track the remainder of the length divided by 3. This requires three distinct states representing remainders 0, 1, and 2 modulo 3. The minimal deterministic finite automaton uses exactly these three states to distinguish valid lengths from invalid ones.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir