GATE | GATE-CS-2006 | Question 85
For S ∈ (0 + 1) * let d(s) denote the decimal value of s (e.g. d(101) = 5). Let L = {s ∈ (0 + 1)* d(s)mod5 = 2 and d(s)mod7 != 4}.
Which one of the following statements is true?
(A) L is recursively enumerable, but not recursive
(B) L is recursive, but not context-free
(C) L is context-free, but not regular
(D) L is regular
Answer: (D)
Explanation: It is regular
L1=d(s) mod 5 =2 is regular with 5 states
L2=d(s) mod 7 =4 is regular with 7 states
therefore L1 ^ L2′ should be regular
because regular grammar are closed under intersection and compliment
Quiz of this Question
Recommended Posts:
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 16
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 14
- GATE | GATE-CS-2015 (Mock Test) | Question 13
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 11
- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 5
- GATE | GATE-CS-2015 (Mock Test) | Question 4
- GATE | GATE-CS-2015 (Mock Test) | Question 17
- GATE | GATE-CS-2015 (Mock Test) | Question 2
- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 10
- GATE | GATE-CS-2015 (Mock Test) | Question 9



