Question: Need psuedocode for bin packing problem! doesn't need to be c++ detailed code, just a pseudo code Problem: In the bin packing problem, items of
Need psuedocode for bin packing problem! doesn't need to be c++ detailed code, just a pseudo code
Problem: In the bin packing problem, items of different weights (or sizes) must be packed into a finite number of bins each with the capacity C in a way that minimizes the number of bins used. The decision version of the bin packing problem (deciding if objects will fit into <= k bins) is NP-complete. There is no known polynomial time algorithm to solve the optimization version of the bin packing problem. In this homework you will be examining two greedy approximation algorithms to solve the bin packing problem.
First-Fit: Put each item as you come to it into the first (earliest opened) bin into which it fits. If there is no available bin then open a new bin.
First-Fit-Decreasing: First sort the items in decreasing order by size, then use First-Fit on the resulting list.
a) Give pseudo code and the running time for each of the approximation algorithms.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
