What is the proper problem name / algorithm for this problem description in computer science theory?

后端 未结 2 2093
伪装坚强ぢ
伪装坚强ぢ 2021-02-13 13:58

The problem is that I have X items of varying weighted values that must go into Y containers. The containers are of differing sizes (e.g. hold differing maximum weights). The to

相关标签:
2条回答
  • 2021-02-13 14:26

    If you map X to pictures of varying heights; and map Y to columns, then the solution given here should work for you too. It is a worst-fit bin packing solution with pre-sorting and additional item swapping coded in Python with examples.

    0 讨论(0)
  • 2021-02-13 14:33

    Sounds like multiple-knapsack to me. From Wikipedia:

    If we have n items and m knapsacks with capacities Wi, we get the multiple knapsack problem

    EDIT: Sorry, missed the bit about each container needing to be similarly loaded. Still, it smells like multiple-knapsack, albeit with an extra constraint.

    0 讨论(0)
提交回复
热议问题