Hello Everyone,
First of all, english is not my main language, so apologies :P
So, I've been facing the following problem:
Imagine I had a field of size nxm and want to see how many different ways I can divide it in various smaller squares (that can have different sizes). I got to find an algorithm to solve this problem and code it :).
In a 3x4 field, there are 13 possible combinations, as in the picture. (assuming all white squares are 1x1).
I've found a way to solve this by using brute force, but it is way too inefficient (taking almost 8 minutes to calculate an 8x8 field, since it corresponds to possibilities 35.863.972 :D ). So I've been trying to find a mathematical algorithm to solve this, but I've been stuck for quite a while. I was wondering if anyone has any tip or knows a way to solve the problem without testing every single possibility.
I hope you all have a great day!
Thank you!
