quanüfied Statements; valid well-formed formulas; comparison of propositional and predicate wffs. Exercises

Similar documents
MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

DISCRETE MATHEMATICS

r=1 The Binomial Theorem. 4 MA095/98G Revision

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

LOGIC AND DISCRETE MATHEMATICS

Fundamentals of Discrete Mathematical Structures

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Fall

Introductory Combinatorics

CONTENTS Equivalence Classes Partition Intersection of Equivalence Relations Example Example Isomorphis

COURSE: DATA STRUCTURES USING C & C++ CODE: 05BMCAR17161 CREDITS: 05

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5.

Summary of Course Coverage

Discrete Mathematics SECOND EDITION OXFORD UNIVERSITY PRESS. Norman L. Biggs. Professor of Mathematics London School of Economics University of London

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

A Survey of Mathematics with Applications 8 th Edition, 2009

Notation Index 9 (there exists) Fn-4 8 (for all) Fn-4 3 (such that) Fn-4 B n (Bell numbers) CL-25 s ο t (equivalence relation) GT-4 n k (binomial coef

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

Introductory logic and sets for Computer scientists

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest. Introduction to Algorithms

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Introduction to Sets and Logic (MATH 1190)

F falling factorial, 11. father, 139. Ferris wheel, 112. Fibonacci numbers, 34, 36, 224, , 277. finite automaton, deterministic, 191.

M.Sc. (Computer Science) I Year Assignments for May Paper I DATA STRUCTURES Assignment I

4.1.2 Merge Sort Sorting Lower Bound Counting Sort Sorting in Practice Solving Problems by Sorting...

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Computational Discrete Mathematics

Logic and its Applications

Discrete Mathematics Lecture 4. Harper Langston New York University

Boolean Reasoning. The Logic of Boolean Equations. Frank Markham Brown Air Force Institute of Technology

Reference Sheet for CO142.2 Discrete Mathematics II

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

Introduction to Algorithms Third Edition

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

GARDEN CITY UNIVERSITY. Bachelor of Computer Applications SEMESTER- I. Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04

correlated to the Michigan High School Mathematics Content Expectations

Applied Combinatorics

JAVA PROGRAMMING. Unit-3 :Creating Gui Using The Abstract Windowing Toolkit:

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Anany Levitin 3RD EDITION. Arup Kumar Bhattacharjee. mmmmm Analysis of Algorithms. Soumen Mukherjee. Introduction to TllG DCSISFI &

Prentice Hall Mathematics: Geometry 2007 Correlated to: Arizona Academic Standards for Mathematics (Grades 9-12)

1.1 What is an algorithm? Control structures Further examples of algorithms 7 Exercises 11

Elements of Graph Theory

Total No. of Questions : 18] [Total No. of Pages : 02. M.Sc. DEGREE EXAMINATION, DEC First Year COMPUTER SCIENCE.

Propositional Calculus. Math Foundations of Computer Science

Introduction to. Graph Theory. Second Edition. Douglas B. West. University of Illinois Urbana. ftentice iiilil PRENTICE HALL

LOGIC SYNTHESIS AND VERIFICATION ALGORITHMS. Gary D. Hachtel University of Colorado. Fabio Somenzi University of Colorado.

Contents. Chapter 1 SPECIFYING SYNTAX 1

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION

Foundations of Computer Science Spring Mathematical Preliminaries

The Algorithm Design Manual

DESIGN AND ANALYSIS OF ALGORITHMS

CS521 \ Notes for the Final Exam

COURSE STRUCTURE AND SYLLABUS APPROVED IN THE BOARD OF STUDIES MEETING HELD ON JULY TO BE EFFECTIVE FROM THE ACADEMIC YEAR

Mathematics 6 12 Section 26

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

END-TERM EXAMINATION

M.Sc. (Previous) DEGREE EXAMINATION, MAY (Examination at the end of First Year) Computer Science. Paper - I : DATA STRUCTURES

Rizvi College of Arts, Science & Commerce Bandra (W), Mumbai Teaching Plan Academic Year

Introduction III. Graphs. Motivations I. Introduction IV

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties.

The International Olympiad in Informatics Syllabus

COMP 102: Computers and Computing

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

The Course Structure for the MCA Programme

1. Consider the 62-element set X consisting of the twenty-six letters (case sensitive) of the English

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

PITSCO Math Individualized Prescriptive Lessons (IPLs)

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

SYLLABUS. M.Sc. I.T. Ist Year

Chapter 9 Graph Algorithms

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

INSTITUTE OF AERONAUTICAL ENGINEERING

1. [5 points each] True or False. If the question is currently open, write O or Open.

SECONDARY DRAFT SYLLABUS. 2. Representation of functions. 3. Types of functions. 4. Composition of functions (two and three)

Chapter 9 Graph Algorithms

«Computer Science» Requirements for applicants by Innopolis University

Propositional Calculus. Math Foundations of Computer Science

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Precalculus, Quarter 2, Unit 2.1. Trigonometry Graphs. Overview

Example: NFA to DFA Conversion

THEORY OF COMPUTATION

Ph.D. Comprehensive Examination Design and Analysis of Algorithms

Programming Languages Third Edition

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Foundations for Functions Knowledge and Skills: Foundations for Functions Knowledge and Skills:

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

L.J. Institute of Engineering & Technology Semester: VIII (2016)

I BSc(Computer Science)[ ] Semester - II Allied:DISCRETE MATHEMATICS - 207D Multiple Choice Questions.

Chapter 3. Describing Syntax and Semantics

Lecture 1: Examples, connectedness, paths and cycles

CSC Discrete Math I, Spring Sets

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

Topic 10 Part 2 [474 marks]

Discrete mathematics II. - Graphs

Examples of P vs NP: More Problems

Syllabi of the Comprehensive Examination in Computer Science

Contents. 1 Introduction. 2 Searching and Traversal Techniques. Preface... (vii) Acknowledgements... (ix)

Transcription:

Contents Preface xix Note to the Student xxv 1 Formal Logic 1 Chapter Objectives 1 1.1 Statements, Symbolic-Representation, and Tautologies 1 Statements and logical connectives; truth tables; well-formed formulas; tautologies; using tautologies to simplify conditional logic in a Computer program; algorithm to test whether certain well-formed formulas are tautologies. Exercises 1.1 14 1.2 Quantiners, Predicates, and Validity 18 Predicates; universal and existential quantifiers; well-formed formulas; interpretations for predicate well-formed formulas; expressing English sentences as predicate well-formed formulas; negations of

quanüfied Statements; valid well-formed formulas; comparison of propositional and predicate wffs. Exercises 1.2 26 1.3 Propositional Logic 29 Formal Systems; axioms and rule of inference for propositional logic; the deduction method; examples ofproofs in propositional logic; valid arguments. Exercises 1.3 39 1.4 Predicate Logic 41 Axioms and rules of inference for predicate logic; justification ofthe restrictions on generalization; examples ofproofs in predicate logic; valid arguments. Exercises 1.4 47 1.5 Logic Programming and Proof of Correctness 49 Introduction to Prolog; Prolog facts and rules; queries; Hörn clauses and resolution; recursive rules; expert Systems; program verification as proof of correctness or as program testing; program assertions; the assignment axiom; rule of inference for conditional Statements; examples of proof of correctness. Exercises 1.5 67 Chapter 1 Review 70 On the Computer 72 2 Proofs, Recursion, and Analysis of Algorithms 74 Chapter Objectives 74 2.1 Proof Techniques 75 The nature of mathematical theorems and proofs; inductive and deductive reasoning; use of counterexamples; techniques for theorem proving, including direct proof proof by contraposition, proof by exhaustive cases, and proof by contradiction. Exercises 2.1 83 2.2 Induction 85 The principle of mathematical induction; proofs by induction involving series, inequalities, divisibility, and different base Steps;

Contents xi the principle ofcomplete induction; the relation ofinduction to well-ordering; examples of complete induction. Exercises 2.2 96 2.3 Recursion and Recurrence Relations 100 Recursive definitions and how they relate to proofs by induction; recursive definitions for sequences, sets (especially sets ofstrings), Operations, and algorithms; discussion of iterative vs. recursive algorithms; a recursive selection sort algorithm; the binary search algorithm; introduction to recurrence relations; Solution methodfor linear, first-order recurrence relations with constant coefficients. Exercises 2.3 116 2.4 Analysis of Algorithms and More on Proof of Correctness 123 Introduction to analysis of algorithms; analysis of sequential search and binary search algorithms; Solution methodfor a divide-andconquer recurrence relation; review of proof of correctness; rule of inference for loop Statements; use ofinduction to verify loop invariants. Exercises 2.4 133 Chapter 2 Review 139 On the Computer 141 3 Sets and Comblnatorics 144 Chapter Objectives 144 3.1 Sets 145 The notation of set theory; subsets and the power set; binary and unary Operations on a set; set Operations ofunion, intersection, complementation, and Cartesian product; set identities and two ways to prove them; sets in programming languages such as Pascal and SETL; the set abstract data type and possible implementations; inheritance in objeet-oriented programming as subset; demonstrations ofthe denumerability ofsome sets and the use of Cantofs diagonalizaüon method to prove the uncountability Exercises 3.1 168 3.2 Counting 178 Fundamental counting principles, including the Multiplication Principle and the Addition Principle; problems whose Solution com-

bines these principles; problems with multiple Solution approaches; use of the decision tree as a counting tool. Exercises 3.2 186 3.3 Principle of Inclusion and Exclusion and the Pigeonhole Principle 189 Proofs ofthe Principle of Inclusion and Exclusion for the union oftwo or three sets; proofby induction ofthe extension to the union ofany finite number ofsets; the Pigeonhole Principle and examples ofits use. Exercises 3.3 195 3.4 Permutations and Combinations 196 Formulas for counting the number of permutations and combinations of r distinct objects from n distinct objects; using the formulas in conjunction with the Multiplication and the Addition Principles; discussion oferroneous Solutions that count some things more than once; formula for distinct permutations o/n objects that are not all distinct; formulas for permutations and combinations ofx objects out of n distinct objects with repetitions allowed. Exercises 3.4 206 3.5 The Binomial Theorem 211 Presentation of Pascal's triangle; proof of Pascal's formula, both algebraic and combinatorial; the binomial theorem and its proof, both inductive and combinatorial; formula to find a specific term in the binomial expansion; use ofthe binomial theorem in proving identities. Exercises 3.5 216 Chapter 3 Review 218 On the Computer 220 4 Relations, Functions, and Matrices 222 Chapter Objectives 222 4.1 Relations 224 Binary relations as ordered pairs and verbal descriptions; n-ary relations; Operations on binary relations; the reflexive, Symmetrie, transitive, and antisymmetric properties of binary relations; the reflexive, Symmetrie and transitive closures of a binary relation; the

Contents xlli definition of and terminology about partial orderings; graphs of partially ordered finite sets; the definition of equivalence relation and equivalence class; proof that an equivalence relation determines a partition and a partition defines an equivalence relation; examples of treating equivalence classes as objects; use of equivalence classes resulting from congruence modulo n in integer arithmetic on a Computer. Exercises 4.1 241 4.2 Relations and Databases, and Topological Sorting 251 Entity-relationship diagrams as one representation of an enterprise; relational database as another model, whose relations can be obtainedfrom the E-R diagram; perspective of relations in a database as mathematical relations; discussion of primary keys and foreign keys; select, project, andjoin as Operations on relations; formulation ofqueries in relational algebra, SQL, or relational calculus; briefdiscussion ofintegrity rules; PERT charts as representations of partial orderings on task completion; the critical path through a PERT chart; topological sorting to extend finite partial orderings to total orderings. Exercises 4.2 266 4.3 Functions 270 Definition and examples offunctions; why all three parts of the definition are needed to describe the function; programming languages and functions, including a brief look atfunctional languages; properties offunctions one-to-one, onto, bijective; formulas for counting the number offunctions, one-to-one functions, and onto functions from one finite set to another; equivalent sets and set cardinality; function composition; permutation functions, including array notation and cycle notation; composition of cycles; formula for counting the number of derangements on a finite set; inverse functions; order ofmagnitude defined as an equivalence relation on functions; definition ofi = {g)for twofuncdons f and g; graphical Illustration of order of magnitude. Exercises 4.3 298 4.4 Matrices 307 Matrix terminology; Operations of scalar multiplication, addition, subtraction, and multiplication defined; properties ofmatrices under various Operations; zero matrix and identity matrix; analysis of

the Standard algorithmfor matrix multiplication; Boolean matrices; Boolean and and or Operations; Boolean matrix multiplication. Exercises 4.4 315 Chapter 4 Review 318 On the Computer 321 5 Graphs and Trees 324 Chapter Objectives 324 5.1 Graph Terminology and Applications 326 Graph terminology; isomorphic graphs; simple complete graphs and bipartite complete graphs; planar graphs; proof of Euler's formula and other relationships in simple connected planar graphs; example of the applicaüon of Kuratowski's theorem; discussion of the four-color problem and the chromatic number of a graph; proof of the fivecolor theorem; terminology about trees and about directed graphs; some applications represented by graphs. Exercises 5.1 353 5.2 Computer Representations of Graphs 362 Representing a graph by its definition; adjacency matrix representation; adjacency list representation; implementing adjacency lists with array pointers; left child-right child binary tree representation. Exercises 5,2 369 5.3 Directed Graphs and Binary Relations, and Warshall's Algorithm 374 Discussion on the equivalency between a directed graph with no parallel arcs, a Boolean adjacency matrix for the graph, and a binary adjacency relation for the graph; properties of a binary relation reflected in the associated graph and adjacency matrix; matrix Operations to compute the sum and product of binary relations; proof that the Boolean powers of the adjacency matrix indicate the presence ofpaths ofvarious lengths; a formula to compute the reachability matrix R for a graph from successive powers of the adjacency matrix; connection between reachability and transitive closure; analysis of the formula algorithmfor Computing R; Warshall's algorithm for Computing R and its analysis. Exercises 5.3 385

Contents xv 5.4 Decision Trees and Huffman codes 388 Definition ofdecision tree; decision tree representation of sequential search and binary search; worst-case lower bound for searching estabushed hy decision-tree argument; binary tree search; worst-case lower bound for sorting estabushed by decision-tree argument; algorithm for Huffman codes; justification that Huffman codes are optimal. Exercises 5.4 404 Chapter 5 Review 407 On the Computer 409 6 Graph Algorithms 410 Chapter Objectives 410 6.1 Euler Path and Hamiltonian Circuit 412 Definition of an Euler path; Solution to the Euler path problem; analysis of algorithm EulerPath; discussion of the Hamiltonian circuit problem (and the traveling salesman problem) and how they differ from the Euler path problem. Exercises 6.1 418 6.2 Shortest Path and Minimal Spanning Tree 421 Dijkstra's algorithm to solve the shortest-path problem; analysis of the shortest-path algorithm; discussion of Prim's algorithm for finding a minimal spanning tree. Exercises 6.2 429 6.3 Traversal Algorithms 435 Algorithms for depth-first search and breadth-first search; analysis of the search algorithms; trees associated with depth-first search and breadth-first search; applications of depth-first search and breadth-first search reachability, identifying connected components; use of depth-first search in topological sorting; inorder, preorder, and postorder tree traversal algorithms. Exercises 6.3 450 6.4 Articulation Points and Computer Networks 454 Discussion of articulation points and biconnected components in graph for Computer or communication networks; algorithm to detect articulation points in a simple connected graph.

Exercises 6.4 461 Chapter 6 Review 463 On the Computer 465 7 Boolean Algebra and Computer Logic 466 Chapter Objectives 466 7.1 The Boolean Algebra Structure 468 Similarities between propositional logic and set theory; mathematical structures as modeis or abstractions incorporating common properties found in different contexts; definition ofa Boolean algebra; additional properties of a Boolean algebra; discussion of isomorphic structures, in particular, structures with binary Operations; definition of and example of isomorphic Boolean algebras; Statement of the theorem that allfinite Boolean algebras are isomorphic to a power set Boolean algebra. Exercises 7.1 480 7.2 Logic Networks 486 Basic logic elements of AND gate, OR gate, and inverter; definition of Boolean expression and truth function; representation ofa Boolean expression as a combinational network and vice versa; procedure to find a canonical sum-of-products Boolean expression for a given truth function; minimizing Boolean expressions (and networks) using properties of Boolean algebra; programmable logic arrays; a binary adder network; NAND and NOR gates; constructing a truth function to represent a logical control device. Exercises 7.2 505 7.3 Minimization 512 Use of Karnaugh maps to minimize Boolean expressions in sum-ofproducts form and their associated networks; taking advantage of don't-care conditions; use of the Quine-McCluskey procedure to minimize Boolean expressions in sum-of-products form and their associated networks. Exercises 7.3 527 Chapter 7 Review 531 On the Computer 533

Contents xvii 8 Modeling Arithmetic, Computatioa and Languages 534 Chapter Objectives 534 8.1 Algebraic Structures 536 Discussion of the associative, commutative, identity, and inverse properties; definition ofgroup, monoid, and semigroup; simple examplesfrom arithmetic ofnumbers and matrices; more examples from polynomials, modular arithmetic, transformations and permutations, strings; elementary group theorems uniqueness of identity and inverses, cancellation laws, Solution to linear equations; definition ofsubgroup; the alternating group; Lagrange's theorem; definition and examples ofgroup isomorphism; Cayley's theorem. Exercises 8.1 561 8.2 Finite-State Machines 568 Definition of finite-state machine; State tables and State graphs; a binary adder finite-state machine; finite-state machines as set recognizers; regulär sets; Kleene 's theorem; unreachable states; an algorithm for machine minimization. Exercises 8.2 586 8.3 Turing Machines 597 Discussion of the limitations of finite-state machines; definition of Turing machine and some examples; Turing machines usedfor set recognition; Turing machines med to compute functions; discussion ofthe Church Turing Thesis, its justification and consequences; the nature of a decision problem; historical decision problems; Statement of the halting problem; a trivial Variation of the halting problem; proof ofthe unsolvability ofthe halting problem; the Turing machine as a platform for measuring computational complexity; definition ofthe set P and the set NP; brief discussion of N P- completeness. Exercises 8.3 617 8.4 Formal Languages 621 Definition oftype 0 grammar, word generation, and formal language; describing the language generated by a given grammar; formal grammars to generate portions of English and of a programming language; the Chomsky hierarchy of grammars; equivalent grammars for the same language; the relationship between the hierarchy

of formal languages and automata; parsing in context-free languages. Exercises 8.4 635 Chapter 8 Review 638 On the Computer 640 Appendix A Summation Notation 642 Appendix B The Logarithm Function 646 Answers to Practice Problems 651 Answers to Selected Exercises 685 Answers to Self-Tests 741 Index 747