There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space.

Similar documents
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.

CS154, Lecture 10: Rice s Theorem, Oracle Machines

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

ELEMENTS IN MATHEMATICS FOR INFORMATION SCIENCE NO.6 TURING MACHINE AND COMPUTABILITY. Tatsuya Hagino

CSE 105 THEORY OF COMPUTATION

Section 14.1 Computability then else

Computability and Complexity

Predicate Logic - Undecidability

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

1 Showing Recognizability

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936

CSE 105 THEORY OF COMPUTATION

16.1 Countability. CS125 Lecture 16 Fall 2014

Learning Goals of CS245 Logic and Computation

452 FINAL- VERSION E Do not open this exam until you are told. Read these instructions:

Complexity of domain-independent planning. José Luis Ambite

1 Reals are Uncountable

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

Decidability and Undecidability

Predicate Calculus - Undecidability of predicate calculus Moonzoo Kim CS Dept. KAIST

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability

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

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

Undecidability of the validity problem

Decidable Languages - relationship with other classes.

Classical First-Order Logic

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

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

CST Part IB. Computation Theory. Andrew Pitts

The P-vs-NP problem. Andrés E. Caicedo. September 10, 2011

Intro to Theory of Computation

Great Theoretical Ideas

CSE 105 Theory of Computation

CSE 105 Theory of Computation

Turing Machines Part III

Lecture Notes: The Halting Problem; Reductions

MACHINE COMPUTING. the limitations

Lecture notes on Turing machines

Theory of Computation

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

TURING MAHINES

Turing Machines Decidability

Design and Analysis of Algorithms

2 Computable and Computably Enumerable Sets

Turing Machine Recap

First-Order Logic (FOL)

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

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

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

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

258 Handbook of Discrete and Combinatorial Mathematics

CSE 105 THEORY OF COMPUTATION

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

Introduction to Turing Machines. Reading: Chapters 8 & 9

CS6901: review of Theory of Computation and Algorithms

Limits of Computability

CSE 105 THEORY OF COMPUTATION

CS154, Lecture 17: conp, Oracles again, Space Complexity

Classical First-Order Logic

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

Computation. Some history...

1 Computational Problems

Lecture 2: Axiomatic semantics

On Rice s theorem. Hans Hüttel. October 2001

Lecture 19: Finish NP-Completeness, conp and Friends

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

17.1 The Halting Problem

CS156: The Calculus of Computation

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

(a) Definition of TMs. First Problem of URMs

Notes for Lecture Notes 2

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

Theory of Computer Science

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computer Science. Theory of Computer Science. D7.1 Introduction. D7.2 Turing Machines as Words. D7.3 Special Halting Problem

7.1 The Origin of Computer Science

NP-Completeness. Until now we have been designing algorithms for specific problems

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

CSC 1700 Analysis of Algorithms: P and NP Problems

CS3719 Theory of Computation and Algorithms

CS20a: Turing Machines (Oct 29, 2002)

Chapter 6: Turing Machines

CS156: The Calculus of Computation Zohar Manna Winter 2010

1 The decision problem for First order logic

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Decidability: Reduction Proofs

Logic: Propositional Logic Truth Tables

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

CS151 Complexity Theory. Lecture 1 April 3, 2017

CSE 105 THEORY OF COMPUTATION

Chapter 1 Welcome Aboard

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Decidability in Universal Algebra

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

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

A Short Introduction to Hoare Logic

CSE 105 THEORY OF COMPUTATION

CSE200. Computability and Complexity. Daniele Micciancio. Fall 2008 UCSD

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

Transcription:

Undecidability There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space. Proved by Alan Turing in 1936 What is a computer program/algorithm? At the time, there were no electronic computers. A computer referred to a person who computes. Turing s idea of a computer program was a list of instructions that a person could follow. For us, an algorithm could refer to any of the following: Racket, C, and C++ programs Turing machines High-level pseudo-code What does it mean for an algorithm to solve a problem? The algorithm must produce the correct output for input. 1

We focus on decision problems. A decision problem A decision problem is Decidable iff. Undecidable iff. Examples of decision problems: 1. Given a propositional formula, is it satisfiable? 2. Given a predicate formula, is it valid? 3. Given a positive integer, is it prime? 4. Given a program and a Hoare triple, does the program satisfy the Hoare triple under partial correctness? 5. Given a program and a Hoare triple, does the program satisfy the Hoare triple under total correctness? 6. Given two programs, do the two programs produce the same output for every input? 7. Given a program and an input, does the program terminate on the input? 2

The Halting Problem: Given a program P and an input I, will P halt on I? Halts means terminates or does not get stuck. One of the first known undecidable problems The Halting Theorem: There does not exist an algorithm H which solves the halting problem for every program P and input I. Proof by contradiction: Assume that there exists an algorithm H(P,I), which solves the halting problem for every program P and input I. We need to derive a contradiction, which shows that H does not exist. Our approach: We will construct an algorithm X(P), which takes a program P as input. We will show that H always gives the wrong answer when predicting whether the program X halts on the input X. That is, If H(X,X) returns yes, then X does not halt on X. If H(X,X) returns no, then X halts on X. 3

The algorithm X(P) does the following three things: (1) (2) (3) Let s compare the result of X(X) and the output of H(X,X). Therefore, our assumption must be wrong, and H does not exist. QED 4

Proving Undecidability via Reduction Now that we know the halting problem is undecidable. How do we prove that another problem is undecidable? We could prove it from scratch, or We could prove that this problem is as hard as the halting problem; hence it is undecidable. Problem A is reducible to problem B. An algorithm for solving B could be used as a subroutine for solving A. If there is an algorithm to solve B, then there is an algorithm to solve A. If A is undecidable, then B is undecidable. A picture to illustrate this: 5

Halting-no-input Problem: Given a program P (that reads no input), does P halt? Theorem: The Halting-no-input problem is undecidable. Proof by contradiction: Suppose that we have an algorithm A to solve the Halting-no-input Problem. We can use it to solve the Halting problem. A proof by picture: QED 6

Total Correctness Problem: Given a Hoare triple {P} C {Q}, does C satisfy the triple under total correctness? Theorem: The total correctness problem is undecidable. Proof by contradiction: Suppose that we have an algorithm A to solve the Total Correctness Problem. We can use it to solve the Haltingno-input Problem. A proof by picture: QED 7

Partial Correctness: Given a Hoare triple {P} C {Q}, does C satisfy the triple under partial correctness? Theorem: The partial correctness problem is undecidable. Proof by contradiction: Suppose that we have an algorithm A to solve the Partial Correctness Problem. We can use it to solve the Haltingno-input Problem. A proof by picture: QED 8