Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

Similar documents
1 Reals are Uncountable

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

The Limits of Computation

Limits of Computability

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

CST Part IB. Computation Theory. Andrew Pitts

Decidability: Church-Turing Thesis

A Universal Turing Machine

Decidable Languages - relationship with other classes.

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

Decidability and Undecidability

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

1 Showing Recognizability

CSCI3390-Lecture 6: An Undecidable Problem

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

1 Computational Problems

CSCI3390-Assignment 2 Solutions

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Notes for Lecture Notes 2

258 Handbook of Discrete and Combinatorial Mathematics

Computational Models Lecture 8 1

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

Computational Models Lecture 8 1

Warm-Up Problem. Please fill out your Teaching Evaluation Survey! Please comment on the warm-up problems if you haven t filled in your survey yet.

Principles of Computing, Carnegie Mellon University. The Limits of Computing

Lecture Notes: The Halting Problem; Reductions

Computational Models Lecture 8 1

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

1 Acceptance, Rejection, and I/O for Turing Machines

Turing Machines Decidability

17.1 The Halting Problem

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Lecture 12: Mapping Reductions

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Section 14.1 Computability then else

Great Theoretical Ideas

UNRESTRICTED GRAMMARS

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Computability, Undeciability and the Halting Problem

CS6902 Theory of Computation and Algorithms

Turing Machines, diagonalization, the halting problem, reducibility

Primitive recursive functions: decidability problems

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

Turing Machines. Lecture 8

CS151 Complexity Theory. Lecture 1 April 3, 2017

Decidability (What, stuff is unsolvable?)

AN INTRODUCTION TO COMPUTABILITY THEORY

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable

Theory of Computation

Intro to Theory of Computation

Introduction to Turing Machines

Computability and Complexity

CMPS 217 Logic in Computer Science. Lecture #17

Turing Machine Recap

Decidable and undecidable languages

Theory of Computation

Reductions in Computability Theory

TURING MAHINES

Understanding Computation

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

CS6901: review of Theory of Computation and Algorithms

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik

Non-emptiness Testing for TMs

Recap (1) 1. Automata, grammars and other formalisms can be considered as mechanical devices to solve mathematical problems

CSE 311: Foundations of Computing. Lecture 27: Undecidability

ACS2: Decidability Decidability

CS3719 Theory of Computation and Algorithms

CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression

CSE 105 THEORY OF COMPUTATION

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality

Acknowledgments 2. Part 0: Overview 17

Introduction to Turing Machines. Reading: Chapters 8 & 9

CSE 105 Theory of Computation

CS20a: Turing Machines (Oct 29, 2002)

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

CP405 Theory of Computation

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

(a) Definition of TMs. First Problem of URMs

Computability Theory. CS215, Lecture 6,

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 551 Final Exam, April 28, 2016 Answer Key

15-251: Great Theoretical Ideas in Computer Science Lecture 7. Turing s Legacy Continues

Lecture 16: Time Complexity and P vs NP

CSE 105 Theory of Computation

CS 21 Decidability and Tractability Winter Solution Set 3

Complexity Theory Part I

CSE 311 Lecture 28: Undecidability of the Halting Problem. Emina Torlak and Kevin Zatloukal

6-1 Computational Complexity

6.8 The Post Correspondence Problem

Post s Correspondence Problem (PCP) Is Undecidable. Presented By Bharath Bhushan Reddy Goulla

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

Automata Theory CS S-FR2 Final Review

CSE 311: Foundations of Computing. Lecture 26: Cardinality, Uncomputability

Transcription:

Undecibability Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not. The problem was posed in 1900. In 1970 it was proved that there can be no such algorithm. Already in the 1930s several problems had been proved to unsolvable. One example is the Halting Problem. We will talk about undecidable problems. It means that the problem cannot be decided by an algorithm (more precise definition later). But then, what is an algorithm? We could replace algorithms with Computers or Programs. But we will replace i with Turing Machines. A Turing Machine is a very primitive type of computer. A definition and description of Turing Machines will be given in the next lecture.

Why Turing Machines? Why do we want to use Turing Machines to solve problems? The idea is that since they are so simple it is more easy to decide what they can do or not than it would be for more complex computers. Then we use the famous Church-Turing's Thesis. Church-Turing (one form): If there is a problem A that can be decided by a computer then it can also be decided by a Turing Machine. A rough sketch: Computer Problem Translation Solution Turing Machine

We will now give a presentation of uncomputability and undecidability. Usually these concepts are defined and analysed with the Turing Machines. But we can replace Turing Machines with programs written in some language. What language? Well, it doesn't matter. We will just need some facts about programs. 1. Every program can be described by its code. 2. It is possible to enumerate the set of all program codes. (Lexicographically for instance.) 3. This means that there are only countably many possible programs. Given a program P, the code c(p) of P is a string. Sometimes it is convenient to use the code as a name for the program. (But just in this context.) This means c(p) = P.

Uncomputability About functions: Older view of functions: A function is presented as a rule for computing. Ex: f(x) =2sin(x)+3 Modern view of functions: A function is a set of pairs {(x, y)} such that if (x, y 1 ) and (x, y 2 ) are pairs in the function, then y 1 = y 2. Functions can be uncomputable What is computable? Def: f is computable if and only if there is a Turing Machine such that f(n) =m T (n) halts and returns m.

First proof of uncomputability The set of computable functions is enumerable. The set of all functions are not! Let us see some more details: Let f 1,f 2,f 3,... be a list of all computable functions. Take the array f 1 (1) f 1 (2) f 1 (3)... f 2 (1) f 2 (2) f 2 (3)... f 3 (1) f 3 (2) f 3 (3)............... We define a function φ such that φ(n) =f n (n)+1 if f n (n) is defined φ(n) =1if f n (n) is undefined Then φ is uncomputable. (What happens if φ = f k for some k?)

A decision problem is decidable if there is some algorithm that decides the problem (correctly) in finite time for every instance. The opposite is when there, for some reason, is no such algorithm. Then we say that the problem is undecidable. It is usually the case that there is an algorithm that decides the problem for some, but not all, instances. If output is not Yes/No we normally speak about computable and uncomputable problems.

Ex. 1: The Post Correspondence Problem Given a set of pairs of words {(x i,y i )}. Is there a sequence of integers a 1,a 2,...,a k such that x a1 x a2 x ak = y a1 y a2 y ak? Example: {(abb, bbab), (a, aa), (bab, ab), (baba, aa), (aba, a) } } {{ } 1 } {{ } 2 } {{ } 3 has solution a =[2, 1, 1, 4, 1, 5]: } {{ } 4 } {{ } 5 a }{{} x 2 abb }{{} x 1 abb }{{} baba }{{} x 1 x 4 abb }{{} aba }{{} x 1 x 5 = aa }{{} y 2 bbab }{{} y 1 bbab }{{} y 1 aa }{{} y 4 bbab }{{} y 1 a }{{} y 5 but {(bb, bab), (a, aa), (bab, ab), (baba, aa), (aba, a)} has no solution.

Ex. 2: The Halting Problem Given a program P and input X Does the program input X? P halt when run with It doesn t matter what programming language we use. P could be a Turing Machine.

Ex. 3: Some more applied problems: Program Verification Given a program P and a specification S for what the program is supposed to do, does the program in fact do it? P be re- Behavior of programs Can a given line in a program ached for some input? All these problems are undecidable due to close relation to the Halting Problem. But certain instances of these problems can, of course, be decided.

Proof of decidability/undecidability Proof of undecidability: Direct proof Give a direct logical proof why the problem is undecidable. Reduction We reduce from a known undecidable problem to our problem. If the reduction is computable, then our problem must be uncomputable. Proofs of decidability: Give an algorithm that decides the problem and show that it works correctly and runs in finite time.

The Halting Problem is undecidable Suppose there is an algorithm H(P, X) that decides the Halting Problem. Now consider the following program: M(P ) (1) if H(P, P) =Yes (2) get into an infinite loop (3) else (4) return What happens when we run M(M)? M(M) halts: Then H(M, M) must return No in order for Return to be reached impossible. M(M) does not halt: Then H(M, M) returns Yes and then the program will go into the infinite loop and never halt impossible. We reach a contradiction. The conclusion is that H(P, X) cannot decide the Halting Problem correctly.

Example of reduction Almost all variants of the Halting Problem are undecidable for instance: Does the program P halt on all inputs? We can show that there cannot exist an algorithm HaltAll(P ) that decides this problem. Indeed, look at the following reduction: H(P, X) (1) Construct the program Q : Q(Y ) if X = Y P (X) else Halt (2) return HaltAll(Q) If HaltAll( ) worked correctly, then we could decide the Halting Problem impossible.