Finding a recurrence relation for $2\times N$ tiles with red and blue tiles and utmost 2 similar colored neighbors

134 Views Asked by At

this question has 1 tricky aspect I don't know how to address.

Basically We are asked to color $2\times N$ tiles with red or blue 1x1 tiles. However, a tile can only have up to 1 similar colored tile neighboring it. Two tiles are neighbors if one is above, below, left or right to another tile. Meaning, diagonal tiles aren't neighbors. The problem with the recurrence relation is that I don't know what to do in this event.

If the first 2 tiles are the same color, then the rest of the tiles are already predetermined. This happens both for when the first 2 tiles are red and where they blue.

How do I add this option into the recurrence relation?

1

There are 1 best solutions below

0
On

Consider any coloring of a strip of $2 \times n$. It's last pair of tiles must be red, green or green, red. The only way to extend it is to add green, red respectively red, green; i.e., one way.

As a starting point, you know there is $1$ way to color the strip of length $0$, and $2$ ways to color the strip of length $1$.