BU CS 332 – Theory of Computation
Lecture 11:
- TM Variants
- Closure Properties
Reading: Sipser Ch 3.2
Mark Bun March 1, 2020
BU CS 332 Theory of Computation Lecture 11: Reading: TM Variants - - PowerPoint PPT Presentation
BU CS 332 Theory of Computation Lecture 11: Reading: TM Variants Sipser Ch 3.2 Closure Properties Mark Bun March 1, 2020 The Basic Turing Machine (TM) Input Tape Finite control Input is written on an
Reading: Sipser Ch 3.2
Mark Bun March 1, 2020
3/3/2020 CS332 ‐ Theory of Computation 2
Tape 𝑏 𝑐 𝑏 𝑏 Finite control …
Input
0 → 0, 𝑆 ⊔ → ⊔, 𝑆
accept reject
0 → 0, 𝑆 ⊔ → ⊔, 𝑆
𝑟0 𝑟1
A TM is a 7‐tuple
and )
)
3/3/2020 CS332 ‐ Theory of Computation 4
means “move left” and means “move right” means:
means:
which case don’t move
3/3/2020 CS332 ‐ Theory of Computation 5
A string with captures the state of a TM together with the contents of the tape
3/3/2020 CS332 ‐ Theory of Computation 6
A configuration is a string where and
∗
(followed by blanks )
3/3/2020 CS332 ‐ Theory of Computation 7
Start configuration: One step of computation:
if
if
if Accepting configuration: = Rejecting configuration: =
3/3/2020 CS332 ‐ Theory of Computation 8
accepts input if there is a sequence of configurations
the set of all strings which accepts is Turing‐recognizable if for some TM :
in state
in state OR runs forever
3/3/2020 CS332 ‐ Theory of Computation 9
the set of all strings which accepts is Turing‐recognizable if for some TM :
in state
in state OR runs forever is (Turing‐)decidable if for some TM which halts on every input
in state
in state
3/3/2020 CS332 ‐ Theory of Computation 10
Computational Problem: Given a Diophantine equation, does it have a solution over the integers?
3/3/2020 CS332 ‐ Theory of Computation 11
3/3/2020 CS332 ‐ Theory of Computation 12
Does changing the model result in different languages being recognizable / decidable? So far we’ve seen… ‐ We can require that FAs/PDAs have a single accept state ‐ (CFGs can always be put in Chomsky Normal Form) ‐ Adding nondeterminism does not change the languages recognized by finite automata Turing machines have an astonishing level of robustness
3/3/2020 CS332 ‐ Theory of Computation 13
left or right Proof that TMs with “stay put” are no more powerful: Simulation: Convert any TM with “stay put” into an equivalent TM without Replace every “stay put” instruction in with a move right instruction, followed by a move left instruction in ’
3/3/2020 CS332 ‐ Theory of Computation 14
Proof that TMs with 2‐way infinite tapes are no more powerful: Simulation: Convert any TM with 2‐way infinite tape into a 1‐way infinite TM with a “two‐track tape”
3/3/2020 CS332 ‐ Theory of Computation 15
Tape 𝑏 𝑐 𝑏 … Input …
New state set:
means “ , working on lower track” New transitions:
If 𝜀 𝑞, 𝑏 𝑟, 𝑐, 𝑀, let 𝜀′ 𝑞, , 𝑏, 𝑏 𝑟, , 𝑐, 𝑏 , 𝑆 Also need new transitions for moving right, lower track, hitting $, initializing input into 2‐track format
3/3/2020 CS332 ‐ Theory of Computation 16
stack PDAs
…
3/3/2020 CS332 ‐ Theory of Computation 17
The equivalence of these models is a mathematical theorem Church‐Turing Thesis: Each of these models captures our intuitive notion of algorithms The Church‐Turing Thesis is not a mathematical statement!
3/3/2020 CS332 ‐ Theory of Computation 18
3/3/2020 CS332 ‐ Theory of Computation 19
𝑐 𝑐 𝑏 𝑏 𝑏 Finite control 𝑏 𝑐 ⊔ 𝑏 𝑏 ⊔ 𝑐 𝑏 𝑏 𝑑
Fixed number of tapes (can’t change during computation) Transition function
Theorem: Every ‐tape TM with can be simulated by an equivalent single‐tape TM
3/3/2020 CS332 ‐ Theory of Computation 20
𝑐 𝑐 𝑏 𝑏 Finite control 𝑏 𝑐 ⊔ 𝑏 ⊔ 𝑐 𝑏 𝑏 ⊔ 𝑐 𝑏 𝑏 𝑑 # 𝑏 𝑐 ⊔ 𝑏 # 𝑐 𝑐 𝑏 𝑏 # Finite control