Chapter 1
Chapter 1
∧ Example:
p:5 + 3 = 8
q:A decade is 10 years.
p∧q
5 + 3 = 8 and a decade is 10 years.
Another answer:
p∧q
5 + 3 = 8 but a decade is 10 years.
Determine whether the statements are true (T) or
false (F).
• 3 + 2 = 5 and 4 + 4 = 8
• Changlun is in Perlis and Alor Setar is in Kedah.
• −48 < −47 and 25 + 3 = 38
• Duck has 4 legs and cat has wings.
• 4x + 3x = 5x and
∨
∨
Example:
p:5 + 3 = 8
q:A decade is 10 years.
p∨q
5 + 3 = 8 or a decade is 10 years.
Determine whether the statements are true (T) or
false (F).
• 3 + 2 = 5 or 4 + 4 = 8
• Changlun is in Perlis or Alor Setar is in Kedah.
• −48 < −47 or 25 + 3 = 38
• Duck has 4 legs or cat has wings.
• 4x + 3x = 5x or
¬
Example:
¬ Write the negation for each of the
following propositions.
(a) 5 + 3 = 8
(b) A decade is 10 years.
Answer:
(a) 5 + 3 ≠ 8
(b) A decade is not 10 years.
What is the negation of each of these propositions?
• Today is Tuesday.
• China is in Asia
• 2+1=3
• All kittens are cute.
• No prime number is even.
• Some cookies are sweet.
• Every lawyer uses logic.
• No bullfrog has lovely eyes.
→
→
Example:
p: I do my homework.
q: I get my allowance.
p→q
If I do my homework, then I get an
allowance.
• If p, q
• p is sufficient for q
• q if p
• q when p
• a necessary condition for q is p
Let p be “ It is cold” and q be “ It is raining”. Give a
simple sentence which describes each of the
following statements:
• p→q
• q → ¬p
• ¬q → ¬p
↔
↔
Example:
p: You passed the Discrete
Mathematics exam.
q: You scored 40% or higher.
p↔q
You passed the Discrete mathematics
exam if and only if you scored 40%
or higher.
• p is necessary and sufficient for q
• if p then q, and conversely
• p iff q
Let p be “ It is cold” and q be “ It is raining”. Give a
simple sentence which describes each of the
following statements:
• p↔q
• q ↔ ¬p
Which of these sentences are propositions? State the
truth value of those that are propositions.
• ¬p
• q ∨ ¬p
• ¬p ∧ ¬q
• p↔q
Represent the sentences below as propositional
expressions:
• If 1 + 1 = 2, then 2 + 2 = 5
• If monkeys can fly, then 1 + 1 = 3
• 2 + 2 = 4 if and only if 1 + 1 = 2
• 0 > 1 if and only if 2 > 1
QUESTION 1
Identify each of the following sentence whether a
proposition or not and state the truth value.
a) Is 2 a positive number? (1 mark)
b) A triangle is a three-sided polygon (2 marks)
c) 4 + 9 > 9 (2 marks)
QUESTION 2
Let p denote “ John is rich” and q denote “ John is happy”. Write
each statement in symbolic form using p and q.
Example:
If we have two propositions (p and q), therefore, we will have
2² = 4 rows.
If we have three propositions (p, q and r), therefore we will
have 2³ = 8 rows.
Construct the truth table for
p ∧ (¬p ∨ ¬q)
First, we know that there are 2 propositions involve
¬ ¬ ¬ ∨¬ ∧ ¬ ∨¬
If p represents the statement 4 > 1, q represent the statement 12 < 9, and r
represent 0 < 1, decide whether the following statement is TRUE or FALSE.
(¬p ∧ r) V (¬q ∧ p)
¬ ¬ ¬ ∧ ¬ ∧ ¬ ∧ ∨¬ ∧
The
truth
value
for the
state
ment
is
TRUE.
Construct the truth table for each of the following:
a) ¬p ∧ q
b) ¬p V q → ¬q
c) p ∧ (¬q V r)
d) ¬p ↔ q V r
Two statement forms are called logically equivalent (≡ ) if and only if they have
same truth value in every possible situation.
Example: Example:
Are the following statements Determine whether the statement
equivalent? forms ¬(p ∧ q) and ¬p ∧¬q are logically
p ∧ q and q ∧ p equivalent or not.
∧ ∧ ∧ ∧ ∧
p∧q≡q∧p ¬(p ∧ q) ≢ ¬p ∧ ¬q
Given any statement variables p,q and r, a tautology t and a contradiction c, the
following logical equivalence hold:
a) i: ¬(p Λ q)
ii: ¬p V ¬q
b) i: ¬p ↔ q
ii: ¬q ↔ p
Example:
∨
Let P(x) denote the statement "x > 3". What are the truth values of P(4) and P(2)?
Solution:
P(x)= x > 3
Substitute the values given to the predicate;
P(4)= 4 > 3 (TRUE)
P(2)= 2 > 3 (FALSE)
Example:
Assume a predicate P(x) that represents the statement x is a prime number.
What are the truth values of P(2), P(3), P(4), P(5), P(6) and P(7)?
Solution:
P(2) (TRUE) since 2 is a prime number
P(3) (TRUE) since 3 is a prime number
P(4) (FALSE) since 4 is not a prime number [4 can be divided by 2)
P(5) (TRUE) since 5 is a prime number
P(6) (FALSE) since 6 is not a prime number [6 can be divided by 2 and 3)
P(7) (TRUE) since 5 is a prime number
1. Let P(x) be the statement “the word x contains the
letter a”. What are these truth values?
a) P(orange)
b) P(lemon)
c) P(false)
Example:
• Older(John, Peter) denotes ‘John is older than Peter’
– this is a proposition because it is either true or false
Solution:
– Is Q(x,y) a proposition? No (cannot detemine whether it is true or false)
– Is Q(3,7) a proposition? Yes (It is true)
– Is Q(3,y) a proposition? No (cannot detemine whether it is true or false since
y is unknown)
– What is the truth value of:
• Q(3,7) T (True since 3+5 > 7; 8 > 7)
• Q(1,6) F (False since 1+5 > 6; 6 > 6)
• Q(2,2) T (True since 2+5 > 2; 7 > 2)
• Statement P(x) is not a proposition since there are more objects it can be
applied to
Solution:
Check that "x² ≥ x" is true for each individual x in D.
1² ≥ 1 , 2² ≥ 2 , 3² ≥ 3 , 4² ≥ 4 , 5² ≥ 5
1≥1 , 4≥2 , 9≥3 , 16 ≥ 4 , 25 ≥ 5
Hence "∀ x ∈ D, 𝑥 2 ≥ 𝑥 " is true.
Let P(x) be the statement "x + 1 > x". What is the truth value of the quantification
∀ x P(x) where the domain consists of all real numbers?
Solution:
Because P(x) is true for all real numbers x, the quantification ∀x P(x) is true.
Let Q(x) be the statement "x < 2". What is the truth value of the quantification
∀ x Q(x) where the domain consists of all real numbers?
Solution:
Q(x) is not true for every real number x. Example: Q(3) = 3 < 2 is FALSE.
That is x = 3 is a counterexample for the statement ∀ x Q(x). Thus ∀ x Q(x) is
false.
Consider the statement ∀ x ∈ R, 𝑥 2 ≥ 𝑥. Find a counterexample to show that
this statement is false.
Solution:
Let x= . Then x is in R and ( )² = ≱ . Hence "∀ x ∈ R, 𝑥 2 ≥ 𝑥 "is FALSE.
That is x = is a counterexample for the statement ∀ x ∈ R, 𝑥 2 ≥ 𝑥.
Thus, ∀ x ∈ R, 𝑥 2 ≥ 𝑥 is false.
Consider the statement ∃m ∈ Z such that m²=m. Show that this statement is
true.
Solution:
Observe that 1² = 1. Thus "m² = m" is true for at least one integer m.
Hence "∃m ∈ Z such that m² = m" is TRUE.
Example 1:
Let P(x) denotes the statement “x is taking a mathematics
course”. The domain of discourse is the set of all students.
Write each propositions in words.
a) ∀ x P(x)
b) ∃ x P(x)
c) ¬(∃ x P(x))
d) ∀ x ¬P(x)
• ∀ x P(x)
All students are taking a Mathematics course.
• ∃ x P(x)
Some students are taking a Mathematics course.
• ¬(∃ x P(x))
It is not true that some students are taking a Mathematics course.
• ∀ x ¬P(x)
All students are not taking a Mathematics course.
Let the universe be the set of airplanes and let F(x,y) denote “x flies faster than
y”. Write each propositions in words.
a)∀ x ∀ y F(x,y)
“Every airplane is faster than every airplane”
b) ∀ x ∃ y F(x,y)
“Every airplane is faster than some airplane”
c)∃ x ∀ y F(x,y)
"Some airplane is faster than every airplane"
d)∃ x ∃ y F(x,y)
"Some airplane is faster than some airplane”
Example:
Let P(x) be the statement “x knows kung fu” and Q(x) be the
statement “x knows karate” where the domain consists of all adults
in your neighborhood. Write the following sentences using
predicates, quantifiers and logical connectives.
Solution:
• Let P(x) = “x can ride a bike.”
• The statement “everybody can ride a bike,” can be expressed as ∀ x P(x).
• We want the negation of this, which is ¬∀ x P(x).
• Another way to say this is “There is somebody that cannot ride a bike,”
which can be expressed as ∃ x ¬P(x).
Problem:
Express the statement “Nobody can fly.” as a logical expression.
Solution:
• Let P(x) = “x can fly.”
• The statement “somebody can fly,” can be expressed as ∃ x P(x).
• We want the negation of this, which is ¬∃ x P(x).
• Another way to say this is “Everybody can not fly,” which can be expressed
as ∀ x ¬P(x).
Translate the specifications into English sentences where P(x) be the predicate
“x must take a discrete mathematics course” and let Q(x) be the predicate “x is
a computer science student”. The universe of discourse for both P(x) and Q(x)
is all students.
Let S(x,y) be the predicate “x is expensive than y” and let the universe of
discourse be the set of cars. Express the following in sentences:
(a)∃ x ∃y S(x,y)
(b)∃ x ¬S(x,Mercedes)
(c)¬∀ x ∃y S(x,y)
1.3 Demonstrate Proofs
1.3.1 Define theorem and proofs
1.3.2 Identify the logical equivalence rules
1.3.3 Use the rules of inference to validate
arguments:
1.3.2a Modus Ponens
1.3.2b Modus Tollens
1.3.2c Hypothetical syllogism
1.3.2d Disjunctive syllogism
1.3.2e Addition
1.3.4 Utilize the rules of inference
1.3.5 Show the proofs using rules of inference
• An argument is a sequence of statements.
• In an argument, all statements except the last one are called premises (or
assumptions or hypothesis); the last statement in an argument is called
conclusion.
• Notation: Premises: P₁, . . . Pn; Conclusion: Q.
Solution:
P₁: All women are pretty.
P₂: Zara is a woman.
∴Q: Zara is pretty
An argument is said to be valid if Q is An argument which is not valid is called
true whenever all the premises P₁, P₂, …,
fallacy.
Pₙ are true.
How to test a given argument for validity: When is an argument not valid (fallacy)?
• Identify the premises and
• Whenever at least one “all T”
conclusion of the argument form.
• Construct a truth table showing the entry for the premises
truth values of all the premises and
corresponds to a “F” outcome for
the conclusion.
• (Focus only on those entries for the conclusion.
which all premises are T):
argument is valid if, and only if, to
each T outcome for all premises
corresponds a T outcome for the
conclusion.
Show that the following argument is valid or fallacy.
a) p → q
p
∴q
Solution: PREMISE PREMISE CONCLUSION
p q p→q p q
T T T T T VALID
T F F – ignore! T -
F T T F – ignore! -
F F T F – ignore! -
b) p → q
q→p
∴p V q
(b) ¬p ∧ q → ¬q
(c) [ ( p ⋁ q ) ⋀ ( ¬p ⋁ r ) ] → ( q ⋁ r )
RULE OF INFERENCE TAUTOLOGY NAME
p→q
p [p Λ (p → q)] → q Modus ponens
∴q
p→q
¬q [¬ q Λ (p → q)] → ¬p Modus tollens
∴¬ p
p→q
q→r [(p → q) Λ (q → r)] → (p → r)
Hypothetical syllogism
∴p → r
pVq
¬p [(p V q) Λ ¬p] → q Disjunctive syllogism
∴q
p p → (p V q) Addition
∴p V q
What rule of inference is used in each of these arguments?
a)Alice is mathematics major. Therefore, Alice is either mathematics major or
a computer science major.
b)If it is raining, then the pool will be closed. It is raining. Therefore, the pool is
closed.
c)If it snows today, then the university will be closed. The university is not
closed today. Therefore, it did not snow today.
d)If I go swimming, then I will stay in the sun too long. If I stay in the sun too
long, then I will get sunburn. Therefore, if I go swimming, then I will get
sunburn.
Alice is mathematics major. Therefore, Alice is either mathematics major or a
computer science major.
Solution:
Identify the premise:
p: Alice is mathematics major
q: Alice is a computer science major
Check the given statement:
p (Alice is mathematics major)
∴p V q (Therefore, Alice is either mathematics major or a computer science major)
Refer to the rules of inference:
Addition
If it is raining, then the pool will be closed. It is raining. Therefore, the pool is closed.
Solution:
Identify the premise:
p: It is raining
q: The pool is closed
Check the given statement:
p → q (If it is raining, then the pool will be closed)
p (It is raining)
∴q (Therefore, the pool is closed)
Refer to the rules of inference:
Modus ponens
If it snows today,then the university will be closed. The university is not closed
today. Therefore, it did not snow today.
Solution:
Identify the premise:
p: It snows today
q: The university is closed today
Check the given statement:
p → q (If it snows today, then the university will be closed)
¬q (The university is not closed today)
∴¬p (Therefore, it did not snow today)
Refer to the rules of inference:
Modus tollens
If I go swimming, then I will stay in the sun too long. If I stay in the sun too long,
then I will get sunburn. Therefore, if I go swimming, then I will get sunburn.
Solution:
Identify the premise:
p: I go swimming
q: I will stay in the sun too long
r: I will get sunburn
Check the given statement:
p → q (If I go swimming, then I will stay in the sun too long)
q → r (If I stay in the sun too long, then I will get sunburn)
∴p → r (Therefore, if I go swimming, then I will get sunburn)
Refer to the rules of inference:
Hypothetical syllogism
Test the validity of the following argument :
S₁: If a man is a bachelor, he is unhappy.
S₂: If a man is unhappy, he dies young.
----------------------------------------------------
S : Bachelors die young.
Solution:
Translate the argument into symbolic form ;
p →q
q →r
∴p →r
From the rules of inference table, the argument is hypothetical syllogism. So the
argument is valid. (Construct the truth table to check the validity of the argument)
PREMISE PREMISE CONCLUSION
p q r q∨r p∨(q∨r) ¬r
T T T T T T
T T F T F F
T F T F T T
T F F F T F
F T T T T T
F T F T F T
F F T T T T
VALID
F F F T T T
Show that the following argument is c) Linda is an excellent swimmer.
valid or fallacy. If Linda is an excellent swimmer, then
a) If daisy is a flower, then daisy is white she can work as a lifeguard.
Daisy is flower ∴Therefore, Linda can work as a
∴Daisy is white lifeguard.
b) If George does not have eight legs, d) If two sides of a triangle are equal,
then he is not an insect. then the opposite angles are equal.
George is not an insect. Two sides of a triangle are not equal.
Therefore, George does have eight legs. ∴The opposite angles are not equal.
What rules of inference is used in each of these arguments?
• Steve will work at a computer company this summer.
Therefore, this summer steve will work at a computer
company or he will be a beach bum.
• If I work all night on this homework, then I can answer
all the exercises. If I answer all the exercise, I will
understand the material. Therefore, If I work all night
on this homework, then I will understand the material.
• If it is snows today, the university will close. The
university is not closed today. Therefore, it did not
snow today.
• Test the validity of the following argument by using
truth table. Then, conclude what is the rules of
inference. (6 marks)