在矩形区域内有效放置可变大小的矩形
在我看来,这可能是背包问题的一个版本:我有一个不同大小的矩形列表,我想将其放置在一个字段中,而不重叠或分组相似的大小。
从背包方向开始看是否正确?
谢谢。
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 similar sizes.
Would it be correct to start looking in the knapsack direction?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这与背包问题类似 - 它更困难,因为你必须处理二维,而不仅仅是一维 - 但在寻找背包问题时,你就走在正确的道路上。
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).