Turing machine versions Flashcards
For every TM with multiple tapes there is an equal machine with one tape
Combine all k tapes Into one tape with 2k lanes. Un-even lanes are the tapes letters and the even lanes are the head’s location.
Non deterministic turing machine
A turing machine that in each step might end up in a couple of different states. Can use an NTM for acceptability with no restrictions. For Decidablity, only if all compute branches are finite.
Order in the “world relm”
short words first, words of same length are lexicographically ordered.
Enumerating Turing Machine
A turing machine with no input that writes on the tape all the words in a certain language.
Enumeratable language
A language L is enumeratable if there is an ETM that generates all the words in the language
L is enumeratable <-> L is acceptable
Universal program line 1
Z <- Xn+1 +1
The variable Xn+1 is the program number, which is reduced by one originally, so we reverse that.
Universal program line 2
S <- ∏(Pi)^xi
Code all the variables into one viral be known as the universal variable
Universal program line 3
k <- 1
initialize the variable k to count how many lines of the program we completed
Universal program line 3
If k = Lt(Z) + 1OR k = 0 GOTO F
If k equals the number of lines in the program or we went to a non existing label (k=0) than end the run
Universal program line 4-5
U <- r(Zk)
P <-Pr(U) + 1
The Zk line is coded to
#(Ik)=<a,<b,c»
So here U = <b,c>
P is the prime corresponding to the variable v
Universal program:
If l(U) = 0 GOTO N
[N] K <- k+1
GOTO C
l(U) = b, the action to be taken. If it is 0 just increment the counter by one and go back to the loop.
Universal program:
If l(U) = 1 GOTO A
….
[A] S <- S*P
l(U) = b, and b==1 means to do the action +1.
S <- S*P adds one to the variable corresponding to p. Since the variables are coded into S.
Universal program:
If ~(P|S) GOTO N
….
[N] K <- k+1
GOTO C
Check if s is divisible by P. If it isn’t It means that p is 0. This check is to make sure it isn’t 0, because if it is then the minus operation can’t do anything with it. The same for GOTO, if the variable is 0 there is nowhere to go.
Universal program:
If l(U) = 2 GOTO M
[M] S <- [S/P]
GOTO N
If the action is 2, it is a minus operation. In this case we got to M, Which reduces the variable corresponding to p.