Question

A deterministic finite automaton (DFA) DD with alphabet Σ={a,b}\Sigma = \{a, b\} is given below.

Deterministic finite automaton D with start state p, state q, trap state r, and accepting states s and t

Which of the following finite state machines is a valid minimal DFA which accepts the same language as DD?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2011 answer key

Solution

Apply the standard table-filling / partition refinement algorithm to minimize DFA D.

  1. The states of DD are {p,q,r,s,t}\{p, q, r, s, t\}, where accepting states are F={s,t}F = \{s, t\} and non-accepting states are {p,q,r}\{p, q, r\}.
  1. Initial partition: P0={{s,t},{p,q,r}}P_0 = \{ \{s, t\}, \{p, q, r\} \}.
  1. Test equivalence of accepting states ss and tt:
  • δ(s,a)=s∈{s,t}\delta(s, a) = s \in \{s, t\} and δ(t,a)=t∈{s,t}\delta(t, a) = t \in \{s, t\}
  • δ(s,b)=s∈{s,t}\delta(s, b) = s \in \{s, t\} and δ(t,b)=t∈{s,t}\delta(t, b) = t \in \{s, t\}
    Since both transition to the same group on all inputs, s≡ts \equiv t. They merge into a single state {s,t}\{s, t\}.
  1. Refine non-accepting states {p,q,r}\{p, q, r\} on input aa:
  • δ(p,a)=s∈{s,t}\delta(p, a) = s \in \{s, t\}
  • δ(q,a)=t∈{s,t}\delta(q, a) = t \in \{s, t\}
  • δ(r,a)=r∈{p,q,r}\delta(r, a) = r \in \{p, q, r\}
    State rr splits from {p,q}\{p, q\} because it remains in non-accepting states on aa, giving partition {{s,t},{p,q},{r}}\{ \{s, t\}, \{p, q\}, \{r\} \}.
  1. Test {p,q}\{p, q\} on input bb:
  • δ(p,b)=q∈{p,q}\delta(p, b) = q \in \{p, q\}
  • δ(q,b)=r∈{r}\delta(q, b) = r \in \{r\}
    Since δ(p,b)\delta(p, b) and δ(q,b)\delta(q, b) land in different partitions, pp and qq are distinguishable. The final partition is {{p},{q},{r},{s,t}}\{ \{p\}, \{q\}, \{r\}, \{s, t\} \}.
  1. The minimal DFA has 4 states {p,q,r,s}\{p, q, r, s\} where ss is the merged accepting state, matching Option A.
Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2011 Computer Science and Information Technology (CS)
Question
45 of 65, printed as CS Q.45
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.