1. Trang chủ
  2. » Giáo án - Bài giảng

Discrrete mathematics for computer science propositional logic

10 42 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 861 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Propositional Logic• A proposition is a statement that is either true or false.. • We give propositions names such as p, q, and r... • Building propositions from propositions• “And” • S

Trang 1

Propositional Logic

Trang 2

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.

Trang 3

Truth Tables

03/22/19

3

Trang 4

• Building propositions from propositions

• “And”

• So “pigs have wings and Obama is US president” …

03/22/19

4

Logical Operators/Connectives

Trang 5

• “Or”

• 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

5

Logical Operators/Connectives

Trang 6

 “Exclusive or”

03/22/19

6

Logical Operators/Connectives

Trang 7

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

Trang 8

Propositional Logic

03/22/19

¬(p q) ∧

8

Trang 9

p q or p→q or p q⇒ ⊃

is equivalent to

¬p q∨

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

9

Trang 10

“Iff” or logical equivalence

• p q means that p and q have the same truth value

• Equivalent to (p q) (q p)

03/22/19

12

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

TỪ KHÓA LIÊN QUAN