Skip to content
Official PYQ · 2013

GATE CS 2013 Q8 — Regular and Context-free Languages

Explain with AI

Consider the languages L1=ϕL_1 = \phi and L2={a}L_2 = \{a\}. Which one of the following represents L1L2∗∪L1∗L_1 {L_2}^* \cup {L_1}^* ?

Choose one option
View worked solution

Answer: A

To find the language represented by L1L2∗∪L1∗L_1 L_2^* \cup L_1^*, we evaluate each part of the expression step-by-step using the given languages L1=ϕL_1 = \phi and L2={a}L_2 = \{a\}:

  1. Evaluate L1L2∗L_1 L_2^*:
    The Kleene closure of L2L_2 is L2∗={a}∗={ϵ,a,aa,aaa,… }L_2^* = \{a\}^* = \{\epsilon, a, aa, aaa, \dots\}.
    Concatenating the empty language ϕ\phi with any language LL yields the empty language ϕ\phi.
    L1L2∗=ϕ⋅{a}∗=ϕL_1 L_2^* = \phi \cdot \{a\}^* = \phi
  2. Evaluate L1∗L_1^*:
    By definition, the Kleene star of any language LL always contains the empty string ϵ\epsilon because L∗=L0∪L1∪L2∪…L^* = L^0 \cup L^1 \cup L^2 \cup \dots, and L0={ϵ}L^0 = \{\epsilon\}.
    For the empty language L1=ϕL_1 = \phi:
    L1∗=ϕ∗={ϵ}L_1^* = \phi^* = \{\epsilon\}
  3. Evaluate the union:
    Combining the two parts using the union operator:
    L1L2∗∪L1∗=ϕ∪{ϵ}={ϵ}L_1 L_2^* \cup L_1^* = \phi \cup \{\epsilon\} = \{\epsilon\}

Therefore, the expression represents the language {ϵ}\{\epsilon\}, which corresponds to Option A.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular and Context-free Languages questions