Loading...

PPT – CSCI 2670 Introduction to Theory of Computing PowerPoint presentation | free to download - id: 218fe9-ZDc1Z

The Adobe Flash plugin is needed to view this content

CSCI 2670 Introduction to Theory of Computing

October 27, 2004

Agenda

- Yesterday
- Revisit the ATM proof
- Finish Chapter 4
- Problems
- Today
- Begin Chapter 5 (pp. 171 176)

Announcements

Announcements

- No tutorials this week -- extra office hours

instead - Tuesday Wednesday 300 500
- Or by appointment

Some decidable languages

- FDFA ltAgt A is a DFA and L(A) is finite
- PRIME n n is a prime number
- CONN ltGgt G is a connected graph
- L10DFA D D is a DFA that accepts every

string w with w 10 - INTCFG ltG1, G2, wgt G1 and G2 are CFGs and w

is accepted by both - INTLCFG L(G1 ? G2), where G1 and G2 are CFGs

Classes of languages

- We have shown some language falls within each of

the following classes - Regular
- Context-free
- Decidable
- Non-Turing recognizable (ATM)
- Today we will show some languages are undecidable

Undecidable languages

- We can prove a problem is undecidable by

contradiction - Assume the problem is decidable
- Show that this implies something impossible

The halting problem HALTTM

- HALTTM ltM,wgt M is a TM and M halts on input

w - Theorem HALTTM is undecidable
- Proof (by contradiction)
- Show that if HALTTM is decidable then ATM is also

decidable - If M does not halt on w, then reject
- If M halts on w, then run M on w and return result

Proof (cont.)

- Assume R decides HALTTM
- Let S be the following TM
- S on input ltM,wgt
- Run R on ltM,wgt
- If R rejects, reject
- If R accepts, simulate M on w until it halts
- If M accepts, accept if M rejects, reject

Recap

- If HALTTM is decidable then ATM is decidable
- Since ATM is not decidable, HALTTM cannot be

decidable

Proving language L is undecidable

- Assume L is decidable
- Let N be a TM that decides the language
- Show that a known undecidable language L will be

decidable if it can use N to make decisions - This is called reducing problem L to problem L
- Conclude N cannot exist
- The language L is not decidable
- Trick Figuring out which undecidable language

to use

Undecidability of ETM

- ETM ltMgt M is a TM and L(M) ?
- Theorem ETM is undecidable
- Proof Assume ETM is decidable with decider TM

R. Use R to decide ATM. - Recall ATM ltM,wgt M is a TM that accepts

w. - How can we use R (which takes ltMgt as input) to

determine if M accepts w? - Hint make new TM

Proof (cont.)

- New TM Reject everything other than w, do

whatever M does on input w. - M1 On input x
- If x ? w, reject
- If x w, run M on input w
- Accept if M accepts
- L(M1) ? ? if and only if M accepts w

Use R and M1 to decide ATM

- Consider the following TM
- S On input ltM,wgt
- Construct M1 that rejects all but w and simulates

M on w - Run R on ltM1gt that accepts iff L(M1)?
- If R accepts, reject if R rejects, accept
- S decides ATM a contradiction
- Therefore, ETM is not decidable

Have a fantastic fall break!