100 likes | 221 Vues
This document outlines key concepts from the theory of computing, focusing on undecidability, Rice’s Theorem, and the implications of reductions in computational problems. The agenda includes a review of an undecidability proof and an exploration of Rice’s Theorem, highlighting that determining non-trivial properties of Turing machines is undecidable. The discussion also includes specific proof strategies and constructs Turing machines that illustrate these concepts. Homework assignments related to the topic are mentioned, reinforcing understanding of the material.
E N D
CSCI 2670Introduction to Theory of Computing November 1, 2005
Agenda • Last week • Test & undecidability • Today • Review one undecidability proof • Rice’s Theorem • Reductions (Section 5.3) November 1, 2005
Announcements Announcements • Homework due next Tuesday (11/8) • 5.7, 5.12 (do not use Rice’s Theorem), 5.20, 5.22, 5.30 b • Old text 5.7 • Get handout for 5.12, 5.20, 5.22 and 5.30 b November 1, 2005
An undecidable language Let REGULARTM = {<M> | M is a TM and L(M) is a regular language} Theorem: REGULARTM is undecidable Proof: Assume R decides REGULARTM and use R to decide ATM (reduce the ATM problem to the REGULARTM problem). As before, make a new TM, M2, that accepts a regular language iff M accepts w. November 1, 2005
Proof (cont.) Consider the following TM S = “On input <M,w> • Construct the following TM M2 M2 = “On input x • If x = 0n1n for some n, accept • Otherwise, run M on w. If M accepts w, accept” • Run R on M2 (accepts iff L(M2) is a RL) • If R accepts, accept; if R rejects, reject” S decides ATM if R decides REGULARTM November 1, 2005
Insight • The TM M2 is specially designed to be regular if and only if M accepts w • Then call TM that decides REGULARTM on M2 November 1, 2005
Rice’s theorem • Determining whether a TM satisfies any non-trivial property is undecidable • A property is non-trivial if: • It depends only on the language of M, and • Some, but not all, Turing machines have the property • Examples: Is L(M) regular? A CFG? Finite? November 1, 2005
Proof of Rice’s theorem • Assume there is some decidable non-trivial property P for Turing machines • Assume TM’s that accept do not satisfy P • If they do, just consider P November 1, 2005
Proof of Rice’s theorem • Let TM B decide P • On input <M>, B accepts iff TM M has property P • Let MP be a TM that satisfies P • Since P is non-trivial, there is some MP satisfying P • Use B and MP to decide ATM • Create a new TM S that decides ATM using B and MP November 1, 2005
ATM decider using MP S = “On input <M,w> • Create the following TM N N = “On input x • Run M on w until it accepts • If M accepts w, run MP on x • If MP accepts x, accept; if MP rejects x, reject” • Run B on <N(<M,w>)> If B accepts, accept; if B rejects, reject” L(N) = L(MP) if M accepts w; otherwise L(N) = S decides ATM if B decides TM’s satisfying P Therefore, B cannot exist November 1, 2005