If \(L_1 = \{a^n | n \geq 0 \}\) and \(L_2 = \{b^n | n \geq 0 \}\), consider…

2014

If \(L_1 = \{a^n | n \geq 0 \}\) and \(L_2 = \{b^n | n \geq 0 \}\), consider

(I) \(L_1⋅L_2\) is a regular language

(II) L1⋅L2 = \(\{a^n b^n|n \geq 0\}\).

Which one of the following is CORRECT?

  1. A.

    Only (I)

  2. B.

    Only (II)

  3. C.

    Both (I) and (II)

  4. D.

    Neither (I) nor (II)

Attempted by 103 students.

Show answer & explanation

Correct answer: A

Key insight: L1 = a* and L2 = b*, so L1⋅L2 = a*b*.

  • Regularity: a* and b* are regular, and regular languages are closed under concatenation, so a*b* is regular.

  • Equality check: a*b* = {a^i b^j | i, j ≥ 0}, which is not the same as {a^n b^n | n ≥ 0}. For example, aab (a^2 b^1) belongs to a*b* but not to {a^n b^n}.

Conclusion: The statement that the concatenation is a regular language is true, while the statement that the concatenation equals {a^n b^n | n ≥ 0} is false. Therefore, only the claim that the concatenation is regular is correct.

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

Explore the full course: Gate Guidance By Sanchit Sir