Consider the following languages: \(L_1=\{a^{\grave{z}^z} \mid \grave{Z}…

2020

Consider the following languages:

\(L_1=\{a^{\grave{z}^z} \mid \grave{Z} \text{ is an integer} \} \\ L_2=\{a^{z\grave{z}} \mid \grave{Z} \geq 0\} \\ L_3=\{ \omega \omega \mid \omega \epsilon \{a,b\}^*\}\)

Which of the languages is(are) regular?

Choose the correct answer from the options given below:

  1. A.

    \(L_1\) and \(L_2\) only

  2. B.

    \(L_1\) and \(L_3\) only

  3. C.

    \(L_1\) only

  4. D.

    \(L_2\) only

Attempted by 67 students.

Show answer & explanation

Correct answer: D

Final answer: Only L2 is regular.

  • L2 is regular. The language describes a simple arithmetic progression of lengths (for example, all even-length strings of a's). A regular expression for such a set is (aa)*, and a 2-state DFA that toggles parity of a’s suffices.

  • L1 is not regular. Unary regular languages are ultimately periodic: there exist integers p and N such that for all m ≥ N, membership of m depends only on m mod p. The set of lengths described by L1 grows in a nonperiodic (superlinear) way and therefore cannot satisfy this property, so L1 is not regular.

  • L3 is not regular. Use the pumping lemma. Let p be the pumping length and consider the string s = (a^p b)^2 = a^p b a^p b, which belongs to L3. Any decomposition s = xyz with |xy| ≤ p forces y to consist only of a's from the first block. Pumping y down (removing those a's) yields a string whose first half has fewer a's than the second half, so it is no longer of the form ωω. This contradiction shows L3 is not regular.

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

Explore the full course: Mppsc Assistant Professor