GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 32

GATE CSE 2015 Set 3 Q32

Theory of Computation · Finite Automata · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q32 1 mark · MCQ
Report issue

Finite Automata

Question 32, GATE 2015: Let Σ={0,1} and L be the language of the regular expression Σ*0011Σ*. What is the minimum number of states in a DFA recognizing the complement of L? Options: (A) 4; (B) 5; (C) 6; (D) 8.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. Writing states as matched-prefix lengths 0..4, transitions on (0,1) are 0→(1,0), 1→(2,0), 2→(2,3), 3→(1,4), 4→(4,4). For pattern containment only state 4 accepts; for its complement states 0..3 accept. For any i<j, the suffix completing prefix length j reaches state 4 from j but not from i, proving distinguishability.

2. A DFA tracks the longest suffix matching a prefix of 0011: lengths 0, 1, 2, 3, 4, with 4 an absorbing found-pattern state. These five states are pairwise distinguishable by completing the pattern; flipping accepting states recognizes avoidance of 0011 without changing minimal state count. Thus5, B.

Original paper, page 64 · Answer key