Consider the following languages: L₁ = { aⁿ | n > 0 } L₂ = { a²ⁿ | n ≥ 0 } L₃…

2020

Consider the following languages:

L₁ = { aⁿ | n > 0 }
L₂ = { a²ⁿ | n ≥ 0 }
L₃ = { ωω | ω ∈ {a, b}* }

Which of the languages is (are) regular?

  1. A.

    L₁ and L₂ only

  2. B.

    L₁ and L₃ only

  3. C.

    L₁ only

  4. D.

    L₂ only

Attempted by 26 students.

Show answer & explanation

Correct answer: A

L₁ = { aⁿ | n > 0 } is regular as it matches the regex aa*. L₂ = { a²ⁿ | n ≥ 0 } is regular as it matches (aa)*. L₃ = { ωω | ω ∈ {a, b}* } is non-regular because finite automata cannot match the first half of a string with the second half. Thus, L₁ and L₂ are regular.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor