Turing Machine Notes Unit 5
Turing Machine Notes Unit 5
Example:
δ(q0, a) = (q1, X, R)
Meaning: If in state q0 and reading symbol a, the TM:
Writes symbol X
Transitions to state q1
q: Current state
4. Language Acceptance by TM
Multi-tape TM: Uses multiple tapes; each tape has its own head
Alternate Formulations:
Equivalence:
o Turing Machines
o Lambda Calculus (by Alonzo Church)
Key Points:
Implications:
Recursive ⊂ RE
All Recursive languages are RE, but not all RE languages are Recursive.
No general algorithm (TM) exists to solve this for all possible inputs.
Language emptiness
Language equivalence
Emptiness: Is L(M) = ∅?
PCP asks:
Given two lists of strings over the same alphabet:
Like PCP, but the solution must start with the first pair (w1, x1).
Formally: Is there a sequence of indices such that:
w1 w_i2 ... w_ik = x1 x_i2 ... x_ik?
MPCP is also undecidable.
Always terminating
C. Lambda Calculus:
Equivalence Summary:
Lambda Calculus ≡ μ-Recursive Functions ≡ Turing Machines
Recursive
✅ ✅ ❌
Language
RE Language ❌ ✅ ❌
Halting Problem ❌ ✅ ✅
Language
❌ ❌ ✅
Equivalence
Answer:
Formal Definition:
A TM is a 7-tuple:
M = (Q, Σ, Γ, δ, q₀, B, F)
Where:
B = Blank symbol
Diagram:
Tape: | a | b | a | _ | _ | ...
Head
Language Acceptance:
A TM accepts an input string w if starting from the initial state q₀ and the
input placed on the tape, it eventually enters a final state from F.
L(M) = { w ∈ Σ | M accepts w }*
Answer:
Explanation:
Importance:
Answer:
Formal Statement:
2. Construct a TM D as follows:
o Else → halt.
o If H = NO → D halts → contradiction.
Answer:
Decidable? Yes No
Complement Also in
Yes Not necessarily
Class?
Palindromes over
Example Halting problem language
{a, b}
Definitions:
Examples:
Answer:
Two lists A = [w₁, w₂, ..., wₙ], B = [x₁, x₂, ..., xₙ] over the same
alphabet.
Example:
A: [ab, a, ba]
B: [a, aba, b]
Answer:
L = { ww | w ∈ {0,1} }*
Challenges:
2. Move to the right and find the corresponding unmarked symbol from
the second half.
Is it Decidable?
Compare both.
Answer:
Input to UTM:
A pair ⟨M, w⟩
o w = Input string.
Example:
Importance:
Forms the basis of general-purpose computers.
Answer:
Differences:
Halting
Yes No
Guaranteed
Includes
No Yes
Minimization
Computational
Less powerful Equivalent to TM
Power
{ w#w | w ∈ {0,1} }*
🔹 Q1. Construct a Turing Machine (TM) to accept the language L =
📝 Requirements:
Given TM transitions:
q0 a X R q1
q1 b Y R q2
q2 b Y L q3
q3 Y Y L q3
q3 X X R qf
Reject otherwise.
✅ Expected Components:
Explanation of working.
Encode TM M as ⟨M⟩
Given Transitions:
δ(q0, a) = (q1, X, R)
δ(q1, a) = (q1, a, R)
δ(q1, b) = (q2, Y, L)
δ(q2, a) = (q2, a, L)
δ(q2, X) = (qf, X, R)
✅ Expected Answer:
Initial: q0 aab
📝 L = { w ∈ {0,1} | w = w^R }*
✅ Strategy:
Move inward.
✅ Expected Answer:
Describe approach.
🔹 Q7. Given the TM, does it accept input w = 010? Justify using
transitions and configurations
TM Table:
q0 0 X R q1
q1 1 Y R q2
q2 0 X L q3
q3 Y Y L q3
q3 X X R qf
✅ Answer Format:
✅ Expected Answer:
Design a TM that accepts a^n b^n c^n, or justify why it's not TM-
recognizable.