GATE | GATE MOCK 2017 | Question 53

Let, init (L) = {set of all prefixes of L},

Let L = {w | w has equal number of 0’s and 1’s}

init (L) will contain:



(A) all binary strings with unequal number of 0’s and 1’s

(B) all binary strings with ԑ-string
(C) all binary strings with exactly one more 0’s than number of 1’s

(D) None of above


Answer: (B)

Explanation:

Clearly init (L) = (0+1)*. Take any string in (0+1)* say 101011, we can append required number of symbols to make it a member of L like 10101100.


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


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