Ch19 Student
Ch19 Student
19.1.1
Show that the formula for dn can be written as follows:
dn = 3 × 4 × · · · × (n − 1) × n
− 4 × · · · × (n − 1) × n + . . .
+ (−1)n−1 n + (−1)n .
19.1.3
Show that the derangement numbers dn also satisfy the recursion
d1 = 0, dn = ndn−1 + (−1)n (n ≥ 2) .
Is there any advantage in using this recursion (rather than the usual one) for
the calculation of dn ?
Solution
dn = (n − 1)(dn−1 + dn−2 )
= ndn−1 + en−1
where
Thus en−1 = (−1)n−3 e2 , where e2 = 2d1 − d2 = −1, and the result follows.
With this recursion the number of multiplications is the same, but less space
is needed to store the data, since only one ‘previous value’ is used.
Solutions to Chapter 19 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002
19.2.1
Find an explicit formula for un when
(i) u0 = 1, u1 = 1, un+2 − 3un+1 − 4un = 0 (n ≥ 0);
(ii) u0 = −2, u1 = 1, un+2 − 2un+1 + un = 0 (n ≥ 0).
Solution
(i) The auxiliary equation is t2 − 3t − 4 = 0, with roots 4 and −1, so the
solution is of the form un = A4n + B(−1)n , for some constants A, B. Substi-
tuting the given values of u0 and u1 , we find that A = 45 and B = − 15 , so the
solution is
1 n
un = (4 − 4(−1)n ) .
5
un = 3n − 2.
Solutions to Chapter 19 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002
19.2.2
The Fibonacci numbers fn are defined by the recursion
f1 = 1, f2 = 1, fn+1 = fn + fn−1 (n ≥ 2) .
Show that
" √ !n √ !n #
1 1+ 5 1− 5
fn = √ − .
5 2 2
19.2.3
Let qn denote the number of words of length n in the alphabet {0, 1} which
have the property that no two consecutive terms are 0. Show that
q1 = 2, q2 = 3, qn+2 = qn+1 + qn (n ≥ 0) .
(n = 1) : 0, 1 q1 = 2; (n = 2) : 01, 10, 11 q2 = 3.
To obtain the recursion, split the relevant words of length n + 2 into two
sets, those that begin with 1 and those that begin with 0. In the first set, the
remaining n + 1 terms can be either 0 or 1, subject to the given constraint, so
the number is qn+1 . In the second set, the second term can only be 1, and the
remaining n terms can be either 0 or 1, subject to the given constraint, so the
number is qn .
Solutions to Chapter 19 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002
19.3.1
Prove that if
u2 = 5, u2r = 2ur + 3 (r = 2k , k ≥ 1)
then un = 4n − 3 whenever n is a power of 2.
u2 = 5 and 4 × 2 − 3 = 5.
19.3.2
Prove that if
u2 = 5, ur+s = ur + us + 3 (r ≥ s ≥ 2)
then un = 4n − 3 whenever n is even. [Hint: write n as a sum of powers of 2
and use Ex. 19.3.1.]
n = 2a + 2b + · · · + 2f ,
r = 2a , s = 2b + · · · + 2f ,
so that n = r + s. If s = 0 then n = 2a and the result holds, by Ex. 19.3.1.
If s 6= 0 then r and s are positive even numbers less than n, and we can use
the strong principle of induction. Assuming that the formula is true for all even
numbers less than n, we have
un = ur + us + 3
= (4r − 3) + (4s − 3) + 3
= 4(r + s) + −3
= 4n − 3.
19.4.1
Suppose a manager has six units to invest in four companies C1 , C2 , C3 , C4 ,
but companies C1 and C2 allow investment only in multiples of two units. If
the estimated returns are as given in the table, find the best total return. Is the
best policy unique?
Company
Investment C1 C2 C3 C4
0 0 0 0 0
1 — — 0 2
2 0 3 1 3
3 — — 3 4
4 4 6 5 4
5 — — 7 4
6 8 9 9 4
Solution Using the method given in the text, the best total return is 9, and
there are four optimal policies:
x1 x2 x3 x4
0 6 0 0
0 0 5 1
0 4 0 2
0 0 6 0.
Solutions to Chapter 19 Exercises
in Discrete Mathematics by Norman L. Biggs;
2nd Edition 2002
19.5.1
An investment problem is defined to be a DP problem of the standard form
which can be decomposed into stages in the following manner: the stage return
ri depends only on xi , where xi is the decision variable and represents an amount
‘invested’ at Stage i; and the state variable yi represents the total amount
invested up to and including Stage i.
Write down the stage transformations for an investment problem and show
that if y0 = 0 the recursion can be written in the form
f1 (y1 ) = r1 (y1 ) ,
fi (yi ) = max {fi−1 (yi−1 ) + ri (yi − yi−1 )} .
yi−1
yi = yi−1 + xi (i ≥ 1),
where y0 = 0. Thus xi = yi − yi−1 (i ≥ 1), and in particular x1 = y1 . Therefore
Solution
Stage 1 y1 a b c d
f1( y1 ) 5 1 4 6
Stage 2 y2 e f g h
f2( y2 ) 9 3 6 7
Stage 3 y3 i j k l
f3( y3 ) 6 7 9 10
Stage 4 y4 m n o p
f4( y4 ) 8 14 12 19
Stage 5 y5 t
f5( y5 ) 14
Min = 14
Two solutions s; b; f; i; m; t or s; d; h; k; o; t
201