0% found this document useful (0 votes)
26 views6 pages

Math4575 HW Chapter7

The document contains solutions to math homework problems involving recurrence relations and Fibonacci numbers. It provides the problems, solutions through induction or solving the characteristic polynomial, and formulas for the recurrence relations. The document contains 10 problems with full worked out solutions and reasoning.

Uploaded by

李王仁
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

Math4575 HW Chapter7

The document contains solutions to math homework problems involving recurrence relations and Fibonacci numbers. It provides the problems, solutions through induction or solving the characteristic polynomial, and formulas for the recurrence relations. The document contains 10 problems with full worked out solutions and reasoning.

Uploaded by

李王仁
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Math 4575 : HW #6

Chapter 7: #1, 2, 8, 31, 32, 33, 37, 38, 39, 40

• #1
Let f0 , f1 , f2 , . . . denote the Fibonacci sequence. By evaluating each of the
following expressions for small values of n, conjecture a general formula and
then prove it, using mathematical induction and the Fibonacci recurrence.
(Comment: we observe the convention that f0 = 0, f1 = 1, etc.)
(a)
f1 + f3 + · · · + f2n−1 = f2n
The proof is by induction. The formula holds for n = 1, and suppose it
holds for some n ≥ 1, adding f2n+1 to both sides gives

f1 + f3 + · · · + f2n+1 = f2n + f2n+1 = f2n+2 ,

so the identity holds for n + 1 as well. By induction, the result holds for all
n ≥ 1.
(b)
f0 + f2 + · · · + f2n = f2n+1 − 1
The formula holds for n = 0, and suppose it holds for some n ≥ 0, adding
f2n+2 to both sides gives

f0 + f2 + · · · + f2n + f2n+2 = f2n+1 + f2n+2 − 1 = f2n+3 − 1,

so the identity holds for all n ≥ 0 by induction.

(c)
f0 − f1 + f2 − · · · + (−1)n fn = (−1)n fn−1 − 1

Again, we proceed by induction. If we make the (reasonable) convention


that f−1 = 1, then it holds for n = 0. One could also have the base case be
n = 1. Assuming that the formula holds for n, add (−1)n+1 fn+1 to both
sides to obtain

f0 − f1 + f2 − · · · + (−1)n+1 fn+1 = (−1)n fn−1 + (−1)n+1 fn+1 − 1


= (−1)n+1 (fn+1 − fn−1 ) − 1
= (−1)n+1 fn − 1,

as desired.

1
(d)
f02 + f12 + · · · + fn2 = fn fn+1
2
The formula holds for n = 0. Now suppose it holds for n and add fn+1 to
both sides. We have

f02 + f12 + · · · + fn+1


2 2
= fn fn+1 + fn+1
= fn+1 (fn + fn+1 )
= fn+1 fn+2 ,

so it holds with n + 1 as well. By induction it holds for every n ≥ 0.


• #2
Prove that the nth Fibonacci number is the integer that is closest to the number
√ !n
1 1+ 5
√ .
5 2

We have the formula


√ !n √ !n
1 1+ 5 1 1− 5
fn = √ −√ ,
5 2 5 2

so the desired result follows if we know that


√ !n
1 1 − 5 1
√ < ,

5 2 2

√ √ n
but this is clear. Indeed, (1/ 5) < 1/2 and (1 − 5)/2 ≤ 1 for n ≥ 0.

• #8
Consider a 1-by-n chessboard. Suppose we color each square of the chessboard
with one of the two colors red and blue. Let hn be the number of colorings in
which no two squares that are colored red are adjacent. Find and verify a recur-
rence relation that hn satisfies. Then derive a formula for hn .

We claim that hn = hn−1 + hn−2 , (n ≥ 2), and h0 = 1 and h1 = 2.


The recurrence is checked as follows. Take a sequence of length n where n ≥ 2.
If the last square is blue, remove it to obtain a sequence of length n − 1. If the
last square is red, then the previous square must be blue, so remove both tiles to
obtain a sequence of length n − 2. This process is reversible: given a sequence of
length n−2, one can append blue and red tile (in this order), and given a sequence
of length n − 1, one can append a blue tile. So we have hn = hn−1 + hn−2 . The

2
initial conditions are straightforward: there is one (empty) tiling of the 1-by-0
chessboard, and both tilings of the 1-by-1 chessboard are allowable, so h = 1
and h2 = 2.
This has the same recurrence as the Fibonacci numbers, and almost the same
initial values, except shifted. In other words hn = fn+2 .
Then our formula for the Fibonacci numbers implies that
√ !n+2 √ !n+2
1 1+ 5 1 1− 5
hn = √ −√ .
5 2 5 2

Other forms for the answer are possible, for example if you would rather have n
in the exponent than n + 2, after a little algebra we have
√ √ !n √ √ !n
5+3 5 1+ 5 5−3 5 1− 5
hn = + .
10 2 10 2

• #31
Solve the recurrence relation hn = 4hn−2 , (n ≥ 2) with initial values h0 = 0
and h1 = 1.

Writing the first few values, we have


0, 1, 0, 4, 0, 16, 0, 64, 0, 250, 0 . . .
We can guess the formula, which then follows by strong induction.
hn = 0 if n is even, and
hn = 4(n−1)/2 = 2n−1 if n is odd.
Other forms of the answer are possible. For example,
1 n 1
hn = 2 − (−2)n .
4 4
You can obtain this by solving the recurrence with standard methods, since it is
linear homogeneous with constant coefficients.

• #32
Solve the recurrence relation hn = (n + 2)hn−1 , (n ≥ 1) with initial value
h0 = 2.

The first few terms of the sequence are


2, 2 × 3, 2 × 3 × 4, 2 × 3 × 4 × 5, . . . .
This looks like the factorial sequence, but shifted. Indeed, we guess hn = (n +
2)! and once we observe it, it follows immediately by strong induction.

3
• #33
Solve the recurrence relation hn = hn−1 + 9hn−2 − 9hn−3 , (n ≥ 3) with initial
values h0 = 0, h1 = 1, and h2 = 2.

The characteristic polynomial is x3 − x2 − 9x + 9, which factors as


(x + 3)(x − 3)(x − 1)
which has roots ±3, 1. A general solution to the recurrence is given by
hn = c1 3n + c2 (−3)n + c3 .
Evaluating at n = 0, 1, 2 gives
0 = c1 + c2 + c3
1 = 3c1 − 3c2 + c3
2 = 9c1 + 9c2 + c3

Straightforward linear algebra gives c1 = 1/3, c2 = −1/12, and c3 = −1/4. So


1 n 1 1
hn = 3 − (−3)n − .
3 12 4

• #37
Determine a recurrence relation for the number an of ternary strings (made up
of 0’s, 1’s, and 2’s) of length n that do not contain two consecutive 0’s or two
consecutive 1’s. Then find a formula for an .

The key observation is that an satisfies a recurrence, namely


an = 2an−1 + an−2 , (n ≥ 2),
with initial conditions a0 = 1 and a1 = 3. The justification for the recurrence is
the following. Given a sequence of length n − 2, one can append 22 to the end to
obtain an allowable sequence of length n. Give a sequence of length n − 1, one
can append any number different from the last number in the current sequence to
obtain an allowable sequence of length n. (If the sequence of length n − 1 ends
in 0, you can add a 1 or 2, etc.) It is easy to verify that every sequence of length
n is obtain this way exactly once. Indeed, to reverse the algorithm, consider the
last two digits. If they are double, they must be 22 and it came from a sequence
of length n − 2. If the digits are not doubled, then it came from a sequence of
length n − 1.
Once we have this recurrence and initial values, we can use our standard tech-
niques. In this case, after a little calculation we find
1 √ n+1 1  √ n+1
an = 1+ 2 + 1− 2 .
2 2

4
Other forms for the answer are possible. For example,
√ ! √ !
1+ 2  √ n 1− 2  √ n
an = 1+ 2 + 1− 2 .
2 2

• #38
Solve the following recurrence relations by examining the first few values for a
formula and then proving your conjectured formula by induction.
(a) hn = 3hn−1 , (n ≥ 1); h0 = 1.

1, 3, 9, 27, 81, 241, 729, . . .


We guess hn = 3n . Once we make the guess, the proof holds by induction.
(b) hn = hn−1 − n + 3, (n ≥ 1); h0 = 2.

2, 4, 5, 5, 4, 2, −1, −5, . . .
We guess that hn is quadratic, i.e. hn = an2 + bn + c for some constants
a, b, and c that don’t depend on n. (We didn’t talk about it in class, but
the following idea is covered in this chapter of the book: the “difference
sequence” for a polynomial of degree n should be a polynomial of degree
n − 1. If so, a little computation gives that a = −1/2, b = 5/2, and c = 2.
Verifying the recurrence is now straightforward proof by induction. We
have
1 5
hn = − n2 + n + 2.
2 2

(c) hn = −hn−1 + 1, (n ≥ 1); h0 = 0

0, 1, 0, 1, 0, 1, 0, 1, . . .
It seems that hn = 0 for n even and hn = 1 for n odd, easily proved by
induction. (This answer may be written in various forms.)
(d) hn = −hn−1 + 2, (n ≥ 1); h0 = 1

1, 1, 1, 1, 1, . . .
It seems that hn = 1 for every n ≥ 0. The proof? By induction.

5
(e) hn = 2hn−1 + 1, (n ≥ 1); h0 = 1

1, 3, 7, 15, 31, 63, . . .


We try hn = 2n+1 − 1. The result is easily verified by induction.
• #39
Let hn denote the number of ways to perfectly cover a 1×n board with monomi-
noes and dominoes in such a way that no two dominoes are consecutive. Find,
but do not solve, a recurrence relation and initial conditions satisfied by hn .

We claim that
hn = hn−1 + hn−3 , (n ≥ 3)
with initial conditions h0 = 1, h1 = 1, and h2 = 2. Indeed, if the rightmost
tile is a monomino, remove it to obtain a tiling of a 1 × (n − 1) board. If it is a
domino and n ≥ 3 then the domino must have been preceded by a monomino.
So remove both the domino and monomino to obtain a tiling of an 1 × (n − 3)
board.
This algorithm is reversible. Given a tiling of a 1×(n−1) board, one can always
add a monomino on the right. And given a tiling of a 1 × (n − 3) board, one can
always add a monomino and then a domino. So this gives a bijection between
sequences of length n and the disjoint union of sequences of length n − 1 and
n − 3.

• #40
Let an equal the number of ternary strings of length n made up of 0’s, 1’s,
and 2’s, such that the substrings 00, 01, 10, and 11 never occur. Prove that
an = an−1 + 2an−2 , (n ≥ 2), with ao = 1 and a1 = 3. Find a formula for an .

Given any allowable sequence of length n − 1, one can append a 2 to the end to
obtain an allowable sequence of length n. Given an allowable sequence of length
n − 2, one can append 21 or 20 an obtain an allowable sequence of length n.
This algorithm is reversible. Given an allowable sequence of length n ≥ 2, if
it ends in 0 or 1, it must end with 20 or 21 respectively. Removing this gives a
sequence of length n − 2. If it ends in 2, one can remove the 2 to have a sequence
of length n − 1.
Now, to solve the recurrence is straightforward. The characteristic polynomial is
x2 − x − 2 = 0, which has roots x = 2 and x = −1. The general form of the
solution is an = c1 2n + c2 (−1)n . Putting in the initial conditions allows us to
solve for c1 and c2 . We have
4 n 1
an = 2 − (−1)n .
3 3

You might also like