Introduction to the Theory of Computation Some Notes for CIS262

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to the Theory of Computation Some Notes for CIS262 Introduction to the Theory of Computation Some Notes for CIS262 Jean Gallier Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104, USA e-mail: [email protected] c Jean Gallier Please, do not reproduce without permission of the author December 26, 2017 2 Contents 1 Introduction 7 2 Basics of Formal Language Theory 9 2.1 Alphabets,Strings,Languages . .. 9 2.2 OperationsonLanguages. .. .. 15 3 DFA’s, NFA’s, Regular Languages 19 3.1 Deterministic Finite Automata (DFA’s) . 20 3.2 The“Cross-product”Construction . ... 25 3.3 Nondeteterministic Finite Automata (NFA’s) . .. 27 3.4 ǫ-Closure...................................... 30 3.5 ConvertinganNFAintoaDFA ......................... 32 3.6 Finite State Automata With Output: Transducers . .... 36 3.7 An Application of NFA’s: Text Search . 40 4 Hidden Markov Models (HMMs) 45 4.1 HiddenMarkovModels(HMMs). 45 4.2 The Viterbi Algorithm and the Forward Algorithm . 58 5 Regular Languages, Minimization of DFA’s 67 5.1 DirectedGraphsandPaths ........................... 67 5.2 LabeledGraphsandAutomata ......................... 70 5.3 The Closure Definition of the Regular Languages . .. 72 5.4 RegularExpressions ............................... 75 5.5 RegularExpressionsandRegularLanguages . ... 76 5.6 RegularExpressionsandNFA’s . .. .. 78 5.7 Applications of Regular Expressions . 86 5.8 Summary of Closure Properties of the Regular Languages . ...... 87 5.9 Right-Invariant Equivalence Relations on Σ∗ .................. 88 5.10 Finding minimal DFA’s . 98 5.11 State Equivalence and Minimal DFA’s . 100 5.12ThePumpingLemma............................... 111 5.13 A Fast Algorithm for Checking State Equivalence . 115 3 4 CONTENTS 6 Context-Free Grammars And Languages 127 6.1 Context-FreeGrammars . .. .. 127 6.2 DerivationsandContext-FreeLanguages . .... 128 6.3 NormalFormsforContext-FreeGrammars . .... 134 6.4 RegularLanguagesareContext-Free . 141 6.5 Useless Productions in Context-Free Grammars . .... 142 6.6 TheGreibachNormalForm ........................... 144 6.7 LeastFixed-Points ................................ 145 6.8 Context-Free Languages as Least Fixed-Points . ...... 147 6.9 Least Fixed-Points andtheGreibachNormalForm . 151 6.10 TreeDomainsandGornTrees . 156 6.11DerivationsTrees ................................. 160 6.12Ogden’sLemma.................................. 162 6.13PushdownAutomata ............................... 168 6.14 FromContext-FreeGrammarsToPDA’s . 172 6.15 FromPDA’sToContext-FreeGrammars . 173 6.16 The Chomsky-Schutzenberger Theorem . ..... 175 7 A Survey of LR-Parsing Methods 177 7.1 LR(0)-CharacteristicAutomata . 177 7.2 Shift/ReduceParsers ............................... 186 7.3 ComputationofFIRST.............................. 188 7.4 The Intuition Behind the Shift/Reduce Algorithm . 189 7.5 TheGraphMethodforComputingFixedPoints . 190 7.6 ComputationofFOLLOW ............................ 192 7.7 Algorithm T raverse ............................... 193 7.8 More on LR(0)-CharacteristicAutomata . 195 7.9 LALR(1)-LookaheadSets. 195 7.10 Computing FIRST, FOLLOW, etc. in the Presence of ǫ-Rules . 197 7.11 LR(1)-CharacteristicAutomata . 204 8 RAM Programs, Turing Machines 209 8.1 PartialFunctionsandRAMPrograms . 209 8.2 Definition of a Turing Machine . 215 8.3 ComputationsofTuringMachines. 217 8.4 RAM-computable functions are Turing-computable . .... 220 8.5 Turing-computable functions are RAM-computable . .... 221 8.6 Computably Enumerable and Computable Languages . 222 8.7 The Primitive Recursive Functions . 223 8.8 ThePartialComputableFunctions . 229 9 Universal RAM Programs and the Halting Problem 235 9.1 PairingFunctions................................. 235 CONTENTS 5 9.2 EquivalenceofAlphabets............................. 238 9.3 CodingofRAMPrograms ............................ 242 9.4 Kleene’s T -Predicate ............................... 250 9.5 A Simple Function Not Known to be Computable . 252 9.6 A Non-Computable Function; Busy Beavers . 254 10 Elementary Recursive Function Theory 259 10.1 AcceptableIndexings ............................... 259 10.2UndecidableProblems .............................. 262 10.3 Listable (Recursively Enumerable) Sets . 267 10.4 Reducibility and Complete Sets . 272 10.5TheRecursionTheorem ............................. 276 10.6ExtendedRiceTheorem ............................. 280 10.7 CreativeandProductiveSets . 283 11 Listable and Diophantine Sets; Hilbert’s Tenth 287 11.1 Diophantine Equations; Hilbert’s Tenth Problem . 287 11.2 Diophantine Sets and Listable Sets . 290 11.3 SomeApplicationsoftheDPRMTheorem . 294 12 The Post Correspondence Problem; Applications 299 12.1 ThePostCorrespondenceProblem . 299 12.2 Some Undecidability Results for CFG’s . 300 12.3 MoreUndecidablePropertiesofLanguages . .... 303 13 Computational Complexity; and 305 P N P 13.1 The Class .................................... 305 P 13.2 DirectedGraphs,Paths. 307 13.3EulerianCycles .................................. 308 13.4 Hamiltonian Cycles . 309 13.5 Propositional Logic and Satisfiability . 310 13.6 The Class , -Completeness ....................... 314 N P N P 13.7 TheCook-LevinTheorem ............................ 319 14 Some -Complete Problems 331 N P 14.1 StatementsoftheProblems . 331 14.2 Proofs of -Completeness ........................... 342 N P 14.3 Succinct Certificates, co , and ..................... 355 N P EX P 15 Primality Testing is in 361 N P 15.1 PrimeNumbersandCompositeNumbers . 361 15.2 Methods for Primality Testing . 362 15.3 Modular Arithmetic, the Groups Z/nZ, (Z/nZ)∗ ................ 365 6 CONTENTS 15.4 TheLucasTheorem;LucasTrees . 374 15.5 Algorithms for Computing Powers Modulo m ................. 379 15.6 PRIMES is in ................................ 381 N P Chapter 1 Introduction The theory of computation is concerned with algorithms and algorithmic systems: their design and representation, their completeness, and their complexity. The purpose of these notes is to introduce some of the basic notions of the theory of computation, including concepts from formal languages and automata theory, the theory of computability, some basics of recursive function theory, and an introduction to complexity theory. Other topics such as correctness of programs will not be treated here (there just isn’t enough time!). The notes are divided into three parts. The first part is devoted to formal languages and automata. The second part deals with models of computation, recursive functions, and undecidability. The third part deals with computational complexity, in particular the classes and . P N P 7 8 CHAPTER 1. INTRODUCTION Chapter 2 Basics of Formal Language Theory 2.1 Alphabets, Strings, Languages Our view of languages is that a language is a set of strings. In turn, a string is a finite sequence of letters from some alphabet. These concepts are defined rigorously as follows. Definition 2.1. An alphabet Σ is any finite set. We often write Σ = a ,...,a . The a are called the symbols of the alphabet. { 1 k} i Examples: Σ= a { } Σ= a, b, c { } Σ= 0, 1 { } Σ= α,β,γ,δ,ǫ,λ,ϕ,ψ,ω,µ,ν,ρ,σ,η,ξ,ζ { } A string is a finite sequence of symbols. Technically, it is convenient to define strings as functions. For any integer n 1, let ≥ [n]= 1, 2,...,n , { } and for n = 0, let [0] = . ∅ Definition 2.2. Given an alphabet Σ, a string over Σ (or simply a string) of length n is any function u:[n] Σ. → The integer n is the length of the string u, and it is denoted as u . When n = 0, the special string | | u: [0] Σ of length 0 is called the empty string, or null string, and is denoted as ǫ. → 9 10 CHAPTER 2. BASICS OF FORMAL LANGUAGE THEORY Given a string u:[n] Σ of length n 1, u(i) is the i-th letter in the string u. For simplicity of notation, we→ denote the string≥u as u = u1u2 ...un, with each u Σ. i ∈ For example, if Σ = a, b and u: [3] Σ is defined such that u(1) = a, u(2) = b, and u(3) = a, we write { } → u = aba. Other examples of strings are work, fun, gabuzomeuh Strings of length 1 are functions u: [1] Σ simply picking some element u(1) = ai in Σ. Thus, we will identify every symbol a Σ→ with the corresponding string of length 1. i ∈ The set of all strings over an alphabet Σ, including the empty string, is denoted as Σ∗. Observe that when Σ = , then ∅ ∗ = ǫ . ∅ { } When Σ = , the set Σ∗ is countably infinite. Later on, we will see ways of ordering and enumerating6 ∅ strings. Strings can be juxtaposed, or concatenated. Definition 2.3. Given an alphabet Σ, given any two strings u:[m] Σ and v :[n] Σ, the concatenation u v (also written uv) of u and v is the string → → · uv :[m + n] Σ, defined such that → u(i) if 1 i m, uv(i)= v(i m) if m≤+1≤ i m + n. − ≤ ≤ In particular, uǫ = ǫu = u. Observe that uv = u + v . | | | | | | For example, if u = ga, and v = buzo, then uv = gabuzo It is immediately verified that u(vw)=(uv)w. 2.1. ALPHABETS, STRINGS, LANGUAGES 11 Thus, concatenation is a binary operation on Σ∗ which is associative and has ǫ as an identity. Note that generally, uv = vu, for example for u = a and v = b. 6 Given a string u Σ∗ and n 0, we define un recursively as follows: ∈ ≥ u0 = ǫ un+1 = unu (n 0). ≥ Clearly, u1 = u, and it is an easy exercise to show that unu = uun, for all n 0. ≥ For the induction step, we have un+1u =(unu)u by definition of un+1 =(uun)u by the induction hypothesis = u(unu) by associativity = uun+1 by definition of un+1. Definition 2.4. Given an alphabet Σ, given any two strings u, v Σ∗ we define the following ∈ notions as follows: u is a prefix of v iff there is some y Σ∗ such that ∈ v = uy. u is a suffix of v iff there is some x Σ∗ such that ∈ v = xu. u is a substring of v iff there are some x, y Σ∗ such that ∈ v = xuy. We say that u is a proper prefix (suffix, substring) of v iff u is a prefix (suffix, substring) of v and u = v. 6 For example, ga is a prefix of gabuzo, zo is a suffix of gabuzo and buz is a substring of gabuzo. Recall that a partial ordering on a set S is a binary relation S S which is reflexive, transitive, and antisymmetric.≤ ≤ ⊆ × The concepts of prefix, suffix, and substring, define binary relations on Σ∗ in the obvious way. It can be shown that these relations are partial orderings.
Recommended publications
  • Simulating Quantum Field Theory with a Quantum Computer
    Simulating quantum field theory with a quantum computer John Preskill Lattice 2018 28 July 2018 This talk has two parts (1) Near-term prospects for quantum computing. (2) Opportunities in quantum simulation of quantum field theory. Exascale digital computers will advance our knowledge of QCD, but some challenges will remain, especially concerning real-time evolution and properties of nuclear matter and quark-gluon plasma at nonzero temperature and chemical potential. Digital computers may never be able to address these (and other) problems; quantum computers will solve them eventually, though I’m not sure when. The physics payoff may still be far away, but today’s research can hasten the arrival of a new era in which quantum simulation fuels progress in fundamental physics. Frontiers of Physics short distance long distance complexity Higgs boson Large scale structure “More is different” Neutrino masses Cosmic microwave Many-body entanglement background Supersymmetry Phases of quantum Dark matter matter Quantum gravity Dark energy Quantum computing String theory Gravitational waves Quantum spacetime particle collision molecular chemistry entangled electrons A quantum computer can simulate efficiently any physical process that occurs in Nature. (Maybe. We don’t actually know for sure.) superconductor black hole early universe Two fundamental ideas (1) Quantum complexity Why we think quantum computing is powerful. (2) Quantum error correction Why we think quantum computing is scalable. A complete description of a typical quantum state of just 300 qubits requires more bits than the number of atoms in the visible universe. Why we think quantum computing is powerful We know examples of problems that can be solved efficiently by a quantum computer, where we believe the problems are hard for classical computers.
    [Show full text]
  • Geometric Algorithms
    Geometric Algorithms primitive operations convex hull closest pair voronoi diagram References: Algorithms in C (2nd edition), Chapters 24-25 http://www.cs.princeton.edu/introalgsds/71primitives http://www.cs.princeton.edu/introalgsds/72hull 1 Geometric Algorithms Applications. • Data mining. • VLSI design. • Computer vision. • Mathematical models. • Astronomical simulation. • Geographic information systems. airflow around an aircraft wing • Computer graphics (movies, games, virtual reality). • Models of physical world (maps, architecture, medical imaging). Reference: http://www.ics.uci.edu/~eppstein/geom.html History. • Ancient mathematical foundations. • Most geometric algorithms less than 25 years old. 2 primitive operations convex hull closest pair voronoi diagram 3 Geometric Primitives Point: two numbers (x, y). any line not through origin Line: two numbers a and b [ax + by = 1] Line segment: two points. Polygon: sequence of points. Primitive operations. • Is a point inside a polygon? • Compare slopes of two lines. • Distance between two points. • Do two line segments intersect? Given three points p , p , p , is p -p -p a counterclockwise turn? • 1 2 3 1 2 3 Other geometric shapes. • Triangle, rectangle, circle, sphere, cone, … • 3D and higher dimensions sometimes more complicated. 4 Intuition Warning: intuition may be misleading. • Humans have spatial intuition in 2D and 3D. • Computers do not. • Neither has good intuition in higher dimensions! Is a given polygon simple? no crossings 1 6 5 8 7 2 7 8 6 4 2 1 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 18 4 18 4 19 4 19 4 20 3 20 3 20 1 10 3 7 2 8 8 3 4 6 5 15 1 11 3 14 2 16 we think of this algorithm sees this 5 Polygon Inside, Outside Jordan curve theorem.
    [Show full text]
  • Introduction to Computational Social Choice
    1 Introduction to Computational Social Choice Felix Brandta, Vincent Conitzerb, Ulle Endrissc, J´er^omeLangd, and Ariel D. Procacciae 1.1 Computational Social Choice at a Glance Social choice theory is the field of scientific inquiry that studies the aggregation of individual preferences towards a collective choice. For example, social choice theorists|who hail from a range of different disciplines, including mathematics, economics, and political science|are interested in the design and theoretical evalu- ation of voting rules. Questions of social choice have stimulated intellectual thought for centuries. Over time the topic has fascinated many a great mind, from the Mar- quis de Condorcet and Pierre-Simon de Laplace, through Charles Dodgson (better known as Lewis Carroll, the author of Alice in Wonderland), to Nobel Laureates such as Kenneth Arrow, Amartya Sen, and Lloyd Shapley. Computational social choice (COMSOC), by comparison, is a very young field that formed only in the early 2000s. There were, however, a few precursors. For instance, David Gale and Lloyd Shapley's algorithm for finding stable matchings between two groups of people with preferences over each other, dating back to 1962, truly had a computational flavor. And in the late 1980s, a series of papers by John Bartholdi, Craig Tovey, and Michael Trick showed that, on the one hand, computational complexity, as studied in theoretical computer science, can serve as a barrier against strategic manipulation in elections, but on the other hand, it can also prevent the efficient use of some voting rules altogether. Around the same time, a research group around Bernard Monjardet and Olivier Hudry also started to study the computational complexity of preference aggregation procedures.
    [Show full text]
  • Randnla: Randomized Numerical Linear Algebra
    review articles DOI:10.1145/2842602 generation mechanisms—as an algo- Randomization offers new benefits rithmic or computational resource for the develop ment of improved algo- for large-scale linear algebra computations. rithms for fundamental matrix prob- lems such as matrix multiplication, BY PETROS DRINEAS AND MICHAEL W. MAHONEY least-squares (LS) approximation, low- rank matrix approxi mation, and Lapla- cian-based linear equ ation solvers. Randomized Numerical Linear Algebra (RandNLA) is an interdisci- RandNLA: plinary research area that exploits randomization as a computational resource to develop improved algo- rithms for large-scale linear algebra Randomized problems.32 From a foundational per- spective, RandNLA has its roots in theoretical computer science (TCS), with deep connections to mathemat- Numerical ics (convex analysis, probability theory, metric embedding theory) and applied mathematics (scientific computing, signal processing, numerical linear Linear algebra). From an applied perspec- tive, RandNLA is a vital new tool for machine learning, statistics, and data analysis. Well-engineered implemen- Algebra tations have already outperformed highly optimized software libraries for ubiquitous problems such as least- squares,4,35 with good scalability in par- allel and distributed environments. 52 Moreover, RandNLA promises a sound algorithmic and statistical foundation for modern large-scale data analysis. MATRICES ARE UBIQUITOUS in computer science, statistics, and applied mathematics. An m × n key insights matrix can encode information about m objects ˽ Randomization isn’t just used to model noise in data; it can be a powerful (each described by n features), or the behavior of a computational resource to develop discretized differential operator on a finite element algorithms with improved running times and stability properties as well as mesh; an n × n positive-definite matrix can encode algorithms that are more interpretable in the correlations between all pairs of n objects, or the downstream data science applications.
    [Show full text]
  • Mechanism, Mentalism, and Metamathematics Synthese Library
    MECHANISM, MENTALISM, AND METAMATHEMATICS SYNTHESE LIBRARY STUDIES IN EPISTEMOLOGY, LOGIC, METHODOLOGY, AND PHILOSOPHY OF SCIENCE Managing Editor: JAAKKO HINTIKKA, Florida State University Editors: ROBER T S. COHEN, Boston University DONALD DAVIDSON, University o/Chicago GABRIEL NUCHELMANS, University 0/ Leyden WESLEY C. SALMON, University 0/ Arizona VOLUME 137 JUDSON CHAMBERS WEBB Boston University. Dept. 0/ Philosophy. Boston. Mass .• U.S.A. MECHANISM, MENT ALISM, AND MET AMA THEMA TICS An Essay on Finitism i Springer-Science+Business Media, B.V. Library of Congress Cataloging in Publication Data Webb, Judson Chambers, 1936- CII:J Mechanism, mentalism, and metamathematics. (Synthese library; v. 137) Bibliography: p. Includes indexes. 1. Metamathematics. I. Title. QA9.8.w4 510: 1 79-27819 ISBN 978-90-481-8357-9 ISBN 978-94-015-7653-6 (eBook) DOl 10.1007/978-94-015-7653-6 All Rights Reserved Copyright © 1980 by Springer Science+Business Media Dordrecht Originally published by D. Reidel Publishing Company, Dordrecht, Holland in 1980. Softcover reprint of the hardcover 1st edition 1980 No part of the material protected by this copyright notice may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording or by any informational storage and retrieval system, without written permission from the copyright owner TABLE OF CONTENTS PREFACE vii INTRODUCTION ix CHAPTER I / MECHANISM: SOME HISTORICAL NOTES I. Machines and Demons 2. Machines and Men 17 3. Machines, Arithmetic, and Logic 22 CHAPTER II / MIND, NUMBER, AND THE INFINITE 33 I. The Obligations of Infinity 33 2. Mind and Philosophy of Number 40 3. Dedekind's Theory of Arithmetic 46 4.
    [Show full text]
  • A Mathematical Analysis of Student-Generated Sorting Algorithms Audrey Nasar
    The Mathematics Enthusiast Volume 16 Article 15 Number 1 Numbers 1, 2, & 3 2-2019 A Mathematical Analysis of Student-Generated Sorting Algorithms Audrey Nasar Let us know how access to this document benefits ouy . Follow this and additional works at: https://scholarworks.umt.edu/tme Recommended Citation Nasar, Audrey (2019) "A Mathematical Analysis of Student-Generated Sorting Algorithms," The Mathematics Enthusiast: Vol. 16 : No. 1 , Article 15. Available at: https://scholarworks.umt.edu/tme/vol16/iss1/15 This Article is brought to you for free and open access by ScholarWorks at University of Montana. It has been accepted for inclusion in The Mathematics Enthusiast by an authorized editor of ScholarWorks at University of Montana. For more information, please contact [email protected]. TME, vol. 16, nos.1, 2&3, p. 315 A Mathematical Analysis of student-generated sorting algorithms Audrey A. Nasar1 Borough of Manhattan Community College at the City University of New York Abstract: Sorting is a process we encounter very often in everyday life. Additionally it is a fundamental operation in computer science. Having been one of the first intensely studied problems in computer science, many different sorting algorithms have been developed and analyzed. Although algorithms are often taught as part of the computer science curriculum in the context of a programming language, the study of algorithms and algorithmic thinking, including the design, construction and analysis of algorithms, has pedagogical value in mathematics education. This paper will provide an introduction to computational complexity and efficiency, without the use of a programming language. It will also describe how these concepts can be incorporated into the existing high school or undergraduate mathematics curriculum through a mathematical analysis of student- generated sorting algorithms.
    [Show full text]
  • A History of Modern Numerical Linear Algebra
    Gene Golub, Stanford University 1 A History of Modern Numerical Linear Algebra Gene H. Golub Stanford University Gene Golub, Stanford University 2 What is Numerical Analysis? (a.k.a Scientific Computing) The definitions are becoming shorter... Webster’s New Collegiate Dictionary (1973): • ”The study of quantitative approximations to the solutions of mathematical problems including consideration of the errors and bounds to the errors involved.” The American Heritage Dictionary (1992): • ”The study of approximate solutions to mathematical problems, taking into account the extent of possible errors.” L. N. Trefethen, Oxford University (1992): • ”The study of algorithms for the problems of continuous mathematics.” Gene Golub, Stanford University 3 Numerical Analysis: How It All Started Numerical analysis motivated the development of the earliest computers. Ballistics • Solution of PDE’s • Data Analysis • Early pioneers included: J. von Neumann, A. M. Turing In the beginning... von Neumann & Goldstine (1947): ”Numerical Inversion of Matrices of High Order” Gene Golub, Stanford University 4 Numerical Linear Algebra Numerical Linear Algebra (NLA) is a small but active area of research: Less than 200 active, committed persons. But the community involves many scientists. Gene Golub, Stanford University 5 Top Ten Algorithms in Science (Jack Dongarra, 2000) 1. Metropolis Algorithm for Monte Carlo 2. Simplex Method for Linear Programming 3. Krylov Subspace Iteration Methods 4. The Decompositional Approach to Matrix Computations 5. The Fortran Optimizing Compiler 6. QR Algorithm for Computing Eigenvalues 7. Quicksort Algorithm for Sorting 8. Fast Fourier Transform 9. Integer Relation Detection 10. Fast Multipole Method Red: Algorithms within the exclusive domain of NLA research. • Blue: Algorithms strongly (though not exclusively) connected to NLA research.
    [Show full text]
  • Complexity of Some Problems from the Theory of Automata
    INFORMATION AND CONTROL 66, 163-176 (1985) Complexity of Some Problems from the Theory of Automata JACQUES STERN DOpartement de Mathdmatiques, UniversitO de Caen, Caen, France INTRODUCTION 1.1. Given a finite alphabet L', the regular events over X are those accepted by a finite-state automaton. By Kleene's theorem, a subset W of S* is a regular event if and only if it can be constructed from the finite- word sets by boolean operations together with concatenation and *- operation. In some sense, the regular events are quite simple because they are accepted by a machine with no storage capacity. Nevertheless, in recent years, much attention has been paid to special subclasses of the class of regular events; in this paper, we shall be concerned with star-free events, events of dot-depth one and piecewise testable events. Star-free events are constructed like regular events from the finite-word sets but with the restriction that the *-operation is not allowed; .events of dot-depth one and piecewise testable events are star free of a very simple form and will be defined below; star-free events have been characterized in the work of Schiitzenberger (1965) in terms of their syntactic monoid; algebraic characterizations of the other two classes have been given (Simon, 1975; Knast, 1983). From an algorithmic point of view, these algebraic characterizations do not yield efficient procedures because computing the syntactic monoid of a regular event given, e.g., by an automaton is obviously time consuming. In this paper, we investigate the complexity of three problems which we now describe in the style of (Garey and Johnson, 1979).
    [Show full text]
  • Warren Goldfarb, Notes on Metamathematics
    Notes on Metamathematics Warren Goldfarb W.B. Pearson Professor of Modern Mathematics and Mathematical Logic Department of Philosophy Harvard University DRAFT: January 1, 2018 In Memory of Burton Dreben (1927{1999), whose spirited teaching on G¨odeliantopics provided the original inspiration for these Notes. Contents 1 Axiomatics 1 1.1 Formal languages . 1 1.2 Axioms and rules of inference . 5 1.3 Natural numbers: the successor function . 9 1.4 General notions . 13 1.5 Peano Arithmetic. 15 1.6 Basic laws of arithmetic . 18 2 G¨odel'sProof 23 2.1 G¨odelnumbering . 23 2.2 Primitive recursive functions and relations . 25 2.3 Arithmetization of syntax . 30 2.4 Numeralwise representability . 35 2.5 Proof of incompleteness . 37 2.6 `I am not derivable' . 40 3 Formalized Metamathematics 43 3.1 The Fixed Point Lemma . 43 3.2 G¨odel'sSecond Incompleteness Theorem . 47 3.3 The First Incompleteness Theorem Sharpened . 52 3.4 L¨ob'sTheorem . 55 4 Formalizing Primitive Recursion 59 4.1 ∆0,Σ1, and Π1 formulas . 59 4.2 Σ1-completeness and Σ1-soundness . 61 4.3 Proof of Representability . 63 3 5 Formalized Semantics 69 5.1 Tarski's Theorem . 69 5.2 Defining truth for LPA .......................... 72 5.3 Uses of the truth-definition . 74 5.4 Second-order Arithmetic . 76 5.5 Partial truth predicates . 79 5.6 Truth for other languages . 81 6 Computability 85 6.1 Computability . 85 6.2 Recursive and partial recursive functions . 87 6.3 The Normal Form Theorem and the Halting Problem . 91 6.4 Turing Machines .
    [Show full text]
  • Finite-State Automata and Algorithms
    Finite-State Automata and Algorithms Bernd Kiefer, [email protected] Many thanks to Anette Frank for the slides MSc. Computational Linguistics Course, SS 2009 Overview . Finite-state automata (FSA) – What for? – Recap: Chomsky hierarchy of grammars and languages – FSA, regular languages and regular expressions – Appropriate problem classes and applications . Finite-state automata and algorithms – Regular expressions and FSA – Deterministic (DFSA) vs. non-deterministic (NFSA) finite-state automata – Determinization: from NFSA to DFSA – Minimization of DFSA . Extensions: finite-state transducers and FST operations Finite-state automata: What for? Chomsky Hierarchy of Hierarchy of Grammars and Languages Automata . Regular languages . Regular PS grammar (Type-3) Finite-state automata . Context-free languages . Context-free PS grammar (Type-2) Push-down automata . Context-sensitive languages . Tree adjoining grammars (Type-1) Linear bounded automata . Type-0 languages . General PS grammars Turing machine computationally more complex less efficient Finite-state automata model regular languages Regular describe/specify expressions describe/specify Finite describe/specify Regular automata recognize languages executable! Finite-state MACHINE Finite-state automata model regular languages Regular describe/specify expressions describe/specify Regular Finite describe/specify Regular grammars automata recognize/generate languages executable! executable! • properties of regular languages • appropriate problem classes Finite-state • algorithms for FSA MACHINE Languages, formal languages and grammars . Alphabet Σ : finite set of symbols Σ . String : sequence x1 ... xn of symbols xi from the alphabet – Special case: empty string ε . Language over Σ : the set of strings that can be generated from Σ – Sigma star Σ* : set of all possible strings over the alphabet Σ Σ = {a, b} Σ* = {ε, a, b, aa, ab, ba, bb, aaa, aab, ...} – Sigma plus Σ+ : Σ+ = Σ* -{ε} Strings – Special languages: ∅ = {} (empty language) ≠ {ε} (language of empty string) .
    [Show full text]
  • Mathematics 1
    Mathematics 1 MATH 1109. Math for Business: Calculus. (3 Credits) MATHEMATICS This course provides business majors with an introduction to differential and integral calculus. Topics include differentiation, integration, and their applications, in particular derivatives of polynomials, rational, exponential Courses and logarithmic functions; curve sketching, optimization problems; Our Courses and the definite integral. Applications are drawn from business and economics. This course is open only to students in the Gabelli School of MATH 1000. Precalculus. (3 Credits) Business. In this course, students will be introduced to a rigorous treatment of the mathematics necessary to succeed in calculus. Topics include intervals, MATH 1198. Honors Business Math. (4 Credits) equations, inequalities, functions, operations on functions, inverse Topics covered in this course include elements of multivariable calculus, functions, graphing polynomial functions, exponential and logarithmic solutions of systems of linear equations, discrete and continuous functions, trigonometric functions, and identities. This course does not probability, and applications to business. Note: Four-credit courses that fulfill the mathematical/computational reasoning core requirement. meet for 150 minutes per week require three additional hours of class preparation per week on the part of the student in lieu of an additional MATH 1001. Math for Business: Precalculus. (3 Credits) hour of formal instruction. This course is designed to prepare students in the Gabelli School of Business for Math for Business: Calculus. Topics include inequalities; MATH 1200. Topics in Finite Mathematics. (1 Credit) linear, polynomial, rational, exponential, logarithm and inverse functions This course covers basic concepts of finite mathematics: counting and their graphs; distance, lengths, and area of simple regions. This techniques including Venn diagrams, permutations, combinations, course does not satisfy the mathematical/computation reasoning core probability, and Bayes' theorem.
    [Show full text]
  • Kac–Moody Superalgebras and Integrability
    Kac–Moody superalgebras and integrability Vera Serganova Dept. of Mathematics, University of California at Berkeley, Berkeley, CA 94720 [email protected] Summary. The first part of this paper is a review and systematization of known results on (infinite-dimensional) contragredient Lie superalgebras and their repre- sentations. In the second part, we obtain character formulae for integrable highest weight representations of sl (1|n) and osp (2|2n); these formulae were conjectured by Kac–Wakimoto. Keywords: Kac–Moody superalgebras, affine superalgebras, Cartan matrices, in- tegrable representations, character formulae. MSC 2000: Primary 17B67; Secondary 17B20. 1 Introduction The principal goal of this paper is to study a special class of Lie superalgebras which, in our opinion, plays the same role in the theory of Lie superalgebras as the Kac–Moody Lie algebras play in the theory of Lie algebras. Since the terminology is not completely uniform even in the case of Lie algebras, we start with brief discussion of this case. Given an arbitrary matrix A, one can define a contragredient Lie algebra g (A) by generators and relations (see [2] or Section 2 for precise definition). People are usually interested in the subclass of so called Kac–Moody Lie alge- bras; by definition those are contragredient Lie algebras whose matrices satisfy the conditions: aii = 2, aij ∈ Z≤0, and aij = 0 implies aji = 0. The main pro- perty which distinguishes Kac–Moody Lie algebras among all contragredient Lie algebras is the local nilpotency of generators in the adjoint representation. That allows one to define the Weyl group and the notion of an integrable repre- sentation whose character has a large group of symmetries.
    [Show full text]