The following solutions make use of information found on pages 424 - 438 of the textbook.
Fill in the blanks to complete the following sentences.
You should attempt all these exercises yourself, using the textbook as an aid. Once you have attempted each question, check your answers by following the appropriate links. If you are stuck on a question, choose the link that gives you a hint and then try the question again.
1. Let c0, c1, c2, ... be a sequence that satisfies
the following recurrence relation: for all integers k2,
(1) ck = (k-1) · ck-1 + k · ck-2 + k
(2) c0 = 1 and c1=2.
Calculate the values of c2, c3, and c4.
2. Let b0, b1, b2, ... be a sequence that satisfies
the following recurrence relation: for all integers i2, bi = 5 · bi-1 - 6 · bi-2.
Write expressions for bi+1 and for bi+2.
3. Show that the sequence 1, 1, 2, 6, 24, 120, ... , n!, ... for n0 satisfies the recurrence
relation bk = k · bk-1 for all integers k
1.
4. Show that the sequence 5, 10, 20, 40, ... , 5 · 2k, ... for k0 satisfies the recurrence
relation an = 2 · an-1 for all integers n
1.
5. Read the discussion of the tower of Hanoi on pages 427 - 430 of the textbook. For each
integer n1 let mn
be the minimum number of moves needed to move a tower of n disks from one pole to another.
a) Find m1.
b) Find a formula for mn in terms of mn-1.
c) Work out the minimum number of moves required to move a tower of 7 disks from one pole
to another.
d) Find m32.
6. Read the discussion on the Fibonacci Numbers on pages 431 - 432. For each integer
n, n1, let
Fn = the number of rabbit pairs alive at the end of month n
and let F0 = the initial number of rabbit
pairs = 1.
a) Find F1.
b) Find a formula for Fn in terms of Fn-1 and Fn-2.
c) How many rabbit pairs will there be at the end of two years? (Assume no rabbits die.)
7. Bit strings
a) Make a list of all bit strings of lengths 0, 1, 2, and 3 that do not contain the bit
pattern 10.
b) For each integer n0 let Sn
= the number of bit strings of length n that do not contain the pattern 10. Find S0,
S1, S2 and S3.
c) Find the number of bit strings of length ten that do not contain the pattern 10. (Use a
recurrence relation for Sn.)
The following solutions make use of information found on pages 453 - 464 of the textbook.
Fill in the blanks to complete the following sentences.
You should attempt all these exercises yourself, using the textbook as an aid. Once you have attempted each question, check your answers by following the appropriate links. If you are stuck on a question, choose the link that gives you a hint and then try the question again.
1. Which of the following defines a second-order linear homogeneous recurrence relation
with constant coefficients?
a) ak+1 = 4 ak - 1/2 ak-1
b) bk = - bk-1 + 5
c) ck = a · ck-1 + ck-2 (where a is a particular
real number)
d) dk = dk-1 · dk-2
e) ek = 2 ek-1 + 3 ek-2 - ek-3
2. Consider the recurrence relation ak = 2 ak-1 + 15 ak-2
for all integers k2. Find
all the sequences of the form 1, t, t2, t3, ..., tn,...
which satisfy this recurrence relation.
3. Consider the second-order linear homogeneous recurrence relation rk
= rk-1 + 2 rk-2.
a) Find the two sequences which satisfy this relation; call these sequences bk
and ck.
b) Now let an = 3 bn - cn for all n0. Show that for all integers k
2, the sequence ak also
satisfies the recurrence relation rk = rk-1 + 2 rk-2.
4. Find a sequence that satisfies the recurrence relation bk = 5 bk-1 - 4 bk-2 and that also satisfies the initial conditions b0 = 2 and b1 = 3.
5. Find an explicit formula for the sequence a0, a1, a2,
... which satisfies the recurrence relation ak = ak-1 + 6 ak-2
and that also satisfies the initial conditions a0 = 13 and a1
= -1.
The following solutions make use of information found on pages 466 - 470 of the textbook.
Fill in the blanks to complete the following sentences.
1 | ai | = |
a1 | and |
n | ai | = |
( |
n-1 | ai | ) | + |
an, | if n > 1. |
S | S | S | ||||||||||||
i=1 | i=1 | i=1 |
1 | ai | = |
a1 | and |
n | ai | = |
( |
n-1 | ai | ) | · |
an, | if n > 1. |
P | P | P | ||||||||||||
i=1 | i=1 | i=1 |
You should attempt all these exercises yourself, using the textbook as an aid. Once you have attempted each question, check your answers by following the appropriate links. If you are stuck on a question, choose the link that gives you a hint and then try the question again.
1. Complete the following program to show how you might compute the product of a[1], a[2], ..., a[n].
prod := 0
for k := 1 to n
prod := prod · a[k]
next k.
2. Prove, using mathematical induction or otherwise, that for any positive integer n, if a1, a2, ..., an and b1, b2, ..., bn are real numbers then:
n | (ai · bi) | = |
n | ai | · |
n | bi. |
P | P | P | |||||
i=1 | i=1 | i=1 |