Chapter 4 Induction and Recursion
Example 4.1.
We begin with two statements that we might try to prove are true for every positive integer. Are both of these statements true for every positive integer?
My car will start on the nth day after yesterday.
The sum of the first n positive integers is n(n+1)/2.
Problem 4.2.
Show that each statement is true.
The sum of the squares of the first 2 positive integers is 2(2+1)(2(2)+1)6.
The sum of the squares of the first 3 positive integers is 3(3+1)(2(3)+1)6.
The sum of the squares of the first n positive integers is n(n+1)(2n+1)6 for all n≥2.
Problem 4.3.
Show that each statement is true.
The sum of the first 2 cubes is 22(2+1)24.
The sum of the first 3 cubes is 32(3+1)24.
The sum of the first n cubes is n2(n+1)24 for all n≥2.
Problem 4.4.
A set of numbers is bounded if there are two numbers m and M so that for each number x in the set, m≤x≤M.
Show that a set with one element is bounded.
Show that a set with two elements is bounded.
Show that a set with three elements is bounded.
Show that for each positive integer n, a set with n elements is bounded.
Problem 4.5.
Show that a postage of 12, 13, 14 or 15 cents may be formed using only 4-cent and 5-cent stamps. Then show that every amount of postage of 12 cents or more can be formed using just 4-cent and 5-cent stamps.
Problem 4.6.
Show that the sum of the first n odd positive integers is n2.
Problem 4.7.
Assume Theorem 3.7 (The Multiplication Principle for Counting) is true and prove that Theorem 3.8 (The Generalized Multiplication Principle for Counting) is true for every positive integer n.
Problem 4.8.
From your Calculus I course, you know that if each of f and g is a differentiable functions, then (fg)′=f′g+fg′. Use induction to show that for every positive integer n, if each of f1,f2,f3,…fn is a differentiable function then
Only one disk may be moved at a time.
Each move consists of taking the upper disk from one of the rods and moving it onto another rod, on top of any other disks that may already be present on that rod.
No disk may be placed on top of a smaller disk.
Problem 4.9.
Show that it is possible to solve the Tower of Hanoi puzzle with n discs in 2n−1 moves.
Problem 4.10.
Show that to solve the Tower of Hanoi puzzle on n discs, at least 2n−1 moves must be made.
Problem 4.11.
Show that 1/2+1/4+1/8+1/16+....+1/2n=1−1/2n.
Problem 4.12.
Show that 30+31+32+⋯+3n=(3n+1−1)/2 is valid for all non-negative integers, n=0,1,2,….
Definition 4.13.
A positive integer is a prime if it has exactly two positive factors, 1 and itself.
Problem 4.14.
You have an interview with the NSA and they ask you if p(n)=n2−n+41 is prime for every positive integer n. Is it?
Problem 4.15.
Show that
Problem 4.16.
Prove that every positive integer is either 1, a prime, or the product of primes.
Problem 4.17.
There are many commonly used functions f with domain Z+ that are not easily defined explicitly. Instead, we tell how to compute f by what we call a recursive process. To do this, we
choose a positive integer b (often b=1),
give the values of f(1),f(2),...,f(b) explicitly, and
tell how to compute, for any k>b, the value of f(k) using the previous values f(1),f(2),f(3),...,f(k−1).
Prove that steps 1-3 can be used to compute f(n) for every positive integer n.
Problem 4.18.
Consider the following computer program:
Let i = 1 and a = 2 While i > 0 Do Print ''f('' i '') ='' a i=i+1 a=2a-1 End i While Loop
Use induction to prove that for each positive integer n the computer will eventually print f(n)=2n−1+1.
Problem 4.19.
The Fibonacci Sequence is obtained by taking b=2 and defining
F(1)=1,F(2)=1 and
F(k)=F(k−2)+F(k−1) for k≥3.
Compute F(3) through F(12). Use induction to prove that for all n≥1,
Problem 4.20.
Check that F(3),F(6),F(9) and F(12) are even. Then use induction to prove that F(3n) is even for all n≥1.