Unit 5 Logic Part 2
Unit 5 Logic Part 2
MODERN WORLD
-MODULE 5-
Prepared by:
JESSICA R. ZALDIVIA
Course Instructor
LOGIC OPERATORS
The truth table of a simple statement is either true (T) of false (F).
The truth table of a compound statement depends on the truth values of its simple
statements and its connectives.
A truth table is a table that shows the truth value of a compound statement for all
possible values of its simple statements.
Examples:
p
T
F
2n = number of rows, where n is the number of propositions.
p q
T T
T F
F T
F F
Suppose p, q and r, are propositions. Then a truth table involving the given proposition
has 23 = 8 rows.
p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
NEGATION
The negation of a proposition p is denoted by ∼p: (read as ‘not’ p,) and is defined
through its truth table:
p q
T F
F T
Write the negation of each statement.
Solution:
∼p1: 2 is an even number.
∼p2: The dog need to fed.
∼p3: The tinikling is not the most difficult dance.
CONJUNCTION
The conjunction of a proposition p and q is denoted by p ∧q : (read as p and q and is
defined through its truth table:
p q p ∧q
T T T
T F F
F T F
F F F
p: Today is Friday
q: It is raining.
Solution:
a. p ∧q : Today is Friday and it is raining.
b. p ∧(∼ q): Today is Friday and it is not raining.
DISJUNCTION
The disjunction of a proposition p and q is denoted by p ∨q : (read as p or q) and is
defined through its truth table:
p q p ∨q
T T T
T F T
F T T
F F F
The truth table above tells that disjunction p ∨q is false only when both disjuncts p and
q are false.
Express the following propositions in English sentences or in symbols, as the case may
be.
a) p ∨q
b) p ∨(∼ r)
c) p ∨(q ∨r )
d) Either Victor has a date with Liza or John is sleeping, or Lance is eating.
e) Either Victor has a date with Liza, or John is sleeping and Lance is eating.
Solution:
a) Victor has a date with Liza or John is sleeping.
b) Either John is sleeping, or Lance is not eating.
c) Either Victor has a date with Liza, or John is sleeping or Lance is eating.
d) ( p ∨q) ∨r
e) p ∨(q ∧r )
CONDITIONAL
The conditional of a proposition p and q is denoted by p →q : (read as ‘If p, then q’) and
is defined through its truth table:
p q p →q
T T T
T F F
F T T
F F T
The conditional p →q may also be read as ‘p implies q’. The proposition p is called the
hypothesis, while the proposition q is called the conclusion.
p1: If Sachi is in Grade 11, then she is a senior high school student.
p2: If Sachi is in Grade 11, then she is working as a lawyer.
p3: If Sachi has a degree in computer science, then she believes in true love.
BICONDITIONAL
p1: If Sachi is in Grade 11, then she is a senior high school student.
p2: If Sachi is in Grade 11, then she is working as a lawyer.
p3: If Sachi has a degree in computer science, then she believes in true love.
p1: both simple components of p1 are true. Hence, the biconditional is true,
according to the first row of the truth table.
p2: the biconditional is false as the second row of the truth table indicates.
p3: the biconditional is false.
Solution:
P Q ∼Q P → ∼Q Note:
T T F F p q p →q
T F T T T T T
F T F T T F F
F F T T F T T
F F T
Solution:
P Q ∼P ∼P → Q Note:
T T F T p q p →q
T F F T T T T
F T T T T F F
F F T F F T T
F F T
EXAMPLE 3: Construct a truth table for P ∨(Q → ∼P).
Solution:
Note:
P Q ∼P Q →∼ P P ∨(Q → ∼P).
p q p ∨q p q p →q
T T F F T
T F F T T T T T T T T
F T T T T T F T T F F
F F T T T F T T F T T
F F F F F T
1. (p ∨ r) ∧ q
2. ∼s → (p ∧∼ q )
3. t ↔ (∼r ∧∼q )