Give an example of a Turing Machine that never halts, a separate example of a Turing Machine that always accepts, and a separate example of a Turing Machine that always rejects. (Give formal descriptions for all your TMs.)
Let M be the TM with input alphabet Σ = {a,b}, tape alphabet Γ = {a,b,_}, and transition function given by the following table (where q0 is the initial state, qA is the accepting state and qR is the rejecting state.
a | b | _ | |
---|---|---|---|
q0 | q1,_,R | q4,_,R | qA,_,R |
q1 | q2,a,R | q2,b,R | qR,_,R |
q2 | q2,a,R | q2,b,R | q3,_,L |
q3 | q7,_,L | qR,_,L | q3,_,L |
q4 | q5,a,R | q5,b,R | qR,_,R |
q5 | q5,a,R | q5,b,R | q6,_,L |
q6 | qR,_,L | q7,_,L | q6,_,L |
q7 | q7,a,L | q7,b,L | q0,_,R |
Give the sequence of configurations in the computation of M on each input string below.
Let M be a Turing Machine with accepting state qA and rejecting state qR, and let M' be a Turing Machine identical to M except that qR is the accepting state of M' and qA is the rejecting state of M'. Recall that the language recognized by M is defined as: L(M) = { w ∈ Σ* : M accepts input string w }, i.e., for all input strings w ∈ Σ*, w ∈ L(M) if M accepts w, and w ∉ L(M) if M rejects w or M loops on w.