 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
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,
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]
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
February 6, 2015CS21 Lecture 141 CS21 Decidability and Tractability Lecture 14 February 6, 2015.
Reducibility 2 Theorem 5.1 HALT TM is undecidable.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
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 ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
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.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CHAPTER 4 Decidability Contents Decidable Languages
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Linear Bounded Automata LBAs
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
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.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
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.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 20 Last time Mapping reductions Computation history method Today Computation history method.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
February 1, 2016CS21 Lecture 121 CS21 Decidability and Tractability Lecture 12 February 1, 2016.
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
Intro to Theory of Computation
LIMITS OF ALGORITHMIC COMPUTATION
Intro to Theory of Computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Jaya Krishna, M.Tech, Assistant Professor
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Undecidable problems:
Reducability Sipser, pages
CSCI 2670 Introduction to Theory of Computing
Automata, Grammars and Languages
More Undecidable Problems
Presentation transcript:

 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability

 2005 SDU 2 Reduction Reduction is a method of converting one problem into another in such a way that a solution to the second problem can be used to solve the first problem. Reduction involves always two problems, A and B, if A reduces to B, we can use a solution to B to solve A. Note: Reducibility says nothing about solving A or B. Reducibility is only about solvability of A using a solution to B.

 2005 SDU 3 Observations When problem A is reducible to problem B, solving A cannot be harder than solving B, because a solution to B gives a solution to A. If A is reducible to B and B is decidable, then A is decidable (because a solution to B solves A) If A is reducible to B and A is un-decidable, then B is un- decidable (Because if B were decidable, then A would be, a contradiction.)

 2005 SDU 4 Methodology To prove that a problem P is unsolvable by reduction proceeds as follows: 1.Find a problem Q known to be un-decidable 2.Assume that P is solvable by a TM Mp 3.Use Mp to solve Q thus reducing Q to P 1.For each instance I Q of Q, construct an instance I P of P 2.Solve I P by using Mp 3.From the answer of 2 to get the answer for corresponding I Q 4.Since Q is known to be un-decidable, M P cannot exist.

 2005 SDU 5 Application Problem P: HALT TM, is the problem of determining whether a Turing machine M halts on an input w: HALT TM = { | M is a TM and M halts on w} We use the un-decidability of A TM to show that HALT TM is un-decidable by reducing A TM to HALT TM. Proof idea: by construction: Assume that HALT TM is decidable and use this assumption to show that A TM is decidable, which contradicts the un-decidability of A TM.

 2005 SDU 6 Example --continued S = “On input, where M is a TM and w is a string: 1.Run TM R on input (R is an assumed decider of HALT TM ) 2.If R rejects, reject; (note:  A TM or M is looping); 3.If R accept, simulate M on w until it halts; 4.If M has accepted, accept; if M has rejected, reject.” Note: If R decides HALT TM, S decides A TM, a contradiction. Hence, such a decider R for HALT TM cannot exist.

 2005 SDU 7 Language emptiness E TM = { | M is a TM and L(M) =  } Theorem 5.2 E TM is un-decidable. Proof idea: 1.Assume that E TM is decidable and let TM R decides E TM. 2.Show that A TM is decidable by constructing TM S that uses R to decide A TM.

 2005 SDU 8 Reduction from A TM to E TM A good idea: Run R on a modification of, where M 1 guarantees that M 1 rejects all strings except w. On w it works as usual, i.e., M 1 (w) is the same as M(w). Then use R to test whether M 1 recognizes the empty language. The only string M 1 can recognize is w, hence, L(M 1 )  iff M accepts w. If R accepts when it is fed with, it means that L(M 1 )= . Since M 1 is identical with M on w, we know that M does not accept w.

 2005 SDU 9 Reduction from A TM to E TM The modified machine, M 1 is defined by: M 1 = “On input x; 1.If x  w, reject 2.If x = w, run M on input w and accept if M does.” Note: M 1 has w as part of its description. It conducts the test x = w by scanning the input and comparing it character by character with w.

 2005 SDU 10 Reduction from A TM to E TM Assume that E TM is decided by TM R and construct TM S that decides A TM as follows: S = “On input, where M is a TM and w is a string: 1.Use the description of M and w to construct M 1 2.Run R on input 3.If R accepts, reject; if R rejects, accept.” But a decider of A TM cannot exist, hence, R can not exist and E TM is un-decidable.

 2005 SDU 11 TM and Regular languages Test whether a TM has an equivalent DFA. REGULAR TM = { | M is a TM and L(M) is regular} REGULAR TM is un-decidable. Proof idea: Reduce A TM to REGULAR TM : Assume REGULAR TM is decided by a TM R, use R to construct a decider S of A TM. Idea for S: Take input, and construct a new TM M 1 such that L(M 1 ) is regular iff M accepts w.

 2005 SDU 12 From A TM to REGULAR TM Let R be a TM that decides REGULAR TM. We construct TM S that decides A TM as follows: S = “On input, where M is a TM and w is a string: 1.Construct TM M 1 by the procedure: M 2 = “On input x: –If x = 0 n 1 n for some n  0, accept. –If x  0 n 1 n, run M on w and accept if M accepts w” 2.Run R on 3.If R accepts, accept; if R rejects, reject.”  Since A TM is un-decidable, S cannot exist, hence, R cannot exist. REGULAR TM is un-decidable.

 2005 SDU 13 Observation Testing whether the language of a TM is context- free language is un-decidable. Testing whether the language of a TM is decidable is un-decidable. General result: Testing any property of the languages recognized by Turing machines is un- decidable (Rice’s theorem).

 2005 SDU 14 Using other reductions Sometimes reducing from other (different from A TM ) un-decidable languages, such as E TM, is more convenient. Example: Testing the equivalence of two TM: EQ TM = { | M and N are TMs and L(M)=L(N)} can be proven un-decidable by reduction fro E TM.

 2005 SDU 15 Using other reductions Let TM R decides EQ TM. Construct TM S to decide E TM as follows: S = “On input, where M is a TM: 1.Run R on input, where N is a TM that rejects all inputs 2.If R accepts, accept; if R rejects, reject.” Note: If R decides EQ TM, then S decides E TM. But E TM is un-decidable. Hence, R cannot exist, and EQ TM is un-decidable.

 2005 SDU 16 Reductions via computation histories The computation history of a TM on an input is the sequence of configurations that the machine goes through as it processes the input. We distinguish two kinds of histories: Accepting computation history Rejecting computation history. An accepting computation history for M on w is a sequence of configurations C 1, C 2, …, C k, where 1.C 1 is the start configuration of M on w 2.C k is an accepting configuration of M 3.C i+1 legally follows from C i according to the transition function of M Rejecting computation history can be defined similarly.

 2005 SDU 17 Computation history Computation histories are finite sequences. If M does not halt on w, no accepting or rejecting computation history exists for M on w.

 2005 SDU 18 Linear bounded automaton Lemma. Let M be an LBA with q states and with a tape alphabet of size s. For every n  1, for every input of length n, there are precisely qns n possible configurations. An LBA is a restricted type of TM wherein the tape head isn’t Permitted to move off the portion of the tape containing the input.

 2005 SDU 19 Decide A LBA Language A LBA ={ | M is an LBA that accepts string w} is decidable. The algorithm that decides A LBA is: L = “On input, where M is an LBA and w is a string: 1.Simulate M on w for qng n steps or until it halts; 2.If M halted, accept if M has accepted, and reject if M rejected. If M has not halted, reject.”

 2005 SDU 20 E LBA is un-decidable L x   if and only if M accepts w. For a string x = such that M is a Turing machine and w is an input to M, let L x be the set of all strings of the form #C 1 #C 2 #...#C m # such that 1. C 1, …, C m are configurations of M, 2. C 1 is the initial configuration of M on w, 3. C m is the accepting configuration of M on w, 4. Each C i+1 legally follows from C i. then L x can be recognized by an LBA.

 2005 SDU 21 Un-decidability concerning LBA E LBA = { | M is an LBA and L(M)=  } is un-decidable. Proof. Suppose that on the contrary TM R decides E LBA. Construct TM S that decides A TM as follows: S = “On input, where M is a TM and w is a string: 1.Construct LBA B from M and w as described above; 2.Run R on input ; 3.If R rejects, accept; if R accepts, reject.”

 2005 SDU 22 Un-decidability of ALL CFG The language ALL CFG = { | G is a CFG and L(G) =  *} is un-decidable. Proof. Using the decidability of ALL CFG, one can devise the following decision procedure for A TM :  For a TM M and input w construct CFG G that generates all strings over the extended alphabet of M iff M does not accept w.  If M does accept w, G does not generate a particular string which is the accepting computation history for M on w. Note: G is designed such that it generates all strings that are not accepting computation histories for M on w.

 2005 SDU 23 Concerning ALL CFG Notice that when a string s is popped off the stack, it is in reverse order. So, to compare C i and C i+1, we write the sequence of configurations in a different way: #C 1 #C 2 R #C 3 #C 4 R #...C m #. Hence, G generates all strings that: 1.Do not start with C 1, 2.Do not end with an accepting configuration 3.For some i, C i does not properly yield C i+1 under the rules of M. Construct the equivalent PDA G and then convert it to G.

 2005 SDU 24 Concerning ALL CFG Suppose that TM R decides ALL CFG, construct a TM S that decides A TM as follows: S=“ On input, where M is a TM and w is a string: 1.Construct CFG G from M and w as described. 2.Run R on input. 3.If R accepts, reject; if R rejects, accept.”

 2005 SDU 25 Application EQ CFG = { | G and H are CFGs and L(G) = L(H)} is un-decidable. Proof. Assume that EQ CFG were decidable. Construct a decider M for ALL CFG by: M = “On input, where G is a CFG: 1.Construct CFG H such that L(H)=  * 2.Run the decider for EQ CFG on 3.If it accepts, accept; if it rejects, reject.”