Discrete Mathematics (H) Lecture 12 Notes
Mathematical Induction
Proof by Smallest Counterexample
The statement
- Assume that a counterexample exists, i.e.,
. - Let
be the smallest value for which is false - Then use the fact that
is true for all to show that is true, contradicting the choice of .
Example
To show that
We can observe that the key step was proving that
is true - If
, then
Then we can use proof by smallest counterexample to derive that
The Principle of Mathematical Induction
The well-ordering principle permits us to assume that every set of nonnegative integers has a smallest element, allowing us to use the smallest counterexample. This is equivalent to the principle of mathematical induction.
Example: The Weak Principle of Mathematical Induction
- If the statement
is true, and - the statement
is true for all , then is true for all integers .
Then
Example
To show that
- Base case: When
, - Inductive step: Suppose that
and that , we then have
So by mathematical induction,
Note that different base cases can lead to different conclusions
Example
To show that
- Base case: When
, - Inductive step: Suppose that
and that , we then have
So by mathematical induction,
We may have another form of induction as follows:
The Strong Principle of Mathematical Induction
- If the statement
is true, and - for all
, the statement is true.
Then
Example
To show that every positive integer is a power of a prime or the product of powers of primes, we use the strong principle of mathematical induction:
- Base step:
is a power of a prime number . - Inductive hypothesis: Suppose that every number less than
is a power of a prime or a product of powers of primes. - Inductive step: Then if
is not a prime, it is a product of two smaller numbers, each of which is, by the i.h., a power of a prime or a product of powers of primes.
Thus, by mathematical induction, every positive integer is a power of a prime or a product of powers of primes.
Tip
The weak form is a special case of the strong form, and the strong form can be derived from the weak form.
Recursion
Recursive computer programs or algorithms often lead to inductive analysis. A classical example is the Towers of Hanoi problem:
To move
- Move top
disks from to - Move largest disk from
to - Move top
disks from to .
To prove the correctness of the solution, we use the induction:
is a statement that the algorithm is correct for disks. is trivial to prove. is a recursion statement that: if our algorithm works for disks, then we can build a correct solution for disks.
And to calculate the running time, we need to solve the expression of
total disk moves for
- Base case:
- Inductive step: Assume that
for . Then
Recurrences
Definition: Recurrence Equation
A recurrence equation or recurrence for a function
defined on the set of integers
Example
To show that the subsets of
- Each subset
containing can be constructed in a unique fashion by adding to the subset not containing . - Each subset
not containing can be constructed by removing from the unique set containing .
So, the number of subsets containing
Iterating a Recurrence
Let
This method we used to guess the solution is called iterating the recurrence. The iteration can in either bottom-up or top-down order.
Theorem
If
Proof by induction:
- Base case:
- Inductive case: Assume that
and
First-Order Linear Recurrences
Definition: First-Order Linear Recurrence
A recurrence of the form
Theorem
For any positive constants
Divide-and-conquer Algorithms
The recurrences of the form
Examples of Iterating Recurrences
Example 1
- solving 2 subproblems of size
, and - doing
units of additional work
or using
Tip
You may notice this recurrence corresponds to the merge sort.
Solution. w.l.o.g. we assume that
Example 2
Example 3
Example 4
Example 5
The Master Theorem
The Master Theorem
Suppose that we have a recurrence of the form
- If
, then - If
, then - If
, then
- Title: Discrete Mathematics (H) Lecture 12 Notes
- Author: Zhige Chen
- Created at : 2025-11-10 21:41:56
- Updated at : 2025-12-08 23:43:10
- Link: https://nofe1248.github.io/2025/11/10/discrete-math-lec-12/
- License: This work is licensed under CC BY-NC-SA 4.0.