8

Click here to load reader

An improved lower bound for on-line bin packing algorithms

Embed Size (px)

Citation preview

Page 1: An improved lower bound for on-line bin packing algorithms

Information Processing Letters 43 (1992) 277-284

North-Holland

5 October 1992

An improved lower bound for on-line bin packing algorithms * Andrk van Vliet Econometric Institute and Tinbergen Institute, Erasmus Unkersity, Rotterdam, Rotterdam, The Netherlands

Communicated by F. Dehne

Received 9 August 1991

Revised 3 March 1992

Abstract

Van Vliet, A., An improved lower bound for on-line bin packing algorithms, Information Processing Letters 43 (1992)

277-284.

In 1980 Liang proved that every on-line algorithm for the bin packing problem has an asymptotic worst case ratio of at least

1.536 In this paper we give an improved lower bound of 1.540.. For the parametric case where all items are smaller

than or equal to l/r, r E kJ+, we also give improved lower bounds.

Keywords: Bin packing, lower bounds, on-line algorithms, combinatorial problems

1. Introduction

The one-dimensional bin packing problem is as follows. We are given a list L = (a,, a*,. . . , a,) of items. An item a, has size ~(a,) and ~(a,) satisfies 0 < ~(a,) < 1. We have to pack these items in a minimum number of unit-capacity bins.

If we restrict the items to be smaller than or equal to l/r, r E Nf, we get the parametric bin packing problem with parameter r. Of course, if we take r = 1 we have the classical bin packing problem. A list L is said to be an element of L?(r) if the biggest element of L is greater than l/(r + 1) and smaller than or

equal to l/r. Since the problem has been proved to be NP-hard [l], research has focused on finding good heuristic

algorithms. Given a list L we denote the minimum number of bins by OPT(L). The number of bins that an algorithm A uses to pack list L is denoted by A(L). The performance of an algorithm A is measured by the asymptotic worst-case ratio, which depends on r and is given by

Rl( r) = limsup Kim ( Lma~r,{4L)/k]OJ’T(L) =k]).

A special class of algorithms for the bin packing problem are the on-line algorithms. An algorithm is called an on-line algorithm if it packs the items in the order given by the list, without knowledge of the subsequent items on the list.

Correspondence to: Professor A. van Vliet, Econometric Institute, Erasmus University Rotterdam, P.O. Box 1738, 3000 DR

Rotterdam, The Netherlands. * Part of this work was carried out while visiting the Jdzsef Attila University in Szeged, Hungary.

0020.0190/92/$05.00 0 1992 - Elsevier Science Publishers B.V. All rights reserved 277

Page 2: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

In 1985, Lee and Lee [5] introduced the so-called HARMONIC algorithm, which yields an asymptotic worst-case ratio of 1.691.. . for r = 1. Galambos [3] gave the asymptotic worst-case ratio of the HARMONIC algorithm for r > 2. The best on-line algorithm known for r = 1 is due to Ramanan et al. [7] and yields 1.612.. . .

On the other hand, Liang [6] showed that no on-line algorithm can have an asymptotic worst-case ratio better than 1.536.. . . Galambos [2] generalized this result to the parametric case. Finally, Galambos and Frenk [41 gave a simplified proof for these lower bounds.

In this paper, we will give improved lower bounds for the parametric bin packing problem. Herefore, we use the same construction as Liang and Galambos, but improve the analysis. For r = 1 it yields a lower bound of 1.540.. . . In two subsequent sections we will formulate and solve a linear program that gives the lower bounds.

2. The linear programming formulation

Analogous to [2], we define the series m,(r), j a 0, by

m,(r) = r, m,(r)=r+l and mj(r)=mj_I(r)(mj_,(r)+l) Vja2.

Let k 2 2 and let n be a multiple of m,(r). Suppose there is a list L, that consists of nr equally-sized

items urn,. . . , a,~,,~. Further, list Lj, 1 <j < k contains n equally-sized items aj,, . . . , ajn. Because we let all items of a list Lj have the same size, we will denote an item of Lj by aj for notational convenience. An item aj has size s(aj> = l/(mj(r) + 1) + E, where E is a small positive number less than or equal to l/(k + r)rnk+ l(r). We can evaluate the performance of an algorithm A on the concatenated list L k.. . Lj for every 0 <j < k. For every 6, > 0 we can choose n large enough such that the asymptotic worst-case ratio of A satisfies

R;(r) a max A( L, . . . Lj)

j=O ,..., k OPT(L,... L,) -s,4.

Let Rm(r) = min,R:(r). Then

R”(r) a rnjn

(

A(L,... Lj> _ 6

j=T??,k OPT(L,...Lj) I A ’

Because for every algorithm A we can choose 6A arbitrary small (by taking n large enough), it is clear that

R = min

i

A(L,...Lj)

i=TTcff,k A OPT(Lk . . . Lj)

is a valid lower bound for the asymptotic worst-case ratio of any on-line algorithm. In order to perform this minimization over A, we will first introduce some notation which was used

first in [4]. We denote by t = (t,, . . . , to) a packing of a bin containing tj items of list Lj, 0 G j < k. Let T be the set of all feasible packings t (feasibility of t means Ci=,t,s(a,) < 11, and let the subset T, C T contain all t with t, > 0 and tj = 0, p <j < k. Finally, the number of bins of that algorithm A packs with packing t in order to pack the concatenated list Lk . . . Lo, is denoted by n(t).

278

Page 3: An improved lower bound for on-line bin packing algorithms

Volume 43. Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

Because of A(L, . . . Lj) = CE=,C, E TP n(t), we can write our minimization problem as

Minimize R

Subjecl to tFTton(t) = nr

c tjn(t) = II VI <j<k teT

5 c n(t) <OPT(LI,...L,)R VO<j<k p=j tsT,

n(t) E {O, 1, 2, 3 )... } Vt E T

Because all the input data to this programming problem are integers, there is an n’ such that the linear

programming relaxation of this problem has integer values for n(t), t E T. Galambos [2] proved the following result on the optimal solution of the concatenated list L, . . . Lj.

Lemma 1 (Galambos). (a) Fur evmy 1 <j < k: OPT(L, . . . Lj> = n/mjft). (b) OPT(L, . . L,) = n.

When we define x(t) = n(t>/n, take n = n’rnk(~) and introduce slack variables sj, 0 <j i k, we get the following linear program

Minimize R

Subject to tFTto*(t) = r

c tjx(f) = 1 tsT

; c x(t) -R+s,=O p=O teT P

Vl <j<k

x(t) > 0 V’t E T

sj > 0 VO<j<k

Since we have used the same sizes for the items as Galambos [2], we will get a lower bound that is as least as good as in [2l. Because we take k a 2, this gives

(r+3)(r+2)+1

Ra (r+2)(r+2)+1’

Further, because of [3] we have that R < (r + 1)/r.

3. Solution of the linear program

Let us denote by x~~+~, 0 <j 6 k, the variable x(t) if t is the packing for which Cj = mj and t, = 0 for p #j. Further, let xZ correspond to the packing with t, = m,(r), t, = 1 and t, = 0 otherwise. Finally, let

279

Page 4: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

f mo(?q nzo(r) 0 0 0 0 0 0 0 1 1721(T) 1721(T) 0 0 0 0 0 0 0 7721(T) 112*(T) mz(r) 0 0

0 0 0 0 0 77x2(?.) 1123(T) 0

1 1 1 1 1 1 1 -1

0 11111 l-’ n21t7.1 0 0 0 111 l-’

~~2(‘)

(0 0 0 0 0 1 l- m&

x1 \ 7120(T) \ 22 1

23 1

24 1 XI

2:s 0

xs 0

x; 0

R) \ 0 /

Fig. 1. Matrix representation of the system of equations (l)-(6) for k = 3.

xzj, 2 <j G k, correspond to a packing with tj = tj_, = mj_l(r) and t, = 0 otherwise. Note that the packing corresponding to x2, + , is an element of Tj, 0 <j G k and that the packing corresponding to xzj is an element of Tj, 1 <j G k. We will prove that x* = (x,, x2,. . . , xzktl, R)’ gives an optimal basic solution of the linear programming problem.

When we choose a basis, we can get the values of the basic variables by solving a system of 2k + 2 equations in 2k + 2 variables. In our case this is the following (a matrix representation is given in Fig. 1):

m&h +moWx2=mOW x2+mm,(r)x,+m,(r)x,=1

mj_,(r)x2j+m,(r)x,j+I+mj(r)x,j+2=1 V2<j<k-1

m,-,(r)xu +m!Ar)x,,+, = 1 k

x1 + c (xzp+xzp+d =R p=l

(1) (2)

(3)

(4)

(5)

iC p=i

x~~+x~~+~) =&R Vl <j<k J

(6)

First, we rewrite (5) and (6) to (llM13) by subtracting equations from one another. Second, we can use (ll)-(13) to rewrite (l)-(4) to (7)-(10). Now, the new system of equations becomes:

m&9x2 =m&) -m,,(r) m,(r)

m,(r) + 1 R

1 (m,(r)-l)xg+ml(r)x4=1-

m,(r) + 1 R

(mj(r)-mj_I(r))x,j+l+mj(r)x,j+2=1- ~;~f~lR V2<j<k-1 J

(mk( r) - mk-l( r))x,,+, = 1 - m:i;!i) R

ma(r) x1 =

m,(r) + 1 R (11)

280

Page 5: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

1 x2~ +X2j+l =

m,(r) + 1 R Vl<j<k-1

1 x2k + X2k+ 1

=p mk(r)

R

(14

(13)

We will first go through some technicalities to show that the solution of this system satisfies the non-negativity constraints of the x,-variables.

Lemma 2. The solution of the system (l)-(6) has xP > 0 for euery 1 G p < 2k + 1.

Proof. From (7)~(13) we get that

r r x, = -R, x2 = 1 - -

R

r-t1

x = (r+2)(r+l)-1R_1

r+l ’ 3 (r+2)(r+ 1) ’

R-l 1 X

2k= mk(r) -mk_,(r) ’ X2k+ 1 = mk(r) -mk-l(r)

l-

Since

(r+3)(r+2) +l r+l

(r+2)(r+2)+1 <R<-- and

mk-j(r)

r mk(r) < & (k>2),

this means that xi, x2, x3, x2k and xZk+i are positive. So, we covered the case k = 2. For k 2 3 we get:

1 mk-2(r) mk-l(r) X2k-l =

mk-l(r) -mk-2(r) mk-l(r) + 1

+

mk(r) R +mk-,(r)x2k+,

Since

mk-2(r) mk-l(r) r+2 r+l

m&l(r) + 1 +

mdr) ’ (r+l)(r+2)+1 (k’3)’ R< r - and x2k+l>0,

it follows that xZk_, is positive.

In order to prove positivity of the other basic variables x4,. . . , x2k_2, we write

x2j= (mj(r) -Imi,(r)) !

mj(r>

-’ + mj(r) + 1 R +mj(r)X2j+2 1

V2<j<k-2,

x2j+l = (mj(r) -1mj-,(r))

V2<j<k-1.

m,-,w

+ mj(r>

mj(r) + 1 mj+l(r) + 1 R + mjtr)X2j+3

Because of (mj(r)/(mj(r) + 1))R > 1, positivity of x2j+2 implies positivity of xzj, 1 <j G k - 1. Further, because

i

mj-l(r) + mj(r)

mj(r) + 1 mj+i(r) + 1 R < 1,

281

Page 6: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

positivity of xzjt3 implies positivity of xzj+ r, 2 <j G k - 2. So, from the positivity of xzk and xZk_, we can prove positivity of x4,. . . , x2k_2 by an inductive argument. 0

Next, we will prove that our basic solution is optimal.

Lemma 3. All non-basic variables have non-negative reduced costs.

Proof. We associate dual variables Ai, 0 <j < k, with the first type of equations ((l)-(4)) and dual variables pj, 0 <j < k, with the second type of equations ((5)-(6)). First, we will calculate the values of these dual variables that correspond to the chosen basis. We do this by setting the reduced costs of the basic variables to 0:

i mj(r)hj+ c pp=O VO<j<k,

p=o (14)

i mj_l(r)Aj-1 +mj_l(r)A,+ C /.L,,=O V2<j<k,

p=o

m,(r)&, +A, + I-Q + I-% = 0,

(15)

(16)

From (14), (1.5) and (16) we get

-1 A,= ~

m,(r) “’

A, = A,,

1 Aj =

mj-lCr) ‘j-l V2<j<k,

and thus

V2GjGk.

Substituting the expressions for kj, 1 <j < k, in (17) yields

-1 PO=

1+;+i:fi 1 .

j=2 r p=2 m,_,(r)

(17)

(18)

(19)

(20)

We conclude that pj is always negative and that Aj is always positive. Note that because all non-basic

282

Page 7: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

variables have cost coefficient equal to 0, it is not important to know the exact value of p0 in order to decide if there are variables with negative reduced costs.

The reduced cost of slack-variable sj is equal to --pj and thus positive. For a variable x(t), t E T. the reduced costs are equal to

- f: /ijtj+ f: /_LLp . ( p=O I p=o

So, in order to find a variable x(t), t E 7;, with negative reduced costs, we have to solve the following knapsack problem

Maximize p=o

Subject to pgo”’ aj) t, G 1

t,E{O, 1,2,3 ,... } VOGpGj

The only feasible packing for j = 0 is already in the basis (x,), so we assume j > 1. Recause scar> < s(a,) and A, = A,, we only need to consider packings without items of L,. Further, because m,(r)s(a,+,) <

s(a,) and m,(r)A,+ 1 = A, for every 0 <p <j - 1, we only need to consider items of Lj to maximize the value of the knapsack. Only mj(r> items of cj can be packed together in a bin, so the optimal value of the knapsack is equal to mj(r)Aj. Because IL;=+L~ = -mjAj, this means that the lowest reduced cost we can get is equal to 0. Thus there are no packings that can give a negative reduced cost. q

Finally, we come to our main result:

Theorem 4. Let the series f(r) and g(r) be given by

fz(r) = 1, f.(r) = (mj-2(r)‘2 fj_l(r) + ’ mj-l(r) mj_I(r) ‘ja3’

g2(r) = & + r2

(r+ 1) 2’

g (r) = (mjpz(r))2g._ (r) + 1 I

mj-l(r) ’ ’ mj_,(r) + 1

Vja3.

Then for every on-line algorithm A

1 f/Jr) +

R:(r) 2 lim m!s(r) -m,-,(r)

k+oc gk(r) + 1

m/C(r) -m,-,(r)

Proof. From (7)~(13) we get

i

1 r2 x,=1- -

r-t2 +( r + 1)” 1 R

283

Page 8: An improved lower bound for on-line bin packing algorithms

Volume 43, Number 5 INFORMATION PROCESSING LETTERS 5 October 1992

Table 1

Lower bounds and a.w.c.r. of HARMONIC

r new lower bound old lower bound [2]

1 1.540... 1.536...

2 1.389... 1.364...

3 1.291... 1.274... 4 1.229... 1.218...

5 1.18X... 1.181...

a.w.c.r. HARMONIC

1.691...

1.423..

1.302... 1.234.

1.191...

and

1 1 xzj =

(m,-7(r))2

mj-l(r) - mj_l(r)+lR+ mj-l(Y) xzjp2 V3~j~k.

This means that x2j =fi(r> - gj(r)R for every 2 G j <k. We also have that

R-l X 2k= mk(r) -mk_L(r) .

Combining these two facts yields

1 fk(‘) +

R= mk(r) - mk&l(r) ’

1 gk(‘) +

mk(r) -mk-,(r>

It is easy to verify that this ratio grows with

Values of the new lower bound are given

k. q

in Table 1. Also included are the values of the lower bound

according to Galambos [2] and of the asymptotic worst-case ratio (a.w.c.r.> of the HARMONIC algorithm. Note how small the gap between the lower bound and the HARMONIC algorithm becomes for r > 2.

Acknowledgment

We would like to thank Janos Csirik and Gabor Galambos for their helpful comments and sugges- tions.

References

[l] M.R. Garey and D.S. Johnson, Computer and Intractabil- ity: A Guide to the Theov of NP-completeness (Freeman,

San Francisco, CA, 1979). [2] G. Galambos, Parametric lower bound for on-line bin

packing, SIAM .I. Algebraic Discrete Methods 7 (1986) 362-367.

[51

161

[3] G. Galambos, Notes on Lee’s harmonic fit algorithm,

Ann. Unio. Sci. Budapest. Sect. Comput. 9 (1988) 121-126. [4] G. Galambos and J.B.G. Frenk, A simple proof of Liang’s

[71

lower bound for on-line bin packing and the extension to the parametric case, Submitted for publication.

C.C. Lee and D.T. Lee, A simple on-line bin packing algorithm, J. ACM 32 (1985) 562-572. F.M. Liang, A lower bound for on-line bin packing, In- form. Process. Letf. 10 (1980) 76-79.

P. Ramanan, D.J. Brown, CC. Lee and D.T. Lee, On-line

bin packing in linear time, J Algorithms 10 (1989) 305-326.

284