Its not like coloring of 2*N grid with m colors. Here I need to calculate number of ways to put 1's in exactly K cell of 2*N grid such that no two cells containing share adjacent side.
Ex : for n = 4 k = 3 -> 12
n = 4 k = 2 -> 18
My approach : I got the relation P(n,k) = P(n-2,k-1) + P(n-1,k-1) + P(n-1,k)
Can we obtain any formula for this relation ??
Similar question has already answered but my question is bit different.
How to reduce this relation in a formula ??
Got the relation between (n,k)
$\sum_{r=0}^{k-1} 2\binom{k-1}{r}\binom{n+1+r-k}{k}$
This agrees with calculations for n=3,k=2 and n=5,k=3.