Lemma 3 — inserting small pieces costs at most bins
ProvedKKBinPacking.LinearGrouping.anyFit_card_leapproximation-algorithmsbin-packingp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1
Let be an instance and . Call a piece large if its size exceeds and small otherwise. Let be any packing of the large pieces, with bins, and let be the result of inserting the small pieces into one at a time, starting a new bin only when necessary. Then
The lemma justifies setting small pieces aside, packing the rest carefully, and adding the small pieces greedily at the end.
Formalization Note The paper takes "between 0 and 1"; the statement allows , which ALGORITHM 1 reaches when . Insertion is any execution of the any-fit process (any order of pieces, any fitting bin).
Preamble
import Mathlib import Definitions.Def_KKBinPacking_LinearGrouping_Instance import Definitions.Def_KKBinPacking_Shared_AnyFit open KKBinPacking.Shared
Formal statement
namespace KKBinPacking.LinearGrouping
theorem anyFit_card_le (I : Multiset ℝ) (hI : IsInstance I) (g : ℝ) (hg0 : 0 < g) (hg1 : g ≤ 1)
(P₀ : Multiset (Multiset ℝ)) (hP₀ : IsPacking (I.filter (fun x => g / 2 < x)) P₀)
(P : Multiset (Multiset ℝ)) (hP : AnyFit P₀ (I.filter (fun x => x ≤ g / 2)) P) :
(Multiset.card P : ℝ) ≤ max (Multiset.card P₀ : ℝ) ((1 + g) * (OPT I : ℝ) + 1) := by sorry
end KKBinPacking.LinearGrouping
Source
Karmarkar, Karp, An Efficient Approximation Scheme for the One-Dimensional Bin-Packing Problem, Proc. 23rd FOCS, 1982, p. 314, Lemma 3
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.