Which of the following regular expression identities are true?

2012

Which of the following regular expression identities are true?

  1. A.

    (r + s)* = r* s*

  2. B.

    (r + s)* = r* + s*

  3. C.

    (r + s)* = (r* s*)*

  4. D.

    r* s* = r* + s*

Attempted by 73 students.

Show answer & explanation

Correct answer: C

Option C is correct because (r + s)* represents all strings formed by r and s. This set equals (r* s*)* as any combination can be grouped into r blocks followed by s blocks. Options A, B, and D are false because they cannot generate mixed sequences like sr or rs.

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

Explore the full course: Mppsc Assistant Professor