I didn’t understand the problem how to find the number of ways . Is this problem can solve with permutations and combination like things?
like if we have 4x4 nxm , tile size if 1xM, if we place the tile in horizontally the 4 tile is need
f(n-1), if we place it vertically then f(m-1)
Tiling Problem Part II
@Vikaspal,
Given n x m floor, and 1 x m tiles, Let f(n) be the number of ways to tile the floor,
If we place a tile vertically, we will have f(n-1) ways to tile the leftover floor, but if we place ‘m’ horizontal tiles, then we have f(n-m) ways to tile the leftover floor,
Thus, f(n) = f(n-1) + f(n-m)
.
By the way, Can this problem be solved by PnC like things ?, would be a more grammatically correct way to say it.
@abhijeet.srivastava6499 how f(n-m) in horz suppose we have 44 size then if place 41 horizon, then there will be f(n-1) floor left
@abhijeet.srivastava6499 can u give me an example where three ways are possible.
even i didn’t how the n-m is computed
@Vikaspal,
You don’t have to avoid dp, you have to use it. Do you understand what memoization means?
@Vikaspal,
Then leave this problem for now, come back to it ones you have done the dp section of your course.
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.