Discrete Math Lecture 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

Discrete Mathematics

Dr. Muhammad Yousuf Tufail

Department of Mathematics
Institute of Business Administration.
‡ Yousuf Tufail ¯ Yousuf Tufail
ytufail@iba.edu.pk

Lecture 2

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 1 / 19


Prescribed books

1 Discrete Mathematics with Application by Susanna S. Epp, 2nd


edition.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 2 / 19


Prescribed books

1 Discrete Mathematics with Application by Susanna S. Epp, 2nd


edition.
2 Discrete Mathematics and its Applications by Kenneth H. Rosen,
McGraw Hill, Science/Engineering/Math, 6th Edition, 2006

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 2 / 19


Prescribed books

1 Discrete Mathematics with Application by Susanna S. Epp, 2nd


edition.
2 Discrete Mathematics and its Applications by Kenneth H. Rosen,
McGraw Hill, Science/Engineering/Math, 6th Edition, 2006
3 Mathematical Structures for Computer Science by Judith L. Gersting,
W. H. Freeman, 6th Edition, 2006

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 2 / 19


Definition
Two statement forms are called logically equivalent if, and only if, they
have identical truth values for each possible substitution of statements for
their statement variables. The logical equivalence of statement forms P
and Q is denoted by writing P ≡ Q.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 3 / 19


Definition
Two statement forms are called logically equivalent if, and only if, they
have identical truth values for each possible substitution of statements for
their statement variables. The logical equivalence of statement forms P
and Q is denoted by writing P ≡ Q.

Definition
A tautology is a statement form that is always true regardless of the truth
values of the individual statements substituted for its statement variables.
A statement whose form is a tautology is a tautological statement. A
contradication is a statement form that is always false regardless of the
truth values of the individual statements substituted for its statement
variables. A statement whose form is a contradication is a contradictory
statement.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 3 / 19


Examples
(i) Show that ∼ (∼ p) ≡ p
(ii) Show that p∨ ∼ p is a tautology
(iii)Show p∧ ∼ p is a contradiction.

Hint: Simply construct the truth table and verify from it.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 4 / 19


Examples
(i) Show that ∼ (∼ p) ≡ p
(ii) Show that p∨ ∼ p is a tautology
(iii)Show p∧ ∼ p is a contradiction.

Hint: Simply construct the truth table and verify from it.
Proof.
Truth table for ∼ (∼ p) ≡ p
p ∼p ∼ (∼ p)
T F T
F T F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 4 / 19


De-Morgan’s Laws

Theorem
Given any statement variables p and q. Following logical equivalences hold.

(i) ∼ (p ∧ q) ≡∼ p∨ ∼ q, (ii) ∼ (p ∨ q) ≡∼ p∧ ∼ q

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 5 / 19


De-Morgan’s Laws

Theorem
Given any statement variables p and q. Following logical equivalences hold.

(i) ∼ (p ∧ q) ≡∼ p∨ ∼ q, (ii) ∼ (p ∨ q) ≡∼ p∧ ∼ q

I am going to prove (i) and leave the second for you guys.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 5 / 19


Proof.
First solve the L.H.S as below:
Truth table for ∼ (p ∧ q)
p q p∧q ∼ (p ∧ q)
T T T
T F F
F T F
F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 6 / 19


Proof.
First solve the L.H.S as below:
Truth table for ∼ (p ∧ q)
p q p∧q ∼ (p ∧ q)
T T T
T F F
F T F
F F F

Truth table for ∼ (p ∧ q)


p q p∧q ∼ (p ∧ q)
T T T F
T F F T
F T F T
F F F T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 6 / 19


Proof.
Now the R.H.S as below:
Truth table for ∼ p∨ ∼ q
p q ∼p ∼q ∼ p∨ ∼ q
T T F F
T F F T
F T T F
F F T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 7 / 19


Proof.
Now the R.H.S as below:
Truth table for ∼ p∨ ∼ q
p q ∼p ∼q ∼ p∨ ∼ q
T T F F
T F F T
F T T F
F F T T

Truth table for ∼ p∨ ∼ q


p q ∼p ∼q ∼ p∨ ∼ q
T T F F F
T F F T T
F T T F T
F F T T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 7 / 19


Proof.
Truth table for ∼ (p ∧ q) (L.H.S)
p q p∧q ∼ (p ∧ q)
T T T F
T F F T
F T F T
F F F T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 8 / 19


Proof.
Truth table for ∼ (p ∧ q) (L.H.S)
p q p∧q ∼ (p ∧ q)
T T T F
T F F T
F T F T
F F F T
Truth table for ∼ p∨ ∼ q (R.H.S)
p q ∼p ∼q ∼ p∨ ∼ q
T T F F F
T F F T T
F T T F T
F F T T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 8 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,
q: The machine is unplugged.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,
q: The machine is unplugged.
Now the given sentence can be written as p ∨ q.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,
q: The machine is unplugged.
Now the given sentence can be written as p ∨ q.
According to De-Morgan’s law: ∼ (p ∨ q) ≡∼ p∧ ∼ q

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,
q: The machine is unplugged.
Now the given sentence can be written as p ∨ q.
According to De-Morgan’s law: ∼ (p ∨ q) ≡∼ p∧ ∼ q
∴ negation of given statement will be ∼ p∧ ∼ q. i.e.,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The connector is loose or the machine is unplugged.”

Solution :
Suppose p: The connector is loose,
q: The machine is unplugged.
Now the given sentence can be written as p ∨ q.
According to De-Morgan’s law: ∼ (p ∨ q) ≡∼ p∧ ∼ q
∴ negation of given statement will be ∼ p∧ ∼ q. i.e.,The connector is not
loose and the machine is not unplugged.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 9 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,
q: The stock market is at a record low.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,
q: The stock market is at a record low.
Now the given sentence can be written as p ∧ q.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,
q: The stock market is at a record low.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,
q: The stock market is at a record low.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“The dollar is at an all time high and the stock market is at a record low.”

Solution :
Suppose p: The dollar is at an all time high,
q: The stock market is at a record low.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,The dollar isn’t at an
all time high or the stock market isn’t at a record low.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 10 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,−1 ≮ x

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,−1 ≮ xor x  4

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Example
Write the negation of the following statement.
“−1 < x ≤ 4.”

Solution :
Suppose p: −1 < x,
q: x ≤ 4.
Now the given sentence can be written as p ∧ q.
According to De-Morgan’s law: ∼ (p ∧ q) ≡∼ p∨ ∼ q
∴ negation of given statement will be ∼ p∨ ∼ q. i.e.,−1 ≮ xor x  4
⇒ −1 ≥ x or x > 4

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 11 / 19


Logical Equivalences

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 12 / 19


Definition
Associative Law:
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r )

L.H.S:

Truth table for (p ∧ q) ∧ r


p q r p∧q (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

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 13 / 19


Definition
Associative Law:
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r )

L.H.S:

Truth table for (p ∧ q) ∧ r


p q r p∧q (p ∧ q) ∧ r
T T T T T
T T F T F
T F T F F
T F F F F
F T T F F
F T F F F
F F T F F
F F F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 14 / 19


Definition
Associative Law:
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r )

R.H.S:

Truth table for (p ∧ q) ∧ r


p q r q∧r p ∧ (q ∧ r )
T T T T T
T T F F F
T F T F F
T F F F F
F T T T F
F T F F F
F F T F F
F F F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 15 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t
T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t
T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t
T T T
F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t
T T T
F T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t=t

Proof.
Truth table for p ∨ t = t
p t p∨t
T T T
F T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 16 / 19


Definition
Universal bound law:
p∨t≡t

Proof.
Truth table for p ∨ t ≡ t
p t p∨t
T T T
F T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 17 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 18 / 19


Definition
Absorption law:
p ∨ (p ∧ q) ≡ p

Proof.
Truth table for p ∨ (p ∧ q) ≡ p
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F F F F

Dr. Muhammad Yousuf Tufail (IBA.) Discrete Mathematics Lecture 2 19 / 19

You might also like