15-251 Great Theoretical Ideas in Computer Science.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Limitations. Limitations of Computation Hardware precision Hardware precision Software - we’re human Software - we’re human Problems Problems –complex.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
February 11, 2015CS21 Lecture 161 CS21 Decidability and Tractability Lecture 16 February 11, 2015.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Great Theoretical Ideas in Computer Science.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS21 Decidability and Tractability
Computability Thank you for staying close to me!! Learning and thinking More algorithms... computability.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Turing’s Legacy: The Limits Of Computation. Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 26April 20, 2003Carnegie.
Institute for Experimental Physics University of Vienna Institute for Quantum Optics and Quantum Information Austrian Academy of Sciences Undecidability.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Great Theoretical Ideas in Computer Science for Some.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really.
Lecture 18. Unsolvability Before the 1930’s, mathematics was not like today. Then people believed that “everything true must be provable”. (More formally,
CS 345: Chapter 8 Noncomputability and Undecidability Or Sometimes You Can’t Get It Done At All.
Course Overview and Road Map Computability and Logic.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
COMPSCI 102 Introduction to Discrete Mathematics.
Great Theoretical Ideas in Computer Science.
Godel’s proof Danny Brown. Outline of godel’s proof 1.Create a statement that says of itself that it is not provable 2.Show that this statement is provable.
CS6133 Software Specification and Verification
Great Theoretical Ideas in Computer Science.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Great Theoretical Ideas in Computer Science.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Chapter 4 Computation Chapter 4: Computation.
CSE 311 Foundations of Computing I Lecture 25 Pattern Matching, Cardinality, Computability Spring
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
Recursively Enumerable and Recursive Languages
Thales’ Legacy: What Is A Proof? Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 27April 22, 2004Carnegie Mellon.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
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.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
Payam Seraji IPM-Isfahan branch, Ordibehesht 1396
CIS Automata and Formal Languages – Pei Wang
Self-Reference And Undecidability
Gödel's Legacy: The Limits Of Logics
Discrete Mathematics for Computer Science
Great Theoretical Ideas in Computer Science
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Great Theoretical Ideas in Computer Science
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
CSCE 411 Design and Analysis of Algorithms
First Order Logic Rosen Lecture 3: Sept 11, 12.
Thales’ and Gödel’s Legacy: Proofs and Their Limitations
The Limitations of Proofs: An Incompressible Resolution
CS21 Decidability and Tractability
Great Theoretical Ideas in Computer Science
Introduction to Discrete Mathematics
Class 24: Computability Halting Problems Hockey Team Logo
CS154, Lecture 11: Self Reference, Foundation of Mathematics
CSE 311: Foundations of Computing
Properties of Relational Logic
CIS Automata and Formal Languages – Pei Wang
Presentation transcript:

Great Theoretical Ideas in Computer Science

Gödel’s Legacy: Proofs and Their Limitations Lecture 25 (November 16, 2010)

A Quick Recap of the Previous Lecture

The Halting Problem Is there a program HaltsOnItself such that for all programs P: HaltsOnItself(P) = yes, if P(P) halts HaltsOnItself(P) = no, if P(P) does not halt Halting Set K = { Java P | P(P) halts }

Alan Turing ( ) Theorem: [1937] There is no program to solve the halting problem

CONFUSE Does CONFUSE(CONFUSE) halt? CONFUSE(P) { if (HaltsOnItself(P)) then loop forever;//i.e., we dont halt else exit;//i.e., we halt // text of HaltsOnItself goes here } Suppose HaltsOnItself exists

Alan Turing ( ) Theorem: [1937] There is no program to solve the halting problem

Note: The impossibility proof even holds for “good” programs P with 1.at most one (clearly specified) input stmt 2.at most one (clearly specified) exit statement PROGRAM {read input INP; // input stmt blah blah; blah; exit; // exit stmt }

Computability Theory: Vocabulary Lesson We call a set S  * decidable or recursive if there is a program P such that: P(x) = yes, if x  S P(x) = no, if x  S We saw: the halting set K is undecidable (No program can decide membership in K)

Computability Theory: Some More Vocabulary We call a set of strings S  * enumerable or recursively enumerable (r.e.) if there is a program P such that: 1.P prints an (infinite) list of strings. 2.Any element on the list should be in S. 3.Each element in S appears after a finite amount of time. We saw: the halting set K is enumerable

The Halt 0 Problem Is there a program Halts such that for all programs Q which take no input: Halts(Q) = yes, if Q halts Halts(Q) = no, if Q does not halt Set K 0 = { Java Q | Q halts } Claim: The set K 0 is undecidable.

Proof: If K 0 decidable, there exists Halts Using this, we claim we can decide K. P { read input INP; // input stmt blah blah; exit; // exit stmt } Take any program P Make program Q = P(P) Q { var INP = “text of P”; blah blah; exit; // exit stmt } Now can use Halts to decide K. Contradiction!

What’s a proof? Flackback to Lecture 10

What is a proof? A sequence of statements, each of which is an axiom, or a hypothesis, or follows from previous statements using an inference rule

A Logical System A “logic” consists of: 1)A collection S of well-formed sentences 2)Some sentences in S called “axioms” 3)A set of “rules of inference”

E.g., Logical System for Propositions Axiom: Inference Rules: A Ç (B Ç C) (A Ç B) Ç C A Ç A A A B Ç A (A Ç B), (  A Ç C) (B Ç C) (  A Ç A) associativity contraction expansion cut rule

A Logical System A “logic” consists of: 1)A collection S of well-formed sentences 2)Some sentences in S called “axioms” 3)A set of “rules of inference” A “truth concept” consists of: 1)A collection S of well-formed sentences 2)Some sentences in S called “truths”

Our logical system for propositions is sound and complete for propositional truths (tautologies) “all theorems are true” “all truths are theorems”

A Logical System A “logic” consists of: 1)A collection S of well-formed sentences 2)Some sentences in S called “axioms” 3)A set of “rules of inference” A “truth concept” consists of: 1)A collection S of well-formed sentences 2)Some sentences in S called “truths”

a) 0 is a natural number. d) For all natural numbers m and n, if S(m) = S(n), then m = n. b) For every natural number n, its “successor” S(n) is a natural number. c) For every natural number n, S(n) ≠ 0. Another example: Peano Arithmetic

h) If n is a natural number and n = m, then m is also a natural number. e) For every natural n, n = n f) For all naturals, if n = m, then m = n. g) For all naturals if k = m and m = n then k = n. Peano Arithmetic (contd.)

Peano: and so on… You can build an edifice for arithmetic to conceivably prove all arithmetic truths and use this logical system Thm: the Peano system is sound for arithmetic We asked: Is it complete?

We’ll answer this today…

General Picture A set of (well-formed) statements S. A logic L. A truth concept Truth S : S  {T, F}

Extra condition 1 We want the set of statements to be decidable I.e., there exists an algorithm to check well-formedness

Recursive Program to decide S ValidProp(S) { return True if any of the following: S has the form  (S 1 ) and ValidProp(S 1 ) S has the form (S 1  S 2 ) and ValidProp(S 1 ) AND ValidProp(S 2 ) S has the form ….. } (for propositional logic)

General Picture A decidable set of statements S. A logic L. A truth concept Truth S : S  {T, F}

Extra condition 2 We want the logic to be computable I.e., there exists an algorithm to decide: a)given a statement s, is it an axiom? b)given a statement s and s’, if s’ follows from s using an inference rule

General Picture A decidable set of statements S. A computable logic L. A truth concept Truth S : S  {T, F}

What conditions on truth concept? None. This is the elusive “right or wrong” we are trying to capture…

Truths of Propositional Logic PropositionalTruth = All expressions in propositional logic that are tautologies.

Truths of Euclidean Geometry EuclidTruth = All TRUE expressions of the language of Euclidean geometry.

Truths of Natural Arithmetic All TRUE expressions of the language of arithmetic (logical symbols and quantification over Naturals). ArithmeticTruth =

Truths of JAVA Program Behavior JAVATruth = All TRUE expressions of the form program “P on input X will halt” or “not halt”

General Picture A decidable set of statements S. A computable logic L. A (possibly uncomputable) truth concept Truth S : S  {T, F}

Super Important Fact Let S be any (decidable) set of statements. Let L be any (computable) logic. Theorem: We can write a program to enumerate all the theorems of L. I.e., Provable S,L is enumerable.

Enumerating the Set Provable S,L for k = 0 to forever do let PROOF loop through all strings of length k let STMT loop through all strings of length < k if proofcheck S,L (STMT, PROOF) = Valid output STMT;//this is a theorem We can enumerate all the theorems of propositional logic, Elements of Euclid, Peano arithmetic! (and all programs in K.)

General Picture A decidable set of statements S. A computable logic L. A (possibly uncomputable) truth concept Truth S : S  {T, F} We can enumerate Theorems S,L

Soundness: Every theorem of (S,L) is true (according to TRUTH S ) Completeness: Every truth (according to TRUTH S ) is a theorem of (S,L)

Truth versus Provability Happy News: Provable PropLogic = PropositionalTruth The logical system we gave was sound and complete for Prop.Logic

Truth versus Provability Happy News: Provable Elements = EuclidTruth The Elements of Euclid are sound and complete for (Euclidean) geometry.

Truth versus Provability Not-so-Happy News: Provable Peano ≠ ArithmeticTruth

Hilbert’s Second Question [1900] Is there a foundation for mathematics that would, in principle, allow us to decide the truth of any mathematical proposition? Such a foundation would have to give us a clear procedure (algorithm) for making the decision. Hilbert Foundation for mathematics: F = (statements S, logical system L) + soundness

Gödel’s Incompleteness Theorem In 1931, Kurt Gödel stunned the world by proving that for any consistent axioms F there is a true statement of first order number theory that is not provable or disprovable by F. I.e., a true statement that can be made using 0, 1, plus, times, for every, there exists, AND, OR, NOT, parentheses, and variables that refer to natural numbers.

Truth versus Provability F is sound for arithmetic will imply F is not complete. Foundational Crisis: It is impossible to have a logical system F such that Provable F,S = ArithmeticTruth

Here’s what we have A language S. A truth concept Truth S. A logic L that is sound (maybe even complete) for the truth concept. An enumerable list Provable S,L of provable statements (theorems) in the logic.

JAVATruth is Not Enumerable Suppose JAVATruth is enumerable, and the program JavaList enumerates JAVATruth. Can now make a program HaltsOnItself(P): Run JavaList until either of the two statements appears: “P(P) halts”, or “P(P) does not halt”. Output the appropriate answer. Contradiction of undecidability of K.

JAVATruth has No Proof System Theorem: There is no sound and complete proof system for JAVATruth. Suppose (S,L) is sound and complete. Contradicts the fact that JAVATruth is not recursively enumerable. By soundness+completeness, Provable S,L = JAVATruth Proof: Recall, we can enumerate Provable S,L.

The Halting problem is not decidable. Hence, JavaTruth is not recursively enumerable. Hence, JavaTruth does not have a sound+complete logical system.

We can show that the existence of integer roots for Diophantine equations is not decidable. Polynomials capture the behavior of programs here!!! Hence, ArithmeticTruth is not recursively enumerable. Hence, ArithmeticTruth has no sound and complete proof system!!!!

Incompleteness Let us fix F=(S,L) to be any attempt to give a foundation for mathematics. We have already proved that it cannot be sound and complete. Furthermore… We can even construct a statement that we will all believe to be true, but is not provable in F.

Loop though all sequences of sentences in S If S is a valid F-proof of “P halts”, then loop-forever If S is a valid F-proof of “P never halts”, then halt. Suppose F is sound+complete for JAVATruth. Then for each P, F can prove either “P halts” or “P does not halt” CONFUSE(P) { }

Program CONFUSE F (P) Loop though all sequences of sentences in S If S is a valid F-proof of “P halts”, then loop-forever If S is a valid F-proof of “P never halts”, then halt. GODEL F = AUTO_CANNIBAL_MAKER(CONFUSE F ) Thus, when we run GODEL F it will do the same thing as: CONFUSE F (GODEL F )

GODEL F = AUTO_CANNIBAL_MAKER(CONFUSE F ) Thus, when we run GODEL F it will do the same thing as CONFUSE F (GODEL F ) Program CONFUSE F (P) Loop though all sequences of sentences in S If S is a valid F-proof of “P halts”, then loop-forever If S is a valid F-proof of “P never halts”, then halt. Can F prove GODEL F halts? If Yes, then CONFUSE F (GODEL F ) does not halt: Contradiction Can F prove GODEL F does not halt? If Yes, then CONFUSE F (GODEL F ) halts: Contradiction

GODEL F And this program does not halt! F can’t prove or disprove that GODEL F halts. But GODEL F = CONFUSE F (GODEL F ) is the program: Loop though all sequences of sentences in S If S is a valid F-proof of “GODEL F halts”, then loop-forever If S is a valid F-proof of “GODEL F never halts”, then halt.

No fixed set of assumptions F can provide a complete foundation for mathematical proof. In particular, it can’t prove the true statement “GODEL F does not halt.”

So What is Mathematics? We can still have rigorous, precise axioms that we agree to use in our reasoning (like the Peano Axioms, or axioms for Set Theory). We just can’t hope for them to be complete. Most working mathematicians never hit these points of uncertainty in their work, but it does happen!