A minimum state deterministic finite automaton accepting the language
number of s and s in are divisible by and , respectively has
View worked solution
Answer: A
To find the number of states in the minimum state DFA, we can analyze the requirements for tracking the number of s and s in any input string :
- Condition on s: The number of s must be divisible by . To track , we need states corresponding to remainders .
- Condition on s: The number of s must be divisible by . To track , we need states corresponding to remainders .
Since the count of s and s are independent of each other, we construct a product automaton. The states of this DFA are represented as ordered pairs , where:
The total number of states in this product automaton is:
Distinguishability:
- The start state is , which is also the only accepting state (since both remainders must be ).
- All states are reachable from the start state.
- For any two distinct states and , we can always find a string that drives one to the accepting state and the other to a non-accepting state. Thus, all states are pairwise distinguishable.
Therefore, the minimum state DFA has exactly states.
Free practice · Your answers on this page are not saved.
