algorithm - Bin Packing or Knapsack? -
i'm having issues assignment have. i've been searching stackoverflow andnother websites see kind of problem i'm dealing with, , turns out i'm not sure if it's knapsack problem or bin packing problem. here's problem:
an old lady bought n products, each product different weight (kg), , wants fit handbag can hold k kg. find set of objects sum of weights gets close can k.
this special case of knapsack problem each item's value equal weight. (in general knapsack problems, may maximizing total "value" of objects defined problem -- perhaps monetary value in physical problem, or desirability user when scheduling programs or tasks.)
from wikipedia,
when number of bins restricted 1 , each item characterised both volume , value, problem of maximising value of items can fit in bin known knapsack problem.
so consider special case of bin-packing, ("volume" beingness item's weight).
algorithm knapsack-problem bin packing
No comments:
Post a Comment