Skip to content
GATEiit

GATE CSE 2024 Session 2 Q41: Regular expression for a 5-state NFA with ε-moves

Question

Let MM be the 5-state NFA with ϵ\epsilon-transitions shown in the diagram below.

NFA with start state 1; epsilon moves from 1 to accepting state 2 and from 1 to state 4; 2 and 3 linked by 0 in both directions; epsilon move from 3 to accepting state 5; 4 and 5 linked by 1 in both directions
Tap the figure to enlarge

Which one of the following regular expressions represents the language accepted by MM?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2024 final answer key)

Concept used: Follow ε-moves to list the paths that end in an accepting state (2 or 5).

First step: Paths: stay in the 2–3 loop and stop at 2 ((00)∗(00)^*); reach 3 via 0(00)∗0(00)^* then ε to 5 and loop (11)∗(11)^*; or go 1 → 4 and reach 5 with 1(11)∗1(11)^*.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key