Discrete Structures, Logic, and Computability

Similar documents
A R "! I,,, !~ii ii! A ow ' r.-ii ' i ' JA' V5, 9. MiN, ;

Proof Theory for Syntacticians

WSU Five-Year Program Review Self-Study Cover Page

Knowledge-Based - Systems

Language properties and Grammar of Parallel and Series Parallel Languages

A Version Space Approach to Learning Context-free Grammars

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Evolution of Collective Commitment during Teamwork

Enumeration of Context-Free Languages and Related Structures

A General Class of Noncontext Free Grammars Generating Context Free Languages

TABLE OF CONTENTS TABLE OF CONTENTS COVER PAGE HALAMAN PENGESAHAN PERNYATAAN NASKAH SOAL TUGAS AKHIR ACKNOWLEDGEMENT FOREWORD

16 WEEKS STUDY PLAN FOR BS(IT)2 nd Semester

We are strong in research and particularly noted in software engineering, information security and privacy, and humane gaming.

Self Study Report Computer Science

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

GACE Computer Science Assessment Test at a Glance

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

Grammars & Parsing, Part 1:

AQUA: An Ontology-Driven Question Answering System

"f TOPIC =T COMP COMP... OBJ

PH.D. IN COMPUTER SCIENCE PROGRAM (POST M.S.)

CS 598 Natural Language Processing

The Strong Minimalist Thesis and Bounded Optimality

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Compositional Semantics

Probability and Game Theory Course Syllabus

IMPROVING STUDENTS SPEAKING SKILL THROUGH

Some Principles of Automated Natural Language Information Extraction

Radius STEM Readiness TM

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

arxiv: v1 [math.at] 10 Jan 2016

Grade 5 + DIGITAL. EL Strategies. DOK 1-4 RTI Tiers 1-3. Flexible Supplemental K-8 ELA & Math Online & Print

Guide to Teaching Computer Science

Dublin City Schools Mathematics Graded Course of Study GRADE 4

B.S/M.A in Mathematics

Lecture Notes on Mathematical Olympiad Courses

Mathematics. Mathematics

Version Space. Term 2012/2013 LSI - FIB. Javier Béjar cbea (LSI - FIB) Version Space Term 2012/ / 18

University of Groningen. Systemen, planning, netwerken Bosman, Aart

CS 101 Computer Science I Fall Instructor Muller. Syllabus

Parsing of part-of-speech tagged Assamese Texts

THE ANTINOMY OF THE VARIABLE: A TARSKIAN RESOLUTION Bryan Pickel and Brian Rabern University of Edinburgh

Pre-Processing MRSes

Chapter 2 Rule Learning in a Nutshell

Lecture 10: Reinforcement Learning

Section I: The Nature of Inquiry

Natural Language Processing. George Konidaris

Computer Science (CS)

Lecture 1: Basic Concepts of Machine Learning

Developing a TT-MCTAG for German with an RCG-based Parser

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

THE UNIVERSITY OF SYDNEY Semester 2, Information Sheet for MATH2068/2988 Number Theory and Cryptography

Python Machine Learning

On-Line Data Analytics

Grade 11 Language Arts (2 Semester Course) CURRICULUM. Course Description ENGLISH 11 (2 Semester Course) Duration: 2 Semesters Prerequisite: None

Erkki Mäkinen State change languages as homomorphic images of Szilard languages

School of Innovative Technologies and Engineering

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

Page 1 of 11. Curriculum Map: Grade 4 Math Course: Math 4 Sub-topic: General. Grade(s): None specified

Inleiding Taalkunde. Docent: Paola Monachesi. Blok 4, 2001/ Syntax 2. 2 Phrases and constituent structure 2. 3 A minigrammar of Italian 3

Developing Grammar in Context

Spring 2016 Stony Brook University Instructor: Dr. Paul Fodor

Artificial Neural Networks written examination

IT Students Workshop within Strategic Partnership of Leibniz University and Peter the Great St. Petersburg Polytechnic University

Math Techniques of Calculus I Penn State University Summer Session 2017

AP Calculus AB. Nevada Academic Standards that are assessable at the local level only.

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Designing a Computer to Play Nim: A Mini-Capstone Project in Digital Design I

Mathematics Assessment Plan

ABSTRACT. A major goal of human genetics is the discovery and validation of genetic polymorphisms

Extending Place Value with Whole Numbers to 1,000,000

Action Models and their Induction

Discriminative Learning of Beam-Search Heuristics for Planning

(Sub)Gradient Descent

Lecture 1: Machine Learning Basics

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

TOPICS LEARNING OUTCOMES ACTIVITES ASSESSMENT Numbers and the number system

JEFFERSON COLLEGE COURSE SYLLABUS BUS 261 BUSINESS COMMUNICATIONS. 3 Credit Hours. Prepared by: Cindy Rossi January 25, 2014

Liquid Narrative Group Technical Report Number

BENG Simulation Modeling of Biological Systems. BENG 5613 Syllabus: Page 1 of 9. SPECIAL NOTE No. 1:

MINISTRY OF EDUCATION

Background Information. Instructions. Problem Statement. HOMEWORK INSTRUCTIONS Homework #3 Higher Education Salary Problem

An Introduction to the Minimalist Program

Constraining X-Bar: Theta Theory

BEST OFFICIAL WORLD SCHOOLS DEBATE RULES

Accounting 380K.6 Accounting and Control in Nonprofit Organizations (#02705) Spring 2013 Professors Michael H. Granof and Gretchen Charrier

COSI Meet the Majors Fall 17. Prof. Mitch Cherniack Undergraduate Advising Head (UAH), COSI Fall '17: Instructor COSI 29a

On the Polynomial Degree of Minterm-Cyclic Functions

Math-U-See Correlation with the Common Core State Standards for Mathematical Content for Third Grade

Latin I (LA 4923) August 23-Dec 17, 2014 Michal A. Isbell. Course Description, Policies, and Syllabus

Statewide Framework Document for:

TabletClass Math Geometry Course Guidebook

GRAMMAR IN CONTEXT 2 PDF

Rule Learning With Negation: Issues Regarding Effectiveness

systems have been developed that are well-suited to phenomena in but is properly contained in the indexed languages. We give a

Montana Content Standards for Mathematics Grade 3. Montana Content Standards for Mathematical Practices and Mathematics Content Adopted November 2011

Math 181, Calculus I

Multiple case assignment and the English pseudo-passive *

The Interface between Phrasal and Functional Constraints

CHALLENGES FACING DEVELOPMENT OF STRATEGIC PLANS IN PUBLIC SECONDARY SCHOOLS IN MWINGI CENTRAL DISTRICT, KENYA

Transcription:

Discrete Structures, Logic, and Computability James L. Hein Portland State University Jones and Bartlett Publishers Sudbury, Massachusetts Boston London Singapore

Preface xv / Elementary Notions and Notations 1.1 A Proof Primer 2 Logical Statements 2 Something to Talk About 4 Proof Techniques 5 Exercises 9 1.2 Sets io Operations on Sets 15 Counting Finite Sets 21 Bags (Multisets) 24 Sets Should Not Be Too Complicated Exercises 27 26 1.3 Other Structures 30 Tuples 30 Products of Sets 32 Lists 34 Strings 36 Relations 38 Graphs 41

vi Contents Trees 48 Counting Tuples 52 Exercises 55 Chapter Summary 57 Facts About Functions 59 2.1 Definitions and Examples 60 Terminology 61 Some Useful Functions 65 Partial Functions 74 Exercises 75 2.2 Constructing Functions 77 Composition and Tupling 77 Higher-Order Functions 83 Exercises 88 2.3 Properties of Functions 89 Injective and Surjective 90 The Pigeonhole Principle 93 Hash Functions 94 Exercises 96 2.4 Counting Infinite Sets 98 Countable and Uncountable 99 Exercises 105 Chapter Summary 106 3 Construction Techniques 109 3.1 Inductively Defined Sets 110 Natural Numbers 111 Lists 113 Strings 117 Binary Trees 120 Product Sets 122 Exercises 124

vii 3.2 Language Constructions 126 Combining Languages 128 Grammars and Derivations 130 Grammars and Languages 136 Meaning and Ambiguity 142 Exercises 145 3.3 Recursively Defined Functions and Procedures 146 Natural Numbers 148 Lists 151 Strings 157 Binary Trees 159 The Redundant Element Problem. 162 The Power Set Problem 163 Computing Streams 165 Exercises 169 Chapter Summary Note 172 m 4 Equivalence, Order, and Inductive Proof 173 4.1 Properties and Tools 174 Composition 175 Closures 179 Path Problems 183 Exercises 189 4.2 Equivalence Relations 192 Equivalence and Partitioning 194 Generating Equivalence Relations 200 An Equivalence Problem 205 Exercises 207 4.3 Order Relations 209 Partial Orders 210 Weil-Founded Orders 218 Ordinal Numbers 226 Exercises 227

vin Contents 4.4 Inductive Proof 229 The Idea of Induction 229 Well-Founded Induction 236 Practical Techniques 236 Proofs About Inductively Denned Sets 241 Exercises 243 Chapter Summary 247 5 Analysis Techniques 249 5.1 Optimal Algorithms 250 Decision Trees 253 Exercises 256 5.2 Elementary Counting Techniques 257 Permutations (Order Is Important) 257 Combinations (Order Is Not Important) 261 Finite Probability 265 Exercises 273 5.3 Solving Recurrences 275 Finding Closed Forms for Sums 278 Generating Functions 282 Exercises 293 5.4 Comparing Rates of Growth 296 Big Theta 296 Little Oh 300 Big Oh and Big Omega 301 Exercises 303 Chapter Summary 303 Notes 304 6 Elementary Logic 305 6.1 How Do We Reason? 306 What Is a Calculus? 308 How Can We Tell Whether Something Is a Proof? 308

ix 6.2 Propositional Calculus 309 Well-Formed Formulas and Semantics 310 Equivalence 313 Truth Functions and Normal Forms 318 Complete Sets of Connectives 326 Exercises 327 6.3 Formal Reasoning Systems 329 Conditional Proof 333 Indirect Proof 338 Proof Notes 340 Reasoning Systems for Propositional Calculus 341 Logic Puzzles 345 Exercises 346 Chapter Summary 348 Notes 349 7 Predicate Logic 351 7.1 First-Order Predicate Calculus 351 Well-Formed Formulas 356. Semantics 358 Validity 362 The Validity Problem 365 Exercises 366 7.2 Equivalent Formulas 368 Equivalence 368 Normal Forms 374 Formalizing English Sentences 378 Summary 380 Exercises 381 7.3 Formal Proofs in Predicate Calculus 382 Universal Instantiation (UI) 383 Existential Instantiation (El) 385 Universal Generalization (UG) 387 Existential Generalization (EG) 392 Examples of Formal Proofs 394 Summary 400 Exercises 401

Chapter Summary 403 Notes 404 8 Applied Logic 405 8.1 Equality 406 Describing Equality 406 Extending Equals for Equals 412 Exercises 413 8.2 Program Correctness 414 Imperative Program Correctness 414 Arrays 426 Termination 430 Note 433 Exercises 434 8.3 Higher-Order Logics 437 Classifying Higher-Order Logics 438 Semantics 442 Higher-Order Reasoning 443 Exercises 445 Chapter Summary 446 9 Computational Logic 449 9.1 A Family Tree 450 Exercises 454 9.2 Automatic Reasoning 454 Clauses and Clausal Forms 455 A Primer of Resolution for Propositions 461 Substitution and Unification 462 Resolution: The General Case 467 Theorem Proving with Resolution 473 Remarks 475 Exercises 476

xi 9.3 Logic Programming 478 Resolution and Logic Programming 480 Logic Programming Techniques 493 Exercises 498 Chapter Summary 500 10 Algebraic Structures and Techniques 501 10.1 What Is an Algebra? 502 The Description Problem 502 High School Algebra 503 Definition of an Algebra 504 Working in Algebras 510 Exercises 515 10.2 Boolean Algebra 516 Simplifying Boolean Expressions 518 Digital Circuits 522 Summary of Properties 527 Exercises 528 10.3 Abstract Data Types as Algebras 529 Natural Numbers 530 Lists and Strings 534 Stacks and Queues 537 Binary Trees and Priority Queues 541 Exercises 543 10.4 Computational Algebras 545 Relational Algebras 546 Process Algebras 548 Functional Algebras 550 Exercises 556 10.5 Other Algebraic Ideas 557 Congruences 557 New Algebras from Old Algebras 562 Morphisms 564 Exercises 571 Chapter Summary 572

xii Contents 11 Regular Languages and Finite Automata 575 11.1 Regular Languages 576 Regular Expressions Exercises 583 577 11.2 Finite Automata 584 Deterministic Finite Automata 585 Nondeterministic Finite Automata 588 Transforming Regular Expressions into Finite Automata 590 Transforming Finite Automata into Regular Expressions Finite Automata as Output Devices 597 592 Representing and Executing Finite Automata 600 Exercises 607 11.3 Constructing Efficient Finite Automata 609 Another Regular Expression to NFA Algorithm 609 Transforming an NFA into a DFA 612 Minimum-State DFAs 617 Exercises 624 11.4 Regular Language Topics 626 Regular Grammars 626 Properties of Regular Languages 631 Exercises 635 Chapter Summary 637 12 Context-Free Languages and Pushdown Automata 639 12.1 Context-Free Languages 640 Exercises 642 12.2 Pushdown Automata 642 Equivalent Forms of Acceptance 645 Context-Free Grammars and Pushdown Automata 649 Representing and Executing Pushdown Automata 655 Exercises 657

xiii 12.3 Parsing Techniques 659 LL(k) Parsing 659 LR(k) Parsing 672 Exercises 684 12.4 Context-Free Language Topics 685 Exercises 694 Chapter Summary 694 13 Turing Machines and Equivalent Models 697 13.1 Turing Machines 698 Turing Machines with Output 701 Alternative Definitions 703 A Universal Turing Machine 708 Exercises 711 13.2 The Church-Turing Thesis 712 Equivalence of Computational Models 713 A Simple Programming Language 716 Partial Recursive Functions 717 Machines That Transform Strings 724 Logic Programming Languages 730 Some Notes 732 Exercises 732 Chapter Summary 734 14 Computational Notions 735 14.1 Computability 735 Effective Enumerations 736 The Halting Problem 739 The Total Problem 741 Other Problems 743 Exercises 746 14.2 A Hierarchy of Languages 747 The Languages 747 Summary 750 Exercises 751

xiv Contents 14.3 Evaluation of Expressions 751 Lambda Calculus 754 Knuth-Bendix Completion 766 Exercises 772 Chapter Summary 774 Answers to Selected Exercises 777 Bibliography 845 Greek Alphabet 850 Symbol Glossary 851 Index 855