chapter 5- logic
TRANSCRIPT
-
8/11/2019 Chapter 5- Logic
1/26
Chapter 5 Logic
CSNB 143
Discrete Mathematical Structures
-
8/11/2019 Chapter 5- Logic
2/26
OBJECTIVES
Student should be able to know what is it meansby statement.
Students should be able to identify its
connectives and compound statements.
Students should be able to use the Truth Table
without difficulties.
-
8/11/2019 Chapter 5- Logic
3/26
Logic
Statement or proposition is a declarative sentence withthe value of true or false but not both.
Ex 1: Which one is a statement?
The world is round. 2 + 3 = 5
Have you taken your lunch?
3 - x = 5
The temperature on the surface of Mars is 800F. Tomorrow is a bright day.
Read this!
-
8/11/2019 Chapter 5- Logic
4/26
Statement usually will be replaced by variablessuch as
p, q, r or s.
Ex 2:
p: The sun will shine today.
q: It is a cold weather.
Statements can be combined by logicalconnectives to obtain compound statements.
Ex 3:
AND (p andq): The sun will shine today andit isa cold weather.
-
8/11/2019 Chapter 5- Logic
5/26
Connectives ANDis what we called conjunctionfor p and q, written p q. The compound
statement is true if both statements are true.
Connectives ORis what we called disjunction
for p and q, written p q. The compound
statement is false if both statements are false.
To prove the value of any statement (or
compound statements), we need to use the Truth
Table.
-
8/11/2019 Chapter 5- Logic
6/26
P Q P Q P Q
T T T T
T F F T
F T F T
F F F F
-
8/11/2019 Chapter 5- Logic
7/26
Negationfor any statement p is notp. written as~p or p. The Truth Table for negation is:
Ex 4: Find the value of (~pq) pusing TruthTable.
P P
T F
F T
-
8/11/2019 Chapter 5- Logic
8/26
P Q P P Q ( P Q) P
T T F F T
T F F F TF T T T T
F F T F F
-
8/11/2019 Chapter 5- Logic
9/26
Conditional Statements If p and q are statements, the compound
statement if p then q, denoted by p q is calleda conditional statementor implication.
Statement p is called the antecedentor
hypothesis; and statement q is calledconsequentor conclusion. The connective if thenis denoted by the symbol .
Ex 5:
a) p : I am hungry q : I will eat b) p : It is cold q : 3 + 5 = 8
The implication would be: a) If I am hungry,then I will eat.
b) If it is cold, then 3 + 5 =
-
8/11/2019 Chapter 5- Logic
10/26
Take note that, in our daily lives, Ex 5 b) has noconnection between statements p and q, that is,statement p has no effect on statement q.However, in logic, this is acceptable. It showsthat, in logic, we use conditional statements in a
more general sense. Its Truth Table is as below:
To understand, use: p = It is raining q = I used umbrella
P Q P Q
T T T
T F F
F T T
F F T
-
8/11/2019 Chapter 5- Logic
11/26
Another meaning that use the symbol includes:
if p, then q
p implies q
if p, q p only if q
p is sufficient for q
q if p
q is necessary for p
-
8/11/2019 Chapter 5- Logic
12/26
If p q is an implications, then the converseof itis the implication q p, and the contrapositive
of it is ~q ~p.
Ex 6:
p = It is raining q = I get wet
Get its converse and contrapositive.
-
8/11/2019 Chapter 5- Logic
13/26
If p and q are statements, compound statement pif and only if q, denoted by p q, is called an
equivalenceor biconditional.
Its Truth Table is as below:
To understand, use: p = It is raining q = I used
umbrella
Notis that p q is True in two conditions: both p and q are True,or both and are false.
P Q P Q
T T T
T F F
F T FF F T
-
8/11/2019 Chapter 5- Logic
14/26
Another meaning that use the symbol includes:
p is necessary and sufficient for q
if p, then q, and conversely
In general, compound statement may contain few
parts in which each one of it is yet a statement
too.
Ex 7: Find the truth value for the statement(p q) (~q ~p)
-
8/11/2019 Chapter 5- Logic
15/26
P Q PQ
(A)
Q P QP
(B)
(A)(B)
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T
A statement that is true for all possible values of
its propositional variables is called a tautology.
-
8/11/2019 Chapter 5- Logic
16/26
A statement that is always false for all possiblevalues of its propositional variables is called a
contradiction.
A statement that can be either true or false,
depending on the truth values of its propositional
variables is called a contingency
-
8/11/2019 Chapter 5- Logic
17/26
Logically Equivalent
Two statements p and q are said to be logically
equivalent if p q is a tautology.
Ex 8: Show that statements p qand (~p) q
are logically equivalent.
-
8/11/2019 Chapter 5- Logic
18/26
Quantifier
Quantifier is used to define about all elements
that have something in common.
Such as in set, one way of writing it is {x | P(x)}
where P(x) is called predicate orpropositional
function, in which each choice of x will produces
a proposition P(x) that is either true or false.
-
8/11/2019 Chapter 5- Logic
19/26
There are two types of quantifier being used:
a) Universal Quantification () of a predicate P(x)
is the statement
For all values of x, P(x) is true
In other words:
for every x
every x
for any x
-
8/11/2019 Chapter 5- Logic
20/26
b) Existential Quantification () of a predicate P(x)is the statement
There exists a value of x for which P(x) is
true
In other words:
there is an x
there is some x there exists an x
there is at least one x
-
8/11/2019 Chapter 5- Logic
21/26
Theorem 1
Operations on statements are:
Commutative
p q q p
p
qq
pAssociative
p (q r) (p q) r
p (q r) (p q) r
Distributive
p (q r) (p q) (p r)
p (q r) (p q) (p r)
-
8/11/2019 Chapter 5- Logic
22/26
Idempotent
p p p
p p p
Negations
~(~p) p
~(p q) (~p) (~q)
~(p q) (~p) (~q)
-
8/11/2019 Chapter 5- Logic
23/26
Theorem 2
Operations on implications are:
(p q) ((~p) q)
(p q) ((~q) ~p)
(p
q)((p
q)
(q
p))
~(p q) (p ~q)
~(p q) ((p ~q) (q ~p))
-
8/11/2019 Chapter 5- Logic
24/26
Theorem 3
Operations on quantifier are:
~(x P(x)) x ~P(x)
~(x ~P(x))
x P(x)
x (P(x) Q(x)) x P(x) x Q(x)
x P(x) x Q(x) x (P(x) Q(x))
Anyone can achieve Q if you fulfill P
Even though you satisfy P, only someone can achieve Q
-
8/11/2019 Chapter 5- Logic
25/26
x (P(x) Q(x)) x P(x) x Q(x)
x (P(x) Q(x)) x P(x) x Q(x)
((x P(x)) (x Q(x))) x (P(x) Q(x))
tautology
x (P(x) Q(x)) x P(x) x Q(x)tautology
-
8/11/2019 Chapter 5- Logic
26/26