Chapter 1
Chapter 1
DISCRETE
C h a p t e
MATHEMATICS r 1
Chapter 1: Basic Logic and
Proofs
1.1 Derive Propositional Logic
1.1.1 Define the purpose of proposition logic
1.1.2 Carry out the formulae in proposition logic
1.1.2a Negation
1.1.2b Conjuction
1.1.2c Disjunction
1.1.2d Conditional
1.1.2e Biconditional
1.1.2f Tautology
1.1.3 Identify the compound proposition
1.1.4 Construct the truth table
1.1.1 Define the purpose of
proposition logic
A proposition (or statement) is a sentence that is either
True or False.
• Letters are used to denote propositional variables.
Example: p, q, r, s, …
• The truth valueof a proposition
• True proposition (T)
• False proposition (F)
Examples:
Proposition: Non-proposition:
• 5+3=8 True • Where do you live Question
• 10 / 2 = 4 False • Please answer the question
• 5 is an even number correctly Instruction
• Today is Wednesday • x < 10
Unknown value of
x
Exercise a
Which of these sentences are proportions? What are
the truth values of those that are propositions?
p∧q
T F F 5 + 3 = 8 and a decade is 10 years.
F T F Another answer:
p∧q
F F F 5 + 3 = 8 but a decade is 10 years.
Exercise B
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
Disjunction p ∨ q (READ AS p OR q)
p q p∨q
Example:
T T T p:5 + 3 = 8
q:A decade is 10 years.
T F T
p∨q
F T T 5 + 3 = 8 or a decade is 10 years.
F F F
Exercise C
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
Negation ¬p (READ AS NOT P)
Example:
p ¬p Write the negation for each of the
following propositions.
(a) 5 + 3 = 8
T F (b) A decade is 10 years.
Answer:
(a) 5 + 3 ≠ 8
F T (b) A decade is not 10 years.
Exercise D
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.
Conditional p → q (READ AS IF p,
THEN q)
p q p→q
Example:
T T T p: I do my homework.
q: I get my allowance.
T F F
p→q
F T T If I do my homework, then I get an
allowance.
F F T
Another ways to express
conditional statement:
• If p, q
• p is sufficient for q
• q if p
• q when p
• a necessary condition for q is p
p\to q
Exercise E
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
Biconditional p ↔ q(READ AS p IF and
only IF q)
p q p↔q
Example:
T T T p: You passed the Discrete
Mathematics exam.
T F F q: You scored 40% or higher.
F T F p↔q
You passed the Discrete mathematics
F F T exam if and only if you scored 40%
or higher.
Another ways to express
biconditional statement:
• p↔q
• q ↔ ¬p
Exercise G (Question 1)
Which of these sentences are propositions? State the
truth value of those that are propositions.
• ¬p
• q ∨ ¬p
• ¬p ∧ ¬q
• p↔q
Exercise G (Question 3)
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
PAST YEAR QUESTIONS SESI
II: 2021/2022
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)
PAST YEAR QUESTIONS SESI
II: 2021/2022
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.
Examples:
Two Three
propositions p q
propositions r
p q
T T T
T T T T F
T F T
T F T F F
F T T
F T F T F
F F T
F F F F F
Example
Construct the truth table for
p ∧ (¬p ∨ ¬q)
Solution
First, we know that there are 2 propositions involve
p∧(¬p∨¬q
p q ¬p ¬q ¬p ∨ ¬q
)
T T F F F F
T F F T T T
F T T F T F
F F T T T F
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)
(¬p∧r)∨(¬q∧p
p q r ¬p ¬q ¬p∧r ¬q∧p The
)
truth
T T T F F F F F
value
T T F F F F F F for the
T F T F T F T T state
T F F F T F T T ment
is
F T T T F T F T
TRUE.
F T F T F F F F
F F T T T T F T
F F F T T F F F
Exercise H
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
LOGICAL EQUIVALENCE
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
p ∧ q and q ∧ p logically equivalent or not.
p q p∧q q∧p p q p∧q ¬(p ∧ q) ¬p ¬q
¬p ∧
¬q
T T T T
T T T F F F F
T F F F
T F F T F T F
F T F F
F T F T T F F
F F F F
F F F T T T T
p∧q≡q∧p ¬(p ∧ q) ≢ ¬p ∧
Logical Equivalence
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:
p q p∨q
T T T
T F T
F T T
F F F The proposition p ∨ q is a contigency.
Exercise 1J
a) Use the truth table to determine whether the
statement is a tautology, contradiction or
contingency: ((p → q) ∧ p) → q
b) Use a truth table to show that the proposition is
always true: p ∨ (q ∨ ¬p)
c) Determine whether the proposition is tautology
or not: (p → q) ∧ (q → p) ↔ (p → ¬q)
Chapter 1: Basic Logic and
Proofs
1.2 Derive Predicate Logic
1.2.1 Define predicates
1.2.2 State the expression of predicate in a
statement
1.2.3 Identify the compound statement in
predicate logic
1.2.4 Compare the type of quantifier in:
Universal;Existential
1.2.5 Identify the quantified statements
1.2.6 Write a well-formed predicate logic in
English
1.2.7 Transfer the translation with quantifiers
1.2.1 Define predicates
1.2.2 State the expression of
predicate in a statement
•A predicate is a statement that contains variables
(predicate variables) and that may be true or false
depending on the values of these variables.
•P(x) is a predicate.
EXAMPLE
Consider the statement involving variables such as "x > 3".
The statement “x is greater than 3” has two parts:
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
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
Exercise K
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)
IMPORTANT
• 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, " is true.
EXAMPLE
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.
EXAMPLE
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.
EXAMPLE
Consider the statement ∀ x ∈ R, . Find a counterexample to show that this
statement is false.
Solution:
Let x= . Then x is in R and ( )² = ≱ . Hence "∀ x ∈ R, "is FALSE.
That is x = is a counterexample for the statement ∀ x ∈ R, .
Thus, ∀ x ∈ R, is false.
EXAMPLE
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.
1.2.6 WRITE A WELL-
FORMED PREDICATE LOGIC
IN ENGLISH
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)
SOLUTION
• ∀ 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.
EXAMPLE 2
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”
1.2.7 transfer the translation
with quantifiers
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).
ADDITIONAL EXAMPLE
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).
Exercise M
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)
Chapter 1: Basic Logic and
Proofs
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.
∴Q
Pₙ
*Note: the three dots symbol ∴ reads: therefore (normally placed just
before the conclusion).
Example
Write in symbolic logic form:
“All women are pretty; Zara is a woman. Therefore, Zara is pretty”.
Solution:
P₁: All women are pretty.
(b) ¬p ∧ q → ¬q
(c) [ ( p ⋁ q ) ⋀ ( ¬p ⋁ r ) ] → ( q ⋁ r )
RULES OF INFERENCE FOR
PROPOSITIONAL
RULE OF INFERENCE LOGIC
TAUTOLOGY NAME
p→q
∴q
p [p Λ (p → q)] → q Modus ponens
p→q
[¬ q Λ (p → q)] → ¬p
∴¬ p
¬q Modus tollens
p→q
[(p → q) Λ (q → r)] → (p → r)
∴p → r
q→r Hypothetical syllogism
pVq
[(p V q) Λ ¬p] → q Disjunctive syllogism
∴q
¬p
p → (p V q)
∴p V q
p Addition
Example
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.
Question (A)
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 →r
q →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)
Solution
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
Exercise P
Show that the following argument is c) Linda is an excellent swimmer.
valid or fallacy. If Linda is an excellent swimmer, then
∴Daisy is white
Daisy is flower
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.