The first-fit heuristic packs objects in their given order, placing each object into the first available bin without sorting by size. It is quick and simple, but may leave capacity unused. section 2.3
Six objects in bins of capacity seven
Objects sized 2, 4, 3, 6, 5, and 1 total 21, so three bins are the lower bound. First-fit uses four bins, while first-fit decreasing sorts by size and fits them into three fully utilized bins. section 2.3
Use first-fit when:
- You need a fast, order-preserving packing rule rather than exhaustive search. section 2.3
- You can accept that the resulting packing may be feasible but nonoptimal. section 2.3
- You want to compare ordering strategies such as first-fit decreasing, smallest-first, or largest-first. section 2.3
