Open In App

GATE | GATE MOCK 2017 | Question 53

Like Article
Like
Save
Share
Report

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads