Question:

The minimum number of nodes in a DFA that recognizes strings over \( \{a, b\} \) with length mod 3 = 0 are _______ .

Show Hint

To recognize strings whose length is divisible by 3, a DFA requires at least 3 states to track the remainder of the length modulo 3.
Updated On: Jun 16, 2025
  • 4
  • 2
  • 3
  • 1
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

A DFA recognizing strings of length divisible by 3 requires three states, one for each possible remainder when dividing the string's length by 3 (0, 1, and 2). This ensures that the DFA accepts only strings whose length is divisible by 3. Thus, the minimum number of states (nodes) required is 3.
Was this answer helpful?
0
0