baubles, but adjacent baubles cannot be of the same type and the first and last baubles must be the same type.
I am picking baubles for my tree. I have five different types of baubles. In a particular row I want to placeIn how many ways can I arrange my baubles?
This problem is part of the set Advent Calendar 2014 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us denote the number of such arrangements for n baubles R n . Let us call the number of arrangements for n baubles that do not satisfy the second condition A n .
By inspection R 3 = 2 0 and A 3 = 6 0 . We can then set up the following recurrence relations:
R n + 1 = R n − 1 × 4 + A n − 1 × 3 A n + 1 = 5 × 4 n − R n + 1
The first works as we consider the first n − 1 baubles then we add on two baubles. The second is simply the total number of arrangements minus the required ones.
Using this gives: R 5 = 2 0 × 4 + 6 0 × 3 = 2 6 0 A 5 = 5 × 4 4 − 2 6 0 = 1 0 2 0
Therefore the solution is R 7 = 2 6 0 × 4 + 1 0 2 0 × 3 = 4 1 0 0 .