Discrrete mathematics for computer science propositional logic

10 41 0
Discrrete mathematics for computer science propositional logic

Đang tải... (xem toàn văn)

Thông tin tài liệu

Propositional Logic 03/22/19 Propositional Logic • A proposition is a statement that is either true or false • We give propositions names such as p, q, and r • E.g p = “pigs have wings” • q = “Obama is U.S president” • In this world anyway, p is false and q is true 03/22/19 Truth Tables  “Not” p ¬p T F F T  ¬p is also written p 03/22/19 − Logical Operators/Connectives • Building propositions from propositions • “And” p q p ∧q T T T T F F F T F F F F • So “pigs have wings and Obama is US president” … 03/22/19 • “Or” Logical Operators/Connectives p q p ∨q T T T T F T F T T F F F • So “pigs have wings or Obama is US president” … • “Or” is ambiguous in English but not in Propositional Logic • E.g., “would you like coffee or ice cream?” 03/22/19 Logical Operators/Connectives  “Exclusive or” 03/22/19 p q p⊕q T T F T F T F T T F F F Some expressions can be defined in terms of others  p ⊕ q is equivalent to (p∨q) ∧¬(p∧q)  What does this actually mean?  That the truth value of the formula on the left is the same as the truth value of the formula on the right regardless of the truth values of p and q 03/22/19 Propositional Logic p q p⊕ q pvq p^q ¬(p∧q) (p v q) ^ ¬(p∧q) T T F T T F F T F T T F T T F T T T F T T F F F F F T F 03/22/19 Implies p ⇒q or p→q or p⊃q is equivalent to ¬p∨q p q p⇒q T T T T F F F T T F F T So “If pigs have wings then Obama is US president” is true in this world In fact a false proposition implies any proposition 03/22/19 “Iff” or logical equivalence p q T T p⇔q T T F F F T F F F T • p ⇔ q means that p and q have the same truth value • Equivalent to (p ⇒ q) ∧ (q ⇒ p) 03/22/19 12 ... the truth value of the formula on the left is the same as the truth value of the formula on the right regardless of the truth values of p and q 03/22/19 Propositional Logic p q p⊕ q pvq p^q ¬(p∧q)... US president” … • “Or” is ambiguous in English but not in Propositional Logic • E.g., “would you like coffee or ice cream?” 03/22/19 Logical Operators/Connectives  “Exclusive or” 03/22/19 p.. .Propositional Logic • A proposition is a statement that is either true or false • We give propositions

Ngày đăng: 22/03/2019, 11:48

Từ khóa liên quan

Mục lục

  • Propositional Logic

  • Slide 2

  • Truth Tables

  • Logical Operators/Connectives

  • Slide 5

  • Slide 6

  • Some expressions can be defined in terms of others

  • Slide 8

  • Implies

  • “Iff” or logical equivalence

Tài liệu cùng người dùng

Tài liệu liên quan