Artificial intelligent assistant

How many different ways are there to tile a corridor of $2 \times N$ How many different ways are there to tile a corridor of $2 \times N$ meters with blue tiles of $1 \times 2$ meters?

Let the number of ways to fill the $2 \times N$ grid with $1 \times 2$ tiles be $f(N)$

We will think of the grid as vertical with base 2.

$Case 1$ : We start with one tile placed horizontally (to fill the first row)

Number of ways to fill the rest = $f(N-1)$ since we are left with a $2 \times (N-1)$ grid

$Case 2$ : We start with two tiles placed vertically to fill the first two rows.

Number of ways to fill the rest = $f(N-2)$

These are all the cases, therefore, $$f(N) = f(N-1) + f(N-2), f(1)=1, f(2)=2$$

This is similar to the fibonacci numbers and gives a closed form as:

$$f(N) = {{{\phi^{(N+1)} - (1- \phi)^{(N+1)}} }\over {\sqrt 5}} , \phi ={1+\sqrt 5 \over 2}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy de45be611bfd15b3d9727293ff06b971