Tiling Problem 2

I am not able to understand if I have tile of 5x2 then how can this work

Here your aim is to fill a tile of nxm. So when you start filling you will either choose a tile horizontally or vertically. So if you are choosing it horizontally the remaining task is to fill a (n-1)xm grid at the same way if your first layer is vertical then it will cover m rows and hence the remaining task is to fill (n-m)xm grid.
So finally total number of ways to fill the grid of size nxm that is count(n) = count(n-1) + count(n-m).
for 5x2 n=5.
so count(5) = count(4)+ count(3). and call it recursively.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.