Department of Computer Science, CUI Lahore Campus: CSC102 - Discrete Structures by Mahwish Waqas
Department of Computer Science, CUI Lahore Campus: CSC102 - Discrete Structures by Mahwish Waqas
Department of Computer Science, CUI Lahore Campus: CSC102 - Discrete Structures by Mahwish Waqas
Lahore Campus
Lecture Outline
• Mathematical Induction
• Proof using Mathematical Induction
• Sequence formulas
• Inequality
• Divisibility
06/29/2021 CSC102 - Discrete Structures 3
Mathematical Induction
• It is a method of proof.
Mathematical Induction
•• Assume P(n) is a propositional function.
• Principle of mathematical induction:
To prove that P(n) is true for all positive integers n, we complete two steps.
Example
Suppose that we have an infinite ladder
1. We can reach the first step of the
ladder.
2. If we can reach a particular step of
the ladder, then we can reach the
next step.
Then, we can conclude that we are able
to reach every step of this infinite
ladder.
06/29/2021 CSC102 - Discrete Structures 7
Example
• An infinite row of dominoes, labeled 1,
2, 3, ..., n
• P(n): Domino n is knocked over
• P(1): The first domino is knocked over
• P(k): The kth domino is knocked over
• The fact that
• The first domino is knocked over
• And whenever the kth domino is knocked
over, it also knocks the (k+1)st domino over
• Implies that all the dominoes are
knocked over
06/29/2021 CSC102 - Discrete Structures 8
Example
• Show that 1 + 2 + 3 + … + n = n(n+1) / 2, where n is a
positive integer.
• Proof:
• First define P(n)
P(n) is 1 + 2 + 3 + … + n = n(n+1) / 2
Example
•Inductive
Step: (Show k (P(k) P(k+1)) is true.)
• Assume P(k) is true.
1 + 2 + 3 + … + k = k(k+1) / 2
• Show P(k+1) is true.
P(k+1) : 1 + 2 + 3 + … (k+1) = (k+1)(k+2) / 2
L.H.S of P(k+1) = 1 + 2 + … + k + k+1
= (1 + 2 + …+ k) + (k+1)
= k(k+1)/2 + (k+1)
= [k(k+1) + 2(k+1)]/2
= (k+1)(k+2)/2 = R.H.S of P(k+1)
• We showed that P(k+1) is true under assumption that P(k) is
true. So, by mathematical induction 1+2+…+n = n(n+1)/2.
06/29/2021 CSC102 - Discrete Structures 10
Example
•
• Use mathematical induction to show that for all
nonnegative integers n.
• Proof:
• First define P(n)
P(n) is
Example
•Inductive
Step: (Show k (P(k) P(k+1)) is true
• Assume P(k) is true.
Example
• Prove by mathematical induction
06/29/2021 CSC102 - Discrete Structures 14
Example
• Use mathematical induction to prove the formula for the
sum of a finite number of terms of a geometric
progression.
•
• Proof:
• First define P(n)
P(n) is
Example
• Inductive
Step: (Show k (P(k) P(k+1)) is true.)
• Assume P(k) is true.
• Show P(k+1) is true.
P(k+1) :
Proof:
• First define P(n)
P(n) is.
• Basis step: (Show P(4) is true.)
Proof:
Proof:
• First define P(n)
P(n) is
• Basis step: (Show P(1) is true.)
1
So, P(1) is true.
06/29/2021 CSC102 - Discrete Structures 25
Chapter Exercise
Chapter # 5
Topic # 5.1
Q 3, 4, 5, 7, 8, 18, 20, 21, 31, 32, 33, 34