The GATE Grind

GATE 2017 CS (CS2) – Question 35

Theory of Computation · Regular Expressions and Finite Automata · 1 mark · Numerical answer

Find the minimum number of DFA states for $L=\{w_1aw_2:w_1,w_2\in\{a,b\}^*,\ |w_1|=2,\ |w_2|\ge3\}$.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 8.0 to 8.0

Explanation

The language requires at least six symbols, with the third symbol fixed to a. Track prefixes of lengths 0,1,2; after a valid third symbol, track three more symbols until acceptance; add a dead state for b in position three. This gives seven progress/accepting states plus one dead state, eight total. Different remaining minimum lengths distinguish the progress states, proving minimality.

More Regular Expressions and Finite Automata questions

All Regular Expressions and Finite Automata questions →