Lecture 21 Reducibility. Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Rice ’ s Theorem. Def: A property of the Turing-recognizable languages is simply a subset of all Turing- recognizable languages.
Turing -Recognizable vs. -Decidable
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
February 6, 2015CS21 Lecture 141 CS21 Decidability and Tractability Lecture 14 February 6, 2015.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Lecture 8 Recursively enumerable (r.e.) languages
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
CS21 Decidability and Tractability
February 4, 2015CS21 Lecture 131 CS21 Decidability and Tractability Lecture 13 February 4, 2015.
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Chapter 4: A Universal Program 1. Coding programs Example : For our programs P we have variables that are arranged in a certain order: Y 1 X 1 Z 1 X 2.
Lecture 18 Various TMs. Allow the head not move Theorem. If the head is allowed to stay at the cell in each move, then every function computed by the.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Ding-Zhu Du Office: ECSS 3-611, M 3:15-4:30 Lecture: ECSS 2.311, MW 12:30-1:45.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
A Universal Turing Machine
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidability Decidable/Undecidable problems. Jaruloj Chongstitvatana Decidability2 Accepting: Definition Let T = (Q, , , , s) be a TM. T accepts.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
A Universal Turing Machine
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Reductions
Turing Machines Acceptors; Enumerators
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSCE 411 Design and Analysis of Algorithms
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Computability & Complexity I
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Non-regular languages
Undecidable problems:
Proposed in Turing’s 1936 paper
CS21 Decidability and Tractability
More Undecidable Problems
Presentation transcript:

Lecture 21 Reducibility

Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that x ε A iff f(x) ε B

Complete in r. e. An r. e. set A is complete in r. e. if for every r. e. set B, B ≤ m A.

Halting problem Theorem. K = { | M accepts x } is complete in r. e.. Proof. (1) K is a r. e. set. (2) For any r. e. set A, there exists a DTM M A such that A = L(M A ). For every input x of M A, define f(x) =. Then x ε A iff f(x) ε K.

Remark If (1) A is a r. e. set, and (2) K ≤ m A, then A is complete in r. e.

Nonempty Nonempty = {M | L(M) ≠ Φ } is complete in r. e. Proof. (1) Nonempty is a r. e. set. Construct a DTM M* as follows: For each M, we may try every input of M, one by one. If M accepts an input, then M is accepted by M*.

(2) K ≤ m Nonempty. Suppose M’ is a DTM accepting every input. For each input of K, we define f( ) is a code of the TM M* behave as follows: on an input y, M* carry out the following computation: Step 1. M* simulates M on input x. If M accepts x, then go to Step 2. Step 2. M* simulates M’ on input y

Therefore, ε K => M accepts x => M* accepts every input y => f( ) = M* ε Nonempty not in K => M doesn’t halt on x => M* doesn’t halt on y => L(M*) = Φ => f( ) not in Nonempty

r. e. –hard A set B is r. e.-hard if for every r. e. set A, A ≤ m B Remark Every complete set is r. e.-hard. However, not every r. e.-hard set is complete. Every r. e.-hard set is not recursive.

All = {M | M accepts all inputs} All is r. e. hard. All is not r. e. All is not complete.

Empty = {M | L(M) = Φ} Empty is not r. e. We don’t know if Empty is r. e.-hard.

r. e. property A subset P of TM codes is called a r. e. property if M ε P and L(M’) = L(M) imply M’ ε P. e.g., Nonempty, Empty, All are r. e. properties. Question: Give an example which is a subsets of TM codes, but not a r. e. property.

Nontrivial A r. e. property is trivial if either it is empty or it contains all r. e. set.

Rice Theorem 1 Every nontrivial r. e. property is not recursive.

Proof Let P be a nontrivial r. e. property. For contradiction. Suppose P is a recursive set. So is its complement. Note that either P or its complement P does not contains the empty set. Without loss of generality, assume that P does not contains the empty set.

Since P is nontrivial, P contains a nonempty r. e. set A. Let Ma be a TM accepting A, i.e., A=L(Ma). We want to prove K ≤m P. For each input of K, we define f( ) to be a code of TM M* which behaves as follows. For each input y of M*, M* does the following:

Step 1. M* simulates M on input x of M. If M accepts x, then go to Step 2. Step 2. M* simulates Ma on y. If Ma accepts y, then M* accepts y. Therefore, if ε K then L(M*) = L(Ma) = A ε P, and if not in K, then L(M*) = Φ not in P

Since K is not recursive and K ≤ m P, we obtain a contradiction. Recursive = {M | L(M) is recursive} is not recursive. RE = {M | L(M) is r. e.} is trivial.

Question: Is K an r. e. property? Is every r. e. property complete? Is it true that for any r. e. property, either it or its complement is complete?

Rice Theorem 2 A r. e. property P is r. e. iff the following three conditions hold: (1)If A ε P and A c B for some r. e. set B, then B ε P. (2) If A is an infinite set in P, then A has a finite subset in P. (3) The set of finite languages in P is enumerable, in the sense that there is a TM that generates the (possibly) infinite string code1#code2# …, where code i is a code for the ith finite languages in P.

The code for the finite language {w 1, w 2, …, w n } is [w 1,w 2,…,w n]. In other words, there exists an r. e. set B that is a subset of codes of finite languages in P such that for every finite language F in P, B contains at least one code of F.

Examples All is not r. e. because All does not satisfy condition (2). The complement of ALL is not r. e. because it does not satisfy condition (1). Empty is not r. e. because it does not satisfy (1) Nonempty is r. e. because it satisfies (1), (2) and (3).

Given TMs M and M’, is it true that L(M)=L(M’)? A = { | L(M) = L(M’)} is not recursive. Proof. Empty ≤ m A. Let M o be a fixed TM such that L(M o ) = Φ. Define f(M) =. Then, M ε Empty iff ε A.