Which of the following regular expression identities are true?

20122012

Which of the following regular expression identities are true?

Answer: C. (r + s)* = (r*s*)*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…

  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 125 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: Gate Guidance By Sanchit Sir

Loading lesson…