NKU CSC 685 Kirby First-Order Logic and Undecidability.

Slides:



Advertisements
Similar presentations
Lecture 19. Reduction: More Undecidable problems
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
CSC 685 Logic Review. Logic: Modeling Human Reasoning syllogistic logic Syllogistic Logic (Aristotle). all/some X are/not Y Propositional Logic (Boole).
Recap CS605: The Mathematics and Theory of Computer Science.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CS355 – The Mathematics and Theory of Computer Science Reductions.
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Homework #9 Solutions.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
More Theory of Computing
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
Review Byron Gao. Overview Theory of computation: central areas: Automata, Computability, Complexity Computability: Is the problem solvable? –solvable.
Decidability of Languages That Do Not Ask Questions about Turing Machines Chapter 22.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
MA/CSSE 474 Theory of Computation Enumerability Reduction.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Halting Problem Introduction to Computing Science and Programming I.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Costas Busch - LSU1 The Post Correspondence Problem.
Undecidability and The Halting Problem
CS 154 Formal Languages and Computability April 28 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
Chapters 11 and 12 Decision Problems and Undecidability.
Review : Theory of Computation. Regular Language and Finite Automata Context-free Language and Pushdown Automata Turing Machine and Recursive Enumerable.
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Introduction to Computing Science and Programming I
CIS Automata and Formal Languages – Pei Wang
CIS Automata and Formal Languages – Pei Wang
FORMAL LANGUAGES AND AUTOMATA THEORY
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Jaya Krishna, M.Tech, Assistant Professor
How Hard Can It Be?.
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
Decidability continued….
More Undecidable Problems
CIS Automata and Formal Languages – Pei Wang
Presentation transcript:

NKU CSC 685 Kirby First-Order Logic and Undecidability

A decision ("yes/no") problem is decidable if there is an algorithm that takes any problem instance and returns the correct true/false answer. A decision problem is semi-decidable if there is an algorithm that takes any problem instance and returns true if and only if the correct answer is "true".

von Neumann Machine Multitape TM Nondeterministic TM Random Access Machine procedural pseudocodeyour favorite algorithmic formalism Church-Turing thesis Turing Machine easy to prove stuff here easy to do stuff here Finite Automata Context-Free Grammar

This sentence is false. Some self-referential sentences make statements that are perfectly acceptable, like this one. Do we "reject" self-reference?

Deep Computer Science Idea: Programs are strings. Programs can process strings. So: Programs can process programs. >> program= "print sqrt(81)" >> strlen( program ) 14 >> execute( program ) 9 >> execute( "for (;;)" ) ^C interrupted by user Self-reference is inescapable in computer science.

bool halts( string pgm, string w ) { // pgm is the source code of a void function that takes one string parameter. // Return true if pgm halts on input w, false otherwise } bool halts( string pgm, string w ) { // pgm is the source code of a void function that takes one string parameter. // Return true if pgm halts on input w, false otherwise } Proof that the Halting Problem is Undecidable - 1 Example: void f( string w ) { if ( w[0]=='b' ) for (;;) ; } void f( string w ) { if ( w[0]=='b' ) for (;;) ; } p1 halts( p1, "hi" ) == true halts( p1, "bye") == false halts( p1, p1 ) == true Suppose it were decidable. Then we'd have the following function:

Proof that the Halting Problem is Undecidable - 2 Of course, programs whose functions call functions are nbd... Example: void g() { for ( ;; ) ; } void f( string w ) { if ( w[0]=='b' ) g() ; } void g() { for ( ;; ) ; } void f( string w ) { if ( w[0]=='b' ) g() ; } p2 halts( p2, "hi" ) == true halts( p2, "bye") == false halts( p2, p2 ) == true

Proof that the Halting Problem is Undecidable - 3 What happens here? Example: p3 halts( p3, p3 ) == ?!!! true  false  true … contradiction bool halts( string pgm, string w ) { //... } void f( string w ) { if ( halts( w, w ) ) for( ;; ) ; } bool halts( string pgm, string w ) { //... } void f( string w ) { if ( halts( w, w ) ) for( ;; ) ; } Conclusion: HP is unsolvable.

Halting Problem Unsolvable ⇒ Post Correspondence Problem Unsolvable ⇒ First-Order Logic Validity Problem Unsolvable First-Order Logic Validity Problem Solvable ⇒ Post Correspondence Problem Solvable ⇒ Halting Problem Solvable ⇒  Usually we work by proof by contradiction

Post Correspondence Problem Can copies of a set of dominos be sequenced so that the string on top is the same as the string on the bottom? Example problem instance: Example problem instance: Answer: No Answer: Yes

PCP Can copies of a set of dominos be sequenced so that the string on top is the same as the string on the bottom? Example problem instance: Answer: Yes (but 66 dominos needed!) PCP: Given {(r 1,s 1 ),... (r n,s n )} where r i,s i  {0,1}*, does there exist a sequence {i1...ik} such that r i1 r i2...r ik = s i1 s i2...s ik ?

HP solver Post Correspondence Problem Solvable ⇒ Halting Problem Solvable M,w instance converter {(r 1,s 1 ),... (r n,s n )} (hypothetical) PCP solver yes/no Ensure: M halts on w iff {(r 1,s 1 ),... (r n,s n )} has a solution PROBLEM REDUCTION

PCP solver PCP Solvable ⇒ First-Order Logic Validity Problem Solvable instance converter { (r 1,s 1 ),... (r n,s n ) } (hypothetical) Validity Detector yes/no Ensure: {(r 1,s 1 ),... (r n,s n )} has a solution iff  is a valid wff. PROBLEM REDUCTION 

PCP reduction PCP instance: gf gfg gf gfg fgg gg fgg gg gfg fgg gfg fgg  = ( P(f(g(e)), g(f(g(e))))  P(g(g(f(e))), g(g(e)))  P(g(f(g(e))),g(g(f(e))))   v  w { Pvw  [ P(f(g(v)), g(f(g(w))))  P (g(g(f(v))), g(g(w)))  P(g(f(g(v))),g(g(f(w)))) ] } )   z Pzz Wffify! One constant: e Two one-place function symbols: f,g One two-argument predicate: P

Expressing unreachability u v v is unreachable from u R In SECOND-ORDER logic: unreachable( R,u,v):=  P  x  y  z( Pxx  (Pxy  Pyz  Pxz)   Puv  (Rxy  Pxy)) Can we express this in first order logic?