1: \documentclass[12pt]{article}
2: \usepackage{epsfig}
3: \usepackage{hhline}
4: \usepackage{amsmath,amssymb}
5: \usepackage{boxedminipage}
6: %\pagestyle{myheadings}
7:
8: %\topmargin=0.0truecm
9: \textheight=21.5truecm
10: \textwidth=15.5truecm
11: \hoffset=-.8truecm
12: \voffset=-1.2truecm
13: %\renewcommand{\baselinestretch}{1.5}
14:
15:
16: \begin{document}
17:
18: \newtheorem{theo}{Theorem}[section]
19: \renewcommand{\thetheo}{\thesection.\arabic{theo}}
20: \newtheorem{lemm}[theo]{Lemma}
21: \renewcommand{\thelemm}{\thesection.\arabic{lemm}}
22: \newtheorem{coro}{Corollary}[theo]
23: \renewcommand{\thecoro}{\thetheo.\arabic{coro}}
24: \newtheorem{obse}[theo]{Observation}
25: \newtheorem{prop}[theo]{Proposition}
26: \newtheorem{defi}[theo]{Definition}
27: \renewcommand{\thedefi}{\arabic {defi}.}
28: \newtheorem{rema}[theo]{Remark}
29: \newtheorem{exam}[theo]{Example}
30: \newtheorem{conj}[theo]{Conjecture}
31: \newtheorem{claim}{Claim}[theo]
32: \renewcommand{\theclaim}{\thetheo.\arabic{claim}}
33: \newcommand{\proofmark}{\ \rule{2.3mm}{2.3mm} \smallskip}
34: \renewcommand{\topfraction}{.9}
35: \renewcommand{\bottomfraction}{.9}
36: \renewcommand{\theequation}{\thesection.\arabic{equation}}
37: \title{On the Sum-of-Squares Algorithm for Bin Packing}
38: \author{\sc Janos Csirik
39: \thanks{
40: {\tt csirik@inf.u-szeged.hu}.
41: Dept. of Computer Sciences,
42: University of Szeged, Szeged, Hungary.
43: }
44: \and
45: \sc David S. Johnson
46: \thanks{
47: {\tt dsj@research.att.com}.
48: AT\&T Shannon Labs, Room C239, 180 Park Avenue,
49: Florham Park, NJ 07932, USA.
50: }
51: \and
52: \sc Claire Kenyon
53: \thanks{
54: {\tt Claire.Kenyon@lri.fr}.
55: Laboratoire de Recherche en Informatique,
56: B\^atiment 490, Universit\'e Paris-Sud, 91405 Orsay Cedex, France.
57: }
58: \and
59: \sc James B. Orlin
60: \thanks{
61: {\tt jorlin@mit.edu}.
62: Sloan School of Management,
63: Massachusetts Institute of Technology,
64: Cambridge, MA, 02139, USA
65: }
66: \and
67: \sc Peter W. Shor
68: \thanks{
69: {\tt shor@research.att.com}.
70: AT\&T Shannon Labs, Room C239, 180 Park Avenue,
71: Florham Park, NJ 07932, USA.
72: }
73: \and
74: \sc Richard R. Weber
75: \thanks{
76: {\tt rrw1@cam.ac.uk}.
77: Statistical Laboratory, University of Cambridge,
78: Cambridge CB3 0WB, England.
79: }
80: }
81:
82: \maketitle
83:
84: \begin{abstract}
85: In this paper we present a theoretical analysis of the deterministic
86: on-line {\em Sum of Squares}
87: algorithm ($SS$) for bin packing
88: introduced and studied experimentally in \cite{CJK99},
89: along with several new variants.
90: $SS$ is applicable to any instance
91: of bin packing in which the bin capacity $B$ and item sizes $s(a)$ are integral
92: (or can be scaled to be so), and runs in time $O(nB)$.
93: It performs remarkably well from an average case point of view:
94: For any discrete distribution in which the optimal expected waste
95: is sublinear, $SS$ also has sublinear expected waste.
96: For any discrete distribution where the optimal expected waste is
97: bounded, $SS$ has expected waste at most $O(\log n)$.
98: In addition, we discuss several interesting variants on $SS$,
99: including a randomized $O(nB\log B)$-time on-line algorithm
100: $SS^*$, based on $SS$, whose expected behavior is essentially optimal
101: for all discrete distributions.
102: Algorithm $SS^*$ also depends on a new linear-programming-based
103: pseudopolynomial-time algorithm for solving the NP-hard problem of
104: determining, given a discrete distribution $F$, just what is the
105: growth rate for the optimal expected waste.
106: This article is a greatly expanded version of the conference paper
107: \cite{sumsq2000}.
108: \end{abstract}
109:
110: \pagebreak
111:
112: \section{Introduction}
113: \setcounter{equation}{0}
114: \setcounter{page}{2}
115:
116: \noindent
117: In the classical one-dimensional bin packing problem, we are given a
118: list $L = (a_1, ... , a_n)$ of items, a bin capacity $B$, and a size
119: $s(a_i) \in (0,B]$ for each item in the list. We wish to pack the
120: items into a minimum number of bins of capacity $B$, i.e., to partition
121: the items into a minimum number of subsets such that the sum of the
122: sizes of the items in each subset is $B$ or less.
123: Many potential applications, such as packing small
124: information packets into somewhat larger fixed-size ones,
125: involve integer item sizes, fixed and relatively small values of $B$,
126: and large values of $n$.
127:
128: The bin packing problem is NP-hard, so research has concentrated on
129: the design and analysis of polynomial-time approximation algorithms for
130: it, i.e., algorithms that construct packings that use relatively few
131: bins, although not necessarily the smallest possible number. Of
132: special interest have been \emph{on-line} algorithms, i.e., ones that
133: must permanently assign each item in turn to a bin without knowing
134: anything about the sizes or numbers of additional items, a requirement
135: in many applications.
136: In this paper we shall analyze the {\em Sum of Squares}
137: algorithm, an on-line bin packing algorithm recently
138: introduced in \cite{CJK99} that is applicable to
139: any instance whose item sizes are integral (or can be scaled to be so),
140: and is surprisingly effective.
141:
142: \subsection{Notation and Definitions}
143:
144: \noindent
145: Let $P$ be a packing of list $L$
146: and for $0 \leq h \leq B$ let $N_P(h)$ be the number of partially-filled
147: bins in $P$ whose contents have total size equal to $h$.
148: We shall say that such a bin has {\em level} $h$.
149: Note that by definition $N_P(0) = N_P(B) = 0$.
150: We call the vector $\langle N_P(1),N_P(2),\ldots,N_P(B-1)\rangle$
151: the {\em profile} of packing $P$.
152:
153: \begin{defi}
154: The \emph{sum of squares} $ss(P)$ for packing $P$ is $\sum_{h=1}^{B-1}
155: N_P(h)^2$.
156: \end{defi}
157:
158: The \emph{Sum-of-Squares Algorithm} ($SS$) introduced in \cite{CJK99}
159: is an on-line algorithm that packs each item according to the following
160: simple rule: Let $a$ be the next item to be packed and let $P$ be the
161: current packing. A \emph{legal} bin for $a$ is one that is either
162: empty or has current level no more than $B - s(a)$.
163: Place $a$ into a legal bin so as to yield the minimum possible value
164: of $ss(P')$ for the resulting packing $P'$, with ties broken in favor of
165: the highest level, and then in favor of the newest bin with that level.
166: (Our results for $SS$ hold for any choice of
167: the tie-breaking rule, but it is useful to have a
168: completely specified version of the algorithm.)
169:
170: Note that in deciding where to place an item of size $s$ under $SS$,
171: the explicit calculation of $ss(P)$ is not required, a consequence of
172: the following lemma.
173:
174: \begin{lemm}\label{deltalemm}
175: Suppose an item of size $s$ is added to a bin of level $h$ of packing $P$,
176: thus creating packing $P'$, and that $N_P(h+s) - N_P(h) = d$.
177: Then
178: $$
179: ss(P') - ss(P) ~=~ \left\{ \begin{array}{ll}
180: 2d + 1, & \mbox{if $h = 0$ or $h=B-s$}\\
181: 2d + 2, & \mbox{otherwise}
182: \end{array} \right.
183: $$
184: \end{lemm}
185:
186: \noindent
187: {\bf Proof.}
188: Straightforward calculation using the facts that $d = N_P(h+s)$
189: when $h=0$ and $d = -N_P(h)$ when $h = B-s$. \proofmark
190:
191: Thus to find the placement that causes the least increase in $ss(P)$
192: one simply needs to find that $i$ with $N_P(i)\neq 0$ that minimizes
193: $N_P(i+s) - N_P(i)$, $0 \leq i \leq B-s$ under the convention that $N_P(0)$
194: and $N_P(B)$ are re-defined to be $1/2$ and $-1/2$ respectively.
195: We currently know of no significantly more efficient way to do this
196: in general than to try all possibilities, so the running time for $SS$ is $O(nB)$
197: overall.
198:
199: In what follows, we will
200: be interested in the following three measures of $L$ and $P$.
201:
202: \begin{defi}
203: The \emph{size} $s(L)$ of a list $L$ is the sum of the sizes of all
204: the items in $L$.
205: \end{defi}
206:
207: \begin{defi}
208: The \emph{length} $|P|$ of a packing $P$ is the number of nonempty bins in $P$.
209: \end{defi}
210:
211: \begin{defi}
212: The \emph{waste} $W(P)$ of packing $P$ is $\sum_{h=1}^{B-1}N_P(h)\cdot
213: \frac{B-h}{B} = |P| - s(L)/B$.
214: \end{defi}
215:
216: \noindent
217: Note that these quantities are related since
218: $|P| \geq s(L)/B$ and hence $W(P) \geq 0$.
219:
220: \medskip
221: We are in particular interested in the average-case behavior of $SS$
222: for discrete distributions. A \emph{discrete distribution} $F$
223: consists of a bin size $B \in {\mathbb{Z}}^+$, a sequence of positive integral
224: sizes $s_1 < s_2 < \cdots < s_J \leq B$, and an associated vector
225: $\bar{p}_F = \langle p_1, p_2, \ldots, p_J\rangle$ of nonnegative rational
226: probabilities such that $\sum_{j=1}^J p_j = 1$.
227: (Allowing for the possibility that some $p_j$'s are 0 will be notationally useful
228: later in the paper.)
229: In a list generated according to this distribution, the $i$th
230: item $a_i$ has size $s(a_i) = s_j$ with probability $p_j$,
231: independently for each $i \geq 1$.
232: We consider two key measures of average-case algorithmic performance.
233: For any discrete distribution $F$ and any algorithm $A$, let
234: $P_n^A(F)$ be the packing resulting from applying $A$ to a random list
235: $L_n(F)$ of $n$ items generated according to $F$.
236: Let $OPT$ denote an algorithm that always produces an optimal packing.
237: We then have
238:
239: \begin{defi}
240: The \emph{expected waste rate} for algorithm $A$ and distribution $F$ is
241: \[
242: EW_n^A (F) \equiv E \left [ W \left ( P_n^A(F) \right ) \right ]\,.
243: \]
244: \end{defi}
245:
246: \begin{defi}
247: The \emph{asymptotic expected performance ratio} for $A$ and $F$ is
248: \[
249: ER_\infty^A (F) \equiv \limsup_{n \rightarrow \infty} \left ( E
250: \left [ \frac{\left | P_n^A(F) \right |} {\left | P_n^{OPT}(F) \right
251: |} \right ] \right )\,.
252: \]
253: \end{defi}
254:
255: \subsection{Our results}
256:
257: \noindent
258: Let us say that a distribution $F$ is \emph{perfectly packable} if
259: $EW_n^{OPT}(F) = o(n)$ (in which case almost all of the bins in
260: an optimal packing are perfectly packed).
261: By a result of Courcoubetis and Weber
262: \cite{CW90} that we shall describe in more detail later, the possible
263: growth rates for $EW_n^{OPT}(F)$ when $F$ is perfectly packable are quite
264: restricted: the only possibilities are $\Theta\left(\sqrt{n}\right)$ and $O(1)$.
265: In the latter case we say $F$ is not only perfectly packable
266: but is also a {\em bounded waste} distribution.
267: In this paper, we shall present the following results.
268:
269: \begin{enumerate}
270:
271: \item \label{r1} For any perfectly packable distribution $F$, the
272: Sum-of-Squares algorithm is almost perfect:
273: $EW_n^{SS}(F) = O(\sqrt{n})$ [Theorem \ref{orlintheo}].
274:
275: \item \label{r1a} If $F$ is a bounded waste distribution, then
276: $EW_n^{SS}(F)$ is either $O(1)$ or $\Theta(\log n)$ and there is a
277: simple combinatorial property that $F$ must satisfy for the first
278: case to hold
279: [Theorems \ref{boundedtheo} and \ref{lognupperbound}].
280: In particular, $EW_n^{SS}(F) = O(1)$ for the discrete uniform
281: distributions $U\{j,k\}$, $j\leq k-1$, of
282: \cite{AM98,CCG91,CCG98,CJS93,KRS98}, which are
283: the main discrete distributions studied to date.
284:
285: \item \label{r1c} There is a simple $O(nB)$-time deterministic
286: variant $SS'$ on $SS$ that has bounded expected waste for all bounded waste
287: distributions and $O(\sqrt{n})$ waste for all perfectly packable distributions
288: [Theorem \ref{sprimecor}].
289:
290: \item \label{r2} There is a linear-programming (LP) based approach that,
291: in time polynomial
292: in $B$ and the number of bits required to describe the probability vector
293: $\bar{p}_F$, determines whether $F$ is perfectly packable.
294: If so, it determines whether $F$ is also a bounded waste distribution.
295: If not, it computes the value of $\limsup_{n\rightarrow\infty}(EW_n^{OPT}/n)$
296: [Theorems \ref{EWtheo}, \ref{limsuptheo}, and \ref{lptheo2}].
297: Note that since the running time is polynomial in $B$ rather than in $\log B$,
298: the algorithm technically runs in pseudopolynomial time.
299: We cannot hope for a polynomial time algorithm unless P = NP since
300: the problem solved is NP-hard \cite{CCG98}.
301: Moreover, all previous LP-based approaches took time
302: {\em exponential} in $B$.
303:
304: \item \label{r1d} For the case where $F$ is not perfectly packable,
305: there are lower bound examples and upper bound theorems showing that
306: $1.5 \leq \max_F ER_\infty^{SS}(F) \leq 3$,
307: and that for all lists $L$, we have $SS(L) \leq 3OPT(L)$, where $A(L)$ is the
308: number of bins used when algorithm $A$ is applied to list $L$
309: [Theorems \ref{1.5theo} and \ref{worstcaseUB}].
310:
311: \item \label{r3} For any fixed $F$, there is a randomized
312: $O(nB)$-time on-line algorithm $SS_F$ such that
313: $EW_n^{SS_F}(F) \leq EW_n^{OPT}(F) + O(\sqrt{n})$
314: and hence $ER_{\infty}^{SS_F}(F) = 1$.
315: Algorithm $SS_F$ is based on $SS$ and, given $F$, can be constructed
316: using the algorithm of (\ref{r2}) above
317: [Theorem \ref{tunedtheo1}].
318:
319: \item \label{r4} There is a
320: randomized $O(nB)$-time on-line algorithm $SS^*$ that for
321: any $F$ with bin capacity $B$ has
322: $EW_n^{SS^*}(F) = \Theta(EW_n^{OPT}(F))$ and also
323: $EW_n^{SS^*}(F) \leq EW_n^{OPT}(F) + O(n^{1/2})$, the latter implying
324: that $ER_{\infty}^{SS^*}(F) = 1$.
325: This algorithm works by learning the distribution and using the algorithms
326: of (\ref{r2}) and (\ref{r3})
327: [Theorem \ref{learningtheo}].
328:
329: \item $SS$ can maintain its good behavior even in
330: the face of a non-oblivious adversary who gets to choose the item size
331: distribution at each step (subject to appropriate restrictions)
332: [Theorems \ref{Padversary} and \ref{Badversary}].
333:
334: \item The good average case behavior of $SS$ is at least partially
335: preserved under many (but not all)
336: natural variations on its sum-of-squares objective function and
337: the accuracy with which it is updated.
338: Moreover, there is a variant of $SS$
339: that runs in time $O(n \log B)$ instead of $\Theta(nB)$
340: and has the same qualitative
341: behavior as specified for $SS'$ above in (3)
342: [Theorems \ref{wilsonalgs} through \ref{approxSStimetheo}].
343:
344: \end{enumerate}
345:
346: Several of these results were conjectured based on experimental evidence
347: in \cite{CJK99}, which also introduced the main linear program of
348: (\ref{r2}).
349: This linear program turns out to be essentially equivalent to one
350: previously introduced by Val\'{e}rio de Carvalho in his
351: {\em arc flow} model for bin packing \cite{Carvalho99}, but has
352: not previously been adapted to questions of average case behavior.
353:
354: \subsection{Previous results}
355:
356: \noindent
357: The relevant previous results can be divided into two classes:
358: (1) results for practical algorithms on specific distributions, and
359: (2) more general (and less practical) results about the existence of algorithms.
360: We begin with (1).
361:
362: The average case behavior under discrete distributions for standard heuristics
363: has been studied in
364: \cite{AM98,CCG91,CCG98,CJS93,CJS97,KRS98}.
365: These papers concentrated on the discrete uniform distributions $U\{j,k\}$
366: mentioned above, where the bin capacity $B=k$ and the item sizes are
367: $1,2,\ldots,j < k$, all equally likely.
368: If $j=k-1$, the distribution is symmetric
369: and we have by earlier results that the optimal packing
370: and the off-line First and Best Fit Decreasing
371: algorithms (FFD and BFD) all have $\Theta(\sqrt{n})$ expected waste,
372: as do the on-line First Fit (FF) and Best Fit (BF) algorithms
373: \cite{CCG91,CJS97}.
374:
375: More interesting is the case when $1 \leq j \leq k-2$.
376: Now the optimal expected waste is $O(1)$ \cite{CCG91,CCG98,CCG02}, and the
377: results for traditional algorithms do not always match this.
378: In \cite{CCG91} it was shown that BFD and FFD have $\Theta(n)$ waste for
379: $U\{6,13\}$, and \cite{CJS3} identifies a wide variety of other
380: $U\{j,k\}$ with $j<k-1$ for which these algorithms have linear waste.
381: For the on-line algorithms FF and BF, the situation is no better.
382: Although they can be shown to have $O(1)$ waste when $j = O(\sqrt{k})$
383: \cite{CCG91}, when $j=k-2$ \cite{AM98,KRS98}, and (in the case of
384: BF) for specified pairs $(j,k)$ with $k \leq 14$ \cite{CJS93},
385: for most values of $(j,k)$ it appears experimentally
386: that their expected waste is linear.
387: This has been proved for BF and the
388: pairs $(8,11)$ and $(9,12)$ \cite{CJS93} as well as all pairs $j,k$ with
389: $j/k \in [0.66,2/3)$ when $k$ is sufficiently large \cite{KM00}.
390: In contrast, $EW_n^{SS}(U\{j,k\}) = O(1)$ whenever $j<k-1$.
391: On the other hand, our current best implementation of basic $SS$
392: runs in time $\Theta(nB)$ compared to $O(n\log B )$ for BF,
393: $O(n+B\log^2B)$ for FFD, and $O(n+B\log B)$ BFD \cite{CJS3}.
394: (The fastest known implementation of FF is $\Theta(n \log n)$
395: and so FF is asymptotically slower than $SS$ for fixed $B$.)
396:
397: Turning to less distribution-specific results, the first relevant results
398: concerned off-line algorithms.
399: In the 1960's, Gilmore and Gomory in \cite{GG61,GG63} introduced a
400: deterministic approach
401: to solving the bin packing problem that used linear programming, column
402: generation, and rounding to find a packing that for any list $L$
403: with $J$ or fewer distinct item sizes is guaranteed to use
404: no more than $OPT(L) + J-1$ bins.
405: Since $J < B$ for any discrete distribution,
406: this implies an average-case performance that is at least as good as that
407: specified for $SS^*$ in (7) of the previous section, and is in some cases
408: better.
409: However, although the approach often seems to work well in practice, its
410: worst-case running time is conceivably exponential in $B$, since the
411: basic LP involved in the approach has that many (implicit) variables.
412:
413: A packing obeying a similar bound can be constructed in time polynomial
414: in $B$ by using the ellipsoid method to solve
415: the basic LP of (4) above and then greedily extracting a packing from
416: the variables of a basic optimal solution, as explained in \cite{ABDJS02}.
417: A simplistic analysis of the running time
418: yields a running time bound of $O(n+(JB)^{4.5} \log^2 n)$,
419: which is linear but with an additive constant that for many distributions
420: would render the algorithm impractical.
421: However, if one uses the simplex
422: method rather than the ellipsoid method to solve the LP's, this approach
423: too seems to work well in practice.
424:
425: Theoretically the best approach along these lines is the off-line deterministic
426: algorithm of Karmarkar and Karp that for any list $L$ never
427: uses more than $OPT(L) + O(\log^2 J)$ bins and take time
428: $O(n+J^8 \log J \log^2 n)$.
429: Although these guarantees are asymptotically stronger than those for
430: the previous two approaches, the Karmarkar-Karp algorithm is
431: substantially more complicated and inherently
432: requires the performance of ellipsoid method steps.
433: (This Karmarkar-Karp algorithm is closely related to the more famous
434: one from the same paper that guarantees a packing within
435: $OPT(L) + O(\log^2 (OPT))$ for {\em all} lists $L$, independent of
436: the number of distinct item sizes, but for which the
437: best current running time bound is $O(n^8 \log^3 n)$.)
438:
439: For on-line algorithms, the most general results
440: are those of Rhee and Talagrand \cite{Rhe88,RT93b,RT93c}.
441: In \cite{RT93b},
442: Rhee and Talagrand proved that for any distribution $F$ (discrete or
443: not) there exists an $O(n\log n)$ on-line randomized algorithm $A_F$
444: satisfying $EW_n^{A_F}(F) \leq EW_n^{OPT}(F) + O(\sqrt{n}\log^{3/4}n)$ and hence
445: $ER_\infty^{A_F}(F) = 1$.
446: (For distributions with irrational sizes and/or probabilities,
447: their results assume a real-number RAM model of computation.)
448: This is a more general result than
449: (\ref{r3}) above, and although the additive error term is worse than
450: the one in (\ref{r3}), the extra factor of $\log^{3/4} n$ appears to
451: reduce to a constant depending only on $B$ when $F$ is a discrete
452: distribution, making the two bounds comparable. Unfortunately, Rhee
453: and Talagrand only prove that such algorithms \emph{exist}.
454: The details of the algorithms depend on a non-constructive
455: characterization of $F$ and its packing properties given in
456: \cite{Rhe88}.
457:
458: \begin{sloppypar}
459: In \cite{RT93c}, Rhee and Talagrand present a single (constructive)
460: on-line randomized algorithm $A$ that works for all distributions $F$
461: (discrete or not) and has
462: $EW_n^A(F) \leq EW_n^{OPT}(F) + O(\sqrt{n}\log^{3/4}n)$,
463: again with the $\log^{3/4}n$ factor likely to reduce to a function of
464: $B$ for discrete distributions. Even so, for discrete distributions
465: this algorithm is not quite as good as our algorithm $SS^*$, which
466: itself has
467: $EW_n^{SS^*}(F) \leq EW_n^{OPT}(F) + O(\sqrt{n})$ for all discrete distributions
468: and in addition gets bounded waste for bounded waste distributions.
469: Moreover, the algorithm of \cite{RT93c} is unlikely to be practical
470: since it uses the Karmarkar-Karp algorithm (applied to the items
471: seen so far) as a subroutine.
472: \end{sloppypar}
473:
474: The fastest on-line algorithms previously known that guarantee an
475: $O\left(\sqrt{n}\right)$ expected waste rate for perfectly packable
476: discrete distributions
477: are due to Courcoubetis and Weber, who used them in the proof of their
478: characterization theorem in \cite{CW90}. These algorithms are
479: distribution-dependent, but for fixed $F$ run in linear time.
480: At each step, the algorithm must solve a linear program whose
481: number of variables is potentially exponential in $B$, but for
482: fixed $F$ this takes constant time, albeit potentially a large constant.
483: Moreover, for bounded waste distributions,
484: the Courcoubetis-Weber algorithms have $EW_n^A(F) = O(1)$, whereas
485: the Rhee-Talagrand algorithms cannot provide any guarantee better than
486: $O\left(\sqrt{n}\right)$.
487: On the other hand, the Rhee-Talagrand algorithms of
488: \cite{RT93b,RT93c} guarantee $ER_\infty^A(F) = 1$ for all
489: distributions, while Courcoubetis and Weber in \cite{CW90} only do this
490: for those distributions in which $EW_n^{OPT}(F) = O\left(\sqrt{n}\right)$.\smallskip
491:
492: Thus, although these earlier general approaches rival the packing effectiveness
493: of $SS$ and its variants, and in the case of the offline algorithms actually
494: can do somewhat better, none are likely to be as widely usable in practice
495: (certainly none of the online rivals will be), and none
496: has the elegance and simplicity of the basic $SS$ algorithm.
497:
498: \subsection{Outline of the Paper}
499:
500: \noindent
501: The remainder of this paper is organized as follows.
502: In Section 2 we present the details of the Courcoubetis-Weber
503: characterization theorem and prove our result about the behavior of $SS$ under
504: perfectly packable distributions.
505: In Section 3 we prove our results for bounded waste distributions.
506: Section 4 covers our linear-programming-based algorithm for characterizing
507: $EW_n^{OPT}(F)$ given $F$.
508: In Section 5 we discuss our results about the behavior of
509: $SS$ under linear waste distributions.
510: In Section 6 we discuss our results about how $SS$ can be modified
511: so that its expected behavior is asymptotically optimal for such distributions.
512: Section 7 presents our results about how $SS$
513: behaves in more adversarial situations.
514: Section 8 covers our results about the effectiveness of algorithms
515: that use variants on the sum-of-squares objective function or trade
516: accuracy in measuring that function for improved running times.
517: We conclude in Section 9 with a discussion or open problems and related
518: results, such as the recent extension of the Sum-of-Squares algorithm
519: to the bin covering problem in \cite{CJK01}.
520:
521: \section{Perfectly Packable Distributions}
522: \setcounter{equation}{0}
523:
524: In order to explain why the Sum-of-Squares algorithm works so well,
525: we need first to understand the characterization theorem of Courcoubetis
526: and Weber \cite{CW90}, which we now describe.
527:
528: Given a discrete distribution $F$, a {\em perfect packing configuration}
529: is a length-$J$ vector $\bar{b} = \langle
530: b_1,b_2,\ldots,b_J \rangle$ of nonnegative integers
531: such that $\sum_{j=1}^J b_js_j = B$.
532: Such a configuration corresponds to a way of completely filling
533: a bin with items from $F$. That is, if we take $b_i$ items of size $s_i$,
534: $1 \leq i \leq J$, we will precisely fill a bin of capacity $B$.
535: Let $\Lambda_F$ be the rational cone generated by the set of all perfect packing
536: configurations for $F$, that is, the closure under rational convex combinations
537: and positive rational scalar multiplication of the set of all such configurations.
538: \begin{defi} \label{interior}
539: A rational vector $\bar{x} = \langle x_1,\ldots,x_J \rangle$ is \emph{in the
540: interior} of a cone $\Lambda$ if and only if there exists an $\epsilon
541: > 0$ such that all nonnegative rational vectors
542: $\bar{y} = \langle y_1,\ldots,y_J \rangle$
543: satisfying $|\bar{x} - \bar{y}| \equiv \sum_{i=1}^J|x_i-y_i| \leq
544: \epsilon$ are in $\Lambda$.
545: \end{defi}
546:
547: \noindent
548: \textbf{Theorem (Courcoubetis-Weber \cite{CW90}).}\label{cwtheo}
549: Let $\bar{p}_F$ denote the vector of size
550: probabilities $\langle p_1,p_2,\ldots,p_J\rangle$ for a discrete distribution $F$.
551: {\em
552: \begin{itemize}
553: \item[{\rm (a)}] $EW_n^{OPT}(F) = O(1)$ if and only if $\bar{p}_F$ is in the {\rm interior} of $\Lambda_F$.
554: \item[{\rm (b)}] $EW_n^{OPT}(F) = \Theta\left(\sqrt{n}\right)$ if and only if
555: $\bar{p}_F$ is on the {\rm boundary} of $\Lambda_F$,
556: i.e., is in $\Lambda_F$ but not in its interior.
557: \item[{\rm (c)}] $EW_n^{OPT}(F) = \Theta(n)$ if and only if
558: $\bar{p}_F$ is outside $\Lambda_F$.
559: \end{itemize}
560: }
561:
562: The Courcoubetis-Weber Theorem can be
563: used to prove the following lemma, which is key to many
564: of the results that follow:
565: \begin{lemm} \label{orlinlemm}
566: Let $F$ be a perfectly packable distribution
567: with bin size $B$, $P$ be an arbitrary packing into bins of size $B$,
568: $x$ be an item randomly generated according to $F$, and $P'$ be the packing
569: resulting if $x$ is packed into $P$ according to $SS$. Then
570: $E[SS(P')|P] < ss(P) +2$.
571: \end{lemm}
572:
573: \noindent
574: {\bf Proof.}
575: The proof relies on the following claim.
576:
577: \medskip
578: \begin{claim} \label{orlinclaim}
579: If $F$ is a perfectly packable distribution with bin size $B$,
580: then there is an algorithm $A_F$ such that given any packing $P$ into bins
581: of size $B$, $A_F$ will pack an item randomly generated according to $F$
582: in such a way that for each bin level $h$ with $N_P(h) > 0$,
583: $1 \leq h \leq B-1$, the probability that $N_P(h)$ increases is no more
584: than the probability that it decreases.
585: \end{claim}
586:
587: \medskip
588: \noindent
589: {\bf Proof of Claim.}
590: The algorithm $A_F$ depends on the details
591: of the Courcoubetis-Weber Theorem.
592: Since $F$ is perfectly packable, $\bar{p}_F$ must be in $\Lambda_F$
593: and so there must exist some number $m$ of length-$J$ nonnegative
594: integer vectors $\bar{b}_i$ and corresponding positive rationals
595: $\alpha_i$ satisfying
596: \begin{eqnarray}
597: \sum_{j=1}^J (b_{i,j} \cdot s_j) \ = & B, & 1 \leq i \leq m
598: \label{cw1}\\ \sum_{i=1}^m (\alpha_i \cdot b_{i,j}) \ = & p_j, & 1
599: \leq j \leq J \label{cw2}
600: \end{eqnarray}
601: Now since the $\alpha_i$ and $p_j$ are all rational, there exists
602: an integer $Q$ such that $Q \cdot \alpha_i$ and $Q \cdot p_j$ are
603: integral for all $i$ and $j$. Consider the {\em ideal packing} $P^*$ which
604: has $Q\alpha_i$ copies of bins of type $\bar{b}_i$.
605: We will use $P^*$ to define $A_F$.
606: Note that by (\ref{cw2}) $P^*$ contains $Qp_j$ items of size
607: $j$, $1\leq j \leq J$, and hence a total of $Q$ items.
608: Let $L_F = \{x_1,x_2,\ldots,x_Q\}$ denote the $Q$ items packed into $P^*$,
609: and denote the bins of $P^*$ as $Y_1,Y_2,\ldots ,Y_{|P^*|}$.
610:
611: Now let $P$ be an arbitrary packing of integer-size items into bins of size $B$.
612: We claim that for each bin $Y$ of the packing $P^*$, there is an ordering
613: $y_1,y_2,\ldots,y_{|Y|}$ of the items contained in $Y$
614: and a special threshold index $last(Y)<|Y|$
615: such that if we set $S_i \equiv \sum_{j=1}^is(y_j)$,
616: $0 \leq i \leq |Y|$, then the following holds:
617: \begin{enumerate}
618:
619: \item $P$ has partially filled bins with each level
620: $S_1 < S_2 < \cdots < S_{last(Y)}$.
621:
622: \item $P$ has no partially filled bin of level
623: $S_{last(Y)}+s(y_i)$ for any $i > last(Y)$.
624:
625: \end{enumerate}
626:
627: \noindent
628: That such an ordering and threshold index always exist can be seen from
629: Figure \ref{permute}, which presents a greedy procedure that, given the current
630: packing $P$, will compute them.
631: Assume we have chosen such an ordering and threshold index for
632: each bin in $P^*$.
633: Note that $S_{|Y|} = B$ for all such bins $Y$, since each is by
634: definition perfectly packed.
635:
636: \begin{figure}[b]
637: {\small
638: \begin{center}
639: \begin{boxedminipage}[t]{4.5in}
640: \begin{enumerate}
641: \item Let the set $U$ of as-yet-unordered items
642: initially\\
643: be set to $Y$ and let $S = 0$ be the initial total size\\
644: of ordered items.
645: \item While $U \neq \emptyset$ and $last(Y)$ is undefined, do the following:
646: \begin{enumerate}
647: \item[2.1] If there is an item $x$ in $U$ such that $P$ has\\
648: a partially filled bin of level $S+x$
649: \begin{enumerate}
650: \item[2.1.1] Choose such an $x$, put it next in the ordering,\\
651: and remove it from $U$
652: \item[2.1.2] Set $S=S+s(x)$.
653: \end{enumerate}
654: \item[2.2] Otherwise, set $last(Y)$ to be the number of\\
655: items ordered so far and exit {\em While} loop.
656: \end{enumerate}
657: \item Complete the ordering by appending the remaining\\
658: items in $U$ in arbitrary order.
659: \end{enumerate}
660: \vspace{.025in}
661: \end{boxedminipage}
662: \end{center}
663: \caption{Procedure for ordering items in bin $Y$ given a packing $P$} \label{permute}
664: }
665: \end{figure}
666: Our algorithm $A_F$ begins the processing of an item $a$ by first
667: randomly identifying it with an appropriate element $r(a) \in L_F$.
668: In particular, if $a$ is of size $s_j$, then $r(a)$
669: is one of the $Q \cdot p_j$ items in $L_F$ of size $s_j$,
670: with all such choices being equally likely.
671: Note that this implies that for each $i$, $1 \leq i \leq Q$,
672: the probability that a randomly generated item $a$
673: will be identified with $x_i$ is $1/Q$.
674:
675: Having chosen $r(a)$, we then determine the bin into which we should place $a$
676: as follows.
677: Suppose that in $P^*$, item $r(a)$ is in bin $Y$ and has index $j$
678: in the ordering of items in that bin.
679:
680: \begin{enumerate}
681: \item[(i)] If $j = 1$, place $a$ in an empty bin, creating a new
682: bin with level $s(a) = S_1$.
683: \item[(ii)] If $1 < j \leq last(Y)$, place $a$ in a bin with level
684: $S_{j-1}$, increasing its level to $S_j$.
685: \item[(iii)] If $j > last(Y)$, place $a$ in a bin of
686: size $S_{last(Y)}$ (or in a new bin if $last(Y)=0$).
687: \end{enumerate}
688:
689: For example, suppose that the items in $Y$, in our constructed order,
690: are of size 2, 3, 2, and 4 and $last(Y) = 2$.
691: Then $S_1=2$, $S_2=5$, $S_3=7$, $S_4=B=11$,
692: $N_P(2),~N_P(5) > 0$, and $N_P(7) = N_P(9) = 0$.
693: If $r(a) \in Y$, then it is with equal probability the first 2,
694: the 3, the second 2, or the 4.
695: In the first case it starts a new bin, creating a bin of level 2
696: and increasing $N_P(2)$ by 1.
697: In the second it goes in a
698: bin of level 2, converting it to a bin of level 5,
699: thus decreasing $N_P(2)$ by 1 and increasing $N_P(5)$ by 1.
700: In the third and fourth cases it goes in a bin of level 5, converting it to a
701: bin of level 7 or 9, depending on the case, and decreasing $N_P(5)$ by 1.
702: Thus when $r(a) \in Y$, the only positive level counts that can change
703: are those for $h \in \{2,5\} = \{S_1,S_2=S_{last(Y)}\}$, counts can
704: only change by 1,
705: and each count is at least as likely to decline as to increase.
706:
707: More generally,
708: for any bin $Y$ in $P^*$, if $a$ is randomly generated according to $F$
709: and $r(a) \in Y$, then by the law of conditional probabilities
710: $r(a)$ will take on each of the values $y_i$, $1 \leq i \leq |Y|$ with probability
711: $p = 1/|Y|$.
712: Thus if $r(a) \in Y$ the probability that the count for level $S_i$
713: increases equals the probability that it decreases when
714: $1 \leq i < last((Y)$.
715: The probability that the count for $S_{last(Y)}$ decreases
716: is at least as large as the probability that it increases (greater
717: if $last(Y) \leq |Y|-2$).
718: And for all other levels with positive counts,
719: the probability that a change occurs is 0.
720: Since this is true for all bins $Y$ of the ideal packing $P^*$,
721: the Claim follows. \proofmark
722:
723: Claim \ref{orlinlemm} is used to prove Lemma \ref{orlinlemm} as follows.
724: Note that the claim implies a bound on the expected increase in
725: $ss(P)$ when a new item is packed under $A_F$.
726: For any level count $x>0$, the expected increase in $ss(P)$ given that
727: this particular count changes is, by the claim, at most
728: $$
729: \frac{1}{2}\Bigl((x+1)^2 - x^2 \Bigr) + \frac{1}{2}\Bigl((x-1)^2 - x^2\Bigr) = 1
730: $$
731: More trivially, the expected increase in $ss(P)$
732: given that a 0-count changes is also at most 1.
733: Since a placement changes at most two counts, this means that the
734: expected increase in $ss(P)$ using algorithm $A_F$ is at most 2.
735: Since $SS$ explicitly chooses the placement of each item so as to minimize
736: the increase in $ss(P)$, we thus must also have that the expected increase in
737: $ss(P)$ under $SS$ is at most 2 at each step. \proofmark
738:
739: \medskip
740: Lemma \ref{orlinlemm} is exploited using the following result.
741: \begin{lemm}\label{cauchylemm}
742: Suppose $P$ is a packing of a randomly generated list $L_n(F)$,
743: where $F$ is a discrete distribution with bin size $B$ and $n>0$.
744: Then
745: $$E[W(P)] \leq \sqrt{(B-1)E[ss(P)]}.$$
746: \end{lemm}
747:
748: \noindent
749: {\bf Proof.}
750: For $1 \leq i \leq n$ let $C_i = \sum_{h=1}^{B-1} p[N_P(h)=i]$,
751: i.e., the expected number of levels whose count in $P$ equals $i$.
752: Then $\sum_{i=1}^{n} C_i = B-1$ and
753: \begin{equation} \label{cl2n}
754: E[ss(P)] = \sum_{h=1}^{B-1}E\left[N_P(h)\right] = \sum_{i=1}^n C_i \cdot i^2
755: \end{equation}
756:
757: \noindent
758: We now apply the Cauchy-Schwartz inequality, which says that
759: $$\left (\sum x_i y_i \right )^2 \leq
760: \left (\sum x_i^2 \right ) \left (\sum y_i^2 \right )$$
761:
762: \noindent
763: Let $x_i = \sqrt{C_i}$ and $y_i = i\sqrt{C_i}$, $1 \leq i \leq n$.
764: We then have
765: $$\left (\sum_{i=1}^n C_i \cdot i \right )^2 \leq
766: \left (\sum_{i=1}^n C_i \right ) \left (\sum_{i=1}^n C_i i^2 \right ).$$
767:
768: \noindent
769: Taking square roots and using (\ref{cl2n}), we get
770: \begin{equation} \label{ebound}
771: E \left [ \sum_{h=1}^{B-1} N_P(h) \right ] \leq \sqrt{(B-1)E[ss(P)]}.
772: \end{equation}
773:
774: \noindent
775: Since no partially full bin has more than $(B-1)/B < 1$ waste, the
776: claimed result follows. \proofmark
777:
778: \begin{theo} \label{orlintheo}
779: Suppose $F$ is a discrete distribution satisfying $EW_n^{OPT}(F) =
780: O\left(\sqrt{n}\right)$. Then $EW_n^{SS}(F) < \sqrt{2nB}$.
781: \end{theo}
782:
783: \noindent
784: {\bf Proof.}
785: By Lemma \ref{orlinlemm} and the linearity of expectations, we have
786: \begin{equation*} \label{el2n}
787: E[ss(P_n^{SS}(F))] \leq 2n.
788: \end{equation*}
789: The result follows by Lemma \ref{cauchylemm}. \proofmark
790:
791: \section{Bounded Waste Distributions} \label{boundedwastesection}
792:
793: \noindent
794: In order to distinguish the broad class of bounded waste distributions under which
795: $SS$ performs well, we need some new definitions.
796: If $F$ is a discrete distribution, let $U_F$ denote the set of sizes with
797: positive probability under $F$.
798:
799: \begin{defi}
800: A level $h$, $1 \leq h \leq B-1$,
801: is a {\em dead-end} level for $F$ if there is some collection of items
802: with sizes in $U_F$ whose total size is $h$,
803: but there is no such collection whose total is $B-h$.
804: \end{defi}
805:
806: In other words, if $h$ is a dead-end level then it is possible to pack a bin
807: to level $h$ with items from $U_F$, but once such a bin has been created, it
808: is impossible to fill it completely.
809: Note that the dead-end levels for $F$ depend only on $U_F$ and can
810: be identified in time $O(|U_F|B)$ by dynamic programming.
811:
812: \begin{obse}\label{deadendobse}
813: For future reference, note the following easy consequences of the definition
814: of dead-end level.
815:
816: \renewcommand{\theenumi}{\alph{enumi}} % For references (\ref)
817: \renewcommand{\labelenumi}{\rm (\alph{enumi})} % For the listing itself
818: \begin{enumerate}
819: \item The algorithms $A_F$ of Claim
820: \ref{orlinclaim} in the proof of Lemma \ref{orlinlemm}
821: never create bins that have dead-end levels.
822: (This is because the levels of the bins they create are always the sums
823: of item sizes from a perfectly packed bin.)
824: \item If $F$ is a perfectly packable distribution, then for no $s_j \in U_F$
825: is $s_j$ a dead-end level.
826: (Otherwise, no bin containing items of size $s_j$ could be perfectly packed.
827: Since the expected number of such bins in an optimal packing
828: is at least $np_j/B$, this means
829: that the expected waste would have to be at least $np_j/B^2$ and hence linear,
830: contradicting the assumption that $F$ is a perfectly packable distribution.)
831: \item No distribution with $1 \in U_F$ can have a dead-end level, so
832: that in particular the $U\{j,k\}$ do not have dead-end levels.
833: \end{enumerate}
834: \end{obse}
835:
836: A simple example of a distribution that does have dead-end levels is
837: any $F$ that has $B = 6$ and $U_F = \{2,3\}$.
838: Here 5 is a dead-end level for $F$ while 1,2,3,4 are not.
839: There is a sense, however, in which this distribution is still fairly
840: benign.
841:
842: \begin{defi}
843: A level $h$ is {\em nontrivial} for a
844: distribution $F$ if there is some list $L$ with item sizes from $U_F$ such that
845: the $SS$ packing $P$ of $L$ has $N_P(h)>1$.
846: \end{defi}
847:
848: It is easy to verify that there are {\em no} nontrivial levels,
849: dead-end or otherwise,
850: in the above $B = 6$ example.
851:
852:
853: \smallskip
854: We shall divide this section into three parts.
855: In subsection \ref{boundedSS} we show that $SS$ has bounded expected waste
856: for bounded waste distributions with no nontrivial dead-end levels.
857: In subsection \ref{boundedSS'} we show that a simple variant on $SS$
858: has bounded expected waste for {\em all} bounded waste distributions.
859: In subsection \ref{lognSS} we characterize the behavior of $SS$ for
860: bounded waste distributions that do have nontrivial dead-end levels.
861:
862: \subsection{A bounded expected waste theorem for $SS$}\label{boundedSS}
863:
864: \begin{theo}\label{boundedtheo}
865: If $F$ is a bounded waste distribution with no nontrivial dead-end levels, then
866: $EW_n^{SS}(F) = O(1)$.
867: \end{theo}
868:
869: To prove this result we rely on the Courcoubetis-Weber Theorem, Lemma
870: \ref{orlinlemm}, and the following specialization of
871: a result of Hajek \cite{Haj82}.
872:
873: \medskip
874: \noindent
875: {\bf Hajek's Lemma.}
876: {\em
877: Let $S$ be a state space and let
878: ${\cal F}_k$, $k \geq 1$, be a sequence of functions, where ${\cal F}_k$
879: maps $S^{k-1}$ to probability distributions over $S$.
880: Let $X_1,X_2,\ldots$ be a sequence of random variables over $S$
881: generated as follows: $X_1$ is chosen according to ${\cal F}_1 (\cdot)$
882: and $X_k$ is chosen according to ${\cal F}_k(X_1,\ldots ,X_{k-1})$.
883: Suppose there are constants $b > 1$, $\Delta < \infty$, $D > 0$,
884: and $\gamma > 0$ and a function $\phi$ from $S$ to $[0,\infty)$
885: such that
886: \begin{enumerate}
887: \renewcommand{\theenumi}{\alph{enumi}} % For references (\ref)
888: \renewcommand{\labelenumi}{\rm (\alph{enumi})} % For the listing itself
889: \item {\rm [Initial Bound Hypothesis]}.
890: $~E \left[b^{\phi(X_1)} \right] < \infty$.
891: \item {\rm [Bounded Variation Hypothesis]}. For all $N \geq 1$,
892: $\displaystyle{|\phi(X_{N+1}) - \phi(X_N)| \leq \Delta.}$
893: \item {\rm [Expected Decrease Hypothesis]}. For all $N \geq 1$,
894: $$E[\phi(X_{N+1}) - \phi(X_N)|\phi(X_N) > D] \leq - \gamma.$$
895: \end{enumerate}
896:
897: \noindent
898: Then there are constants $c>1$ and $T>0$ such that for all $N \geq 1$,
899: $E \left[c^{\phi(X_N)} \right] < T$.
900: }
901:
902: \medskip
903: Note that the conclusion of this lemma implies that there is also a constant
904: $T'$ such that $E[{\phi(X_N)}] < T'$ for all $N$.
905: A weaker version of the lemma was used in the analyses of
906: the Best and First Fit bin packing heuristics in
907: \cite{AM98,CJS93,KRS98}.
908: The added strength is not needed for Theorem \ref{boundedtheo},
909: but will be used in the proof of Theorem \ref{lognupperbound}.
910:
911: We prove Theorem \ref{boundedtheo} by applying Hajek's Lemma
912: with the following interpretation.
913: The state space $S$ is the set of all length-$(B-1)$ vectors
914: of non-negative integers $\bar{x} = \langle x_1,x_2,\ldots ,x_{B-1}\rangle$,
915: where we view $\bar{x}$ as the profile of a packing that has $x_i$
916: bins with level $i$, $1 \leq i \leq B-1$.
917: $X_0$ is then the profile of the empty packing and $X_{i+1}$ is the profile
918: of the packing obtained by generating a random item according to $F$ and
919: packing it according to $SS$ into a packing with profile $X_i$.
920: The potential function is
921: $$\phi(\bar{x}) = \sqrt{\sum_{i=1}^{B-1}x_i^2}.$$
922:
923: Note that if the hypotheses of Hajek's Lemma are
924: satisfied under this interpretation, then the lemma's conclusion
925: would say that there is a $T'$ such that for all $N$,
926: $$E\left[\sqrt{\sum_{i=1}^{B-1}x_{N,i}^2}~~\right] < T'$$
927: which implies that $E[x_{N,i}]$ is bounded by $T'$ as well,
928: $1 \leq i \leq B-1$.
929: Thus the expected waste is less than the constant $BT'$ and Theorem
930: \ref{boundedtheo} would be proved.
931:
932: Hence all we need to show is that the three hypotheses of Hajek's lemma
933: apply.
934: The Initial Bound Hypothesis applies
935: since the profile of an empty packing is all 0's and hence $\phi(X_0) = 0$.
936: The following lemma implies that Bounded Variation Hypothesis also holds.
937:
938: \begin{lemm} \label{supportlemm}
939: Let $\bar{x}$ be the profile of a packing into bins of size $B$,
940: and let $\bar{x}'$ be the profile of the packing obtained from $\bar{x}$
941: by adding an item to the packing in any legal way.
942: Then\medskip
943: $$|\phi(\bar{x}') - \phi(\bar{x})| \leq 1$$
944: \end{lemm}
945:
946: \noindent\textbf{Proof.}
947: Consider the case when $\phi(\bar{x}') > \phi(\bar{x})$ and
948: suppose that $i$ is the level whose count increases when the item is packed
949: is level $i$.
950: We have
951:
952: \begin{align*}
953: \phi(\bar{x}') - \phi(\bar{x}) & \leq
954: \sqrt{\phi(\bar{x})^2+(x_i+1)^2-x_i^2}-\phi(\bar{x})\\[.08in]
955: & = \frac{\left(\sqrt{\phi(\bar{x})^2+2x_i+1} - \phi(\bar{x})\right)
956: \left(\sqrt{\phi(\bar{x})^2+2x_i+1} + \phi(\bar{x})\right)}{\sqrt{\phi(\bar{x})^2+2x_i+1} + \phi(\bar{x})}\\[.05in]
957: &= \frac{ 2x_i+1 }
958: {\sqrt{\phi(\bar{x})^2+2x_i+1} + \phi(\bar{x}) }\\[.05in]
959: &\leq \frac{ 2x_i+1 }{\sqrt{x_i^2+2x_i+1} + x_i } = 1\,.
960: \end{align*}
961:
962: \noindent
963: A similar argument handles the case when
964: $\phi(\bar{x}') < \phi(\bar{x})$. \proofmark
965:
966: To complete the proof of the theorem, we need to show that the Expected
967: Decrease Hypothesis
968: of Hajek's Lemma applies. For this we need the following
969: three combinatorial lemmas.
970:
971: \begin{lemm} \label{squarelemm}
972: Suppose $y$ be any number and $a>0$. Then
973: $$y-a \leq \frac{y^2-a^2}{2a}.$$
974: \end{lemm}
975:
976: \noindent
977: {\bf Proof.}
978: Note that $y-a = (y^2-a^2)/(y+a)$, and then observe that no matter whether
979: $y \geq a$ or $y < a$, this is less than or equal to
980: $(y^2-a^2)/2a$. \proofmark
981:
982:
983: \begin{lemm} \label{goodmovelemm}
984: Let $F$ be a distribution with no nontrivial dead-end levels
985: and let $P$ be any packing that can be created by applying $SS$
986: to a list of items all of whose sizes are in $U_F$.
987: If $\bar{x}$ is the profile of $P$ and $\phi(\bar{x}) > 2B^{3/2}$,
988: then there is a size $s \in U_F$ such that if an item of size $s$ is packed
989: by $SS$ into $P$, the resulting profile
990: $\bar{x}'$ satisfies
991: $$\phi(\bar{x}')^2 \leq \phi(\bar{x})^2 - \frac{\phi(\bar{x})}{B^{3/2}}$$.
992: \end{lemm}
993:
994: \noindent
995: {\bf Proof.}
996: Suppose $\bar{x}$ is as specified and let
997: $h$ be the index for a level at which $\bar{x}$ takes on its maximum value.
998: It is easy to see that
999: \begin{equation}\label{maxsbound}
1000: x_h \geq \phi(\bar{x})/\sqrt{B}\,.
1001: \end{equation}
1002:
1003: \noindent
1004: Thus $x_h > 2B > 1$ and so by definition $h$ cannot be a dead-end level for $F$.
1005: Hence there must be a sequence of levels
1006: $h = \ell_0 < \ell_1 < \cdots < \ell_m = B$, $m \leq B$,
1007: such that for $1 \leq i \leq m$, $\ell_i - \ell_{i-1} \in U_F$.
1008: Taking $x_B = 0$ by convention, we have
1009: \begin{equation}\label{collapsesum}
1010: x_h = \sum_{i=0}^{m-1}(x_{\ell_i} - x_{\ell_{i+1}})\,.
1011: \end{equation}
1012:
1013: \noindent
1014: Let $q$, $0 \leq q < m$ be an index which yields the maximum value $\Delta$ for
1015: $x_{\ell_i} - x_{\ell_{i+1}}$, and let $s = \ell_{q+1}-\ell_q$.
1016: Then by (\ref{collapsesum}) we have $\Delta \geq x_h/m \geq x_h/B \geq
1017: \phi(\bar{x})/B^{3/2}$, where the last inequality follows from (\ref{maxsbound}).
1018: By Lemma \ref{deltalemm} this means that if an item of size
1019: $s$ arrives, $\phi(\bar{x})^2$ must decline by at least
1020: $$2(\Delta-1) \geq 2 \left( \frac{\phi(\bar{x})}{B^{3/2}} - 1 \right)
1021: \geq \frac{\phi(\bar{x})+2B^{3/2}}{B^{3/2}} - 2
1022: \geq \frac{\phi(\bar{x})}{B^{3/2}}$$
1023:
1024: \noindent
1025: as claimed. \proofmark
1026:
1027: \begin{lemm} \label{epsilonlemm}
1028: Let $F$ be a bounded waste distribution with $U_F = \{s_1,s_2,\ldots ,s_J\}$.
1029: For each $i$, $1 \leq i \leq J$ and $\epsilon > 0$,
1030: let $F[i,\epsilon]$ be the distribution which
1031: decreases $p_i$ to $p'_i=(p_i-\epsilon )/(1-\epsilon)$ and increases all other
1032: probabilities $p_j$ to $p'_j=p_j/(1-\epsilon)$.
1033: Then there is a constant $\epsilon_0 > 0$ such that $F[i,\epsilon]$
1034: is a perfectly packable distribution for all $i$, $1 \leq i \leq J$,
1035: and $\epsilon$, $0 < \epsilon \leq \epsilon_0$.
1036: \end{lemm}
1037:
1038: {\bf Proof.}
1039: Since $F$ is a bounded waste distribution and $p_i>0$, $1 \leq i \leq J$,
1040: this follows from the Courcoubetis-Weber theorem, part (a). \proofmark
1041:
1042: We can now prove that the Expected Decrease Hypothesis of Hajek's Lemma applies,
1043: which will complete the proof of the Theorem \ref{boundedtheo}.
1044: Let $F$ be a bounded waste distribution with no nontrivial dead-end levels,
1045: and let $\epsilon_0$ be the value specified for $F$ by Lemma \ref{epsilonlemm}.
1046: Without loss of generality we may assume that $\epsilon_0 < 2$.
1047: Let $P$ be a packing as specified in Lemma \ref{goodmovelemm}
1048: but with profile $\bar{x}$ satisfying
1049: $\phi(\bar{x}) > 4B^{3/2}/\epsilon_0 > 2B^{3/2}$.
1050: Let $i$ be the index of the size $s \in U_F$ whose existence is proved in
1051: Lemma \ref{goodmovelemm}, and let $F_i$ be the distribution that always generates
1052: an item of size $s_i$.
1053:
1054: Consider the two-phase item generation process that first randomly chooses
1055: between distributions $F_i$ and $F[i,\epsilon_0]$, the first choice being
1056: made with probability $\epsilon_0$ and the second with probability $1-\epsilon_0$.
1057: It is easy to see that this process is just a more complicated way of
1058: generating items according to distribution $F$.
1059: Now consider what happens when this process is used to add one item to
1060: packing $P$.
1061: If $F_i$ is chosen, then by Lemma \ref{goodmovelemm}, the value of
1062: $\phi^2$ declines by at least $\phi(\bar{x})/B^{3/2}$.
1063: If $F[i,\epsilon_0]$ is chosen, the expected value of $\phi^2$ increases
1064: by less than 2 by
1065: Lemma \ref{orlinlemm} and the fact that $F[i,\epsilon_0]$
1066: is a perfectly packable distribution (Lemma \ref{epsilonlemm}).
1067: Thus if $\bar{x}'$ is the resulting profile, we have by
1068: applying Lemma \ref{squarelemm} for $a = \phi(\bar{x})$
1069: and taking expectations
1070: \begin{align*}
1071: E\left[\phi(\bar{x}') - \phi(\bar{x})\right]
1072: & ~~<~~ (1-\epsilon_0)(2)\left(\frac{1}{2\phi(\bar{x})}\right)
1073: + \epsilon_0 \left(-\frac{\phi(\bar{x})}{B^{3/2}}\right)\left(\frac{1}{2\phi(\bar{x})}\right)\\
1074: & ~~<~~ \frac{1}{\phi(\bar{x})}
1075: - \frac{\epsilon_0}{2B^{3/2}}\\
1076: & ~~<~~ -\frac{\epsilon_0}{4B^{3/2}}
1077: \end{align*}
1078: since $\phi(\bar{x}) > 4B^{3/2}/\epsilon_0$.
1079: Thus the Expected Decrease Hypothesis of Hajek's Lemma holds with
1080: $D = 4B^{3/2}/\epsilon_0$
1081: and $\gamma = \epsilon_0/4B^{3/2}$, and so Hajek's Lemma applies.
1082: Thus $EW_n^{SS}(F) = O(1)$, the conclusion of Theorem \ref{boundedtheo}. \proofmark
1083:
1084: \subsection{Improving on SS for bounded waste distributions}\label{boundedSS'}
1085:
1086: Unfortunately, although $SS$ has bounded expected waste for bounded
1087: waste distributions with no nontrivial dead-end levels,
1088: it doesn't do so well for {\em all} bounded waste distributions.
1089: Consider the distribution $F$ with $B = 9$, $J=2$,
1090: $s_1=2$, $s_2=3$, and $p_1=p_2=1/2$.
1091: It is easy to see that $F$ is a bounded waste distribution,
1092: since $3$'s by themselves can pack perfectly, and only one 3 is needed for
1093: every three 2's in order that the 2's can go into perfectly
1094: packed bins.
1095: Note, however, that 8 is a nontrivial dead-end level for $F$, so
1096: Theorem \ref{boundedtheo} does not apply.
1097: In fact, $EW_n^{SS}(F) = \Omega(\log n)$, as the following
1098: informal reasoning suggests: It is likely that somewhere within a sequence
1099: of $n\log n$ items from $F$ there will be $\Omega (\log n)$ consecutive 2's.
1100: These are in turn likely to create $\Omega (\log n)$ bins of
1101: level 8, and hence, since 8 is a dead-end level, $\Theta (\log n)$ waste.
1102:
1103: Fortunately, this is the worst possible result for $SS$
1104: and a bounded waste distribution, as we shall
1105: see below in Theorem \ref{lognupperbound}.
1106: First, however, let us show how a simple modification to $SS$ yields a
1107: variant with the same running time that has $O(1)$ expected
1108: waste for all bounded waste distributions.
1109:
1110: Like $SS$, this variant ($SS'$) is on-line.
1111: It makes use of a parameterized variant $SS_D$ on the packing rule of $SS$,
1112: where $D$ is a set of levels.
1113: In $SS_D$, we place items so as to minimize $ss(P)$ subject to the
1114: constraint that no bin with level in $D$ may be created unless this is
1115: unavoidable. In the latter case we start a new bin.
1116: $SS'$ works as follows.
1117: Let $U$ be the set of item sizes seen so far and let $D(U)$ denote the set of
1118: dead-end levels for $U$.
1119: (Initially, $U$ is the empty set.)
1120: Whenever an item arrives, we first check if its size is in $U$.
1121: If not, we update $U$ and recompute $D(U)$.
1122: Then we pack the item according to $SS_{D(U)}$.
1123: A first observation about $SS'$ is the following.
1124:
1125: \begin{lemm}\label{nodeadlemm}
1126: If $F$ is a perfectly packable distribution, then $SS'$ will never create
1127: a dead-end level when packing a sequence of items with sizes in $U_F$.
1128: \end{lemm}
1129:
1130: \noindent
1131: \textbf{Proof.}
1132: By Observation \ref{deadendobse}(b), starting a bin with an item whose
1133: size is in $U_F$ can never create a dead-end level for $U_F$.
1134: On the other hand, if $SS'$ puts a item in a partially full bin,
1135: it must by definition be the case that the new level is not a dead-end level
1136: for $U$.
1137: Thus, since the new level is attainable using items whose sizes are in $U$,
1138: the resulting gap must be precisely fillable with items whose sizes are
1139: in $U \subseteq U_F$.
1140: Thus the new level is not a dead-end level for $U_F$ either.
1141: \proofmark
1142:
1143: \begin{theo}\label{sprimecor}
1144:
1145: \noindent
1146: \begin{itemize}
1147: \item[{\rm (i)}]
1148: If $F$ is a perfectly packable distribution, then
1149: $EW_n^{SS'}(F) = O(\sqrt{n})$.
1150: \item[{\rm (ii)}]
1151: If $F$ is a bounded waste distribution, then
1152: $EW_n^{SS'}(F) = O(1)$.
1153: \end{itemize}
1154: \end{theo}
1155:
1156: \noindent
1157: \textbf{Proof.}
1158: We begin by bounding the
1159: expected number of items that can arrive before we have seen all
1160: item sizes in $U_F$.
1161: Assume without loss of generality that $U_F = \{s_1,s_2,\ldots ,s_j\}$.
1162: The probability that the $i$th item size does not appear
1163: among the first $h$ items generated is $(1-p_i)^h$.
1164: Thus, if we let $p_{min} = \min\{p_i: 1 \leq i \leq J\}$, the probability
1165: that we have not seen all item sizes after the $h$th item arrives is
1166: at most
1167: \begin{equation*}
1168: \sum_{i=1}^J \left( 1-p_i \right)^h \leq J \left( 1-p_{min} \right)^h
1169: \end{equation*}
1170:
1171: Let $t$ be such that $J(1-p_{min})^t \leq 1/2$.
1172: Then for each integer $m \geq 0$, the probability that all the item sizes
1173: have not been seen after $mt$ items have arrived is at most $1/2^m$.
1174: Thus if $M$ is the number of items that have arrived when the last item
1175: size is first seen, we have that for each $m \geq 0$, the probability
1176: that $M \in (mt,(m+1)t]$ is at most $1/2^m$.
1177:
1178: For (i), note that if $P$ is the packing that exists immediately after
1179: the last item size is first seen, then $ss(P) \leq M^2$ and
1180: $$E[ss(P)]
1181: \leq \sum_{m=0}^\infty \Bigl( (m+1)t)^2 \cdot p\bigl[M \in (mt,(m+1)t]\bigr]\Bigr)
1182: \leq \sum_{m=0}^\infty \frac{((m+1)t)^2}{2^m} = 12t^2
1183: $$
1184: which is a constant bound depending only $F$.
1185: After all sizes have been seen, $SS'$ reduces to $SS_{D(U_F)}$,
1186: and it follows from Observation \ref{deadendobse}(a) that Lemma \ref{orlinlemm}
1187: applies to the latter.
1188: We thus can conclude that for any $n$ the packing $P_n$ satisfies
1189: $$E\left[ss(P_n)\right] < 12t^2 + 2n$$
1190: which by Lemma \ref{cauchylemm} implies that
1191: $EW_n^{SS'}(F) = O(\sqrt{n})$, so (i) is proved.
1192:
1193: The argument for (ii) mimics the proof of Theorem
1194: \ref{boundedtheo}. Using the same potential function $\phi$ we
1195: show that Hajek's Lemma applies when $SS$ is replaced
1196: by $SS_{D(U_F)}$, $F$ is a bounded waste distribution,
1197: and the initial state $\bar{x}$ is taken to be the profile of the packing $P$
1198: that exists immediately after the last item size is first seen by $SS'$.
1199:
1200: To see that the Initial Bound Hypothesis is satisfied,
1201: we must show that there exists a
1202: constant $b > 1$ such that $E\left[b^{\phi(\bar{x})}\right]$ is bounded.
1203: To prove this, let $M$ be the number of items in packing $P$.
1204: It is immediate that $\phi(\bar{x}) = \sqrt{\sum_{i=1}^{B-1} x_i^2} \leq M$.
1205: Thus if we take $b = 2^{1/(2t)}$ and exploit the analysis used for (i)
1206: above we have
1207: $$E\left[b^{\phi(\bar{x})}\right] \leq E\left[b^M\right]
1208: \leq \sum_{m=0}^\infty b^{(m+1)t}\cdot\frac{1}{2^m}
1209: = \sum_{m=0}^\infty \frac{2^{(m+1)/2}}{2^m}
1210: = \sqrt{2}\sum_{m=0}^\infty \frac{1}{\sqrt{2}^m}
1211: = \frac{2}{\sqrt{2}-1} < 4.83.$$
1212:
1213: Thus the Initial Bound Hypothesis is satisfied.
1214: The Bounded Variation Hypothesis again
1215: follows immediately from Lemma \ref{supportlemm}.
1216: To prove the Expected Decrease Hypothesis, we need the facts that
1217: Lemmas \ref{orlinlemm} and \ref{goodmovelemm}
1218: hold when $SS$ is replaced by $SS_{D(U_F)}$.
1219: We have already observed that Lemma \ref{orlinlemm} holds.
1220: As to Lemma \ref{goodmovelemm}, the properties of $SS$ were used in
1221: only two places.
1222: First, we needed the fact that $SS$ could never create a packing where
1223: the count for a dead-end level exceeded 1, an easy observation there
1224: since we assumed there were no nontrivial dead-end levels.
1225: Here there can be nontrivial dead-end levels, but this is not
1226: a problem since by Lemma
1227: \ref{nodeadlemm} $SS'$ can never create a packing where the count
1228: for a dead-end level is nonzero.
1229:
1230: The other property of $SS$ used in proving Lemma \ref{goodmovelemm}
1231: was simply that, in the terms of the proof
1232: of that lemma, it could be trusted to pack an item of size
1233: $s=\ell_{q+1}-\ell_q$ in such a way as to reduce $ss(P)$ by
1234: at least as much as it would be reduced by placing the item in
1235: a bin of level $\ell_q$.
1236: $SS_{D(U_F)}$ will clearly behave as desired, since level $\ell_{q+1}$,
1237: as it is constructed in the proof, is not a dead-end level,
1238: and so bins of level $\ell_q$ are legal placements for items of
1239: size $\ell_{q+1}-\ell_q$ under $SS_{D(U_F)}$.
1240:
1241: We conclude that Lemma \ref{goodmovelemm} holds
1242: when $SS_{D(U_F)}$ replaces $SS$, and so the Expected Decrease Hypotheses
1243: of Hajek's Lemma is satisfied.
1244: Thus the latter Lemma applies, and the proof of bounded
1245: expected waste can proceed exactly as it did for $SS$.
1246: \proofmark
1247:
1248: \subsection{The worst behavior of SS for bounded waste distributions}\label{lognSS}
1249:
1250: \begin{theo}\label{lognupperbound}
1251: If $F$ is a bounded waste distribution that has nontrivial dead-end
1252: levels, then $EW_n^{SS}(F) = \Theta(\log n)$.
1253: \end{theo}
1254:
1255: We divide the proof of this theorem into separate upper and lower bound
1256: proofs.
1257: These are by a substantial margin the most complicated proofs in the paper,
1258: and readers may prefer to skip this section on a first reading of the paper.
1259: None of the later sections depend on the details of these proofs.
1260:
1261: \noindent
1262: \subsubsection{Proof of the $O(\log n)$ Upper Bound}
1263:
1264: For this result we need to exploit more of the power of Hajek's Lemma
1265: (which surprisingly is used in proving the lower bound as well as
1266: the upper bound). We will also need a more complicated potential function.
1267: Let ${\cal D}_F$ denote the set of dead-end levels for $F$ and
1268: let ${\cal L}_F$ denote the set of levels that are not dead-end levels for $F$.
1269: We shall refer to the latter as {\em live} levels in what follows.
1270: For a given profile $\bar{x}$, define
1271: $\tau_D(\bar{x}) = \sum_{i\in{\cal D}_F} x_i^2$ and
1272: $\tau_L(\bar{x}) = \sum_{i\in{\cal L}_F} x_i^2$.
1273: Note that $\phi(\bar{x}) = \sqrt{\tau_D(\bar{x}) + \tau_L(\bar{x})}$.
1274: Our new potential function $\psi$ must satisfy two key properties.
1275: \begin{enumerate}
1276: \item Hajek's Lemma applies with the potential function $\psi$ and, as before,
1277: $X_i$ representing the profile after $SS$ has packed $i$ items
1278: generated according to $F$.
1279: \item For any live level $h$,
1280: \begin{equation}\label{countbound}
1281: \psi(\bar{x}) > \sqrt{\tau_L(\bar{x})} \geq x_h.
1282: \end{equation}
1283: \end{enumerate}
1284:
1285: Let us first show that the claimed upper bound will follow if we can
1286: construct a potential function $\psi$ with these properties.
1287: Since Hajek's Lemma applies,
1288: there exist constants $c>1$ and $T>0$ such that for all $N>0$,
1289: \begin{equation}\label{Tbound}
1290: E\left[ c^{\psi(X_N)}\right] \leq T.
1291: \end{equation}
1292: We can use (\ref{Tbound}) to separately bound the sums of the counts
1293: for live and dead levels.
1294: For each live level $h$, the component $X_{n,h}$ of the final
1295: packing profile $X_n$ satisfies
1296: $X_{n,h} \leq \psi(X_n) < c^{\psi(X_n)}/\log_ec$,
1297: and so we have
1298: \begin{equation}\label{livebound}
1299: E\left[ \sum_{h \in {\cal L}_F} X_{n,h} \right ]
1300: \leq E \Biggl[B\frac{c^{\psi(X_n)}}{\log_ec}\Biggr]
1301: \leq \frac{BT}{\log_ec} = O(1)
1302: \end{equation}
1303: In other words, the expected sum of the counts for live levels is bounded
1304: by a constant.
1305:
1306: To handle the dead-end levels, we begin by noting
1307: that (\ref{Tbound}) also implies that for all $N$ and all $\alpha > 1$,
1308: \[
1309: P\left[ c^{\psi(X_N)} > \alpha T \right] < \frac{1}{\alpha},
1310: \]
1311:
1312: \noindent
1313: so if we take logarithms base $c$ and set $\alpha = n^2/T$ we get
1314: \begin{equation}\label{logprob}
1315: P\left[ \psi(X_N) > 2\log_c n \right] < \frac{T}{n^2}.
1316: \end{equation}
1317:
1318: Say that a placement is a {\em major uphill move} if it increases
1319: $ss(P)$ by more than $4\log_cn+1$.
1320: By Observation \ref{deadendobse}(b) and (\ref{countbound}),
1321: we know that whenever an item is generated according to $F$ and packed
1322: by $SS$, one option will be to start a new bin with a live level
1323: and hence, no matter where the item is packed,
1324: the increase in $ss(P)$ will be bounded by $2\psi(X_N)+1$.
1325: Using (\ref{logprob}), we thus can conclude that at any point in the packing
1326: process, the probability that the next placement is a major
1327: uphill move is at most $T/n^2$.
1328: Thus, in the process of packing $n$ items, the expected number of
1329: major uphill moves is at most $T/n$ by the linearity of expectations.
1330:
1331: Now let us consider the dead-end levels.
1332: Suppose the count for dead-end level $h$ is $2B(\log_c n+1)$ or greater and
1333: a bin $b$ with level less than $h$ receives an additional item that
1334: brings its level up to $h$.
1335: We claim that bin $b$, in the process of attaining this level from the
1336: time of its initial creation, must
1337: have at one time or another experienced an item placement that was
1338: a major uphill move.
1339:
1340: To see this, let us first recall the tie-breaking rule used by $SS$
1341: when it must choose between bins with a given level for packing the next item.
1342: Although the rule chosen has no effect on the amount of waste created,
1343: our definition of $SS$ specified a particular rule, both so the algorithm
1344: would be completely defined and because the particular rule chosen facilitates
1345: the bookkeeping needed for this proof.
1346: The rule says that when choosing which bin of
1347: a given level $h$ to place an item in, we always pick the bin which
1348: most recently attained level $h$.
1349: In other words, the bins for each level will act as a stack, under the
1350: ``last-in, first-out'' rule.
1351: Now consider the bin $b$ mentioned above.
1352: In the process of reaching level $h$, it received less than $B$ items,
1353: so it changed levels fewer than $B$ times.
1354: Note also that by our tie-breaking rule above, we know that every time the bin
1355: left a level, that level had the same count that it had when the
1356: bin arrived at the level.
1357: Thus at least one of the steps in packing bin $b$ must have involved
1358: a jump from a level $i$ to a level $j$ such that
1359: $N_P(j) \geq N_P(i) + 2(\log_c n +1)$.
1360: By Lemma \ref{deltalemm} this means that the move caused
1361: $ss(P)$ to increase by at least $4(\log_c n + 1) + 1 > 4\log_c n + 1$
1362: and hence was a major uphill move.
1363: We conclude that
1364: \begin{eqnarray*}
1365: E\Biggl[ \sum_{h \in {\cal D}_F} \left( X_{n,h} \right.\Biggr.
1366: &-& \Biggl.\left. 2B(\log_c n+1) \right) \Biggr]\\
1367: &\leq& \sum_{h \in {\cal D}_F}
1368: E\left[ \Bigl(\left( X_{n,h} - 2B(\log_c n+1) \right):
1369: X_{n,h} > 2B(\log_cn+1)\Bigr) \right]\\
1370: &\leq& E\left[\hbox{\em Number of major uphill moves}\right] ~~\leq~~ \frac{T}{n}
1371: \end{eqnarray*}
1372:
1373: \noindent
1374: and consequently
1375: \begin{equation}\label{deadbound}
1376: E\left[ \sum_{h \in {\cal D}_F} X_{n,h} \right] < 2B^2(\log_c n+1) + \frac{T}{n}
1377: = O(\log n)
1378: \end{equation}
1379:
1380: \noindent
1381: for fixed $F$.
1382: Combining (\ref{livebound}) with (\ref{deadbound}), we conclude that
1383: \[
1384: EW_n^{SS}(F) < E\left[ \sum_{h \in {\cal D}_F} X_{n,h} \right]
1385: + E\left[ \sum_{h \in {\cal L}_F} X_{n,h} \right ] = O(\log n).
1386: \]
1387:
1388: Thus all that remains is to exhibit a potential function $\psi$
1389: that obeys (\ref{countbound}) and the three hypotheses of Hajek's Lemma.
1390: Our previous potential function
1391: $\phi(\bar{x}) = \sqrt{\tau_L(\bar{x})+\tau_D(\bar{x})}$
1392: obeys (\ref{countbound}) and the Initial Bound and Bounded Variation
1393: Hypotheses.
1394: Unfortunately, it doesn't obey the Expected Decrease Hypothesis for all
1395: bounded waste distributions $F$ with nontrivial dead-end levels.
1396: There can exist realizable packings in which the count for the
1397: largest dead-end level is arbitrarily large (and hence so is
1398: $\phi(\bar{x})$), and yet any
1399: item with size in $U_F$ will cause $\phi(\bar{x})$ to increase.
1400: One can avoid such obstacles by taking instead the potential function $\psi$
1401: to be $\sqrt{\tau_L(\bar{x})}$, the variant on
1402: $\phi$ that simply ignores the dead-end level counts.
1403: This function unfortunately fails to obey the Expected Decrease Hypothesis
1404: for a different reason.
1405: There are relevant situations in which any item with a size in $U_F$
1406: will either cause an increase in $\tau_L(\bar{x})$ or else go in a bin
1407: with a dead-end level and thus leave $\tau_L(\bar{x})$ unchanged.
1408:
1409: % One example would have $U_F = \{3,10\}$, $B=45$, $p(3) = .9$, $p(10) = .1$,
1410: % and a packing in which $N_P(10) = k$, $N_P(20) = 2k$, $N_P(30)=3k$,
1411: % and $N_P(40)=4k$.
1412:
1413: Thus our potential function must somehow deal with the effects of items
1414: going into dead-end level bins.
1415: Let us say that a profile $\bar{x}'$ is {\em constructible} from a profile
1416: $\bar{x}$ under $F$ if there is a way of adding items with sizes in
1417: $U_F$ to dead-end level bins of a packing with profile $\bar{x}$ so that a packing
1418: with profile $\bar{x}'$ results.
1419: Let
1420: \begin{equation}
1421: \tau_0(\bar{x}) = \min \{\tau_D(\bar{x}'):
1422: \bar{x}' \hbox{ is constructible from $\bar{x}$ under $F$} \}\\
1423: \end{equation}
1424: Note for future reference that $\tau_0(\bar{x})$ can never decrease as
1425: items are added to the packing. Now let
1426: \begin{equation}
1427: r_D(\bar{x}) = \tau_D(\bar{x})-\tau_0(\bar{x})
1428: \end{equation}
1429: Thus $r_D(\bar{x})$
1430: is the amount by which we can reduce $\tau_D(\bar{x})$ by adding items
1431: with sizes in $U_F$ into bins with dead-end levels.
1432: Our new potential function is
1433: \begin{equation}
1434: \psi(\bar{x}) = \sqrt{\tau_L(\bar{x}) + r_D(\bar{x})}
1435: \end{equation}
1436:
1437: Note that since we must always have $r_D(\bar{x}) \geq 0$,
1438: we have $\psi(\bar{x}) \geq \sqrt{\tau_L(\bar{x})}$ and so
1439: (\ref{countbound}) holds for $\psi$.
1440: It remains to be shown that Hajek's Lemma applies to $\psi$.
1441: This is significantly more difficult than showing it
1442: applies to $\phi$ when $F$ has no dead-end levels.
1443:
1444: First we prove a technical lemma that will help us understand
1445: the intricacies of the $r_D(\bar{x})$ part of our potential function $\psi$.
1446: Recall that if $r_D(\bar{x}) = t$,
1447: then there is some list $L$ of items
1448: with sizes in $U_F$ that we can add to the dead-end level
1449: bins of a packing with profile $\bar{x}$
1450: to get to one with a profile $\bar{y}$ such that
1451: $\tau_D(\bar{y}) = \tau_D(\bar{x}) - t$,
1452: and no such list of items can yield a profile $\bar{y}'$ with
1453: $\tau_D(\bar{y}') < \tau_D(\bar{x}) - t$.
1454: In what follows, we will use an equivalent graph-theoretic formulation
1455: based on the following definition.
1456:
1457: \begin{defi}\label{multigraph}
1458: A {\em reduction graph} $G$ for $F$ is a directed multigraph
1459: whose vertices are the dead-end levels for $F$ and
1460: for which each arc $(h,i)$ is such that $i-h$ can be decomposed into a
1461: sum of item sizes from $U_F$.
1462: Such a graph $G$ is {\em applicable} to a profile $\bar{x}$ if
1463: $outdegree_G(i) \leq x_i$ for all dead-end levels $i$.
1464: The profile $G[\bar{x}]$ derived from applying $G$ to $\bar{x}$
1465: is the vector $\bar{y}$ that has
1466: $y_i = x_i + indegree_G(i) - outdegree_G(i)$ for
1467: all dead-end levels and $y_i = x_i$ for all live levels.
1468: We say that $G$ {\em verifies $t$ for $\bar{x}$} if
1469: $\tau_D(\bar{x}) - \tau_D(G[\bar{x}]) \geq t$.
1470: \end{defi}
1471:
1472: Note that $r_D(\bar{x})$ equals the maximum $t$
1473: verified for $\bar{x}$
1474: by some applicable reduction graph $G$.
1475: The list $L$ corresponding to $G$, i.e., the one that can be added to
1476: $\bar{x}$ to obtain $G[\bar{x}]$, is a union of sets of items of total size $i-h$
1477: for each arc $(h,i)$ in $G$.
1478:
1479: \begin{lemm}\label{tau0lemm}
1480: Let $G$ be a reduction graph with the minimum possible number of arcs that
1481: verifies $r_D(\bar{x})$ for $\bar{x}$.
1482: Then the following three properties hold:
1483: \begin{enumerate}
1484: \renewcommand{\theenumi}{\alph{enumi}}
1485: \renewcommand{\labelenumi}{(\roman{enumi})}
1486: \item No vertex in $G$ has both a positive indegree and a positive outdegree.
1487: \item Suppose that the arcs of $G$ are ordered arbitrarily as $a_1,a_2,\ldots,a_m$,
1488: that we inductively define a sequence of profiles
1489: $\bar{y}[0] = \bar{x}, \bar{y}[1], \ldots \bar{y}[m]$
1490: by saying that $\bar{y}[i+1]$ is derived by applying the graph consisting
1491: of the single arc $a_i$ to $\bar{y}[i-1]$, $1 \leq i \leq m$, and that
1492: we define $\Delta[i] = \tau_D(\bar{y}[i-1]) - \tau_D(\bar{y}[i])$,
1493: $1 \leq i \leq m$.
1494: Then
1495: \begin{align}
1496: \sum_{i=1}^m\Delta[i] & = r_D(\bar{x})~and\label{deltasum}\\
1497: \Delta[i] & > 0,~1 \leq i \leq m.\label{deltamin}
1498: \end{align}
1499:
1500: \item $G$ contains fewer than $\psi(\bar{x})$ copies of any arc $(h,i)$.
1501: \end{enumerate}
1502: \end{lemm}
1503:
1504: \noindent\textbf{Proof.}
1505: If (i) did not hold, there would be a pair of arcs $(h,i)$ and $(i,j)$
1506: in $G$ for some $h,i,j$.
1507: But note that then the graph $G'$ with these two arcs replaced by
1508: $(h,j)$ would also verify $r_D(\bar{x})$ for $\bar{x}$,
1509: and would have one less arc, contradicting our minimality assumption.
1510:
1511: For (ii), equality (\ref{deltasum}) follows from a collapsing sum
1512: argument and the fact that $\bar{y}[m] = G[\bar{x}]$.
1513: The proof of (\ref{deltamin}) is a bit more involved.
1514: Suppose there were some $k$ such that $\Delta[k] \leq 0$.
1515: We shall show how this leads to a contradiction.
1516: Consider the result of deleting arc $a_k = (h,j)$ from $G$,
1517: thus obtaining new graph $G'$
1518: and new sequences $\bar{y}[i]'$ and $\Delta_i'$, $1 \leq i \leq m-1$.
1519: We will show that $G'$ also verifies $r_D(\bar{x})$
1520: for $\bar{x}$, contradicting our minimality assumption.
1521:
1522: Note that $\bar{y}[i]' = \bar{y}[i]$, $1 \leq i < k$,
1523: and hence $\Delta[i]' = \Delta[i]$ for $1 \leq i < k$.
1524: Thereafter the only difference between $\bar{y}[i]$ and $\bar{y}[i]'$ is that
1525: $y[i]_h' = y[i+1]_h+1$ and $y[i]_j' = y[i+1]_j-1$.
1526: Suppose $i \geq k$ and that $a_i = (r,q)$.
1527: Note that by (i), $r \neq j$ and $q \neq h$.
1528: Thus we have
1529: $y[i]_r' \geq y[i+1]_r$ and $y[i]_q' \leq y[i+1]_q$ and by Lemma \ref{deltalemm}
1530: (noting that $\Delta[i]$ as defined is $-1$ times the quantity evaluated in
1531: that lemma),
1532: \[
1533: \Delta[i]' = 2\left(y[i]_r' - y[i]_q' -1\right)
1534: \geq 2\left(y[i+1]_r - y[i+1]_q -1\right) = \Delta[i+1].
1535: \]
1536:
1537: \noindent
1538: Thus we have by (\ref{deltasum})
1539: \[
1540: \sum_{i=1}^{m-1}\Delta[i]' \geq \sum_{i=1}^{m}\Delta[i] - \Delta[k]
1541: \geq \sum_{i=1}^{m}\Delta[i] = r_D(\bar{x}),
1542: \]
1543:
1544: \noindent
1545: and so $G'$ verifies $r_D(\bar{x})$ for $\bar{x}$.
1546: Since $G'$ has one less arc than $G$, this violates our assumption about
1547: the minimality of $G$ and so yields
1548: our desired contradiction, thus proving (\ref{deltamin}).
1549:
1550: Finally, let us consider (iii).
1551: Suppose there were $\psi(\bar{x})$ copies of some arc $(h,i)$
1552: in $G$.
1553: By (ii) we may assume that these are arcs $a_1,a_2,\ldots,a_{\psi(\bar{x})}$,
1554: and that each yields an improvement in $\tau_D$.
1555: Thus when the last is applied, the count for level $h$ must have been
1556: at least 2 more than the count for level $j$, and inductively, when
1557: arc $a_{\psi(\bar{x})+1-i}$ was applied, the difference in counts
1558: had to be at least $2i$.
1559: Now by Lemma \ref{deltalemm},
1560: if the count for level $h$ exceeds that for level $j$
1561: by $\delta$, then the decrease in $\tau_D$ caused by applying
1562: the arc is $2\delta-2$.
1563: Thus by (ii) we have
1564: \begin{equation*}
1565: \psi(\bar{x})^2 \geq r_D(\bar{x})
1566: \geq \sum_{i=1}^{\psi(\bar{x})} (4i-2) = 2\psi(\bar{x})^2,
1567: \end{equation*}
1568:
1569: \noindent
1570: a contradiction.
1571: Thus (iii) and Lemma \ref{tau0lemm} have been proved. \proofmark\medskip
1572:
1573: \medskip
1574: Now let us turn to showing that Hajek's Lemma applies when $\psi$
1575: plays the role of $\phi$.
1576: Since the initial state is the empty packing, for which $\psi(\bar{x}) = 1$,
1577: the Initial Bound Hypothesis is trivially satisfied.
1578: For the Bounded Variation Hypothesis we must show that there is a
1579: fixed bound $\Delta$ on $|\psi(\bar{x}')-\psi(\bar{x})|$, where $\bar{x}$
1580: is any profile that can occur with positive probability in an $SS$ packing
1581: under $F$ and $\bar{x}'$ is any profile that can be obtained by adding an
1582: item with size $s \in U_F$ to a packing with profile $\bar{x}$ using $SS$.
1583: We will show this for $\Delta = 10B$.
1584: We may assume without loss of generality that $B \geq 2$,
1585: as otherwise $EW_n^{SS}(F) = 0$ for all $n$.
1586:
1587: There are two cases, depending on whether $\psi(\bar{x}') \geq \psi(\bar{x})$.
1588: First suppose $\psi(\bar{x}') \geq \psi(\bar{x})$.
1589: By Lemma \ref{squarelemm} it suffices to prove that
1590: $\psi(\bar{x}')^2-\psi(\bar{x})^2 \leq 2\Delta\psi(\bar{x})
1591: =20B\psi(\bar{x})$.
1592: By Observation \ref{deadendobse}(b) we know that $s$ is not
1593: a dead-end level and hence by (\ref{countbound}) $x_s \leq \psi(\bar{x})$.
1594: Thus by the operation of $SS$ and the
1595: fact that $\tau_0(\bar{x})$ cannot decrease,
1596: the increase in $\psi(\bar{x})^2$ is at most
1597: $(x_s+1)^2 - x_s^2 = 2x_s+1.$
1598: If $x_s = 0$, this is clearly less than $10B$.
1599: Otherwise, we have $\psi_L(\bar{x}) \geq \tau_L(\bar{x}) > 1$,
1600: and so $2x_s+1 \leq 3\psi(\bar{x}) \leq 20B\psi(\bar{x})$,
1601: as desired.
1602:
1603: Suppose on the other hand that $\psi(\bar{x}') < \psi(\bar{x})$,
1604: a significantly more difficult case.
1605: We need to show that $\psi(\bar{x}) - \psi(\bar{x}') \leq \Delta = 10B$.
1606: Lemma \ref{squarelemm} again applies, but now requires that we show
1607: $\psi(\bar{x})^2 - \psi(\bar{x}')^2 \leq 2\Delta\psi(\bar{x}')$,
1608: where the bound is in terms of the resulting profile $\bar{x}'$
1609: rather than the initial one $\bar{x}$.
1610: To simplify matters, we shall first show that the former
1611: is within a constant factor of the latter.
1612: This is not true in general, but we may restrict attention to
1613: a case where it provably {\em is} true.
1614: In particular we may assume without loss of generality that
1615: $\psi(\bar{x}) \geq 10B$, since otherwise it is obvious that any
1616: placement will reduce $\psi(\bar{x})$ by at most $10B$.
1617:
1618: \begin{lemm}\label{bigenoughlemm}
1619: Suppose $F$ is a bounded waste distribution with $B\geq 2$, $\bar{x}$ is a profile
1620: with $\psi(\bar{x}) \geq 10B$, and $\bar{x}'$ is the profile resulting
1621: from using $SS$ to place an item of size $s \in U_F$ into a packing with
1622: profile $\bar{x}$. Then $\psi(\bar{x}') \geq \psi(\bar{x})/2$.
1623: \end{lemm}
1624:
1625: \noindent\textbf{Proof.}
1626: By hypothesis, $\tau_L(\bar{x}) + r_D(\bar{x}) \geq 100B^2$.
1627: We break into cases depending on the relative values of $\tau_L(\bar{x})$
1628: and $r_D(\bar{x})$.
1629:
1630: Suppose $\tau_L(\bar{x}) \geq r_D(\bar{x})$,
1631: in which case $\tau_L(\bar{x}) \geq \psi(\bar{x})^2/2 \geq 50B^2$.
1632: If the new item goes into a dead-end level bin,
1633: then $\tau_L(\bar{x})$ remains unchanged and
1634: $\psi(\bar{x}') \geq \sqrt{\psi(\bar{x})^2/2} \geq .707\psi(\bar{x})
1635: > \psi(\bar{x})/2$.
1636: If on the other hand the new item goes into a bin with a live level, say $h$,
1637: then $\tau_L(\bar{x})$ will decline by at most $2x_h-1$.
1638:
1639: We now break into two further subcases.
1640: If $2x_h-1 < \tau_L(\bar{x})/2$, then we will have
1641: $\tau_L(\bar{x}') > \tau_L(\bar{x})/2 \geq \psi(\bar{x})^2/4$ and so
1642: $\psi(\bar{x}') > \sqrt{\psi(\bar{x})^2/4} = \psi(\bar{x})/2$.
1643: If $2x_h-1 \geq \tau_L(\bar{x})/2$,
1644: then $x_h > \tau_L(\bar{x})/4 \geq 12.5B^2$.
1645: But this means that
1646: $$\frac{\tau_L(\bar{x}')}{\tau_L(\bar{x})} \geq \frac{(x_h-1)^2}{x_h^2}
1647: \geq \frac{\left(12.5B^2-1\right)^2}{\left(12.5B^2\right)^2}
1648: \geq \left(\frac{49}{50}\right)^2 \geq .96$$
1649: Thus $\tau_L(\bar{x}') \geq .96\tau_L(\bar{x}) \geq .48\psi(\bar{x})^2$
1650: and $\psi(\bar{x}') \geq \sqrt{.48\psi(\bar{x})^2} \geq .69\psi(\bar{x})
1651: > \psi(\bar{x})/2$.
1652: Thus when $\tau_L(\bar{x}) \geq r_D(\bar{x})$
1653: we have $\psi(\bar{x}') \geq \psi(\bar{x})/2$ in all cases.
1654:
1655: Now suppose that $\tau_L(\bar{x}) < r_D(\bar{x})$,
1656: in which case
1657: $r_D(\bar{x}) \geq \psi(\bar{x})^2/2 \geq 50B^2$.
1658: Consider the bin in which the new item is placed.
1659: If its new level is a live level,
1660: then so must have been its original level.
1661: Thus $r_D(\bar{x})$ is unchanged,
1662: and we have
1663: $\psi(\bar{x}') \geq \sqrt{\psi(\bar{x})^2/2} \geq .707\psi(\bar{x})
1664: > \psi(\bar{x})/2$.
1665:
1666: The only case remaining is when
1667: $r_D(\bar{x}) \geq \psi(\bar{x})^2/2 \geq 50B^2$
1668: and the new item increases the level of the bin that receives it
1669: to a dead-end level.
1670: Thus the count for one dead-end level increases by 1.
1671: Let us denote this level by $h^+$.
1672: If the item was placed in a bin with a live level, that is the only
1673: change in the dead-end level counts.
1674: Otherwise, an additional
1675: one of those counts (the one corresponding to the original
1676: level of the bin into which the item was placed) will decrease by 1.
1677: Let $h^-$ denote this level if it exists.
1678:
1679: In the terms of Lemma \ref{tau0lemm},
1680: let $G$ be a minimum-arc graph that verifies $r_D(\bar{x})$ for
1681: $\bar{x}$.
1682: Let $G'$ equal $G$ if $h^-$ doesn't exist or if
1683: $outdegree_G(h^-) < x_{h^-}$.
1684: Otherwise let $G'$ be a graph obtained by deleting one of the out-arcs
1685: leaving $h^-$ in $G$.
1686: In both cases, $G$ will be applicable to $\bar{x}'$.
1687: Order the arcs of $G$ so that the deleted arc (if it exists)
1688: comes last, preceded by all the other arcs out of $h^-$ (if they exist),
1689: preceded by the arcs into $h^+$ (if they exist), preceded by all remaining arcs,
1690: and let the arcs of $G'$ occur in the same order as they do in $G$.
1691: Let us now see what happens when we apply $G'$ to $\bar{x}'$,
1692: and how this differs from what happens when we apply $G$ to $\bar{x}$.
1693:
1694: Let $\delta(a)$ be the change in $\tau_D$ due to the application
1695: of arc $a$ when $G$ is being applied to $\bar{x}$, and let $\delta'(a)$
1696: be the change when $G'$ is applied to $\bar{x}'$.
1697: By Lemma \ref{tau0lemm} and the definition of $\tau_0$ we have
1698: \begin{eqnarray}
1699: \label{deltaa}r_D(\bar{x}) &=& \sum_{a \in G}\delta(a)\\
1700: \label{deltaaprime}r_D(\bar{x}') &\geq& \sum_{a \in G'}\delta'(a).
1701: \end{eqnarray}
1702: Thus to complete the proof of Lemma \ref{bigenoughlemm}, it will suffice to show
1703: that
1704: \begin{equation}
1705: \sum_{a \in G'}\delta'(a) \geq c\sum_{a \in G}\delta(a).
1706: \end{equation}
1707: for an appropriate constant $c$.
1708:
1709: Consider an arc $a=(i,j)$ in $G$ and let $n_i(a)$ and $n_j(a)$
1710: ($n_i'(a)$ and $n_j'(a)$)
1711: be the corresponding level counts when $a$ is applied during the
1712: course of applying $G$ to $\bar{x}$ ($G'$ to $\bar{x}'$).
1713: By Lemma \ref{deltalemm} and the fact that since $i$ and $j$
1714: are dead-end levels neither can be 0 or $B$, we have
1715: $\delta(a) = 2(n_i(a)-n_j(a))-2$
1716: and $\delta'(a) = 2(n_i'(a)-n_j'(a))-2$.
1717:
1718: Let $h$ be one of $i,j$.
1719: Observe that if $h \notin \{h^+,h^-\}$, then $n_h'(a) = n_h(a)$,
1720: if $h = h^+$ then $n_h'(a) = n_h(a)+1$, and if
1721: $h = h^-$ then $n_h'(a) = n_h(a)-1$.
1722: Thus the only arcs $a=(i,j)$ for which $\delta'(a) < \delta(a)$
1723: are those with $i=h^-$, $j=h^+$, or both.
1724: If only one of the two holds, then $\delta'(a) = \delta(a) -2$.
1725: If both hold then $\delta'(a) = \delta(a) -4$.
1726: As a notational convenience, let $A^*$ denote the set of deleted arcs.
1727: (Note that $A^*$ will either be empty or contain a single arc.)
1728: Then we have
1729: \begin{equation} \label{GprimeShortfall}
1730: \sum_{a \in G'}\delta'(a) \geq \sum_{a \in G}\delta(a)
1731: - 2\left(indegree_G(h^+) + outdegree_G(h^-)\right) - \sum_{a \in A^*}\delta_G(a).
1732: \end{equation}
1733: where $outdegree_G(h^-)$ is taken by convention to be 0 if $h^-$ does not
1734: exist.
1735:
1736: Let us deal with that last term first.
1737: If there is an arc $a^* = (i,j)$ in $A^*$
1738: then by our ordering of arcs in $G$ it is the last arc.
1739: Suppose $\delta_G(a*) = 2(n_i(a)-n_j(a)) -2 > 4$.
1740: Then we $n_i(a)-n_j(a) > 3$.
1741: But this means that after the arc is applied we will have
1742: $N_P(i) - N_P(j) \geq 2$, and so it would be possible to
1743: apply an additional arc $(i,j)$, and this would further
1744: decrease $\tau_D$ by at least 2.
1745: But this contradicts our choice of $G$ as a graph whose application
1746: to $\bar{x}$ yielded the maximum possible decrease in $\tau(\bar{x})$.
1747: So we can conclude that
1748: \begin{equation}\label{deltaa*}
1749: \delta_G(a^*) \leq 4 \leq 2B.
1750: \end{equation}
1751:
1752: Now let us consider the rest of the right hand side of (\ref{GprimeShortfall}).
1753: Let $M = indegree_G(h^+) + outdegree_G(h^-)$.
1754: If $M \leq 10B$, then
1755: \begin{equation*}
1756: \sum_{a \in G}\delta(a) - \sum_{a \in G'}\delta'(a)
1757: \leq 2M+2B \leq 22B \leq .11\psi(\bar{x})^2
1758: \end{equation*}
1759: since by assumption $\psi(\bar{x})^2 \geq 100B^2 \geq 200B$.
1760: Thus by (\ref{deltaa}), (\ref{deltaaprime}), and our assumption that
1761: $r_D(\bar{x}) \geq \psi(\bar{x})^2/2$,
1762: \begin{equation*}
1763: r_D(\bar{x}') \geq .39\psi(\bar{x})^2
1764: \end{equation*}
1765: and hence $\psi(\bar{x}') \geq .624\psi(\bar{x}) > \psi(\bar{x})/2.$
1766:
1767: Thus we may assume that $M > 10B$.
1768: Let $A_h$ denote the multiset of arcs in $G$ with $i=h^-$ or $j=h^+$
1769: or both, and let us say that a pair $<i,j>$ of dead-end levels is
1770: a {\em valid pair} if $A_h$ contains at least one arc $(i,j)$.
1771: Note that there can be at most $B-1$ valid pairs,
1772: since by Lemma \ref{tau0lemm} no vertex in $G$ can have both
1773: positive indegree and positive outdegree.
1774:
1775: Suppose $<i,j>$ is a valid pair
1776: and there are $m$ copies of arc $(i,j)$ in $A_h$.
1777: By Lemma \ref{tau0lemm} each copy must decrease $\tau_D$ when
1778: it is applied, so if we let the last copy of $(i,j)$ in our defined order
1779: be $a_1$, the next-to-last by $a_2$, etc., we will have $\delta_G(a_k) \geq 2$,
1780: $1 \leq k \leq m$.
1781: Moreover, since an application of an arc $(i,j)$ reduces
1782: $N_P(i)-N_P(j)$ by at least 1, and since by Lemma \ref{tau0lemm}
1783: applications of other arcs cannot increase $N_P(i)$ or
1784: decrease $N_P(j)$, we must in fact have $\delta_G(a_k) \geq \delta_G(a_{k-1})+2$,
1785: $2 \leq k \leq m$.
1786: If $(i,j) = (h^-,h^+)$ then each application reduces $N_P(i)-N_P(j)$ by 2,
1787: and so in this case $\delta_G(a_k) \geq \delta_G(a_{k-1})+4$,
1788: $1 \leq k \leq m$.
1789: Thus
1790: $$
1791: \sum_{k=1}^m\delta_G(a_k) \geq \left\{
1792: \begin{array}{ll}
1793: \sum_{k=1}^m(2k) = m(m+1), & i = h^- \hbox{ or } j = h^+ \hbox{ but not both}\\
1794: &\\
1795: \sum_{k=1}^m(4k-2) = 2m^2, & i = h^- \hbox{ and } j = h^+
1796: \end{array}
1797: \right.
1798: $$
1799: Since $2m^2 \geq m(m+1)$ for all $m \geq 1$, we thus have
1800: \begin{equation}\label{MslashBfloor}
1801: \sum_{a \in A_h}\delta_G(a) \geq (B-1)\left\lfloor\frac{M}{B-1}\right\rfloor
1802: \left(\left\lfloor\frac{M}{B-1}\right\rfloor + 1\right) \geq
1803: \frac{M^2}{B-1} - M
1804: \end{equation}
1805: \noindent
1806: Then by (\ref{GprimeShortfall}), (\ref{deltaa*}), (\ref{MslashBfloor}),
1807: and our assumption that $M > 10B$, we have
1808: \begin{eqnarray}
1809: \frac{\sum_{a \in G}\delta(a) - \sum_{a \in G'}\delta'(a)}
1810: {\sum_{a \in G}\delta(a)}
1811: &\leq& \frac{2M+2B}{\frac{M^2}{B-1}-M}
1812: = \frac{2+\frac{B}{M}}{\frac{M}{B-1}-1}\\ \nonumber
1813: &&\\ \nonumber
1814: &\leq& \frac{2.1(B-1)}{M-B+1} \leq \frac{2.1(B-1)}{9B+1}
1815: \leq \frac{2.1}{19} \leq .111
1816: \end{eqnarray}
1817: Thus by (\ref{deltaa}) and (\ref{deltaaprime}) and our assumption
1818: that $r_D(\bar{x}) \geq \psi(\bar{x})/2$, we have
1819: \begin{equation*}
1820: r_D(\bar{x}') \geq
1821: .889r_D(\bar{x}) > .444\psi(\bar{x})^2
1822: \end{equation*}
1823: And hence $\psi(\bar{x}') \geq \sqrt{r_D(\bar{x}')}
1824: > .666\psi(\bar{x}) > \psi(\bar{x})/2$.
1825: Thus in all cases we have $\psi(\bar{x}') \geq \psi(\bar{x})/2$
1826: and Lemma \ref{bigenoughlemm} is proved. \proofmark
1827:
1828: \medskip
1829: Returning to the proof that Hajek's Lemma applies,
1830: recall that we are in the midst of proving that the Bounded Variation
1831: Hypothesis holds, and are left with the task of showing
1832: that $\psi(\bar{x}) - \psi(\bar{x}') \leq 10B$ in the case where
1833: $\psi(\bar{x}') < \psi(\bar{x})$.
1834: By Lemma \ref{squarelemm} it will suffice to show that
1835: $\psi(\bar{x})^2 - \psi(\bar{x}')^2 \leq 20B\psi(\bar{x}')$
1836: when $\psi(\bar{x}) \geq 10B$,
1837: which by Lemma \ref{bigenoughlemm} will follow if we can show that
1838: \begin{equation}\label{downbound}
1839: \psi(\bar{x})^2 - \psi(\bar{x}')^2 \leq 10B\psi(\bar{x})
1840: \end{equation}
1841:
1842: As in the proof of Lemma \ref{bigenoughlemm}, we divide the
1843: difference $\psi(\bar{x})^2 - \psi(\bar{x}')^2$ into two parts
1844: that we will treat separately:
1845: $\tau_L(\bar{x}) - \tau_L(\bar{x}')$
1846: and $r_D(\bar{x})-r_D(\bar{x}')$.
1847:
1848: We begin by bounding the first part.
1849: If the item being packed goes in an empty bin, then a live level gets
1850: increased and no dead-end level is changed, so $\psi(\bar{x})$ {\em increases},
1851: contrary to hypothesis.
1852: If the item being packed goes into a bin with a dead-end level,
1853: then $\tau_L(\bar{x})$ remains unchanged.
1854: If the item goes into a bin with a live level $h$, then
1855: by (\ref{countbound}) we have that $x_h \leq \psi(\bar{x})$,
1856: so by Lemma \ref{deltalemm} the decrease in $\tau_L$ is at most
1857: $2x_h-1 < 2\psi(\bar{x}) \leq B\psi(\bar{x})$.
1858: Thus to prove (\ref{downbound}) it will suffice to prove that
1859: $r_D(\bar{x})-r_D(\bar{x}') \leq 9B\psi(\bar{x})$.
1860:
1861: To bound this second difference, note first that the hypotheses
1862: of Lemma \ref{bigenoughlemm} hold.
1863: So as in the proof of that Lemma,
1864: let $G$ be a graph that verifies $r_D(\bar{x})$.
1865: If the placement of the item changes no dead-end level counts,
1866: there is nothing to prove, so we again may assume that there
1867: is a dead-end level $h^+$ that increases by 1 and (possibly)
1868: a dead-end level $h^-$ that decreases by 1.
1869: As in the proof of the Lemma we have
1870: \begin{equation}\label{GprimeShortfall2}
1871: r_D(\bar{x})-r_D(\bar{x}')
1872: \leq 2\bigl(indegree_G(h^+)+outdegree_G(h^-)\bigr) + 2B
1873: \end{equation}
1874: where by convention $outdegree_G(h^-)$ is taken to be 0 if $h^-$ doesn't
1875: exist.
1876:
1877: Also, as in the proof of Lemma \ref{bigenoughlemm}, there are
1878: at most $B-1$ distinct pairs $<i,j>$ such that $(i,j)$ is an arc of $G$
1879: and $i = h^-$, $j = h^+$, or both.
1880: But then by Lemma \ref{tau0lemm}(iii) we have fewer than
1881: $\psi(\bar{x})$ copies of each.
1882: Given that arcs $(h^-,h^+)$ will be double counted in
1883: $indegree_G(h^+)+outdegree_G(h^-)$, we thus have
1884: $$indegree_G(h^+)+outdegree_G(h^-) < B\psi(\bar{x})$$
1885: Combining this with (\ref{GprimeShortfall2}) we conclude that
1886: $$r_D(\bar{x})-r_D(\bar{x}') \leq 2B\psi(\bar{x}) + 2B < 9B\psi(\bar{x})
1887: $$
1888: We thus conclude (\ref{downbound}) holds
1889: and hence so does the Bounded Variation Hypothesis.
1890:
1891: \medskip
1892: To complete the proof that Hajek's Lemma applies, all that remains
1893: is to show that the Expected Decrease Hypothesis holds.
1894: Essentially the same proof that was used when there were no nontrivial
1895: dead-end levels will work, except that Lemma \ref{goodmovelemm}
1896: needs to be modified to account for the possibility of such levels
1897: and we need to show that both it and Lemma \ref{orlinlemm} hold for
1898: $\psi(\bar{x})^2$.
1899:
1900: This is straightforward for Lemma \ref{orlinlemm}, which essentially
1901: says that assuming $F$ is a perfectly packable distribution, the expected
1902: increase in $\phi(\bar{x})^2$ that can result from using $SS$ to pack an item
1903: generated according to $F$ is less than 2.
1904: This will hold for $\psi(\bar{x})^2$ as well since by definition
1905: \begin{eqnarray*}
1906: \psi(\bar{x})^2 &=& \tau_L(\bar{x}) + r_D(\bar{x})\\
1907: &=& \tau_L(\bar{x})+\tau_D(\bar{x})-\tau_0(\bar{x})\\
1908: &=& \phi(\bar{x})^2 - \tau_0(\bar{x}),
1909: \end{eqnarray*}
1910: and by definition $\tau_0(\bar{x})$ can never decrease.
1911:
1912: As to Lemma \ref{goodmovelemm}, we need only modify it by increasing the
1913: two key constants involved.
1914: The precise values of these constants are not
1915: relevant to satisfying the Expected Decrease Hypothesis.
1916: In particular, we can prove the following variant on Lemma \ref{goodmovelemm}.
1917:
1918: \begin{lemm}\label{goodmovelemm2}
1919: Let $F$ be a bounded waste distribution
1920: and let $P$ be any packing that can be created by applying $SS$
1921: to a list of items all of whose sizes are in $U_F$.
1922: If $\bar{x}$ is the profile of $P$ and $\psi(\bar{x}) > 2\sqrt{2}B^{3/2}$,
1923: then there is a size $s \in U_F$ such that if an item of size $s$ is packed
1924: by $SS$ into $P$, the resulting profile
1925: $\bar{x}'$ satisfies
1926: $$\psi(\bar{x}')^2 \leq \psi(\bar{x})^2 - \frac{\psi(\bar{x})}{B^2}.$$
1927: \end{lemm}
1928:
1929: \noindent\textbf{Proof.}
1930: Since $\tau_0(\bar{x})$ can never decrease, the result will follow if we can
1931: show that there exists an item size $s$ such that if an item
1932: of size $s$ is packed by $SS$, $\psi(\bar x)^2 - \tau_0(\bar x)
1933: = \tau_L(\bar x)+\tau_D(\bar x) = ss(P)$
1934: will decline by at least $\psi(\bar{x})/B^2$.
1935:
1936: Suppose $\tau_L(\bar{x}) \geq \psi(\bar{x})^2/2$.
1937: Then as in the argument used in the proof of Lemma \ref{goodmovelemm}
1938: there has to be a live level $h$ with $x_h \geq \sqrt{\tau_L(\bar{x})/B}
1939: \geq \psi(\bar{x})/(\sqrt{2B})$
1940: and hence a size $s$ that will
1941: cause $ss(P)$ to decline by at least
1942: $$2\left(\frac{x_h}{B} -1\right) \geq 2\frac{\psi(\bar{x})}{\sqrt{2}B^{3/2}}-2
1943: \geq \frac{\psi(\bar{x})+2\sqrt{2}B^{3/2}}{\sqrt{2}B^{3/2}} - 2
1944: = \frac{\psi(\bar{x})}{\sqrt{2}B^{3/2}}
1945: \geq \frac{\psi(\bar{x})}{B^2}.$$
1946:
1947: Suppose on the other hand that $\tau_L(\bar{x}) < \psi(\bar{x})^2/2$.
1948: In this case we must have
1949: $r_D(\bar{x}) > \psi(\bar{x})^2/2$.
1950: Let $G$ be a minimum-arc reduction graph that verifies
1951: $r_D(\bar{x}) \geq \psi(\bar{x})^2/2$,
1952: and suppose $G$ contains $m$ arcs, ordered as $a_1,a_2,\ldots,a_m$.
1953: By Lemma \ref{tau0lemm}(i),(iii), we know that $m < (B-1)\psi(\bar{x})$.
1954: Thus by Lemma \ref{tau0lemm}(ii) we know that for some $i$, $1 \leq i \leq m$,
1955: \[
1956: \Delta[i] > \frac{r_D(\bar{x})}{m}
1957: > \frac{\psi(\bar{x})^2}{2m}
1958: > \frac{\psi(\bar{x})^2}{2B\psi(\bar{x})} = \frac{\psi(\bar{x})}{2B} \geq
1959: \frac{\psi(\bar{x})}{B^2},
1960: \]
1961: where recall that $\Delta[i]$ is defined to be the reduction in $\tau_D$
1962: when the arc $a_i$ is applied to the intermediate profile $\bar{y}[i-1]$,
1963: created by the application of earlier arcs in sequence to $\bar{x}$.
1964: Suppose arc $a_i = (h,j)$.
1965: Now by Lemma \ref{tau0lemm}(i), the fact that $h$ is the source of arc
1966: $a_i$ means that it cannot have been a sink of a previous arc,
1967: so we must have $y[i-1]_h \leq x_h$.
1968: Similarly the fact that $j$ is the sink of arc $a_i$ means that it
1969: cannot be the source of any previous arc, so $y[i-1]_j \geq x_j$.
1970: But then the reduction in $\tau_D$ that would be obtained
1971: if $a_i$ were applied directly to $\bar{x}$, i.e., if an item
1972: of size $j-h$ is placed in a bin of level $h$, is by Lemma \ref{deltalemm}
1973:
1974: \[
1975: 2(x_h - x_j - 1) \geq 2(y[i-1]_h - y[i-1]_j -1) = \Delta[i]
1976: > \frac{\psi(\bar{x})}{B^2}.
1977: \]
1978:
1979: \noindent
1980: Thus, $SS$ will place an item of size $s=j-h$ in such a way as to
1981: reduce $ss(P)$ by at least this much. \proofmark
1982:
1983: The remainder of the proof that
1984: Expected Decrease Hypothesis
1985: is satisfied by $\psi(\bar{x})$ proceeds just as the
1986: proof for $\phi(\bar{x})$ did when there were no nontrivial
1987: dead-end levels.
1988: Thus Hajek's Lemma applies and the upper bound of Theorem
1989: \ref{lognupperbound} is proved. \proofmark
1990:
1991: \subsubsection{Proof of the $\Omega(\log n)$ Lower Bound.}
1992: We begin the proof with a sequence of lemmas.
1993:
1994: \begin{lemm} \label{maxup}
1995: Suppose $s$ is a divisor of the bin size $B$.
1996: Then if an item of size $s$ is placed into a packing $P$ using $SS$, the value
1997: of $ss(P)$ can increase by at most 1.
1998: \end{lemm}
1999:
2000: \noindent\textbf{Proof.}
2001: If there is a bin of level $B-s$, then placing an item of size $s$ into that
2002: bin would decrease $ss(P)$.
2003: If there is no bin of level $s$, then starting a new bin with an item
2004: of size $s$ will increase $ss(P)$ by 1.
2005: Otherwise, let $h_s = \max\{h: s|h \mathrm{\ and\ } N_P(h) > 0\}$,
2006: and note by assumption that $h \leq B-2s$.
2007: By Lemma \ref{deltalemm}, placing an item of size $s$ in one of the bins with
2008: level $h_s$ increases $ss(P)$
2009: by at most $2(N_P(h_s+s)-N_P(h_s))+2 \leq 0$.
2010: Thus in every case there is a way to increase $ss(P)$ by 1 or less, and so
2011: $SS$ must choose a move that increases $ss(P)$ by at most 1.
2012: \proofmark
2013:
2014: Let us say that a level $h$ is {\em divisible for $F$} if any set of
2015: items with sizes in $U_F$ that has total size $h$ can contain
2016: only items whose sizes are divisors of $B$.
2017:
2018: \begin{lemm} \label{divisorlemm}
2019: If $h$ is a nontrivial dead-end level for $F$ then $h$ is not divisible for $F$.
2020: \end{lemm}
2021:
2022: \noindent\textbf{Proof.}
2023: Let $\cal H$ be the set of all levels $i$, $1 \leq i \leq B-1$, that
2024: are divisible for $F$ and assume, for the sake of contradiction, that
2025: $h \in \cal H$.
2026: Since $h$ is a nontrivial dead-end level for $F$, there
2027: is some list $L$ that under
2028: $SS$ yields a packing containing at least two bins with level $h$.
2029: Consider the first time during the packing of $L$ that
2030: a level $i \in \cal H$ had its count $N_P(i)$ increase from 1 to 2,
2031: and let $s$ be the size of the item $x$ whose placement caused this to happen.
2032: By definition of {\em divisible level}, $s$ must be a divisor of $B$,
2033: and so by Lemma \ref{maxup}, the placement of
2034: $x$ can have increased $ss(P)$ by at most 1.
2035: But this is impossible: If $i = s$ then the insertion
2036: of $x$ would have increased $ss(P)$
2037: by $2^2-1^2=3$.
2038: On the other hand, suppose $i>s$.
2039: Since $i$ is a divisible level, so is $i-s$.
2040: Thus $N_P(i-s) = N_P(i) = 1$ just before $x$ was packed:
2041: Neither count can exceed 1 by our choice of $i$, the latter must be 1 if it is
2042: to increase to 2 after the placement of $x$, and the former must be 1 since
2043: $x$ can only create a bin with level $i$ if there is a bin of level
2044: $i-s$ into which it can be placed.
2045: However, this means that $ss(P)$ increases by 2, contradicting Lemma \ref{maxup}.
2046: So $h \notin \cal H$, as desired. \proofmark
2047:
2048: \begin{lemm}\label{stairlemm}
2049: Suppose $s$ is an item size that does not evenly divide the bin capacity
2050: $B$ and we are asked to pack an
2051: arbitrarily long sequence of items of size $s$ using $SS$.
2052: Let $d_i = is$, $0 \leq i \leq \lfloor B/s \rfloor$.
2053: For all $m>0$, the packing in existence just before the
2054: first time $N_P(d_1) > m$ must have
2055: $N_P(d_i) = mi$ for every $d_i$.
2056: \end{lemm}
2057:
2058: \noindent
2059: {\bf Proof.}
2060: Let us say that $mi$ is the {\em target} for level $d_i$.
2061: We first show that it must be the case that
2062: $N_P(d_i)$ is no more than its target, $1 < i \leq \lfloor B/s \rfloor$,
2063: so long as $N_P(d_1)$ has never yet exceeded its target.
2064: Suppose not, and consider the packing just before the first one of these counts,
2065: say $N_P(d_i)$, exceeded its target.
2066: In this packing we must have $N_P(d_i) = mi$.
2067: Let $\Delta_h = N_P(d_h) - N_P(d_{h-1})$,
2068: $1 \leq h \leq \lfloor B/s \rfloor$, where by convention $N_P(0) = 0$ and so
2069: $\Delta_1 = N_P(d_1)$.
2070: Since $\Delta_1$ by hypothesis is $m$ or less, Lemma \ref{deltalemm}
2071: implies that $\Delta_i < \Delta_1 \leq m$.
2072: But then we must have $N_P(d_{i-1}) \geq (i-1)m+1$,
2073: contradicting our assumption that level $d_i$ was the first to
2074: have its count exceed its target.
2075:
2076: For the lower bound, note that in the packing just before $N_P(d_1)$ first
2077: exceeds $m$, it must be the case that $\Delta_1 = N_P(d_1) = m$.
2078: Since this was the preferred move under $SS$, it must be the case
2079: by Lemma \ref{deltalemm} that
2080: $\Delta_i \geq m$, $2 \leq i \leq \lfloor B/s \rfloor$.
2081: The result follows. \proofmark
2082:
2083: \begin{lemm}\label{Hlemm}
2084: Suppose $F$ is a fixed discrete distribution with at least one
2085: nontrivial dead-end level $h$ and $H$ is a positive constant.
2086: Then there is a list $L_{H}$ of length $O(H)$ consisting solely of
2087: items with sizes in $U_F$, such that
2088: the packing resulting from using $SS$ to pack $L_{H}$
2089: contains at least $H$ bins with dead-end levels.
2090: \end{lemm}
2091:
2092: \noindent
2093: {\bf Proof.}
2094: By Lemma \ref{divisorlemm} there must be a set $S = \{x_0,x_1,\ldots,x_t\}$
2095: of items with sizes in
2096: $U_F$ whose total size is $h$, and for which $s(x_0)$ is not a divisor of $B$.
2097: Let us also assume that all items of any given size appear contiguously
2098: in the sequence $s(x_0),s(x_1),\ldots,s(x_t)$.
2099: Note that we may assume that $s(x_i) \geq 2$, $0 \leq i \leq t$, since if
2100: 1 were in $U_F$ there could be no dead-end levels.
2101: Let $h_i = \sum_{j=0}^i s(x_j)$, $0 \leq i \leq t$.
2102: Note that $h_t = h$.
2103: Further, let $k = \lfloor B/s(x_0) \rfloor$ and $d_i = i\cdot s(x_0)$,
2104: $0 \leq i \leq k$.
2105:
2106: Our list $L_H$ will consist of a sequence of $t+1$ (possibly empty)
2107: segments, the first of which (Segment 0)
2108: consists of $H3^t\sum_{i=1}^ki^2 = H3^tk(k+1)(2k+1)/6$ items of size $s(x_0)$.
2109: In the packing $P$ obtained by using $SS$ to pack these items, we
2110: will have by Lemma \ref{stairlemm} that level $i\cdot s_1$ will have count
2111: $iH3^t$, $1 \leq i \leq k$, and in particular level $h_0 = s(x_0)$ will
2112: have level $H3^t$.
2113: In what follows we use ``$P$'' generically to denote the current packing.
2114: Note that after Segment 0 has been packed, $P$ contains
2115: $H3^t\sum_{i=1}^ki = H3^tk(k+1)/2$ partially filled bins.
2116:
2117: Segment 1 consists of the shortest possible sequence
2118: of items of size $s(x_1)$ that, when added to $P$ using $SS$,
2119: will cause the count for level $h_1 = s(x_0)+s(x_1)$ to equal or exceed
2120: $H3^{t-1}$. A sequence of this sort must exist for the following reasons:
2121: If $N_P(h_1)$ is itself $H3^{t-1}$ or greater, as for instance it would be
2122: if $s(x_1)=s(x_0)$, then the empty segment will do.
2123: Otherwise, suppose $N_P(h_1) < H3^{t-1}$.
2124: So long as $N_P(h_0) \geq 2H3^{t-1}$ and $N_P(h_1) < H3^{t-1}$,
2125: placing an item of size $s(x_1)$ in a bin with level $h_0$
2126: would cause a greater reduction in $ss(P)$ than placing it in a
2127: bin of level $h_1$ could, and so would be the preferred move.
2128: Since we can place $H3^{t-1}$ items in bins of level $h_0$
2129: before $N_P(h_0) \leq 2H3^{t-1}$, and
2130: each such placement would increase $N_P(h_1)$ by 1,
2131: this means we will eventually
2132: have placed enough to increase $N_P(h_1)$ to the desired target.
2133: Note that we will eventually be forced to place items in bins of level
2134: $h_0$ rather than some level other than $h_0$ or $h_1$, since
2135: the existence of moves that decrease $ss(P)$ means that
2136: no new bins are being created.
2137:
2138: We complete our argument by induction.
2139: In general, we start Segment $j$, $2 \leq j \leq t$ with a packing
2140: in which $N_P(h_{j-1}) \geq H3^{t-j+1}$ and no new bins have been
2141: created since Segment 0.
2142: The segment then consists of the shortest possible sequence of
2143: items of size $s(x_{j})$ that will cause the count for level
2144: $h_j = h_{j-1}+s(x_{j})$ to equal or exceed $H3^{t-j}$.
2145: An argument analogous to that for Segment 1 says that this must
2146: eventually occur without any additional bins being started.
2147: Thus at the end of Phase $t$ we have $H$ bins with level $h_t = h$.
2148: Given that all the $s(x_j)$ are 2 or greater,
2149: the total number of items included in Segments 1 through $t$, none
2150: of which started a new bin, is no more than $BH3^tk(k+1)/4$
2151: and so the total number of items in our overall list $L_H$
2152: is at most
2153: $$\frac{H3^tk(k+1)(2k+1)}{6} + \frac{BH3^tk(k+1)}{4} < B^33^BH = O(H)$$
2154: for fixed $F$, as required.
2155: \proofmark
2156:
2157: For future reference, note that since 1 cannot be in $U_F$ if $F$
2158: has dead-end levels, the number of segments in $L_H$ is less than $B/2$.
2159:
2160: \begin{lemm} \label{profilelemm}
2161: Suppose $P$ and $Q$ are two packings for which
2162: $$|P-Q| \equiv \sum_{h=1}^{B-1} |N_P(h)-N_Q(h)| = M$$
2163: and $L$ is a list consisting
2164: entirely of items of the same size $s \geq 2$. Then the packings $P'$ and $Q'$
2165: resulting from using $SS$ to pack $L$ into $P$ and $Q$
2166: satisfy $|P' - Q'| \leq BM.$
2167: \end{lemm}
2168:
2169: \noindent\textbf{Proof.}
2170: We prove the lemma for the special case of $M=1$.
2171: The general result then follows by repeated applications of
2172: this $M=1$ case. So assume $|P-Q| = 1$.
2173:
2174: Let $g$ denote the level that has different counts under $P$ and $Q$
2175: and suppose without loss of generality that $N_P(g) = N_Q(g)+1$.
2176: Let $P_i$ and $Q_i$ denote the packings that result after the first $i$
2177: items of $L$ have been packed into $P$ and $Q$ respectively.
2178: We will say that a triple $(i,j,\ell)$, $0 \leq i,j \leq |L|$ and
2179: $0 \leq \ell \leq B$, is a {\em compatible} triple if either
2180: \begin{enumerate}
2181: \item $P_i=Q_j$ and $\ell \in \{0,B\}$, or
2182: \item $|P_i-Q_j| = 1$, and $\ell$ is the unique bin level such that
2183: $1 \leq \ell \leq B-1$, $N_{P_j}(\ell) = N_{Q_i}(\ell)+1$.
2184: \end{enumerate}
2185: Note that by this definition $(0,0,g)$ is a compatible triple.
2186:
2187: \begin{claim}
2188: If $(i,j,\ell)$ is a compatible triple with $i,j <|L|$ then
2189: one of the following three triples must also be compatible:
2190: $$(i+1,j+1,\ell),~~(i+1,j,\ell+s),~~(i,j+1,\ell-s).$$
2191: \end{claim}
2192:
2193: \noindent\textbf{Proof of Claim.}
2194: Consider the packings $P_i$ and $Q_j$.
2195: Suppose $SS$ would place an item of size $s$ in bins with
2196: the same level in both $P_i$ and $Q_j$, as for instance it
2197: must if $\ell \in \{0,B\}$ and hence the two packings have
2198: identical level counts.
2199: Then the same bins counts would be changed in the same
2200: way for $P_i$ and $Q_j$ and so $(i+1,j+1,\ell)$ is a compatible triple.
2201:
2202: Otherwise suppose $SS$ would place an item of
2203: size $s$ in bin $h_P$ for $P_i$ and in $h_Q$ for $Q_j$, with
2204: $h_P\neq h_Q$.
2205: In this case $P_i$ and $Q_j$ must be different, and we are in case 2
2206: of compatibility.
2207: Let $\Delta_Q(h)$ (resp. $\Delta_P(h)$) denote the net reduction in the
2208: sum of squares if an item of size $s$ is placed in a bin of level $h$ in
2209: $Q_j$ (resp. $P_i$), assuming such a placement is legal.
2210: Since the
2211: bin counts $N_{P_i}(h)$ and $N_{Q_j}(h)$ are equal for every $h$ other than
2212: $\ell$, it follows that $\Delta_P(h)=\Delta_Q(h)$ for all $h$'s other than
2213: $\ell$ and $\ell-s$. Since $SS$ makes different choices for $P_i$ and
2214: for $Q_j$, it must be that at
2215: least one of $h_Q, h_P$ is either $\ell$ or $\ell-s$.
2216: By hypothesis we have $N_{P_i}(\ell) = N_{Q_j}(\ell)+1$ and all other counts
2217: are equal, so $\Delta_{P}(\ell-s) < \Delta_{Q}(\ell-s)$
2218: (if $\ell-s\geq 0$), $\Delta_{P}(\ell) > \Delta_{Q}(\ell)$
2219: (if $\ell+s \leq B$), and for all other values of $h$,
2220: $\Delta_{P}(h) = \Delta_{Q}(h)$.
2221:
2222: Thus if $h_P = \ell-s$ we must have $h_Q = \ell-s=h_P$, given
2223: that it is even more valuable to place an item of size $s$ into a bin of
2224: level $\ell-s$ in $Q_j$ than in $P_i$.
2225: Similarly, if $h_Q = \ell$ then we must have $h_P = \ell$.
2226: Since by assumption $h_P \neq h_Q$, this means that either
2227: $h_P = \ell$ or $h_Q = \ell-s$.
2228:
2229: In the first case, $h_P=\ell$, we must have $\ell+s \leq B$.
2230: Packing an item of size $s$ into a bin with level $\ell$ in $P_i$
2231: reduces $N_{P_i}(\ell)$ by 1, so that $N_{P_{i+1}}(\ell)=N_{Q_j}(\ell)$.
2232: If $\ell+s = B$, i.e. we fill up a bin, then $|P_{i+1}-Q_j|=0$,
2233: and so $(i+1,j,\ell+s=B)$ is a compatible triple.
2234: If $\ell+s < B$ then $N_{P_i}(\ell+s)$ will increase by 1 and we will
2235: have $N_{P_{i+1}}(\ell+s)=N_{P_i}(\ell)+1=N_{Q_{j}}(\ell+s)+1$, while
2236: all other levels now have the same counts.
2237: Thus $(i+1,j,\ell+s)$ is again a compatible triple.
2238:
2239: In the second case, $h_Q = \ell-s$, we must have $\ell -s\geq 0$.
2240: Packing an item of size $s$ into a bin with level $\ell -s$ in
2241: $Q_j$ increases $N_{Q_j}(\ell)$ by 1, so that
2242: $N_{P_{i}}(\ell)=N_{Q_{j+1}}(\ell)$.
2243: If $\ell-s = 0$, i.e. we pack $s$ into a new bin, then
2244: $|P_i-Q_{j+1}|=0$, and so $(i,j+1,\ell-s=0)$ is a compatible triple.
2245: If $\ell-s >0$ then $N_{Q_j}(\ell-s)$ will decrease by 1 and we will have
2246: $N_{Q_{j+1}}(\ell-s)=N_{Q_{j}}(\ell-s)-1=N_{P_i}(\ell-s)-1$, while
2247: all other levels now have the same counts.
2248: Thus $(i,j+1,\ell-s)$ is again a compatible triple.
2249:
2250: This completes the proof of the Claim. \proofmark
2251:
2252: \smallskip
2253: Given the Claim and the fact that $(0,0,g)$ is a compatible triple,
2254: we have by induction that at least one of the three following scenarios
2255: must hold:
2256: \begin{enumerate}
2257: \item $(|L|,|L|,g)$ is a compatible triple, or
2258: \item There is an integer $a$, $1 \leq a \leq (B-g)/s$ such that
2259: $(|L|,|L|-a,g+as)$ is a compatible triple, or
2260: \item There is an integer $b$, $1 \leq b \leq g/s$ such that
2261: $(|L|-b,|L|,g-bs)$ is a compatible triple.
2262: \end{enumerate}
2263:
2264: In the first case we have $|P'-Q'| = 1$, which clearly satisfies the
2265: Lemma's conclusion. In the second we have $|P' - Q_{|L|-a}| = 1$,
2266: but to get $Q'$ from $Q_{|L|-a}$ we will need to add $a$ additional
2267: items of size $s$, and each addition will change one or two level
2268: counts by 1.
2269: Since $s \geq 2$ and $g \geq 1$, we must have $a \leq (B-g)/s \leq (B-1)/2.$
2270: Thus we can conclude that $|P'-Q'| \leq 1 + B-1 = B$ as desired.
2271: The third case follows analogously and the Lemma is proved. \proofmark
2272:
2273: \begin{lemm}\label{XDlemm}
2274: Suppose $F$ is a fixed discrete distribution with at least one
2275: nontrivial dead-end level and $X$ is a positive constant.
2276: Then for any $D > X$ there is a list $L_{X,D}$ of length $O(D)$
2277: consisting solely of items with sizes in $U_F$, such that for any
2278: packing $P$ with no live-level count exceeding $X$,
2279: the packing $Q$ resulting from using $SS$ to add $L_{X,D}$ into $P$
2280: contains at least $D$ bins with dead-end levels.
2281: \end{lemm}
2282:
2283: \noindent\textbf{Proof.}
2284: We may assume that $P$ contains fewer than $D$ bins with dead-end
2285: levels, because the number of bins with dead-end levels can never
2286: decrease and if we already had $D$ such bins any list will do for
2287: $L_{X,D}$.
2288: Let $h$ be a nontrivial dead-end level for $F$.
2289: For our list we simply let $L_{X,D}$ be the list $L_H$ derived
2290: for $h$ using Lemma \ref{Hlemm},
2291: with $H = (XB+D)B^{B/2} + D = O(D)$ for fixed $F$.
2292: By Lemma \ref{Hlemm} the length of $L_H$ will by $O(H) = O(D)$.
2293:
2294: If $P_0$ denotes the empty packing, we know by Lemma \ref{Hlemm}
2295: that if $SS$ is used to pack $L_H$ into $P_0$
2296: it will create a packing $P_0'$ with at least $H$ bins having
2297: the dead-end level $h$.
2298: Let $P'$ denote the packing that would result if we used $SS$ to add
2299: $L_H$ to $P$.
2300: Note that $|P-P_0| = \sum_{i=1}^{B-1}N_P(i) \leq X(B-1)+D-1$.
2301: Thus by applying Lemma \ref{profilelemm} once for each segment of
2302: $L_H$ and using the fact that $L_H$ contains less than $B/2$
2303: segments, we have that $|P'-P_0'| < B^{B/2}(XB+D)$.
2304: But this means that for dead-end level $h$ we must have
2305: $N_{P'}(h) > H - B^{B/2}(XB+D) = D$ and so $P'$ contains at least the
2306: desired number of bins with dead-end levels. \proofmark
2307:
2308: \begin{lemm} \label{Xlemm}
2309: Let $P_N$ be the packing after $N$ items generated according to $F$
2310: have been packed by $SS$.
2311: There is a constant $X$, depending only on $F$, such that for
2312: any $N>0$
2313: \begin{equation}
2314: p[N_{P_N}(i) \leq X \mbox{ for all live levels } i] \geq \frac{1}{2}
2315: \end{equation}
2316: \end{lemm}
2317:
2318: \noindent\textbf{Proof.}
2319: Recall from the inequality (\ref{Tbound}) of the proof of the $O(\log n)$
2320: upper bound on the expected waste of $SS$ that for any $N > 0$,
2321: if $X_N$ is the profile after packing $N$ items, then there are a
2322: constants $c$ and $T$, depending only on $F$, such that
2323: $$
2324: E \left[ c^{\psi(X_N)}\right] \leq T
2325: $$
2326: This meant that
2327: $$
2328: p \left[ c^{\psi(X_N)} > 2T \right] \leq \frac{1}{2}
2329: $$
2330: and hence that
2331: $$
2332: p\left[ \psi(X_N) > \log_c(2T) \right] \leq \frac{1}{2}
2333: $$
2334: Since as we have repeatedly observed
2335: $\psi(\bar x) \geq x_h$ for every live level $h$,
2336: this in turn means that the probability is at least $1/2$ that no
2337: live level count exceeds $\log_c(2T)$.
2338: Thus the Lemma holds with $X = \log_c(2T)$. \proofmark
2339:
2340: \medskip
2341: We are now in a position to prove our $\Omega(\log n)$ lower bound on
2342: $EW_n^{SS}(F)$ when $F$ has nontrivial dead-end levels.
2343: We may assume without loss of generality that all the sizes $s_1,\ldots,s_J$
2344: specified by $F$ are in $U_F$, i.e., that $p_j > 0$, $1 \leq j \leq J$.
2345: Consider the lists $L_{X,D}$ specified by Lemma \ref{XDlemm} for the
2346: value of $X$ given by Lemma \ref{Xlemm}, and let $\ell_D$ denote
2347: the length of $L_{X,D}$. Since the value of $X$ depends
2348: only on $F$, Lemma \ref{XDlemm} implies that there is a constant $c$,
2349: depending only on $F$,
2350: such that for all $D>X$, $\ell_D < cD$.
2351:
2352: Now suppose we have a random list $L$ of length $cD$ of items generated
2353: according to $F$.
2354: The probability that $L_{X,D}$ is a prefix of $L$ is at least
2355: $\epsilon^{\ell_D}$, where $\epsilon = \min\{p_j:~1\leq j \leq J\}$.
2356: Let $a = \log_2(1/\epsilon)$.
2357: Then the probability that $L_{X,D}$ is {\em not} a prefix of $L$
2358: is at most $(1 - (1/2)^{acD})$.
2359:
2360: Now consider a random list $L^*$ of length $cD2^{acD}$, viewed as a sequence
2361: of $2^{acD}$ random segments of length $cD$. The probability that none
2362: of these segments has $L_{X,D}$ as a prefix is
2363: $$\left( 1 - \frac{1}{2^{acD}} \right)^{2^{acD}}
2364: < ~~\frac{1}{e} ~~<~~ \frac{1}{2}.$$
2365:
2366: In other words, the probability that at least one of these segments has
2367: $L_{X,D}$ as a prefix exceeds $1/2$.
2368: Consider the {\em last} segment that has $L_{X,D}$ as a prefix (should
2369: any such segments exist),
2370: and the packing $P$ that exists just before this copy of $L_{X,D}$ is packed.
2371: Note that by choosing the last such segment, we do not condition in any way
2372: the list that precedes this copy or the packing $P$.
2373: Hence by Lemma \ref{Xlemm}, with probability at least $1/2$ the packing
2374: $P$ has no live level count exceeding $X$, and
2375: by Lemma \ref{XDlemm}, after the segment is added to the packing,
2376: the new packing (and all subsequent ones) will contain at least $D$ bins
2377: with dead-end levels.
2378: Thus the expected number of bins with dead-end levels after all of
2379: $L^*$ is packed is at least $(1/2)(1/2)D = D/4 = \Omega(\log |L^*|)$.
2380: The lower bound follows. \proofmark
2381:
2382: \section{SS and Linear Waste Distributions} \label{worstsect}
2383:
2384: The implication of Theorem \ref{orlintheo} that $ER_\infty^{SS} (F) =
2385: 1$ for all perfectly packable distributions $F$
2386: unfortunately does not carry over to the case where $EW_n^{OPT} =
2387: \Theta(n)$.
2388:
2389: \begin{theo}\label{1.5theo}
2390: There exist distributions $F_k$, $1 \leq k \leq \infty$,
2391: such that
2392: $$\limsup_{k\rightarrow\infty}ER_\infty^{SS}(F_k) = 1.5~.$$
2393: \end{theo}
2394:
2395:
2396: \noindent\textbf{Proof.}
2397: Let $F_k$ be the distribution in which
2398: the bin size is $B = 2k+1$ and the single item size 2 occurs with
2399: probability 1.
2400: Consider an $n$-item list $L_n$ generated according to $F_k$ where
2401: $n$ is divisible both by $k$ and by $\sum_{i=1}^k i^2 = k(k+1)(2k+1)/6$.
2402: Then $OPT(L_n) = n/k$ and
2403: by Lemma \ref{stairlemm}, we have
2404: $$SS(L_n) = \left(\frac{n}
2405: {\sum_{i=1}^k i^2}\right) \left( \sum_{i=1}^k i\right) = n \cdot
2406: \frac{\left(\frac{k(k+1)}{2}\right)}{\left(\frac{k(k+1)(2k+1)}{6}\right)} =
2407: \frac{3n}{2k+1}.$$
2408: Thus $ER_\infty^{SS}(F_k)$, which is defined as a $\limsup$, equals
2409: $3k/(2k+1)$ and the Theorem follows. \proofmark
2410:
2411: We conjecture that $3/2$ is the worst possible value for $ER_\infty^{SS}(F)$
2412: over all discrete distributions $F$,
2413: although at present the best upper bound we can prove is 3, which
2414: is implied by the following worst-case result.
2415:
2416: \begin{theo}\label{worstcaseUB}
2417: For all lists $L$, $SS(L) \leq 3\lceil s(L)/B\rceil \leq 3OPT(L).$
2418: \end{theo}
2419:
2420: \noindent\textbf{Proof.}
2421: Let $x$ be the last item of size less than $B/3$ that starts a new bin
2422: and let $s$ be the size of $x$.
2423: (If no such $x$ exists, then all bins are at least $B/3$ full in the
2424: final packing and we are done.)
2425: Let $P$ be the packing just before $x$ was packed.
2426: It is sufficient to show that the average bin content in the bins of $P$
2427: is at least $B/3$.
2428: If that is so, then the packing of subsequent items
2429: cannot reduce the average bin content in the bins not containing
2430: $x$ to less than $B/3$.
2431: Consequently if $m$ is the final number of bins in the packing,
2432: we must have $s(L)/B > (m-1)/3$ and hence
2433: $OPT(L) \geq \lceil s(L)/B \rceil \geq m/3$ and the theorem follows.
2434:
2435: So let us show that that the average bin content in the bins of $P$
2436: is at least $B/3$.
2437: For $1 \leq j\leq s$, let $\ell_j$ as the greatest integer such that
2438: $j+\ell_j s<B$ and let $\Omega_j$ denote the set of bins with contents
2439: $j,j+s,\ldots,j+\ell_j s$.
2440: Note that $\Omega_1,\ldots,\Omega_{s}$ is a
2441: partition of the bins of $P$ into $s$ sets, and if we can show that the average
2442: contents of the bins in each nonempty $\Omega_j$ is at least $B/3$,
2443: we will be done.
2444: Fix $j$ and suppose $k$ is the least integer such that either
2445: $N_P(j+ks)>0$ or $j+ks\geq B/3$.
2446: If $j+ks\geq B/3$ then {\em every} bin in $\Omega_j$ has contents at least $B/3$
2447: and so $\Omega_j$ behaves as desired.
2448: So suppose $j+ks<B/3$, in which case we must have $k< \ell_j$.
2449: Since $SS$ places $x$ in a new bin, we must by Lemma \ref{deltalemm} have
2450: \[
2451: 0 \leq N_P(s) \leq N_P(j+hs+s)-N_P(j+hs),\quad h=k,\ldots,\ell_j-1
2452: \]
2453: and hence $N_P(j+\ell_j s)\geq \cdots \geq N_P(j+ks)$.
2454: This means that if we let $t = j+ks$ the
2455: average contents of the bins in $\Omega_j$ is at least
2456: \[
2457: \frac{t + (t+s) + \cdots + (t+(\ell_j -k) s)}{\ell_j -k+1}
2458: = \frac{2t+(\ell_j -k)s}{2}
2459: > \frac{j+\ell_j s}{2} \geq \frac{B-s}{2} > \frac{B}{3}\,.~~\proofmark
2460: \]
2461:
2462: \section{Identifying Perfectly Packable Distributions} \label{lpsect}
2463: \setcounter{equation}{0}
2464:
2465: Given the observations of the previous section,
2466: it would be valuable to be able to identify those distributions
2467: $F$ that satisfy the hypotheses of Theorem \ref{orlintheo}, i.e., those
2468: for which $EW_n^{OPT}(F) = O(\sqrt{n})$ and hence $ER_\infty^{SS}(F) = 1$
2469: is guaranteed.
2470: This task is unfortunately NP-complete, as it would require us to solve
2471: the PARTITION problem \cite{GJ79}.
2472: Fortunately, however, the problem is not NP-complete in the strong sense, and
2473: as we shall now see, can be solved in time pseudo-polynomial in $B$ via
2474: linear programming, as was claimed but not proved in \cite{CJK99}.
2475:
2476: Suppose our discrete distribution is as described above,
2477: with a bin capacity $B$, integer item sizes $s_1,s_2,\ldots,s_J$, and
2478: rational probabilities $p_1,p_2,\ldots,p_J$.
2479: We may assume without loss of generality that all these probabilities
2480: are positive.
2481: Our linear program, which for future reference we shall call the
2482: ``Waste LP for $F$,'' will have $JB$ variables $v(j,h)$, $1 \leq j \leq J$
2483: and $0 \leq h \leq B-1$, where $v(j,h)$ represents the rate at which
2484: items of size $s_j$ go into bins whose current level is $h$.
2485: The constraints are:
2486:
2487: \vspace{.1in}
2488: \begin{eqnarray}
2489: v(j,h) \geq 0, && 1 \leq j \leq J, ~~0 \leq h \leq B-1 \label{lp1}\\
2490: v(j,h) = 0, && 1 \leq j \leq J, ~~s_j > B-h \label{lp1'}\\
2491: \sum_{h=0}^{B-1} v(j,h) = p_j, && 1 \leq j \leq J \label{lp2}\\
2492: \sum_{j=1}^J v(j,h) \leq
2493: \sum_{j=1}^J v(j,h-s_j), && 1 \leq h \leq B-1 \label{lp3}
2494: \end{eqnarray}
2495:
2496: \noindent
2497: where by definition the value of $v(j,h-s_j)$ when $h-s_j < 0$ is taken to be 0
2498: for all $j$.
2499: Constraints (\ref{lp1'}) say that no item can go into a bin that is
2500: too full to have room for it.
2501: Constraints (\ref{lp2}) say that all items must be packed.
2502: Constraints (\ref{lp3}) say that bins with a given level are created at least as fast
2503: as they disappear.
2504: The goal is to minimize
2505: \begin{equation}
2506: c(F) \equiv \sum_{h=1}^{B-1} \left ( (B-h) \cdot \left ( \sum_{j=1}^J v(j,h-s_j) -
2507: \sum_{j=1}^J v(j,h) \right ) \right ) \label{lp4}
2508: \end{equation}
2509: Note for future reference that by definition we must have $c(F) < B-1$.
2510:
2511: \medskip
2512: In what follows, $c(F)$ will always denote the optimal solution value for
2513: the Waste LP for $F$, and $ES(F)$ will denote the expected item size under
2514: $F$, i.e., $\sum_{i=1}^Jp_js_j$.
2515:
2516: \begin{lemm} \label{lplemm}
2517: Suppose $F$ is a discrete distribution and let $L_n(F)$ be a random
2518: $n$-item list generated according to $F$.
2519: \begin{enumerate}
2520: \item For all $n>0$, $\displaystyle{
2521: \left| EW_n^{OPT}(F) - \frac{nc(F)}{B} \right| \leq O(\sqrt{n}).}$
2522: \item There exist constants $b$ and $N^*$ such that for all $n \geq N^*$
2523: $$P \left[ \; \left| OPT(L_n(F)) - \frac{n}{B}\Bigl(ES(F)+c(F)\Bigr) \right|
2524: > bn^{2/3} \right]\leq \frac{1}{n^{1/6}}~.$$
2525: \end{enumerate}
2526: \end{lemm}
2527:
2528: This lemma, which we shall prove shortly, implies the following three results.
2529:
2530: \begin{theo} \label{limsuptheo}
2531: Suppose $F$ is a discrete distribution.
2532: Then
2533: $$\limsup_{n\rightarrow\infty}\left(\frac{EW_n^{OPT}(F)}{n}\right) = \frac{c(F)}{B}~.$$
2534: \end{theo}
2535:
2536: \begin{theo} \label{EWtheo}
2537: Suppose $F$ is a discrete distribution.
2538: Then $EW_n^{OPT}(F) = O(\sqrt{n})$ if and only if $c(F) = 0$.
2539: \end{theo}
2540:
2541: \begin{lemm} \label{ERlemm}
2542: Suppose $F$ is a discrete distribution and
2543: $A$ is a (possibly randomized) bin packing algorithm for which
2544: $E[A(L)]/OPT(L) \leq b$ for some fixed constant $b$ and all lists $L$. Then
2545: $$ER_\infty^A(F) =
2546: \frac{ES(F) + B\cdot\limsup_{n\rightarrow\infty}EW_n^A(F)/n}{ES(F)+c(F)}~.$$
2547: \end{lemm}
2548:
2549: Theorems \ref{EWtheo} and \ref{limsuptheo} are immediate consequences
2550: of claim (1) of Lemma \ref{lplemm}.
2551: Lemma \ref{ERlemm} follows from claim (2).
2552: Basically, it says that $ER_\infty^A(F)$, which is defined in terms
2553: of expected ratios, can actually be computed in terms of ratios
2554: of expectations. It follows because (2) implies that we can divide
2555: the set of lists $L$ of length $n$ generable according to $F$ into
2556: two sets. For the first set, which has cumulative probability $1-1/n^{1/6}$,
2557: we have
2558: \begin{equation}\label{EWcoro1}
2559: E\left[ \frac{A(L)}{OPT(L))} \right] =
2560: \left(\frac{nES(F)+B\cdot EW_n^A(F)}{nES(F)+nc(F)}\right)
2561: \left(1 + O\left(\frac{1}{n^{1/3}}\right)\right)
2562: \end{equation}
2563: For the second set, which has cumulative probability $1/n^{1/6}$,
2564: $E[A(L)/OPT(L)] \leq b$.
2565: Thus this set contributes at most $b/n^{1/6}$ to the overall expected
2566: ratio for $L_n(F)$, meaning that (\ref{EWcoro1}) holds with
2567: $L$ replaced by $L_n(F)$ and $1/n^{1/3}$ replaced by $1/n^{1/6}$.
2568: Lemma \ref{ERlemm} follows.
2569: We now turn to the proof of Lemma \ref{lplemm}.
2570:
2571: \medskip
2572: \noindent
2573: {\bf Proof.}
2574: Consider the values $v(j,h)$ of the variables in
2575: an optimal basic solution to the LP.
2576: Since all the coefficients and right-hand sides of the LP are rational,
2577: all these variable values must be rational as well, and there exists
2578: a positive integer $N$ such that $Nv(j,h)$ is an integer,
2579: $1 \leq j \leq J$ and $0 \leq h \leq B$.
2580: For each positive integer $k$, let $L_k$ be a list consisting of
2581: $k\sum_{h=0}^{B-1}Nv(j,h)$ items of
2582: size $s_j$, $1 \leq j \leq J$.
2583: By (\ref{lp2}) $L_k$ will contain $kNp_j$ items of size $s_j$ for
2584: each $j$, for a total of $kN$ items.
2585: We will thus have $s(L_k) = kN \cdot ES(F)$.
2586:
2587: Note that we can construct a packing of $L_k$ simply by following
2588: the instructions provided by the variable values in the solution to the LP.
2589: That is, for each $j$, start $Nv(j,0)$ bins by placing an item of size
2590: $s_j$ into an empty bin. By (\ref{lp3}), the number of bins of level 1
2591: will now be at least $\sum_{j=1}^JNv(j,1)$.
2592: Thus we can take a set consisting
2593: of $Nv(j,1)$ items of size $s_j$, $1 \leq j \leq J$, and place each of
2594: these items in a distinct bin with level 1.
2595: We can now proceed to pack bins of level 2, and so on.
2596: Let $P_k$ denote the resulting packing.
2597:
2598: How many bins does this packing contain?
2599: A bin in $P_k$ that has level $h$ contains items of total
2600: size $h$ by definition, and in addition has a gap of size $B-h$.
2601: Thus the total number of bins is simply the $1/B$ times the
2602: sum of the item sizes and the sum of the gap sizes, that is
2603:
2604: $$
2605: \frac{1}{B} \left (kN \cdot ES(F) + kN\sum_{h=1}^{B-1} \left ( (B-h) \cdot \left ( \sum_{j=1}^J v(j,h-s_j) -
2606: \sum_{j=1}^J v(j,h) \right ) \right ) \right )
2607: $$
2608:
2609: \noindent
2610: and hence
2611:
2612: \begin{equation} \label{lptheo3a}
2613: \left | P_k \right | ~~=~~ \left(\frac{kN}{B}\right)\Bigl(ES(F) + c(F)\Bigr).
2614: \end{equation}
2615:
2616: Now, since $L_k$ is in essence the ``expected value'' of
2617: the random list $L_{kN}(F)$, we can
2618: use the packings $P_k$ as models for packing the
2619: random lists $L_n(F)$, $n > 0$.
2620: We proceed as follows: Given $n$, find that $k \geq 0$ such that
2621: $kN \leq n < (k+1)N$.
2622: Now note that the packing $P_k$ has $kNp_j$ ``slots'' for items of
2623: size $s_j$, $1 \leq j \leq J$, and $L_n(F)$ is expected to have
2624: between $kNp_j$ and $(k+1)Np_j$ such items.
2625: Place as many items of $L_n$ into the appropriate slots as possible,
2626: and then place the leftover items in additional bins, one per bin.
2627: The total number of bins used will then be $|P_k|$ plus the number
2628: $X_n$ of leftover items, which implies that
2629:
2630: \begin{equation} \label{lptheo3b}
2631: OPT(L_n(F)) ~~\leq~~ \left(\frac{n}{B}\right)\Bigl(ES(F) + c(F)\Bigr) + X_n.
2632: \end{equation}
2633:
2634: Let $n_j$ denote the number of items of size $s_j$ among the first
2635: $kN$ items of $L_n(F)$ and define
2636: \begin{eqnarray*}
2637: \Delta_j^+ = \max\{0,n_j - kNp_j\}, & 1 \leq j \leq J\\
2638: \Delta_j^- = \max\{0,kNp_j - n_j\}, & 1 \leq j \leq J
2639: \end{eqnarray*}
2640: Thus $\Delta_j^+$ is the {\em oversupply} of items of size $s_j$
2641: among the first $kN$ items and $\Delta_j^-$ is the {\em shortfall}.
2642: The number of leftover items among the first $kN$
2643: items of $L_n$ is hence $\sum_{j=1}^J \Delta_j^+ = \sum_{j=1}^J \Delta_j^-$,
2644: and so $X_n < N + \sum_{j=1}^J \Delta_j^+$.
2645: Since each $n_j$ is a sum of independent Bernoulli variables
2646: when considered by itself,
2647: we have $E[\Delta_j] \leq \sqrt{kNp_j(1-p_j)} < \sqrt{kNp_j}$.
2648: Given that $\sum_{j=1}^J \sqrt{kNp_j}$
2649: is maximized when all the probabilities are equal, we have that
2650: $E[\sum_{j=1}^J \Delta_j] \leq J \sqrt{kN/J} \leq \sqrt{nJ}$ and so
2651: $E[X_n] \leq N+\sqrt{nJ} = O(\sqrt{n})$ since $N$ and $J$ are constants.
2652:
2653: Since $X_n$ is a nonnegative random variable, we thus can conclude
2654: from (\ref{lptheo3b}) that Claim (2) of the lemma holds when the
2655: quantity inside the absolute value signs is positive.
2656: Since $E[s(L_n(F))] = nES(F)$ we can also conclude that
2657:
2658: \begin{equation} \label{lptheo3d}
2659: EW_n^{OPT}(F) = E \left[ \; OPT(L_n(F)) - \frac{s(L_n(F))}{B} \; \right]
2660: \leq \frac{nc(F)}{B} + O(\sqrt{n})
2661: \end{equation}
2662:
2663: \noindent
2664: and so (1) also holds when the quantity
2665: inside the absolute value signs is positive.
2666:
2667: To prove that (1) and (2) hold when the quantities inside the
2668: absolute value signs are negative, first observe that the
2669: packing $P_k$ defined above for $L_k$ must be an optimal packing
2670: for $L_k$. If not, i.e., if $OPT(L_k) \leq (kN/B)(ES(F)+c(F))$,
2671: then we could use an optimal packing for $L_k$ to define a better
2672: solution to our LP, contradicting
2673: our assumption that $c(F)$ was the optimal solution value for the LP.
2674:
2675: Next observe that if we are given a packing $P$ for $L_n(F)$,
2676: we can construct a closely related one for $L_k$
2677: (as defined above, with $k = \lfloor n/N \rfloor$), by a process
2678: of addition.
2679: For each of the at most $\sum_{j=1}^J \Delta_j^- = \sum_{j=1}^J \Delta_j^+$
2680: items in $L_k$ that do not have counterparts of the same size in $L_n$,
2681: we add a new bin to $P$ containing just that item.
2682: This new packing contains at least as many items of each size
2683: as does $L_k$ and so must contain at least $OPT(L_k)$ bins.
2684: Thus by (\ref{lptheo3a}) we must have
2685:
2686: \begin{equation} \label{lptheo3e}
2687: OPT(L_n(F)) + \sum_{j=1}^J\Delta_j^+ \geq OPT(L_k) =
2688: \left(\frac{kN}{B}\right)\Bigl(ES(F) + c(F)\Bigr)
2689: \end{equation}
2690:
2691: Claims (1) and (2) then follow by the same analysis
2692: of $E[\sum_{j=1}^J\Delta_j]$
2693: as was used when the quantity inside the absolute value signs
2694: was positive. \proofmark
2695:
2696: Thus one can determine whether $EW_n^{OPT}(F)$ is sublinear and,
2697: if it is not,
2698: compute the constant of proportionality on the expected linear waste,
2699: all in the time it takes to construct and solve the Waste LP for $F$.
2700: The worst-case time for this process obeys the following time bound.
2701:
2702: \begin{theo}\label{lptimetheo}
2703: Given a description of a discrete distribution $F$ in which all
2704: probabilities are presented as rational numbers with a common
2705: denominator $D \geq B$, the Waste LP for $F$
2706: can be constructed and solved in time
2707: $$O\left( (JB)^{4.5}\log^2D\right) = O\left(B^9\log^2D\right).$$
2708: \end{theo}
2709:
2710: \noindent\textbf{Proof.}
2711: Given its straightforward description, the LP can clearly be constructed in
2712: time proportional to its size, so construction time will be dominated by
2713: the time to solve the LP.
2714: For that, the best algorithm currently available is that of Vaidya \cite{V89},
2715: which runs in time $O((M+N)^{1.5}NL^2)$, where $M$ is the larger of the number
2716: of variables and the number of constraints (the latter including the
2717: ``$\geq 0$'' constraints), and $N$ is the smaller, and $L$ is a measure of
2718: the number of bits needed in the computation if all operations are to be
2719: performed in exact arithmetic.
2720:
2721: Our LP has $JB$ variables and the number of constraints is $\Theta(JB)$.
2722: Thus for our LP the running time is $O((JB)^{2.5}L^2) = O(B^5L^2)$.
2723: To obtain a bound on $L$, note that all coefficients in the constraints
2724: of the LP are $1$, $0$, or $-1$ and the coefficients in the objective function
2725: are all $O(B)$.
2726: The leaves the probabilities $p_j$ to worry about.
2727: Note that we can determine $c(F)$ by solving the LP with each $p_j$
2728: replaced by its numerator (the integer $Dp_j$), and then dividing the
2729: answer by $D$.
2730: If we proceed in this way, then all the ``probabilities'' are integers
2731: bounded by $D$.
2732: Following the precise definition of $L$ given in \cite{V89} we can then
2733: conclude that $L = O(JB \log D)$, giving us the overall running time bound
2734: claimed. \proofmark
2735:
2736: Although this running time bound is pseudopolynomial in $B$, it will
2737: be polynomial if $B$ is polynomially bounded in terms of $J$, which
2738: is true for many of the distributions of interest in practice.
2739: Moreover, much better running times are obtainable in practice by
2740: using commercial primal simplex codes rather than interior point
2741: techniques to solve the LP's.
2742: See \cite{ABDJS02} which details simplex-based methods that can be used to
2743: compute $c(F)$ in reasonable
2744: time for discrete distributions with $J$ and $B$ as large
2745: as 1,000 and 10,000, respectively.
2746:
2747: \vspace{.5\baselineskip}
2748: In the remainder of this section, we will show how
2749: we can further distinguish between the cases in which
2750: $EW_n^{OPT}(F) = \Theta(\sqrt{n})$ and those in which $EW_n^{OPT}(F) = O(1)$.
2751: Our goal is to distinguish cases (a) and (b) in the Courcoubetis-Weber theorem,
2752: as described in Section 2.
2753: Thus we need to determine, given that $\bar{p}_F$ is in $\Lambda_F$,
2754: whether it is also in the interior of $\Lambda_F$.
2755: Our approach is based on solving $J$ additional, related LP's.
2756: The total running time will simply be $J+1$ times that for solving
2757: the original LP, and so we will be able to determine whether
2758: $EW_n^{OPT}(F) = O(\sqrt{n})$ and if so, which of the two cases hold,
2759: in total time $O(J^{5.5}B^{4.5}\log^2 D) = O(B^{10}\log^2D)$.
2760:
2761: For each $i$, $1 \leq i \leq J$, let $x_i \geq 0$ be a new variable
2762: and let ${\rm LP}_i$ denote the linear
2763: program obtained from the Waste LP for $F$ by (1) changing the
2764: inequalities in (\ref{lp3}) to equalities, (2) replacing (\ref{lp2}) by
2765:
2766: \begin{eqnarray}
2767: \sum_{h=0}^{B-1} v(i,h) & = & p_i + x_i \nonumber\\
2768: \sum_{h=0}^{B-1} v(j,h) & = & p_j,~~~1 \leq j \neq i \leq J, \label{lp2'}
2769: \end{eqnarray}
2770:
2771: \noindent
2772: and (3) changing the optimization criterion to ``maximize $x_i$.''
2773: Let $c_i(F)$ denote the optimal objective function value for ${\rm LP}_i$.
2774: Note that ${\rm LP}_i$ is feasible for $x_i = 0$ whenever $c(F) = 0$,
2775: so that $c_i(F)$ is always well-defined and non-negative in this case.
2776:
2777: \begin{theo} \label{lptheo2}
2778: If $F$ is a discrete distribution, then $EW_n^{OPT}(F) = O(1)$ if and only
2779: if $c(F) = 0$ and $c_i(F) > 0$, $1 \leq i \leq J$.
2780: \end{theo}
2781:
2782: \noindent
2783: {\bf Proof.}
2784: Combining the Courcoubetis-Weber Theorem with Theorem \ref{EWtheo} we know that
2785: for all discrete distributions $F$,
2786:
2787: \begin{equation}\label{cf-lambda}
2788: \bar{p}_F \in \Lambda_F \mbox{ if and only if } c(F) = 0.
2789: \end{equation}
2790:
2791: Let $\bar{q}(i,\beta)$ denote the vector obtained from
2792: $\bar{p}_F$ by setting $q_i = p_i + \beta$ and
2793: $q_j = p_j, 1 \leq j \neq i \leq J$.
2794: By (\ref{cf-lambda}) and the construction of
2795: the linear programs ${\rm LP}_i$, it is easy to see that
2796: $\bar{q}(i,\beta)$ is in $\Lambda_F$ if and only if ${\rm LP}_i$ is
2797: feasible when $x_i = \beta$.
2798: Thus by convexity, $\bar{q}(i,\beta)$ is in $\Lambda_F$ if and only
2799: if $0 \leq \beta \leq c_i(F)$.
2800:
2801: Let us first suppose that the stated properties of $c(F)$ and the $c_i(F)$'s
2802: do not hold.
2803: If $c(F) \neq 0$, then $\bar{p}_F$ is not even in $\Lambda_f$, much less
2804: in its interior.
2805: So suppose $c(F) = 0$ but $c_i(F) = 0$ for some $i$, $1 \leq i \leq J$.
2806: Then for any $\epsilon > 0$ there is a vector $\bar{q}$ with
2807: $|q - \bar{p}_F| \leq \epsilon$ that is not in $\Lambda_F$, namely
2808: $\bar{q}(i,\epsilon)$. Thus by definition $\bar{p}_F$ is not in the
2809: interior of $\Lambda_F$.
2810:
2811: On the other hand, suppose $c(F) = 0$ and $c_i(F) > 0$, $1 \leq i \leq J$.
2812: To show that $\bar{p}_F$ is in the interior of $\Lambda_F$, we
2813: make use of two elementary properties of such cones:
2814:
2815: \begin{enumerate}
2816: \item[C1.] \label{cone1} If the vector
2817: $\bar{a} = \langle a_1,\ldots,a_d \rangle$ is in
2818: a cone $\Lambda$, then so is the vector
2819: $r\bar{a} = \langle ra_1,\ldots,ra_d \rangle$ for any $r > 0$.
2820: \item[C2.] \label{cone2} If vectors $\bar{a} = \langle a_1,\ldots,a_d \rangle$ and
2821: $\bar{b} = \langle b_1,\ldots,b_d \rangle$ are in $\Lambda$, then so is
2822: the vector sum $\bar{a} + \bar{b} = \langle a_1+b_1,\ldots,a_d+b_d \rangle$.
2823: \end{enumerate}
2824:
2825: In other words, any positive linear combination of elements of the cone
2826: is itself in the cone. Our proof works by showing that there is an
2827: $\epsilon$ such that any $\bar{q}$ with $|\bar{p}_F - \bar{q}| \leq \epsilon$
2828: can be constructed out of a positive linear combination of vectors
2829: $\bar{q}(i,\beta_i)$ with $0 \leq \beta_i \leq c_i(F)$, $1 \leq i \leq J$.
2830: We begin by defining a set of key quantities.
2831:
2832: \begin{eqnarray*}
2833: c_{min} & = & \min \{c_i(F): 1 \leq i \leq J\}\\
2834: p_{max} & = & \max \{p_i: 1 \leq i \leq J\}\\
2835: p_{min} & = & \min \{p_i > 0: 1 \leq i \leq J\}\\
2836: \delta & = & \min \left \{ \frac{1}{2},\frac{c_{min}}{4Jp_{max}} \right \}\\
2837: \epsilon & = & \min \left \{ \frac{p_{min}}{4} , \left ( \frac{c_{min}}{8J} \right )
2838: \left ( \frac{p_{min}}{p_{max}} \right ) \right \}
2839: \end{eqnarray*}
2840:
2841: Note that by hypothesis $c_{min} > 0$ and since $F$ is a probability distribution
2842: there must be some positive $p_i$'s and so $p_{min} > 0$.
2843: Hence $\delta$ and $\epsilon$ are also positive.
2844: Suppose $\bar{q} = \langle q_1,\ldots,q_J \rangle$ is any vector with
2845: $|\bar{p}_F - \bar{q}| \leq \epsilon$.
2846: We will show that $\bar{q}$ can be constructed out of a positive
2847: linear combination of vectors
2848: $\bar{q}(i,\beta_i)$ as specified above.
2849:
2850: Let $\epsilon_i = q_i - (1-\delta)p_i$, $1 \leq i \leq J$.
2851: We first observe that all the $\epsilon_i$ are positive.
2852: This is clearly true for all $i$ such that $q_i \geq p_i$.
2853: Suppose $q_i < p_i$. In that case $p_i$ cannot be 0, so we must
2854: have $p_i \geq p_{min}$.
2855: If $\delta = 1/2$ we have
2856:
2857: \begin{equation} \label{ep1}
2858: \epsilon_i = q_i - p_i + \delta p_i \geq \delta p_i - \epsilon \geq
2859: \frac{p_{min}}{2} - \frac{p_{min}}{4} = \frac{p_{min}}{4}> 0.
2860: \end{equation}
2861:
2862: \noindent
2863: If on the other hand $\delta = c_{min}/(4Jp_{max})$, then
2864:
2865: \begin{equation} \label{ep2}
2866: \epsilon_i \geq \delta p_i - \epsilon \geq
2867: \left ( \frac{c_{min}}{4Jp_{max}} \right ) p_{min} - \left ( \frac{c_{min}}{8J} \right )
2868: \left ( \frac{p_{min}}{p_{max}} \right ) = \left ( \frac{c_{min}}{8J} \right )
2869: \left ( \frac{p_{min}}{p_{max}} \right ) > 0.
2870: \end{equation}
2871:
2872: \noindent
2873: We next observe that for each $i$, $1 \leq i \leq J$,
2874:
2875: \begin{equation} \label{ep3}
2876: \epsilon_i \leq \epsilon + \delta p_i \leq \frac{c_{min}}{8J}
2877: + \frac{c_{min}}{4Jp_{max}}p_{max} < \frac{c_{min}}{2J}.
2878: \end{equation}
2879:
2880: Now consider the vectors $\bar{q}(i,\beta_i)$, where
2881: $\beta_i = J\epsilon_i/(1-\delta)$, $1 \leq i \leq J$.
2882: By (\ref{ep1}) through (\ref{ep3}) and the definition of $\delta$, we have
2883:
2884: $$
2885: 0 < \beta_i = \frac{J\epsilon_i}{1-\delta} \leq 2J \left ( \frac{c_{min}}{2J} \right ) = c_{min},
2886: $$
2887:
2888: \noindent
2889: and so all these vectors are in $\Lambda_F$. Now consider the vector
2890:
2891: $$
2892: \bar{r} = \langle r_1,\ldots,r_J \rangle = \frac{1-\delta}{J}\sum_{i=1}^J \bar{q}(i,\beta_i).
2893: $$
2894:
2895: Since $\bar{r}$ is a positive linear combination of vectors in $\Lambda_F$,
2896: it is itself in $\Lambda_F$ by (C1) and (C2).
2897: But now note that for $1 \leq i \leq J$, we have
2898:
2899: $$
2900: r_i = \left (\frac{1-\delta}{J} \right ) (Jp_i) + \left ( \frac{1-\delta}{J}
2901: \right ) \left ( \frac{J\epsilon_i}{1-\delta} \right )
2902: = (1-\delta)p_i + \epsilon_i = q_i.
2903: $$
2904:
2905: Thus $\bar{q} = \bar{r}$ and the latter is in $\Lambda_F$, as claimed.
2906: This implies that $\bar{p}_F$ is in the interior of $\Lambda$ and the
2907: theorem is proved. \proofmark
2908:
2909: \section{Handling Non-Perfectly Packable Distributions} \label{tuned}
2910: \setcounter{equation}{0}
2911:
2912: In this section we consider the case when $EW_n^{OPT}(F) = \Theta(n)$.
2913: As we saw in Section 4, we can have $ER_\infty^{SS}(F) > 1$ for such $F$.
2914: Fortunately, for each such $F$ one can design a distribution-specific
2915: variant on $SS$ that performs much better.
2916: For notational simplicity in what follows, we shall assume
2917: without loss of generality that the
2918: size vector $\bar{s}$ for $F$ has $s_1=1$.
2919: (If $1 \notin U_F$ then we simply set $p_1=0$.)
2920: Note also that we must have $B > 1$.
2921:
2922: \begin{theo} \label{tunedtheo1}
2923: For any discrete distribution $F$ with $EW_n^{OPT}(F) = \Theta(n)$,
2924: there exists a randomized
2925: variant $SS_F$ of $SS$ such that
2926: $EW_n^{SS_F}(F) = EW_n^{OPT}(F) + O(\sqrt{n})$
2927: and hence $ER_\infty^{SS_F}(F) = 1$ by Lemmas \ref{lplemm} and \ref{ERlemm}.
2928: This algorithm has expected running time $O(nB)$
2929: and can itself be constructed in time polynomial in $B$ and the size
2930: of the description of $F$.
2931: \end{theo}
2932:
2933: \noindent
2934: {\bf Proof.} Algorithm $SS_F$ is based on the solution
2935: to the Waste LP for $F$,
2936: and in particular on the optimal solution value $c(F)$, which
2937: by Theorem \ref{lptimetheo} can be computed in
2938: time polynomial in $B$ and the size of the description of $F$.
2939: The algorithm works by performing a series of steps,
2940: with new steps being taken
2941: so long as an item in $L$ remains to be packed.
2942: At each step we flip a biased coin and according to the outcome proceed
2943: as follows.
2944: \begin{enumerate}
2945: \item With probability $1/(1+c(F))$ we take the next item from
2946: $L$ and pack it according to $SS$.
2947: \item With probability $c(F)/(1+c(F))$ we generate a new ``imaginary''
2948: item of size 1 and pack it according to $SS$.
2949: \end{enumerate}
2950:
2951: Let $G_n$ denote the total size of the gaps in the packing of
2952: $L_n(F)$ by this algorithm, and let $I_n$ denote the total size
2953: of the imaginary items in the packing. Then
2954: \begin{equation}\label{wasteform}
2955: EW_n^{SS_F}(F) = \frac{E[I_n]+E[G_n]}{B}
2956: \end{equation}
2957:
2958: It is straightforward to determine $E[I_n]$. Divide the
2959: packing process into $n$ phases, each phase ending on a step in which
2960: a real rather than imaginary item is packed.
2961: The expected number of imaginary items packed in each phase is
2962: $$\sum_{i=1}^\infty\left(\frac{c(F)}{1+c(F)}\right)^i = c(F).$$
2963: We thus can conclude the expected
2964: total number of imaginary items is $nc(F)$, and since each is
2965: of size 1 we have $E[I_n] = nc(F)$.
2966:
2967: Let us now turn to $E[G_n]$.
2968: Note that if we consider both real and imaginary items, we are essentially
2969: packing a list generated by the distribution $F^+$ that has
2970: $p_1^+ = (p_1+c(F))/(1+c(F))$ and $p_i^+ = p_i/(1+c(F))$ for all $i > 1$.
2971:
2972: \begin{claim}\label{onesclaim}
2973: $EW_n^{OPT}(F^+) = O(\sqrt{n})$.
2974: \end{claim}
2975:
2976: \noindent
2977: {\bf Proof of Claim.}
2978: By Theorem \ref{EWtheo} all we need show is that the solution to
2979: the Waste LP for $F^+$ has $c(F^+) = 0$.
2980: Denote this LP by $LP_{F^+}$ and denote the Waste LP for $F$
2981: by $LP_F$.
2982: Let $v_0(j,h)$ be the variable values in an optimal solution for $LP_F$,
2983: and for $1 \leq h \leq B-1$ define
2984: $$\Delta_h=\sum_j v_0(j,h-s_j)-\sum_jv_0(j,h).$$
2985: Define a new assignment $v$ by
2986: \begin{eqnarray*}
2987: v(j,h) & = & \frac{v_0(j,h)}{1+c(F)},~~ j \neq 1\\
2988: v(1,h) & = & \frac{v_0(1,h)+\sum_{h'=1}^h\Delta_{h'}}{1+c(F)}
2989: \end{eqnarray*}
2990: for $0 \leq h \leq B-1$.
2991:
2992: We claim that $v$ satisfies the constraints of $LP_{F^+}$ and achieves
2993: 0 for the objective function, this implying that $c(F^+)=0$.
2994: It is easy to see that $v$ satisfies constraints
2995: (5.1), (5.2), and (5.3) for $j\neq 1$.
2996: For $j=1$, we have
2997: \begin{eqnarray*}
2998: \sum_{h=0}^{B-1}v(1,h)&=&\frac{1}{1+c(F)}\left(p_1+\sum_{h=1}^{B-1}\sum_{h'=1}^h\Delta_{h'}\right)\\[.2in]
2999: &=&\frac{1}{1+c(F)}\left(p_1+\sum_{h'=1}^{B-1}(B-h')\Delta_{h'}\right)\\[.2in]
3000: &=& \frac{1}{1+c(F)}\Bigl(p_1+c(F)\Bigr),
3001: \end{eqnarray*}
3002: as required. As for the constraints (5.4), we have for each $h$,
3003: $1 \leq h \leq B-1$, that
3004: $$
3005: \sum_j v(j,h-s_j)-\sum_jv(j,h) = \frac{1}{1+c(F)}
3006: \left(\Delta_h+\sum_{h'=1}^{h-1}\Delta_{h'}-\sum_{h'=1}^h\Delta_{h'}\right)~=~0.
3007: $$
3008: Thus $v$ is a feasible solution for $LP_{F^+}$.
3009: Finally, the value of the objective function is
3010: $$
3011: \sum_{h=1}^{B-1}\Bigl(B-h\Bigr)
3012: \left(\sum_j v(j,h-s_j)-\sum_jv(j,h)\right)~=~0.
3013: \mbox{ \proofmark}
3014: $$
3015:
3016: Thus $F^+$ is a perfectly packable distribution and by Lemma \ref{orlinlemm}
3017: the expected increase in $ss(P)$ during each step of algorithm
3018: $SS_F$ is less than 2, no matter what the current packing looks like.
3019: For all $i>0$
3020: the expected increase during step $i$ is thus less than 2 times the probability
3021: $SS_F$ takes $i$ or more steps.
3022: Since the expected number of steps by the above argument about $E[I_n]$
3023: is $n(1+c(F))$,
3024: the expected value of $ss(P)$ when the algorithm terminates is thus no more
3025: than $2n(1+c(F))$.
3026: By Lemma \ref{cauchylemm} this implies that $E[G_n] \leq B\sqrt{(B-1)n(1+c(F)})
3027: = O(B^2\sqrt{n})$ since $c(F) \leq B-1$ by definition.
3028: Thus by (\ref{wasteform}) we have
3029: $$EW_n^{SS_F}(F) = \frac{nc(F) + O(B^2\sqrt{n})}{B}$$
3030: which by Lemma \ref{lplemm} is $EW_n^{OPT}(F) + O(\sqrt{n})$, as desired.
3031:
3032: All that remains is to show that algorithm $SS_F$ can be implemented
3033: to run in time $O(nB)$. This is not immediate, since there are
3034: distributions $F$ for which $c(F)$ is as large as $\lceil B/2 \rceil -1$.
3035: Thus the total number of items packed (including imaginary ones)
3036: can be $\Theta(nB)$, and the standard implementation of $SS$ will take
3037: $\Theta(nB^2)$. We avoid this problem by using a more sophisticated
3038: implementation, that adds an additional data structure to aid with the
3039: packing of the imaginary items.
3040:
3041: This data structure is a doubly-linked list of doubly-linked lists $D_d$.
3042: If $P$ is the current packing, define $\delta_h = N_p(h+1)-N_P(h)$,
3043: $0 \leq h \leq B-1$, with $N_P(0)$ and $N_P(B)$ taken by convention to
3044: be $1/2$ and $-1/2$ respectively. Then we know by Lemma \ref{deltalemm}
3045: and the discussion that follows it that placing an item of size 1 into a bin
3046: of level $h$ will yield a smaller increase (or bigger decrease) in $ss(P)$
3047: than placing it in a bin of level $h'$ if and only if $\delta_h < \delta_{h'}$.
3048: At any given time in the packing process, there is a sublist $D_d$
3049: for each value $d$ taken on by some $\delta_h$, with that sublist containing
3050: representatives for all those $h$ such that $\delta_h = d$ and
3051: annotated by the value of $d$.
3052: The sublists are ordered in the main list by increasing value of $d$.
3053: For each value of $h$, $0 \leq h \leq B-1$, there is a pointer to the
3054: list for $\delta_h$ and to the representative for $h$ in that list.
3055:
3056: Given this data structure, we can pack an item of size 1 in constant time:
3057: find the first $h$ in the first list $D_d$ and place the item into a bin
3058: of level $h$.
3059: Note that this choice of $h$ may violate the official tie-breaking
3060: rule for $SS$ which requires that in case of ties, we should choose
3061: the {\em largest} $h$ with $\delta_h = d_1$.
3062: However, as observed when we originally specified the official tie-breaking
3063: rules, none of the performance bounds proved in this paper depend on
3064: the precise tie-breaking rule used. Thus, we will still have
3065: $ER_\infty^{SS_F}(F) = 1$ if $SS_F$ is implemented this way.
3066:
3067: To complete the proof that this implementation takes $O(nB)$ time overall,
3068: we must show how to keep the data structure current with a constant amount
3069: of effort per item packed.
3070: Here we exploit the fact that in packing a single item, only two counts
3071: get changed, and no count changes by more than 1.
3072: Thus at most four $\delta_h$'s will change, and no $\delta_h$ can change
3073: by more than 2.
3074: Thus all we need show is that if $\delta_h$ changes by 2 or less, only
3075: a constant amount of work is required to update the data structure.
3076: But this follows from the fact if $h$ is in $D_d$, then its new sublist
3077: can be at most two sublists away in the overall doubly-linked list,
3078: either in an already-existing sublist to which $h$
3079: can be prepended, or in a new sublist containing only $h$ that can be
3080: created in constant time. \proofmark
3081:
3082: \medskip
3083: An obvious drawback of the algorithms $SS_F$ is that we must know the
3084: distribution $F$ in advance.
3085: Fortunately, we can adapt the approach taken in these algorithms to
3086: obtain a distribution-independent algorithm,
3087: simply by learning the distribution as we go along.
3088: If we engineer this properly, we can get a randomized algorithm that
3089: matches the best expected behavior we have seen in all situations:
3090:
3091: \begin{theo}\label{learningtheo}
3092: There is a randomized online algorithm $SS^*$ that for any discrete
3093: distribution $F$ with bin capacity $B$ has the following properties:
3094: \begin{enumerate}
3095: \renewcommand{\theenumi}{\alph{enumi}} % For references (\ref)
3096: \renewcommand{\labelenumi}{\rm (\alph{enumi})} % For the listing itself
3097: \item $SS^*$ runs in time $O(nB)$.
3098: \item $EW_n^{SS^*}(F) = EW_n^{OPT}(F) + O(\sqrt{n})$
3099: \item $ER_\infty^{SS^*}(F) = 1$.
3100: \item If $EW_n^{OPT}(F) = \Theta(\sqrt{n})$, then $EW_n^{SS^*}(F) = \Theta(\sqrt{n})$.
3101: \item If $EW_n^{OPT}(F) = O(1)$, then $EW_n^{SS^*}(F) = O(1)$.
3102: \end{enumerate}
3103: \end{theo}
3104:
3105: \noindent\textbf{Proof.}
3106: Note that (d) will follow immediately from (b) and that
3107: (c) will follow from (b) via Lemmas \ref{lplemm} and \ref{ERlemm}.
3108: Thus we only need prove (a), (b), and (e), which we will do in that order.
3109:
3110: As the basic building blocks of $SS^*$, we will use a class of algorithms
3111: $SS_D^r$, $0 \leq r < 1$ and $D \subset \{1,2,\ldots,B-1\}$,
3112: that capture the essence of the algorithms $SS_F$ of
3113: Theorem \ref{tunedtheo1}, modified slightly so that we can
3114: guarantee (e) above.
3115: Recall from Section \ref{boundedSS'} the algorithm $SS'$ that
3116: guaranteed $EW_n^{SS'}(F) = O(1)$ for all bounded waste distributions.
3117: This algorithm made use of a parameterized packing rule $SS_D$,
3118: which packed so as to minimize $ss(P)$ subject to the constraint that
3119: no bin with a level in $D$ should be created unless this is unavoidable,
3120: in which case we start a new bin.
3121: Algorithm $SS'$ maintained a set $U$ of all the item sizes seen so far,
3122: and used $SS_{D(U)}$ to pack items, where $D(U)$ is the set of dead-end
3123: levels for $U$, and $SS^*$ will do likewise.
3124:
3125: Algorithm $SS_D^r$ works in
3126: steps, where in each step we flip a biased coin and proceed as follows:
3127: \begin{enumerate}
3128: \item With probability $1-r$ we take the next item from
3129: $L$ and pack it according to packing rule $SS_D$.
3130: \item With probability $r$ we generate a new ``imaginary''
3131: item of size 1 and pack it according to $SS_D$.
3132: \end{enumerate}
3133: Note that if $r = c(F)/(1+c(F))$, this is the same as $SS_F$ except for
3134: the modified packing rule.
3135:
3136: \medskip
3137: In algorithm $SS^*$ we maintain an auxiliary data structure of counts $X_i$,
3138: $1 \leq i \leq B-1$, where $X_i$ is the number of items of size $i$ so
3139: far encountered in the list.
3140: From this we can derive the set $U$ of
3141: the item sizes actually seen so far, as well as the
3142: current {\em empirical distribution} $F'$, whose probability vector $\bar{p}$
3143: is $\langle X_1/N,X_2/N,\ldots,X_{B-1}/N\rangle$, where $N$ is the number of items
3144: seen so far.
3145: The packing process consists of a sequence of {\em phases},
3146: during each of which we apply the packing rule $SS_{D(U)}^r$,
3147: where $U$ is the set of item sizes seen up to and including the
3148: first item to be packed in the phase and
3149: $r = c(F')/(1+c(F'))$ for the empirical distribution $F'$ at the
3150: beginning of the phase.
3151:
3152: We start with a 0-phase.
3153: An $i$-phase terminates when either (a) we
3154: see a new item size and have to update $U$ and recompute $D(U)$
3155: or (b) we have packed a prespecified number of real items during the phase,
3156: where the number is $10B$ for a 0-phase and $30B4^{i-1}$ for an $i$-phase,
3157: $i > 0$.
3158: If an $i$-phase is terminated by the arrival of an item with a previously
3159: unseen size, the next phase is once again a 0-phase.
3160: Otherwise, it is an $(i+1)$-phase.
3161: If the new phase has a different value for $U$ or $r$, we
3162: begin it by closing all open bins.
3163: (A partially filled bin is considered {\em open} until it is closed.
3164: A closed bin can receive no further items and does not contribute to the
3165: count for its level.)
3166: We shall refer to phases that occur before all item sizes have been
3167: seen as {\em false} phases, and ones that occur after as {\em true}
3168: phases. Note that once the true phases begin, each phase (except possibly
3169: the last) packs 3 times as many items as the total number of items
3170: packed in all previous true phases.
3171:
3172: Note that this algorithm will have the claimed running time.
3173: The list-of-lists data structure developed to enable the algorithms $SS_F$
3174: to run in time $O(nB)$ can be adapted to handle the $SS_D^r$ packing rules,
3175: so the cumulative time spent
3176: running $SS_D^r$ for the various values of $D$ and $r$ is $O(nB)$.
3177: In $SS^*$ we have the added cost of re-initializing this data structure
3178: from time to time when we close all open bins, which can take $\Theta(B)$
3179: time, but this can happen no more than $J\log_4(n/10B)$ times.
3180: Thus the overall time for reinitialization is $O(B^2\log B\log n) = o(nB)$
3181: for fixed $B$.
3182: The only other computation time we need to worry about is that
3183: needed to solve the LP's used to compute the values of $c(F')$.
3184: By Theorem \ref{lptimetheo},
3185: the time for the LP computed at the beginning of an $i$-phase
3186: is $O(B^9\log^2D)$ where $D \leq n$.
3187: Since there are no more than $J\log_4(n/10B)$ phases, the
3188: total time spent in solving the LP's is thus $O(B^{10}\log^3 n)$ and
3189: for fixed $B$ is again asymptotically dominated by the time to pack the items.
3190:
3191: The proof that $SS^*$ satisfies (b) will proceed via a series of lemmas.
3192: In what follows,
3193: if $\bar{p}$ and $\bar{p}'$ are two length-$J$ vectors,
3194: we will use $||\bar{p} - \bar{p}'||$ to denote the $L^1$ distance between
3195: them, that is,
3196: $$\|\bar{p} - \bar{p}'\| \equiv \sum_{i=1}^j |p_i - p_i'|.$$
3197:
3198: \begin{lemm}\label{errormag}
3199: Suppose $F$ and $F'$ are two distributions over the same set
3200: $\{s_1,\ldots,s_J\}$ of item sizes with probability vectors
3201: $\bar{p}$ and $\bar{p}'$. Then
3202: \begin{equation}
3203: \left |c(F) - c(F') \right | \leq B\|\bar{p} - \bar{p}'\|. \label{ccdiff}
3204: \end{equation}
3205: \end{lemm}
3206:
3207: \noindent\textbf{Proof.}
3208: We show how to convert an optimal solution
3209: to the LP for $F$ to
3210: a solution to the LP for $F'$ for which
3211: the objective function $c$ satisfies
3212: \begin{equation}
3213: c \leq c(F) + B\|\bar{p} - \bar{p}'\|. \label{cc2diff}
3214: \end{equation}
3215: A symmetric argument holds for the situation where the roles of
3216: $F$ and $F'$ are interchanged, and so (\ref{ccdiff}) will follow.
3217:
3218: For the purposes of this proof, where $\{s_1,\ldots, s_J\}$
3219: and $B$ are fixed, we can view our LP's as determined simply by the
3220: probability vectors for the distributions, $\bar{p}$
3221: and $\bar{p}'$, and write $c(\bar{p})$ and $c(\bar{p}')$
3222: for $c(F)$ and $c(F')$ respectively.
3223: We will convert an optimal solution to the LP for $\bar{p}$ to a feasible
3224: one for $\bar{p}'$ via a series of steps.
3225:
3226: For $0 \leq j \leq J$, let $\bar{p}^j=(p_1^j,\ldots ,p_J^j)$ be the vector
3227: with $p_i^j = p'_i$, $1 \leq i \leq j$ and $p_i^j = p_i$, $j+1 \leq i \leq J$.
3228: Note that $\bar{p}^0 = \bar{p}$ and $\bar{p}^J = \bar{p}'$.
3229: Let ${\rm LP}_j$ denote the LP for $\bar{p}^j$.
3230: Note that these are legitimate LP's even though the intermediate
3231: vectors $\bar{p}^j$, $0 < j < J$, may not have $\sum_{i=1}^Jp_i^j = 1$
3232: and hence need not correspond to probability distributions.
3233: We will show how to convert an optimal solution to ${\rm LP}_{j-1}$
3234: to a feasible one for ${\rm LP}_{j}$, $1\leq j \leq J$, for which
3235: the objective function $c$ satisfies
3236: \begin{equation}
3237: c \leq c(\bar{p}^{j-1}) + B|p_j - p_j'|. \label{c1diff}
3238: \end{equation}
3239: Inequality (\ref{cc2diff}) will then follow by induction.
3240:
3241: So consider a feasible solution to ${\rm LP}_{j-1}$.
3242: Note that the only constraint of ${\rm LP}_j$ that is violated is
3243: the constraint of type (\ref{lp2}) for $j$, i.e., the constraint that
3244: says that $\sum_{h=0}^{B-1}v(j,h) = p_j'$.
3245: If $p_j' \geq p_j$, our task is simple.
3246: We simply add $p'_j - p_j$ to $v(j,0)$ and leave all other variables
3247: unchanged.
3248: This will now satisfy the above constraint for $j$ while not causing any of the
3249: others to be violated.
3250: The increase in the objective function will be
3251: $(B-s_j)|p_j' -p_j| \leq B|p_j' -p_j|$, so (\ref{c1diff}) holds, as desired.
3252:
3253: For the remaining case, suppose $p_j' < p_j$ and consider an optimal solution to
3254: ${\rm LP}_{j-1}$ that maximizes the potential function
3255: $\sum_{h=0}^{B-1}h\cdot v(j,h)$.
3256: We claim that this solution must be such that
3257: \begin{equation}\label{potineq}
3258: \mbox{for all levels $h$,
3259: if $v(j,h) > 0$, then $v(i,h+s_j) = 0$ for all $i \neq j$}
3260: \end{equation}
3261: Suppose not, and hence there is a level $h$ and an integer $i \neq j$
3262: such that $v(j,h) > 0$ and $v(i,h+s_j) > 0$.
3263: This means that a positive amount of size $s_j$ was
3264: placed in bins with level $h$ and then a positive amount of size $s_i$
3265: was placed in bins with the resulting level $h+s_j$.
3266: Let $\Delta = \min\{v(j,h),v(i,h+s_j)\}$, and modify the solution so
3267: that instead of first placing an amount $\Delta$ of $s_j$ in bins of
3268: level $h$ and then adding $\Delta$ of size $s_i$, we do these in
3269: reverse order.
3270: To be specific,
3271: revise $v(j,h)$ to $v(j,h)-\Delta$, $v(i,h)$ to $v(i,h)+\Delta$,
3272: $v(i,h+s_j)$ to $v(i,h+s_j)-\Delta$ and $v(j,h+s_i)$ to
3273: $v(j,h+s_i)+\Delta$.
3274: It is not difficult to see that this will not affect the objective
3275: function or any of the constraints, and so the new set of variable values will
3276: continue to represent an optimal solution to ${\rm LP}_{j-1}$.
3277: Moreover, the potential function will have increased
3278: by $s_i\Delta$, a contradiction.
3279:
3280: To convert the above optimal solution to one that is feasible for
3281: ${\rm LP}_j$, we proceed as follows.
3282: Let $H^* = \min\{H \leq B: \sum_{h=H}^{B-1}v(j,h) \leq p_j - p_j'$.
3283: Set $v(j,h) = 0$, $H^* \leq h \leq B-1$, and reduce
3284: $v(j,H^*-1)$ by $p_j - p_j' - \sum_{h=H^*}^{B-1}v(j,h)$.
3285: The resulting solution will now satisfy the constraint of
3286: type (\ref{lp2}) for $j$ in ${\rm LP}_j$.
3287: It will continue to satisfy the constraints of type (\ref{lp3})
3288: because of (\ref{potineq}).
3289: Finally, the increase in the objective function will be at most
3290: $s_j| p_j - p_j'| \leq B| p_j - p_j'|$ and so (\ref{c1diff}) again holds,
3291: as desired.
3292: \proofmark
3293:
3294: \begin{defi}
3295: If $\bar{p}$ is a probability vector and $r \geq 0$, then
3296: $aug(\bar{p},r)$ is the probability vector $\bar{q}$ with
3297: $$
3298: q_j = \left\{ \begin{array}{ll}
3299: \displaystyle{\frac{p_1+r}{1+r}} & \mbox{if $j=1$}\\
3300: &\\
3301: \displaystyle{\frac{p_j}{1+r}} & \mbox{otherwise}
3302: \end{array}
3303: \right.
3304: $$
3305: \end{defi}
3306:
3307: \begin{lemm} \label{qdiff}
3308: Suppose $F$ is a discrete distribution with probability vector $\bar{p}$.
3309: Let $r,r'\geq 0$ and define $\bar{q}=aug(\bar{p},r)$ and
3310: $\bar{q}'= aug(\bar{p},r')$.
3311: Then $$||\bar{q}-\bar{q}'||\leq 2|r-r'|.$$
3312: \end{lemm}
3313:
3314: \noindent\textbf{Proof.}
3315: By Definition,
3316: \begin{eqnarray*} \label{Fdiff1}
3317: \|q-q'\| &=& \sum_{j=2}^J \left | \frac{p_j}{1+r} - \frac{p_j}{1+r'} \right |
3318: ~+~ \left | \frac{p_1+r}{1+r} - \frac{p_1+r'}{1+r'} \right |\\ [.1in]
3319: &\leq& \left | \frac{1}{1+r} - \frac{1}{1+r'} \right |
3320: ~+~ \left | \frac{r}{1+r} - \frac{r'}{1+r'} \right |\\ [.2in]
3321: &=& \left | \frac{(1+r')-(1+r)}{(1+r')(1+r)} \right | +
3322: \left | \frac{r(1+r') - r'(1+r)}{(1+r')(1+r)} \right |
3323: \leq 2 \left |r-r' \right | \proofmark.
3324: \end{eqnarray*}
3325:
3326:
3327: \begin{lemm} \label{pdiff}
3328: Suppose $F$ is a discrete distribution with
3329: $\bar{s} = (s_1,\ldots,s_J)$, and $F'$ is the
3330: empirical distribution measured after sampling $n$ items with sizes chosen
3331: according to $F$ for some $n>0$.
3332: Let $\bar{q} = aug(\bar{p},c(F))$ and $\bar{q}' = aug(\bar{p},c(F'))$.
3333: Then for all $\beta > 0$,
3334: \begin{quote}
3335: \begin{enumerate}
3336: \renewcommand{\theenumi}{\alph{enumi}} % For references (\ref)
3337: \renewcommand{\labelenumi}{\rm (\alph{enumi})} % For the listing itself
3338: \item $~~\displaystyle{P \left ( \left\| \bar{p} - \bar{p}' \right\|
3339: \geq \frac{J\beta}{\sqrt{2n}} \right ) \leq 2Je^{-\beta^2}}$
3340: \item $~~\displaystyle{P \left ( \left| c(F) - c(F') \right|
3341: \geq \frac{JB\beta}{\sqrt{2n}} \right ) \leq 2Je^{-\beta^2}}$
3342: \item $~~\displaystyle{P \left ( \| \bar{q} - \bar{q}' \|
3343: \geq \frac{\sqrt{2}JB\beta }{\sqrt{n}} \right ) \leq 2Je^{-\beta^2}}$
3344: \end{enumerate}
3345: \end{quote}
3346: \end{lemm}
3347:
3348: \noindent\textbf{Proof.}
3349: By a straightforward application of the Chernoff bound, as described
3350: for example in \cite[pp.\ 234--236]{AS92}, we have that
3351: for all $j$, $1 \leq j \leq J$, and $\beta > 0$,
3352: $$
3353: P \left ( \left | p_j - p_j' \right | \geq \frac{\beta}{\sqrt{2n}} \right )
3354: \leq 2e^{-\beta^2}
3355: $$
3356: Thus the probability that the bound is exceeded for at least one $j$
3357: is no more than $2Je^{-\beta^2}$. However, if
3358: $\left\| \bar{p} - \bar{p}' \right\| \geq J\beta/\sqrt{2n}$
3359: then the bound must be exceeded for some $j$. Hence conclusion (a)
3360: holds. Conclusions (b) and (c) follow by Lemmas \ref{errormag}
3361: and \ref{qdiff}. \proofmark
3362:
3363: \begin{lemm} \label{wdiff}
3364: Suppose $F$ and $F'$ are discrete distributions over the same
3365: size vector $\bar{s} = (s_1,\ldots,s_J)$,
3366: $\bar{q} = aug(\bar{p},c(F))$, $\bar{q}' = aug(\bar{p},c(F'))$, and
3367: $r'=c(F')/(1+c(F'))$.
3368: Suppose $q_{min}$ is the smallest nonzero entry in $\bar{q}$ and
3369: $\|\bar{q} - \bar{q}'\| < q_{min}$.
3370: Then if the algorithm $SS_{D(U_F)}^{r'}$ is applied to a list $L$ of $n$ items
3371: generated according to $F$, the resulting
3372: packing $P$ of $L$ plus the imaginary items created by
3373: $SS_{D(U_F)}^{r'}$ satisfies
3374: $$
3375: E[W(P)] = O(\max\{n\|\bar{q} - \bar{q}'\|,\sqrt{n}\}).
3376: $$
3377: \end{lemm}
3378:
3379: \noindent\textbf{Proof.}
3380: Since $\|\bar{q} - \bar{q}'\| < q_{min}$, we have that for all $j$ with $q_j>0$,
3381: $q_j' > q_j - \|\bar{q} - \bar{q}'\|
3382: \geq q_j(1-\|\bar{q} - \bar{q}'\|/q_{min}) > 0$.
3383: Let $\delta = \|\bar{q} - \bar{q}'\|/q_{min}$.
3384: Then for all $j$ we have $q_j'>(1-\delta)q_j >0$.
3385:
3386: Suppose items are generated according to $F$ and we use
3387: $SS_{D(U_F)}^{r'}$ to pack them.
3388: At each step, we will thus be using $SS_{D(U_F)}$ to pack an item that
3389: looks as if it
3390: were generated according to the probability vector $\bar{q}'$.
3391: Let us view the packing process as follows:
3392: When an item of size $s_j$ arrives, randomly classify it as an
3393: {\em good} item with probability $(1-\delta)q_j/q_j'$ and as a {\em bad} item
3394: with probability $1-(1-\delta)q_j/q_j'$.
3395: Note that if one restricts attention to the good items, they
3396: now arrive as if generated according to $\bar{q}$.
3397: Further note that by Claim \ref{onesclaim} of Theorem \ref{tunedtheo1},
3398: the distribution determined by $\bar{q}$ is a perfectly packable distribution.
3399: Thus for these arrivals we can apply Lemma \ref{orlinlemm},
3400: which we have already shown applies to $SS_{D(U_F)}$ as well as $SS$.
3401: Thus we can conclude that
3402: the expected increase in $ss(P)$ each time a good item is packed is less than 2.
3403:
3404: Let $D$ denote the constant $(1+q_{min})/q_{min}$.
3405: The probability that a random item is a bad item is
3406: $$
3407: \sum_{i=1}^J q_j'\left( 1 - \frac{(1-\delta)q_j}{q_j'} \right)
3408: = \sum_{i=1}^{J}\left(q_j' - q_j + \delta q_j \right) \leq
3409: \|\bar{q} - \bar{q}'\| + \delta = D\|\bar{q} - \bar{q}'\|
3410: $$
3411: For bad items, the worst-case
3412: increase in $ss(P)$ is less than $2 \max_j\{N_P(j)\}+2$, an upper bound
3413: by Lemma \ref{deltalemm} on the increase that
3414: would occur if our placement caused the maximum count to increase.
3415: Thus the expected increase in $ss(P)$ is less than
3416: \begin{equation}\label{EdeltaSS}
3417: 2 \left( 1+ D\|\bar{q} - \bar{q}'\| \max_j\{N_P(j)\} \right)
3418: \end{equation}
3419:
3420: Let $P_i$ be the packing after $i$ items have been packed and
3421: let $i(t)$, $1 \leq t \leq n$, be the index of the packing that results
3422: when the $t$th real item is packed, with $i(0)=0$ by convention. Define
3423: \begin{eqnarray*}
3424: Max_t &\equiv&\max\{1,N_{P_{i(t)}}(j):~1\leq j \leq J\},~1 \leq t \leq N\\
3425: MaxE &\equiv& \max \{E[Max_t]: 0\leq t \leq n\}\\
3426: \end{eqnarray*}
3427: \begin{claim}\label{maxclaim}
3428: For all $t$, $0\leq t \leq n$, and all $i$, $i(t)\leq i < i(t+1)$,
3429: the maximum level count in $P_i$ is at most $Max_t$.
3430: \end{claim}
3431:
3432: \noindent
3433: {\bf Proof of Claim.}
3434: The claim holds by definition for $P_{i(t)}$.
3435: Suppose it holds for packing $P_i$ and $i+1 < i(t+1)$,
3436: i.e., the next item to be packed is imaginary.
3437: Note that the fact that imaginary items (of size 1) can be generated
3438: implies that there are no dead-end levels.
3439: Since $SS^{r'}$ by assumption knows this, this means that it is not
3440: forbidden from making any legal move by its requirement to avoid
3441: creating dead-end levels, and must make an improving move whenever one exists.
3442: Suppose the current packing has a count greater than 0 and $j$ is the level
3443: with the biggest count, ties broken in favor of larger levels.
3444: Then there is at least one bin with level $j$ and placing an item of size 1
3445: into such a bin will decrease $ss(P)$.
3446: Thus $SS^{r'}$ must choose a placement that decreases $ss(P)$.
3447: This cannot increase the largest level count.
3448: Suppose on the other hand that the current packing has no level
3449: count exceeding 0.
3450: Then placing an imaginary item will only increase the maximum level
3451: count from 0 to 1, which is still no more than $Max_{i(t)}$.
3452: In both cases, we are left with a packing in which no count
3453: exceeds $Max_{i(t)}$.
3454: The claim follows by induction. \proofmark
3455: \begin{claim}\label{Emaxclaim}
3456: For $0\leq t < n$,
3457: $$E\left[ss(P_{t+1}) - ss(P_{t})|P_{t}\right]
3458: \leq 2B\bigl( 1+D\|\bar{q} - \bar{q}'\|MaxE\bigr).
3459: $$
3460: \end{claim}
3461:
3462: \noindent
3463: {\bf Proof of Claim.}
3464: For each $k\geq 0$, the probability that there are more than
3465: $k$ items packed in going from $P_{t}$ to $P_{t+1}$ is
3466: $\left(c(F')/(1+c(F'))\right)^k$.
3467: Given that there are more than $k$ items packed, the expected increase
3468: in $ss(P)$ due to the packing of the $k+1$st item is by (\ref{EdeltaSS}),
3469: Claim \ref{maxclaim}, and the definitions of
3470: $Max_t$ and $MaxE$ at most$$2(1+ D\|\bar{q} - \bar{q}'\|E[Max_t]) \leq 2(1+ D\|\bar{q} - \bar{q}'\|MaxE).$$
3471: The total expected increase in going from $P_t$ to $P_{t+1}$ is thus at most
3472: $$\sum_{k=0}^\infty \left(\frac{c(F')}{1+c(F')}\right)^k
3473: 2(1+ D\|\bar{q} - \bar{q}'\|MaxE)
3474: = 2(1+c(F'))(1+ D\|\bar{q} - \bar{q}'\|MaxE)$$
3475: The claim follows since by definition $c(F) \leq B-1$ for all
3476: distributions $F$. \proofmark
3477:
3478: \medskip
3479: Thus by the linearity of expectations we can conclude that for $1 \leq t \leq n$
3480: \begin{equation}\label{EssPk}
3481: E[ss(P_t)] \leq 2Bt\bigl(1 + D\|\bar{q} - \bar{q}'\| MaxE\bigr)
3482: \end{equation}
3483: and, by inequality (\ref{ebound}) in the proof of Lemma \ref{cauchylemm}, that
3484: \begin{eqnarray*}
3485: E[Max_t] \leq E\left[1+ \sum_{j=1}^{B-1}N_{P_t}(j)\right]
3486: & \leq & 1+ \sqrt{B\cdot E[ss(P_t)]}\\
3487: & \leq & 1+ \sqrt{2Bt\left(1+ D\|\bar{q} - \bar{q}'\| MaxE \right)}\\
3488: & \leq & 2\sqrt{Bn\left(1+ D\|\bar{q} - \bar{q}'\| MaxE \right)}
3489: \end{eqnarray*}
3490: and hence
3491: \begin{equation}\label{Emaxbound}
3492: {\displaystyle MaxE \leq 2\sqrt{Bn\left(1+ D\|\bar{q} - \bar{q}'\| MaxE \right)}}.
3493: \end{equation}
3494:
3495: If $D\|\bar{q} - \bar{q}'\| MaxE \leq 1$,
3496: we have $E[ss(P_n)] \leq 4Bn$ by (\ref{EssPk}).
3497: So by Lemma \ref{cauchylemm} we have
3498: $$E[W(P_n)] \leq \sqrt{B\cdot E[ss(P_n)]} \leq 2B\sqrt{n}$$
3499: Otherwise we have by (\ref{Emaxbound}) that
3500: $MaxE \leq 2\sqrt{2BDn\|\bar{q} - \bar{q}'\|}\sqrt{MaxE]}$.
3501: But this implies $MaxE \leq 8BDn\|\bar{q} - \bar{q}'\|$, and consequently
3502: by (\ref{EssPk})
3503: $$
3504: E[ss(P_n)] \leq 2Bn + 16(BD\|\bar{q} - \bar{q}'\| n)^2
3505: $$
3506: and hence by Lemma \ref{cauchylemm} that
3507: $$
3508: E[W(P_n)] \leq \sqrt{BE[ss(P_n)]} = O( n\|\bar{q} - \bar{q}'\|)
3509: $$
3510: for fixed $F$.
3511: Thus $EW_n^{SS''}(F') = O(\max\{n\|\bar{q} - \bar{q}'\|,\sqrt{n}\})$
3512: and Lemma \ref{wdiff} is proved. \proofmark
3513:
3514: \medskip
3515: We can now address part (b) of Theorem \ref{learningtheo}.
3516: Let us divide the waste created by $SS^*$ into three components.
3517: Let $n_A$ denote the number of items seen before all sizes in $U_F$
3518: have appeared.
3519: \begin{itemize}
3520: \item Waste in bins created during the packing of the first
3521: $n_A$ items (during what we called {\em false} phases).
3522: \item Waste in bins created after the first $n_A$ items have been
3523: packed, either during the 0-phase or during an $i$-phase, $i>0$,
3524: for which $\|\bar{q}-\bar{q}'\| > q_{min}$ in the terminology
3525: of Lemma \ref{wdiff} ({\em Type 1} true phases).
3526: \item Waste in the remaining bins ({\em Type 2} true phases).
3527: \end{itemize}
3528:
3529: For waste in bins created during false phases,
3530: we first determine a bound on $E[n_A]$.
3531: The analysis is similar to that used in the proof of Theorem \ref{sprimecor}.
3532: The probability that we have not seen all item sizes after the
3533: $h$th item arrives is $J \left( 1-p_{min} \right)^h$.
3534: If we choose the smallest $t$ such that $J(1-p_{min})^t \leq 1/2$,
3535: then for each integer $m > 0$, the probability that all the item sizes
3536: have not been seen after $mt$ items have arrived is at most $1/2^m$.
3537: Thus for each $i\geq 0$, the probability
3538: that $n_A \in (mt,(m+1)t]$ is at most $1/2^m$.
3539: Hence
3540: $$E[n_A]
3541: \leq \sum_{m=0}^\infty \Bigl( m+1)t \cdot p\bigl[n_A \in (mt,(m+1)t]\bigr]\Bigr)
3542: \leq t \cdot\sum_{m=0}^\infty \frac{(m+1)}{2^m} = 4t.
3543: $$
3544: Thus the expected false phase waste resulting from bins that contain at least one
3545: real item is bounded by $4t(B-1)/B$.
3546:
3547: The only other possible waste during false phases
3548: consists 1 unit of waste for each bin containing only imaginary items.
3549: The expected number of imaginary items that arrive before all item
3550: sizes have been seen is bounded by $(n_A+1)c(F_{max})$, where $F_{max}$
3551: is the empirical distribution $F'$ that has the largest value of $c(F')$
3552: among all those computed before all item sizes have been seen.
3553: Since $c(F') \leq B-1$ for all distributions $F'$ this is at most $(4t+1)(B-1)$.
3554: Moreover,
3555: all but one of the bins containing only imaginary items that are
3556: started during a given phase must
3557: be completely full: as already remarked,
3558: if there are any partially filled bins when
3559: an imaginary item (of size 1) arrives, then placing it in a bin whose
3560: level has the largest count (ties broken in favor of higher levels) will
3561: cause a decrease in $ss(P)$ and hence is to be preferred to starting a new bin.
3562: Thus the expected number of bins containing only imaginary items
3563: is at most $(4t+1)(B-1)/B$ plus the expected number of false phases.
3564: Since the number of false phases is clearly less than
3565: $n_A/(10B)+J$, the total expected waste during false phases is at most
3566: $8t + J+1 = O(1)$ for fixed $F$.
3567:
3568: We now turn to the Type 1 true phases.
3569: The first of these is the true 0-phase, which is Type 1 by definition.
3570: In this phase the expected
3571: number of real items packed is at most $10B$ and the expected waste
3572: is at most $20B+2$ by an argument like that in the previous paragraph.
3573:
3574: By a similar argument, if there is a true $i$-phase, $i>0$,
3575: the number of real items packed in it is at most $30B\cdot 4^{i-1}$
3576: and the expected waste
3577: during the phase is at most $60B\cdot 4^{i-1} + 2 < 16B\cdot4^i$.
3578: Whether this phase contributes to the Type 1 waste depends on the
3579: empirical distribution $F'$ measured at the beginning of the phase.
3580: In particular, we must have $\|\bar{q} - \bar{q}'\| > q_{min}$.
3581:
3582: Now the distribution $F'$ is based on at least $10B \cdot 4^{i-1}$ samples
3583: from $F$.
3584: Thus by Lemma \ref{pdiff}(c), the probability that
3585: $\|\bar{q} - \bar{q}'\| \geq \sqrt{2}JB\beta/\sqrt{2.5B4^i}$ is
3586: bounded by $2Je^{-\beta^2}$.
3587: Thus the probability that $\|\bar{q} - \bar{q}'\| \geq q_{min}$ is at most
3588: $2Je^{-(1.25q_{min}^2/J^2B)4^i} = 2Jd^{-4^i}$ where
3589: $d = e^{1.25q_{min}^2/J^2B} >1$ is a constant independent of $i$.
3590: The expected waste that this phase can produce by being a Type 1
3591: phase is thus at most
3592: $(32BJ)(4^i/d^{4^i})$.
3593: Summing over all true phases we conclude that the total expected
3594: waste for Type 1 phases is at most
3595: $$
3596: 20B+2 ~+~ 32BJ\sum_{i=1}^\infty\frac{4^i}{d^{4^i}} = O(1).
3597: $$
3598:
3599: Finally, let us turn to the waste during Type 2 true phases.
3600: Suppose the true $i$-phase, $i>0$, is of Type 2,
3601: and let $F'$ be the empirical distribution
3602: at the beginning of the phase, with $\bar{p}'$ being its probability vector.
3603: $F'$ must have been based on the observation of at least $10B4^{i-1}$
3604: items generated according to $F$.
3605: Thus by Lemma \ref{pdiff}(b) there are constants $\alpha$ and $\gamma$
3606: depending on $F$ but independent of $i$ such that
3607: $E\bigl[|c(F)-c(F')|\bigr] < \gamma/\sqrt{5B4^i} = \alpha 2^{-i}$.
3608:
3609: Let $N_i$ be the number of real items packed during the true $i$-phase,
3610: and recall that $N_i \leq 30B4^{i-1}$.
3611: This means that the expected waste due to imaginary items
3612: created during the phase is at most
3613: $$
3614: \frac{N_ic(F')}{B} \leq \frac{N_iB\bigl(c(F)+\alpha 2^{-i}\bigr)}{B}
3615: \leq \frac{N_ic(F)}{B} + 7.5\alpha 2^i.
3616: $$
3617: Note that the total number of true phases
3618: is at most $\lceil \log_4(n/10B) \rceil < \lfloor \log_4 n \rfloor
3619: = \lfloor (1/2)\log_2 n \rfloor$.
3620: Thus even if all such phases are of Type 2, we have that the expected total waste
3621: during the Type 2 phases due to imaginary items is bounded by
3622: $$
3623: \frac{nc(F)}{B} + 7.5\alpha \sum_{i=1}^{\lfloor \log_4 n \rfloor}2^i
3624: < \frac{nc(F)}{B} + 15\alpha \sqrt{n} = \frac{nc(F)}{B} + O(\sqrt{n})
3625: $$
3626:
3627: Now let us consider the waste caused by empty space in the bins
3628: packed during true phases of Type 2.
3629: First note that the set of items contained in open bins at the end
3630: of the $i$-phase consists of all items packed during this phase plus possibly
3631: items from immediately preceding true phases that operated with the
3632: same value of $r$.
3633: Even if all preceding true phases operated with the same value of $r$,
3634: this could be no more than $10B4^i$ items.
3635: Moreover, as argued above we know that the empirical distribution $F'$
3636: computed at the beginning of the $i$-phase has
3637: $E\bigl[|c(F)-c(F')|\bigr] < \alpha 2^{-i}$ for some fixed $\alpha$,
3638: so that by Lemma \ref{qdiff},
3639: $E\bigl[\|\bar{q}-\bar{q}'\|\bigr] < 2\alpha 2^{-i}$.
3640: Since this is a Type 2 phase, we have be definition that
3641: $\|\bar{q}-\bar{q}'\| \leq q_{min}$ and so Lemma \ref{wdiff} applies
3642: and we can conclude that there is a constant $\gamma$ such that the
3643: expected empty space in the packing is bounded by
3644: $$
3645: \gamma \max \left\{ (10B4^i)(2\alpha 2^{-i}),\sqrt{10B4^i}\right\}
3646: = O(2^i).
3647: $$
3648:
3649: Thus the expected total empty space of this kind
3650: over all true phases of Type 2 is once again $O(\sqrt{n})$,
3651: and so the expected total waste in bins started in Type 2 true
3652: phases (empty space plus imaginary
3653: items) is $nc(F)/B + O(\sqrt{n})$.
3654: Given that the expected waste in false levels and in true levels of Type 1
3655: was bounded, this means that
3656: $$
3657: EW_n^{SS^*}(F) = \frac{nc(F)}{B} + O(\sqrt{n})
3658: $$
3659: which by Theorem \ref{lptheo2} means that Claim (b) of Theorem \ref{learningtheo}
3660: has been proved.
3661:
3662: \medskip
3663: It remains to prove Claim (e), that $EW_n^{SS^*}(F) = O(1)$ whenever
3664: $EW_n^{OPT}(F) = O(1)$, i.e., whenever $F$ is a bounded waste distribution.
3665: Suppose $F$ is a bounded waste distribution with size vector $\bar{s}$
3666: and probability vector $\bar{p}$.
3667: From the Courcoubetis-Weber Theorem, we know that
3668: there is an $\epsilon > 0$ such that any distribution $F'$
3669: over the same set of item sizes that has a probability vector $\bar{p}'$
3670: satisfying $\|\bar{p}-\bar{p}'\| \leq \epsilon$ is a perfectly packable
3671: distribution and hence has $c(F')=0$ by Theorem \ref{lptheo2}.
3672:
3673: Once again, we can divide the waste produced in an $SS^*$ packing
3674: of a list generated according to $F$ into three components, although
3675: this division is somewhat different.
3676: \begin{itemize}
3677: \item Waste in bins created during false phases.
3678: \item Waste in bins created in true phases through the last such phase
3679: in which the starting empirical distribution $F'$ had $c(F')>0$.
3680: \item Waste created in all subsequent phases.
3681: \end{itemize}
3682: As in the analysis of Claim (b), we can conclude that the total
3683: expected waste for the false phases is bounded.
3684:
3685: Consider now the waste created in true phases through the last
3686: phase that started with $c(F') > 0$.
3687: If this was the true 0-phase, the expected waste
3688: is bounded by $20B+2$, again as argued in Claim (b).
3689: If it was the true $i$-phase, $i>0$, then at most $10B4^i$ items
3690: can have been packed in true phases through this point,
3691: and so the expected waste would be at most $80B4^i+2<81B4^i$ by an
3692: analogous argument.
3693: Now the probability that the $i$-phase is the last phase with
3694: $c(F')>0$ is clearly no more than the probability that it simply
3695: had $c(F')>0$.
3696: As remarked above, this can only have happened if
3697: $\|\bar{p}-\bar{p}'\| > \epsilon$.
3698: Since the empirical distribution at the start of the $i$-phase, $i>0$,
3699: is based on at least $10B4^{i-1}$ samples from $F$,
3700: by Lemma \ref{pdiff}(a), the probability that
3701: $\|\bar{p}-\bar{p}'\| > \epsilon$ is at most
3702: $2Je^{-(5B\epsilon^2/J^2)4^i} = 2Jd^{-4^i}$ for some $d>1$.
3703: Thus the total expected waste through the last true phase with
3704: $c(F')>0$ is at most
3705: $$20B+2~+~ \frac{81B}{2J}\sum_{i=1}^\infty\frac{4^i}{d^{4^i}} = O(1).$$
3706:
3707: Finally, if there are any phases after the last one
3708: that had $c(F')>0$ and hence $r>0$, let the first such phase
3709: be the $i_0$-phase.
3710: This phase begins by closing all previously open bins because
3711: $r$ has just changed from a positive value to 0.
3712: From now on, however, no more bin closures will take place since
3713: $r=0$ for all remaining phases and hence never changes.
3714: Thus the packing beginning with the $i_0$-phase is simply an
3715: $SS_{D(U_F)}^0 = SS_{D(U_F)}$ packing of items generated according
3716: to $F$, and by Theorem \ref{sprimecor} has $O(1)$ expected waste.
3717:
3718: Thus the total expected waste under $SS^*$ is $O(1)$, Claim (e) holds,
3719: and Theorem \ref{learningtheo} is proved. \proofmark
3720:
3721: \section{$SS$ and Adversarial Item Generation}
3722:
3723: The results for $SS^*$ in the previous section
3724: are quite general with respect to the context
3725: traditionally studied by papers on the average case analysis of
3726: bin packing algorithms: the standard situation
3727: in which item sizes are chosen as independent samples from the same
3728: fixed distribution $F$.
3729: However, that context itself is somewhat limited, in that one can
3730: conceive of applications in which some dependence exists between item sizes.
3731: Perhaps surprisingly,
3732: the arguments used to prove Theorems \ref{orlintheo} and \ref{boundedtheo}
3733: imply that $SS$ itself can do quite well in some situations where there
3734: is dependence and that dependence is controlled by an adversary.
3735:
3736: Suppose that our item generation process works as follows:
3737: Let $B$ be a fixed bin size.
3738: For each item $x_i$, $i=1,2,\ldots$, the size of item $x_i$ is chosen
3739: according to a discrete distribution $F_i$ with bin size $B$.
3740: The choice of $F_i$, however, is allowed to be made by an adversary,
3741: given full knowledge of all item sizes chosen so far, the current packing,
3742: and the packing algorithm we are using.
3743: It would be difficult to do well against such an adversary unless it were
3744: somehow restricted, so to introduce a plausible restriction, let us
3745: say that such an adversary is {\em restricted to $\cal F$},
3746: where $\cal F$ is a set of discrete distributions,
3747: if all the $F_i$ used must come from $\cal F$.
3748: As a simple corollary of the proof of Theorem \ref{orlintheo}
3749: we have the following.
3750: \begin{theo}\label{Padversary}
3751: Let $B$ be a given bin size and suppose items are generated by an adversary
3752: restricted to the set of all perfectly packable distributions for bin size $B$.
3753: Then the expected waste under $SS$ is $O(\sqrt{n})$.
3754: \end{theo}
3755:
3756: \noindent
3757: {\bf Proof.}
3758: By Lemma \ref{orlinlemm} we know that $E[ss(P)]$ increases
3759: by less than 2 whenever $SS$ packs an item whose size is generated
3760: by a perfectly packable distribution.
3761: Thus we can conclude that if we pack $n$ items generated by our adversary,
3762: we still must have $E[ss(P)] < 2n$.
3763: The rest follows by Lemma \ref{cauchylemm}, as in the proof of
3764: Theorem \ref{orlintheo}. \proofmark
3765:
3766: \medskip
3767: Note that without the restriction to perfectly packable distributions,
3768: the adversary could force the {\em optimal} expected waste to be linear,
3769: so Theorem \ref{Padversary} is in a sense the strongest possible result
3770: of this sort.
3771: With even more severe restrictions on $\cal F$,
3772: one can guarantee {\em bounded} expected
3773: waste against an adversary.
3774: \begin{theo} \label{Badversary}
3775: Suppose $\cal F$ is a set of bounded waste distributions none
3776: of which has nontrivial dead-end levels, and there is an $\epsilon>0$
3777: such that every distribution that is within distance $\epsilon$ of
3778: a member of $\cal F$ is perfectly packable distribution.
3779: Then if items are generated by an adversary
3780: restricted to $\cal F$, the expected waste under $SS$ is $O(1)$.
3781: \end{theo}
3782:
3783: \noindent
3784: {\bf Proof.}
3785: This follows from the proof of Theorem \ref{boundedtheo}, since
3786: the general hypothesis of Hajek's Lemma allows for adversarial item
3787: generation. Essentially the same proof as was used to show
3788: Theorem \ref{boundedtheo} applies. \proofmark
3789:
3790: Theorem \ref{Badversary} seems very narrow, but it has an interesting corollary.
3791:
3792: \begin{coro}
3793: Suppose $\cal{F}$ $= \bigl\{ U\{j,k\}, 1 \leq j \leq k-2 \bigr\}$ for
3794: some fixed $k>0$.
3795: Then if items are generated by an adversary
3796: restricted to $\cal F$, the expected waste under $SS$ is $O(1)$.
3797: \end{coro}
3798:
3799: \noindent
3800: {\bf Proof.}
3801: As shown in \cite{CCG98,CCG02}, $EW_n^{OPT}(F) = O(1)$ for all these distributions,
3802: and so by the Courcoubetis-Weber theorem for each $j$, $1 \leq j \leq k-2$,
3803: there is an $\epsilon_j > 0$ such that all distributions $F$
3804: within distance $\epsilon_j$ of $J\{j,k\}$ are perfectly packable distributions.
3805: We simply take $\epsilon = \min\{\epsilon_j: 1 \leq j \leq k-2\}$
3806: and apply Theorem \ref{Badversary}. \proofmark
3807:
3808: \medskip
3809: If we omit from Theorem \ref{Badversary} the requirement that
3810: the distributions in $\cal{F}$ have no nontrivial dead-end levels,
3811: then the best upper bound on the expected waste for $SS$
3812: grows to $O(\log n)$, as follows from the proof of Theorem \ref{lognupperbound}.
3813: Note that we cannot improve this to $O(1)$ by using $SS'$ instead of
3814: $SS$ as we did in the non-adversarial case.
3815: For example, the adversary could generate its first item using the distribution
3816: that yields items of size 1 with probability 1, and then
3817: switch to a bounded waste distribution with nontrivial dead-end levels.
3818: $SS'$, having seen an item of size 1, would conclude that $1 \in U_F$
3819: and hence that there are no dead-end levels.
3820: So from then on it would pack exactly as $SS$ would and hence
3821: would produce $\Omega(\log n)$ waste as implied by the lower bound
3822: in Theorem \ref{lognupperbound}.
3823:
3824: \section{The Effectiveness of Variants on $SS$}
3825:
3826: In this section we return to the standard model for item generation,
3827: and ask how much of the good behavior of $SS$
3828: depends on the precise details of the algorithm.
3829: It turns out that $SS$ is not unique in its effectiveness,
3830: and we shall identify a variety of related algorithms $A$ that share one
3831: or more of the following {\em sublinearity}
3832: properties with $SS$ (where (a) is a weaker form of (b)):
3833: \begin{enumerate}
3834: \renewcommand{\theenumi}{\alph{enumi}} % For references (\ref)
3835: \renewcommand{\labelenumi}{(\alph{enumi})} % For the listing itself
3836: \item {\rm [Sublinearity Property]}. If $EW_n^{OPT}(F) = O(\sqrt{n})$, then $EW_n^A(F) = o(n)$.
3837: \item {\rm [Square Root Property]}. If $EW_n^{OPT}(F) = O(\sqrt{n})$, then $EW_n^A(F) = O(\sqrt{n})$.
3838: \item {\rm [Bounded Waste Property]}. If $EW_n^{OPT}(F) = O(1)$ and $F$ has no
3839: nontrivial dead-end levels, then $EW_n^A(F) = O(1)$.
3840: \end{enumerate}
3841:
3842: \subsection{Objective functions that take level into account}
3843: One set of variants on $SS$ are those that replace the objective
3844: function $ss(P)$ by a variant that multiplies the squared counts by
3845: some function depending only on $B$ and the corresponding level,
3846: and then packs items so as to minimize this new objective function.
3847: Examples include
3848: $$
3849: \sum_{h=1}^{B-1}N_P(h)^2(B-h),~~\sum_{h=1}^{B-1}\left[N_P(h)(B-h)\right]^2,~
3850: \mbox{\rm and}~\sum_{h=1}^{B-1}\frac{N_P(h)^2}{h}
3851: $$
3852:
3853: The first of the above three variants was proposed in 1996 by
3854: David Wilson \cite{dbw96}, before we had invented the algorithm $SS$ itself.
3855: Wilson's unpublished experiments with this algorithm
3856: already suggested that it satisfied the Square Root and Bounded Waste Properties
3857: for the $U\{j,k\}$ distributions, a claim we can now confirm as a consequence
3858: of the following more general result.
3859: \begin{theo}\label{wilsonalgs}
3860: Suppose $f(h,B)$ is any function of the level and bin capacity,
3861: and $A$ is the algorithm that packs items so as to minimize
3862: $\sum_{h=1}^{B-1}N_P(h)^2f(h,B)$.
3863: Then $A$ satisfies the Square Root and Bounded Waste Properties.
3864: \end{theo}
3865:
3866: \noindent
3867: {\bf Proof.}
3868: Such algorithms satisfy the Square Root Property,
3869: since by Lemma \ref{orlinlemm}
3870: the expected increase in the objective function at each step is still bounded
3871: by a constant ($2\max\{f(h,B): 1 \leq h \leq B-1\}$).
3872: They satisfy the Bounded Waste Property, since the proof of
3873: Theorem \ref{boundedtheo} need only
3874: be modified to change some of the constants used in the arguments.
3875: Details are left to the reader. \proofmark
3876:
3877: \medskip
3878: We conjecture that the
3879: $EW_n^{SS}(F)=\Theta( \log n)$ result of Theorem \ref{lognupperbound}
3880: for distributions $F$ with nontrivial
3881: dead-end levels also carries over to these variants, but the length
3882: and complexity of the proof of the original result makes verification
3883: a much less straightforward task.
3884:
3885: As to which of these variants performs best in practice, we performed
3886: preliminary experimental studies
3887: using the distributions studied in \cite{CJK99}, i.e.,
3888: $U\{h,100\}$, $1 \leq h < 100$ (as defined in the Introduction),
3889: and $U\{18,j,100\}$, $18 \leq j < 100$,
3890: where $U\{h,j,k\}$ is the distribution in which the bin size is $k$,
3891: the set of possible item sizes is $S = \{18,19,\ldots,h\}$,
3892: and all sizes in $S$ are equally likely.
3893: The distributions in the first class are all bounded waste distributions
3894: except for $U\{99,100\}$, for which $EW_n^{OPT}(F) = \Theta(\sqrt{n})$.
3895: The distributions in the second class include ones with all three possibilities
3896: for $EW_n^{OPT}(F)$: $O(1)$, $\Theta(\sqrt{n})$, and $\Theta(n)$.
3897: We also tested a few additional more idiosyncratic distributions.
3898: The values of $n$ tested typically ranged from 100,000 to 100,000,000.
3899: Our general conclusion was that
3900: there is no clear winner among $SS$ and the variants describe above;
3901: the best variant depends on the distribution $F$.
3902:
3903: \subsection{Objective functions with different exponents}
3904: A second class of variants that at least satisfy the
3905: Sublinearity Property is obtained by
3906: changing the exponent in the objective function.
3907: \begin{theo}\label{powerroot}
3908: Suppose $SrS$ denotes that algorithm that at each step attempts to minimize
3909: the function $\sum_{h=1}^{B-1}(N_P(h))^r$. Then for all perfectly packable distributions $F$,
3910: $$
3911: EW_n^{SrS}(F) ~~=~~ \left\{ \begin{array}{ll}
3912: O \left( n^{\frac{1}{r}} \right ), & 1 < r \leq 2\\
3913: \\
3914: O \left( n^{\frac{r-1}{r}} \right ), & 2 \leq r < \infty
3915: \end{array} \right.
3916: $$
3917: (Note that when $r=2$ both bounds equal $O(\sqrt{n})$, the known bound
3918: for $SS = S2S$.)
3919: \end{theo}
3920:
3921: \noindent\textbf{Proof.}
3922: Suppose $P$ is any packing and a random item $i$ is generated according
3923: to $F$.
3924: By the argument used in the proof of Lemma \ref{orlinlemm}, we know that
3925: for there is an algorithm $A_F$ such that if $i$ is packed by $A_F$,
3926: then for each $h$, $1 \leq h \leq B-1$,
3927: the expected increase in $N_P(h)^r$
3928: given that $N_P(h)$ changes
3929: and that the current value $N_P(h) >0$, is bounded by
3930: \begin{eqnarray*}
3931: \frac{1}{2}\Bigl((N_P(h)+1)^r - N_P(h)^r \Bigr) & + & \frac{1}{2}\Bigl((N_P(h)-1)^r -N_P(h)^r\Bigr)\\[.2in]
3932: & = & \frac{(N_P(h)+1)^r + (N_P(h)-1)^r}{2} -N_P(h)^r.
3933: \end{eqnarray*}
3934:
3935: Let $x = \max\{N_P(h): 1 \leq h \leq B-1\}$.
3936: Given that at most two counts change when an item is packed
3937: and that the expected increase for a zero-count is at most $1^r=1$,
3938: the expected increase in $\sum_{h=1}^{B-1}(N_{P_n}(h))^r$ when $i$ is
3939: packed is thus at most
3940: \begin{equation}\label{ediff}
3941: \max \Bigr\{2,~(x+1)^r + (x-1)^r -2x^r\Bigl\}.
3942: \end{equation}
3943: Since $SrS$ packs items so as to minimize $\sum_{h=1}^{B-1}(N_{P_n}(h))^r$,
3944: the expected increase in this quantity when we pack $i$ using $SrS$
3945: instead of $A_F$ can be no greater.
3946:
3947: We thus need to bound (\ref{ediff}) when $r$ is fixed.
3948: For $x \leq 2$, it is clearly bounded by a constant depending
3949: only on $r$, so let us assume that $x > 2$.
3950: To bound (\ref{ediff}) in this case, we know by Taylor's Theorem that
3951: there exist $\theta_1$ and $\theta_2$, $0 < \theta_1,\theta_2 < 1$, such that
3952: \begin{eqnarray}
3953: (x+1)^r &=& x^r + rx^{r-1} + \frac{r(r-1)}{2!}x^{r-2} + \frac{r(r-1)(r-2)}{3!}(x+\theta_1)^{r-3}\label{xplus1}\\
3954: &&\nonumber \\
3955: (x-1)^r &=& x^r - rx^{r-1} + \frac{r(r-1)}{2!}x^{r-2} - \frac{r(r-1)(r-2)}{3!}(x-\theta_2)^{r-3}\label{xminus1}
3956: \end{eqnarray}
3957: Substituting, we conclude that (\ref{ediff}) is bounded by the maximum of 2 and
3958: \begin{equation}\label{ediffbound}
3959: r(r-1)x^{r-2}
3960: + \frac{r(r-1)(r-2)}{6}\:\Bigl[(x+\theta_1)^{r-3}-(x-\theta_2)^{r-3}\Bigr]
3961: \end{equation}
3962:
3963: \noindent
3964: If $1<r<2$, then (\ref{ediffbound}) has a fixed bound depending only on $r$
3965: when $x>2$.
3966: Thus if $P_n$ is the packing that exists after all $n$ items have been
3967: packed by $SrS$, the expected value of $\sum_{h=1}^{B-1}(N_{P_n}(h))^r$ is $O(n)$.
3968: If $r>2$, then (\ref{ediffbound}) grows as
3969: $\Theta(x^{r-2}) = O(n^{r-2})$.
3970: Thus in this case the expected value of
3971: $\sum_{h=1}^{B-1}(N_{P_n}(h))^r$ is $O(n^{r-1})$.
3972:
3973: \medskip
3974: Let $C_i = \sum_{h=1}^{B-1} P[N_P(h)=i]$, $0 \leq i < n$.
3975: Note that $\sum_{i=1}^nC_i = B$ and $\sum_{i=1}^niC_i$ is the expected number of
3976: partially filled bins in the packing and hence an upper bound on the expected
3977: waste. We can bound this using Holder's Inequality:
3978: \begin{equation} \label{holder}
3979: \sum a_ib_i \leq \left( \sum a_i^p \right)^\frac{1}{p} \left( \sum b_i^q \right)^\frac{1}{q} \mbox{ when } \frac{1}{p} + \frac{1}{q} = 1
3980: \end{equation}
3981:
3982: \noindent
3983: Set $\displaystyle{
3984: a_i = i(C_i)^\frac{1}{r},~~b_i = (C_i)^\frac{r-1}{r},~~
3985: p = r,~~\mbox{and}~~q = \frac{r}{r-1}
3986: }$.
3987: In the case where $1 < r < 2$, we have concluded that there is a $d$ such that
3988: $\sum_{i=1}^nC_ii^r \leq dn$.
3989: Thus Holder's Inequality yields
3990: $$
3991: E[W(P_n)] ~<~
3992: \sum iC_i \leq \left(\sum C_ii^r \right)^\frac{1}{r}
3993: \left( \sum C_i \right)^\frac{r-1}{r}
3994: \leq (dn)^\frac{1}{r}B^\frac{r-1}{r} = O(n^\frac{1}{r})
3995: $$
3996: as claimed.
3997: On the other hand, if $r>2$ we have $\sum_{i=1}^nC_ii^r \leq dn^{r-1}$ for some
3998: constant $d$ and so Holder's Inequality yields
3999: $$
4000: E[W(P_n)] ~<~
4001: \sum iC_i \leq \left(\sum C_ii^r \right)^\frac{1}{r}
4002: \left( \sum C_i \right)^\frac{r-1}{r}
4003: \leq d^\frac{1}{r}n^\frac{r-1}{r}B^\frac{r-1}{r} = O(n^\frac{r-1}{r})
4004: $$
4005: as claimed. \proofmark
4006:
4007: \smallskip
4008: Despite the differing qualities of the bounds in Theorem \ref{powerroot},
4009: limited experiments with the $SrS$ for $r =$ 1.5, 3, and 4 revealed no
4010: consistent winner among these variants and $SS$.
4011: Indeed, they suggest that these algorithms, and perhaps all the algorithms
4012: $SrS$ with $r>1$, might satisfy the
4013: Square Root and Bounded Waste Properties as well as
4014: the Sublinearity Property.
4015: Although we currently do not see how to prove these conjectures in general,
4016: we can show that the algorithms $SrS$ satisfy the Bounded Waste
4017: Property when $r \geq 2$.
4018:
4019: \begin{theo}\label{boundedSrS}
4020: If $r \geq 2$ and $F$ is a bounded waste distribution with no nontrivial
4021: dead-end levels, then $EW_n^{SrS}(F) = O(1)$.
4022: \end{theo}
4023:
4024: \noindent
4025: {\bf Proof.}
4026: As in the proof of Theorem \ref{boundedtheo}, we apply Hajek's Lemma.
4027: By an argument analogous to the one used in that proof,
4028: it is straightforward to show that the desired conclusion will follow
4029: if Hajek's Lemma can be shown to apply to the potential function
4030: $$
4031: \phi(\bar{x}) = \left(\sum_{h=1}^{B-1}x_i^r\right)^{1/r}
4032: $$
4033:
4034: For this potential function, the Initial Bound Hypothesis applies
4035: since we begin with the empty packing.
4036: The Bounded Variation Hypothesis applies since for a given value
4037: $y$ of $\phi(\bar{x})$, the maximum possible change in $\phi$ occurs when
4038: a single entry in $\bar{x}$ equals $y$ and all the rest are 0,
4039: in which case $\phi$ can increase to at most $y+1$ and decrease
4040: to no less than $y-1$.
4041:
4042: The main challenge in the proof is proving that the Expected Decrease
4043: Hypothesis applies.
4044: For this we need the following results, analogues of Lemmas \ref{orlinlemm},
4045: \ref{squarelemm}, and \ref{goodmovelemm}, used in the proof of
4046: Theorem \ref{boundedtheo}.
4047:
4048: \begin{lemm}\label{r-orlinlemm}
4049: Let $F$ be a perfectly packable distribution and $r \geq 2$.
4050: Then there is a constant $d$, depending only on $r$, such that if
4051: $P$ is an arbitrary packing into bins of size $B$ whose
4052: profile is given by the vector $\bar{x}$ with $\phi(\bar{x}) > 0$,
4053: $i$ is an item randomly generated according to $F$,
4054: and $\bar{x}'$ is the profile of the packing
4055: resulting if $i$ is packed into $P$ according to $SrS$,
4056: $$
4057: E\left[\phi(\bar{x}')^r:x\right] < \phi(\bar{x})^r +d\phi(\bar{x})^{r-2}.
4058: $$
4059: \end{lemm}
4060:
4061: \noindent
4062: {\bf Proof.}
4063: Note that for all $x_h \leq \phi(\bar{x})$, $1 \leq h \leq B-1$ by definition.
4064: The result thus follows by (\ref{ediffbound}) in the proof
4065: of Theorem \ref{powerroot}. \proofmark
4066:
4067: \begin{lemm}\label{powerlemm}
4068: Let $y$ and $a$ be positive and $r \geq 2$. Then
4069: \begin{equation}\label{rpowerbound}
4070: y-a \leq \frac{y^r-a^r}{ra^{r-1}}.
4071: \end{equation}
4072: \end{lemm}
4073:
4074: \noindent
4075: {\bf Proof.}
4076: Consider the functions
4077: $f_a(y) = (y-a) - (y^r-a^r)/(ra^{r-1})$, $a>0$. We need to show that
4078: for all $a>0$, $f_a(y) \leq 0$ whenever $y > 0$.
4079: But observe that the derivative
4080: $$f_a'(y) = 1 - \frac{ry^{r-1}}{ra^{r-1}}$$
4081: is greater than 0 if $y<a$, equals 0 if $y=a$, and is less than 0
4082: if $y>a$.
4083: Thus $f_a(y)$ takes on its maximum value when $y=a$, in which case
4084: it is 0, as desired. \proofmark
4085:
4086: \begin{lemm} \label{r-goodmovelemm}
4087: Suppose $F$ is a distribution with no nontrivial dead-end levels
4088: and $r \geq 2$.
4089: Let $P$ be any packing that can be created by applying $SrS$
4090: to a list of items all of whose sizes are in $U_F$.
4091: If $\bar{x}$ is the profile of $P$ and $\phi(\bar{x}) > r^2B^{r+1/r}$
4092: where $B$ is the bin size,
4093: then there is a size $s \in U_F$ such that if an item of size $s$ is packed
4094: by $SrS$ into $P$, the resulting profile
4095: $\bar{x}'$ satisfies
4096: $$\phi(\bar{x}')^r \leq \phi(\bar{x})^r
4097: - \frac{\phi(\bar{x})^{r-1}}{B^{(r^2-1)/r}}$$
4098: \end{lemm}
4099:
4100: \noindent
4101: {\bf Proof.}
4102: Let $x_h$ be the largest level count.
4103: By the definition of $\phi$ we have $\phi(\bar{x})^r \leq Bx_h^r$
4104: and hence $x_h \geq \phi(\bar{x})/B^{1/r} \geq r^2B^r$.
4105: Thus $h$ cannot be a nontrivial dead-end level and as in the proof
4106: of Lemma \ref{goodmovelemm}, there must be some $h'\geq h$ and size
4107: $s \in U_F$ such that $h'+s \leq B$ and
4108: $$
4109: \Delta \equiv x_{h'} - x_{h'+s} \geq x_h/B \geq
4110: \frac{\phi(\bar{x})}{B^{1+1/r}} \geq r^2B^{r-1}.
4111: $$
4112: Let $y$ denote $x_{h'+s}$.
4113: Then if an item of size $s$ were to be packed, we could reduce
4114: $\sum_{h=1}^{B-1}x_h^r$ by at least
4115: $$
4116: (y+\Delta)^r - (y+\Delta-1)^r + y^r - (y+1)^r.
4117: $$
4118: Using Taylor's Theorem as in the proof
4119: of Theorem \ref{powerroot} but with one fewer term in the
4120: expansions than in (\ref{xplus1}) and (\ref{xminus1}),
4121: we conclude the reduction is at least
4122: $$
4123: \left[r(y+\Delta)^{r-1} - \frac{r(r-1)(y+\Delta-\theta_1)^{r-2}}{2}\right]
4124: - \left[ry^{r-1} + \frac{r(r-1)(y+\theta_2)^{r-2}}{2}\right]
4125: $$
4126: where $0 < \theta_1,\theta_2 < 1$.
4127: But note that the amount we must subtract due to
4128: the two lower order terms is less than
4129: $$
4130: r(r-1)(y+\Delta)^{r-2} \leq \frac{r(y+\Delta)^{r-1}}{(y+\Delta)/(r-1)}
4131: \leq \frac{r(y+\Delta)^{r-1}}{\Delta/r} \leq
4132: \frac{r(x_h)^{r-1}}{rB^{r-1}} = \left(\frac{x_h}{B}\right)^{r-1}
4133: \leq \Delta^{r-1}
4134: $$
4135: Since the higher order terms are
4136: $r(y+\Delta)^{r-1} - ry^{r-1} \geq r\Delta^{r-1}$,
4137: we can conclude that $\phi$ must decrease by at least
4138: $$
4139: (r-1)\Delta^{r-1} \geq (r-1)\left(\frac{\phi(\bar{x})}{B^{1+1/r}}\right)^{r-1}
4140: \geq \frac{\phi(\bar{x})^{r-1}}{B^{(r^2-1)/r}}
4141: $$
4142: as claimed. \proofmark
4143:
4144: To prove that $\phi$ satisfies the Expected Decrease Hypothesis of Hayek's
4145: Lemma, we argue much as in the proof of Theorem \ref{boundedtheo}.
4146: Since $F$ is a bounded waste distribution, there is an $\epsilon > 0$
4147: such that the process of generating items according to $F$ is equivalent
4148: to generating items of the size $s$ specified in Lemma \ref{r-goodmovelemm}
4149: with probability $\epsilon$ and otherwise generating items according to
4150: a slightly modified perfectly packable distribution $F'$.
4151: By Lemmas \ref{r-orlinlemm} and \ref{r-goodmovelemm},
4152: the expected increase in $\phi(\bar{x})^r$ is then at most
4153: $$(1-\epsilon)d\phi(\bar{x})^{r-2}
4154: - \frac{\epsilon\phi(\bar{x})^{r-1}}{B^{(r^2-1)/r}}
4155: $$
4156: which, assuming $\phi(\bar{x})$ is sufficiently large,
4157: is less than $-b\phi(\bar{x})^{r-1}$ for some constant $b>0$
4158: depending only on $F$ and $r$.
4159: By Lemma \ref{powerlemm} we thus have
4160: $$
4161: E\left[\phi(\bar{x}') - \phi(\bar{x})\right] \leq
4162: - \frac{b\phi(\bar{x})^{r-1}}{r\phi(\bar{x})^{r-1}} = -\frac{b}{r}
4163: $$
4164: and so the Bounded Decrease Hypothesis holds for $\phi$, Hajek's Lemma
4165: applies, and we can conclude as in Theorem \ref{boundedtheo} that
4166: $EW_n^{SrS}(F) = O(1)$. \proofmark
4167:
4168: \subsection{Combinatorial variants}
4169: In this section we consider satisfying the Sublinearity Property
4170: with algorithms that don't depend on powers of counts.
4171: As our first two candidates, consider the algorithms that are in a sense
4172: the limits of the $SrS$ algorithms as $r \rightarrow 1$ and
4173: $r \rightarrow \infty$, a promising approach since the $SrS$ algorithms
4174: all satisfy the Sublinearity Property and may even satisfy the
4175: Square Root Property.
4176:
4177: An obvious candidate for a limiting algorithm when $r \rightarrow 1$
4178: is $S1S$, the algorithm that always
4179: tries to minimize $\sum_{h=1}^{B-1}N_P(h)$, i.e., the number of
4180: partially filled bins.
4181: To do this, we simply must never start a new bin if that can
4182: be avoided and must always perfectly pack a bin when possible (i.e., if the size
4183: of the item to be packed is $s$ and there is a partially full
4184: bin with level $B-s$, we must place the item in such a bin).
4185: By itself this is not a completely defined algorithm, since
4186: one needs to provide a tie-breaking rule.
4187: If we use our standard tie-breaking rule (always
4188: chooses a bin with the highest acceptable level),
4189: note that $S1S$ reduces to the classic Best Fit algorithm.
4190: As already observed in the Introduction, Best Fit
4191: provably has linear expected waste for the bounded waste
4192: distributions $U\{8,11\}$ and $U\{9,12\}$, and empirically seems to
4193: behave just as poorly for many other such distributions \cite{CJS93}.
4194: We doubt that any other tie-breaking rule will do better.
4195: For instance, if we always choose the lowest available level when the item won't
4196: pack perfectly, we typically do much worse than Best Fit.
4197: Thus no $S1S$ algorithm is likely to satisfy the Sublinearity Property.
4198:
4199: Taking the limit of $SrS$ as $r \rightarrow \infty$ seems more
4200: promising.
4201: Assume by convention that $N_P(B)$ is always 0.
4202: Then $S\infty S$ is the algorithm that places an item of size $s$
4203: into a bin of level $h$ for that $h$ with the maximum value of $N_P(h)$ in
4204: $\{h: 1\leq h \leq B-s, \mbox{ and } N_P(h)>N_P(h+s)\}$, should that
4205: set be non-empty, and otherwise places the item in a bin with
4206: level $h \geq 0$ for that $h$ with the minimum value of $N_P(h+s)$,
4207: ties always broken in favor of the higher level.
4208: It is easy to see that for any fixed packing these are the choices
4209: that will be made by $SrS$ for all sufficiently large values of $r$.
4210:
4211: Experiments suggest that $S\infty S$ has bounded expected waste
4212: for $U\{8,11\}$ and $U\{9,12\}$ as well as all the bounded waste
4213: distributions $U\{h,100\}$, $1\leq h \leq 98$.
4214: It still violates the Sublinearity Property, however.
4215: For example, $EW_n^{OPT}(U\{18:27,100\}) = \Theta(\sqrt{n})$ but
4216: experiments clearly indicate that
4217: $S\infty S$ has linear waste for this distribution.
4218: A simpler distribution exhibiting the behavior is $F$ with $B=51$,
4219: $U_F = \{11,12,13,15,16,17,18\}$, and all sizes equally likely.
4220: Experiments convincingly suggest that $EW_n^{S\infty S}(F) = \Theta(n)$,
4221: but it is easy to see that this is a perfectly packable distribution,
4222: since both the first four and the last three item sizes sum to $B=51$.
4223: Moreover, if one modifies $F$ to obtain a distribution $F'$ in which
4224: items of size 1 are added, but with only $1/10$ the probability of the
4225: other items, one obtains a bounded waste distribution for which
4226: $S\infty S$ continues to have linear waste.
4227: Using other tie-breaking rules, such as preferring the lower level bin,
4228: appears only to make things worse.
4229: So no $S\infty S$ algorithm is likely to satisfy the Sublinearity
4230: Property.
4231:
4232: Not surprisingly, the simpler combinatorial variants obtained by using
4233: just one of the two rules from the definition of $S\infty S$ also fail.
4234: In the first of these, $Smaxh$, we always place an item $x$ in
4235: a bin whose level has maximum count among all levels no greater than $B-s(x)$,
4236: assuming that the count for empty bins is by definition 0.
4237: In the second, $Sminh$, we place the item so as to
4238: minimize the count of the resulting level, assuming that the count
4239: for full bins is by definition 0.
4240: $Smaxh$ has linear waste for $U\{8,11\}$ and $U\{9,12\}$, perhaps
4241: not surprising since even if the item to be packed would perfectly
4242: fill a bin, $Smaxh$ may well choose not to do this.
4243: $Sminh$ is better, seeming to handle the $U\{j,k\}$ appropriately.
4244: However, it has linear waste on the same three perfectly packable/bounded
4245: waste distributions mentioned above on which $S\infty S$ also failed.
4246: Perhaps surprisingly, its constants of proportionality appear to be
4247: better than those for $S\infty S$ on these distributions.
4248: This may be because, unlike the latter algorithm, it will choose
4249: a placement that perfectly packs a bin when this is possible.
4250:
4251: Indeed, perfectly packing a bin when that is possible would seem
4252: like an inherently good idea.
4253: We know that it is not {\em necessary} to do this, since $SS$
4254: doesn't always do it, but how could it hurt?
4255: Let {\em perfectSS} be the algorithm that places the current item so
4256: as to perfectly pack a bin if this is possible, but otherwise places
4257: it so as to minimize $ss(P)$.
4258: Surely this algorithm should do just as well as $SS$.
4259: Surprisingly, there are cases where
4260: this variant too violates the Sublinearity Property.
4261:
4262: Consider the distribution $F$ with bin size $B=10$,
4263: $U_F=\{1,3,4,5,8\}$,
4264: $p(1)=p(3)=p(5)= 1/4$, and $p(4)=p(8)=1/8$.
4265: This is a perfectly packable distribution, as the probability vector
4266: can be viewed as a convex combination of the perfect packing configurations
4267: $(8,1,1)$, $(4,3,3)$, and $(5,5)$.
4268: However, experiments show that {\em perfectSS} has linear waste for
4269: this distribution (as does $Sminh$ but not $S\infty S$).
4270: Why does this happen?
4271: Note that essentially all the items of size 1 must be used to fill the
4272: bins that contain items of size 8.
4273: Thus whenever a 1 arrives and there is a bin of level 8, we need to place
4274: the 1 in such a bin.
4275: Unfortunately, {\em perfectSS} will prefer to put that 1 in a bin
4276: with level 9 if such a bin exists, and
4277: bins with level 9 can be created in other ways than simply
4278: with an 8 and a 1.
4279: Three 3's or a 5 and a 4 will do.
4280: On average this happens enough times to ruin the packing.
4281: (The count for level 9 never builds up to inhibit the
4282: nonstandard creation of such bins because
4283: level 9 bins keep getting filled by 1's.)
4284: Standard $SS$ avoids this problem and has $\Theta(\sqrt{n})$
4285: expected waste because it allows the counts for
4286: levels 8 and 9 to grow roughly as $\sqrt{n}$, with the latter being
4287: roughly half the former.
4288: This means that placing a 1 in a bin with level 8 is a downhill
4289: move, but creating a level 9 bin by any other means is an uphill move.
4290:
4291: \subsection{Variants designed for speed}
4292: Our final class of alternatives to $SS$ are designed to improve the running
4293: time, possibly at the cost of packing quality.
4294: Recall that $J$ denotes the number of item sizes under $F$.
4295: The $\Theta(nB)$ running time for the naive implementation of $SS$
4296: can be improved to $\Theta(nJ)$
4297: by maintaining for each item size $s \in U_F$ the list-of-lists data
4298: structure we introduced to handle items of size 1
4299: in the implementation of algorithm
4300: $SS^*$ described in Section \ref{tuned}.
4301: This approach unfortunately will not be much of an improvement over
4302: the naive algorithm for distributions $F$ with large numbers of item sizes,
4303: and it remains an open problem
4304: as to whether $SS$ (or any of the variants described above that
4305: satisfy the Sublinearity Property)
4306: can be implemented to run in $o(nB)$ time in general.
4307: However, if one is willing to alter the algorithm itself, rather than
4308: just its implementation, one can obtain more significant speedups.
4309: Indeed, we can devise algorithms that satisfy both the Square Root
4310: and Bounded Waste Properties and yet run in time $O(n\log B)$ or
4311: even $O(n)$ (although there will of course be a tradeoff between
4312: running time and the constants of proportionality on the expected waste).
4313:
4314: We shall first describe the general algorithmic approach and
4315: prove that algorithms that follow it will satisfy the two properties.
4316: We will then show how algorithms of this type can be implemented in
4317: the claimed running times.
4318: The key idea is to use data structures for each item size, as in
4319: the $O(nJ)$ implementation mentioned above, but only require that
4320: they be approximately correct (so that we need not spend so much time
4321: updating them).
4322: In particular, we maintain for each item size $s$ a set of local values
4323: $N_{P,s}(h)$ for the counts $N_P(h)$, and only require these local
4324: counts satisfy
4325: \begin{equation}\label{approxbound}
4326: \bigl|N_P(h)-N_{P,s}(h)\bigr| \leq \delta
4327: \end{equation}
4328: for some constant $\delta$.
4329: When an item of size $s$ arrives, we place it so as to minimize
4330: $ss_s(P) = \sum_{i=1}^{B-1}N_{P,s}(h)^2$, subject only to the additional
4331: constraint that we cannot place the item in a bin with local count $\delta$ or less,
4332: since there is no guarantee that such bins exist.
4333: Let {\em Approx}$SS_\delta$ be an algorithm that operates in this way.
4334:
4335: \begin{lemm}\label{approxSSlemm}
4336: Suppose $F$ is a perfectly packable distribution with bin size $B$,
4337: $P$ is a packing into bins of size $B$, $\delta \geq 0$, and $x$ is
4338: an item randomly generated according to $F$.
4339: Then if $x$ is packed according to {\it Approx}$SS_\delta$, the
4340: expected increase in $ss(P)$ is at most $10\delta+3$.
4341: \end{lemm}
4342:
4343: \noindent
4344: {\bf Proof}.
4345: We first need a generalization of Claim \ref{orlinclaim} from
4346: the proof of Lemma \ref{orlinlemm}:
4347:
4348: \begin{claim}\label{approxorlinclaim}
4349: Suppose $F$ is a perfectly packable distribution with bin size $B$
4350: and $\delta \geq 0$.
4351: Then there is an algorithm $A_F$ such for any packing $P$ into bins
4352: of size $B$, if an item $x$ is randomly generated according to $F$,
4353: $A_F$ will pack $x$ in such a way that $x$ does not go in a bin with a level $h$
4354: for which $N_P(h) \leq \delta$ and yet for each level $h$ with
4355: $N_P(h) > \delta$, $1 \leq h \leq B-1$, the probability that $N_P(h)$
4356: increases is no more than the probability that it decreases.
4357: \end{claim}
4358:
4359: \noindent
4360: This is proved by a simple modification of the proof of
4361: Claim \ref{orlinclaim} to require that for each optimal bin the
4362: items are ordered so that all the levels $S_1$ through $S_{last(Y)}$ have
4363: counts greater than $\delta$ and none of the levels
4364: $S_{last(y)}+s(y_i)$ do for $i>last(y)$.
4365:
4366: \medskip
4367: Claim \ref{approxorlinclaim} implies that the expected increase
4368: in $ss(P)$ under $A_F$ is at most $2\delta +2$:
4369: If a count greater than $\delta$ changes, the proof of Lemma \ref{orlinlemm}
4370: implies that the expected increase in $ss(P)$ is at most 1.
4371: Counts of $\delta$ or less can only increase, but in
4372: this case $ss(P)$ can increase by no more than $2\delta+1$.
4373: At most two counts can change during any item placement,
4374: and at most one of them can be a count of $\delta$ or less.
4375: Thus the expected change in $ss(P)$ obeys the claimed bound,
4376: and if $SS_\delta$ is the algorithm that places items so as to
4377: minimize $ss(P)$ subject to the constraint that no item can
4378: be placed in a partially filled bin whose level's count is $\delta$
4379: or less, we can conclude that the expected increase in $ss(P)$ when $SS_\delta$
4380: places an item generated according to $F$ is also at most $2\delta+2$.
4381:
4382: So consider what happens when $SS_\delta$ packs an item with size $s \in U_F$.
4383: Suppose that placement is into a bin of level $h$, and
4384: that $N_P(h+s)-N_P(h) = d$.
4385: Note that by Lemma \ref{deltalemm} the smallest increase in $ss(P)$ this can
4386: represent is $2d+1$.
4387: Now by (\ref{approxbound}) we must
4388: have $N_{P,s}(h+s)-N_{P,s}(h) \leq d+2\delta$
4389: and so the move chosen by {\em Approx}$SS_\delta$ must
4390: place the item in a bin of level $h'$ satisfying
4391: $N_{P,s}(h'+s)-N_{P,s}(h') \leq d + 2\delta$.
4392: But then, again by (\ref{approxbound}), we must have
4393: $N_P(h'+s)-N_P(h') \leq d + 4\delta$ and hence, again by
4394: Lemma \ref{deltalemm}, $ss(P)$ can increase by at most
4395: $2d+8\delta+2$, or at most $8\delta + 1$ more than the increase under
4396: $SS_\delta$.
4397: Since the expected value for the latter was at most $2\delta +2$, the
4398: Lemma follows. \proofmark
4399:
4400: \begin{theo}\label{approxSStheo}
4401: For any $\delta \geq 0$,
4402: \begin{itemize}
4403: \item [{\rm (a)}] If $F$ is a perfectly packable distribution, then
4404: $EW_n^{ApproxSS_\delta}(F) = O(\sqrt{n})$.
4405: \item [{\rm (b)}] If $F$ is a bounded waste distribution with no
4406: nontrivial dead-end levels, then
4407: $EW_n^{ApproxSS_\delta}(F) = O(1)$.
4408: \item [{\rm (c)}] Suppose {\it Approx}$SS_\delta'$ is the
4409: algorithm that mimics {\it Approx}$SS_\delta$ except that it
4410: never creates a bin that, based on the item sizes seen so far,
4411: has a dead-end level, unless this is unavoidable, in which case it
4412: starts a new bin. Then this algorithm has
4413: $EW_n^{ApproxSS_\delta'}(F) = O(1)$ for {\em all} bounded waste distributions,
4414: as well as $EW_n^{ApproxSS_\delta'}(F) = O(\sqrt{n})$ for all perfectly
4415: packable distributions.
4416: \end{itemize}
4417: \end{theo}
4418:
4419: \noindent
4420: {\bf Proof}.
4421: Note that for any fixed $\delta$, $10\delta + 6$ is a constant,
4422: and having a constant bound on the expected increase in $ss(P)$ was
4423: really all we needed to prove the above results for $SS$ and $SS'$.
4424: Thus the above three claims all follow by essentially the same arguments
4425: we used for $SS$ and $SS'$, with constants increased appropriately
4426: to compensate for property (\ref{approxbound}). \proofmark
4427:
4428: \medskip
4429: Let us now turn to questions of running time.
4430:
4431: \begin{lemm}\label{approxSStimelemm}
4432: Suppose $t \geq 1$ and $J \geq 1$ are integers.
4433: Then there are implementations of {\it Approx}$SS_{tJ}$
4434: and {\it Approx}$SS_{tJ}'$ that work for all instances with
4435: $J$ or fewer item sizes and run in time
4436: $O(n(1+(\log B)/t))$.
4437: \end{lemm}
4438:
4439: \noindent
4440: {\bf Proof}.
4441: We shall describe an implementation for {\em Approx}$SS_{tJ}$.
4442: The implementation for {\em Approx}$SS_{tJ}'$ is almost identical
4443: except for the requirement that we keep track of the dead-end levels and
4444: avoid creating bins with those levels when possible, which we already
4445: discussed in Section \ref{boundedSS'}.
4446:
4447: Our implementations maintain a data structure for each item size $s$
4448: encountered, the data structure being initialized when the
4449: size is first encountered.
4450: We are unfortunately unable to use the list-of-list data structure involved in
4451: the implementation of $SS^*$, since the efficiency of that data structure
4452: relied on the fact that counts could only change by 1 when they were updated.
4453: Now they may change by as much as $tJ$.
4454: Therefore we use a standard priority queue for the up to $B$
4455: possible levels $h$ of bins into which an item of size $s$ might be placed.
4456: Here the ``possible levels'' for $s$ are 0 together with all
4457: those $h$ such that $h+s\leq B$ and $N_{P,s}(h) > tJ$.
4458: The levels are ranked by the increase
4459: in $ss_s(P)$ that would result if an item of size $s$ were packed in
4460: a bin of level $h$.
4461: We can use any standard priority queue implementation that takes $O(1)$ time
4462: to identify an element with minimum rank and $O(\log B)$ to delete
4463: or insert an element.
4464: Initially, the only element in each priority queue is the one for
4465: level 0, i.e., the representative for starting a new bin.
4466:
4467: When we pack an item of size $s$, we first
4468: identify the ``best'' level $h$ for it as specified by the priority queue
4469: for $s$. We then place $x$ in a bin of level $h$ and update
4470: the global counts $N_P(h)$ and $N_P(h+s)$.
4471: This all takes $O(1)$ time.
4472: Local counts are not immediately changed when an item is packed.
4473: Local count updates are performed more sporadically,
4474: and initiated as follows.
4475: We maintain a counter $c(h)$ for each level $h$.
4476: This counter is incremented by 1 every time $N_P(h)$ changes
4477: and reset to 1 whenever it reaches the value $tJ+1$.
4478: Suppose the item sizes seen so far are $s_1,s_2,\ldots,s_j$, $j \leq J$.
4479: The local count $N_{P,s_i}(h)$ is updated only when
4480: the new value of $c(h)$ satisfies $c(h) \equiv O(\mbox{mod } t)$
4481: and $i = c(h)/t$.
4482: Note that this means that $N_P(h)$ changes only $tJ$ times
4483: between any two updatings of $N_{P,s_i}(h)$ and so
4484: (\ref{approxbound}) is satisfied for $\delta = tJ$.
4485:
4486: Whenever $N_{P,s}(h)$ is updated, we make up to two changes in the
4487: priority queue for $s$, each of which involves one or two
4488: insertions/deletions and hence takes $O(\log B)$ time:
4489: First, if $h+s\leq B$ we may need to update the priority queue
4490: entry for $h$.
4491: If $h$ is in the queue but now $N_{P,s}(h) \leq tJ$, then we must
4492: delete it from the queue.
4493: If it is not in the queue but now $N_{P,s}(h) > tJ$ we must insert it.
4494: Finally, if it is in the queue and $N_{P,s}(h) > tJ$, but its rank
4495: is not the correct value (with respect to $N_{P,s}(h)$ and $N_{P,s}(h+s)$),
4496: then it must be deleted and reinserted with the correct value.
4497: Similarly, if $h-s \geq 0$, then we may have to update the entry
4498: for $h-s$.
4499:
4500: It is easy to verify that the above correctly implements {\em Approx}$SS_{tJ}$.
4501: The overall running time is $O(n)$ for packing and
4502: updating the true counts $N_P(h)$ and $O((n/t)\log B)$ for
4503: updating local counts and priority queues, as required. \proofmark
4504:
4505: \begin{theo}\label{approxSStimetheo}
4506: There exist algorithms $A1SS$, $A2SS$, $A1SS'$ and $A2SS'$
4507: such that
4508: \begin{itemize}
4509: \item [{\rm (a)}] All four satisfy the Square Root and Bounded Waste Properties.
4510: \item [{\rm (b)}] $A1SS'$ and $A2SS'$ have bounded expected waste for
4511: {\em all} bounded waste distributions.
4512: \item [{\rm (c)}] $A1SS$ and $A1SS'$ run in time $O(n \log B)$.
4513: \item [{\rm (c)}] $A2SS$ and $A2SS'$ run in time $O(n)$.
4514: \end{itemize}
4515: \end{theo}
4516:
4517: \noindent
4518: {\bf Proof}.
4519: Given Theorem \ref{approxSStheo},
4520: it is easy to get algorithms with the above
4521: properties from Lemma \ref{approxSStimelemm} assuming we know $J$ in advance:
4522: If we take $t=1$ we get running time $O(n\log B)$ and
4523: if we take $t = \log B$ we get running time $O(n)$.
4524: (The tradeoffs only involve the constants of proportionality
4525: on the expected waste.)
4526: Moreover, it is really not necessary to know $J$ in advance,
4527: as there are adaptive algorithms that learn $J$ in the
4528: process of constructing their packings, still run in time
4529: $O(n\log B)$ or $O(n)$, and have the desired average case performance.
4530: For instance, we can start by running
4531: {\em Approx}$SS_5$ ({\em Approx}$SS_{5\log B}$) as long as the number $J$
4532: of item sizes seen so far is no more than 5.
4533: Thereafter, whenever we see a new item size, we close all partially filled
4534: bins, start running {\em Approx}$SS_{J+1}$ ({\em Approx}$SS_{(J+1)\log B}$),
4535: and then set $J = J+1$.
4536: Since by the analysis used in Section \ref{boundedSS'} the expected
4537: number of items packed before all item sizes have been seen must be
4538: bounded by a constant for any $F$, the bins constructed before
4539: we start running the correct algorithm contain only bounded expected
4540: waste and so cannot endanger our conclusions about asymptotic
4541: expected waste rates. \proofmark
4542:
4543: \medskip
4544: We can also devise fast analogues of Section \ref{tuned}'s distribution-specific
4545: algorithms $SS^F$ that always have $ER_\infty^A(F) = 1$,
4546: even for distributions whose optimal expected waste is linear.
4547: This however involves more than just applying the
4548: approximate data structures described above.
4549: The $O(nB)$ running times for the $SS^F$ algorithms derive from two sources,
4550: only one of which (the need for $\Theta(B)$ time to pack an item)
4551: is eliminated by using the approximate data structures.
4552: The second source of $\Theta(nB)$ time is the need to possibly
4553: pack $\Theta(nB)$ imaginary items of size 1.
4554:
4555: To avoid this obstacle, we need an additional idea.
4556: Recall that $SS^F$ attains $ER_\infty^{SS^F}(F) = 1$ by simulating the
4557: application of $SS$ to a perfectly packable distribution $F'$ derived from $F$.
4558: The modified distribution $F'$ was constructed using the optimal value $c(F)$
4559: for the linear program of Section \ref{lpsect}.
4560: Distribution $F'$ was equivalent
4561: to generating items according to $F$ with probability $1/(1+c(F))$ and otherwise
4562: generating an (imaginary) item of size 1.
4563:
4564: Our new approach uses more information from the solution to the LP.
4565: Let $v(j,h)$, $1 \leq j \leq J$ and
4566: $0 \leq h \leq B-1$, be the variable values in an optimal solution
4567: for the LP for $F$.
4568: For $1 \leq h \leq B-1$ define
4569: $$\Delta_h \equiv \sum_{j=1}^J v(j,h-s_j) - \sum_{j=1}^J v(j,h).$$
4570: Note that $\Delta_h$ is essentially the percentage of partially filled
4571: bins in an optimal packing whose gap is of size $B-h$.
4572: Let $T = \sum_{h=1}^{B-1}\Delta_h$ and note that we must have $T \leq 1$.
4573: Our new algorithm uses $SS$ to pack the modified distribution $F''$
4574: obtained as follows.
4575: With probability $1/(1+T)$ we generate items according to the original
4576: distribution $F$.
4577: Otherwise (with probability $T/(1+T)$) we generate
4578: ``imaginary'' items according to the distribution
4579: in which items of size $s$ have probability $\Delta_{B-s}$.
4580: It is not difficult to show that this is a perfectly packable distribution
4581: and that the expected total size of the imaginary items is $c(F)$,
4582: as in $SS^F$.
4583: Now, however, the number of imaginary items
4584: is bounded by $n$, so the time for packing them is no more than
4585: that for packing the real items, and hence can be $O(n\log B)$
4586: or $O(n)$ as needed.
4587:
4588: One can construct a learning algorithm $SS^{**}$ based on these variants just
4589: as we constructed the learning algorithm $SS^*$ based on the original
4590: $SS^F$ algorithms. We conjecture that $SS^{**}$ will satisfy the
4591: same general conclusions as listed for $SS^*$ in Theorem \ref{learningtheo}.
4592: The proof will be somewhat more complicated, however, and so we leave
4593: the details to interested readers.
4594:
4595: \medskip
4596: We should note before concluding the discussion of fast variants of $SS$ that
4597: our results on this topic are probably of theoretical interest only.
4598: A complicated $O(n\log B)$ algorithm like {\em Approx}$SS_J$ would be preferable
4599: to an $O(nB)$ or $O(nJ)$ implementation of $SS$ only when $J$ is fairly
4600: large, presumably well over 100.
4601: However, the constants involved in the expected waste produced by
4602: {\em Approx}$SS_J$ are substantial in this case.
4603:
4604: For instance, consider the bounded waste distribution $U\{400,1000\}$.
4605: For $n = 100,000$, {\em Approx}$SS_{400}$ typically uses 100,000 bins,
4606: i.e., one per item and
4607: roughly 5 times the optimal number, even though Theorem \ref{approxSStimetheo}
4608: says that the expected waste is asymptotically $O(1)$.
4609: On the other hand, Best Fit, which also runs in time $O(n\log B)$ but
4610: is conjectured to have linear expected waste for this distribution,
4611: uses roughly 0.3\% more bins than necessary.
4612: ($SS$ uses roughly 0.25\%.)
4613: Things have improved by the time $n=10,000,000$, but not enough
4614: to change the ordering of algorithms.
4615: Now {\em Approx}$SS_J$ uses only roughly 9.8\% more bins than necessary,
4616: while Best Fit uses roughly 0.28\%.
4617: $SS$ is down to an average excess of 0.0025\%.
4618: This consists of roughly 50 excess bins (as compared to 45
4619: for $n=100,000$) and should be compared to the roughly 200,000 excess bins
4620: for {\em Approx}$SS_J$.
4621: Admittedly the latter algorithm could be modified to significantly
4622: lower its expected waste, but it is unlikely that it could be made
4623: competitive with Best Fit except for much larger values of $n$.
4624:
4625: \section{Conclusions and Open Questions}\label{conclusion}
4626:
4627: In this paper we have discussed a collection of
4628: new, nonstandard, and surprisingly effective algorithms for the
4629: classical one-dimensional bin packing problem.
4630: We have done our best to leave as few major open problems as
4631: possible, but several interesting ones do remain:
4632:
4633: \begin{itemize}
4634: \item Can $SS$ itself be implemented to run in time $o(nB)$, so
4635: that we aren't forced to use the approximate versions described in
4636: the previous section?
4637: \item What is $\max \{ER_\infty^{SS}(F):\:F \mbox{ is a discrete distribution}\}$?
4638: The results of Section 4 only show that this maximum is at least 1.5 and
4639: no more than 3.0.
4640: A related question is what is the asymptotic worst-case performance ratio
4641: for $SS$.
4642: Here the results of \cite{Vli92a} for arbitrary on-line algorithms
4643: imply a lower bound of 1.54, but the best upper bound is still the
4644: abovementioned 3.0.
4645: \item Is our conjecture correct that $SrS$ satisfies both the Square
4646: Root and Bounded Waste Properties for all $r > 1$?
4647: Is there any polynomial-time
4648: algorithm that satisfies the Sublinearity Property
4649: and does not involve at least implicitly computing
4650: the powers of counts?
4651: \item Can one obtain a meaningful theoretical
4652: analysis of the constants of proportionality involved in the
4653: expected waste rates for particular distributions
4654: and the various bin packing algorithms we have discussed?
4655: Empirically we have observed wide differences in these constants
4656: for algorithms that, for example, both have bounded expected waste for a
4657: given distribution $F$, so theoretical insights here may well be
4658: of practical value.
4659: \item Is there an effective way
4660: to extend the Sum-of-Squares approach to continuous distributions while
4661: preserving its ability to get sublinear waste when the optimal
4662: waste is sublinear?
4663: \end{itemize}
4664:
4665: Finally, there is the question of the extent to which approaches like that
4666: embodied in the Sum-of-Squares algorithm can be applied to other problems.
4667: A first step in this direction is the adaptation of $SS$ to the
4668: bin covering problem in \cite{CJK01}.
4669: In bin covering we are given a set of items
4670: and a bin capacity $B$, and must assign the items to bins so that each
4671: bin receives items whose total size is {\em at least} $B$
4672: and the number of bins packed is maximized.
4673: Here ``waste'' is the total {\em excess} over $B$ in the bins
4674: and the class of ``perfectly packable distributions'' is the same as
4675: for ordinary bin packing.
4676: The interesting challenge here becomes to construct algorithms
4677: that have good worst- and average-case behavior for distributions
4678: that aren't perfectly packable, while still having $O(\sqrt{n})$
4679: expected waste for perfectly packable distributions. For details,
4680: see \cite{CJK01}.
4681:
4682: The results for bin covering suggest that the Sum-of-Squares approach
4683: may be more widely applicable, but bin covering is still quite
4684: close to the original bin packing problem.
4685: Can the Sum-of-Squares approach (or something like it) be extended to
4686: problems a bit further away?
4687:
4688: {\small
4689: \bibliographystyle{alpha}
4690: \bibliography{bp}
4691: }
4692:
4693: \end{document}
4694: