|
49 | 49 | "BMF": [Boolean Matrix Factorization], |
50 | 50 | "PaintShop": [Paint Shop], |
51 | 51 | "BicliqueCover": [Biclique Cover], |
| 52 | + "BinPacking": [Bin Packing], |
52 | 53 | ) |
53 | 54 |
|
54 | 55 | // Definition label: "def:<ProblemName>" — each definition block must have a matching label |
@@ -801,6 +802,46 @@ Biclique Cover is equivalent to factoring the biadjacency matrix $M$ of the bipa |
801 | 802 | ) <fig:biclique-cover> |
802 | 803 | ] |
803 | 804 |
|
| 805 | +#problem-def("BinPacking")[ |
| 806 | + Given $n$ items with sizes $s_1, dots, s_n in RR^+$ and bin capacity $C > 0$, find an assignment $x: {1, dots, n} -> NN$ minimizing $|{x(i) : i = 1, dots, n}|$ (the number of distinct bins used) subject to $forall j: sum_(i: x(i) = j) s_i lt.eq C$. |
| 807 | +][ |
| 808 | + Bin Packing is one of the classical NP-hard optimization problems @garey1979, with applications in logistics, cutting stock, and cloud resource allocation. The best known exact algorithm runs in $O^*(2^n)$ time via inclusion-exclusion over set partitions @bjorklund2009. |
| 809 | + |
| 810 | + *Example.* Consider $n = 6$ items with sizes $(6, 6, 5, 5, 4, 4)$ and capacity $C = 10$. The lower bound is $ceil(30 slash 10) = 3$ bins. An optimal packing uses exactly 3 bins: $B_1 = {6, 4}$, $B_2 = {6, 4}$, $B_3 = {5, 5}$, each with total load $10 = C$. |
| 811 | + |
| 812 | + #figure({ |
| 813 | + canvas(length: 1cm, { |
| 814 | + let s = 0.28 |
| 815 | + let w = 1.0 |
| 816 | + let gap = 0.6 |
| 817 | + let bins = ((6, 4), (6, 4), (5, 5)) |
| 818 | + let fills = ( |
| 819 | + (graph-colors.at(0), graph-colors.at(1)), |
| 820 | + (graph-colors.at(0), graph-colors.at(1)), |
| 821 | + (graph-colors.at(2), graph-colors.at(2)), |
| 822 | + ) |
| 823 | + for i in range(3) { |
| 824 | + let x = i * (w + gap) |
| 825 | + draw.rect((x, 0), (x + w, 10 * s), stroke: 0.8pt + black) |
| 826 | + let y = 0 |
| 827 | + for j in range(bins.at(i).len()) { |
| 828 | + let sz = bins.at(i).at(j) |
| 829 | + let c = fills.at(i).at(j) |
| 830 | + draw.rect((x, y), (x + w, y + sz * s), stroke: 0.4pt, fill: c) |
| 831 | + draw.content((x + w / 2, y + sz * s / 2), text(8pt, fill: white)[#sz]) |
| 832 | + y += sz * s |
| 833 | + } |
| 834 | + draw.content((x + w / 2, -0.3), text(8pt)[$B_#(i + 1)$]) |
| 835 | + } |
| 836 | + draw.line((-0.15, 10 * s), (2 * (w + gap) + w + 0.15, 10 * s), |
| 837 | + stroke: (dash: "dashed", paint: luma(150), thickness: 0.5pt)) |
| 838 | + draw.content((-0.5, 10 * s), text(7pt)[$C$]) |
| 839 | + }) |
| 840 | + }, |
| 841 | + caption: [Optimal packing of items with sizes $(6, 6, 5, 5, 4, 4)$ into 3 bins of capacity $C = 10$. Numbers indicate item sizes; all bins are fully utilized.], |
| 842 | + ) <fig:binpacking-example> |
| 843 | +] |
| 844 | + |
804 | 845 | // Completeness check: warn about problem types in JSON but missing from paper |
805 | 846 | #{ |
806 | 847 | let json-models = { |
|
0 commit comments