Which of the following are correct on regular expressions? A.…

2022

Which of the following are correct on regular expressions?

A. \(\varphi+\mathrm{L}=\mathrm{L}+\varphi=\mathrm{L}\)

B. \(\varepsilon \mathrm{L}=\mathrm{L} \varepsilon=\mathrm{L}\)

C. \(\varphi \mathrm{L}=\mathrm{L} \varphi=\varphi\)

D. \(\varphi \mathrm{L}=\mathrm{L} \varphi=\mathrm{L}\)

Choose the correct answer from the options given below:

  1. A.

    A, B and D only

  2. B.

    A, B and C only

  3. C.

    B and D only

  4. D.

    A and D only

Attempted by 119 students.

Show answer & explanation

Correct answer: B

Evaluate each given statement about languages:

  • Statement: φ + L = L + φ = L (union with the empty set) - True. The empty set contains no strings, so taking the union with a language L adds nothing; therefore φ ∪ L = L.

  • Statement: εL = Lε = L (concatenation with the empty string) - True. Concatenating any string s with the empty string ε yields s, so {ε}·L = L and L·{ε} = L.

  • Statement: φL = Lφ = φ (concatenation with the empty set) - True. Since φ has no strings, there are no pairs to concatenate, so the concatenation is empty: φ·L = ∅ and L·φ = ∅.

  • Statement: φL = Lφ = L (concatenation with the empty set yields the original language) - False. This contradicts the previous correct statement: concatenation with the empty set cannot produce strings, so it does not yield L.

Conclusion: The true statements are the ones asserting that union with the empty set leaves a language unchanged, concatenation with the empty string leaves a language unchanged, and concatenation with the empty set yields the empty set. Any choice that includes the claim that concatenating with the empty set yields the original language is incorrect.

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

Explore the full course: Mppsc Assistant Professor