Let L={w \in (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?
(A) (0*10*1)*
(B) 0*(10*10*)*
(C) 0*(10*1*)*0*
(D) 0*1(10*1)*10*
Answer: (B)
Explanation: Option (A) is incorrect because it cannot accept “110″
Option (C) is incorrect because it accept a string with single 1.
Option (D) is incorrect because it cannot accept 11101
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2010 | Question 1
- GATE | GATE CS 2010 | Question 2
- GATE | GATE CS 2010 | Question 3
- GATE | GATE CS 2010 | Question 4
- GATE | GATE CS 2010 | Question 5
- GATE | GATE CS 2010 | Question 6
- GATE | GATE CS 2010 | Question 65
- GATE | GATE CS 2010 | Question 8
- GATE | GATE CS 2010 | Question 65
- GATE | GATE CS 2010 | Question 10
- GATE | GATE CS 2010 | Question 11
- GATE | GATE CS 2010 | Question 65
- GATE | GATE CS 2010 | Question 13
- GATE | GATE CS 2010 | Question 14
- GATE | GATE CS 2010 | Question 15
- GATE | GATE CS 2010 | Question 16
- GATE | GATE CS 2010 | Question 65
- GATE | GATE CS 2010 | Question 18
- GATE | GATE CS 2010 | Question 19
- GATE | GATE CS 2010 | Question 20

