GATE / CS ARCHIVE

GATE CSE 2015 SET 2 / QUESTION 45

GATE CSE 2015 Set 2 Q45

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

GATE 2015 Set 2, Q45 2 marks · NAT
Report issue

Finite Automata

Question 45, GATE 2015: How many states does the minimal DFA for(0+1)*(10)have?
Tap to enlarge
Answer & solution

Official answer: 3

Step through it (2 parts)

The language consists of binary strings ending 10. Track no matching suffix, suffix 1, and suffix 10 (accepting). On0 the transitions are q0, q2, q0; on 1 all go to q1. These three states are distinguishable: q2 accepts empty suffix, and suffix 0 distinguishes q1 from q0. Thus 3.

Track the longest suffix that is also a prefix of target 10: empty, 1, and 10. Reading 1 always leaves suffix 1. Reading 0 moves from suffix 1 to accepting 10, and otherwise to empty. These three states suffice. They are also necessary: accepting 10 differs from both nonaccepting states on ε, and suffix 1 differs from empty on continuation 0. This distinguishability proof prevents merely guessing the count from the pattern length.

Original paper, page 41 · Answer key