GATE / CS ARCHIVE

SIMILAR QUESTIONS / THEORY OF COMPUTATION

Compare future acceptance to merge or distinguish DFA states

3 questions solved the same way, newest first. Back to Theory of Computation

How these are solved

Each supplies a complete DFA diagram and asks questions resolved by state equivalence: start with accepting versus rejecting states and refine using successor classes or distinguishing suffixes. 2007 removes an unreachable state and counts equivalence classes;

2 marks · MSQ
Report issue

Minimize a DFA and test distinguishability

Finite Automata

Question 50, GATE 2024: A DFA has start state 1 and only accepting state 1. For inputs (0,1), its transitions are: state 1→(2,4); state 2→(3,1); state 3→(1,2); state 4→(1,5); state 5→(4,1). Let n0(w),n1(w) count symbols. Which statements are false? A States 2 and 4 are distinguishable. B States 3 and 4 are distinguishable. C States 2 and 5 are distinguishable. D Every w with n0(w)=n1(w) is accepted.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

Approach: Group states with the same future acceptance behavior, then interpret the resulting quotient machine.
1. Consider classes C0={1}, C1={2,5}, C2={3,4}. Only C0 accepts. From either member of C1, input 0 leads to C2 and input 1 to C0. From either member of C2, 0 leads to C0 and 1 to C1. From C0, 0 leads to C1 and 1 to C2.
2. This is a stable partition: members of each class have the same accepting status and transition to the same classes for each symbol. Induction on suffix length therefore proves that states 2 and 5 are equivalent, as are states 3 and 4. Claims B and C are false.
3. States 2 and 4 are distinguishable: suffix 1 sends 2 to accepting state 1 but sends 4 to nonaccepting state 5. Thus A is true.
4. Label C0,C1,C2 by residues 0,1,2. A 0 adds 1 modulo 3 and a 1 subtracts 1. Starting at residue 0, the machine accepts exactly when n0−n1 is divisible by 3. Equal counts satisfy this condition, so D is true.
Answer: B and C, because the question asks for false statements.

Original paper, page 31 · Answer key

2 marks · MCQ
Report issue

Minimizing a five-state DFA

Finite Automata

Question 45, GATE 2011: DFA D has alphabet {a,b}, start p, accepting states s,t, and transitions p:a→s,b→q; q:a→t,b→r; r:a,b→r; s:a,b→s; t:a,b→t. Which supplied machine is an equivalent minimal DFA? Unlisted states in the alternatives are nonaccepting.

(A) Start p; final s; p:a→s,b→q; q:a→s,b→r; r:a,b→r; s:a,b→s
(B) Start p; finals q,r; p:a,b→q; q:a→r,b→s; r:a,b→r; s:a,b→s
(C) Start p; final q; p:a,b→q; q:a,b→q and also q:b→r; r:a,b→r
(D) Start p; final s; p:a→s,b→q; q:a→s,b→q; s:a,b→s
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The accepting states s and t both loop on a and b, so their right languages are identical and they merge. The other states p, q and r remain distinct: p versus q is distinguished by suffix ba, since p accepts ba while q reaches the dead state; q versus r is distinguished by a; p versus r is also distinguished by a. Any accepting state differs from these nonaccepting states on epsilon. All four resulting classes are reachable. The minimal DFA has classes {p}, {q}, {r}, {s, t}, with p --b--> q --b--> r, r a/b-loops, and a-transitions from p and q to the accepting sink. This is option A.

All five original states are reachable: epsilon reaches p, b reaches q, bb reaches r, a reaches s, and ba reaches t. Initially separate accepting {s,t} from rejecting {p,q,r}; r differs because its a-transition stays rejecting, and then p differs from q because their b-transitions lead to different classes. Alternative B wrongly accepts b, C has two b-transitions from q and is not deterministic, and D accepts bba although the original reaches r on bb and must reject every continuation.

Original paper, page 12 · Answer key

2 marks · MCQ
Report issue

Minimum equivalent DFA size

Finite Automata

Question 75, GATE 2007: A DFA over {a,b} has start state q0, accepting states q1,q2 and nonaccepting states q0,q3. Its complete transition table is: q0: a→q1,b→q0; q1: a→q2,b→q1; q2: a→q1,b→q2; q3: a→q1,b→q2.
How many states does a minimum equivalent DFA have?
Options:
(A) 1
(B) 2
(C) 3
(D) 4
Question 75, GATE 2007: A DFA over {a,b} has start state q0, accepting states q1,q2 and nonaccepting states q0,q3. Its complete transition table is: q0: a→q1,b→q0; q1: a→q2,b→q1; q2: a→q1,b→q2; q3: a→q1,b→q2.
How many states does a minimum equivalent DFA have?
Options:
(A) 1
(B) 2
(C) 3
(D) 4
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Approach. First remove unreachable states, then partition the remaining states by whether any suffix distinguishes their acceptance. q1 and q2 have identical future acceptance behavior even though their names differ.

2. Derivation and interpretation. Delete unreachable q3. States q1 and q2 are equivalent: both accept, b leaves each in the accepting class, and a switches within that class. Merge them. The remaining nonaccepting q0 and accepting merged state are distinguishable by the empty suffix, so two states are necessary and sufficient. Answer B.

Original paper, page 19