GATE | GATE CS 2020 | Question 17

Which one of the following regular expressions represents the set of all binary strings with an odd number of 1′s ?
(A) ((0+1)*1(0+1)*1)*10*
(B) (0*10*10*)*0*1
(C) 10*(0*10*10*)*
(D) (0*10*10*)*10*
(E) None


Answer: (E)

Explanation: Option (A) cannot generate 001.
Option (B) cannot generate 100.
Option (C) cannot generate 001.
Option (D) cannot generate 001.
.
So, Marks to All (MTA).


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.