4 Let hn be the number of ways to color the squares of an 1

4. Let hn be the number of ways to color the squares of an 1 × n chessboard with red and blue so that no two red squares are adjacent. Find a recurrence relation for hn.

Solution

The first square of the 1*n board must either be red or blue. In case of blue, the remaining n-1 squares can be colored by either red or blue. It gives one choice as hn-1

On other way if first square is red, the next one must be blue. The remaining n-2 squares can be colored in such a way that no adjucent red is there. So only one choice as hn-2

So hn = hn-1 + hn-2

4. Let hn be the number of ways to color the squares of an 1 × n chessboard with red and blue so that no two red squares are adjacent. Find a recurrence relatio

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site