Which one of the following regular expressions represents the set of all…

GATE · 2020 · CS · Computer Science & ITModified — slightly modified from the official paper; see the solution

Which one of the following regular expressions represents the set of all binary strings with an odd number of 1′s ?

  1. A.

    ((0+1)∗1(0+1)∗1)∗10∗((0+1)^*1(0+1)^*1)^*10^*

  2. B.

    (0∗10∗10∗)∗0∗1(0^*10^*10^*)^*0^*1

  3. C.

    10∗(0∗10∗10∗)∗10^*(0^*10^*10^*)^*

  4. D.

    (0∗10∗10∗)∗0∗10∗(0^*10^*10^*)^*0^*10^*

Attempted by 227 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…