Which of the regular expressions given below represent the following DFA? I) 0*1(1+00*1)* II) 0*1*1+11*0*1 III) (0+1)*1
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 1 · Q36
Time

Select one answerSingle correct
Solution
Official answer: B) I and III only
Regular Expressions and Finite AutomataLet the start state be and the final (accepting) state be .
The transitions of the DFA are:
From the transitions, notice that whenever the automaton receives the symbol , it enters the accept state . Whenever it receives , it moves to the non-accepting state . Therefore, the automaton accepts any string over that ends with the symbol .
Evaluating each regular expression:
**Expression III: ** Directly generates the set of all strings ending in . Hence, it represents the language of the DFA.
**Expression I: ** To reach from , the path is . From , any loop back to is either:
Reading directly:
Reading , looping on in , and returning to on :
Combining these gives the loop expression . Thus, the overall regular expression from the start state to the final state is , which matches the DFA.
**Expression II: ** Consider the string , which ends with and is accepted by the DFA. It cannot be generated by (which cannot have after ) nor by (which must start with ). Hence, II is incorrect.
Therefore, only I and III represent the DFA, which corresponds to option (B).
Try the question first, then check your work.
Examiner trap
Analyze the condition under which the DFA ends in the accepting double-circle state, and check whether all strings ending in (like ) can be generated by each expression.
This Regular Expressions and Finite Automata previous year question is Q36 of the GATE CSE 2014 Set 1 paper. Find more GATE CSE PYQs on Regular Expressions and Finite Automata in Theory of Computation, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Regular Expressions and Finite Automata PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Regular Expressions and Finite Automata has 41 GATE CSE PYQs across 24 papers from 2011 to 2026. 10 of them are 2-mark MCQs like this one, and GATE CSE 2014 Set 1 has 3.
How GATE tests Regular Expressions and Finite AutomataIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.