StreakPeaked· Practice

ExamsGATETechnical

If L is a regular language over Σ = {a, b}, which one of the following languages is NOT regular?

  1. L · L^R = {xy | x ∈ L, y^R ∈ L}
  2. {ww^R | w ∈ L}
  3. Prefix(L) = {x ∈ Σ* | ∃y ∈ Σ* such that xy ∈ L}
  4. Suffix(L) = {y ∈ Σ* | ∃x ∈ Σ* such that xy ∈ L}

Correct answer: {ww^R | w ∈ L}

Solution

The language {ww^R | w ∈ L} is not regular because it requires matching a string with its reverse, which cannot be done by a finite automaton, as it lacks the memory to store an arbitrary length of 'w' for comparison.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →