Predicate Logic - Undecidability

Size: px
Start display at page:

Download "Predicate Logic - Undecidability"

Transcription

1 CS402, Spring 2016

2 Undecidable Problems Does the following program halts? (1) N : n, total, x, y, z (2) n GetUserInput() (3) total 3 (4) while true (5) for x 1 to total 2 (6) for y 1 to total x 1 (7) z total x y (8) if x n + y n == z n then Halt() (9) total total + 1

3 Undecidability It would be nice to have an algorithm that could examine any program P and tell whether P would halt. We know that no such algorithm exists.

4 Halting Problem Theorem 1 (Simplified Halting Problem) Given an arbitrary program P and its input, string I, the halting problem is to write a program H that takes P and I as input, and prints true if P halts on I, and false otherwise. There does not exist a program that can solve the halting problem. That is, halting problem is undecidable.

5 Halting Problem Proof. Assume that there exists such a program H that can solve the halting problem. Then, using H, we can write the following program Z: Z(String x) (1) if H(x, x) then Loop forever (2) else Halt() Consider the case of Z(Z): Z halts on Z: by the assumption, H will return true. Consequently, Z will loop forever, and will not halt. Contradiction. Z loops forever on Z: by the assumption, H will return false. Consequently, Z will halt. Contradiction. Reductio ad absurdum.

6 Undecidability of Halting Problem It is undecidable to check whether a Turing machine (TM) will halt if started on a blank tape (halting problem). To prove the undecidability of predicate logic, we give an algorithm which produces a formula A TM in the predicate calculus for every Turing machine, s.t. A TM is valid iff a Turing machine halts. Note that we do not make a Turing machine M for every predicate formula, since it is enough to show that checking some predicate formulas is undecidable. If we have such an algorithm, it is clear that validity check of predicate formula is at least as hard as halting problem (i.e., undecidable).

7 Undecidability of Halting Problem For the sake of simplicity, let us work with Two Registers Machines (TRM) rathern than the vanilla Turing Machine. That is, we show that there exists such a formula A TRM for each TRM. Theorem 2 (5.42) Given a Turing machine that computes a function f, a two-register machine can be constructed to compute the same function f. Halts(TM) Halts(TRM), Halts(TRM) IsValid(A TRM )

8 A Two Register Machine, M Definition 1 (5.41) A two-register machine M consists of two registers x and y which can hold natural numbers, and a program P = (L 0,..., L n ) which is a list of instructions. L n is the instruction halt, and for 0 I < n, L i is one of: x x + 1 y y + 1 if x = 0 then goto L j else x x 1, 0 j n if y = 0 then goto L j else y y 1, 0 j n

9 A Two Register Machine, M An execution sequence of M is a sequence of states s k = (L ik, x, y), where L ik is the current instruction at s k, and x, y are the contents of x and y. s k+1 is obtained from s k by executing L ik. The initial state s 0 = (L i0, m, 0) = (L 0, m, 0) for some m. If for some k, s k = (L n, x, y), the computation of M has halted and M has computed y = f (m).

10 Example /* This program executes L 1 m times and halts */ L 0 :if x=0 then goto L 2 else x:=x-1 L 1 :if y=0 then goto L 0 else y:=y-1 L 2 :halt Execution with the initial value of x = 2: s 0 (L 0,2,0) s 1 (L 1,1,0) s 2 (L 0,1,0) s 3 (L 1,0,0) s 4 (L 0,0,0) s 5 (L 2,0,0)

11 Example /* L 0 is repeated infinitely. */ L 0 : x:=x+1 L 1 :if y=0 then goto L 0 else y:=y-1 L 2 :halt Execution with the initial value of x = 0: s 0 (L 0,0,0) s 1 (L 1,1,0) s 2 (L 0,1,0) s 3 (L 1,2,0) s 4 (L 0,2,0)

12 Validity of Predicate Calculus Theorem 3 (5.43. Church s Theorem) Validity in the predicate calculus is undecidable. Proof. Let M be an arbitrary two-register machine. We will construct a formula S M such that S M is valid iff M terminates when started in the state (L 0, 0, 0). The formula is: S M = ( p 0 (a, a) n 1 i=0 S i ) z 1 z 2 p n (z 1, z 2 )

13 Validity of Predicate Calculus Proof. Cont. where S i is defined based on L i : L i x x + 1 y y + 1 if x = 0 then goto L j else x x 1 if y = 0 then goto L j else y y 1 S i x y(p i (x, y) p i+1 (s(x), y)) x y(p i (x, y) p i+1 (x, s(y))) x(p i (a, x) p j (a, x)) x y(p i (s(x), y) p i+1 (x, y)) x(p i (x, a) p j (x, a)) x y(p i (x, s(y)) p i+1 (x, y)) Predicates p 0,..., p n correspond to statements in M. The implicit meaning of p i (x, y) is that the computation of M is at L i, and registers contain values x and y. The constant symbol a denotes 0, and the function s is the successor function (s(x) = x + 1).

14 Validity of Predicate Calculus Proof. Cont.: If M halts then S M is valid. Let s 0,..., s m be a computation of M that halts after m steps; we need to show that S M is valid, that is, that it is true under any interpretation for the formula. However, we need not consider every possible interpretation. If I is an interpretation for S M such that ν I (S i ) = F for some 0 i n 1 or such that ν I (p 0 (a, a)) = F, then trivially ν I (S M ) = T since the antecedent of S M is false. Therefore, we need only consider interpretations that satisfy the antecedent of S M. For such interpretations, we need to show that ν I ( z 1 z 2 p n(z 1, z 2 )) = T. We show by induction on k that ν I ( z 1 z 2 p ik (z 1, z 2 )) = T : If k = 0, trivially, p 0 (a, a) z 1 z 2 p i0 (z 1, z 2 ) z 1 z 2 p 0 (z 1, z 2 ). Let us assume the inductive hypothesis for k 1 and resolve the case when L k 1 is x x + 1. By assumption, the antecedent is true, in particular, its subformula S k 1 : ν I ( x y(p ik 1 (x, y) p ik +1(s(x), y))) = T By the inductive hypothesis: ν I ( z 1 z 2 p ik 1 (z 1, z 2 )) = T From which follows (by applying S k 1 above): ν I ( z 1 z 2 p ik +1(s(z 1 ), z 2 )) = T Let c 1 and c 2 be the domain elements assigned to z 1 and z 2, respectively, such that (succ(c 1 ), c 2 ) P k, where P k is the interpretation of p k and succ is the interpretation of s. Since c 3 = succ(c 1 ) for some domain element c 3, the existentially quantified formula in the consequent is true: ν I ( z 1 z 2 p ik +1(z 1, z 2 )) = T.

15 Validity of Predicate Calculus Proof. Cont. Note that Ben-Ari (both 2nd and 3rd edition) uses the wrong notation of p k and L k throughout the proof that we just went through (i.e., if M halts then S M is valid). The correct notations are p ik and L ik (both denoting instruction L i at kth state in execution). k is the index of states, while i is the index of instruction (which can be repeated during execution, hence the separate indexing). The induction only works when we separate these two. For example, consider the instruction that we skipped: suppose L i is if x = 0 then goto L j else else y y 1. The corresponding S i is: x(p i (a, x) p j (a, x)) x y(p i (s(x), y) p i+1 (x, y)). When the first conjunct holds (i.e. when x register contains 0), the instruction index suddenly jumps from i to j: following the original notation, the induction does not work, because j may not be i + 1. Once we separate the indices, the induction becomes much simpler. Another minor mistake in the book is that, when presenting the induction, instruction for s k 1 is incorrectly denoted as L k : it should have been L k 1.

16 Validity of Predicate Calculus Proof. Cont. If S M is valid then M halts: Suppose that S M is valid and consider the interpretation: I = (N, {P 0,..., P n}, {succ}, {0}) where succ is the successor function on N, and (x, y) P i iff (L i, x, y) is reached by the register machine when started in (L 0, 0, 0). We show by induction on the length of the computation that the antecedent of S M is true in I. The initial state is (L 0, 0, 0), so (a, a) P 0 and ν I (p 0 (a, a)) = T. The inductive hypothesis is that in state s k 1 = (L i, x i, y i ), (x i, y i ) P i. The inductive step is again by cases on the type of the instruction Li. For x = x + 1, s k = (L i+1, succ(x i ), y i ) and (succ(x i ), y i ) P i+1 by the definition of P i+1. Since S M is valid, ν I ( z 1 z 2 p n(z 1, z 2 )) = T and ν I (p n(m 1, m 2 )) = T for some m 1, m 2 N. By definition, (m 1, m 2 ) P n means that M halts and computes m 2 = f (0).

17 Incompleteness Definition 2 (Completeness) Let T (U) be a theory. T (U) is complete if and only if for every closed formula A, U A or U A. T (U) is incomplete iff it is not complete, that is, iff for some closed formula A, U A and U A. Theorem 4 (Gödel s Incompleteness Theorem) Let NT be the number theory (Peano arithmetic). If T (NT ) is consistent, then T (NT ) is incomplete.

18 Sketch of the Proof Gödel s proof relies on the definition of a mapping, called a Gödel numbering, from logical objects (such as formulas and proofs) to natural numbers. Note the recursive conceptual structure. Gödel first proves the following theorem: Theorem 5 (Provability) There exists a formula A(x, y) in NT with the following property: for any numbers i, j, A(i, j) is true if and only if i is the Gödel number associated with some formula B(x) with one free variable x, and j is the Gödel number associated with the proof of B(i). Furthermore, if A(i, j) is true, then a proof can be constructed for these specific integers, i.e., A(i, j). That is, A(i, j) means that j is the Gödel number for the proof of B(i). But then!

19 Incompleteness Consider C(x) = y A(x, y), with one free variable x. Let m be the Gödel number for C(x). Then, consider C(m) = y A(m, y), that is, for no y, y is the Gödel number of a proof of C(m)! Theorem 6 (Gödel) If NT is consistent, then C(m) and C(m). Proof. Suppose that C(m) = y A(m, y), and compute n, the Gödel number for this proof. Since this proof exists, A(m, n) is true. However, if C(m) is true, y A(m, y), therefore A(m, n). Contraction to the consistency of NT. Suppose that C(m) = y A(m, y) = ya(m, n). Then, for some n, A(m, n) is true, where n is the Gödel number of the proof of C(m) (the provability theorem). That is, C(m). This contradicts our assumption.

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

Predicate Calculus - Undecidability of predicate calculus Moonzoo Kim CS Dept. KAIST Predicate Calculus - Undecidability of predicate calculus Moonzoo Kim CS Dept. KAIST moonzoo@cs.kaist.ac.kr 1 Undecidable problems Can you tell whether or not the following program halts? /* Fermat s last

More information

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

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano

More information

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

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936 ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM Turing 1936 Where are We? Ignoramus et ignorabimus Wir mussen wissen Wir werden wissen We do not know We shall not know We must know

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

Tape encoding of lists of numbers

Tape encoding of lists of numbers L7 74 We ve seen that a Turing machine s computation can be implemented by a register machine. The converse holds: the computation of a register machine can be implemented by a Turing machine. To make

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

Introduction to Turing Machines

Introduction to Turing Machines Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability

More information

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

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

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

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 12 September, 2005 Some slides today new, some based on logic 2004 (Nils

More information

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

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos armandobcm@yahoo.com February 5, 2014 Abstract This note is for personal use. It

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation Page 1 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 3: First-Order Theories Page 2 of 31 First-Order Theories I First-order theory T consists of Signature Σ T - set of constant,

More information

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

There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space. 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?

More information

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Large Numbers, Busy Beavers, Noncomputability and Incompleteness Large Numbers, Busy Beavers, Noncomputability and Incompleteness Food For Thought November 1, 2007 Sam Buss Department of Mathematics U.C. San Diego PART I Large Numbers, Busy Beavers, and Undecidability

More information

CS20a: Turing Machines (Oct 29, 2002)

CS20a: Turing Machines (Oct 29, 2002) CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Church s thesis The computable functions are the same as the partial recursive

More information

Provably Total Functions of Arithmetic with Basic Terms

Provably Total Functions of Arithmetic with Basic Terms Provably Total Functions of Arithmetic with Basic Terms Evgeny Makarov INRIA Orsay, France emakarov@gmail.com A new characterization of provably recursive functions of first-order arithmetic is described.

More information

CS156: The Calculus of Computation Zohar Manna Winter 2010

CS156: The Calculus of Computation Zohar Manna Winter 2010 Page 3 of 31 Page 4 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 First-Order Theories I First-order theory T consists of Signature ΣT - set of constant, function, and predicate symbols

More information

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

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information

CS20a: Turing Machines (Oct 29, 2002)

CS20a: Turing Machines (Oct 29, 2002) CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Handicapped machines DFA limitations Tape head moves only one direction 2-way DFA

More information

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability 16.2. MINIMAL ARITHMETIC AND REPRESENTABILITY 207 If T is a consistent theory in the language of arithmetic, we say a set S is defined in T by D(x) if for all n, if n is in S, then D(n) is a theorem of

More information

Propositional and Predicate Logic - XIII

Propositional and Predicate Logic - XIII Propositional and Predicate Logic - XIII Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - XIII WS 2016/2017 1 / 22 Undecidability Introduction Recursive

More information

Section 14.1 Computability then else

Section 14.1 Computability then else 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

More information

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

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Valentine Kabanets October 27, 2016 1 Gödel s Second Incompleteness Theorem 1.1 Consistency We say that a proof system P is consistent

More information

Predicate Logic: Sematics Part 1

Predicate Logic: Sematics Part 1 Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with

More information

03 Review of First-Order Logic

03 Review of First-Order Logic CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of

More information

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

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 14 September, 2005 Some slides today new, some based on logic 2004 (Nils Andersen) OUTLINE,

More information

CST Part IB. Computation Theory. Andrew Pitts

CST Part IB. Computation Theory. Andrew Pitts 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

More information

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University IV. Turing Machine Yuxi Fu BASICS, Shanghai Jiao Tong University Alan Turing Alan Turing (23Jun.1912-7Jun.1954), an English student of Church, introduced a machine model for effective calculation in On

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including

More information

Great Theoretical Ideas

Great Theoretical Ideas 15-251 Great Theoretical Ideas in Computer Science Gödel s Legacy: Proofs and Their Limitations Lecture 25 (November 16, 2010) The Halting Problem A Quick Recap of the Previous Lecture Is there a program

More information

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS154, Lecture 10: Rice s Theorem, Oracle Machines CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable

More information

Creative Objectivism, a powerful alternative to Constructivism

Creative Objectivism, a powerful alternative to Constructivism Creative Objectivism, a powerful alternative to Constructivism Copyright c 2002 Paul P. Budnik Jr. Mountain Math Software All rights reserved Abstract It is problematic to allow reasoning about infinite

More information

1 The decision problem for First order logic

1 The decision problem for First order logic Math 260A Mathematical Logic Scribe Notes UCSD Winter Quarter 2012 Instructor: Sam Buss Notes by: James Aisenberg April 27th 1 The decision problem for First order logic Fix a finite language L. Define

More information

23.1 Gödel Numberings and Diagonalization

23.1 Gödel Numberings and Diagonalization Applied Logic Lecture 23: Unsolvable Problems in Logic CS 4860 Spring 2009 Tuesday, April 14, 2009 The fact that Peano Arithmetic is expressive enough to represent all computable functions means that some

More information

(a) Definition of TMs. First Problem of URMs

(a) Definition of TMs. First Problem of URMs Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing

More information

17.1 The Halting Problem

17.1 The Halting Problem CS125 Lecture 17 Fall 2016 17.1 The Halting Problem Consider the HALTING PROBLEM (HALT TM ): Given a TM M and w, does M halt on input w? Theorem 17.1 HALT TM is undecidable. Suppose HALT TM = { M,w : M

More information

Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2

Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2 Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2 CS 30, Fall 2018 by Professor Prasad Jayanti Problems 1. Let g(0) = 2, g(1) = 1, and g(n) = 2g(n 1) + g(n 2) whenever n 2.

More information

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

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65 Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving

More information

Theory of Computer Science

Theory of Computer Science Theory of Computer Science D1. Turing-Computability Malte Helmert University of Basel April 18, 2016 Overview: Course contents of this course: logic How can knowledge be represented? How can reasoning

More information

CpSc 421 Homework 9 Solution

CpSc 421 Homework 9 Solution CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade

More information

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

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 2 FINITE We have already seen that the language FINITE

More information

Chapter 2 Algorithms and Computation

Chapter 2 Algorithms and Computation Chapter 2 Algorithms and Computation In this chapter, we first discuss the principles of algorithm and computation in general framework, common both in classical and quantum computers, then we go to the

More information

258 Handbook of Discrete and Combinatorial Mathematics

258 Handbook of Discrete and Combinatorial Mathematics 258 Handbook of Discrete and Combinatorial Mathematics 16.3 COMPUTABILITY Most of the material presented here is presented in far more detail in the texts of Rogers [R], Odifreddi [O], and Soare [S]. In

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

Herbrand Theorem, Equality, and Compactness

Herbrand Theorem, Equality, and Compactness CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order

More information

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

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability Decidability and the Undecidability of Predicate Logic IAIK Graz University of Technology georg.hofferek@iaik.tugraz.at 1 Fork of ways Brainteaser: Labyrinth Guards One to salvation One to perdition Two

More information

Limits of Computability

Limits of Computability Limits of Computability Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner

More information

Turing Machines. Lecture 8

Turing Machines. Lecture 8 Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output

More information

Undecidability of the validity problem

Undecidability of the validity problem Undecidability of the validity problem We prove the undecidability of the validity problem for formulas of predicate logic with equality. Recall: there is an algorithm that given a formula of predicate

More information

Lecture 13: Foundations of Math and Kolmogorov Complexity

Lecture 13: Foundations of Math and Kolmogorov Complexity 6.045 Lecture 13: Foundations of Math and Kolmogorov Complexity 1 Self-Reference and the Recursion Theorem 2 Lemma: There is a computable function q : Σ* Σ* such that for every string w, q(w) is the description

More information

Foundations of Logic Programming

Foundations of Logic Programming Foundations of Logic Programming Deductive Logic e.g. of use: Gypsy specifications and proofs About deductive logic (Gödel, 1931) Interesting systems (with a finite number of axioms) are necessarily either:

More information

Computation. Some history...

Computation. Some history... Computation Motivating questions: What does computation mean? What are the similarities and differences between computation in computers and in natural systems? What are the limits of computation? Are

More information

About the relationship between formal logic and complexity classes

About the relationship between formal logic and complexity classes About the relationship between formal logic and complexity classes Working paper Comments welcome; my email: armandobcm@yahoo.com Armando B. Matos October 20, 2013 1 Introduction We analyze a particular

More information

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

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem Michael Beeson The hypotheses needed to prove incompleteness The question immediate arises whether the incompleteness

More information

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

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability 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

More information

Computability Theory. CS215, Lecture 6,

Computability Theory. CS215, Lecture 6, Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

More information

AN INTRODUCTION TO COMPUTABILITY THEORY

AN INTRODUCTION TO COMPUTABILITY THEORY AN INTRODUCTION TO COMPUTABILITY THEORY CINDY CHUNG Abstract. This paper will give an introduction to the fundamentals of computability theory. Based on Robert Soare s textbook, The Art of Turing Computability:

More information

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

More information

Theory of Computer Science. Theory of Computer Science. D8.1 Other Halting Problem Variants. D8.2 Rice s Theorem

Theory of Computer Science. Theory of Computer Science. D8.1 Other Halting Problem Variants. D8.2 Rice s Theorem Theory of Computer Science May 15, 2017 D8. Rice s Theorem and Other Undecidable Problems Theory of Computer Science D8. Rice s Theorem and Other Undecidable Problems Malte Helmert University of Basel

More information

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

Gödel s Incompleteness Theorem. Overview. Computability and Logic Gödel s Incompleteness Theorem Overview Computability and Logic Recap Remember what we set out to do in this course: Trying to find a systematic method (algorithm, procedure) which we can use to decide,

More information

Gödel s Incompleteness Theorem. Part II: Arithmetical Definability. Computability and Logic

Gödel s Incompleteness Theorem. Part II: Arithmetical Definability. Computability and Logic Gödel s Incompleteness Theorem Part II: Arithmetical Definability Computability and Logic The Language of Arithmetic The language of arithmetic L A contains the following four non-logical symbols: 0: constant

More information

Axiomatic Semantics. Lecture 9 CS 565 2/12/08

Axiomatic Semantics. Lecture 9 CS 565 2/12/08 Axiomatic Semantics Lecture 9 CS 565 2/12/08 Axiomatic Semantics Operational semantics describes the meaning of programs in terms of the execution steps taken by an abstract machine Denotational semantics

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automata and Formal Language Theory Course Notes Part III: Limits of Computation Chapter III.1: Introduction Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/current/index.html

More information

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

ELEMENTS IN MATHEMATICS FOR INFORMATION SCIENCE NO.6 TURING MACHINE AND COMPUTABILITY. Tatsuya Hagino 1 ELEMENTS IN MATHEMATICS FOR INFORMATION SCIENCE NO.6 TURING MACHINE AND COMPUTABILITY Tatsuya Hagino hagino@sfc.keio.ac.jp 2 So far Computation flow chart program while program recursive function primitive

More information

the logic of provability

the logic of provability A bird s eye view on the logic of provability Rineke Verbrugge, Institute of Artificial Intelligence, University of Groningen Annual Meet on Logic and its Applications, Calcutta Logic Circle, Kolkata,

More information

Overview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang

Overview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang Overview of Topics Finite Model Theory Part 1: Introduction 1 What is finite model theory? 2 Connections to some areas in CS Qing Wang qing.wang@anu.edu.au Database theory Complexity theory 3 Basic definitions

More information

Understanding Computation

Understanding Computation Understanding Computation 1 Mathematics & Computation -Mathematics has been around for a long time as a method of computing. -Efforts to find canonical way of computations. - Machines have helped with

More information

Kvantifikator för en Dag

Kvantifikator för en Dag Philosophical Communications, Web Series, No. 35, pp. 155-162 Dept. of Philosophy, Göteborg University, Sweden ISSN 1652-0459 Kvantifikator för en Dag Essays dedicated to Dag Westerståhl on his sixtieth

More information

CS156: The Calculus of Computation Zohar Manna Winter 2010

CS156: The Calculus of Computation Zohar Manna Winter 2010 Page 3 of 35 Page 4 of 35 quantifiers CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 2: First-Order Logic (FOL) existential quantifier x. F [x] there exists an x such that F [x] Note:

More information

Cogito ergo sum non machina!

Cogito ergo sum non machina! Cogito ergo sum non machina! About Gödel s First Incompleteness Theorem and Turing machines. Ricardo Pereira Tassinari 1 Philosophy Department of State University of São Paulo - UNESP - Campus Marília

More information

1 Predicates and Quantifiers

1 Predicates and Quantifiers 1 Predicates and Quantifiers We have seen how to represent properties of objects. For example, B(x) may represent that x is a student at Bryn Mawr College. Here B stands for is a student at Bryn Mawr College

More information

First-Order Logic (FOL)

First-Order Logic (FOL) First-Order Logic (FOL) Also called Predicate Logic or Predicate Calculus 2. First-Order Logic (FOL) FOL Syntax variables x, y, z, constants a, b, c, functions f, g, h, terms variables, constants or n-ary

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation / Lecture 3: Overview Decidability of Logical Theories Presburger arithmetic Decidability of Presburger Arithmetic Dr.

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 13: Algorithmic Unsolvability The Halting Problem I In the last lecture we have shown

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automata and Formal Language Theory Course Notes Part III: Limits of Computation Chapt. III.1: Introduction Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/current/index.html

More information

The Church-Turing Thesis and Relative Recursion

The Church-Turing Thesis and Relative Recursion The Church-Turing Thesis and Relative Recursion Yiannis N. Moschovakis UCLA and University of Athens Amsterdam, September 7, 2012 The Church -Turing Thesis (1936) in a contemporary version: CT : For every

More information

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

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.   ETH Zürich (D-ITET) October, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free

More information

Register machines L2 18

Register machines L2 18 Register machines L2 18 Algorithms, informally L2 19 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description

More information

Logic and Computation

Logic and Computation Logic and Computation CS245 Dr. Borzoo Bonakdarpour University of Waterloo (Fall 2012) Computability and Decidability Logic and Computation p. 1/29 Agenda Programs as Formulas Cantor s Diagonalization

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

TURING MAHINES

TURING MAHINES 15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,

More information

Turing Machine Recap

Turing Machine Recap Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

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

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

6.8 The Post Correspondence Problem

6.8 The Post Correspondence Problem 6.8. THE POST CORRESPONDENCE PROBLEM 423 6.8 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that turns out to be a very helpful tool for

More information

Logic for Computer Scientists

Logic for Computer Scientists Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Spring Quarter 2010 Wright State University, Dayton, OH, U.S.A. Final version. Contents 1 Propositional Logic

More information

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and 7 RC Simulates RA. We now show that DRC (and hence TRC) is at least as expressive as RA. That is, given an RA expression E that mentions at most C, there is an equivalent DRC expression E that mentions

More information

Confusion of Memory. Lawrence S. Moss. Department of Mathematics Indiana University Bloomington, IN USA February 14, 2008

Confusion of Memory. Lawrence S. Moss. Department of Mathematics Indiana University Bloomington, IN USA February 14, 2008 Confusion of Memory Lawrence S. Moss Department of Mathematics Indiana University Bloomington, IN 47405 USA February 14, 2008 Abstract It is a truism that for a machine to have a useful access to memory

More information

Decidability and Undecidability

Decidability and Undecidability Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an

More information

Computability, Undeciability and the Halting Problem

Computability, Undeciability and the Halting Problem Computability, Undeciability and the Halting Problem 12/01/16 http://www.michael-hogg.co.uk/game_of_life.php Discrete Structures (CS 173) Lecture B Gul Agha 1 Based on slides by Derek Hoiem, University

More information

Team Semantics and Recursive Enumerability

Team Semantics and Recursive Enumerability Team Semantics and Recursive Enumerability Antti Kuusisto University of Wroc law, Poland, Technical University of Denmark Stockholm University, Sweden antti.j.kuusisto@uta.fi Abstract. It is well known

More information

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

1 Acceptance, Rejection, and I/O for Turing Machines 1 Acceptance, Rejection, and I/O for Turing Machines Definition 1.1 (Initial Configuration) If M = (K,Σ,δ,s,H) is a Turing machine and w (Σ {, }) then the initial configuration of M on input w is (s, w).

More information

Lecture 12: Mapping Reductions

Lecture 12: Mapping Reductions Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

5. Peano arithmetic and Gödel s incompleteness theorem

5. Peano arithmetic and Gödel s incompleteness theorem 5. Peano arithmetic and Gödel s incompleteness theorem In this chapter we give the proof of Gödel s incompleteness theorem, modulo technical details treated in subsequent chapters. The incompleteness theorem

More information

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators.

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators. CSE 311: Foundations of Computing I Autumn 014 Practice Final: Section X YY ZZ Name: UW ID: Instructions: Closed book, closed notes, no cell phones, no calculators. You have 110 minutes to complete the

More information

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

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff Decidability Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff 1 A property P of strings is said to be decidable if the set of all strings having property P is a recursive set; that

More information

Computable Functions

Computable Functions Computable Functions Part I: Non Computable Functions Computable and Partially Computable Functions Computable Function Exists a Turing Machine M -- M Halts on All Input -- M(x) = f (x) Partially Computable

More information

Lecture notes on Turing machines

Lecture notes on Turing machines Lecture notes on Turing machines Ivano Ciardelli 1 Introduction Turing machines, introduced by Alan Turing in 1936, are one of the earliest and perhaps the best known model of computation. The importance

More information