Related Articles
GATE | GATE-CS-2016 (Set 2) | Question 54
• Difficulty Level : Expert
• Last Updated : 03 Oct, 2017

Consider the following languages.

```L1 = { <M>  | M takes at least 2016 steps on some input},
L2 = { <M>  | M takes at least 2016 steps on all inputs} and
L3 = { <M>  | M accepts ε},```

where for each Turing machine M,   <M> denotes a specific encoding of M.

Which one of the following is TRUE?
(A) L1 is recursive and L2, L3 are not recursive
(B) L2 is recursive and L1, L3 are not recursive
(C) L1, L2 are recursive and L3 is not recursive
(D) L1, L2, L3 are recursive

Answer: (C)

Explanation: L1 and L2 both are recursive.
L1 = { <M> | M takes at least 2016 steps on some input}
In L1 we can stop giving input once we find any string which is accepted in less than 2016 steps. In L2 we
have to check all possible inputs whose length is less than 2016 and all possible string whose length is less
than 2016 is a finite set. For both L1 and L2 machine is definetly going to halt. Both L1 and L2 are recursive.
L3 is undecideble, M accepts ε. So L3 is not recursive.
Option (C) is CORRECT.

Quiz of this Question My Personal Notes arrow_drop_up