0% found this document useful (0 votes)
36 views22 pages

Lecture 4 and 5

This document summarizes key concepts from lectures 4 and 5 on discrete mathematics, including: 1) Logical equivalences that can be used to simplify statements, such as DeMorgan's laws, double negative laws, and distributive laws. Examples are provided of applying these laws. 2) Conditional statements and implications are introduced, with alternative ways to write "if p then q" as implications or conditionals. Truth tables are used to evaluate conditional statements. 3) The inverse, converse, and contrapositive of conditional statements are defined and examples are given of writing each for a given statement. The contrapositive is shown to be logically equivalent to the original statement. 4) Ex

Uploaded by

mehtab Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views22 pages

Lecture 4 and 5

This document summarizes key concepts from lectures 4 and 5 on discrete mathematics, including: 1) Logical equivalences that can be used to simplify statements, such as DeMorgan's laws, double negative laws, and distributive laws. Examples are provided of applying these laws. 2) Conditional statements and implications are introduced, with alternative ways to write "if p then q" as implications or conditionals. Truth tables are used to evaluate conditional statements. 3) The inverse, converse, and contrapositive of conditional statements are defined and examples are given of writing each for a given statement. The contrapositive is shown to be logically equivalent to the original statement. 4) Ex

Uploaded by

mehtab Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Discrete Mathematics

Lecture: 4 & 5

Lecture: 4 & 5 Discrete Mathematics 1/22


Logical Equivalences
Given any statement variables p, q, and r , a tautology t and a
contradiction c, the following logical equivalences hold.

Lecture: 4 & 5 Discrete Mathematics 2/22


APPLYING LAWS OF LOGIC

Using law of logic, simplify the statement form p ∨ [∼(∼p ∧ q)]

Statement Reason
p ∨ [∼(∼p ∧ q)] ≡p ∨ [∼(∼p) ∨ ∼q] DeMorgan’s Law
≡p ∨ [p ∨ ∼q] Double Negative Law
≡[p ∨ p ]∨ ∼q Associative Law for ∨
≡p∨ ∼q Idempotent Law

Which is the simplified statement form.

Lecture: 4 & 5 Discrete Mathematics 3/22


Example 1
Using Laws of Logic, verify the logical equivalence
∼ (∼ p ∧ q) ∧ (p ∨ q) ≡p

Statement Reason
∼ (∼ p ∧ q) ∧ (p ∨ q)
≡ (∼ (∼ p) ∨ ∼q) ∧ (p ∨ q) DeMorgan’s Law
≡ (p ∨ ∼q) ∧ (p ∨ q) Double Negative Law
≡p ∨(∼q ∧ q) Distributive Law
≡p∨ c Negation Law
≡p Identity Law

Lecture: 4 & 5 Discrete Mathematics 4/22


SIMPLIFYING A STATEMENT
“You will get an A if you are hard working and the sun shines, or
you are hard working and it rains.”
Rephrase the condition more simply.
Solution:
Let p = “You are hard working’
q = “The sun shines”
r = “It rains”.
The condition is then (p ∧ q) ∨ (p ∧ r)
And using distributive law in reverse, we obtain:
(p ∧ q) ∨ (p ∧ r) ≡ p ∧(q∨ r)
Putting p ∧(q∨ r) back into English, we can rephrase the given
sentence as
“You will get an A if you are hard working and the sun shines or it
rains.

Lecture: 4 & 5 Discrete Mathematics 5/22


CONDITIONAL STATEMENTS OR IMPLICATIONS

Consider the statement:


”If you earn an A in Math, then I’ll buy you a computer.”
This statement is made up of two simpler statements:
p: ”You earn an A in Math,” and
q: ”I will buy you a computer.”
The original statement is then saying :
if p is true, then q is true, or, more simply, if p, then q.
We can also phrase this as p implies q, and we write p → q.
• If p and q are statements variables, the conditional of q by p is
“If p then q” or “p implies q” and is denoted p → q.
• It is false when p is true and q is false; otherwise it is true. The
arrow ”→ ” is the conditional operator,
and in p →q
• the statement p is called the hypothesis (or antecedent) and q is
called the conclusion (or consequent).

Lecture: 4 & 5 Discrete Mathematics 6/22


PRACTICE WITH CONDITIONAL STATEMENTS:
Determine the truth value of each of the following conditional
statements
1 “If 1 = 1, then 3 = 3.” TRUE
2 “If 1 = 1, then 2 = 3.” FALSE
3 “If 1 = 0, then 3 = 3.” TRUE
4 “If 1 = 2, then 2 = 3.” TRUE
5 “If 1 = 1,then 1 = 2 and 2 = 3.” FALSE
6 “If 1 = 3 or 1 = 2 then 3 = 3.” TRUE

Lecture: 4 & 5 Discrete Mathematics 7/22


Alternative ways of expressing implications

The implication p → q could be expressed in many alternative


ways as:
•“if p then q”
•“not p unless q”
•“p implies q”
•“q follows from p”
•“if p, q”
•“q if p”
•“p only if q”
•“q whenever p”
•“p is sufficient for q”
•“q is necessary for p”

Lecture: 4 & 5 Discrete Mathematics 8/22


EXERCISE:
Write the following statements in the form “if p, then q” in
English.
1)To get tenure as a professor, it is sufficient to be world-famous.
If you are world-famous, then you will get tenure as a professor.
2)That you get the job implies that you have the best credentials.
If you get the job, then you have the best credentials.
3)It is necessary to walk 8 miles to get to the top of the Peak.
If you get to the top of the peak, then you must have walked 8
miles.

Lecture: 4 & 5 Discrete Mathematics 9/22


Translating symbolic propositions to english
Let p, q, and r be the propositions:
p = “you have the flu”
q = “you miss the final exam”
r = “you pass the course”
Express the following propositions as an English sentence
(1) p →q
If you have flu, then you will miss the final exam.
(2) ∼q → r
If you don’t miss the final exam, you will pass the course.
(3) ∼p ∧ ∼q→ r
If you neither have flu nor miss the final exam, then you will
pass the course.

Lecture: 4 & 5 Discrete Mathematics 10/22


Example 2
Construct a truth table for the statement form p ∨ ∼ q → ∼ p

Lecture: 4 & 5 Discrete Mathematics 11/22


Example 3
Construct a truth table for the statement form (p →q)∧(∼ p → r)

Lecture: 4 & 5 Discrete Mathematics 12/22


Example 4
Use truth table to show p→q ≡ ∼q → ∼p

The last two columns imply that the expressions are equivalent.

Lecture: 4 & 5 Discrete Mathematics 13/22


IMPLICATION LAW

p→q ≡ ∼p∨q

Lecture: 4 & 5 Discrete Mathematics 14/22


Negation of a conditional statement

Since p→q ≡ ∼p∨q , therefore

Statement Reason
∼(p→q)≡ ∼(∼p∨ q)
≡ ∼(∼ p) ∧ ∼q by De Morgan’s law
≡p ∧∼q Double Negative Law

Thus the negation of “if p then q” is logically equivalent to “p and


not q”.

Lecture: 4 & 5 Discrete Mathematics 15/22


Accordingly,
the negation of an if-then statement does not start with the word
if.
Example 5
Write negations of each of the following statements:
(1) If Ali lives in Pakistan then he lives in Lahore.
(2) If my car is in the repair shop, then I cannot get to class.
(3) If x is prime then x is odd or x is 2.
(4) If n is divisible by 6, then n is divisible by 2 and n is divisible
by 3.
SOLUTIONS:
(1) Ali lives in Pakistan and he does not live in Lahore.
(2) My car is in the repair shop and I can get to class.
(3) x is prime but x is not odd and x is not 2.
(4) n is divisible by 6 but n is not divisible by 2 or by 3

Lecture: 4 & 5 Discrete Mathematics 16/22


Inverse of a conditional statement

The inverse of the conditional statement p → q is ∼p → ∼q.


A conditional and its inverse are not equivalent as could be seen
from the truth table.

Lecture: 4 & 5 Discrete Mathematics 17/22


Example 6 (Writing Inverse)
(1) If today is Friday, then 2 + 3 = 5.
If today is not Friday, then 2 + 3 6= 5.
(2) If it snows today, I will ski tomorrow. If it does not snow
today I will not ski tomorrow.
(3) If P is a square, then P is a rectangle. If P is not a square
then P is not a rectangle.
(4) If my car is in the repair shop, then I cannot get to class. If
my car is not in the repair shop, then I shall get to the class.

Lecture: 4 & 5 Discrete Mathematics 18/22


Converse of a conditional statement
The converse of the conditional statement p → q is q →p.
A conditional and its converse are not equivalent. That is, → is
not a commutative operator.

Lecture: 4 & 5 Discrete Mathematics 19/22


WRITING CONVERSE
(1) If today is Friday, then 2 + 3 = 5.
If 2 + 3 = 5, then today is Friday.
(2) If it snows today, I will ski tomorrow.
I will ski tomorrow only if it snows today.
(3) If P is a square, then P is a rectangle.
If P is a rectangle then P is a square.
(4) If my car is in the repair shop, then I cannot get to class.
If I cannot get to the class, then my car is in the repair shop.

Lecture: 4 & 5 Discrete Mathematics 20/22


Contrapositive of a conditional Statement
The contrapositive of the conditional statement p → q is
∼q → ∼ p.
A conditional and its contrapositive are equivalent.
Symbolically, p → q ≡ ∼q → ∼ p

Example 7
(1) If today is Friday, then 2 + 3 = 5.
If 2 + 3 =6 5, then today is not Friday.
(2) If it snows today, I will ski tomorrow.
I will not ski tomorrow only if it does not snow today.
(3) If P is a square, then P is a rectangle.
If P is not a rectangle then P is not a square.
(4) If my car is in the repair shop, then I cannot get to class.
If I get to the class, then my car is not in the repair shop.

Lecture: 4 & 5 Discrete Mathematics 21/22


Exercises

Q.1: Show that each conditional statement in the following is a


tautology without using truth tables

Q.2: Show that (p→ q) ∨(p→ r) and p → (q∨r) are logically


equivalent without using truth table.
Q.3: Show that (p →r)∨(q →r) and (p∧ q)→r are logically
equivalent without using truth table.

Lecture: 4 & 5 Discrete Mathematics 22/22

You might also like