You are on page 1of 11

CSCI 471: Complexity and Computability

LECTURE 8
Today:
• Undecidable/Unrecognizable Languages
• HW1 solutions

1
Meiram Murzabulatov
Not all languages over {0,1} are decidable

TM Deciders Languages over {0,1}


Sets of strings of
Strings of 0s and 1s
0s and 1s

L P(L)
For all sets L, P(L) has more elements than L

Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 2


Not all languages over {0,1} are recognizable

Turing Machines Languages over {0,1}


Sets of strings of
Strings of 0s and 1s
0s and 1s

L P(L)
For all sets L, P(L) has more elements than L

Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 3


Theorem. ATM is undecidable.

ATM = { 𝑴, 𝒘 ∣ 𝑴 is a TM that accepts 𝒘}


Proof: For contradiction, suppose a TM H decides ATM.
𝐚𝐜𝐜𝐞𝐩𝐭 𝐢𝐟 𝑴 𝐚𝐜𝐜𝐞𝐩𝐭𝐬 𝒘
𝑯 𝑴, 𝒘 = '
𝐫𝐞𝐣𝐞𝐜𝐭 𝐢𝐟 𝑴 𝐝𝐨𝐞𝐬𝐧! 𝐭 𝐚𝐜𝐜𝐞𝐩𝐭 𝒘
Idea: Let D be a TM that on input 𝑴 runs H on 𝑴, 〈𝑴〉
and does the opposite of H, i.e., accepts if H rejects and
rejects if H accepts.

Run D on 𝑫 . Does it accept or reject?


If D rejects 𝑫 ⟹ H accepts 𝑫, 〈𝑫〉 ⟹ D accepts 𝑫

4
Using reductions to prove
undecidability
We want to prove that language L is undecidable.

Idea: Use a proof by contradiction.


1. Suppose to the contrary that L is decidable.
2. Use a decider for L as a subroutine to construct a
decider for ATM (or some other undecidable
language).
3. But ATM is undecidable. Contradiction!

9/4/23 Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 5


Problems in language theory

ADFA ACFG ATM


decidable decidable undecidable

EDFA ECFG ETM


decidable decidable ?

EQDFA EQCFG EQTM


decidable ? ?

9/4/23 Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 6


Prove that ETM is undecidable

ETM = { 𝑴 ∣ 𝑴 is a TM and 𝑳 𝑴 = ∅}
Proof: Suppose to the contrary that ETM is decidable,
and let R be a TM that decides it.
We construct TM S that decides ATM.
S = `` On input 〈𝑴, 𝒘〉, where 𝑴 is a TM and w is a string:
(We need to run TM R on some input, but which ???)

9/4/23 Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 7


Prove that ETM is undecidable

ETM = { 𝑴 ∣ 𝑴 is a TM and 𝑳 𝑴 = ∅}
Proof: Suppose to the contrary that ETM is decidable,
and let R be a TM that decides it.
We construct TM S that decides ATM.
S = `` On input 〈𝑴, 𝒘〉, where 𝑴 is a TM and w is a string:
1. Construct TM 𝑀′.
𝑀′ = `` On input x,
1. If x≠w, reject.
2. If x=w, run TM M on input w.
3. If it accepts, accept.’’
2. Run TM R on input <𝑴′>.

9/4/23
3. If R rejects , accept. O.w. reject.’’
Meiram Murzabulatov; based on slides by Sofya Raskhodnikova
ü 8
Prove that EQTM is undecidable

EQTM = { 𝑴𝟏 , 𝑴𝟐 ∣ 𝑴𝟏 , 𝑴𝟐 TMs and 𝑳 𝑴𝟏 = 𝑳(𝑴𝟐 )}


Proof: Reduction from ETM. Assume EQTM is decidable and
TM R decides it. Construct TM S that decides ETM.
S = `` On input 〈𝑴〉, where 𝑴 is a TM:
1. Run R on input <𝑴, 𝑴′>, where 𝑴′ rejects all inputs.
2. If R accepts, accept. O.w. reject.’’
ü

9/4/23 9
Meiram Murzabulatov; based on slides by Sofya Raskhodnikova
The Halting Problem

HALTTM = { 𝑴, 𝒘 ∣ 𝑴 is a TM that halts on string 𝒘 }

Prove that it is undecidable

Is HALTTM recognizable?

Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 10


Theorem.
A language is decidable iff it is Turing-recognizable and
co-Turing-recognizable.

Corollary. HALTTM is not Turing-recognizable.

9/4/23 Meiram Murzabulatov; based on slides by Sofya Raskhodnikova 11

You might also like