-
For S ∈ (0 + 1)* let d(s) denotes the decimal value of s (e.g., d(101) = 5)
Which one of the following statements is true?
-
- L is recursively enumerable but not recursive
- L is recursively but not context-free
- L is context-free but not regular
- L is regular
- L is recursively enumerable but not recursive
Correct Option: D
Given that, d(s) mod 5 = 2 and d(s) mod 7 ¹ 4} Both the languages are regular languages, since there exists deterministic finite automata for both of them. We also have an algorithm to check the regular nature of the language therefore L is regular.