Skip to main content

GATE CSE 2025Theory of Computation › Finite Automata & Regular LanguagesVerified

GATE CSE 2025 PYQ: Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ = { a , b }…

Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ={a,b}\Sigma=\{a, b\}. Identify which of the following language(s) is/are accepted by the given DFA.

DFA

  1. A
    The set of all strings containing an even number of bb 's.
  2. B
    The set of all strings containing the pattern babb a b.
  3. C
    The set of all strings ending with the pattern babb a b.
    Correct answer
  4. D
    The set of all strings not containing the pattern abaa b a.

Answer

(C) The set of all strings ending with the pattern b a b b a b bab .

Approach

Read the DFA as a deterministic automaton and compare its accepted language against each description using discriminating strings. The DFA has four states and accepts exactly the strings over {a,b} that end with the substring bab.

The DFA accepts precisely the strings ending in 'bab'. Only option C matches this language; the other options fail on simple counterexamples.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.