In how many ways can we paint $16$ seats in a row, each red or green, in such a way that the number of consecutive seats painted in the same colour is always odd?
Problem
Source: Baltic Way 2014, Problem 6
Tags: combinatorics proposed, combinatorics
11.11.2014 16:17
Let $a_i$ be the number of ways to do so with rightmost seat being one particular color. Then $a_{i+1} = a_i + a_{i-2} + a_{i-4} + \ldots$, by considering how long the rightmost consecutive seats of the same color are ($1$ gives $a_i$ ways for the rest, $3$ gives $a_{i-2}$ ways for the rest, and so on). With base case $a_1 = 1$, we can compute $a_{16}$; our answer is thus $2a_{16}$.
11.11.2014 18:31
There is a shorter solution.Observe that if some coloring satisfies the conditions, then the reverse coloring also satisfies. Now, WLOG, the rightmost be colored red. Now, the number of ways is the number of ways to color $15$ seats in a row such that they start with a green one and have an odd number of pairs of consecutive seats in a row plus the number of ways to color $15$ seats such that the red one and have an even number of such pairs and it is obvious that this sum is $2^{14}$, so the number of such colorings is $2^{15}$.
11.11.2014 19:57
For my solution, it's missing $a_0 = 1$, whoops. What does "have an odd number of pairs of consecutive seats in a row" mean? In any case, that's wrong; I'm pretty sure you're counting things like GGRRGR and the like where the parity is correct but distributed incorrectly.
11.11.2014 20:02
Sorry,I badly worded it.JIt means that the number of pairs of consecutive seats is odd. Edit: And I don't count things like you mentioned. Edit2: Ok,I misread the problem.I tought that the number of pairs of consecutive seats is odd,my bad. Moderator says: come on now.
20.11.2014 01:32
None of the comments contains the word "Fibonacci" yet?!
31.10.2024 14:13
Actually we get that this sequence it Fibonacci numbers multiplied by 2. Hence amount of such colorings is sixteenth Fibonacci number 987*2=1974.