Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 4: Logical Formulas

David Evans
September 01, 2016

Class 4: Logical Formulas

cs2102: Discrete Mathematics
University of Virginia, Fall 2016

See course site for notes:
https://uvacs2102.github.io

David Evans

September 01, 2016
Tweet

More Decks by David Evans

Other Decks in Programming

Transcript

  1. Odd Summation. Prove that for all n > 0, the

    sum of the first n odd numbers is n2.
  2. Odd Summation. Prove that for all n > 0, the

    sum of the first n odd numbers is n2. (from Class 3)
  3. Odd Summation. Prove that for all n > 0, the

    sum of the first n odd numbers is n2.
  4. Odd Summation. Prove that for all n > 0, the

    sum of the first n odd numbers is n2.
  5. One-Input Boolean Operations P NOT(P) IDENT(P) TAUT(P) FALSE(P) T F

    T T F F T F T F How many do we need to produce all of them?
  6. P NOT(P) IDENT(P) TAUT(P) FALSE(P) T F T T F

    F T F T F Can we compute anything interesting with one-input Boolean operators?
  7. Two-Input Operators P Q AND(P, Q) OR(P, Q) P IMPLIES

    Q P IFF Q XOR(P, Q) T T T T T F F T F T F T F F F F
  8. Two-Input Operators P Q AND(P, Q) OR(P, Q) P IMPLIES

    Q P IFF Q XOR(P, Q) T T T T T T F T F F T F F T F T F T T F T F F F F T T F
  9. Two-Input Operators P Q AND(P, Q) OR(P, Q) P IMPLIES

    Q P IFF Q XOR(P, Q) T T T T T T F T F F T F F T F T F T T F T F F F F T T F How many two-input Boolean operators are there?
  10. P Q AND IFF XOR OR IMPLIES T T T

    T F F F T T T F F F T T T F F T F T F T F F T F F T T F T T F T F F T T F F T F F T F T F T T F T T F F F T F F F T F F T F T T F T T T F How many of these do we actually need?
  11. Slack “quiz”: who of these knew De Morgan’s laws? George

    Boole Ada, Countess of Lovelace Thomas Jefferson Grace Hopper William of Ockham
  12. Slack “quiz”: who of these knew De Morgan’s laws? [Formal

    Logic, 1847] George Boole (1815-1864) Ada Lovelace (1815-1852) Thomas Jefferson (1743-1826) Grace Hopper (1906-1992) William of Ockham (1285-1346)
  13. An Investigation of the Laws of Thought on Which are

    Founded the Mathematical Theories of Logic and Probabilities (1854)
  14. Completeness of Two-Input Operators Is there something special about AND

    and OR? Can we find an equivalence to AND that only uses NOT and XOR?
  15. P Q AND XOR T T T F T F

    F T F T F T F F F F
  16. P Q AND “FFTF” T T T F T F

    F F F T F T F F F F
  17. P Q AND “FFTF” IFF XOR OR IMPLIES T T

    T T F F F T T T F F F T T T F F T F T F T F F T F F T T F T T F T F F T T F F T F F T F T F T T F T T F F F T F F F T F F T F T T F T T T F
  18. Definitions A formula is valid if there is no way

    to make it false. A formula is satisfiable if there is some way to make it true.
  19. A formula is valid if there is no way to

    make it false. A formula is satisfiable if there is some way to make it true.
  20. A formula is valid if there is no way to

    make it false. A formula is satisfiable if there is some way to make it true.
  21. A formula is valid if there is no way to

    make it false. A formula is satisfiable if there is some way to make it true.
  22. Charge • If you need to enroll in the class,

    bring me a course action form to sign • Due Friday (6:29pm): PS1 • Finish reading MCS Ch 3 next week