Logical Structures
Logical Structures
STRUCTURES
Discrete Mathematics 1
Discrete Mathematics
is the part of mathematics devoted to the
study of discrete objects
Discrete means consisting of distinct or
unconnected elements.
06/26/12
LOGIC
is the study of reasoning.
is specially concerned with whether
reasoning is correct
focuses on the relationship among
statements as opposed to the content of
any particular statement
06/26/12
PROPOSITION
A proposition is a declarative sentence
that is either true or false, but not both.
Example:
Manila
06/26/12
PROPOSITION
time is it?
Read this carefully.
x + 1 = 2.
x + y = z.
06/26/12
PROPOSITION
An atomic proposition is a proposition
whose truth or falsity is independent of
any other propositions.
A compound proposition is formed from
existing propositions using logical
operators.
06/26/12
PROPOSITION
Conventional letters used to denote
propositions are p, q, r, s,
The truth value of a proposition is true,
denoted by T, if it is true and false,
denoted by F, if it is a false proposition.
06/26/12
Propositional Logic
Operators
NEGATION
Let p be a proposition. The statement
It is not the case that p
is another proposition called the negation
of p.
The negation of p is denoted by p. The
proposition is read not p.
06/26/12
NEGATION
Example:
p: Today is Friday.
p: It is not the case that today is
Friday.
or
Today is not Friday.
06/26/12
10
NEGATION
Truth Table
06/26/12
11
Exercise
Give the negation of the following
propositions:
1. John
06/26/12
12
CONJUNCTION
06/26/12
13
CONJUNCTION
Example:
p: Today is Friday.
q: It is raining today.
p q: Today is Friday and it is raining
today.
06/26/12
14
CONJUNCTION
Truth Table:
06/26/12
pq
15
Exercise
06/26/12
16
Exercise
(1>0) (2<1)
(0<1) (1<2)
06/26/12
p (q)
(p q) r
17
DISJUNCTION
06/26/12
18
DISJUNCTION
Example 1:
p: Today is Friday.
q: It is raining today.
p q: Today is Friday or it is raining today.
Example 2:
r: I want to eat chicken.
s: I want to eat spaghetti.
r s: I want to eat chicken or spaghetti.
06/26/12
19
DISJUNCTION
Truth Table:
06/26/12
pq
20
Exercise
06/26/12
p q
q (p q)
[email protected]
21
Exercise
b.
p (q r)
(p q) (p r)
06/26/12
p (p q)
(q r) (p q)
22
EXCLUSIVE OR
06/26/12
23
EXCLUSIVE OR
Example:
p: Students who have taken calculus
can enroll in this class.
q: Students who have taken computer
science can enroll in this class.
p q: Students who have taken
calculus or computer science,
but not both, can enroll in this class.
06/26/12
24
EXCLUSIVE OR
Truth Table:
06/26/12
pq
25
IMPLICATION
06/26/12
26
IMPLICATION
Example:
p: I am elected.
q: I will lower taxes.
p q: If I am elected, then I will
lower taxes.
06/26/12
27
IMPLICATION
06/26/12
28
Exercise
06/26/12
29
IMPLICATION
Truth Table:
06/26/12
pq
30
IMPLICATION
06/26/12
31
IMPLICATION
06/26/12
32
IMPLICATION
The contrapositive, q p, of an
implication p q has the same truth value
(or equivalent) as p q.
Neither the converse nor the inverse have
the same truth value as p q for all
possible truth values of p and q.
06/26/12
33
Exercise
06/26/12
34
Exercise
d.
06/26/12
(p q) (p q)
(p q) (p q)
p (q r)
(p q) (p r)
35
BICONDITIONAL
06/26/12
36
BICONDITIONAL
Example:
p: You can take the flight.
q: You buy a ticket.
p q: You can take the flight if and
only if you buy a ticket.
06/26/12
37
BICONDITIONAL
06/26/12
38
BICONDITIONAL
Truth Table:
06/26/12
pq
39
Exercise
b.
c.
06/26/12
40
Precedence
2
3
06/26/12
4
5
41
PROPOSITIONAL
EQUIVALENCES
Definitions
A compound proposition that is always
true, no matter what the truth values of the
propositions that occur in it, is called a
tautology.
A compound proposition that is always
false is called a contradiction.
A proposition that is neither a tautology
nor a contradiction is called a contingency.
06/26/12
43
06/26/12
p p
p p
T
F
F
T
T
T
F
F
44
LOGICAL EQUIVALENCES
06/26/12
45
LOGICAL EQUIVALENCES
06/26/12
T
F
T
F
p q (p q)
T
T
T
F
p q
F
F
T
T
F
T
F
T
F
F
F
T
46
Exercise
06/26/12
47
Logical Equivalences
Equivalence
pTp
pFp
pTT
pFF
ppp
ppp
(p) p
06/26/12
Name
Identity laws
Domination laws
Idempotent laws
Double negation law
48
Logical Equivalences
Equivalence
pqqp
pqqp
(p q) r p (q r)
(p q) r p (q r)
p (q r) (p q) (p r)
p (q r) (p q) (p r)
(p q) p q
(p q) p q
06/26/12
Name
Commutative laws
Associative laws
Distributive laws
De Morgans laws
49
Logical Equivalences
Absorption laws
p (p q) p
p (p q) p
p p T
p p F
06/26/12
Negation laws
50
p q p q
p q q p
p q p q
p q (p q)
(p q) p q
(p q) (p r) p (q r)
(p r) (q r) (p q) r
(p q) (p r) p (q r)
(p r) (q r) (p q) r
06/26/12
51
06/26/12
52
Equational Reasoning
Show that (p q) (p q) is a tautology.
Show that (p (p q)) and p q are
logically equivalent.
Show that (p q) ( p q) is a
tautology.
Show that (p q) p and (q p) are
logically equivalent.
06/26/12
53