Training Rec
Training Rec
RECURRENCES
(Last updated: December 7, 2021)
Exercises
1. Find the number of subsets of {1, 2, . . . , n} that contain no two consecutive elements
of {1, 2, . . . , n}.
2. Determine the maximum number of regions in the plane that are determined by n
“vee”s. A “vee” is two rays which meet at a point. The angle between them is any
positive number.
4. (Putnam 1996) Define a selfish set to be a set which has its own cardinality (number
of elements) as an element. Find, with proof, the number of subsets of {1, 2, . . . , n}
which are minimal selfish sets, that is, selfish sets none of whose proper subsets are
selfish.
5. Let a1 , a2 , . . . , an be an ordered sequence of n distinct objects. A derangement of this
sequence is a permutation that leaves no object in its original place. For example, if
the original sequence is 1, 2, 3, 4, then 2, 4, 3, 1 is not a derangement, but 2, 1, 4, 3 is.
Let Dn denote the number of derangements of an n-element sequence. Show that
Dn = (n − 1)(Dn−1 + Dn−2 ) .
Hints
1. The subsets of {1, 2, . . . , n} that contain no two consecutive elements can be divided
into two classes, the ones not containing n, and the ones containing n.
2. The (n + 1)th “vee” divides the existing regions into how many further regions?
3. The tilings of a n × 2 rectangle by dominoes can be divided into two classes depending
on whether we place the rightmost domino vertically or horizontally.
4. The minimal selfish subsets of {1, 2, . . . , n} can be divided into two classes depending
on whether they contain n or not.
5. Assume that b1 , b2 , . . . , bn is a derangement of the sequence a1 , a2 , . . . , an . How many
possible values can bn have? Once we have fixed the value of bn , divide the possible
derangements into two appropriate classes.
6. Find a recurrence for an .
7. Find a recurrence for an .
8. Find a general solution to the recurrence and determine for which value(s) of x1 the
sequence converges.
9. Prove that an divides ank if k is odd.
PUTNAM TRAINING RECURRENCES 4
Solutions
1. Let f (n) be that number. Then we easily find f (0) = 1 (the empty subset), f (1) = 2
(including the empty subset), f (2) = 3, f (3) = 5, f (4) = 8, . . . suggesting that
f (n) = Fn+2 (shifted Fibonacci sequence). We prove this by showing that f (n)
verifies the same recurrence as the Fibonacci sequence. The subsets of {1, 2, . . . , n}
that contain no two consecutive elements can be divided into two classes, the ones
not containing n, and the ones containing n. The number of the ones not containing
n is just f (n − 1). On the other hand the ones containing n cannot contain n − 1, so
their number equals f (n − 2). Hence f (n) = f (n − 1) + f (n − 2), QED.
2. Let xn be the number of regions in the plane determined by n “vee”s. Then x1 = 2,
and xn+1 = xn + 4n + 1. We justify the recursion by noticing that the (n + 1)th “vee”
intersects each of the other “vee”s at 4 points, so it is divided into 4n + 1 pieces, and
each piece divides one of the existing regions of the plane into two, increasing the
total number of regions by 4n + 1. So the answer is
xn = 2 + (4 + 1) + (4 · 2 + 1) + · · · + (4 · (n − 1) + 1) = 2n2 − n + 1 .
3. Let xn be the number of tilings of an n × 2 rectangle by dominoes. We easily find
x1 = 1, x2 = 2. For n ≥ 3 we can place the rightmost domino vertically and tile the
rest of the rectangle in xn−1 ways, or we can place two horizontal dominoes to the
right and tile the rest in xn−2 ways, so xn = xn−1 + xn−2 . So the answer is the shifted
Fibonacci sequence, xn = Fn+1 .
4. Let fn denote the number of minimal selfish subsets of {1, 2, . . . , n}. For n = 1 we
have that the only selfish set of {1} is {1}, and it is minimal. For n = 2 we have two
selfish sets, namely {1} and {1, 2}, but only {1} is minimal. So f1 = 1 and f2 = 1.
For n > 2 the number of minimal selfish subsets of {1, 2, . . . , n} not containing n
is equal to fn−1 . On the other hand, for any minimal selfish set containing n, by
removing n from the set and subtracting 1 from each remaining element we obtain
a minimal selfish subset of {1, 2, . . . , n}. Conversely, any minimal selfish subset of
{1, 2, . . . , n − 2} gives raise to a minimal selfish subset of {1, 2, . . . , n} containing n by
the inverse procedure. Hence the number of minimal selfish subsets of {1, 2, . . . , n}
containing n is fn−2 . Thus fn = fn−1 + fn−2 , which together with f1 = f2 = 1 implies
that fn = Fn (nth Fibonacci number.)
9. First we prove that an divides ank if k is odd. One way to do it is by solving the √
recurrence explicitly.
√ Its characteristic polynomial is x2 −4x+1, with roots α = 2+ 3
and β = 2 − 3 = α−1 , so that an = Aαn + Bα−n . Using a0 = 1, a1 = 2 we get
A = B = 1/2, hence an = 12 (αn + α−n ).
We next use the identity xk + y k = (x + y)(xk−1 − xk−2 y + · · · + y k−1 ), valid when k
is odd, replacing x = αn , and y = α−n , and grouping terms of the form αj + α−j :
1
ank = (αnk + α−nk )
2
1
= (αn + α−n ))(αn(k−1) − αn(k−3) + · · · + αn(1−k) )
2
1
= (αn + β n ){(αn(k−1) + αn(1−k) ) − (αn(k−3) αn(3−k) ) + · · · + 1}
2
= an (2an(k−1) − 2an(k−3) + · · · + 1) .
This proves that in fact an divides ank for k odd.
PUTNAM TRAINING RECURRENCES 6
Finally we notice that 2015 = 5·403, hence a5 divides a2015 . We have a5 = 362 = 2·181,
so 181 is a prime dividing a2015 .