Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Is denoted by p q or p iff q
: which is read if and only if
p q (p q) ^ (q p)
Example:
y : I go to school everyday.
q : I score A
yq
I go to school everyday if and only if I score A
12
13
Eg 4:Implication(if p then q)
p: Combinatorics is a required course for sophomores.
q: Susanna wrote Discrete Mathematics book.
p q: If Combinatorics is a required course for sophomores
then Susanna wrote Discrete Mathematics book.
Note: p is the hypothesis of the implication.
Note: q is the conclusion.
14
15
16
(t u) s :
17
(u t) s :
18
t ( u s) :
19
(s (u t)) :
20
21
23
Ans:
a.
qr
b. p q
c. p (q r)
24
25
26
qp
p q is q p
The inverse of p q is
pq
27
28
Precedence
2
3
4
5
29
1
30
p^q
q v r
p ^ q q v r
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
0
0
1
1
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
0
1
31
32
p p
p p
33
pvq
p (p v q)
p ^ q
p ^ ( p ^ q)
34
35
pq
pq
T
T
F
F
T
F
T
F
F
F
T
T
T
F
T
T
T
F
T
T
36
0
0
0
0
0
1
qr
p(qr) pq pr
(pq)(pr)
37
Exercise
1. Verify that [p (q r)] [(p q) (p r)] is a
tautology.
2. Show that (p (p q)) and p q are logically
equivalent.
3. Show that (p q) (p q) is a tautology.
38
39
p
0
0
1
1
q
0
1
0
1
p
1
1
0
0
p q
1
1
0
1
pq
1
1
0
1
s1 s2
40
( p q ) p q
( p q ) p q
Note: p and q can be any compound statements.
Augustus De Morgan
1806-1871
41
Demorgan's Laws
Commutative Laws
Associative Laws
42
Distributive Law
p ( q r ) ( p q) ( p r )
( 6) p p p , p p p
( 7 ) p F0 p , p T0 p
( 8) p p T0 , p p F0
( 9 ) p T0 T0 , P F0 F0
Idempotent Law
Identity Law
Inverse Law
Domination Law
43
[( p q ) r ] [ ( p q ) r ]
[( p q ) r ] ( p q ) r
( p q ) r
44
contrapositive of
p
0
0
1
1
pq
q p q q p q p p q
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
converse
inverse
45
47
48
( p1 p 2 p 3 ) q
p1: p r , p 2 : q p , p 3 : r
( p1 p 2 p 3 ) q
[( p r ) ( q p ) r ] q
which is a tautology,
the original argument
is true
49
pq
p q means p q is a tautology.
p q means p q is a tautology.
50
2.
Construct a truth table showing the truth values of all the premises
and the conclusion.
3.
52
qr
pr
pq
qpr
pr
T
F
T
T
F
F
T
T
T
F
T
F
T
T
T
T
r
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
F
T
F
T
F
T
F
T
T
T
F
T
T
T
F
T
T
F
T
F
F
F
F
F
T
T
F
T
T
T
T
T
premises
conclusion
53
p
qr
q (p q
p r) ( q
r
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
T
T
F
T
T
T
T
T
T
F
T
T
F
F
T
T
( p r)
(p q r) ( q p r)
( p r)
T
F
T
F
T
T
T
T
T
T
T
F
T
T
T
T
p r)
T
F
F
T
F
F
T
T
54
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
qr pqr
T
T
T
F
T
T
T
F
T
T
T
T
T
T
T
F
premises
pq
F
T
F
T
F
T
F
T
T
T
T
T
T
T
F
F
conclusion
55
r pq
r
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
T
T
T
T
T
T
T
F
pq
(p q r) ( r) ( p q)
F
T
F
T
F
T
F
T
T
T
T
T
T
T
F
F
T
T
T
T
T
T
T
T
56
[ p ( p q )] q
p
pq
q
57
pq
T
T
F
F
T
F
T
F
T
F
T
T
T
T
F
F
T
F
T
F
premises
[ p ( p q )] q
p
pq
q
conclusion
58
[ p ( p q )] q
p
pq
q
59
[( p q ) q ] p
pq
q
p
60
pq
q
p
61
62
63
64
[( p q ) ( q r )] ( p r )
pq
qr
pr
Eg:
p
p q
q r
r
66
p
p q
q r
r
Steps:
Reasons
1) p q
Premise
2) q r
Premise
3) p r
4) p
Premise
5) r
p
p q
q r
r
Steps:
Reasons
1) p
Premise
2) p q
Premise
3) q
4) q r
Premise
5) r
pr
rs
t s
t u
ps
s t
tu
pu
s u
p
u
p
69
pr
rs
t s
t u
u
p
ps
p
s
t
70
Ex : Rule of Conjunction
p
q
pq
Ex : Rule of Disjunctive Syllogism
pq
p
q
71
q (r s)
r ( t u)
pt
u
72
Steps
Reason
1) p q
Premise
2) q (r s)
Premise
3) p (r s)
4) p t
Premise
5) p
6) r s
7) r
8) r ( t u) Premise
9) ( r t) u Step 8, the associative Law of , De Morgans Law
10) t
11) r t
12) u
73
Steps
Reason
1) r t
Premise
2) t
Premise
3) r
4) r s
5) (r s)
6) ( p q) (r s)
Premise
7) ( p q)
8) p q
9) p
2.5:
2.6:Quantified
QuantifiedStatements
Statements
The Use of Quantifiers
notations:
q(x,y): The numbers y+2, x-y, and x+2y are even integers.
p(5): FALSE, p( 7) : TRUE, q(4,2): TRUE
p(6): TRUE, p( 8) : FALSE, q(3,4): FALSE
Therefore,
For some x, p(x) is true.
For some x, p( x) is true.
For some x,y, q(x,y) is true.
For some x,y, q( x, y) is true.
77
x, p( x) is either
true or false.
78
x(sin 2 x cos 2 x 1)
80
81
s( x): x 2 9
82
Note this!
83
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
[xp ( x)] xp ( x)
84
p(x): x is odd.
q(x): x2-1 is even.
Negate
x[ p( x) q( x)]
xyp ( x, y) yxp ( x, y)
xyp ( x, y) yxp ( x, y)
86
88
89