1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.

Slides:



Advertisements
Similar presentations
1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
Advertisements

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]
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
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.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
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.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
1 Section 14.2 A Hierarchy of Languages Context-Sensitive Languages A context-sensitive grammar has productions of the form xAz  xyz, where A is a nonterminal.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
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 Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine. It is.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Recursively Enumerable and Recursive Languages
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
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.
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
THE HALTING PROBLEM - PROOF. Review  What makes a problem decidable?  3 properties of an efficient algorithm?  What is the meaning of “complete”, “mechanistic”,
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
The Acceptance Problem for TMs
Recursively Enumerable and Recursive Languages
Linear Bounded Automata LBAs
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
LIMITS OF ALGORITHMIC COMPUTATION
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Formal Languages, Automata and Models of Computation
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
CSCI 2670 Introduction to Theory of Computing
Decidability continued….
More Undecidable Problems
Presentation transcript:

1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible algorithms. Example (Turing machines). Associate a Turing machine with each n  N as follows: n  b(n)(the binary representation of n)  a(b(n))(b(n) split into 7-bit ASCII blocks, with leading zeros if needed)  if a(b(n)) is the syntax of a TM then a(b(n)) else (0, a, a, S, halt) fi. So we can effectively describe all possible Turing machines: T 0, T 1, T 2, … Of course we could use the same technique to list all possible instances of any computational model. For example, we can effectively list all possible simple programs and we can effectively list all possible partial recursive functions. If we want to use the Church-Turing thesis, then we can effectively list all possible solutions (e.g., Turing machines) to every intuitively computable problem. Decision Problems A decision problem is a problem can be phrased as a yes/no question. Such a problem is decidable if an algorithm exists to answer yes or no to each instance of the problem. Otherwise it is called undecidable. A decision problem is partially decidableif an algorithm exists to halt with the answer yes to yes-instances of the problem, but may run forever if the answer is no.

2 Examples.1. Is an arbitrary propositional wff a tautology? Decidable. 2. Is an arbitrary first-order wff valid? Undecidable and partially decidable. 3. Does a DFA accept infinitely many strings? Decidable. 4. Does a PDA accept a string s? Decidable. The Halting Problem The halting problem asks the following question. Does an arbitrary program halt on an arbitrary input? The halting problem is partially decidable: Just execute the program on the input. If the program halts, output yes. The halting problem is undecidable. To prove this, we’ll prove the following form for computable functions. Is there a computable function that can decide whether an arbitrary computable function halts on an arbitrary input? Proof: Assume, BWOC, that the halting problem is decidable. We’ll use the following effective listing of all computable functions of a single variable. ƒ 0, ƒ 1, ƒ 2, … Define the partial function g by g(n) = if ƒ n (n) halts then loop forever else 0 fi. Observe that g is computable because “ƒ n (n) halts” is computable by assumption. So there is some k such that g = ƒ k. Now apply g to k to obtain a contradiction: g(k) halts iff g(k) does not halt. Therefore the halting problem is undecidable. QED.

3 Example/Quiz. Given the following effective listing of all Turing machines. T 0, T 1, T 2, … Is it decidable whether T n halts on some input string of a’s within k steps? Answer: Yes. Perform the following algorithm. l := 0; (l represents the length of an input string of a’s. So the tape is initially empty.) while l ≤ k do Execute T n for k steps or until the halt state is reached, whichever comes first; If the halt state was reached, stop and output the answer YES; l := l + 1 (Reset the tape with one more a) od; Output the answer NO. Notice: If the while loop terminates without stopping with a YES-answer, then l > k. In this case T n will take more than k steps to process l cells with a’s. So the answer is NO. Some Total Problems There is no effective listing of the total computable functions. Proof: To see this for total computable functions of a single variable, assume, BWOC, that we have the following effective listing of these functions. ƒ 0, ƒ 1, ƒ 2, … Define g(n) = ƒ n (n) + 1. Since ƒ n is total, it follows that g is total too. Therefore g must be somewhere in the list. So there is some k such that g = ƒ k. But then ƒ k (k) = g(k) = ƒ k (k) + 1, which is a contradiction. QED.

4 The total problem asks whether an arbitrary computable function is total. The total problem is undecidable. Proof: Assume, BWOC, that the total problem is decidable. We’ll use the effective listing of all computable functions of a single variable ƒ 0, ƒ 1, ƒ 2, …. Now define the function T(n) = if ƒ n is total then 1 else 0 fi. Since “ƒ n is total” is computable by assumption, it follows that T is total too. But now we can effectively list all the total computable functions from the given list as follows: Let g0 be the smallest k such that T(k) = 1; Let g1 be the smallest k > g0 such that T(k) = 1; … Let g(n +1) be the smallest k > gn such that T(k) = 1. Continue in this manner to construct the list ƒ g0, ƒ g1, …, ƒ gn, … of all total computable functions of a single variable. But this contradicts the fact that it can’t be done. QED. Example/Quiz. Show that we can’t effectively list the total computable functions that have finite ranges. For example, ƒ(n) = n mod 4 has range {0, 1, 2, 3}. Proof: Suppose, BWOC, that ƒ 0, ƒ 1, ƒ 2, … is an effective listing of the single-variable computable functions with finite range. Now define the function g(n) = if ƒ n (n) ≤ 25 then ƒ n (n) + 1 else 25 fi. Observe that g is total, computable, and has finite range. So there is some k such that g = ƒ k. Quiz: What is the contradiction? Answer: If ƒ k (k) ≤ 25 then ƒ k (k) = ƒ k (k) + 1. If ƒ k (k) > 25 then ƒ k (k) = 25. QED.

5 Post Correspondence Problem (PCP) Given an arbitrary finite sequence (s 1, t 1 ), …, (s n, t n ) of pairs of strings, does there exist a sequence of indices i 1, …, i k, with repetitions allowed, such that s i1 …s ik = t i1 …t ik ? Example/Quiz. Does the following instance of the PCP have a solution? (ab, b), (b, a), (a, ab), (ba, b). Answer: Yes. If the pairs are labeled 1, 2, 3, 4, then the sequence 3, 2, 1 gives the equation abab = abab. Quiz. Does the following instance of the PCP have a solution? (a, aa), (aaaa, a). Answer: Yes. If the pairs are labeled 1, 2, then the sequence 1, 1, 1, 2 gives the equation aaaaaaa = aaaaaaa. The Post correspondence problem is undecidable for alphabets of size 2 or more. The proof involves reducing the problem to the halting problem. The PCP is also used in proving that it is undecidable to tell whether a context-free grammar over an alphabet of size 4 or more is ambiguous. Details of these two proofs can be found in: Harrison, Introduction to Formal Language Theory, Addison Wesley, 1981.