Beating the Harmonic Lower Bound for Online Bin Packing - Strategies and Results

undefined
Sandy Heydrich                      
 
Rob van Stee
April 1st, 2016
 
2
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
Photo by Highways England, www.flickr.com/photos/highwaysagency/6008275527
 
Given items with size in (0,1]
Pack them into bins of
capacity 1
Use as few bins as possible
Items arrive one by one
Immediately decide where to pack each item, without knowing
future items
3
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
size
 
capacity
An online algorithm is 
r-competitive
if it uses at most 
r times the optimal number of bins
(asymptotically)
4
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
No online algorithm can achieve a competitive ratio of less than
1.54.
 
we only care about very large inputs
Goal: Find algorithm with competitive ratio as close to 1 as
possible.
Upper bounds
Next Fit: 
2
 [Johnson 1974]
First Fit, Best Fit: 
1.7
 [Ullman 1971, Garey et al.
1972]
Revised First Fit: 
5/3
 [Yao 1980]
Harmonic: 
1.691
 [Lee and Lee 1985]
Modified Harmonic-2: 
1.612
 [Ramanan et al.
1989]
Harmonic++: 
1.58889
 [Seiden 2001]
5
 
Lower bounds
1.5
 [Yao 1980]
1.536
 [Brown 1979,
Liang 1980]
1.54014
 [van Vliet
1992]
1.54037
 [Balogh et
al. 2010]
 
Pack only similar-size items in the same bin
Pack types into separate bins
 Packing decision only depends on type
Competitive ratio: 1.691
6
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
0
 
1
 
1/2
 
1/3
 
1/4
 
Type 2 items
 
packed 2 per bin
 
Type 3 items
 
packed 3 per bin
 
Type 1 items
 
can be packed 1 per bin
 
Type k items
 
Next Fit
 
1/k
 
Large items
 
Medium items
7
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Input
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/3+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
1/2+
ε
“Blue strategy” 
Harmonic
“Red strategy”
Optimal packing
?
 
Idea: Mix two strategies
Color each item red or blue upon arrival
Blue items: fill up the bin (as in 
Harmonic
)
Red items: leave part of the bin empty
Combine smaller red items with larger blue items
Maintain a 
fixed ratio 
of red items per type
Types can be defined arbitrarily (in particular: much finer granularity)
8
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Blue strategy
 
Red strategy
 
Up to now: parameters not specified 
 framework
e.g. types, ratios for red items, which types to combine..
Best known algorithm: Harmonic++
 competitive ratio 1.58889
Lower bound for framework: 1.58333
 Must improve framework to find better algorithm
9
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
1.54
 
1.691
 
H
ARMONIC
 
H
ARMONIC
++
 
S
UPER
H
ARMONIC
 lower bound
 
general lower bound
 
Idea behind 
SuperHarmonic
: Combine medium and large items
 Worst situation for 
SuperHarmonic
: We still do not combine
them!
Case 1:
10
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Optimal solution
 
Algorithm’s solution
 
do fit together
 
Idea: Ignore item classification in some cases and combine items
whenever they fit
Needs careful analysis!
If large items arrive first, we might not maintain the fixed fraction of red items
 
Case 1: Medium and large items 
fit
 
together but are 
not combined
Lower bound for 
SuperHarmonic
 framework: 1.58333
 
[Ramanan et al. ‘89]
11
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
0.34
0.65
 
type: (1/3, 0.37]
 
type: (0.63, 0.7]
 
0.34 + 0.65 < 1
0.37 + 0.7   > 1
Problem: Decisions only based on type 
 we
lose information about exact item size!
 
Idea behind 
SuperHarmonic
: Combine medium and large items
 Worst situation for 
SuperHarmonic
: We still do not combine them!
Case 2:
12
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Optimal solution
 
Algorithm’s solution
 
do not fit together
 
do fit together
 
Case 2: Red medium and blue large item 
do
 
not fit 
together
 
 
 
 
Ideal world: red item should be the smallest medium item
But: we assign the color as soon as an item arrives
13
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
0.34
0.34
0.34
0.34
0.34
0.34
0.36
0.65
Problem: We do not know whether larger or smaller items of
the same type will follow
 
Postpone the coloring!
 
 
 
 
Guarantees that at most half of the blue items are smaller than red items
 At most half of the blue items are combined with large items in OPT!
…but this only works when packing items into 
new
 
bins 
 Mark items to distinguish different cases
14
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
ratio of red items: 1/7
 
S
UPER
H
ARMONIC
 
Our algorithm
 
Case 1: medium items were packed into new bins
 
 
 
Means that 
at most half 
of the blue
 
items are 
smaller
 than the
red item
Not too many 
optimal bins
can look like this:
15
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
𝒩
 
Case 2: blue medium items are combined with smaller red items
 
 
 
Means that such small items 
must exist
Not
 
all 
optimal bins
can look like this:
16
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Case 3: red medium item is combined with large blue item
 
 
 
Good case: We 
do
 
combine an item of this medium type!
17
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
Weighting function: assign each item a weight
Idea: total weight of input is at least the number of bins ALG uses
to pack it
 Average weight per bin is 
1
Maximum average weight in an 
optimal
 bin 
 competitive ratio
 Find by solving an LP
18
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
LP:
max avg. weight per bin
s.t. not too many bins like this
 
Actually: two weighting functions w, v
Competitive ratio is then min(w,v)
Solution: Two LPs, assuming w 
 v and v 
 w
19
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
𝒩
𝒩
 
We end up with an LP with
Huge number of variables
Four constraints
LP is too large to solve it directly
Separation problem for dual: Knapsack instance
 Solve it with ellipsoid method a.k.a. binary search!
20
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
Dualize
& simplify
 
Dual LP with
Four variables
Huge number of constraints
 
One
21
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
Theorem 1
S
ON
O
F
H
ARMONIC
 achieves a competitive ratio of 1.5815.
Theorem 2
Within 
ExtremeHarmonic
, we 
cannot
 achieve a competitive ratio of
less than 1.576.
 
We have created a new framework: 
ExtremeHarmonic
Best known instance: 
SonOfHarmonic
22
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
1.54
 
1.691
 
H
ARMONIC
 
H
ARMONIC
++: 1.58889
 
S
UPER
H
ARMONIC
 lower bound: 1.58333
 
general lower bound
 
S
ON
O
F
H
ARMONIC
: 1.5815
 
E
XTREME
H
ARMONIC
 
lower bound: 1.576
?
23
Sandy Heydrich
 
Beating the Harmonic lower bound for online bin packing
 
www.sci-hub.io
24
 
Slide Note
Embed
Share

Explore the strategies and results in online bin packing as presented by Sandy Heydrich and Rob van Stee. The discussion delves into competitive ratios, known upper and lower bounds, the HARMONIC algorithm, and improvements such as the SUPERHARMONIC concept. Discover the challenges and optimizations in efficiently packing items into bins online without knowledge of future items.

  • Online Bin Packing
  • Competitive Ratios
  • Harmonic Lower Bound
  • Strategies
  • Optimization

Uploaded on Sep 30, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Beating the Harmonic lower bound for online bin packing Sandy Heydrich Rob van Stee April 1st, 2016

  2. 2 Bin Packing Photo by Highways England, www.flickr.com/photos/highwaysagency/6008275527 Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  3. 3 Online Bin Packing Given items with size in (0,1] Pack them into bins of capacity 1 Use as few bins as possible Items arrive one by one Immediately decide where to pack each item, without knowing future items capacity size Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  4. 4 Competitive ratio An online algorithm is r-competitive if it uses at most r times the optimal number of bins (asymptotically) Goal: Find algorithm with competitive ratio as close to 1 as possible. we only care about very large inputs No online algorithm can achieve a competitive ratio of less than 1.54. Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  5. 5 Known results Upper bounds Next Fit: 2 [Johnson 1974] First Fit, Best Fit: 1.7 [Ullman 1971, Garey et al. 1972] Revised First Fit: 5/3 [Yao 1980] Harmonic: 1.691 [Lee and Lee 1985] Modified Harmonic-2: 1.612 [Ramanan et al. 1989] Harmonic++: 1.58889 [Seiden 2001] Lower bounds 1.5 [Yao 1980] 1.536 [Brown 1979, Liang 1980] 1.54014 [van Vliet 1992] 1.54037 [Balogh et al. 2010]

  6. 6 HARMONIC [Lee, Lee 85] Pack only similar-size items in the same bin Pack types into separate bins Packing decision only depends on type Competitive ratio: 1.691 Type 2 items packed 2 per bin Medium items Large items Type 3 items packed 3 per bin Type k items Next Fit Type 1 items can be packed 1 per bin 0 1/k 1/2 1 1/4 1/3 Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  7. 7 Improving HARMONIC 1/3+ 1/3+ Blue strategy HARMONIC 1/2+ 1/2+ 1/2+ 1/2+ 1/3+ 1/3+ Input ? 1/3+ 1/3+ 1/3+ 1/3+ 1/2+ 1/2+ 1/2+ 1/2+ 1/2+ 1/2+ 1/2+ 1/2+ Red strategy Optimal packing 1/3+ 1/3+ 1/3+ 1/3+ Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  8. 8 SUPERHARMONIC [Seiden 02] Idea: Mix two strategies Color each item red or blue upon arrival Blue items: fill up the bin (as in HARMONIC) Red items: leave part of the bin empty Combine smaller red items with larger blue items Maintain a fixed ratio of red items per type Types can be defined arbitrarily (in particular: much finer granularity) Blue strategy Red strategy Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  9. 9 SUPERHARMONIC [Seiden 02] Up to now: parameters not specified framework e.g. types, ratios for red items, which types to combine.. Best known algorithm: Harmonic++ competitive ratio 1.58889 Lower bound for framework: 1.58333 Must improve framework to find better algorithm HARMONIC SUPERHARMONIC lower bound general lower bound 1.691 1.54 HARMONIC++ Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  10. 10 Improving SUPERHARMONIC Idea behind SUPERHARMONIC: Combine medium and large items Worst situation for SUPERHARMONIC: We still do not combine them! Case 1: do fit together Algorithm s solution Optimal solution Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  11. 11 Problem I Case 1: Medium and large items fit together but are not combined Lower bound for SUPERHARMONIC framework: 1.58333 [Ramanan et al. 89] Problem: Decisions only based on type we lose information about exact item size! Idea: Ignore item classification in some cases and combine items whenever they fit Needs careful analysis! If large items arrive first, we might not maintain the fixed fraction of red items type: (1/3, 0.37] type: (0.63, 0.7] 0.34 + 0.65 < 1 0.37 + 0.7 > 1 0.34 0.65 Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  12. 12 Improving SUPERHARMONIC Idea behind SUPERHARMONIC: Combine medium and large items Worst situation for SUPERHARMONIC: We still do not combine them! Case 2: do fit together do not fit together Algorithm s solution Optimal solution Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  13. 13 Problem II Case 2: Red medium and blue large item donot fit together 0.34 0.34 0.34 0.65 0.36 0.34 0.34 0.34 Ideal world: red item should be the smallest medium item But: we assign the color as soon as an item arrives Problem: We do not know whether larger or smaller items of the same type will follow Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  14. 14 Solution Postpone the coloring! Our algorithm Guarantees that at most half of the blue items are smaller than red items At most half of the blue items are combined with large items in OPT! but this only works when packing items into new bins Mark items to distinguish different cases SUPERHARMONIC ratio of red items: 1/7 Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  15. 15 Marking the items Case 1: medium items were packed into new bins Means that at most half of the blueitems are smaller than the red item Not too many optimal bins can look like this: Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  16. 16 Marking the items Case 2: blue medium items are combined with smaller red items Means that such small items must exist Notall optimal bins can look like this: Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  17. 17 Marking the items Case 3: red medium item is combined with large blue item Good case: We do combine an item of this medium type! Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  18. 18 Analysis Weighting function: assign each item a weight Idea: total weight of input is at least the number of bins ALG uses to pack it Average weight per bin is 1 Maximum average weight in an optimal bin competitive ratio Find by solving an LP Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  19. 19 Analysis LP: max avg. weight per bin s.t. not too many bins like this Actually: two weighting functions w, v Competitive ratio is then min(w,v) Solution: Two LPs, assuming w v and v w Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  20. 20 Analysis Dual LP with Four variables Huge number of constraints We end up with an LP with Huge number of variables Four constraints LP is too large to solve it directly Separation problem for dual: Knapsack instance Solve it with ellipsoid method a.k.a. binary search! One Dualize & simplify Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  21. 21 Conclusion We have created a new framework: EXTREMEHARMONIC Best known instance: SONOFHARMONIC Theorem 1 SONOFHARMONIC achieves a competitive ratio of 1.5815. Theorem 2 Within EXTREMEHARMONIC, we cannot achieve a competitive ratio of less than 1.576. Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  22. 22 Conclusion HARMONIC SUPERHARMONIC lower bound: 1.58333 general lower bound ? 1.691 1.54 HARMONIC++: 1.58889 EXTREMEHARMONIC lower bound: 1.576 SONOFHARMONIC: 1.5815 Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  23. 23 Thank you! Sandy Heydrich Beating the Harmonic lower bound for online bin packing

  24. 24 www.sci-hub.io

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#