The regular expression 0*(10*)* denotes the same set as

2003

The regular expression 0*(10*)* denotes the same set as

  1. A.

    (1*0)*1*

  2. B.

    0 + (0 + 10)*

  3. C.

    (0 + 1)* 10(0 + 1)*

  4. D.

    none of these

Attempted by 24 students.

Show answer & explanation

Correct answer: A

The regular expression 0*(10*)* generates strings that start with any number of 0s, followed by zero or more occurrences of '1' followed by any number of 0s. This matches the pattern (1*0)*1*, which allows for any number of 1s followed by 0s, repeated zero or more times, ending with optional 1s. Both expressions accept the same language: all strings over {0,1} where every 1 is followed by any number of 0s. The other options do not match this pattern.

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

Explore the full course: Gate Guidance By Sanchit Sir