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
Answer» D. L = {s ε (0+1)* I no(s)-n1(s) I ≤ 4
1.2k
0
Do you find this helpful?
2

View all MCQs in

Theory of Computation

Discussion

No comments yet

Related MCQs