GateAI
Regular Expressions and Finite Automata

GATE CSE 2015 Set 1 · Q52

NAT2 marksMedium

Time

Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M)∩L(N)L(M) \cap L(N) is ____________

GATE CSE 2015 Set 1 Q52 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 1

Regular Expressions and Finite Automata

Let us analyze the languages accepted by the two DFAs:

  1. DFA MM:

    • Starts at state s0s_0 (non-accepting).

    • Any input ending with the symbol 'a' leads to state s1s_1 (accepting).

    • Any subsequent 'b' transitions back to s0s_0.

    • Hence, L(M)=(a+b)∗aL(M) = (a+b)^*a (all strings ending in 'a').

  2. DFA NN:

    • Starts at state t0t_0 (non-accepting).

    • Any input ending with the symbol 'b' leads to state t1t_1 (accepting).

    • Any subsequent 'a' transitions back to t0t_0.

    • Hence, L(N)=(a+b)∗bL(N) = (a+b)^*b (all strings ending in 'b').

  3. Intersection L(M)∩L(N)L(M) \cap L(N):

    • A string cannot simultaneously end in 'a' and end in 'b'.

    • Therefore, L(M)∩L(N)=∅L(M) \cap L(N) = \emptyset.

  4. A minimal DFA that accepts the empty language ∅\emptyset over the alphabet {a,b}\{a, b\} consists of a single non-accepting state with self-loops on both 'a' and 'b'.

Thus, the number of states in the minimal DFA is 1.

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 Q52 of the GATE CSE 2015 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. 6 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2015 Set 1.

How GATE tests Regular Expressions and Finite Automata

More from GATE CSE 2015 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2015 Set 1 · Q52 · NAT

Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is …

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.