This seems to me like it may be a version of the knapsack problem: I have a list of rectangles of varying sizes that I want to place within a field without overlapping or grouping sim开发者_运维技巧ilar sizes.
Would it be correct to start looking in the knapsack direction?
Thanks.
yes, thats some the same kind of problem like the knapsack-problem - it's more difficult because you have to take care of 2 dimensions, not just one - but with looking for the knapsack-problem, you're on the right way.
It is at least as hard as knapsack because it a knapsack problem can be solved using it by making the field and rectangles fixed width (a width smaller than the smallest length of any rectangle).
精彩评论