maximise weights of sticks that can fit in a tube so that sum of lenghts is less than L
1 次查看(过去 30 天)
显示 更早的评论
1) We define a knaptube problem as follows: Given n sticks of length l1, l2, …, ln, weight w1, w2, …, wn, and a tube of total length L, find a subset of these sticks that can be lined up to fill the tube of length L while maximizing the total weight.
More formally, the objective and the constraint of the knaptube problem are follows, where si ranges over the indices of the selected sticks:
• Objective: Maximize the sum of the weights of the sticks in the tube
max (∑𝑤𝑠𝑖 ) (w subscript si) subject to
• Constraint: The sum of the lengths of the sticks in the tube must be less than or equal to L.
∑ 𝑙𝑠𝑖(l subscript si) ≤ 𝐿.
i am looking for ideas on how to approach this problem . Initially i thought its a simple problem but the more i think about this its looks a tough one .. please let me know on how to approach this .. any ideas are appreciated ..thanks
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!