Question

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
Official answer and solution
Official answer
A
From
Official GATE 2013 answer key

Solution

Apply the definitions of concatenation and Kleene star for the empty language and singleton language.

Given L1=Φ=∅L_1 = \Phi = \emptyset and L2={a}L_2 = \{ a \}:

  1. Concatenation with the empty set:
    Concatenating any language with the empty language yields the empty language:

    L1L2∗=∅⋅{a}∗=∅L_1 L_2^* = \emptyset \cdot \{ a \}^* = \emptyset
  2. Kleene star of the empty set:
    By definition of the Kleene star, L∗=⋃k=0∞LkL^* = \bigcup_{k=0}^{\infty} L^k, and L0={ϵ}L^0 = \{\epsilon\} for any language LL, including the empty language:

    L1∗=∅∗={ϵ}L_1^* = \emptyset^* = \{\epsilon\}
  3. Union:

    L1L2∗∪L1∗=∅∪{ϵ}={ϵ}L_1 L_2^* \cup L_1^* = \emptyset \cup \{\epsilon\} = \{\epsilon\}

Thus, the resulting language is {ϵ}\{\epsilon\}.

Final answer

Option (A)

Common trap

Thinking that ∅∗\emptyset^* is ∅\emptyset, whereas ∅∗={ϵ}\emptyset^* = \{\epsilon\} because the zero-length string is always included.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2013 Computer Science and Information Technology (CS)
Question
8 of 65, printed as CS Q.8
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.