M

Mr. Dubey • 52.26K Points
Coach

Q. Consider a string s over (0+1)*. The number of 0’s in s is denoted by no(s) and the number of 1’s in s is denoted by n1(s). The language that is not regular is

(A) L = {s ε (0+1)* I for every prefix s’ of s, I no(s’)-n1(s’) I ≤ 2}
(B) L = {s ε (0+1)* I no(s) mod 7 = n1(s) mod 5 = 0}
(C) L = {s ε (0+1)* I no(s) is a 3 digit prime}
(D) L = {s ε (0+1)* I no(s)-n1(s) I ≤ 4
Correct : Option (D)

Share

Discusssion

Login to discuss.