GateAI
Regular Expressions and Finite Automata

GATE CSE 2023 · Q14

MCQ1 markEasy

Time

Consider the Deterministic Finite-state Automaton (DFA) A\mathcal{A} shown below. The DFA runs on the alphabet {0,1}\{0, 1\}, and has the set of states {s,p,q,r}\{s, p, q, r\}, with ss being the start state and pp being the only final state. Which one of the following regular expressions correctly describes the language accepted by A\mathcal{A}?

GATE CSE 2023 Q14 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) 1(0 + 11)*

Regular Expressions and Finite Automata

To find the regular expression describing the language accepted by the DFA:

  1. Initial Transition:

    • From the start state ss, reading 11 transitions to the accepting state pp.

    • Reading 00 from ss transitions to state rr, which is a trap/dead state (it loops on both 00 and 11 and has no outgoing transitions to any accepting state).

    • Thus, every accepted string must start with 11.

  2. Transitions from the Accepting State pp:

    • On reading 00, the automaton stays in pp (a self-loop on 00).

    • On reading 11, the automaton moves to state qq.

  3. Transitions from State qq:

    • From state qq, reading 11 transitions back to pp. This forms a path p→1q→1pp \xrightarrow{1} q \xrightarrow{1} p, corresponding to the string 1111.

    • From state qq, reading 00 transitions to the trap state rr.

  4. Accepted Language:

    • Once at state pp, any combination of the self-loop 00 or the cycle 1111 keeps the automaton in state pp or returns it to pp.

    • Hence, after the initial prefix 11, any sequence formed by 00 or 1111 is accepted, which corresponds to the regular expression:

      1(0+11)∗1(0 + 11)^*

Therefore, (C) is the correct option.

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 Q14 of the GATE CSE 2023 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 2023 has 2.

How GATE tests Regular Expressions and Finite Automata

More from GATE CSE 2023

Share this solution

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

GateAI solution cardGATE CSE 2023 · Q14 · MCQ

Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only final state. Which one of the following regular expressions correctly describes the language accepted by A?

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.