GateAI
Regular Expressions and Finite Automata

GATE CSE 2024 Set 2 · Q22

MCQ1 markEasy

Time

Which one of the following regular expressions is equivalent to the language accepted by the DFA given below?

GATE CSE 2024 Set 2 Q22 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) 0*1(0 + 10*1)*

Regular Expressions and Finite Automata

Let the initial state be q0q_0 and the final state be q1q_1.

  1. Transitions from the DFA:

    • At state q0q_0 (start state): a loop on 00, and a transition on 11 to q1q_1.

    • At state q1q_1 (accepting state): a loop on 00, and a transition on 11 to q0q_0.

  2. Reaching the accepting state q1q_1 for the first time:

    • From q0q_0, the automaton can loop on 00 zero or more times, followed by a 11 to transition to q1q_1. This path is represented by the regular expression 0∗10^*1.

  3. Looping back to q1q_1:

    • Once in state q1q_1, any sequence that leaves and returns to q1q_1 (without staying in q0q_0) can be repeated arbitrarily:

      • Reading 00 loops directly on q1q_1.

      • Reading 11 goes to q0q_0, followed by any number of 00s (0∗0^*), and another 11 transitions back to q1q_1, which corresponds to the sequence 10∗110^*1.

    • Thus, any sequence of loops at q1q_1 is given by (0+10∗1)∗(0 + 10^*1)^*.

  4. Combining the paths:

    R=0∗1(0+10∗1)∗R = 0^*1(0 + 10^*1)^*

Therefore, option A is the correct regular expression.

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 Q22 of the GATE CSE 2024 Set 2 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. 14 of them are 1-mark MCQs like this one, and GATE CSE 2024 Set 2 has 3.

How GATE tests Regular Expressions and Finite Automata

More from GATE CSE 2024 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2024 Set 2 · Q22 · MCQ

Which one of the following regular expressions is equivalent to the language accepted by the DFA given below?

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.