1

Given n spaces, how many ways are there to fill up the spaces with 1's and 0's such that no two 1's are together.

For example, let's say n = 3 (_ _ _). There are 5 ways to fill up the spaces such that no two ones are together:

(0 0 0), (1 0 0), (0 1 0), (0 0 1), (1 0 1)

1 Answers1

0

Define $X_n$ to be all the combinations of size n that end in 0 and let $Y_n$ be all the combinations that end in 1. Now define $T_n = X_n + Y_n$ to be the total number of combinations. $T_0 = 1,\quad T_1 = 2$. Let's start with a few identities. $$X_{n+1} = X_n+Y_n\\ Y_{n+1} = X_n\\ X_{n+1} = X_n+X_{n-1}\\ T_{n+1} = X_{n+1} + X_n = X_{n+2}\\ T_0 = 1 = X_1, \quad T_1 = 2 = X_2$$

X is the standard Fibonacci sequence shifted by one, so $$X_n = \frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2} \right)^{n+1} - \left(\frac{1-\sqrt 5}{2} \right)^{n+1}\right)$$ and $T_n$ is $$\frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2} \right)^{n+2} - \left(\frac{1-\sqrt 5}{2} \right)^{n+2}\right)$$

Flowers
  • 775
  • 4
  • 13