Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE MOCK 2017 | Question 53

Improve Article
Save Article
Like Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

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
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!