CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

For a Turing machine M, M denotes an encoding of M. Consider the following two languages:
L1 = {M| M takes more than 2021 steps on all inputs}
L2 = {M| M takes more than 2021 steps on some inputs}
Which of the following options is correct?

A
L1 is undecidable and L2 is decidable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Both L1 and L2 are undecidable.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L1 is decidable and L2 is undecidable.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Both L1 and L2 are decidable.
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D Both L1 and L2 are decidable.
L1 = {M| M takes more than 2021 steps on all inputs}
L2 = {M| M takes more than 2021 steps on some input}
A Turing machine reads at most 2021 bits of input while making 2021 steps. So the halting behaviour is completely determined by the first 2021 bits of input. Now the number of strings with 2021 bits is finite and so generate all of them and in finite amount of time we can check if the given TM, M halts on any of these strings. For L1, the algorithm will be as follows.
Does not halts–––––––––––––– on all of these strings Yes
Halts on at least one––––––––––– of these strings No
For L2, the algorithm will be follows,
Does not halts–––––––––––––– on at least one––––––––––– of these strings Yes
Halts––––– on all of these strings No
So, both L1 and L2 are decidable

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
States of Matter
Watch in App
Join BYJU'S Learning Program
CrossIcon