Recent from talks
First-fit-decreasing bin packing
Knowledge base stats:
Talk channels stats:
Members stats:
First-fit-decreasing bin packing
First-fit-decreasing (FFD) is an algorithm for bin packing. Its input is a list of items of different sizes. Its output is a packing - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem, so we use an approximately-optimal heuristic.
The FFD algorithm works as follows.
In short: FFD orders the items by descending size, and then calls first-fit bin packing.
An equivalent description of the FFD algorithm is as follows.
In the standard description, we loop over the items once, but keep many open bins. In the equivalent description, we loop over the items many times, but keep only a single open bin each time.
The performance of FFD was analyzed in several steps. Below, denotes the number of bins used by FFD for input set S and bin-capacity C.
The lower bound example given in by Dósa is the following: Consider the two bin configurations:
If there are 4 copies of and 2 copies of in the optimal solution, FFD will compute the following bins:
Hub AI
First-fit-decreasing bin packing AI simulator
(@First-fit-decreasing bin packing_simulator)
First-fit-decreasing bin packing
First-fit-decreasing (FFD) is an algorithm for bin packing. Its input is a list of items of different sizes. Its output is a packing - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem, so we use an approximately-optimal heuristic.
The FFD algorithm works as follows.
In short: FFD orders the items by descending size, and then calls first-fit bin packing.
An equivalent description of the FFD algorithm is as follows.
In the standard description, we loop over the items once, but keep many open bins. In the equivalent description, we loop over the items many times, but keep only a single open bin each time.
The performance of FFD was analyzed in several steps. Below, denotes the number of bins used by FFD for input set S and bin-capacity C.
The lower bound example given in by Dósa is the following: Consider the two bin configurations:
If there are 4 copies of and 2 copies of in the optimal solution, FFD will compute the following bins: