Gцdel & Recursivity

Gцdel & Recursivity

G¨odel& Recursivity JACQUES DUPARC B^atimentInternef CH - 1015 Lausanne [email protected] Jacques.Duparc@epfl.ch 2 Contents Introduction 7 I Recursivity 9 Recursivity 11 1 Towards Turing Machines 11 1.1 Deterministic Finite Automata . 11 1.2 Nondeterministic Finite Automata . 12 1.3 Regular Expressions . 16 1.4 Non-Regular Languages . 19 1.5 Pushdown Automata . 20 1.6 Context-Free Grammar . 22 2 Turing Machines 27 2.1 Deterministic Turing Machines . 27 2.2 Non-Deterministic Turing Machines . 32 2.3 The Concept of Algorithm . 35 2.4 Universal Turing Machine . 36 2.5 The Halting Problem . 40 2.6 Turing Machine with Oracle . 40 3 Recursive Functions 47 3.1 Primitive Recursive Functions . 47 3.2 Variable Substitution . 52 3.3 Bounded Minimisation and Bounded Quantification . 53 3.4 Coding Sequences of Integers . 55 3.5 Partial Recursive Functions . 57 4 CONTENTS Introduction Introduction 7 The basic requirements for this course are contained in the "Mathematical Logic" course. Among other things, you should have a clear understanding of each of the following: first order language, signature, terms, formulas, theory, proof theory, models, completeness theorem, compactness theorem, L¨owenheim-Skolem theorem. It makes no sense to take this course without this solid background on first order logic. The title of the course is ”G¨odeland Recursivity" but it should rather be "Recursivity and G¨odel"since that is the way we are going to go through these topics (1) Recursivity (2) G¨odel'sincompleteness theorems (there are two of them) Recursivity is at the heart of computer science, it represents the mathematical side of what computing is like. It is related to arithmetics and to proof theory. G¨odel'sincompleteness theorems are concerned with number theory (arithmetics) which itself lies at the core of mathematics. They contradict the commonly shared idea that everything that is true can be proved. It ruins the plan, for every mathematical statement ' to either prove it or disprove it (by proving '). G¨odel'sfirst incompleteness theorem says that there exists a formula ' from number theory such that neither ' nor ' is provable. More precisely, it says that in Peano Arithmetics (which is a first order axiomatization of arithmetics) there exists a formula ' that cannot be proved nor disproved, and if we were to add this formula to Peano Arithmetics, one would find a second one that would not be provable nor disprovable inside their first extension of Peano Arithmetics. And if this new formula would be added again, we could find a third one and so on and so forth. To put it differently, if we want to extend Peano Arithmetics to a larger theory which is complete in the sense that it proves or disproves any given formula, there would not have any understanding of this theory, we would not get hold of it, for it would not be recursive, meaning that we would not have any efficient way of figuring out whether a given closed formula is part of the theory or not (not provable from the theory, but simply part of the theory!). This is precisely where the notion of recursivity plays a crucial role. One does not have the right comprehension of G¨odel'sincompleteness theorems without a proper understanding of what recursivity is like. The formula that we will construct (the one that is not provable nor disprovable in Peano Arith- metics) is rather odd. There is no chance that one might tumble over such a formula during the usual mathematical practice. However, since G¨odel'sincompleteness theorem was proved, there have been several examples of real arithmetic mathematical formulas that are not provable nor disprovable in Peano Arith- metics, although the are formulated in the language of arithmetics. A good example of such a formula is the one related to Goodstein sequences (1944). A Goodstein m m m sequence is of the form Gp0q;Gp1q;Gp2q;:::, etc, where m is a positive integer. It is defined the following way (we take m “ 4 as an example, the general case being obtained by replacing 4 m m m Gp0q “ 4 by Gp0q “ m and gathering the other values Gp1q;Gp2q; etc the same way): 8 EPFL G¨odel& Recursivity 4 2 ˝ Gp0q “ 4 write 4 in hereditary base 2: 4 “ 2 replace all 2's by 3's, then subtract 1: 33 “ 26 4 2 1 0 ˝ Gp1q “ 26 write 26 in hereditary base 3: 26 “ 2 ¨ 3 ` 2 ¨ 3 2 ¨ 3 replace all 3's by 4's, then subtract 1: 2 ¨ 42 ` 2 ¨ 412 ¨ 40 ´ 1 “ 41 4 2 1 0 ˝ Gp2q “ 41 write 41 in hereditary base 4: 41 “ 2 ¨ 4 ` 2 ¨ 4 2 ¨ 4 replace all 4's by 5's, then subtract 1: 2 ¨ 52 ` 2 ¨ 512 ¨ 50 ´ 1 “ 60 4 ˝ Gp3q “ 60 ::: etc 4 402653209 Amazingly, Gpnq increases until n reaches the value 3 ¨ 2 where it reaches the maximum of 3 ¨ 2402653210 ´ 1, it stays there for the next 3 ¨ 2402653209 steps then starts its final descent and eventually reaches 0. m Amazingly, for every integer m, the Goodstein sequence pGpnqqnPN is ultimately constant with value 0, i.e. lim Gm “ 0: nÑ8 pnq However this statement which is easily formalizable in the language of arithmetics is not provable in Peano Arithmetics (Kirby and Paris 1982). It requires a stronger theory to be proved (for instance record order arithmetics). G¨odel'ssecond incompleteness theorem than says that mathematics cannot prove its own con- sistency (unless it is inconsistent in which case it can prove its own consistency for it can prove everything). More precisely, in any recursive extension J of Peano Arithmetics, the formula "ConspJq" (which is a formula from number theory that asserts that there is no proof of K from J) is not provable unless J is inconsistent i.e. IfJ&c thenJ&c ConspJq We will present three different approaches: ˝ Computer Science ÝÑ Turing Machine (one of the abstract model of computer) k ˝ Number Theory ÝÑ Recursive functions which are particular functions N Ñ N Part I Recursivity Chapter 1 Towards Turing Machines The whole chapter is highly inspired by Michael Sipser's book: \Introduction to the Theory of Computation" [31]. It is a dashing introduction to the notions of Finite Automata, PushDown Automata, Turing Machines. We also recommend \Introduction to automata theory, languages, and computation" by John E. HopcroftHopcroft, John E., Rajeev MotwaniMotwani, Rajeev et Jeffrey D. UllmanUllman, Jef- frey D. [19]; \Computational complexity" by Christos H. PapadimitriouPapadimitriou, Christos H. [26] and \A mathematical introduction to logic" by Herbert B. Enderton Enderton, Herbert B. [8]. 1.1 Deterministic Finite Automata We will see that any finite automaton can be regarded as a rudimentary Turing machine: a Turing machine that never writes anything and only goes one direction. Definition 1 A deterministic finite automaton (DFA) is a 5-tuple pQ; Σ; δ; q0;F q, where (1) Q is a finite set called the states, (2) Σ is a finite set called the alphabet, (3) δ : Q ˆ Σ ÝÑ Q is the transition function, (4) q0 P Q is the initial state, and (5) F Ď Q is the set of accepting states.1 We denote by Σă! (or equivalently by Σ˚) the set of finite words on Σ and by " the empty sequence. 1Accept states sometimes are called final states. 12 EPFL G¨odel& Recursivity ă! Definition 2 A DFA “ pQ; Σ; δ; q0;F q on an alphabet Σ accepts the word w P Σ if and A only if ˝ either w “ " (the empty sequence) and q0 P F ˝ or w “ xa0; : : : ; any with each ai P Σ, and there is a sequence of states r0; : : : ; rn`1 such that: ‚ r0 “ q0 ‚@ i ă n; δpri; aiq “ ri`1 ‚ rn`1 P F . Notation 3 Given any DFA , A p q “ tw P Σă! : w is accepted by u : L A A p q denotes the language accepted by . L A A Definition 4 Any language recognised by some deterministic finite automata (DF A) is called regular. Example 5 The following DFA recognises the language p q “ tw1 | w P t0; 1uă!u of all A L A the words of 0's and 1's that end with a 1. 0 1 q0 q1 1 0 1.2 Nondeterministic Finite Automata Given any alphabet Σ, we both assume that " R Σ holds and write Σ" for Σ Y t"u. Definition 6 A nondeterministic finite automaton (NFA) is a 5-tuple pQ; Σ; δ; q0;F q, where (1) Q is a finite set of states, (2) Σ is a finite alphabet, (3) δ : Q ˆ Σ" ÝÑ pQq is the transition function, P Recursivity 13 (4) q0 P Q is the initial state, and (5) F Ď Q is the set of accepting states. ă! Definition 7 Let “ pQ; Σ; δ; q0;F q be an NFA and w P Σ . We say that accepts w if N N and only if ˝ either w “ " the empty sequence and q0 P F ˝ or w can be written as w “ xa0; : : : ; any with each ai P Σ", and there is and a sequence of states r0; : : : ; rn`1 such that: ‚ r0 “ q0 ‚@ i ă n; ri`1 P δpri; aiq, ‚ rn`1 P F . Example 8 The following NFA recognises the language p q “ tw1 | w P t0; 1uă!u of all N L N the words of 0's and 1's that end with a 1. 0, 1 1 q0 q1 Proposition 9 Every NFA has an equivalent DFA. i.e. given any NFA there exists some N DFA such that D p q “ p q: L N L D Proof of Proposition 9: Given any NFA “ xQ; Σ; δ; q0;F y, we build some DFA “ 1 1 1 1 N D xQ ; Σ; δ ; q0;F y that recognises the same language.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    65 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us