Computer Sciences > GATE 2025 SET-2 > Finite Automata
Let Σ={1,2,3,4}. For x∈Σ*, let prod(x) be the product of symbols in x modulo 7. We take prod(ε)=1, where ε is the null string.
For example, prod(124)=(1×2×4) mod 7=1.
Define L={x∈Σ*|prod(x)=2}
The number of states in a minimum state DFA for L is ______ (Answer in integer)

Correct : 6

The DFA needs to track the current product mod 7 as it reads each symbol.
Possible values of product mod 7 = {0, 1, 2, 3, 4, 5, 6}
Key observation — can product mod 7 ever be 0?
Σ = {1, 2, 3, 4}. None of these symbols is a multiple of 7.
Product of any combination of {1, 2, 3, 4} mod 7 is never 0.
So state 0 (product = 0) is unreachable and can be eliminated.
Reachable product values mod 7:
Starting from prod(ε) = 1, multiplying by symbols from {1, 2, 3, 4}:
1 × 1 = 1, 1 × 2 = 2, 1 × 3 = 3, 1 × 4 = 4
2 × 3 = 6, 2 × 4 = 8 mod 7 = 1, 3 × 3 = 9 mod 7 = 2, 3 × 4 = 12 mod 7 = 5
4 × 4 = 16 mod 7 = 2, 4 × 3 = 12 mod 7 = 5, 3 × 2 = 6
Reachable states = {1, 2, 3, 4, 5, 6} — all non-zero residues mod 7 are reachable.
Can any of these states be merged?
Each state represents a distinct residue class. Since multiplying by the same symbol from the same state always leads to the same next state, no two distinct residues behave identically — all 6 states are distinguishable.
Total states = 6 reachable residue states (1 through 6)
State 2 is the only accepting state (prod(x) = 2)
State 0 is unreachable and eliminated
∴ The number of states in the minimum DFA for L = 6

Similar Questions

Which one of the following regular expressions correctly represents the language of the finite automaton given below?
#783 MCQ
A regular language L is accepted by a non-deterministic finite automaton (NFA) with n states. Which of the following statement(s) is/are FALSE?
#1371 MCQ
Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ={a,b}. Identify which of the following language(s) is/are accepte...
#1393 MCQ

Related Topics

GATE 2025 GATE CS Set-2 Question 59 Finite Automata DFA Minimum State DFA DFA Minimization Deterministic Finite Automaton Modulo 7 Product Language Regular Language Theory of Computation TOC Automata Theory Alphabet Null String Epsilon String Product

Unique Visitor Count

Total Unique Visitors

Loading......