Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

64 Chapter 4

Practice

404 Problem Solve the recursion x0 = 0, x1 = 1, xn = 10xn−1 − 21xn−2 . 406 Problem Solve the recursion x0 = 0, x1 = 1, xn = 10xn−1 − 21xn−2 + n.

405 Problem Solve the recursion x0 = 0, x1 = 1, xn = 10xn−1 − 25xn−2 . 407 Problem Solve the recursion x0 = 0, x1 = 1, xn = 10xn−1 − 21xn−2 + 2n .

4.7 Applications of Recursions


408 Example Find the recurrence relation for the number of n digit binary sequences with no pair of consecutive 1’s.

Solution: It is quite easy to see that a1 = 2, a2 = 3. To form an , n ≥ 3, we condition on the last digit. If it is 0, the number of
sequences sought is an−1 . If it is 1, the penultimate digit must be 0, and the number of sequences sought is an−2 . Thus

an = an−1 + an−2, a1 = 2, a2 = 3.

409 Example Let there be drawn n ovals on the plane. If an oval intersects each of the other ovals at exactly two points and
no three ovals intersect at the same point, find a recurrence relation for the number of regions into which the plane is divided.

Solution: Let this number be an . Plainly a1 = 2. After the n − 1th stage, the nth oval intersects the previous ovals at 2(n − 1)
points, i.e. the nth oval is divided into 2(n − 1) arcs. This adds 2(n − 1) regions to the an−1 previously existing. Thus

an = an−1 + 2(n − 1), a1 = 2.

410 Example Find a recurrence relation for the number of regions into which the plane is divided by n straight lines if every
pair of lines intersect, but no three lines intersect.

Solution: Let an be this number. Clearly a1 = 2. The nth line is cut by he previous n − 1 lines at n − 1 points, adding n new
regions to the previously existing an−1 . Hence
an = an−1 + n, a1 = 2.

411 Example (Derangements) An absent-minded secretary is filling n envelopes with n letters. Find a recursion for the
number Dn of ways in which she never stuffs the right letter into the right envelope.

Solution: Number the envelopes 1, 2, 3, · · · , n. We condition on the last envelope. Two events might happen. Either n and
r(1 ≤ r ≤ n − 1) trade places or they do not.
In the first case, the two letters r and n are misplaced. Our task is just to misplace the other n − 2 letters,
(1, 2, · · · , r − 1, r + 1, · · · , n − 1) in the slots (1, 2, · · · , r − 1, r + 1, · · · , n − 1). This can be done in Dn−2 ways. Since r can be
chosen in n − 1 ways, the first case can happen in (n − 1)Dn−2 ways.
In the second case, let us say that letter r, (1 ≤ r ≤ n − 1) moves to the n-th position but n moves not to the r-th position. Since
r has been misplaced, we can just ignore it. Since n is not going to the r-th position, we may relabel n as r. We now have n − 1
numbers to misplace, and this can be done in Dn−1 ways.
As r can be chosen in n − 1 ways, the total number of ways for the second case is (n − 1)Dn−1. Thus
Dn = (n − 1)Dn−2 + (n − 1)Dn−1.

412 Example There are two urns, one is full of water and the other is empty. On the first stage, half of the contains of urn I is
passed into urn II. On the second stage 1/3 of the contains of urn II is passed into urn I. On stage three, 1/4 of the contains of
urn I is passed into urn II. On stage four 1/5 of the contains of urn II is passed into urn I, and so on. What fraction of water
remains in urn I after the 1978th stage?

You might also like