Professional Documents
Culture Documents
Lecture 8
Lecture 8
Adnane Saoud
1
Summary of lecture 7
Lecture 7
• Notation for encodings and TMs
• Decidability of various problems about automata and grammars:
• Decidability for TMs.
• Diagonalization method
Lecture 8
• The Reducibility Method to prove undecidability and T-
unrecognizability.
• Mapping reducibility as a type of reducibility.
2
Decidability of TMs
3
Acceptance Problem for TMs
Description of 𝑀, input 𝑤
𝑈
4
Acceptance Problem for TMs
5
The Size of Infinity
Informally, two sets have the same size if we can pair up their members.
This definition works for finite sets.
Apply it to infinite sets too.
6
Countable Sets
Let ℚ# = $⁄ 6 -3
% 𝑚, 𝑛 ∈ ℕ} 7 3
Show ℕ and ℚ! have the same size ⋮ ⋮
9
𝐴TM is undecidable
𝐴TM 𝐴TM
decidable
11
𝐴TM is T-unrecognizable
Exercise:
From what we’ve learned, which closure properties
can we prove for the class of T-recognizable languages?
Choose all that apply.
(a) Closed under union.
(b) Closed under intersection.
(c) Closed under complement.
(d) Closed under concatenation.
(e) Closed under star.
12
Reducibility
13
The Reducibility Method
14
Reducibility – Concept
15
𝐸TM is undecidable
Let 𝐸TM = { 𝑀 | 𝑀 is a TM and 𝐿 𝑀 = ∅ }
Theorem: 𝐸TM is undecidable
Proof by contradiction. Show that 𝐴TM is reducible to 𝐸TM.
Assume that 𝐸TM is decidable and show that 𝐴TM is decidable (false!).
Let TM 𝑅 decide 𝐸TM.
Construct TM 𝑆 deciding 𝐴TM.
𝑆 = “On input 𝑀, 𝑤
1. Transform 𝑀 to new TM 𝑀$ = “On input 𝑥
1. If 𝑥 ≠ 𝑤, reject.
2. else run 𝑀 on 𝑤
3. Accept if 𝑀 accepts.”
2. Use 𝑅 to test whether 𝐿(𝑀$ ) = ∅
3. If YES [so 𝑀 rejects 𝑤] then reject. 𝑀$ works like 𝑀 except that it
If NO [so 𝑀 accepts 𝑤] then accept. always rejects strings 𝑥 where 𝑥 ≠ 𝑤.
𝑤 if 𝑀 accepts 𝑤
So 𝐿 𝑀$ = 9
∅ if 𝑀 rejects 𝑤
16
Mapping Reducibility
17
Mapping Reducibility
Definition: Function 𝑓: Σ ∗ → Σ ∗ is computable if there is a TM 𝐹
where 𝐹 on input 𝑤 halts with 𝑓(𝑤) on its tape, for all strings 𝑤.
Definition: 𝐴 is mapping-reducible to 𝐵 (𝐴 ≤. 𝐵) if there is
a computable function 𝑓 where 𝑤 ∈ 𝐴 iff 𝑓 𝑤 ∈ 𝐵.
𝑤 𝑓 𝑤
𝐴 𝑓 𝐵
18
Mapping Reducibility
Definition: Function 𝑓: Σ ∗ → Σ ∗ is computable if there is a TM 𝐹
where 𝐹 on input 𝑤 halts with 𝑓(𝑤) on its tape, for all strings 𝑤.
Definition: 𝐴 is mapping-reducible to 𝐵 (𝐴 ≤. 𝐵) if there is
a computable function 𝑓 where 𝑤 ∈ 𝐴 iff 𝑓 𝑤 ∈ 𝐵.
20