














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Lecture notes from docsity.com on discrete mathematics, focusing on mathematical induction and recursion. It includes examples of induction proofs and recursive functions, as well as explanations of strong induction and recursive sets.
Typology: Slides
1 / 22
This page cannot be seen from the preview
Don't miss anything!















Someone with zero hairs is bald.
Someone with one more hair than a bald person is bald.
.
. turn the inductive crank……
.
Therefore, someone with
1,000, 000 hairs is bald.
What’s wrong with this induction?
Induction Hypothesis
P(k) = ∑ki=1 2i-1= k^2
Inductive Steps P(k+1) = ∑k+1i=1 2i- = ki=1 2i-1 + (2 (k+1) -1) = k^2 + (2k +1) = (k+1) 2
Show the sum of the first n positive even integers is n^2 + n Rephrased: ∀ n P(n) where P(n) = ∑ni=1 2 i = n 2
The three parts: Base case Inductive hypothesis Inductive step
Prove thatt if h> -1, then 1+nh ≤ (1+h)n^ for all non-negative integer n.
Prove that n^2 ≡ 1 mod 8 for all odd integer n.
Weak mathematical induction assumes P( k ) is true, and uses that (and only that!) to show P( k +1) is true
Strong mathematical induction assumes P(1), P(2), …, P( k ) are all true, and uses that to show that P( k +1) is true. [P(1) ∧ P(2) ∧ p(3) ∧ … ∧ P(k) ] → P(k+1)
Inductive step: Show that P( k +1) is true
There are two cases: k +1 is prime It can then be written as the product of k + k +1 is composite It can be written as the product of two composites, a and b, where 2 ≤ a ≤ b < k + By the inductive hypothesis, both P( a ) and P( b ) are true
Prove that every amount of 12 cents or more can be formed using just 4-cent and 5-sent stamps. Basis Step 12 = 3 * 4 cent stamp 13 = 2 * 4 + 1 * 5 14 = 1 * 4 + 2 * 5 15 = 3 * 5 Inductive step: Suppose P(j) is true for 12 ≤ j ≤ k (k≥15). It is sufficient to show that P(k+1) is true. We know that P(k-3) is true since k ≥ 15. To form postage of k+1 cents, we just need to add 1 4-cent postage to the stamps we used to form k-3 cents.
Sometimes it is difficult to define an object explicitly, but it is easier to define it in terms of itself.
We can define a function recursively by specifying: Basis: the value of the function at the smallest element of the domain. E.g.: f(0) = 1 Recursive step: A rule for finding the value of the function at an integer from its values at smaller integers E.g: f(n+1) = 2*f(n)
Many common functions can be defined recursively.
Let α = (1+√5)/2 = 1.61803…
For n ≥3, F(n) > αn-
Proof by induction.
Hint for the inductive step:
Solve x 2 -x-1=0 for x
Σ: Alphabet (set of symbols)
λ: Empty String
Σ*: set of all strings over the alphabet
Basis: λ∈Σ
Recursive Step: If w∈Σ* and x∈Σ, then wx ∈ Σ*
wx: string w followed by symbol x
Basis: The empty set is an extended binary tree
Recursive step: if T 1 and T 2 are extended binary trees, then the tree T 1 T 2 obtained by connecting a root r to the roots of T 1 and T 2 is also an extended binary tree
r