0% found this document useful (0 votes)
11 views15 pages

Undecidable Problems About Languages: Sipser: Section 5.1 Pages 215 - 226

Uploaded by

emily020403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

Undecidable Problems About Languages: Sipser: Section 5.1 Pages 215 - 226

Uploaded by

emily020403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Undecidable Problems About Languages

Sipser: Section 5.1 pages 215 - 226


R-1
Reducibility

R-2
Clique and Independent Set

CLIQUE = {<G,k> | G is a graph with a k-clique}

INDEPENDENT = {<G,k> | G is a graph containing an


independent set of size k}

R-3
CLIQUE reduces to
INDEPENDENT

a d f

b
c e

a d f

b
c e

R-4
Certified Impossible

Theorem. ATM = { <M, w> | M is a TM and M accepts w } is


undecidable.

Definition. HALTTM = { <M, w> | M is a TM and M halts on input w }

R-5
The Halting Problem (Again!)

Theorem. HALTTM is undecidable.

Proof Idea. We know ATM is undecidable. We need to reduce one of


HALTTM or ATM to the other.

Which way to go?

R-6
HALTTM is undecidable

Proof. Suppose R decides HALTTM. Define

S = “On input <M, w>, where M is a TM and w a string:


1. Run TM R on input <M, w>.

2. If R rejects, then reject.

3. If R accepts, simulate M on input w until it halts.

4. If M enters its accept state, accept. If M enters


its reject state, reject.”

R-7
Does M Accept Anything at All?

Definition. ETM = { <M> | M is a TM and L(M) = ∅ }

Theorem. ETM is undecidable.

R-8
ETM = {<M> | M is a TM & L(M) =
∅}

Proof. Given an input <M, w> we construct a machine Mw as


follows:

Mw = “On input x:
1. If x ≠ w, reject.

2. If x = w, run M on input w and accept if M does.”

to be continued …

R-9
The Proof Continues

Proof continued.
Suppose TM R decides ETM. Define

S = “On input <M, w>:


1. Use the description of M and w to construct Mw.

2. Run R on input <Mw>.

3. If R accepts, reject. If R rejects, accept.”

R - 10
With Power Comes Uncertainty

M accepts w L(M) = ∅ L(M1) = L(M2)

Turing machines

Pushdown machines

Finite machines

R - 11
It’s Even Worse Than You
Thought

Rice’s Theorem. Any nontrivial property of the languages


recognized by Turing machines is undecidable.

R - 12
For Example

Definition. REGULARTM = { <M> | M is a TM and L(M) is regular}.

Theorem. REGULARTM is undecidable.

R - 13
REGULARTM is undecidable

Proof. Let R be a TM that decides REGULARTM. Define

S = “On input <M, w>:


1. Construct TM
M2 = “On input x:
1. If x has the form 0n1n, accept.
2. Otherwise, run M on input w and accept
if M accepts w.
2. Run R on input <M2>.

3. If R accepts, accept. Otherwise, if R


rejects, reject.”
R - 14
Problems

• Let EQTM = { <M1, M2> | M1 and M2 are TMs and L(M1) = L(M2) }.
Show that EQTM is undecidable by reducing ETM to EQTM.

• Consider the problem of determining whether a two-tape TM


ever writes a nonblank symbol on its second tape when run on
input w. Formulate this problem as a language and show that it
is undecidable. (Hint: create an intermediary TM T that writes
a nonblank symbol on its second tape iff M accepts w.)

R - 15

You might also like