The First-Fit Decreasing (FFD) Algorithm
First-Fit Decreasing (FFD) is one of the best-known heuristics for the bin-packing problem, the foundation of cutting optimization. It is simple, fast, and surprisingly effective: sort the items from largest to smallest, then place each item into the first bin where it fits. Understanding FFD makes it easier to see how cutting software approaches sheet layouts.
How First-Fit Decreasing works
- Sort all items in decreasing order of size.
- Take the largest remaining item.
- Place it in the first bin (or sheet) that has room.
- If no open bin fits, open a new one.
- Repeat until every item is placed.
Why sort largest-first?
Placing big items first reserves room for them before bins fill with small pieces. Small items can then slot into the gaps left over. Plain First-Fit (without sorting) often strands large items that no longer fit anywhere, wasting space. The "decreasing" step is what makes FFD strong.
How good is FFD?
For the classic 1D bin-packing problem, First-Fit Decreasing never uses more than about 11/9 of the optimal number of bins plus a small constant — a proven worst-case bound. In everyday use it is usually much closer to optimal, which is why it is a common starting point in packing and cutting software.
FFD in 2D cutting
Sheet cutting is two-dimensional, so practical optimizers extend the idea with placement strategies such as guillotine splits or maximal-rectangles tracking. The core insight — place large parts first, fill gaps with small ones — carries straight over from FFD.
Frequently asked questions
What is the difference between First-Fit and First-Fit Decreasing?
First-Fit places items in arrival order; First-Fit Decreasing sorts them largest-first before placing. Sorting usually produces noticeably tighter packing.
Is First-Fit Decreasing optimal?
No. It is a fast heuristic with a strong worst-case guarantee, but bin packing is NP-hard, so FFD finds very good — not always perfect — solutions.
Put this into practice
Plan tighter layouts and cut less waste with the free CutList Machine optimizer.
Launch the optimizerRelated articles
What Is the Bin Packing Algorithm?
A friendly explanation of bin packing and how it underpins modern cutting optimizers.
AlgorithmsGuillotine vs. Nesting Cuts
Understand the two main cutting strategies and pick the right one for your saw or CNC.
OptimizationCut List Optimization Best Practices
A checklist of habits that consistently produce tighter layouts and less waste.