Advertisement
Guest User

Untitled

a guest
May 7th, 2021
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.97 KB | None | 0 0
  1. 0 PRELIMINARIES
  2. 0.1 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
  3. 0.2 Ordered pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
  4. 0.3 Cartesian product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  5. 0.4 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
  6. 0.5 Important types of binary relations . . . . . . . . . . . . . . . . . . . . . . . . 7
  7. 0.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  8. 0.7 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  9. 0.8 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  10.  
  11. 1 INDUCTION 17
  12. 1.1 Fundamental properties of the natural numbers . . . . . . . . . . . . . . . . . 17
  13. 1.2 Mathematical induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
  14. 1.3 Complete induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
  15.  
  16. 2 CORRECTNESS OF ITERATIVE AND RECURSIVE PROGRAMS 47
  17. 2.1 Program correctness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
  18. 2.2 Specification through preconditions and postconditions . . . . . . . . . . . . . 47
  19. 2.3 Correctness of binary search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
  20. 2.4 The correctness of a multiplication program . . . . . . . . . . . . . . . . . . . 54
  21. 2.5 A more interesting proof of termination . . . . . . . . . . . . . . . . . . . . . . 58
  22. 2.6 Comments on proving the correctness of iterative programs . . . . . . . . . . . 60
  23. 2.7 Proof of correctness of recursive programs . . . . . . . . . . . . . . . . . . . . 62
  24. 2.8 Correctness of a recursive sorting program . . . . . . . . . . . . . . . . . . . . 66
  25.  
  26. 3 FUNCTIONS DEFINED BY INDUCTION 75
  27. 3.1 Recursively defined functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
  28. 3.2 Divide-and-conquer recurrences . . . . . . . . . . . . . . . . . . . . . . . . . . 81
  29. 3.3 Another recurrence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
  30.  
  31. 4 SETS DEFINED BY INDUCTION AND STRUCTURAL INDUCTION 97
  32. 4.1 Defining sets recursively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
  33. 4.2 Structural induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
  34. 4.3 An alternative to structural induction proofs . . . . . . . . . . . . . . . . . . . 103
  35. 4.4 Elements of recursively defined sets as trees . . . . . . . . . . . . . . . . . . . 104
  36. 4.5 Inductive definition of binary trees . . . . . . . . . . . . . . . . . . . . . . . . 105
  37.  
  38. 5 PROPOSITIONAL LOGIC 111
  39. 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
  40. 5.2 Formalising propositional reasoning . . . . . . . . . . . . . . . . . . . . . . . . 112
  41. 5.3 Truth tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
  42. 5.4 Tautologies and satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
  43. 5.5 Logical implication and logical equivalence . . . . . . . . . . . . . . . . . . . . 120
  44. 5.6 Some important logical equivalences . . . . . . . . . . . . . . . . . . . . . . . . 122
  45. 5.7 Conditional statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
  46. 5.8 Analysis of three proof techniques . . . . . . . . . . . . . . . . . . . . . . . . . 124
  47. 5.9 Normal forms for propositional formulas . . . . . . . . . . . . . . . . . . . . . 128
  48. 5.10 Boolean functions and the design of digital circuits . . . . . . . . . . . . . . . 131
  49. 5.11 Complete sets of connectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
  50.  
  51. 6 PREDICATE LOGIC 143
  52. 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
  53. 6.2 The syntax of predicate logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
  54. 6.3 Semantics of predicate logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
  55. 6.4 Validity and satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
  56. 6.5 Logical implication and logical equivalence . . . . . . . . . . . . . . . . . . . . 156
  57. 6.6 Some important logical equivalences . . . . . . . . . . . . . . . . . . . . . . . . 157
  58. 6.7 Predicate logic and relational databases . . . . . . . . . . . . . . . . . . . . . . 161
  59. 6.8 Logical implication revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
  60. 6.9 Prenex normal form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
  61. 6.10 Order of quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
  62. 6.11 Reference and its effect on meaning . . . . . . . . . . . . . . . . . . . . . . . . 175
  63.  
  64. 7 FINITE STATE AUTOMATA AND REGULAR EXPRESSIONS 183
  65. 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
  66. 7.2 Regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
  67. 7.3 Deterministic finite state automata . . . . . . . . . . . . . . . . . . . . . . . . 199
  68. 7.4 Nondeterministic finite state automata . . . . . . . . . . . . . . . . . . . . . . 211
  69. 7.5 Closure properties of FSA-accepted languages . . . . . . . . . . . . . . . . . . 222
  70. 7.6 Equivalence of regular expressions and FSA . . . . . . . . . . . . . . . . . . . 225
  71. 7.7 Proving nonregularity: the Pumping Lemma . . . . . . . . . . . . . . . . . . . 234
  72.  
  73. 8 CONTEXT-FREE GRAMMARS AND PUSHDOWN AUTOMATA 241
  74. 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
  75. 8.2 Context-free grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
  76. 8.3 CFG are more powerful than regular expressions . . . . . . . . . . . . . . . . . 246
  77. 8.4 Right-linear grammars and regular languages . . . . . . . . . . . . . . . . . . . 247
  78. 8.5 Pushdown automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
  79. 8.6 Equivalence of CFG and PDA . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement