For a Turing machine , denotes an encoding of . Consider the following two languages.
Which one of the following options is correct?
View worked solution
Answer: A
To determine the decidability of and , we analyze the behavior of a Turing machine within a bounded number of steps ().
In at most steps, can scan at most the first symbols of its input tape. Consequently, the computation of on any input of length greater than during the first steps is identical to its computation on the prefix of of length .
This leads to the following key observations:
- takes more than steps on all inputs if and only if it takes more than steps on all inputs of length .
- takes more than steps on some input if and only if it takes more than steps on some input of length .
Since the input alphabet of is finite, the set of all inputs of length is finite (specifically, inputs). We can decide both properties by simulating on each of these finitely many inputs for at most steps. Since this simulation is guaranteed to terminate in finite time, both and are decidable.
Free practice · Your answers on this page are not saved.
