Day 13: Choosing Christmas Baubles

I am picking baubles for my tree. I have five different types of baubles. In a particular row I want to place 7 7 baubles, but adjacent baubles cannot be of the same type and the first and last baubles must be the same type.

In how many ways can I arrange my 7 7 baubles?

This problem is part of the set Advent Calendar 2014 .


The answer is 4100.

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.

2 solutions

Michael Ng
Dec 12, 2014

Let us denote the number of such arrangements for n n baubles R n R_n . Let us call the number of arrangements for n n baubles that do not satisfy the second condition A n A_n .

By inspection R 3 = 20 R_3 = 20 and A 3 = 60 A_3 = 60 . 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 R_{n+1} = R_{n-1} \times 4 + A_{n-1} \times 3 \\ A_{n+1} = 5 \times 4 ^ n - R_{n+1}

The first works as we consider the first n 1 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 = 20 × 4 + 60 × 3 = 260 A 5 = 5 × 4 4 260 = 1020 R_5 = 20 \times 4 + 60 \times 3 = 260 \\ A_5 = 5 \times 4 ^ 4 - 260 = 1020

Therefore the solution is R 7 = 260 × 4 + 1020 × 3 = 4100 R_7 = 260 \times 4 + 1020 \times 3 = \boxed{4100} .

Laurent Shorts
Apr 19, 2016

From the recurrence relation R n + 1 = 3 R n + 4 R n 1 R_{n+1}=3R_{n}+4R_{n-1} , we can find the formula: R n = 4 n 1 + ( 1 ) n 1 × 4 R_n=4^{n-1}+(-1)^{n-1}\times 4 .

So R 7 = 4 6 + 4 = 4100 R_7=4^6+4=4100 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...