truth tables

Download Report

Transcript truth tables

3
Logic
The Study of What’s True
or False or Somewhere in
Between
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 1
3.2 Truth Tables
• Learn the truth tables for the five
fundamental connectives
• Compute truth tables for
compound statements
(continued on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 2
3.2 Truth Tables
• Determine when statements are
logically equivalent
• State and apply DeMorgan’s
laws.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 3
Truth Tables
• We want to know if a pair of similar
statements such as  p  q  and p  q
mean the same thing.
• We use truth tables to determine when
compound statements are true and when
they are false, and whether a pair of
statements have the same meaning.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 4
Truth Tables
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 5
Truth Tables
• If p is true, then ~p is false.
• If p is false, then ~p is true.
(example on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 6
Truth Tables
• Example:
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 7
Truth Tables
• A conjunction is true only when both of its
components are true.
(example on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 8
Truth Tables
• Example:
(solution on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 9
Truth Tables
• Example:
(solution on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 10
Truth Tables
• Solution:
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 11
Truth Tables
• A disjunction is false only when both p and
q are false.
(example on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 12
Truth Tables
• Example:
(solution on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 13
Truth Tables
• Solution:
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 14
Truth Tables
• Because of their similar structures, there
are parallels that occur in logic and set
theory.
Often if a result is true for set theory, then a similar
result also holds for logic (and vice versa).
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 15
Compound Statements
• We use truth tables to find the logical
values of complex statements.
• Example: Compute a truth table for

p  q    p  q .
(solution on next 3 slides)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 16
Compound Statements

p  q    p  q .
(solution continued on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 17
Compound Statements

p  q    p  q .
(solution continued on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 18
Compound Statements

p  q    p  q .
If p is false and q is true, line 3 tells us that 
is false.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
p  q   p  q
Section 3.2, Slide 19
Compound Statements
• Definition: If the final column of a truth
table contains all T’s, then the statement is
always true. Such a statement is called a
tautology.
• Example: “This contestant will win or will
not win.”
p
T
p
F
F
T
 p
p
T
T
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 20
Compound Statements
How many lines should your truth table
have?
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 21
Logically Equivalent Statements
• Logically equivalent statements express
the same meaning.
(example on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 22
Logically Equivalent Statements
• Example:
a)
 pd
b)  p    d 
(solution on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 23
Logically Equivalent Statements
• Solution:
a)
 pd
b)  p    d 
The two statements are logically equivalent.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 24
DeMorgan’s Laws
(example on next slide)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 25
DeMorgan’s Laws
• Example:
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 26
DeMorgan’s Laws
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 27
Truth Tables: Alternative Method
For

p  q   p  q :
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 3.2, Slide 28