The Halting Problem Is Undecidable
The Halting Problem Is Undecidable
The Halting Problem Is Undecidable
Counter-assumption: is Turing-recognizable
• Then by Theorem B, ERR = is Turing-recognizable.
• U is known to be Turing-recognizable (Th. E) and now also is
Turing-recognizable. Hence, by Theorem 4.22, U is decidable.
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
186
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
1
187
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
188
M, w
MU
MHALT
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
2
189
Chomsky hierarchy
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
190
D, , , … D, , , …
0: Turing-recognizable languages
Decidable languages
U, HALTTM, …
1: Context-sensitive languages
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
3
191
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
192
Let us assume that there exists a total Java method h that returns
true if the method represented by string m halts on input w and
false otherwise:
boolean h(String m, String w)
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
4
193
5. Reducibility
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
194
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
5
195
• Let Mw be a Turing machine that replaces its actual input with the
string w = a1a2…ak and then works as M
• Operation of Mw does not depend in any way about the actual
input.
• The TM either accepts or rejects all inputs:
*
w 0,1 , if w L( M )
L( M )
0 if w L( M )
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
196
*/*, L
A/a1, L
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
6
197
Mw
M, w
MENC
• By combining MENC and the decider MTNE for the language NETM
we are now able to construct the following Turing machine MUT
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
198
Mw
M, w
MTNE
MENC
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
7
199
M, w L(MUT)
Mw L(MTNE) = NETM
L(Mw)
w L(M)
M, w U
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
200
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
8
201
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
202
x
start
Mparenth
w M
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
9
203
*
0,1 if w L( M )
L( M w ) n n
0 1 |n 0 if w L( M )
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
204
Mw
M, w
MTREG
MENC
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
10
205
M, w
L(MUT)
Mw L(MTREG) = REGTM
L(Mw) is a regular language
w L(M)
M, w U
• By Theorem F, U is not decidable, and the existence of the TM
MUT is a contradiction
• Hence, language REGTM cannot have a decider MTREG
• Thus, we have shown that the language REGTM is not decidable
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
206
Rice’s Theorem
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
11
207
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
208
Computation Histories
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
12
209
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
210
Theorem 5.9
The acceptance problem for linear bounded automata
ALBA = { M, w | M is an LBA that accepts string w }
is decidable.
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
13
211
Theorem 5.10
The emptiness problem for linear bounded automata
ELBA = { M | M is an LBA and L(M) = }
is undecidable.
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
212
L( B ) if w L( M )
L(B ) if w L( M )
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
14
213
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
214
M, w L(MUT)
B L(MET)
L(B)
w L(M)
M, w U
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
15
215
B
M, w
MET
MENC
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
216
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
16
217
Definition 5.20
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
218
f
*
f B
A
Department of Software Systems OHJ-2306 Introduction to Theoretical Computer Science, Fall 2011 27.10.2011
17