If 𝐿 is a regular language over Σ = {𝑎, 𝑏}, which one of the following languages is NOT regular ?

If 𝐿 is a regular language over Σ = {𝑎, 𝑏}, which one of the following languages is NOT regular ?

Q. If 𝐿 is a regular language over Σ = {𝑎, 𝑏}, which one of the following languages is NOT regular ?

(A) 𝐿 ⋅ 𝐿𝑅 = {𝑥𝑦 | 𝑥 ∈ 𝐿, 𝑦𝑅 ∈ 𝐿}

(B) {𝑤𝑤𝑅 | 𝑤 ∈ 𝐿}

(C) Prefix (𝐿) = {𝑥 ∈ 𝛴|∃𝑦 ∈ 𝛴 such that 𝑥𝑦 ∈ 𝐿}

(D) Suffix (𝐿) = {𝑦 ∈ 𝛴|∃𝑥 ∈ 𝛴 such that 𝑥𝑦 ∈ 𝐿}

Ans:{𝑤𝑤𝑅 | 𝑤 ∈ 𝐿}

Solution:

language L = {wwR ⏐ w ∈ L} is infinite and not regular because it involves string matching and we can increase in length indefinitely and then finite automata will run out of memory, so it require stack. Hence, it is context-free but not regular.

Scroll to Top