Question: Algorithm is a small psuedocode in c++ Question 5: An instance of the bin packing problem consists of a set, S, of objects, each with
Algorithm is a small psuedocode in c++
Question 5: An instance of the bin packing problem consists of a set, S, of objects, each with a size 0.0 < si 1.0, and your objective is to fit these objects into the fewest possible number of bins. Each bin has size equal to 1.0, so if you had two objects of sizes 0.3 and 0.65, you could put both in the same bin.
Part a: Give a greedy algorithm for the bin packing problem.
Part b: Give an example where your greedy algorithm does not find the optimal solution.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
