GateAI
Regular Expressions and Finite Automata

GATE CSE 2014 Set 1 · Q36

MCQ2 marksMedium

Time

Which of the regular expressions given below represent the following DFA? I) 0∗1(1+00∗1)∗0^*1(1+00^*1)^* II) 0∗1∗1+11∗0∗10^*1^*1+11^*0^*1 III) (0+1)∗1(0+1)^*1

GATE CSE 2014 Set 1 Q36 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) I and III only

Regular Expressions and Finite Automata

Let the start state be q0q_0 and the final (accepting) state be q1q_1.

The transitions of the DFA are:

  • δ(q0,0)=q0\delta(q_0, 0) = q_0

  • δ(q0,1)=q1\delta(q_0, 1) = q_1

  • δ(q1,0)=q0\delta(q_1, 0) = q_0

  • δ(q1,1)=q1\delta(q_1, 1) = q_1

From the transitions, notice that whenever the automaton receives the symbol 11, it enters the accept state q1q_1. Whenever it receives 00, it moves to the non-accepting state q0q_0. Therefore, the automaton accepts any string over {0,1}\{0, 1\} that ends with the symbol 11.

Evaluating each regular expression:

  • **Expression III: (0+1)∗1(0+1)^*1** Directly generates the set of all strings ending in 11. Hence, it represents the language of the DFA.

  • **Expression I: 0∗1(1+00∗1)∗0^*1(1+00^*1)^*** To reach q1q_1 from q0q_0, the path is 0∗10^*1. From q1q_1, any loop back to q1q_1 is either:

    • Reading 11 directly: 11

    • Reading 00, looping on 00 in q0q_0, and returning to q1q_1 on 11: 00∗100^*1

    Combining these gives the loop expression (1+00∗1)∗(1 + 00^*1)^*. Thus, the overall regular expression from the start state to the final state is 0∗1(1+00∗1)∗0^*1(1+00^*1)^*, which matches the DFA.

  • **Expression II: 0∗1∗1+11∗0∗10^*1^*1+11^*0^*1** Consider the string 01010101, which ends with 11 and is accepted by the DFA. It cannot be generated by 0∗1∗10^*1^*1 (which cannot have 00 after 11) nor by 11∗0∗111^*0^*1 (which must start with 11). 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.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

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 in GATE CSE

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 Automata

More from GATE CSE 2014 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 1 · Q36 · MCQ

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

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.