CST Part IB. Computation Theory. Andrew Pitts

Similar documents
Decidable Languages - relationship with other classes.

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

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

17.1 The Halting Problem

Hilbert s problems, Gödel, and the limits of computation

Hilbert s problems, Gödel, and the limits of computation

Theory of Computation (IX) Yijia Chen Fudan University

Great Theoretical Ideas

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Decidability: Church-Turing Thesis

Theory of Computation

Introduction to Turing Machines

Lecture Notes. Advanced Discrete Structures COT S

Church s undecidability result

A talk given at the City Univ. of Hong Kong on April 14, ON HILBERT S TENTH PROBLEM AND RELATED TOPICS

Alan Turing and the Mathematics of the Unsolvable

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Turing Machines Decidability

Hilbert s Tenth Problem

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

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

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

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

CS 275 Automata and Formal Language Theory

Understanding Computation

Undecidable propositions with Diophantine form arisen from. every axiom and every theorem in Peano Arithmetic. T. Mei

The Church-Turing Thesis and Relative Recursion

Limits of Computability

Turing Machines. Lecture 8

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

The roots of computability theory. September 5, 2016

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

CS 275 Automata and Formal Language Theory

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Predicate Logic - Undecidability

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

258 Handbook of Discrete and Combinatorial Mathematics

Fundamentals of Computer Science

Computability Theory. CS215, Lecture 6,

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Primitive recursive functions: decidability problems

CSCI3390-Lecture 6: An Undecidable Problem

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

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Decidability and Undecidability

Bjorn Poonen. MSRI Introductory Workshop on Rational and Integral Points on Higher-dimensional Varieties. January 18, 2006

Register machines L2 18

The Legacy of Hilbert, Gödel, Gentzen and Turing

Lecture 1: The arithmetic hierarchy

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

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

Foundations of

CS151 Complexity Theory. Lecture 1 April 3, 2017

Computability and Complexity

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

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

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

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Propositions as Types

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

Handouts. CS701 Theory of Computation

Properties of Relational Logic

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

GTI. Undecidability. Total Recall 3. Halting. Undecidability. A. Ada, K. Sutner Carnegie Mellon University. Spring 2018

Listable Sets and Diophantine Sets; Hilbert s Tenth Problem

Turing Centenary Lecture

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

Computational Models Lecture 7, Spring 2009

Lecture 12: Mapping Reductions

1 Computational Problems

7.1 The Origin of Computer Science

Propositional and Predicate Logic - XIII

Notes for Lecture Notes 2

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

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

COMPUTATION IN AND ABOUT PHYSICS AND MATHEMATICS

Undecidability. Almost all Languages are undecidable. Question: Is it just weird languages that no one would care about which are undecidable?

Turing Machines Part III

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

Acknowledgments 2. Part 0: Overview 17

Lecture Notes: The Halting Problem; Reductions

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Turing Machine Recap

Exam Computability and Complexity

Gödel s Incompleteness Theorem. Overview. Computability and Logic

UNRESTRICTED GRAMMARS

Friendly Logics, Fall 2015, Lecture Notes 1

Universality and Computability

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 14 : Turing Machines

The Church-Turing Thesis

Lecture 19: Universality and Computability

Non-emptiness Testing for TMs

Opleiding Informatica

Syntax and Semantics. The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of:

Computability, Undeciability and the Halting Problem

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

Reductions in Computability Theory

Logic, Elliptic curves, and Diophantine stability

Umans Complexity Theory Lectures

Transcription:

Computation Theory, L 1 1/171 CST Part IB Computation Theory Andrew Pitts Corrections to the notes and extra material available from the course web page: www.cl.cam.ac.uk/teaching/0910/comptheory/

Introduction Computation Theory, L 1 2/171

Algorithmically undecidable problems Computation Theory, L 1 3/171 Computers cannot solve all mathematical problems, even if they are given unlimited time and working space. Three famous examples of computationally unsolvable problems are sketched in this lecture. Hilbert s Entscheidungsproblem The Halting Problem Hilbert s 10th Problem.

Computation Theory, L 1 4/171 Hilbert s Entscheidungsproblem Is there an algorithm which when fed any statement in the formal language of first-order arithmetic, determines in a finite number of steps whether or not the statement is provable from Peano s axioms for arithmetic, using the usual rules of first-order logic? Such an algorithm would be useful! For example, by running it on k > 1 p, q(2k = p + q prime(p) prime(q)) (where prime(p) is a suitable arithmetic statement that p is a prime number) we could solve Goldbach s Conjecture ( every strictly positive even number is the sum of two primes ), a famous open problem in number theory.

Hilbert s Entscheidungsproblem Computation Theory, L 1 5/171 Is there an algorithm which when fed any statement in the formal language of first-order arithmetic, determines in a finite number of steps whether or not the statement is provable from Peano s axioms for arithmetic, using the usual rules of first-order logic? Posed by Hilbert at the 1928 International Congress of Mathematicians. The problem was actually stated in a more ambitious form, with a more powerful formal system in place of first-order logic. In 1928, Hilbert believed that such an algorithm could be found. A few years later he was proved wrong by the work of Church and Turing in 1935/36, as we will see.

Decision problems Computation Theory, L 1 6/171 Entscheidungsproblem means decision problem. Given a set S whose elements are finite data structures of some kind (e.g. formulas of first-order arithmetic) a property P of elements of S (e.g. property of a formula that it has a proof) the associated decision problem is: find an algorithm which terminates with result 0 or 1 when fed an element s S and yields result 1 when fed s if and only if s has property P.

Algorithms, informally Computation Theory, L 1 7/171 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples, such as: Procedure for multiplying numbers in decimal place notation. Procedure for extracting square roots to any desired accuracy. Euclid s algorithm for finding highest common factors.

Algorithms, informally Computation Theory, L 1 8/171 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description of the procedure in terms of elementary operations deterministic (next step uniquely determined if there is one) procedure may not terminate on some input data, but we can recognize when it does terminate and what the result is.

Algorithms, informally No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description of the procedure in terms of elementary operations deterministic (next step uniquely determined if there is one) procedure may not terminate on some input data, but we can recognize when it does terminate and what the result is. e.g. multiply two decimal digits by looking up their product in a table Computation Theory, L 1 8/171

Algorithms, informally Computation Theory, L 1 9/171 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. In 1935/36 Turing in Cambridge and Church in Princeton independently gave negative solutions to Hilbert s Entscheidungsproblem. First step: give a precise, mathematical definition of algorithm. (Turing: Turing Machines; Church: lambda-calculus.) Then one can regard algorithms as data on which algorithms can act and reduce the problem to...

The Halting Problem Computation Theory, L 1 10/171 is the decision problem with set S consists of all pairs (A, D), where A is an algorithm and D is a datum on which it is designed to operate; property P holds for (A, D) if algorithm A when applied to datum D eventually produces a result (that is, eventually halts we write A(D) to indicate this).

The Halting Problem is the decision problem with set S consists of all pairs (A, D), where A is an algorithm and D is a datum on which it is designed to operate; property P holds for (A, D) if algorithm A when applied to datum D eventually produces a result (that is, eventually halts we write A(D) to indicate this). Turing and Church s work shows that the Halting Problem is undecidable, that is, there is no algorithm H such that for all (A, D) S { 1 if A(D) H(A, D) = 0 otherwise. Computation Theory, L 1 10/171

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever.

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever. So A(C(A) H(A, A) = 0) (since H is total) and A(H(A, A) = 0 A(A) ) (definition of H).

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever. So A(C(A) H(A, A) = 0) (since H is total) and A(H(A, A) = 0 A(A) ) (definition of H). So A (C(A) A(A) ).

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever. So A(C(A) H(A, A) = 0) (since H is total) and A(H(A, A) = 0 A(A) ) (definition of H). So A (C(A) A(A) ). Taking A to be C, we get C(C) C(C), contradiction!

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever. So A(C(A) H(A, A) = 0) (since H is total) and A(H(A, A) = 0 A(A) ) (definition of H). So A (C(A) A(A) ). Taking A to be C, we get C(C) C(C), contradiction! p p = (p p) ( p p) = F F = F

Computation Theory, L 1 11/171 There s no H such that H(A, D) = { 1 if A(D) 0 otherwise. for all (A, D). Informal proof, by contradiction. If there were such an H, let C be the algorithm: input A; compute H(A, A); if H(A, A) = 0 then return 1, else loop forever. So A(C(A) H(A, A) = 0) (since H is total) and A(H(A, A) = 0 A(A) ) (definition of H). So A (C(A) A(A) ). why is A a datum on which A is designed to operate? Taking A to be C, we get C(C) C(C), contradiction!

From HP to Entscheidungsproblem Computation Theory, L 1 12/171 Final step in Turing/Church proof of undecidability of the Entscheidungsproblem: they constructed an algorithm encoding instances (A, D) of the Halting Problem as arithmetic statements Φ A,D with the property Φ A,D is provable A(D) Thus any algorithm deciding provability of arithmetic statements could be used to decide the Halting Problem so no such exists.

Hilbert s Entscheidungsproblem Computation Theory, L 1 13/171 Is there an algorithm which when fed any statement in the formal language of first-order arithmetic, determines in a finite number of steps whether or not the statement is provable from Peano s axioms for arithmetic, using the usual rules of first-order logic? With hindsight, a positive solution to the Entscheidungsproblem would be too good to be true. However, the algorithmic unsolvability of some decision problems is much more surprising. A famous example of this is...

Computation Theory, L 1 14/171 Hilbert s 10th Problem Give an algorithm which, when started with any Diophantine equation, determines in a finite number of operations whether or not there are natural numbers satisfying the equation. One of a number of important open problems listed by Hilbert at the International Congress of Mathematicians in 1900.

Diophantine equations Computation Theory, L 1 15/170 p(x 1,..., x n ) = q(x 1,..., x n ) where p and q are polynomials in unknowns x 1,...,x n with coefficients from N = {0, 1, 2,...}. Named after Diophantus of Alexandria (c. 250AD). Example: find three whole numbers x 1, x 2 and x 3 such that the product of any two added to the third is a square [Diophantus Arithmetica, Book III, Problem 7]. In modern notation: find x 1, x 2, x 3 N for which there exists x, y, z N with (x 1 x 2 + x 3 x 2 ) 2 +(x 2 x 3 + x 1 y 2 ) 2 +(x 3 x 1 + x 2 z 2 ) 2 = 0

Diophantine equations Computation Theory, L 1 15/170 p(x 1,..., x n ) = q(x 1,..., x n ) where p and q are polynomials in unknowns x 1,...,x n with coefficients from N = {0, 1, 2,...}. Named after Diophantus of Alexandria (c. 250AD). Example: find three whole numbers x 1, x 2 and x 3 such that the product of any two added to the third is a square [Diophantus Arithmetica, Book III, Problem 7]. In modern notation: find x 1, x 2, x 3 N for which there exists x, y, z N with x 2 1 x2 2 + x2 2 x2 3 + x2 3 x2 1 + = x2 x 1 x 2 + y 2 x 2 x 3 + z 2 x 3 x 1 + [One solution: (x 1, x 2, x 3 ) = (1, 4, 12), with (x, y, z) = (4, 7, 4).]

Computation Theory, L 1 16/170 Hilbert s 10th Problem Give an algorithm which, when started with any Diophantine equation, determines in a finite number of operations whether or not there are natural numbers satisfying the equation. Posed in 1900, but only solved in 1970: Y Matijasevič, J Robinson, M Davis and H Putnam show it undecidable by reduction to the Halting Problem.

Computation Theory, L 1 16/170 Hilbert s 10th Problem Give an algorithm which, when started with any Diophantine equation, determines in a finite number of operations whether or not there are natural numbers satisfying the equation. Posed in 1900, but only solved in 1970: Y Matijasevič, J Robinson, M Davis and H Putnam show it undecidable by reduction to the Halting Problem. Original proof used Turing machines. Later, simpler proof [JP Jones & Y Matijasevič, J. Symb. Logic 49(1984)] used Minsky and Lambek s register machines

Computation Theory, L 1 16/170 Hilbert s 10th Problem Give an algorithm which, when started with any Diophantine equation, determines in a finite number of operations whether or not there are natural numbers satisfying the equation. Posed in 1900, but only solved in 1970: Y Matijasevič, J Robinson, M Davis and H Putnam show it undecidable by reduction to the Halting Problem. Original proof used Turing machines. Later, simpler proof [JP Jones & Y Matijasevič, J. Symb. Logic 49(1984)] used Minsky and Lambek s register machines we will use them in this course to begin with and return to Turing and Church s formulations of the notion of algorithm later.