More Undecidable Problems: Deepak D'Souza
More Undecidable Problems: Deepak D'Souza
Deepak D’Souza
18 November 2019
More problems about Turing Machines
Outline
Problem (a)
Is it decidable whether a given Turing machine has at least 481
states? Assume that the TM is given using the encoding below:
n m k s t r u v p a q b p0 a0 q0 b0 p 00 a00 q 00 b 00
0 10 10 10 10 10 10 10 1 0 10 10 10 10 1 0 10 10 10 100 · · · 1 0 10 10 10 10.
Problem (a)
Is it decidable whether a given Turing machine has at least 481
states? Assume that the TM is given using the encoding below:
n m k s t r u v p a q b p0 a0 q0 b0 p 00 a00 q 00 b 00
0 10 10 10 10 10 10 10 1 0 10 10 10 10 1 0 10 10 10 100 · · · 1 0 10 10 10 10.
Yes, it is.
We can give a TM N which given enc(M)
Counts the number of states in M upto 481.
Accepts if it reaches 481, rejects otherwise.
More problems about Turing Machines
Yes, it is.
We can give a TM N which given enc(M)
Uses 4 tapes: On the 4th tape it writes 481 0’s.
Uses the first 3 tapes to simulate M on input , like the
universal TM U.
Blanks out a 0 from 4th tape for each 1-step simulation done
by U.
Rejects if M halts before all 0’s are blanked out on 4th tape,
accepts otherwise.
More problems about Turing Machines
Problem (c)
Is it decidable whether a given Turing machine takes more than
481 steps on some input without halting?
Problem (c)
Is it decidable whether a given Turing machine takes more than
481 steps on some input without halting?
Yes, it is.
Check if M runs for more than 481 steps on some input x of length
upto 481. If so accept, else reject.
1 2 3 481 482
` a a b a b a a a [ [
More problems about Turing Machines
Problem (d)
Is it decidable whether a given Turing machine takes more than
481 steps on all inputs without halting?
Problem (d)
Is it decidable whether a given Turing machine takes more than
481 steps on all inputs without halting?
Yes, it is.
Check if M runs for more than 481 steps on each input x of length
upto 481. If so accept, else reject.
1 2 3 481 482
` a a b a b a a a [ [
More problems about Turing Machines
Problem (e)
Is it decidable whether a given Turing machine moves its head
more than 481 cells away from the left-end marker, on input ?
Problem (e)
Is it decidable whether a given Turing machine moves its head
more than 481 cells away from the left-end marker, on input ?
Yes, it is.
Simulate M on for upto m481 · 482 · k + 1 steps. If M visits the
482nd cell, accept, else reject.
1 2 3 481 482
` a a b a b a a a [ [
More problems about Turing Machines
Problem (f)
Is it decidable whether a given Turing machine accepts the
null-string ?
More problems about Turing Machines
Problem (f)
Is it decidable whether a given Turing machine accepts the
null-string ?
No.
If it were decidable, say by a TM N, then we could use N to decide
HP as follows: Define a new machine N 0 which given input M#x,
0
outputs the description of a machine MM,x which:
erases its input
writes x on its input tape
Behaves like M on x
Accepts if M halts on x.
N 0 then calls N with input MM,x
0 .
0 0
N accepts MM,x iff MM,x accepts iff M halts on x.
More problems about Turing Machines
A∗ if M halts on x
0
L(MM,x ) =
∅ if M does not halt on x.
More problems about Turing Machines
Problem (g)
Is it decidable whether a given Turing machine accepts any string
at all? That is, is L(M) 6= ∅?
More problems about Turing Machines
Problem (h)
Is it decidable whether a given Turing machine accepts all strings?
That is, is L(M) = A∗ ?
More problems about Turing Machines
Problem (i)
Is it decidable whether a given Turing machine accepts a finite set?
More problems about Turing Machines
Problem (j)
Is it decidable whether a given Turing machine accepts a regular
set?
More problems about Turing Machines
Problem (j)
Is it decidable whether a given Turing machine accepts a regular
set?
Given M and x, build a new machine M 0 that behaves as follows:
1 Saves its input y on tape 2.
2 writes x on tape 1.
3 runs as M on x.
4 if M gets into a halting state, then
M 0 takes back control,
Runs as MNR on y ,
(Here MNR is any TM that accepts a non-regular language
NR, say NR = {an b n | n ≥ 0}).
M 0 accepts iff MNR accepts.
More problems about Turing Machines
0 NR if M halts on x
L(M ) =
∅ if M does not halt on x.
More problems about Turing Machines
Problem (k)
Is it decidable whether a given Turing machine accepts a CFL?
More problems about Turing Machines
Problem (l)
Is it decidable whether a given Turing machine accepts a recursive
set?