[algogeeks] Spoj Domino Tiling

2012-02-09 Thread Kunal Patil
I am solving spoj problem Tiling a Grid With Dominoes.(http://www.spoj.pl/problems/GNY07H/).. I am not able to come up with a recurrence relation.. One of my friend said it has the recurrence relation as f(n) = f(n-1) + 5*f(n-2) + f(n-3) - f(n-4). I am not convinced and have trouble deriving this

Re: [algogeeks] Spoj Domino Tiling

2012-02-09 Thread shady
well i have used three recurrences :P formed them by following a traditional approach f[i] = f[i-1] + 2*g[i-1] + h[i-1] + f[i-2]; g[i] = f[i-1] + g[i-1]; h[i] = f[i-1] + h[i-2]; On Thu, Feb 9, 2012 at 7:19 PM, Kunal Patil kp101...@gmail.com wrote: I am solving spoj