PREDICATE LOGIC: UNDECIDABILITY HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES SOUNDNESS AND COMPLETENESS GÖDEL S COMPLETENESS THEOREM

Similar documents
CHAPTER 7 GENERAL PROOF SYSTEMS

Turing Machines: An Introduction

CS510 Software Engineering

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CS 3719 (Theory of Computation and Algorithms) Lecture 4

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

Computability Theory

Testing LTL Formula Translation into Büchi Automata

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

Handout #1: Mathematical Reasoning

Algorithmic Software Verification

NP-Completeness and Cook s Theorem

Logic in general. Inference rules and theorem proving

Introduction to Logic in Computer Science: Autumn 2006

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

How To Understand The Theory Of Computer Science

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

The Halting Problem is Undecidable

Computational Models Lecture 8, Spring 2009

How To Compare A Markov Algorithm To A Turing Machine

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Notes on Complexity Theory Last updated: August, Lecture 1

Introduction to Automata Theory. Reading: Chapter 1

The Classes P and NP

3515ICT Theory of Computation Turing Machines

Theory of Computation Chapter 2: Turing Machines

CAs and Turing Machines. The Basis for Universal Computation

Correspondence analysis for strong three-valued logic

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Resolution. Informatics 1 School of Informatics, University of Edinburgh

Mathematical Induction

6.080/6.089 GITCS Feb 12, Lecture 3

THEORY of COMPUTATION

1 Definition of a Turing machine

Chapter 7 Uncomputability

Properties of Stabilizing Computations

Fixed-Point Logics and Computation

24 Uses of Turing Machines

There is no degree invariant half-jump

Automata and Formal Languages

Introduction to Theory of Computation

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

Lecture 2: Universality

Introduction to computer science

THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES

Automata and Computability. Solutions to Exercises

2. The Language of First-order Logic

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

Logic in Computer Science: Logic Gates

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

Reading 13 : Finite State Automata and Regular Expressions

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Degrees that are not degrees of categoricity

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Examination paper for MA0301 Elementær diskret matematikk

INTRODUCTORY SET THEORY

Turing Machines, Part I

Bounded Treewidth in Knowledge Representation and Reasoning 1

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

T Tutorial D - A Short Summary

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * ABSTRACT

Overview of E0222: Automata and Computability

Satisfiability Checking

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Regular Languages and Finite Automata

Notes on Complexity Theory Last updated: August, Lecture 1

On the Structure of Turing Universe: The Non-Linear Ordering of Turing Degrees

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Informatique Fondamentale IMA S8

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Lecture 16 : Relations and Functions DRAFT

A first step towards modeling semistructured data in hybrid multimodal logic

A Problem Course in Mathematical Logic Version 1.6. Stefan Bilaniuk

ML for the Working Programmer

An example of a computable

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Hypercomputation: computing more than the Turing machine

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

Outline 2. 1 Turing Machines. 2 Coding and Universality. 3 The Busy Beaver Problem. 4 Wolfram Prize. 5 Church-Turing Thesis.

Lecture 17 : Equivalence and Order Relations DRAFT

On the Unique Games Conjecture

Lecture 7: NP-Complete Problems

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Computation Beyond Turing Machines

The composition of Mappings in a Nautural Interface

Predicate Logic Review

A Propositional Dynamic Logic for CCS Programs

Universal Turing Machine: A Model for all Computational Problems

Proseminar on Semantic Theory Fall 2013 Ling 720. Problem Set on the Formal Preliminaries : Answers and Notes

Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

Answer Key for California State Standards: Algebra I

Welcome to... Problem Analysis and Complexity Theory , 3 VU

GENERIC COMPUTABILITY, TURING DEGREES, AND ASYMPTOTIC DENSITY

Transcription:

PREDICATE LOGIC: UNDECIDABILITY HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES (Source: Neil D. Jones, DIKU, September 2005, Nils Anderson 2004 - minor adaptations by WMB) Outline Gödel s completeness theorem Undecidability Computability Problem reduction Post s correspondence problem Undecidability of predicate logic Implications for the deductive paradigm SOUNDNESS AND COMPLETENESS Let M be a model (interpretation) for predicate calculus formulas. Definition Formula φ is valid iff M = φ holds for every model M. Definition Proof system - is sound iff for any closed predicate formula φ we have: - φ implies M = φ for every model M In brief: any provable formula is valid. Proof system - is complete iff for any closed predicate formula f : - φ if M = φ for every model M In brief: any valid formula is provable. Remark: Validity is a very strong condition to place on a formula: φ must hold in all models. In contrast to most mathematical reasoning: about one model at a time. GÖDEL S COMPLETENESS THEOREM

The proof system - described in Huth and Ryan s book is both sound and complete: If φ is a closed predicate formula, then - φ iff it is valid, i.e., M = φ for every model M THE DECIDABILITY PROBLEM FOR PREDICATE LOGIC For a sentence φ, obviously either φ is true in all models, or φ is false in some model Now φ is satisfiable if M = φ for some model M, so φ is unsatisfiable if and only if φ is valid. But how can we find out by some algorithmic procedure whether or not -φ in predicate logic? The truth-table method works for propositional logic: enumerate all possible values of propositional variables. Alas it is no solution for predicate logic, since formula φ will always have infinitely many models, and so infinitely many valuations for individual variables. Surprise: even though provability and validity are equivalent, neither one is decidable. In other words, there is no algorithmic procedure to determine whether or not -φ in predicate logic! DECISION PROBLEMS (An aside added by WMB) Definition A decision problem is a problem of the form "Given an entity x and a class of entities A, determine whether x belongs to A". Examples of decision problems 1. Given a proposition p decide whether p is a tautology. 2. Given a proposition p in 2-CNF (expressed in CNF in such a way that every clause contains no more than 2 literals) decide whether p is satisfiable.

3. 4. Given a graph G decide whether G can be vertex-coloured using 3 colours. Given a computer program P and an input t decide whether P acting on input t terminates. In all four examples, we can encode instances of the decision problem as the input for a computer program, and try to write a program that will always terminate and correctly output the answer Y or N. 1. 2. 3. 4. Given a proposition p to decide whether p is a tautology. We can write a program to do this, but it won't be very efficient - it needs to check all truth assignments to the propositional atoms in general. Given a proposition p in 2-CNF (expressed in CNF in such a way that every clause contains no more than 2 literals) decide whether p is satisfiable. We can write an efficient program to check this. Given a graph G decide whether G can be vertex-coloured using 3 colours. We can write a program for this, but as in case 1, so far as we know there is no efficient solution. Given a computer program P and an input t decide whether P acting on input t terminates. In this case, there is - provably - no computer program that can give the correct answer in finite time on every instance. Decision problems 1,2 and 3 are said to be decidable, though only 2 is computationally tractable for "large" instances. Decision problem 4 is undecidable. It is the 'practical computing' counterpart of the Halting Problem. COMPUTABLE REDUCTION Definition For two decision problems A over Σ and B over we say that: A can be (recursively) reduced to B, if there is a computable function f : Σ* * such that x Σ* (x A f(x) B) Theorem Assume A can be reduced to B. If B is decidable then so is A. If A is undecidable, then so is B. (Informally: "The decision problem B is at least as difficult as the decision problem A.")

Mother of all problems unsolvable by computer - the Halting Problem: deciding, given a Turing machine T and an input x, whether or not T halts on x. POST S CORRESPONDENCE PROBLEM Given: a finite sequence (s 1,t 1 ),..., (s k, t k ) of pairs of strings. To decide: is there a non-empty sequence i 1,i 2,..., i n of indices such that s i1 s i2 s in = t i1 t i2 t in? Theorem PCP is undecidable: There is no systematic terminating procedure that can reliably determine in finite time whether or not an instance of the PCP has a solution or not. (This theorem can be proved by reducing the Halting Problem to it. We are only concerned here with the result of the theorem - the proof is omitted. The main ideas that you need to assimilate are set out in the rest of this subsection, which has been adapted from the original source by WMB.) The theorem asserts that there is no general algorithm that can successfully determine whether or not any given instance of the PCP, as defined by a set of pairs of strings, does or doesn't have a solution. Without loss of generality we may assume that the strings are binary, consisting of 0s and 1s. PCP is undecidable even with this restriction in place. Note that PCP is a decision problem; but if we know the answer is positive, the actual sequence of indices can be found after a finite systematic search. If we don't know in advance whether there is or isn't a solution to an instance of the PCP, we can initiate a systematic exhaustive search, but we don't in general know whether it will ever terminate. The systematic search procedure doesn't qualify as an algorithm to solve the decision problem, since it doesn't terminate when there is no solution to the given instance of the PCP, and this means that the search procedure is too weak to give a definite Y/N answer in finite time. There is a close parallel here with the Halting Problem - the systematic procedure for executing the Turing Machine on an input illustrates precisely the same problem! Examples of problem instances:

C = ((1, 101), (10, 00), (011, 11)) and the challenge D = ((001, 0), (01, 011), (01, 101), (10, 001)) Illustration for the PCP (WMB): In the case of the instance C of the PCP above, the correct answer is Y. To see this, note that k = 3, and C = ((s 1 =1, t 1 =101), (s 2 =10, t 2 =00), (s 3 =011, t 3 =11)) If we now look at the sequences s 1 s 3 s 2 s 3 and t 1 t 3 t 2 t 3 they turn out to give the same string, viz. 101110011. To see how the string has been composed from the corresponding s and t substrings, we can highlight the contributions made from the different (s,t) pairs: 1 0 1 1 1 0 0 1 1 = s 1 s 3 s 2 s 3 1 0 1 1 1 0 0 1 1 = t 1 t 3 t 2 t 3 We say that the instance C of the PCP has the solution {1,3,2,3}. The purpose of the examples is to help you get familiar with the nature of the PCP. The fact that for certain specific instances of the PCP it is easy to find a solution, and that for others you may be able to prove that there is none, doesn't detract from the fact there is no systematic terminating procedure that can be applied in general. The parallel with the Halting Problem is again helpful here: it is of course possible to show that certain specific programs will terminate and that others will not, but this doesn't resolve the halting issue, which concerns the existence of a general decisive algorithmic technique covering all programs. PREDICATE LOGIC IS UNDECIDABLE Proof concept: Reduce PCP (over the alphabet {0, 1}) to the decision problem for predicate logic. The "reduction", i.e., translation, takes an instance C for the PCP ((s 1,t 1 ),..., (s k, t k )) to the formula φ: P (f s1 (e), f t1 (e))... P (f sk (e), f tk (e)) v w ( P (v, w) P ( f s1 (v), f t1 (w))... P (f sk (v), f tk (w)) ) z P (z, z)

where - if s is the binary string b 0 b 1... b k, then f s f b0 b 1... bk (x) abbreviates f bk (... (f b1 (f b0 (x)))...) (This formula uses a binary predicate symbol P, constant e and two unary function symbols f 0 and f 1.) To complete the proof, it suffices to show that the instance C of PCP has a solution iff the formula φ is true in all models (see H&R p133-136). IMPLICATIONS FOR THE DEDUCTIVE PARADIGM We know: If φ is a closed predicate formula, then -φ iff M = φ for every model M. We also know: The question -φ is undecidable. Consequence: There exists no perfect theorem-proving system for predicate logic. Note also that: The set of true (valid) formulas can be enumerated: just enumerate all possible proofs using, for example, Huth and Ryan s proof system. But... there exists no way to enumerate the set of false formulas (else truth would be decidable).