Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why is bin packing interesting?

Similar presentations


Presentation on theme: "Why is bin packing interesting?"— Presentation transcript:

1 Why is bin packing interesting?
Simplest version of industrial packing problems Cutting stock allocation problem CD allocation problem (floppy disk allocation problem) Layouts on VLSI chips (2D version) Assigning commercials to station breaks (easier) Packing trucks within a given weight limit The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc. Classic combinatorial optimization problem Research dates back to the 1940s In the mid 80’s labeled “The problem that wouldn’t go away” Subject of research on approximations before approximations were cool

2 First Fit Decreasing Sort the items in decreasing order by size Open one bin for each item Si if there is an open bin where Si will fit then place Si into the leftmost such bin else open a new bin place Si into that new bin .2 .25 .33 .4 .3 Absolute performance ratio of FFD is 3/2, and asymptotic performance ratio is 11/9 .75 .67 .5 .4 .2 FFD < 11/9 OPT (i.e …) Running Time: O(n log n) [Johnson, Demers, Ullman, Garey, Graham, 1974] Loooooooooong proof (originally 100+ pages)

3 More on First Fit Decreasing
Why does FFD have such an improved performance ratio? Pack the trouble items first (big items) Pack the easier items later (small items) Can we do better than FFD? Modified First Fit Decreasing [Johnson & Garey, 1985] Like FFD, but with special handling for items in (1/6, 1/3] Competitive ratio: 71/60 = … Running Time: O(n log n)

4 Summary Method Competitive Ratio Any Fit 2 Next Fit 2 Worst Fit 2
First Fit 1.7 Best Fit 1.7 FFD … * Modified FFD … * Fully polynomial time approximation scheme YES * * = asymptotic competitive ratios (vs absolute competitive ratios) For all L, A(L) <= Ratio(A)*OPT(L) + KA(L) where KA(L) = o(OPT(L)) The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

5 Changing the Rules – Fully Dynamic Bin Packing
NOT given the items all at once Instead: given items one at a time – INSERTs (DELETES) Upon an INSERT/DELETE, update the packing NO apriori limitations on this update – the contents of the bins may be changed at will Maintain a good packing at all times O(log n) time per INSERT/DELETE (to update) So, n INSERTs in O(n log n) time

6 Distinct from Off-line, On-Line, Dynamic BP
Off-line bin packing – given all items at once, process & pack (FFD, MFFD, PTAS) On-line bin packing – given items one at a time (INSERTS), and must pack immediately, but cannot move already packed items On-line Algorithms Any Fit, Next Fit 2 First Fit, Best Fit 1.7 Harmonic [Seiden, 2001] Lower bound [van Vliet, 1992]

7 Distinct from Off-line, On-Line, Dynamic BP
Variant of On-line bin packing [Gambosi, etal, 1990]– INSERTs only, each item may be moved a constant number of times Algorithm A: Competitive ratio: 3/2 Running time: O(n) Algorithm B: Competitive ratio: 4/3 Running time: O(n log n) Dynamic bin packing [Coffman, Garey & Johnson, 1983] – INSERT & DELETE items, but items cannot be moved once packed 2.770 < Dynamic First Fit < 2.898 Lower bound: 2.5

8 Return to Fully Dynamic Bin Packing
NOT given the items all at once Instead: given items one at a time – INSERTS Upon an INSERT, update the packing NO apriori limitations on this update – the contents of the bins may be changed at will Maintain a good packing at all times O(log n) time per INSERT (to update) So, n INSERTs in O(n log n) time

9 A first attempt: Fully Dynamic FFD?
Recall FFD Preprocess by sorting items First Fit pack the items Making FFD fully dynamic After each INSERT Update the sorting in O(log n) – OK! Update the packing May need to completely redo the packing  O(n log n) per INSERT – that’s bad!

10 Another off-line algo: First Fit Grouped
Groups of items: BIG – contains items of size (1/2, 1] LARGE – contains items of size (1/3, 1/2] Small – contains items of size (1/4, 1/3] tiny – contains items of size (0, 1/4] First Fit Grouped (FFG) Algorithm: Place each item into its group Pack the items in BIG using first fit Pack the items in LARGE using first fit Pack the items in Small using first fit Pack the items in tiny using First Fit The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

11 FFG – An example BIG LARGE Small tiny The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc. [Johnson, 1974] Running Time: O(n log n) Competitive Ratio of FFG: 4/3 First Fit: FFD: 11/9

12 Fully Dynamic First Fit Grouped
Item I puts on glasses & what does it see? if I is tiny , then I sees everything if I is Small, then I sees only the BIG, LARGE and Small items if I is LARGE , then I sees only the BIG and LARGE items if I is BIG , then I sees only the BIG items The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc. These are “myopic” glasses!

13 What items “see” Tiny items see:
The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

14 Fully Dynamic First Fit Grouped
To process INSERT of item I (assume partial packing exists) I puts on (myopic) glasses Item I packs itself in the packing it sees (smaller items are evicted from the bin I goes into) Refill the bin that I goes into using: Smaller evicted items Smaller items in “inferior” bins (ie largest bin item is in a smaller group than I) If an inferior bin is disturbed, evict all remaining items Repack evicted items using recursion The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

15 An example of FDFFG Existing packing:
That item First Fit packs itself into the second bin: Unpacked items: .35, .35, .30 The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc. Refill the second bin with the .30 item: Unpacked items: .35, .35

16 FDFFG Example - continued
It packs into 3rd bin, as does other .35 and then .30 item: Unpacked items: .30, .25 The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

17 FDFFG Example – still continued …
The .30 item sees this packing: That .30 item packs into 4th bin & two .25 items refill that bin: The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc. The remaining two .25 items pack themselves into a 5th bin

18 Performance of FDFFG Key elements of FDFFG
Competitive Ratio: 4/3 (same as FFG) Running Time: O(log n) per INSERT Key elements of FDFFG Evicted items are smaller than the inserted item “bundle” tiny items and move as a unit* Thus: Relatively few items/bundles will be evicted (hence, repacked) * Is this cheating? (no – will say why later) The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

19 O(n log n) for sequence of n INSERT/DELETEs
Can we do better than 4/3? Yes: Mostly Myopic Packing (MMP) Key: Avoid bad cases of FDFFG via special handling MMP Competitive Ratio: 5/4 = 1.25 Looong proof MMP running time: O(log n) per INSERT or DELETE O(n log n) for sequence of n INSERT/DELETEs The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

20 Mostly Myopic Packing Same general approach as FDFFG
Much more complicated than FDFFG Introduce: miniscule items: (0, 1/5] tiny items: (1/5, 1/4] Carry over: myopic glasses bundle miniscule (not tiny) - size (1/10,1/5] Introduce: coalitions! Prior to putting on glasses, L & S items try to form LLS-coalitions Constant number of items/bundles “touched” per INSERT Each “touch” costs O(log n) Thus, O(log n) per INSERT (DELETE) The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

21 The 5/4 Competitive Ratio (the 2% sketch)
Analyze the structure of the MMP and OPT packings Focus on 8 types of “front” bins: B-bins, LLS, LSTT Lower bound the LLS-bins in MMP relative to OPT MMPLLS ≥ 1/4(OPTLLS – (L7+S7)) + OPTLSTT – max(L8,S8) - 1 Lower bound the L, S and T-items in B-bins in MMP Allows upper bound on number of items in “back” bins in MMP relative to the number in OPT The packings In OPT: B OPTLLS + OPTLSTT OPTBACK In MMP: B MMPLLS MMPBACK put bounds together to yield the 5/4 bound The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

22 What about that possible “cheating”?
Theorem: If A is a fully dynamic bin packing algorithm moving at most a fixed (i.e. constant) number of items per INSERT/DELETE Then the competitive ratio of A is at least 4/3 Implication: “bundling” (or similar), is necessary to do better than 4/3 The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

23 Partially dynamic bin packing
INSERTs only, packing can be rearranged For any  > 0 there are algorithms with: Competitive ratio 1 +  Running time O(log n) amortized per INSERT (PTAS) Running time O(log2 n) amortized per INSERT (FPTAS) What about uniform running times for INSERT only? MMP is the best we know: competitive ratio 5/4 running time O(log n) per INSERT The problem we consider is topology control in ad hoc networks. So, what is an ad hoc network? An ad hoc network is a collection of nodes[click] that communicate with one other over [click] wireless medium. When the destination node can not be reached directly by the source, the nodes in the middle can act as routers to forward the transmission. Such networks require no fixed infrastructure, so can be quick deployed. it has application in battle field communication, disaster recovery, sensors networks, etc.

24 Related papers Z. Ivkovich and E.L. Lloyd, "Fully dynamic algorithms for bin packing: Being mostly myopic helps," SIAM Journal on Computing, 28(1998), Z. Ivkovich and E.L. Lloyd, "Partially dynamic bin packing can be solved within 1+e in (amortized) polylogarithmic time", Information Processing Letters 63(1997), Z. Ivkovich and E.L. Lloyd, "A fundamental restriction on fully dynamic maintenance of bin packing," Information Processing Letters, 59(1996),


Download ppt "Why is bin packing interesting?"

Similar presentations


Ads by Google