1.

Let L1 = {w ∈ {0,1}∗ | w has at least as many occurrences of (110)’s as (011)’s}.Let L2 = { ∈ {0,1}∗ | w has at least as many occurrences of (000)’s as (111)’s}.Which one of the following is TRUE?(a) L1 is regular but not L2(b) L2 is regular

Answer» Right choice is (a) L1 is regular but not L2

The best explanation: L1 is regular let us considering the string 011011011011 . Number of times 011 has occurred is 4  but also its occurrence is 3. Also if the string is ending with 011  we can make a 110 . Now the next string: 110110110110 in this 110 has occurred 4 times and 011 3 times which already satisfy the .


Discussion

No Comment Found

Related InterviewSolutions