why is bin packing interesting l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Why is bin packing interesting? PowerPoint Presentation
Download Presentation
Why is bin packing interesting?

Loading in 2 Seconds...

play fullscreen
1 / 24

Why is bin packing interesting? - PowerPoint PPT Presentation


  • 262 Views
  • Uploaded on

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)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Why is bin packing interesting?' - Jims


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
why is bin packing interesting
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

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

first fit decreasing
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

.75 .67 .5 .4 .4 .33 .3 .25 .2 .2

.2

.25

.33

.4

.3

.75

.67

.5

.4

.2

FFD < 11/9 OPT + 4 (i.e. 1.2222…)

Running Time: O(n log n)

[Johnson, Demers, Ullman, Garey, Graham, 1974]

Loooooooooong proof (originally 100+ pages)

more on first fit decreasing
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 = 1.18333…

Running Time: O(n log n)

summary
Summary

Method Competitive Ratio

Any Fit 2

Next Fit 2

Worst Fit 2

First Fit 1.7

Best Fit 1.7

FFD 1.2222… *

Modified FFD 1.18333… *

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))

changing the rules fully dynamic bin packing
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

.5 .67 .25 .33

  • 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

distinct from off line on line dynamic bp
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++ 1.58889 [Seiden, 2001]

Lower bound 1.54014 [van Vliet, 1992]

distinct from off line on line dynamic bp7
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

return to fully dynamic bin packing
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

a first attempt fully dynamic ffd
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!

another off line algo first fit grouped
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
ffg an example
FFG – An example

.5 .67 .25 .33 .4 .2 .2 .4 .75 .3

.67 .75.5 .4 .4.3 .33.25 .2 .2

BIGLARGESmall tiny

[Johnson, 1974]

Running Time: O(n log n)

Competitive Ratio of FFG: 4/3

First Fit: 1.7 FFD: 11/9

fully dynamic first fit grouped
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

These are “myopic” glasses!

what items see
What items “see”

Tiny items see:

fully dynamic first fit grouped14
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
an example of fdffg
An example of FDFFG

Existing packing:

That item First Fit packs itself into the second bin:

Unpacked items:

.35, .35, .30

Refill the second bin with the .30 item:

Unpacked items:

.35, .35

fdffg example continued
FDFFG Example - continued

It packs into 3rd bin, as does other .35 and then .30 item:

Unpacked items:

.30, .25

fdffg example still continued
FDFFG Example – still continued …

The .30 item sees this packing:

That .30 item packs into 4th bin & two .25 items refill that bin:

The remaining two .25 items pack themselves into a 5th bin

performance of fdffg
Performance 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)

can we do better than 4 3
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

mostly myopic packing
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 5 4 competitive ratio the 2 sketch
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

what about that possible cheating
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
partially dynamic bin packing
Partially dynamic bin packing

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)
    • Competitive ratio 1 + 
    • 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

related papers
Related papers
  • Z. Ivkovich and E.L. Lloyd, "Fully dynamic algorithms for bin packing: Being mostly myopic helps," SIAM Journal on Computing, 28(1998), 574-611.
  • 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), 45-50.
  • Z. Ivkovich and E.L. Lloyd, "A fundamental restriction on fully dynamic maintenance of bin packing," Information Processing Letters, 59(1996), 229-232.