CS21 Decidability and Tractability

Similar documents
Decidability: Church-Turing Thesis

CS21 Decidability and Tractability

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

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

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

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

Introduction to Turing Machines

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

Computability Theory. CS215, Lecture 6,

Great Theoretical Ideas

17.1 The Halting Problem

Turing Machines. Lecture 8

Logic: The Big Picture

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

1 Showing Recognizability

Computation. Some history...

CS481F01 Solutions 8

Reducability. Sipser, pages

CS20a: Turing Machines (Oct 29, 2002)

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

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

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

Limits of Computability

CS154, Lecture 10: Rice s Theorem, Oracle Machines

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

Decidability (What, stuff is unsolvable?)

TURING MAHINES

Decidable Languages - relationship with other classes.

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

Turing Machine Recap

Most General computer?

CSE 105 THEORY OF COMPUTATION

Computable Functions

Lecture Notes: The Halting Problem; Reductions

Part I: Definitions and Properties

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

The Unsolvability of the Halting Problem. Chapter 19

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

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Predicate Logic - Undecidability

Computability and Complexity

Lecture 13: Foundations of Math and Kolmogorov Complexity

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

Computational Models Lecture 9, Spring 2009

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

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

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

Decidability and Undecidability

Theory of Computation

258 Handbook of Discrete and Combinatorial Mathematics

Reminder of Notation. For a variable-free term t, we let t N N stand for the interpretation of t in N. (For example, (SSS0 SS0) N equals 6.

Theory of Computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

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

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

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

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

CMPS 217 Logic in Computer Science. Lecture #17

Propositional and Predicate Logic - XIII

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

CpSc 421 Homework 9 Solution

Arithmetic and Incompleteness. Will Gunther. Goals. Coding with Naturals. Logic and Incompleteness. Will Gunther. February 6, 2013

Informal Statement Calculus

The roots of computability theory. September 5, 2016

Turing Machines Part III

23.1 Gödel Numberings and Diagonalization

1 The decision problem for First order logic

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

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

Computational Logic. Recall of First-Order Logic. Damiano Zanardini

Theory of Computation - Module 4

03 Review of First-Order Logic

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

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Introduction to Turing Machines. Reading: Chapters 8 & 9

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

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

Properties of Relational Logic

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CSE 105 THEORY OF COMPUTATION

Friendly Logics, Fall 2015, Lecture Notes 1

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

Lecture 1: The arithmetic hierarchy

Turing Machines (TM) The Turing machine is the ultimate model of computation.

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

UNRESTRICTED GRAMMARS

CSE 105 THEORY OF COMPUTATION

185.A09 Advanced Mathematical Logic

Church s undecidability result

Complexity 6: AIT. Outline. Dusko Pavlovic. Kolmogorov. Solomonoff. Chaitin: The number of wisdom RHUL Spring Complexity 6: AIT.

Marie Duží

Propositional Logic: Syntax

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

The Church-Turing Thesis. Chapter 18

Opleiding Informatica

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CS21 Decidability and Tractability

Transcription:

CS21 Decidability and Tractability Lecture 14 February 7, 2018 February 7, 2018 CS21 Lecture 14 1

Outline Gödel Incompleteness Theorem February 7, 2018 CS21 Lecture 14 2

Background Hilbert s program (1920 s): formalize mathematics in axiomatic form derive all true statements mechanically from initial axioms would put mathematicians out of business! very influential proposal to start: try for all true statements about the natural numbers ( number theory ) February 7, 2018 CS21 Lecture 14 3

Background: Kurt Gödel (1931): it is not possible! no formalization of number theory can prove all true statements stunning result considered one of greatest 20 th century achievements in mathematics February 7, 2018 CS21 Lecture 14 4

Background We will prove using: RE languages and non-re languages reductions Idea: set of all theorems is RE set of all true statements is not RE This kind of proof of Gödel s result attributed to Turing (1937). February 7, 2018 CS21 Lecture 14 5

Number Theory formal language to express properties of N = {0, 1, 2, 3, } allowable symbols: parentheses, and variables x,y,z, ranging over N operators + (addition) and * (multiplication) constants 0 (additive id) and 1 (mult. identity) relation = (equality) quantifiers " (for all) and $ (exists) propositional operators Ù (and) Ú (or) (not) Þ (implies) Û (iff) February 7, 2018 CS21 Lecture 14 6

Number Theory can formalize syntax of allowable formulas (skip) defining comparison relations: x y º $z x + z = y x < y º $z x + z = y Ù (z = 0) February 7, 2018 CS21 Lecture 14 7

Number Theory Other natural concepts we will need: quotient q and remainder r when divide x by y INTDIV(x, y, q, r) º x = qy + r Ù r < y y divides x DIV(y, x) º $ q INTDIV(x,y,q,0) x is even EVEN(x) º DIV(1+1, x) x is odd ODD(x) º EVEN(x) February 7, 2018 CS21 Lecture 14 8

Number Theory Other natural concepts we will need: x is prime PRIME(x) º x (1+1) Ù "y (DIV(y, x) Þ (y = 1 Ú y = x)) x is a power of 2 POWER 2 (x) º "y (DIV(y, x) Ù PRIME(y)) Þ y = (1+1) y = 2 k and k th bit of x is 1 BIT(x, y) º POWER 2 (y) Ù "q "r (INTDIV(x, y, q, r) Þ ODD(q)) February 7, 2018 CS21 Lecture 14 9

Number Theory y = 2 k and k th bit of x is 1 BIT(x, y) º POWER 2 (y) Ù "q "r (INTDIV(x, y, q, r) Þ ODD(q)) y = 10000000000 x = 1010111010111001001001 q r February 7, 2018 CS21 Lecture 14 10

Number Theory A sentence is a formula with no unquantified variables every number has a successor: "x $y y = x + 1 every number has a predecessor: "x $y x = y + 1 not a sentence: x + y = 1 true false number theory = set of true sentences denoted Th(N) February 7, 2018 CS21 Lecture 14 11

Proof systems Proof system components: axioms (asserted to be true) rules of inference (mechanical way to derive theorems from axioms) axioms for manipulating symbols (e.g.): (j Ù y) Þ j ("x j(x)) Þ j(1+1+1) "x "y "z (x = y Ù y = z Þ x = z) others February 7, 2018 CS21 Lecture 14 12

Peano Arithmetic Peano Arithmetic: proof system for number theory. Axioms: 0 is not a successor "x (0 = x + 1) the successor function is one-to-one 0 is an identity for + "x "y (x+1 = y+1 Þ x = y) "x x + 0 = x February 7, 2018 CS21 Lecture 14 13

Peano Arithmetic + is associative "x "y x + (y + 1) = (x + y) + 1 multiplying by zero gives 0 "x x*0 = 0 * distributes over + "x "y x * (y + 1) = (x * y) + x induction axiom (j(0) Ù "x (j(x) Þ j(x+1))) Þ "x j(x) February 7, 2018 CS21 Lecture 14 14

Peano Arithmetic rules of inference: modus ponens j y j Þ y generalization j "x j February 7, 2018 CS21 Lecture 14 15

Proof systems a proof is a sequence of formulas j 1, j 2, j 3,, j n such that each j i is either an axiom, or follows from formulas earlier in list from rules of inference A sentence is a theorem of the proof system if it has a proof February 7, 2018 CS21 Lecture 14 16

Proof systems A proof system is sound if all theorems in that proof system are true (better have this) Peano Arithmetic (PA) is sound. true sentences = Th(N) false sentences = co-th(n) theorems of PA February 7, 2018 CS21 Lecture 14 17

Proof systems A proof system is complete if all true sentences are theorems in that proof system hope to have this (recall Hilbert s program) true sentences = Th(N) false sentences = co-th(n) theorems of a complete proof system February 7, 2018 CS21 Lecture 14 18

Incompleteness Theorem Theorem: Peano Arithmetic is not complete. (same holds for any reasonable proof system for number theory) Proof outline: the set of theorems of PA is RE the set of true sentences (= Th(N)) is not RE February 7, 2018 CS21 Lecture 14 19

Incompleteness Theorem Lemma: the set of theorems of PA is RE. Proof: TM that recognizes the set of theorems of PA: systematically try all possible ways of writing down sequences of formulas accept if encounter a proof of input sentence (note: true for any reasonable proof system) February 7, 2018 CS21 Lecture 14 20

Incompleteness Theorem Lemma: Th(N) is not RE Proof: reduce from co-halt (show co-halt m Th(N)) recall co-halt is not RE what should f(<m, w>) produce? construct g such that M loops on w Û g is true February 7, 2018 CS21 Lecture 14 21

Incompleteness Theorem we will define VALCOMP M,w (v) º (details to come) so that it is true iff v is a (halting) computation history of M on input w then define f(<m, w>) to be: g º $v VALCOMP M,w (v) YES maps YES? <M, w> Î co-halt Þ g is true Þ g ÎTh(N) NO maps to NO? <M, w> Ï co-halt Þ g is false Þ g ÏTh(N) February 7, 2018 CS21 Lecture 14 22

Expressing computation in the language of number theory Last time: basic building blocks x < y º $z x + z = y Ù (z = 0) INTDIV(x, y, q, r) º x = qy + r Ù r < y DIV(y, x) º $ q INTDIV(x,y,q,0) PRIME(x) º x (1+1) Ù "y (DIV(y, x) Þ (y = 1 Ú y = x)) February 7, 2018 CS21 Lecture 14 23

Expressing computation in the language of number theory we ll write configurations over an alphabet of size p, where p is a prime that depends on M d is a power of p: POWER p (d) º "z (DIV(z, d) Ù PRIME(z)) Þ z = p d = p k and length of v as a p-ary string is k LENGTH(v, d) º POWER p (d) Ù v < d February 7, 2018 CS21 Lecture 14 24

Expressing computation in the language of number theory the p-ary digit of v at position y is b (assuming y is a power of p): DIGIT(v, y, b) º $u $a (v = a + by + upy Ù a < y Ù b < p) the three p-ary digits of v at position y are b,c, and d (assuming y is a power of p): 3DIGIT(v, y, b, c, d) º $u $a (v = a + by + cpy + dppy + upppy Ù a < y Ù b < p Ù c < p Ù d < p) February 7, 2018 CS21 Lecture 14 25

Expressing computation in the language of number theory the three p-ary digits of v at position y match the three p-ary digits of v at position z according to M s transition function (assuming y and z are powers of p): MATCH(v, y, z) º Ú (a,b,c,d,e,f) Î C 3DIGIT(v, y, a, b, c) Ù 3DIGIT(v, z, d, e, f) where C = {(a,b,c,d,e,f) : abc in config. C i can legally change to def in config. C i+1 } February 7, 2018 CS21 Lecture 14 26

Expressing computation in the language of number theory all pairs of 3-digit sequences in v up to d that are exactly c apart match according to M s transition function (assuming c, d powers of p) MOVE(v, c, d) º "y (POWER p (y) Ù yppc < d) Þ MATCH(v, y, yc) February 7, 2018 CS21 Lecture 14 27

Expressing computation in the language of number theory the string v starts with the start configuration of M on input w = w 1 w n padded with blanks out to length c (assuming c is a power of p): START(v, c) º Ù i = 0,1,2,, n DIGIT(v, p i, k i ) Ù p n < c Ù "y (POWER p (y) Ù p n < y < c Þ DIGIT(v, y, k)) where k 0 k 1 k 2 k 3 k n is the p-ary encoding of the start configuration, and k is the p-ary encoding of a blank symbol. February 7, 2018 CS21 Lecture 14 28

Expressing computation in the language of number theory string v has a halt state in it somewhere before position d (assuming d is power of p): HALT(v, d) º $y (POWER p (y) Ù y < d Ù Ú aîh DIGIT(v,y,a)) where H is the set of p-ary digits containing states q accept or q reject. February 7, 2018 CS21 Lecture 14 29

Expressing computation in the language of number theory string v is a valid (halting) computation history of machine M on string w: VALCOMP M,w (v) º $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) M does not halt on input w: $v VALCOMP M,w (v) February 7, 2018 CS21 Lecture 14 30

Gödel Incompleteness Theorem (an example) February 7, 2018 CS21 Lecture 14 31

Incompleteness Theorem v = 036320363205332035320314203124 VALCOMP M,w (v) º $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) February 7, 2018 CS21 Lecture 14 32

Incompleteness Theorem v = 036320363205332035320314203124 d = 1000000000000000000000000000000 VALCOMP M,w (v) º $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) d = p k and length of v as a p-ary string is k LENGTH(v, d) º POWER p (d) Ù v < d February 7, 2018 CS21 Lecture 14 33

Incompleteness Theorem v = 036320363205332035320314203124 VALCOMP M,w (v) º kk n k 2 k 1 k 0 c = 100000 p n =1000 $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) v starts with the start configuration of M on input w padded with blanks out to length c: START(v, c) º Ù i = 0,, n DIGIT(v, p i, k i )Ù p n < c Ù "y (POWER p (y) Ù p n < y < c Þ DIGIT(v, y, k)) February 7, 2018 CS21 Lecture 14 34

Incompleteness Theorem v = 036320363205332035320314203124 VALCOMP M,w (v) º yc = 100000 y =1 $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) all pairs of 3-digit sequences in v up to d exactly c apart match according to M s transition function MOVE(v, c, d) º "y (POWER p (y) Ù yppc < d) Þ MATCH(v, y, yc) February 7, 2018 CS21 Lecture 14 35

Incompleteness Theorem v = 036320363205332035320314203124 VALCOMP M,w (v) º yc = 1000000 y =10 $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) all pairs of 3-digit sequences in v up to d exactly c apart match according to M s transition function MOVE(v, c, d) º "y (POWER p (y) Ù yppc < d) Þ MATCH(v, y, yc) February 7, 2018 CS21 Lecture 14 36

Incompleteness Theorem v = 036320363205332035320314203124 VALCOMP M,w (v) º yc = 10000000 y =100 $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) all pairs of 3-digit sequences in v up to d exactly c apart match according to M s transition function MOVE(v, c, d) º "y (POWER p (y) Ù yppc < d) Þ MATCH(v, y, yc) February 7, 2018 CS21 Lecture 14 37

Incompleteness Theorem halt state v = 036320363205332035320314203124 y = 1000000000000000000000000000 VALCOMP M,w (v) º $c $d (POWER p (c) Ù c < d Ù LENGTH(v, d) Ù START(v, c) Ù MOVE(v, c, d) Ù HALT(v, d)) string v has a halt state in it before pos n d: HALT(v, d) º $y (POWER p (y) Ù y < d Ù Ú aîh DIGIT(v,y,a)) February 7, 2018 CS21 Lecture 14 38

Incompleteness Theorem Lemma: Th(N) is not RE Proof: reduce from co-halt (show co-halt m Th(N)) recall co-halt is not RE constructed g such that M loops on w Û g is true February 7, 2018 CS21 Lecture 14 39

Summary full-fledged model of computation: TM many equivalent models Church-Turing Thesis encoding of inputs Universal TM February 7, 2018 CS21 Lecture 14 40

Summary classes of problems: decidable ( solvable by algorithms ) recursively enumerable (RE) co-re counting: not all problems are decidable not all problems are RE February 7, 2018 CS21 Lecture 14 41

Summary diagonalization: HALT is undecidable reductions: other problems undecidable many examples Rice s Theorem natural problems that are not RE Recursion Theorem: non-obvious capability of TMs: printing out own description Incompleteness Theorem February 7, 2018 CS21 Lecture 14 42