Digitized by the Internet Archive in 2013 http://archive.org/details/sensitivityanaly939frie I Mr "hC 939 UIUCDCS-R-78-939 7y*ZK- UILU-ENG 78 17 31 NSF MCS 77-22830 SENSITIVITY ANALYSIS FOR HEURISTIC ALGORITHMS by DONALD KENT FRIESEN August, 1978 SENSITIVITY ANALYSIS' FOR HEURISTIC ALGORITHMS BY DONALD KENT FRIESEN A.B., Knox College, 1963 A.M., Dartmouth College, 1965 Ph.D., Dartmouth College, 1966 THESIS Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate College of the University of Illinois at Urb ana- Champaign, 1978 Urbana, Illinois SENSITIVITY ANALYSIS FOR HEURISTIC ALGORITHMS Donald Kent Friesen, Ph.D. Department of Computer Science University of Illinois at Urb ana-Champaign, 19 78 Sensitivity analysis is an important aspect of many optimization problems, and has been extensively studied in relation to optimal solutions. In this thesis, the concept of sensitivity analysis is applied to near optimal solutions. In particular approximate solutions to bin packing, multiprocessor scheduling and knapsack problems are examined, analyzing the effect of varying certain parameters of the problems on the approximation algorithms. For the bin packing problems, the effect of varying the size of the bin is analyzed and asymptotic bounds on the worst case behavior of the first fit and first fit decreasing algorithms are obtained as a function of the size of the bin. Some implications of these results for scheduling of independent jobs in a multiprocessor environment are discussed. Multiprocessor scheduling when the jobs are not independent is also studied, and the effect of changing the execution times of jobs or the precedence relation is examined. Also a model is analyzed where a job is allowed to begin execution before the completion of its pre- decessors . The greedy algorithm is a simple algorithm for obtaining a good solution to the knapsack problem. The problem of determining when the greedy solution is in fact optimal is studied under the assumption that the size of the knapsack is assumed to lie in an interval instead of having a specified value. iii ACKNOWLEDGMENTS I gratefully acknowledge the assistance of my advisor, Professor C. L. Liu, in suggesting the topic, and I would like to thank him for many helpful and stimulating discussions. Thanks also should go to the Department of Computer Science and the National Science Foundation, under grant NSF MCS 73-03408-A01, for their financial support. IV TABLE OF CONTENTS CHAPTER PAGE 1 INTRODUCTION 1 2 FIRST FIT BIN PACKING WITH BIN SIZE AS A PARAMETER 5 2.1 Introduction 5 2.2 General Properties of FF (L) 7 2.3 An Upper Bound for Restricted a 9 2.4 The Case When a Is an Integer 28 2.5 Reductions 33 2 . 6 Conclus ions 37 3 FIRST FIT DECREASING BIN PACKING WITH BIN SIZE AS PARAMETER 39 3.1 Introduction 39 3.2 Results for a < 1 43 3.3 Lower Bounds for FFD*(a) , 1 _< a < 2 48 3.4 Upper Bounds for FFD*(a) , 1 ^ a < 2 52 3.5 An Application to Multiprocessor Scheduling 113 3.6 Results for a >_ 2 116 3.7 The Effect of the Maximum Size 123 4 VARIATION OF PARAMETERS IN MULTIPROCESSOR SCHEDULING 130 4. 1 Introduction 130 4.2 Variation of Parameters in the Basic Model 131 4 . 3 Scheduling with Overlap 133 V CHAPTER PAGE 5 KNAPSACK AND POSTAGE STAMP PROBLEMS 145 5.1 Introduction 145 5.2 A Parametrized Version of the Knapsack Problem 146 5.3 The Constrained Postage Stamp Problem 154 6 CONCLUSIONS 172 LIST OF REFERENCES 175 VITA 176 CHAPTER 1 INTRODUCTION An important point in analyzing the solution to many optimization problems is the sensitivity of the solution to changes in the input or specifications of the problem. Sensitivity analysis for optimal solutions has been discussed in many places, e.g. Nemhauser (1969) and Shapiro (1977). In this thesis, we study the problem of sensitivity analysis for heuristic or approximation solutions to large scale problems where optimal solutions are impractical to obtain. A common measure of the effectiveness of the result, H, of a heuristic algorithm is the ratio of H to the optimal solution, OPT. To measure the sensitivity of an algorithm whose outcome is dependent on parameters a.., a.,..., a , we use the ratio H(a n ,...,a ) /0PT(3, > • • • , 1 / n 1 n 1 3 ) where 0PT(3, » • . • , 3 ) is the optimal solution for some standard n In set (3,,..., 3 } of values for the parameters. To illustrate these ideas, we use examples from bin packing and multiprocessor scheduling where we can compute bounds, at least partially, on this ratio. In some cases, such as varying the bin size in some heuristic algorithms for bin packing, increasing the bin size is reflected in improvement in the bounds on performance. On the other hand, in certain multiprocessor scheduling problems, "anomalous" behavior can occur, resulting in no improvement in the worst case bound, and in fact, in worse performance in specific instances . In Chapters 2 and 3, we examine two algorithms for bin packing, the "first fit" and "first fit decreasing" algorithms. In these cases, we wish to analyze the behavior of the algorithms as the bin size is allowed to vary — keeping all bins of equal size. In the usual model of bin packing, one assumes an inexhaust- ible supply of bins of size 1 and a collection of items of sizes less than or equal to 1 to be packed. Since finding the minimal number of bins is an NP-complete problem, several heuristic algorithms for finding good solutions have been given and analyzed, for example, in Johnson et. al. (1974). In the first fit algorithm, an item is packed into the first bin in which there is room to hold it. Then succeeding items are packed by the same rule. If the items are first arranged in non- increasing order of size and then packed by the first fit method, the algorithm is called first fit decreasing. We are looking for information about the ratio of the number of bins of size a used by the first fit algorithm to the minimal number of bins of size 1 which are required for any packing. For a set of items S, and a list L — that is, a linear ordering of S, we will denote this ratio by FF(a,L)/OPT(l,S) . The results that we obtain have the form FF(a,L)/OPT(l,S) < FF*(a) + C(a) /0PT(1 ,S) where C(a) and FF*(a) depend only on a. Thus as the minimal number of bins, 0PT(1,S), approaches °°, FF*(a) asymptotically is a measure of the ratio. We obtain lower bounds on FF*(a) for all positive a and find FF*(ct) exactly for certain values. When the first fit decreasing algorithm is used, the bin packing is, in the worst case analysis, much better. For example in Johnson (1974) it is shown that FFD(1,L) £ (11/9)0PT(1,S) + 4 . We describe the analogous function FFD*(a) exactly for ae(0,3), and obtain lower bounds for larger values of a. In Chapter 4 we examine a particular model for multiprocessor scheduling. We assume that there are n identical processors, that each job J has a processing time u(J), that the set of jobs, S, has a precedence relation, "> , defined on it, and that the goal is to minimize the "finish time" or "makespan" of the entire set of jobs. There are a number of parameters that we could consider in this situation. In Graham (1966) the results of varying the number of processors, the precedence relation and the execution time are discussed. In particular, he proved that if •£. and -<' are precedence relations such that J-, -<' J 9 implies J ■< J„ for all jobs J., and J„, if u and u' define execution times such that u'(J) _< y(J) for all J, and if n <_ n' then for any list L of the set of jobs oia.y'.V.n'J/u (s,y,-t, n) < 1 + (n-l)/n' o — where a)(L,u ' ,<' ,n') is the length of the list schedule for the parameters L, u', <', n' and w (S,u,<, n) is the length of the minimal schedule for the parameters S, u,-<, n. Thus apparent improvements such as relaxing the precedence relation and decreasing the execution time are not reflected in the bound, and indeed, as Graham shows, such improvements may in specific instances yield a worse performance. A similar result occurs when we allow a job to begin execution slightly before its predecessors have completed execution. More precisely, we allow a job J to begin execution at time t if there is a processor available and if for each job J' -< J, J 1 will have completed execution by time t + Au(J'). Intuitively A represents a fraction of the execution time of a job during which the execution is inessential for succeeding jobs. Just as Graham's examples show that increasing the number of processors, or reducing all the execution times, or relaxing the precedence relation may produce worse results for a particular set of jobs, in our problem increasing the amount of overlap allowed may result in a worse schedule. Our main result concerning this model computes the worst case ratio of u)(L,A,n), the length of a list schedule with overlap fraction A, on n processors, to u (S,0,n), the optimal schedule length for the set of jobs on n processors with no overlap allowed. A related problem is that of determining when a heuristic algorithm will generate the exact solution. In this situation too, we shall consider the problem from the viewpoint of parameter analysis. We wish to know for which values of given parameters the heuristic solution will be optimal. These ideas will be illustrated in Chapter 5 by analyzing the greedy solution to knapsack problems. CHAPTER 2 FIRST FIT BIN PACKING WITH BIN SIZE AS A PARAMETER 2.1 Introduction In the usual analysis of a bin packing algorithm, the number of bins used by the algorithm is compared to the minimum number of bins possible assuming that the bins used in both cases are the same size. In this chapter we shall consider the result of using bins of size a for the first fit algorithm and bins of size 1 for the optimal packing. The items to be packed are assumed to be less than or equal to the minimum of a and 1 to ensure that both packings are feasible. For a given list of items, L, we denote by FF (L) the number of bins of size a used by the first fit algorithm to pack the items of L. We will call the packing of the items of L by the first fit algorithm the FF -packing of L and the optimal packing will be called the OPT ..-packing. OPT.. (L) will be used to denote the minimum number of bins of size 1 necessary to pack the items of L. The ratio FF (L)/OPT 1 (L) provides a measure of the effectiveness of using the first fit algorithm with bins of size a. We are interested in the worst case behavior of the algorithm, and we would like an upper bound U(ct) , depending on a but not on L, such that FF (L)/OPT n (L) < U(a) a 1 — for all lists L. However we shall settle for something slightly weaker. We will prove results of the form FFa(L) <_ U(a)OPT 1 (L) + C(a) where C(a) depends on a but not on L. The value of U(a) for the first fit algorithm we will denote by FF*(a). Roughly speaking FF*(a) represents the asymptotic upper bound of FF (L)/OPT (L) as the list L becomes arbitrarily large, where large refers to the number of bins required to pack L rather than the number of items in L. More pre- cisely FF*(ct) = lim sup (FF (L)/OPT (L) ) . OPT^L)-** a We shall provide examples giving a lower bound for FF*(a) for all a; and although we can only prove that FF (L) < FF*(a)OPT 1 (L) + C(a) a — 1 for certain values of a, we conjecture that this inequality does in fact hold for all values of a, when FF*(a) is the lower bound obtained by our examples. In section 2.2 we give some general properties of FF (L) . The difficult part of the analysis is in section 2.3 where a we prove that for certain values of a we can prove that FF (L) _< FF*(a)OPT, (L) + C(a) for the value of FF*(a) that we give. In the next section we give examples which we believe give asymptotically the worst case ratio FF (L)/OPT..(L) for certain values of a. In a 1 section 2.5, we give some reductions for the problem which extend the examples of section 2.4 to all positive rational numbers. A corollary to these reductions is that FF*(n) = 1/n + l/(n 2 + n - 1) for all integers n >_ 2 . By a limiting process, these results are extended in section 2.6 to all positive real numbers. 2.2 General Properties of FF a (L) We ordinarily normalize the size of the bins in the optimal packing to 1 for convenience and to provide a constant reference for comparison. Occasionally, however, we shall consider the problem with smaller bin size. We shall use the following lemma to make precise the effect of scaling. We denote the size of an item b by s(b). Lemma 2.2.1 . If L is any list of items of sizes less than or equal to 3 ^_ a > then there is a list L ' of items of sizes <_ a/3 < 1 such that FF (L)/OPT (L) = FF /n (L')/OPT (L') . a 3 a/3 1 Proof . The sizes of the items of L ' are just those of L divided by 3. That is, if L = (b ,b ,...,b ) then L 1 = (b ' ,b ' , . . . ,b ' ) and s(b.') = s(b.)/3- Thus the items of L fitting in bins of any size y correspond to the items of L f fitting in bins of size y/$. In particular FF (L) = FF /rt (L') and OPT (L) = OPT. (L ' ) . a a/3 3 1 Notice that if L is in decreasing order, then so is L' and thus the lemma holds for the first fit decreasing algorithm as well. The following result also holds for both the first fit and first fit decreasing algorithms and shows that as a grows larger, the worst case ratio of F (L) to OPT n (L) does not increase. a 1 Lemma 2.2.2 . If a < 3 and L is any list of items such that s(b) _< min(3,l) for all b e L, then there is a list L 1 of items such that s(a) <. min(a.l) for all a eL' and such that FF (L^/OPT^L') ^ FF (L)/OPT (L) . Proof . If L = (b 1 ,b , ...,b k ), we let L' - (b ' ,b ' , . . . ,b ') with s(b ') = s(b.)a/3. Then if s(b ) <_ 3, then s(b ') < 3a/3 = a and s(b.') < min(a,l) for all i. Then FF (L') = FF„(L) and OPT, (L 1 ) < i — a 3 1 — OPT (L) since if any set B C L is in a bin of size 1, then the corresponding set B' CL' will also fit in a bin of size 1. The worst case ratio, FF (L)/OPT (L), does not depend con- tinuously on a. This can be easily seen from a result of Johnson (1974) that FF (L) < (17/10)OPT (L) + 2. For any value of a less than 1 we can easily construct an example consisting of items all of size 1/2 for which FF (L) = 20PT (L) . Thus for a < 1, FF (L)/OPT..(L) can be > 2, while FF, (L) /OPT, (L) < 17/10 + 2/OPT. (L) a 1 — 1 1 — 1 However, we do have continuity on the right as evidenced by the following lemma. Lemma 2.2.3 . Given a list L, there exists a 6 > and a list L', which is a reordering of L, such that for all e < 6, FF , (L') = FF (L) . a+e a Proof . Let B ,B , ...,B be the bins of size a in the FF -packing of L. Define c. = min(s(b)) . beB. , j>i J Then c. > a - E s(b) for all i. Choose 6 = mln (c.-(a- E s(b))) 1 beB. l 0. If e < 6, then no aeB. can fit in a bin B., i < j since this would require J i E s(b) + s(a) _< a + e FF*(a), while FF*(a+e) <_ e+0+ FF*(a) for all e > 0. A similar proof can also be used for the first fit decreasing algorithm, but we shall have no use for the lemma for that algorithm. 2.3 An Upper Bound for Restricted a The examples and reductions in sections 2.4 and 2.5 will yield lower bounds for FF*(a) for all a, but the upper bounds seem much harder to prove. For a of the form 2n/(n+2), n an integer >_ 2, we can prove, using techniques similar to those of Johnson (1974), that for any list L, 10 FF (L) _< (1 + 1/n + l/(n 2 + n - l))OPT (L) + C(a) , 2 where C(a) depends on a but not on L. Thus FF*(a) < 1 + 1/n + l/(n +n-l) This generalizes Johnson's result since for n = 2, we obtain FF*(1) = 17/10. The examples showing the reverse inequality are in section 2.4. To carry out the proof, we need to define a weight function w(x) for xe[0,l], x representing the size s(b) of an item in L. 2 w(x) = f x if xe[0,a/(n +n) 1 n = ((n+l)/n)f x - l/(n 3 +n 2 -n) if x e (a/ (n 2 +n) ,a/(n+l) ] n 3 2 = f x + (n-l)/(n +n -n) if xe(a/ (n+1) ,a/n] = f R x + g n /j if xe(a/(j+l),o/j] n-l>J>l. ■ where f = (n+1) (n+2) /(2n 2 +2n-2) and g = (n-1) (n+2) /(2n 2 +2n-2) . n n The graph of w looks approximately as sketched in Figure 2.3.1. We will use s(B) to denote the sum £ s(b) and w(B) to denote beB the sum £ w(s(b)). Also we shall write w(b) for w(s(b)), thereby beB extending w to items as well as numbers. Finally, we define 2 F(a) = 1 + 1/n + l/(n +n-l) . Using this notation we state the following result, which we prove for n> 2. Lemma 2.3.1 . If s(B) <_ 1, then w(B) <_ F(a) for any bin B. Proof . Certainly if w(b)/s(b) < F(a) for all b in B, then w(B) £ F(a) s(B) < f(a). If w(b)/s(b) > F(a) , then we claim s(b) e (a/2, 1] or if n < 5, s(b) e (a/3,1]. To see this, we check that for xe[0,a/n], w(x)/x < F(a) : w 11 -> 7. ex ex. K-2. n-3 Figure 2.3.1 12 w(x)/x = f x/x = f < F(a) for xe[0,a/(n +n) ] n n w(x)/x = (f n (n+l)x/n-l/(n 3 +n 2 -n))/x < F(a) for x e (a/(n 2 +n) ,a/ (n+1) ] w(x)/x = f n +(n-l)/(x(n 3 +n 2 -n)) < F(a) for xe (a/(n+l) ,a/n] . If xe(a/(j+l),a/j], then w(x)/x = (n+l)(n+2)/(2n 2 +2n-2) + (n-1) (n+2) /(2jx(n 2 +n-l)) . If this is greater than F(a) , then since w(x)/x is largest for x approaching the left endpoint a/(j+l), we get (n 2 +3n+2)/(2n 2 +2n-2) + (n 2 +n-2) /(2jx(n 2 +n-l) ) > 1 + 1/n + l/(n 2 +n-l) = (n 3 +2n 2 +n-l) /(n 3 +n 2 -n) . Simplifying we obtain (n-1) (n+2) 2 (1+1/ j) > n 3 +2n 2 +n-l n 2 +3n+2 4n(n 2 +n-l) n(n 2 +n-l) 2(n +n-l) and (n-l)(n+2) 2 (l+l/j) > 4n 3 +8n 2 +4n-4 - (2n 3 +6n 2 +4n) . Solving for j we get j < (n 3 +3n 2 -4)/(n 3 -n 2 ) = ((n+2)/n) 2 . 2 2 Thus j <(5/3) < 3 for n >_ 3 while for n >^ 5, j < (7/5) < 2, and the claim established. If j-1, then s(B) < 1 implies s(B) - s(b) < 1 - a/2 = a/n. If there is a b ' in B such that s(b') e (a/ (n+1) , a/n) , then since 1 - a/2 - a/ (n+1) < a/(n 2 +n), 13 w(B) = f s(B) + g + (n-l)/(n 3 +n 2 -n) n n < f + g + (n-l)/(n 3 +n 2 -n) = F(a) . — n n 2 If all b' in B, except the one in (a/2,1], satisfy s(b') <^a/(n +n) , then w(B) = f s(B) + g < f + g < F(a) . If not, then the n n — n n 2 remaining items must be in (cx/n +n) ,a/ (n+1)) . Since the ratio w(b')/s(b ? ), for s(b') in this interval, is increasing, in the worst case there will be 1 or 2 items in this interval. Thus either (i) w(B) < f a/2 + g + (n+l)f (l-a/2)/n - 2/(n 3 +n 2 -n) — n n n or (ii) w(B) < f (l-a/(n+l)) + g + (n+l)f a/(n 2 +n) - l/(n 3 +n 2 -n) — n n n The following straightforward computations show that in either case w(B) <_ F(a) . (±) (n+l)(n+2) n + (n-1) (n+2 ) + (n+l) 2 (n+2)2 2 2(n 2 +n-l)(n+2) 2(n 2 +n-l) 2n(n 2 +n-l) (n+2) n(n 2 +n-l) (n+l)n (n-1) (n+2 ) + (n+1) 2 - 2 2(n 2 +n-l) 2(n 2 +n-l) n(n 2 +n-l) 2 2 n +n-2 n +2n-l _, s + ^ = F(a) 2 2 n +n-l n(n +n-l) (ii) f (l-a/(n+l)+a/n) + g - l/(n\n 2 -n) n n f (l+a/(n 2 +n)) +g - l/(n 3 +n 2 -n) n n f +g + 2(n+l)(n+2)n/(2(n+l)(n+2)(n 3 +n 2 -n)) - l/(n 3 +n 2 -n) n n f + g + (n-l)/(n 3 +n 2 -n) - F(a) . n n 14 If n _< 4 and j = 2, then B contains at least one b with s(b) > a/3. Since 1 < 8/6 = 4/3, B contains either 1 or 2 such b. Suppose there are 2. 1 - 2a/3 = 1/5 or 1/9 depending on 2 whether n = 3 or 4. In either case 1 - 2a/3e(a/(n +n) ,a/ (n+1) ] . If n = 3, then a = 6/5, 1 - 2a/3 = 1/5, f = 10/11 and g - 5/11. n n Thus w(B) _< (4/5) (10/11) + 5/11 + (1/5) (80/66) - 1/33 = 46/33 < F(6/5) . If n = 4, then a = 4/3, 1 - 2a/3 = 1/9, f = 15/19, and g = 9/19. n n Thus w(B) < (8/9) (15/19) + 9/19 + (1/9) (75/76) - 1/76 = 145/114 < F(4/3) Finally suppose that there is only one b with s(b) > a/3. Then the maximum ratio w(b')/s(b') is 10/9 for n = 3 for any b' ^ b in B. Hence w(B) < (10/9)(s(B)-s(b)) + w(b) < (10/9)(l-s(b)) + f s(b) + g /j — n n Since n = 3, we have f = 10/11, g = 5/11, and j = 2. n n w(B) < (10/9)(l-s(b)) + (10/11) (s(b)) + 5/22 = 10/9 + 5/22 - (20/99)s(b) Since s(b) > a/3 = 2/5, w(B) < 10/9 + 5/22 - (20/99) (2/5) = 83/66 < 47/33 = F(6/5) . 15 If n = 4, then there is at most one other item b' with s(b') > a/4. If there are none, the maximum ratio w(b)/s(b) is 15/16, so w(B) < (15/16) (l-s(b)) + f n s(b) + g n /j with i = 2 or 3. Since f = 15/19 and g = 9/19 we have n n w(B) < 15/16 + 9/(19j) + (15/19-15/16)s(b) . Now s(b) > a/(j+l) = 4/(3j+3), so w(B) £ 15/16 + 9/(19j) - 15/(76(j+l)) - 318/304 if j = 3 = 337/304 if j = 2 . In either case, w(B) < F(a) = 99/76. In the final case to consider, s(b) > a/3, s(b ') e(a/4,a/3] and for any other item b'' in B , w(b")/s(b") < 15/16. Hence w(B) < (15/16)(l-s(b»)) + f s(b) + g /j + f s(b') + g /4 . — n n n n j must be 3 since a/2 + a/4 = 1. Thus w(B) < (15/16) (l-a/3-a/4) + (15/19) (a/3) + 9/57 + (15/19) (a/4) + 9/76 = (15/16) (2/9) + 20/57 + 3/19 + 5/19 + 9/76 = 551/456 < F(a) . The point of this lemma is that for any bin of the OPT -packing w(B) <_ F(a) . In the next few lemmas we will examine w(B) for the FF -packing. We shall show that there is a bounded number of bins a for which w(B) < 1 in the FF -packing. The upper bound proof will follow quickly from this. 16 Lemma 2.3.2 Assume w(B) < 1 and let x = min s(b), for some bin B beB of the FF^-packing. If xe [a/(j+l) ,a/j ] , then s(B) <_ a - a/j, for j = 1,2,. . .,n-l. Proof . If x > a/2, then |b| = 1 and w(B) = f s(b) + g > f a/2 + g = 1 ' ' n n n n If j = 2, then |B| < 2. If |b| = 1, s(B) = s(b) = x < a/2 = a - a/j . If |b| = 2, then w(B) > 2(f a/3+g /2) > 1. — n n If 3 _< j _< n-1, then w(b)/s(b) >_w(a/j)/(a/j) = f n + g n /a . Thus w(B) > (f +g /a)s(B). If s(B) > a - a/j, then — n n — w(B) > (f n +g n /a)(a-a/j) = (af n +g n ) (j-1) /j > (2/3) (af n +g n ) , since j ^ 3. But then (2/3)(af n +g n ) = (n 2 +n-2/3)/(n 2 +n-l) > 1 , contradicting w(B) < 1. Corollary 2.3.2 . There are at most 2 bins B in the FF -packing with min(s(b)) > a/n and w(B) < 1. beB Proof . From the proof of the lemma, if min(s(b)) > a/n and w(B) < 1, beB then s(B) < a - a/3. Consequently for any bins B' to the right of B, min (s(b)) > a/3. But if min (s(b)) > a/3, we must have |b'| =1 beB' beB' and s(B') _< a - a/ 2. Thus all following bins must each contain one item of size greater than a/2 and there can be at most 2 bins with w(B) < 1 and min(s(b)) > a/n. beB 2 Lemma 2.3.3 . If min(s(b)) < a/(n +n) and w(B) < 1, then 2 beB s(B) < a - a/(n -Hi) . 17 2 Proof. w(b)/s(b) > f for all b. Thus if s(B) > a - a/(n +n) , — n — w(B) > f s(B) > f (a-a/(n 2 +n)) = 1. — n — n Corollary 2.3.3 . There can be at most one bin with w(B) < 1 and 2 min(s(b)) <_ a/(n +n) in the FF -packing. beB a Proof . Clearly if B is one such bin, no bin to the right can contain 2 an item of size less than a/(n +n) . Lemma 2.3.4 . If min(s(b)) z [a/ (n+1) ,a/n] and w(B) < 1, then beB s(B) _< a — a/n. Proof . If at least 2 items in B have size > a/n, then w(B) _> f s(B) + 2g /(n-1) > f (a-a/n) + 2g /(n-1) = (n +n+l) /(n 2 +n-l) > 1, n n — n n if s(B) >_ a - a/n. If all items are at most a/n in size, then s(B) > a - a/n implies that k a/n > a - a/n, where k = |b| . Hence k > n-1 and k >_ n. Thus w(B) > n(f a/ (n+1) + (n-1) /(n 3 +n 2 -n) ) = 1 — n and the only possibility is for there to be exactly one item b with s(b) > a/n. For this b let s(b) e (a/(j+l) ,a/j ] . Then w(B) = f n s(B) + (k-l)(n-l)/(n 3 +n 2 -n) + g^j If s(B) > a - a/n, then (k-l)a/n + a/j > a - a/n. Hence k > n - n/j . Thus w(B) > f (a-a/n) + (n-n/j-1) (n-1) /(n 3 +n 2 -n) + g /j m 2(n+l)(n-l)nj + 2(n-l) (jn-n-j) + (n-l)(n+2)n 2nj(n+n-l) 2jn(n 2 +n-l) 2jn(n 2 +n-l) 3 2 3 2 2jn +2jn -2jn+n +2j-n -4jn 2jn(n 2 +n-l) 18 3 2 _ 1 + n + 2 J~ n ~ 4 J n 2jn(n 2 +n-l) This will be greater than or equal to 1 if and only if 3 2 n + 2j ^ n + 4jn Since j _< n-1, this inequality holds if 3 2 n + 2n - 2 > n + 4n - 4n or equivalently if (n-3)(n-2) >. 2. Since this is true for n >_ 4, we need look only at the case n = 3. Then j must be 2 since s(b) > a/2 implies that w(B) _> 1. In this case s(B) > a - a/n = 2 a/3 = 4/5 and k > n - n/3 = 2. Thus w (B) > f 4/5 + 2/33 + g 11 = 67/66 > 1 . n n Corollary 2.3.4 . There can be at most one bin B in the FF -packing such that w(B) <1 and min(s(b) ) e [a/(n+l) ,a/n] . beB Proof . The proof is similar to that for Corollary 2.3.3. Lemma 2.3.5 . If min(s(b)) e[a/( (j+1) (iri-1)) ,a/(j (n+1) ) ) ] for some beB je {2,3, . . . ,n-2} and w(B) < 1, then s(B) £ a - a/(j (j+1)) . Proof . Since w(b)/s(b) >_ w(a/( (j+1) (n+1) ) ) /(a/( (j+1) (n+1) ) for all b in B, if s(B) > a - a/(j(n+l)), then w(B) > (n+l) 2 (n+2)2n(jn+j-l) _ (j+1) (n+1) (n+2) 2n(jn+j-l) 2(n 2 +n-l)n(n+2)j(n+l) n(n 2 +n-l) 2n(n+2) (n+1) j n(n+l)(jn+j-l)-(j+l)(jn+j-l) 2 jn(n +n-l) 2 2 2 2 (j-l)n+l-n -j +jn -j n 3, . 2 jn +jn -jn 19 2 2 2 2 Thus w(B) _> 1 if jn + jn + 1 >_ n + n + j + j n. This inequality 2 will be satisfied if jn(n+l) >^ (n+j ) (n+1) , which is true for all j _< n-1. Since j _< n-2, the lemma follows. Corollary 2.3.5 . There are at most n-3 bins B in the FF -packing for which w(B) < 1 and min(s(b) ) e [a/( (n-1) (n+1) ) ,a/(2n+2) ] . beB Proof . It follows from Lemma 2.3.5 that there is at most one such bin in each interval [a/(( j+1) (n+1)) ,a/( j (n+1) ) ] and there are n-3 such intervals . 2 2 2 Lemma 2.3.6 . If min(s(b) ) e [a/( j+1) ,a/j ] , j = n -l,n ,...,n +n-l and beB w(B) < 1, then s(B) _< a - a/j . Proof . If s(B) > a - a/j, then since min (w(b)/s(b)) occurs for the beB smallest b in B, we have w(B) > s(B)w(a/(j+l))/(a/(j+D) > (a-a/j)((n+l)f n /n-(j+l)/(a(n 3 +n 2 -n)) = ((j-D/j)(2(n+l) 2 n-(j+l))/(2n(n 2 +n-l)) This expression is greater than or equal to 1 if and only if (j-l)(2(n+l) 2 n-(j+l)) > 2nj(n 2 +n-l) which is equivalent to j(2n 2 +4n) + 1 > 2n 3 + 4n 2 + 2n + j 2 . For j in the range of the hypotheses this inequality is valid as can 2 2 be checked by letting j = n -1 and n +n-l since the polynomial is quadratic in j . 20 Corollary 2.3.6 . There are at most n+1 bins B in the FF -packing 2 2 with w(B) < 1 and min (s(b))e[a/(n +n-l),a/(n -1) ] . beB Proof . By the lemma, we can have at most one such bin in each interval [a/(j+l) ,a/j ] and there are n+1 such intervals. Lemma 2.3.7 . If w(B) <1 and min (s(b))e [a/(2n+2) ,a/(2n) ] , then beB s(b) _< a - a/(2n) . Proof . w(b)/s(b) > w(a/(2n+2))/(a/(2n+2)) so if s(B) > a - a/(2n) we must have w(B) > (a-a/(2n))((n+l)f /n-(2n+2) /(n(n 2 +n-l)a) ) n ,2n-l_ r (n+l) 2 n-2(n+l) s ( 2n M , 4 3 , 2 ; 2n +2n -2n 3 2 n -2n -3n+2 4 3 2 2n +2n -2n 3 2 which will be > 1, if n - 2n - 3n + 2 >_ 0. But this is true for n _> 3. Corollary 2.3.7 . There is at most one bin B in the FF -packing with w(B) < 1 and min (s(b) ) e[a/(2n+2) ,_a/(2n), w(b)/s(b) >_ w(a/(2n))/(a/(2n)) . Hence if 2 2 s(B) > a - a/(n+2) = (2n +2)/(n+2) , we have w(B) > s(B)w(a/(2n))/(a/(2n)) , and W(B )> M^±ii ( W) 2 (^2) _ AlfL^ ) (n+2) 2n(n +n-l) n(n +n-l) 21 Thus 3 3 -2 (n+1) m n +3n ■ (n+2) (n 2 +n-l) n 3 +3n 2 +n-2 ru\ s (n+1) -2 (n+1) n +3n +n-l w(B) > 2 — 3 2 ' contradicting w(B) < 1. Corollary 2.3.8 . There is at most one bin B with w(B) < 1 and min (s(b))e[a/(2n) ,a/(n+2) ] in the FF -packing. beB a Lemma 2.3.9. Let B,,B_,...,B be the bins, in order of the FF -packing 1 2 p a that satisfy w(B) < 1 and min (s(b) ) e [a/ (n+2) ,a/(n+l) ] . Then beB p-1 ? Z (l-w(B.)) < (n-l)/((n+l)(n +n-l)) . i=l X Proof. Let B be one of these bins other than B . Then if B contains P an item b with s(b) > a/n, for any other item in B w(b)/s(b) > w(a/n)/(a/n) s(B) > a - a/ (n+1). Hence w(B) > (a-a/(n+l)-s(b))(f +(n-l)n/(n(n 2 +n-l)a)) n + s(b)f n + g n /j where a/(j+l) < s(b) <_ a/j . Hence w(B) > (a-a/(n+l)f + (a-a/(n+l) ) ((n-1) /(n 2 +n-l)a) n + g n /j - s(b)(n-l)/((n 2 +n-l)a) Simplifying and using the fact that s(b) j< a/j, we get 22 W ( B ) > 2n 2 (n+l)(n+2) + n(n-l) + (n-1) (n+2) n-1 Thus (n+2)(n+l)2(n 2 +n-l) (n+1) (n 2 +n-l) 2j(n 2 +n-l) j(n 2 +n-l) w(B ) > n 2 (n+l)+n(n-l) + n 2 +n-2-(n-l) (n+1) (n 2 +n-l) 2j (n 2 +n-l) n +2n -n n -1 (n+1) (n 2 +n-l) 2j (n 2 +n-l) Since w(B) < 1, we must have 2 3 2 n-1 n +2n -n n-1 2 3 2 3 2 2j (n +n-l) n +2n -1 n +2n -1 and n+1 1 2j n+1 This inequality cannot be satisfied since j < n. As a result of this computation, we know that max (s(b)) _< a/n. beB Suppose that |b| _> n+1. Then ,_. % (n+l)a(n +l) 2 (n+2) n+1 w(B) > (n+2)2n(n 2 +n-l) n(n 2 +n-l) 2 2 _ (n+1) (n +2n) = n +n > (n+2) (n 2 +n-l) n 2 +n-l Suppose |b| <_ n-1. Then s(B) _< (n-l)a/n =a-a/n < a - a/(n+l). Hence each B contains exactly n items. For convenience of computation we shall replace all items in B. for which s(b)e [a/(n+2) ,a/(n+l) ] by items of size a/m. , where a/m. is the average size of these items. This change affects neither w(B) nor s(B) , and if s(B) > a - min(s(b)), beB. 23 then certainly s(B) > a - a/m. . If for s(x) = rain (s(b)), x beB ,j>i will not fit in B . , then certainly no item of size J a/m. will fit for i J j > i. Also we can replace each item b in B . with s(b) e(a/(n+l) ,a/n] with an item of size equal to the average, a/t., of the sizes of such items. Again s(B) and w(B) are unchanged. We claim that m. > m. if i > i. To see this we let k. be the number of items of size a/m. and I. be the number of items of size l l a/t. for 1 < p-1. If m. < m., then we would have l - K i - j s(B) > a - a/m. _> a - a/m. and a(n+l)f , . w(B) = k.< -i - — ^ ) + £.(f f + — f±— ) i m.n . I s it. n , 2, 1N i n(n +n-l) l n(n +n-l) k.(n+l) 2 £.(n+l) £.(n-l)-k. + ^ + 2 2 2 m.(n +n-l) t . (n +n-l) n(n +n-l) k.(n+l) A.n £.n-(£.+k.) (- + - J ~) + 2 , .. m . t . , 2 , _ x n +n-l i i n(n +n-l) Now s(B) = (k./m.)a + (£./t.)a > a - a/m. and so k./m. + I. It. > 11 ii— l liii — (m.-l)/m.. Thus m.-l k. £.-1 w(B) > -= (n( ) + — -) + 2 m. m. 2 n +n-l i in +n-l (n+l)n(m.-l)+k.(n+l)+(£.-l)m. ii ii 2 m. (n +n-l) 24 Since w(B) < 1, we must have 2 2 2 n m. + nm. - n - n + k.(n+l) + SL. - m. -m. n+1, so l 2 (n+l)k. + H.m. < n + n l ii (n+l)(k.+£.) = (n+l)n < n 2 + n which is impossible. Thus m. > m. for all j > i Now ,_ . . k i a (n+l) 2 (n+2) ' £ i a (n+1) (n+2 ) *1 X w(,r> . ; - r + — = + — = 1 m i 2n(n 2 +n-l) t ± 2(n 2 +n-l) n 2 +n k.(n+l) £..n l.-l **. ( _2±1 + JL) + and — 2 m. ... m. 2 n +n-l i+I i n +n-l (n+1) (nm.m. , -nm.+k.m. ,, )+(£,.-l)m.m. , , -, /T , \ n i i+l i i i+l i i i+l l-w(B.) < 1 - r m.m. , , (n +n-l) i i+l 2 2 2 m.m. in n +m.m. in n-m . m . , -n m.m #11 +n m. -nk . m . . .. , ,„ v 1 1+1 1 1+1 1 1+1 1 1+1 1 1 1+1 l-w(B ) < 2 m.m - (n +n-l) -m.m. . , n+m.n-k .m. , .-I .m.m. , .,+m.m. , n l i+l l l i+l i l i+l l i+l 2 m. (m. , , (n +n-l) l i+l 25 n m . -nk . m . , . +m . n-k .m. , -£ . m . m . 1 1 i+l i i i+I i i l+l 2 m.m. ,, (n +n-l) l i+l Let 6 = m. - m #11 . Then l i+l 2 l-w(B.) n m.-nk. (m.-6)+m.n-k. (m.-6)-£ .m. (m.-6) 1 £/x .x 1 111 11111 g = f Co; = 2 m.(m.-6)6(n +n-l) 2 2 n m.-nk. m.+m.n-k.m.-£ .m.+6 (nk .+k.+£ .m. ) l ill 1111 1111 2 m.(n +n-l) (ra.-6) 6 2 2 Let a = n m.-nk.m.+m.n-k.m.-Jl .m. l ill 1111 b = nk.+k.+£.m. 1111 / 2 c = m. (n +n-l) Thus f(6) = (a+b6)/(c6(m-6)). Claim : a < . Proof of claim , a will be less than if and only if 2 2 nm. +nm. n+1 so a < if l n(n+l) < (n+l)k. + (n+l)£. = n(n+l) — l l which is certainly true. 26 We want to obtain an upper bound on f(6), and to do so we need to know where f may attain its maxima. We compute the derivative first. c6(m.-S)b-(a+b6) (cm.-2c6) f'(6) = (c6(m-6)) 2 For < 6 < 1, f '(6) > since (m-6)b6 > (a+b6)(m-26) This is true since a < implies b6 > a+b6 and since m-6 > m-26 . Since f'(5) > on this interval, the maximum value will occur when 6 is as large as possible. This occurs if m , is as small as possible, but m _ > n+1 so we can obtain a bound by choosing 6 = m. - (n+1) . Then 2 2 n m.-nk.m.+m.n-k.m.-£ .m.+(m.-n-l) (nk.+k.+£ .m. ) r/x . N l ill 1111 l 1111 £(o; = 2 m.(n +n-l)(m.-(n+l))(n+l) m. (n 2 +n)-k. (n 2 +2n-l)-£.m. (n+1) 2 m.(n +n-l) (m.- (n+1) (n+1) m.n-k.(n+l)-£.m. m. (k.+£ .)-k. (n+l)-£ .m. 1111 1111 li m.(n 2 +n-l)(m.-(n+l) m.(n +n-l) (m.-(n+l) ) k. . i n-1 m.(n 2 +n-l) (n+1) (n 2 +n-l) The point to be made here is that 27 l-w(B ) f(6 .) = 1 < n ~- Hence 1 6 i (n+l)(n 2 +n-l) l-w(B ± ) < (n-l)6./((n+l)(n 2 +n-l)) and P-l o P-l Z (l-w(B.)) < (n-l)/((n+l)(n +n-l) ) I 6. 1=1 * " 1=1 1 = (n-l)( mi -mp)/((n+l)(n 2 +n-l)) < (n-l)/((n+l)(n 2 +n-l)) . Thus while we cannot put a bound on the number of bins B. for which l P w(B.) < 1, we can put a bound on E (l-w(B.)), regardless of how i=l 2 big p can be. Since w(B ) > (n-1) /( (n+1) (n +n-l)), we can add P 1 - w(B.) to each w(B.) and subtract l-w(B.) from w(B ) for each i 11 l p and claim that there is at most 1 bin B with min (s(b)) e [a/(n+2) ,a/(n+l) ] beB and w(B) < 1. Corollary 2.3.9 . There are at most 2 bins B with w(B) < 1 and min (s(b)) e [a/(2n) ,a/(n+l) ] intheFF -packing. beB a Proof . There is at most 1 bin with smallest size in the interval [a/(2n) ,a/(n+2) ] by Lemma 2.3.8. If we perform the modification men- tioned at the end of the proof of Lemma 2.3.9, then there will be at most 1 bin with smallest size in [a/(n+2) ,a/(n+l) ] . Theorem 2.3 . If a = 2n/(n+2), n an integer 21 2, then FF*(a) < 1 + 1/n + l/(n 2 +n-l) . 28 Proof . From Lemma 2.3.1, for any bin B in the OPT- -packing, w(B) < 1 + 1/n + l/(n 2 +n-l) . From the corollaries to Lemmas 2.3.2 to 2.3.9, we know that except for a fixed number of bins, depending only on n and hence a, we have w(B') >^ 1 for any bin B' of the FF -packing. If we let the number of possible exceptions be C(a) , then we have Z w(b) _< OPT (L)(l+l/n+l/(n 2 +n-l)) beL and E w(b) > (FF a (L)-C(a)) . beL Combining these inequalities FF (L) < OPT n (L)(l+l/n+l/(n 2 +n-l)) + C(a) . a — 1 Since C(a) is independent of L, as OPT (L) approaches infinity, we obtain FF (D/OPT, (L) < 1 + 1/n + l/(n 2 +n-l) + C(a) /OPT.. (L) a 1 — 1 2 which approaches 1 + 1/n + l/(n +n-l) , i.e. lim sup (FF (L)/OPT (L)) < 1 + 1/n + l/(n 2 +n-l) . OPT (L)-*» a 2.4 The Case When a Is an Integer So far we have shown that when a has the form 2n/(n+2), then 2 FF*(a) _< 1 + 1/n + l/(n +n-l) . In this section we shall construct 2 examples showing that for any integer n, FF*(n) _> 1/n + l/(n +n-l) . In the next section, we show how to reduce from one rational number 29 to a "simpler" one in such a way that these examples extend to all rational numbers. One consequence of the reduction will be that 2 FF*(n) = 1/n + l/(n +n-l) for any integer n >^ 2. For notational convenience we will give separate constructions for n even and n odd. With the hope of making the examples as understandable as possible, we show examples for n = 2 and n = 3 before writing down the general expressions. For n = 2, we will have three different types of items. Items 4K a,, a ,...,a, will have sizes 1/3 + e/2, 1/3 - e/4, ..., 1/3 - e/2 where e is a small positive number to be determined later. Items 4K b 1 ,b , . . . ,b will all have size 1/3 - e/2 . Items c ,c ,...,c, 4K will have sizes 2/3 + e, 2/3 - e/2, ..., 2/3 + e/2 and items 4K c, _,..., c will have size 2/3 + 2/ . Then s(a.) + s(c i+1 ) =1 for i = 1,2, ...,4K s(b.) + s(C /vl .) =1 for i = 2,3, ...,K . l 4K+x Hence OPT.. (L) = 5K + 1, since b and c. are in separate bins. If L is ordered in the following manner, a 1 ,a 2 ,a 3 ,a 4 ,b 1 ,a 5 ,a 6 ,a 7 ,a 8 ,b 2 ,...,b K ,c 1 ,c 2 ,...,c 5K then for e small enough the FF -packing will result in the i-th bin containing a.. ~,a.. „,a._ . ,a. . and b. for i = 1,2, ...,K and 4i-3 4i-2 41-1 4i i c _ ,c for i = K+ j , j = 1,2, . . . , [5K/2J . Hence FF (L) >_ K + 5K/2 and 30 FF 2 (L)/OPT 1 (L) > 7K/(10K+2) . We can conclude that FF*(2) _> 7/10. The only restriction needed on e is that 5e/16 < 1/3 to ensure that the first bin can be packed as described above. For n = 3, we need four different types of items. Items 30K a..,a , ...,a will have sizes 1/4 + e/2, 1/4 - e/4, ..., 1/4 - e/2 Items b. ,b , ...,b will have sizes 1/4 + e/2 , 1/4 - e/2 , ..., 1/4 - (-1) e/2 . Items c. ,c , . . . ,c~„ will have sizes 3/4 + e, 22K— 1 3/4 - e/2, ..., 3/4 - e/2 ' . Items d..,d„,...,d - will have sizes 3/4 + e/2 22K , 3/4 - e/2 22K+ \ ..., 3/4 - (-l) K e/2 33K_1 . Then s(a.) + s(c i+1 ) =1 for i = 1,2, . . . , 22K-1 sCa^ + s(d i _ 22K+1 ) =1 for i = 22K,...,30K s(b.) + s(d 8K+1+ .) =1 for i= 1,2,...,3K-1. Thus 0PT 1 (L) = 33K +1. If L is ordered in the following manner a 1 ,a 2 ,...,a 10 ,b 1 ,a 11 ,a 12 ,...,a 20 ,b 2 ,...,b 3K ,c 1 ,c 2 ,d 1 ,c 3 ,c 4 ,d 2 ,...,d 11K then the i-th bin of the FF -packing contains a 10i-9' a l0i-8'"-> a 10i' b i for ± = 1.2,. ...3K and c 2'-l ,C 2i' d ' f ° r i = 3K+ ^' J = i* 2 '"^ 111 ^ • Thus FF (L) = 14K and FF (L) /OPT (L) = 14K/(33K+1) showing that FF*3) >_ 14/33. e/2 < 1/4 is sufficient to make the example valid. More generally, we let e be a positive number less than l/(n+l). If n is even, let L consist of the following items: 31 a. with s(a.) = l/(n+l) - (-l) i e /2 1 , i = 1,2, . . . , (n 2 +n-l)K b. with s(b ) = l/(n+l) - e /2 (n +n_2 ) K ) i = 1,2,...,K c. with s(c.) = n/(n+l) - («l) X e/2 , i = 1, 2, . . . , (n +n-2)K 2 c. with s(c ± ) = n/(n+l) + e/2 (n +n ~ 2 > K t ± = ( n 2 +n-2)K+l, . . . , (n 2 +n-l)K Then s(a.) + s(c. L1 ) = l/(n+l) - (-1) 1 e2~ 1 + n/(n+l) - (-l) 1+± e2" 1 2 =1 for i = 1,2, . . . ,(n +n-2)K and s(b.) + s(c ~ ) = 1 for i = 1,2,...,K-1. 1 (n +n-2)K+i If L is ordered in the following manner, 3-]» a 7 >«'»» a 'j >b,,a„ ,...,a „ ,b,... ,b ,c,c,...,c „ 1 Z n +n-l X n +n 2(n +n-l) Z X Z (n +n-l)K then the i-th bin of the FF -packing will contain a y ,a„ ,...,a„ ,b i(n +n-l)-(i-l) i(n +n-l)-(i-2) i(n +n-l) X if i < K and C nj-(n-l)' C nj-(n-2)' •' °nj 2 if i = K+j, j = 1,2, .. ., l(n +n-l)K/nJ . Thus FF (L) > K + ((n +n-l)/n)K = (n +2n-l)K/n a — and FF*(a) > (n 2 +2n-l)/(n(n 2 +n-l)) = 1/n + l/(n 2 +n-l) , and FF*(a) > (n 2 +2n-l)/(n(n 2 +n-l)) = 1/n + l/(n 2 +n-l). 32 If n is odd, then L consists of the following items: a ± with s(a ) = l/(n+l) - (-1) e/2 1 , i = 1, 2, . . . ,n(n 2 +n-2)K b. with s(b.) = l/(n+l) - ( _ 1) i e/2 n(n 2 +n-2)K+i ) i = 1,2, . ..,nK c ± with s( Ci ) = n/(n+l) - (-l) 1 e/2 1 " 1 , i = 1,2, . . . , (n-1) (n 2 +n-l)K 2 j n.t. /j\ // ,n / n i ,„(n-l)(n +n-l)K+i d. with s(d.) = n/(n+l) - (-1) e/2 , i = l,2,...,(n 2 +n-l)K Then s(a.) + s(c,,.) = 1 - (-l) i e/2 1 + (-l) 1 e/2 1 = 1 2 for i = 1, 2,...,(n-l)(n +n-l)K - 1, s(a.) + s(d 2 ) = 1 i-(n-l)(n +n-l)K for i = (n-l)(n 2 n-l)K,...,n(n 2 +n-2)K, and s(b ) + s(d 2 ) = 1 1 i+l+K(n -n-1) for i = 1,2, . . . ,nK-l. Hence OPT (L) = n(n 2 +n-2)K + nK + 1 = n(n +n-l)K + 1, If L is ordered in the following manner, ai ,a 2 ,...,a » b !» a 2j '•'•' a 0/ 2^ . ' b 2' , "' b nK ' n +n-l n +n 2(n +n-l; c 1 ,c 2 ,...,c n _ 1 ,d 1 ,c n ,c n+1 ,...,c 2(n _ 1) ,d 2 ,...,d 2 (n +n-l)K 33 2 then the i-th bin of the FF -packing will contain a i(n 2 +n-l)-(i-l)' i(n 2 +n-l)-(i-2)' i(n 2 +n-l) 1 for i _< nK and C (n-l)j-(n-l)' C (n-l)j-(n-2)' "" °(n-l)j' d j 2 for i = nK + j, j - l,2,...,(n +n-l)K. Thus 2 2 FF (L) = nK + (n +n-l)K = (n +n-l)K a and FF*(a) > (n 2 +2n-l)/(n(n 2 +n-l)) = 1/n + l/(n +n-l) We have proved the following theorem. Theorem 2.4.1 . If n is an integer >_ 2, then FF*(n) >^ 1/n + l/(nN-n-l) 2.5 Reductions In this section we obtain lower bounds for FF*(a) for all rational numbers a. These bounds will be obtained by reducing from a to a' where a' is a rational number with denominator less than that of a. Theorem 2.4.1 provides an answer if the denominator is 1, at which time the process terminates. Application of Theorem 2.3.1 will allow us to conclude that when a is an integer or a rational number of the form 2n/(n+2), n an integer >_ 2, then FF*(a) is given by the lower bounds our examples have attained. If a is not a rational number, the results also hold, but the process will not terminate in a finite number of steps. Rather it will converge to a lower bound for FF*(a) . 34 Case 1 . a < 2. Suppose first that a has the form 2/n, n an integer >_ 2. In this situation, we can construct the list L = (b. ,b 9 , . . . ,b ,a ,a „, •••' a l,n-r a 2,r a 2,2'"" a 2,n-l"-" a k,n-l ) where ^^.j) = 1/n + e where e is chosen to be small enough that 1/n - e(n-l) > 0. Then n-1 E s(a..) = (n-l)/n+ (n-l)e <1 . 3-1 1J By Lemma 2.2.1, given a list L fl , we can construct a list L' such that FF 2/n (L») FF (2/n)/(l/n-(n-l) e ) (L,,) OPT,, , .. (L') 0PT.(L") l/n-(n-l)e 1 As e approaches 0, the right side of this equation can be made to approach FF*(2) by appropriate choice of L". In particular we can choose e, 6 and L' 1 so that FF (L")/0PT (L") > FF*(2) - 6 where x = (2/n) /(1/n - (n-l)e). For these choices of e, 6, L' 1 we let (b. ,b „,..., b ) = L 1 . Since both k and OPT (L) can be made arbitrarily large, we obtain FF (L) = (n-l)k + k(FF*(2)-6). Also a OPT, (L) = k since each bin of the OPT, . , . N -packing of L' can 1 1/n - (n-l)e be combined with n-1 items of size 1/n + e to obtain a bin of size 1. Thus FF*(a) >_ n - 1 + FF*(2) - 6 and FF*(a) > n - 1 + 7/10 . 35 Suppose now that 2/a ^ L2/aJ = n. Then, in a similar way, L = (b 1 > b 2>'-" b k' a l,l' a i,2"*" a l,n' a 2,l"-" a k,n ) with s(a. .) = a/2 + e so that each a. . will be in a separate bin of the FF -packing. In the optimal packing, n of these can be placed in a single bin of size 1, with a remainder of l-n(a/2+e) . Thus e must be chosen small enough that this quantity is positive. Then choose the b.'s to form a list L 1 with 1 FF (L') FF ... , ... vx(L") a a/ (l-n(a/2+e)) 0PT i ( /oj. ^ L '> OPT-CL") l-n(a/2+e) 1 and with e, L'', 6 chosen so that this ratio is at least FF*(a/(l-na/2))-6 As before FF*(a) > (nk+k(FF*(a/(l-na/2)-6))/k and FF*(ct) >. n + FF*(a/(l-na/2)) . Thus we have proved the following result. Lemma 2.5.1 . (a) If a = 2/n, n an integer >^ 2, then FF*(ct) >_n - 1 + 7/10 (b) If 2/a + [2/aJ = n >_ 1, then FF*(a) >_ n + FF*(a/ (l-na/2) ) . Case 2 . a > 1, a not an integer. Let La J = n, and let L = (b , . . . ,b ,a , . . . ,a ) with each -L l J. K s(a.) = a/(n+l) + £ and L' = (b ,...,b ) constructed so that 36 FF (L f ) TV > FF*(a/(l-(a/(n+l))) - 6 ° PT l-(a/(n + l) +£ ) (L,) - By appropriate choice of £ this can be done by the method used in Case 1. Then FF a (L') > 0PT 1 _ (a/(n+1)+e) (L')(FF*(a/(l-a/(n+l)))-6) , and choosing k and L ' so that OPT., , ., ,, Xl ,(L') = k we have l-(a/(n+l)+e) FF (L) > k(FF*(a/(l-a(n+l)))-6) + k/n . a — Since OPT (L) = k, we have the following result. Lemma 2.5.2 . If a > 1 and a is not an integer, then FF*(ct) > 1/n + FF*(a/(l-a/(n+l))) , where n = [a J . Consider now the special case a = 2k/(k+2), k an integer > 2 By Lemma 2.5.2, since [2/a J = L(k+2)/kJ = 1, FF*(a) > 1 + FF*(a/(l-a/2)) = 1 + FF*(k) > 1 + 1/k + l/(k 2 +k-l) by Theorem 2.4.1. But by Theorem 2.3.1, FF*(a) < 1 + 1/k + l/(k 2 +k-l) . Hence for a of this form we know exactly what FF*(a) is. Moreover, if n is an integer >_ 2 and we let a = 2n/(n+2), then by Lemma 2.5.2, FF*(a) > 1 + FF*(n) 37 Since 2 FF*(a) = 1 + 1/n + l/(n +n-l) we see that 2 FF*(n) < 1/n + l/(n +n-l) and combined with Theorem 2.4.1, we get FF*(n) = 1/n + l/(n 2 +n-l) for any integer n j> 2. We state these results in the following theorem. Theorem 2.5.1 . If n is an integer >^ 2, then (a) FF*(n) = 1/n + l/(n 2 +n-l) (b) FF*(2n/(n+2)) = 1 + 1/n + l/(n 2 +n-l). 2 .6 Conclusions In section 2.5, we showed how to reduce from a to a ' . If a = 2/n, n an integer, the lower bound expression was already explicit If a < 1, but not of the form 2/n, then a/ (l-(a/2) ( [2/a J) ) > 1. Thus if the procedure terminates for all rational numbers a > 1, it will terminate for all rationals. For a > 1, a = (kn + t)/n, < t < n, we have a kn+t 1-a/fal n(l-(kn+t)/(n(k+l)) - (kn+t) (k+1) _ (kn+t) (k+1) n (k+1) -(kn+t) n-t Thus the denominator of a ' , the number to which a is reduced, will be less than that of a. Thus within n steps we will reach an integer for 38 which we can compute FF* exactly. Thus by our lemmas we have a pro- cedure for obtaining a lower bound for FF*(a) for all rational numbers a. Now suppose that a is a real number. Applying the same procedure we will obtain 2 a' = a/(l-a/ fal) = a fal/( fal-a) > a Since FF*(a) _< 2/a, for any a, the sequence ®t\ '^i *^'9» • • • 2 where a~ = a, and a. , = a . / (1-a . / [a . 1) satisfies FF*(a. ,) <_ 2/a . , < 2/a., CO Thus lim FF*(a .. ) = and £ 1/ [a . J converges to a limit L with FF*(a) > L. We conclude that applying Lemma 2.5.1 and Lemma 2.5.2 to any real number a > produces a sequence of lower bounds which converges, and if a is rational, terminates in a finite number of steps. Although we have proved that this lower bound is also an upper bound only for the special cases a = n or a = 2n/(n+2), n an integer _> 2, we conjecture that the lower bounds we have given are in fact the values of F*(a) for all a. To prove this would seem to require showing that the reductions of section 2.5 are in some sense "worst possible." This seems to be possible by a proof similar to that of Theorem 2.3.1; however, the weight function to use is not obvious and would probably be quite complicated. 39 CHAPTER 3 FIRST FIT DECREASING BIN PACKING WITH BIN SIZE AS PARAMETER 3.1 Introduction In the preceding chapter we examined the effect of bin size on the first fit bin packing algorithm. Now we turn our attention to the case where the items are sorted in decreasing order before applying the first fit algorithm. This algorithm is called the first fit decreasing algorithm; and if the size of the bins is a , we call the packing the FFD -packing of the list of items. As in the preceding chapter we wish to compare the number of bins of size a used by the FFD -packing of a list L, denoted by FFD (L) , to OPT n (L) . a a 1 As in the preceding chapter, our results will have the form FFD (L)/OPT,(L) < FFD*(a) + C(a) /OPT n (L) , where FFD*(a) and C(a) are a 1 — 1 independent of the list L. We will describe FFD* (a) exactly for < a < 3 and give lower bounds for FFD* (a) for a > 3. A discussion of the relationship between these results and those of Coffman, Garey and Johnson (1978) is given in section 3.5. All of the proofs of the upper bounds for FFD*(a) are similar. We assume that M is a counterexample with minimum number of items. In that case, the last item, m, in the list — the smallest one — will be placed alone in the last bin. If there were more items in the last bin, we could omit from M all items after the first item was placed in the last bin without changing OPT (M) . This would produce a smaller counterexample. If s(m) _< a - 1/F(a) , then every bin but the last 40 in the FFD -packing will be filled to at least level 1/F(a) . Hence Z s(x) > (l/F(a))(FFD (M)-l) xgM But E s(x) _< OPT (M) , xeM and we see that FFD (M) /OPT. (M) < F(a) + 1/OPT (M) . This inequality a 1 1 would contradict our hypotheses if F(a) is the value we are claiming is FFD*(a) • Consequently we can define A = s(m) - (a-l/F(a)) and if M is a minimum counterexample, A > 0. We say that a bin B in the FFD -packing dominates a bin B' in the OPT., -packing if there exist orderings (b ,b~, . . . ,b ) of B and (b 1 ',b * ...,b. ') of B', k >_ j and s(b.) > s(b. ') for i = 1,2, ...J. Then, as observed in Coffman, et. al . (1978), if M is a minimum counterexample and FFD* (a) ^L 1> then no bin B in the FFD -packing can dominate any bin B' of the OPT.. -packing. Intuitively, we could then take out the items of B, reducing FFD (M) by 1, and replace these items in their OPT bins by the smaller items of B, and reduce OPT (M) by 1, producing a smaller counterexample. The FFD -packing produces two different kinds of bins which we shall call regular and fallback bins. A bin B is a regular k-bin or a bin of type X, , if |b| = k and if no item is placed in a bin to its right before all k items replaced in B. A bin B is a fallback k-bin , or a bin of type Y , if there are k items in B when the first item is placed to its right and |B| > k. The additional items are called fallback items. Items of a regular k-bin will be 41 called X,- items or items of type X, . The first k-items of a fallback k-bin will be called Y -items or items of type Y if k > 1. Types Y and Y n 9 will be used to denote the first item and the fallback items respectively in bins of type Y 1 . Fallback items in other than bins of type Y will be classified as type X., where j will depend on the size of the item. For most of our proofs, we will be interested in FFD (L)/OPT (L) as OPT.. (L) becomes very large, and we can safely ignore a few exceptional bins. These will be, in general, the last bin of each type. Let t = l/FFD*(a) - A, where s(m) = a - l/FFD*(a) + A. For all items b in a bin of type X, , except possibly the last, s(b) > t/k. For the last bin, we can only say that Z s(b) > t, so that the average beB size is > t/k. If, in fact, any item is smaller than t/k, we will call the bin of type Z , and we will be concerned with these bins only in determining the bounds on C(a), the constant in the formula FFD* (a) + C(a)/OPT (L). Similarly in the case of fallback k-bins, with the exception of the last bin of type Y , for any b in B, s(b) > a/(k+l). If, in the last bin, one of the Y -items satisfies k s(b) t/2. This can only happen if there is no Z.-bin, and there can be at most one such bin. In all interesting cases, there will only be one fallback item in each fallback bin. However, there can be more. In the cases k >_ 3, a _< 2 after the Y, -items are packed, the bin is filled at least to level 3a/4, while the minimum size item will always be bigger than a/8, 42 Consequently, there can be at most one fallback item since 3a/A + 2a/8 = a. The same result holds for k = 2 unless there are items of size < a/6. When we define the weight function, it will be a simple matter to modify the definition to handle this case. For k = 1, we shall have to treat each case separately. We define a weight function on the set of items where the weight assigned will depend on its type and size. We define w(X, ) = t/k, where X, represents any item of type X, . If b is an item of type Y , k > 1, and the bin containing b in the FFD -packing contains k items of type Y and one item f such that t/j < s(f) <_ t/(j-l), then f is assigned weights in any manner, so long as E w(b) = t and beB w(b) < s(b). Since E s(b) > t, this is always possible. Thus, for beB all bins that are not exceptional E w(b) = t, and the point of the beB weight function is that for most bins B' of the OPT., -packing, w(b) _< 1 - FFD* (a) A. We will thus be able to prove that t(FFD (L) - C(oO) < E w(b) < OPT, (L) (l-FFD*(a) A) and "beB " X (FFD (L)-C(o))/OPT 1 (L) < (l-FFD*(a)A)/t a 1 — = FFD*(a) . We shall find it convenient to write w(T) , where T is a type of item, to mean the weight of an item of type T. Similarly, we will refer to s(T) to mean the minimum size possible for an item of type T. The final comment we wish to make before beginning the case analysis is that for 1 _< a < 2 and for any bin B in the OPT -packing of the minimum counterexample, |b| 2l 3. ( It: is convenient to refer to both the bin and the set of items in the bin as B.) For if |b| =1, 43 then we certainly have B dominated by the bin in the FFD -packing which contains the same item. If |b| = 2, we can establish domination in the following way. If b is the largest item in B, B = {b, ,b } and b is in B' in the FFD -packing, then to prevent domination by B', b must not be the largest item in B. If it were, since b„ fits in B' after b , B' would either contain b~ or something larger unless b„ was packed in a bin preceding B'. But then the bin containing b„ would also contain an item bigger than b 1 and would dominate B. If b, is not the largest item in B ' , however, then B' contains an item larger than b„ and thus dominates B. A consequence of having every bin in the OPT., -packing containing at least 3 items is an upper bound of 1 -2min(s(b)) on the size of items in M. 3.2 Results for a < 1 We begin our analysis of FFD*(a) by looking at the situation when a < 1. In this interval, the results are simpler both to state and to prove. Essentially they show that for any a < 1, for any packing of bins of size a, the number of bins may be n-1 times the number of bins of size 1 if ae [2/n, 2/ (n-1) ) , n >_ 3. This is also the worst case bound as Theorem 3.2.1 shows. Theorem 3.2.1 . FFD*(a) = n-1 if ae [2/n, 2/ (n-1) ) . Proof . The following example shows that FFD* (a) >_ n-1. L consists of k(n-l) items, each of size l/(n-l). The FFD -packing results in each item being packed in a separate bin, since 2/ (n-1) > a. Of course, this is also the optimal packing for bins of size a, but for bins of size 1, the optimal packing places 44 n-1 items in each bin. Thus FFD (L) = k(n-l)OPT. (L) a 1 and FFD (L)/OPT 1 (L) = n-1 . a 1 To prove that n-1 is also an upper bound, we note first that it is sufficient to prove the result for a = 2/n. Monotonicity of FFD*(a) implies the theorem for the remaining values. If the smallest 2 item in the list has size < 2/n - l/(n-l) = (n-2)/(n -n) , then each bin is filled to at least level l/(n-l) and consequently FFD (L) < Z s(b)/(n-l) _1 < (n-l)OPT,(L) a ~beL - 1 and the theorem follows. Therefore we can assume that the smallest 2 item has size s(b) = (n-2)/(n -n) + A, A > 0. Clearly A _< l/(n-l) or none of the items would fit at all. Since 3( (n-2) /(n 2 -n)+A) > 2/n if A > (4-n) /(3(n 2 -n) ) , we can have only bins of type X and X_ unless n = 3. If n = 3, and 2 A > (4-n)/(3(n -n) ) , a bin of type Y will have one item of size greater than 1/3 and one smaller item. We will classify the large item as type Y- and the small item as type X„. If the last bin of type X. contains an item smaller than (l/(n-l)-A) /i, then we will exclude that bin from discussion. Since we are interested in FFD*(a) , the change by a constant factor, at most 3, can have no effect on our result. We define a weight function for the items of a minimum counterexample M as described in the introduction. The table below 45 summarizes the information we need. 'YPE MINIMUM SIZE WEIGHT X l l/(n-l) - A l/(n-l) - A Y l 1/3 1/3 - 2A/3 x 2 (l/(n-l)-A)/2 (l/(n-l)-A)/2 X Q 1/6 1/6 - A/3 RESTRICTIONS n = 3, A £ 1/18 A < l/(n 2 -n) n = 3, A < 1/18 If B is a bin of type X., then B contains i items each of weight (l/(n-l)-A)/i. Thus E w(b) = l/(n-l) - A. If B is a bin beB of type Y , E w(b) = 1/3 - 2A/3 + 1/6 - A/3 = 1/2 - A. Thus every beB bin in the FFD -packing has total weight l/(n-l) - A. Now suppose B is a bin of size 1. We would like to show that E w(b) <_ 1 - (n-l)A. Suppose first that B contains no items of beB type Y or X , as would be the case if n > 3. There are then k items of type X qnd j items of type X„ . E w(b) = k(l/(n-l)-A) + j(l/(n-l)-A)/2 beB = (k+j/2)(l/(n-l)-A) If k + j/2 _< n-1, then E w(b) _< 1 - (n-l)A . beB If j = and k > n-1, then k >^ n and E s(b) > n(l/(n-l)-A) = 1 + (l/(n-l)-nA) beB 46 Since E s(b) _< 1, nA must be > l/(n-l) which is impossible. If beB j f 0, then k + (j-l)/2 > n-1 and E s(b) > (n-1) (1/ (n-1) -A) + (n-2)/(n 2 -n) + A beB If = 1 - (n-l)A + (n-2)/(n 2 -n) + A (n-2)/(n 2 -n) + A > (n-1) A or equivalently 2 l/(n -n) > A then this expression is at least 1. But if there exists an X 9 ~bin then 2 A _< l/(n -1). Thus if E s(b) £ 1, we must have E w(b) <_ 1 - (n-l)A. b e B beB Now we suppose n = 3, A _< 1/18 and that B contains either an X„-item or a Y..-item. We wish to show that if E s(b) _< 1, then beB E w(b) < 1 - 2A. Since for an item of type X , s(b) - w(b) >_ (4/3)A, beB if there are two items of type X„, then E w(b) < E s(b) - 2A < 1 - 2A beB beB Also if there is one item of type Y and one item of type X„, then E w(b) < E s(b) - 2A < 1 - 2A . beB beB Thus there must be one item of type X„ or one item of type Y , but not both. If there is a Y -item, and an X -item, then E s(b) > 1/3 + 1/2 - A + 1/6 + A = 1 beB 47 for A < 1/18, if B = {b ,b } with b of type Y and b of type X , then Z w(b) < 1 - 2A . Similarly if B consists of a Y -item and beB two X,~-items, it can contain nothing else. then Finally if B contains an X_-item, an X -item, and an X.-item, I w(b) _< 1/2 - A + 1/4 - A/2 + 1/6 - A/3 beB = 11/12 - 11/6A < 1 - 2A . Since |b| _< 4, the only other possibilities are for B to consist of X 9 -items. But Z w(b) < 1/6 - A/3 + 3(l/4-A/2) < 1 - 2A . beB We conclude that in all cases Z w(b) < 1 - 2A if Z s(b) < 1 . beB beB Combining the inequalities for bins of size 1 and 2/n, we obtain (l/(n-l)-A)(FFD (L)-C) < Z w(b) < OPT. (L) (l-(n-l) A) a ~~ 1, t — 1 beL FFD (L)-C OPT^L) - n " X where C is the constant, less than or equal to 3, caused by the exceptional bins. The theorem follows immediately from this. In fact the constant can be reduced to 2 quite easily. There are no exceptional items of type Z or V by definition. There can be 48 exceptional items of type Z~ only if there are items of type X„, and even then there are only two exceptional items. It is not difficult to see that if we assigned weight to each of these items and to the smallest item, m, then the constant C = 2 will be valid in these last inequalities . 3.3 Lower Bounds for FFD*(ct) , 1 <_ a < 2 For ae(0,l), the results were obtained readily, and were easily understood. The results for a > 2 will also be fairly simple. However, for ae[l,2), the behavior of FFD*(ot) is quite complicated and not easily understood. It is not surprising that FFD*(a) is a step function, but the location and size of the discontinuities is difficult to explain. In this section we will give the examples which demonstrate that the upper bounds we prove in the next section are attainable. Example 3.3.1, taken from Demers, et. al . (1974), shows that for ae [1,45/44) there are lists L with OPT- (L) arbitrarily large and FFD (L)/OPT (L) = 11/9. Since in Johnson (1974) it was proved that for any list L, FFD (L) < (11/9)0PT 1 (L) + 4 a — 1 we can conclude that FFD*(a) = 11/9 for a = 1, and by monotonicity of FFD*(ot), for cte[l, 45/44) . The remaining examples each cover an interval. Taken together they provide lower bounds for FFD*(a) for all a in [1,2). 49 Example 3.3.1 . L = {a^, . . ..a^.b^ . . . .b^.^, . . . .c^.d^ . . ..d^} s(a.) = 23/44, s(b.) = 13/44, s(c.) = 12/44, d. = 9/44 for all i. FFD (L) = Ilk: 6k bins {a.,b.}, i = 1,2,..., 6k a 11 2k bins {c_. o5 c_. , c_ . } , i = 1,2, ...,2k 3i-2 3i-l 3i 3k bins {d. . ,d , d . , d }, i = 1,2, ... ,3k 4i-3 4i-2 4i-l 4i OPT.. (L) = 9k: 6k bins {a.,c.,d.}, i = 1,2, ...,6k 1 ill 3k bins fe 21 _ 1 ,b 2i> d 6k+2i _ lf d 6k+21 }, i = 1,2,..., 3k Thus for ae[l, 45/44), FFD*(a) > llk/9k = 11/9. Example 3.3.2 . 45/44 £ a < 30/29; FFD*(a) > 29/24. L = {a 1 ,a 2 ,...,a 12k ,b 1 ,...,b 22k ,c 1 ,...,c 24k ,d 1 ,...,d 36k } s(a.) = 15/29, s(b.) = 9/29, s(c.) = 8/29, s(d.) = 6/29. FFD^CL) = 29k: 12k bins {a ,b } , i = 1,2,..., 12k 8k bins {c _„,c ,c }, i = 1,2, ...,8k 9k bins W 4 i-3' d 4i-2' d 4i-l' d 4i } ' i = 1 ' 2 "'" 9k OPT (L) = 24k: 12k bins {a.,c.,d.}, i = 1,2,..., 12k 12k bins {b i ,c 12k+i ,d 12k+2i _ 1 ,d 12k+2 .}, i = 1,2, ...,12k FFD (L)/0PT (L) ■ 29/24. Example 3.3.3 . 30/29 6/5. L = {a 1 ,a 2 ,...,a 4k ,b 1 ,...,b 4k ,c 1 ,...,c 8k } s(a.) = 14/24, s(b.) = 6/24, s(c.) = 5/24 FFD (L) = 6k: 4k bins {a.,b.}, i = 1,2,..., 4k a 11 2k bins {c 41 _ 3 > c 4 i _ 2 ' c 4i_i' c 4i^ ' i = 1.2, ...,2k OPT, (L) = 5k: 4k bins' {a.,c . . ,c_.}, i ■ 1,2, . ..,4k 1 l 2i-l 2i k bins {b, . Q ,b. . oJ b. . , ,b. .}, i = 1,2, ...,k 4i-3 4i-2 4i-l 4i FFD (D/OPT. (L) = 6/5. a 1 50 Example 3.3.4 . 25/24 < a < 20/19; FFD*(a) > 19/16. L = {a l5 a 2 , . . •»a 12k ,b 1 , . . . ^ 12 k' C V ' ' ' '°28k } s(a ± ) = 11/19, s(b ) = 5/19, s(c ) = 4/19 FFD a (L) = 19k: 12k bins' {a.,b.}, i = 1,2, ...,12k 7k bins { c 4i _ 3J c 4i _2' c 4 i _i' c 4 i } ' i = 1,2, ...,7k OPT.(L) = 16k: 12k bins {a.,c_. -,c .}, i = 1,2, ...,12k 1 i 2i-l 2i ' 4k bins {b 3i _2' b 3i-l' b 3i' C 24k+i } * ± = 1 » 2 »"*» 4k FFD (D/OPT^L) = 19/16. a 1 Example 3.3.5 . 20/19 < a < 8/7; FFD*(a) > 7/6. L = {a 1 ,a 2 ,...,a 6k ,b 1 ,b 2 ,...,b 12k } s(a ) = 3/6, s(b.) = 2/6 FFD (L) = 7k: 3k bins {a.. n ,a..}, i = 1,2,..., 3k a 2i-l 2i 4k bins ft>„ „,b„ ._.. ,b } , i = 1,2, ...,4k OPT (L) = 6k: 6k bins {a ,b ,b ? } , i = 1,2,..., 6k FFD a (L)/0PT 1 (L) = 7/6. Example 3.3.6 . 8/7 £ a < 15/13; FFD*(a) > 13/12. L = ^ 1 » a 2 '---' a 1 2k' b l' b 2'-* ,,b 36k } s(a.) = 4/13, s(b.) = 3/13 FFD (L) = 13k: 4k bins {a . -,a_ . . ,a_.}, i = 1,2, . ..,4k a 3i-2 3i-l 3i 9k bins ^ b 4 i _ 3 ' b 4 i _2' b 4i_i' b 4i^ ' i = 1,2, ...,9k OPT (L) = 12k: 12k bins' { a i » b 31 _ 2 » b 3i-l» b 3i^ i = I, 2 , ...,12k FFD (D/OPT. (L) = 13/12. a 1 Example 3.3.7 . 15/13 < a < 36/31; FFD*(a) > 31/30. L = { a 1 » a 2"'" a 30k'V"" b 30k' C l"'" C 30k } s(a.) = 15/31, s(b.) = 10/31, s(c ) = 6/31 51 FFD a (L) = 31k: 15k bins {a 2± _ v * 2± } , ± = 1,2,..., 15k 10k bins tt> 3 - _ 2 ' h 3i-V h 3i^ ' i = 1,2, ...,10k 6k bins i^^ ± _^» C 5i_3» c 5i_2' c 5i-l' c 5i^ ' i = I, 2 , ...,6k OPT (L) = 30k: 30k bins {a.,b.,c.}, i = 1,2,..., 30k FFD (L)/OPT. (L) = 31/30. a 1 Example 3.3.8 . 36/31 <_ a < 48/41; FFD*(a) > 41/40. L = {a 1 ,a 2 ,...,a 20k ,b 1 ,...,b 20k ,c 1 ,...,c 20k ,d 1 ,...,d 80k } s(a.) - 25/41, s(b.) = 15/41, s(c ) = 10/41, s(d.) = 8/41 FFD (L) - 41k: 20k bins' {a.,b.}, i = 1,2, ...,20k a 11 5k bins {c. . ,c. . ,c. . , c, . } , i = 1,2, ...,5k 4i-3 4i-2 4i-l 4i 16k bins ^ 5± _^ ' d 5i_3> d 5i_2 ,d 5i-l' d 5i* ' i = 1,2, ...,16k OPT (L) = 40k: 20k bins {a.,d ,d }, i = 1,2, ...,20k 20k bins tb ± ,c i ,d 40k 2i_i' d 40k 2i } ' ± = l> 2 >---> 20k FFD (L)/OPT n (L) = 41/40. a 1 Example 3.3.9 . 48/41 £ a < 72/61; FFD*(a) > 61/60. L = {a 1 ,a 2 ,...,a 40k ,b 1 ,...,b 40k ,c 1 ,...,c 20k ,d 1 ,...,d 80k } s(a.) = 37/61, s(b.) = 23/61, s(c.) = 15/61, s(d.) = 12/61 FFD (L) = 61k: 40k bins' {a.,b.}, i = 1,2,..., 40k a 11 5k bins {c. . ,c. . _,c. . 1 ,c. .} , i = 1,2, ... ,5k 4i-3 4i-2 4i-l 4i 16k bins ^ 5i _^ > d 5i_3' d 5i_2' d 5i-l' d 5i } » i = l> 2 »--->l 6 k OPT (L) = 60k: 40k bins {a.,d ,d }, i = 1,2, ...,40k 20k bins {b„._, ,b,c.}, i = 1,2,..., 20k FFD (L)/0PT,(L) = 61/60. a 1 Example 3.3.10 . 72/61 <_ a < 2; FFD*(a) _> 1. L = {a ; ,,a , ... ,a k > s(a.) = 1 52 FFD (L) = k = OPT (L) , since only one item can fit in each bin, whether of size 1 or of size a < 2. 3. A Upper Bounds for FFD*(a) , 1 < _ a < 2. The examples of the preceding section give lower bounds for FFD*(a) throughout the interval [1,2). In this section, we will prove that these lower bounds are tight. Each of the theorems of this section will cover one of the intervals corresponding to one of the examples. Since FFD*(a) is monotone, we need prove our upper bound only for the left endpoint of the interval. All of the proofs are similar. We first analyze the behavior of the items that are not exceptional . This is sufficient for determining FFD*(a) ; however, we can be a little more precise. The examples of section 3.3 show that for some lists L, FFD (L) = rOPT n FFD*(a)l a I and in this section we will prove that for all lists L (1 <_ a < 2) FFD (L) < [OPT, (L)FFD*(a)l + 1 . a — 1 To determine the constant requires a careful analysis of the exceptional items. For two intervals, we can tighten this inequality. In Theorem 3.4.6, we show that for ae [8/7,15/13) , FFD (L) < [OPT 1 (L)FFD*(a) 1 a — 1 while in section 3.5 we will present an example showing that for ae [72/61), we can find lists L such that 53 FFD (L) = OPT, (L)FFD*(a) + 1 = OPT, (L) + 1 . a 1 1 In each case we will assume that we have a minimum counter- example: a list M of minimum cardinality for which the theorem fails. This allows us to compute lower and upper bounds on the size of items in M. We will define the weight function w such that for any bin Bin the FFD -packing Z w(b) = l/FFD*(a) - A. Then we will a beB devote the major portion of the proof to showing that almost all of the bins in the OPT -packing satisfy E w(b) <_ 1 - FFD*(a)A. beB Theorem 3.4.1 is merely a restatement of Johnson's results, included here for completeness. In a manner similar to the other theorems of this section, the constant can be reduced from 4 to 2, but it does not seem worth the effort to rewrite the proof for such a small improvement. Theorem 3.4.2 will be proved in some detail, while the other proofs, which are quite similar, will be proved in less detail. Theorem 3.4.1 . If ae[l, 45/44), then for all lists L, FFD (L) < (ll/9)0PT n (L) + 4 . a — 1 Next we consider the interval [45/44,30/29). We would like a result of the same type with FFD*(a) = 29/24. Since Lemma 2.2.2 shows that if we had a counterexample for any a in [45/44,30/29), we could find one for a = 45/44, we can assume that if the theorem is false, we can find a minimum counterexample M for a = 45/44. If all bins in the FFD -packing are filled to at least level 24/29, then a 0PT n (L) > E s(b) > (24/29) FFD (M) 1 ~beM 54 and the theorem is not violated. Thus there is at least one bin which is filled to a level less than 24/29. Hence if m is the smallest item in M, m did not fit in this bin and s(m) must be greater than a - 24/29 = 249/1276. We let s(m) be 249/1276 + A, A > 0. Since every item must be packed in a bin of size 1 with at least two other items in the OPT -packing, no item can be larger than 1 - 2s(m) = 778/1276 - 2A . We summarize the information we have about the items which are not in exceptional bins in the following table. TYPE Y ll 12 X, SIZE 45/88 < s £ 778/1276 - 2A 278/1276 + A < s < 45/88 12/29 - A/2 < s 15/44 < s 8/29 - A/3 < s 45/176 < s 6/29 - A/4 < s 249/1276 + A < s WEIGHT < sxze < size 12/29 - A/2 (3/8 or 2/5)(24/29-A) 8/29 - A/3 (4/15)(24/29-A) 6/29 - A/4 24/145 - A/5 RESTRICTIONS A _< 251/5104 A £ 251/5104 A < 143/1276 A < 309/5104 A < 143/1276 A < 12/1276 A < 309/5104 A < 12/1276 The restrictions are obtained in the following way. If there is a bin of type Y , it must contain an item of size > a/2 = 45/88. Since this size must be less than the maximum size which is 1 - 2(249/1276+A) = 778/1276 - 2A, we must have A _< 251/5104. The restrictions on X^ and X,. are obtained from the necessity of i(249/1276+A) _< 45/44 if there is 55 a bin of type X.. The bounds on X_ and X~ come from the fact that J r 1 2 3 3(249/1276+A) < 1 if each bin of the OPT -packing is to have 3 items or more. If B is a bin of type Y., i _> 2, and if the fallback item in B is of type X. - , then we reclassify B as type X. , . Since all i+1 items in B are at least (24/29-A) /(i+1) in size, there is no problem in doing so. Consequently we have no bins of type Y , , and there can be bins of type Y and Y~ respectively only if there are items of type X r and X. . That accounts for the restrictions on Y_ and 5 4 2 Y . Finally, the weight of an item of type Y is (3/8) (24/29-A) if the fallback item in its bin in the FFD -packing is of type X,, and its weight is (2/5) (24/29-A) if the fallback item is of type X . We will not define w explicitly for items of type Y and Y „ . The only properties we need are I w(b) = 24/29 - A beB and w(b) < s(b) . Since I s(b) > 24/29 - A beB this can be done easily, for example by setting w(b) = s(b) - ( Z s(a)-(24/29-A))/|B| . aeB Then for any bin B in the FFD -packing except the last, I w(b) = 24/29 - A. beB 56 For the exceptional items we can define w as we did for the Y -items, so that the sum of the weights of the items in the bin is 24/29 - A, and no item has weight as large as its size. For any item b e M, we have s(b) < w(b) . This is obvious from the table above for all but the items of types Y~, Y , and X . For these we have slightly stronger statements. Lemma 3.4.2.1 . (a) If b is of type Y , then if A _< 12/1276 s(b) - w(b) > (29/24)A and if A > 12/1276 s(b) - w(b) > A (b) If b is of type Y , then s(b) - w(b) > 3(29/24)A (c) If b is of type x , then s(b) - w(b) > 3(29/24)A Proof . The proof is simply a matter of checking the difference between the minimum size of an item of the given type and its assigned weight. If A <_ 12/1276, then for an item of type Y 2 s(b) - w(b) > 15/44 - (2/5)(24/29-A) = 63/(5-1276) + 2A/5 > (29/24)A Similarly if b has type Y , then s(b) - w(b) > 45/176 - (4/15)(24/29-A) > 3(29/24) A , and if b has type X , then s(b) - w(b) > 249/1276 + A - (24/29-A)/5 > 3(29/24)A If A > 12/1276 and b has type Y , then s(b) - w(b) > 15/44 - (3/8)(24/29-A) > A 57 The main point to be made from Lemma 3.4.2.1 is that if B is any bin of the OPT -packing containing an item a of type Y , or X , or Y if A _< 12/1276, then B must satisfy E w(b) < 1 - (29/24)A beB since for all other items w(b) < s(b), and w(a) < s(a) - (29/24)A, E s(b) £ 1. beB Lemma 3. 4. 2. 2 . If B is any bin in the OPT -packing of M which contains neither exceptional items nor items from Y..-bins, then E w(b) <_ l-(29/24)A, beB Proof . By Lemma 3.4.2.1, if A _< 12/1276, the only possible items we can have in B are of types X„ , X , and X , if B is a counterexample to the lemma. Since 5s (X.) > 1, B must contain either 3 or 4 items. If |b| = 3, then B must contain an X ? -item since 3w(X„) < 1 - (29/24) A. em. But B cannot contain 2 items of type X~ and also contain a third it Hence E w(b) < w(X ) + 2w(X ) = (7/6)(24/29-A) <1 - (29/24)A . beB If |b| =4, then B cannot contain an item of type X„ since s(X ? ) + 3s (X.) > 1. Also B cannot contain 3 items of type X„, since 3s(X„) + s(X.) > 1. Thus 3 4 w(b) _< 2w(X ) + 2w(X ) = (7/6)((24/29)-A) <1 - (29/24)A . beB Suppose now that A > 12/1276. The only change now is that B might contain an item of type Y„. If |b| = 3, then at least one item must be of type smaller than Y_ since 3s(Y_) > 1. Hence 58 Z w(b) _< w(X 2 ) + w(Y 2 ) + w(X 3 ) = 1 - (29/24)A . beB Lenuna 3.4.2.3 . Let B be any bin in the OPT -packing of M containing k items of type Y _. If the k items of type Y corresponding to these are in bins B ,...,B in the OPT -packing and there are no exceptional items in any of the B., then k Z Z w(b) < (k+l)(l-(29/24)A) . i=0 beB. i Proof . Since items b of type Y.. 1 satisfy s(b) > a/2 > 1/2, the bins B , ...,B, are distinct. We begin by examining the situation where a Y -bin contains more than 2 items. In this case the fallback items are classified as type X. where j depends on the size of the item. If A < 12/1276, then even if the two small items are type X,., we would have w(b) = (3/5)(24/29-A) < s(b) - (29/24)A for b of type Y 1 .. . If A > 12/1276, then the fallback items must have weight at least 6/29 - A/4 and for an item b of type Y-.., we have w(b) < 12/29 - A/2 < s(b) - (29/24)A . In either case, no item can be in a bin B with Z w(b) > 1 - (29/24)A, beB Since B contains no items which are exceptional, it also satisfies Z w(b) <^ 1 - (29/24)A, and the lemma holds in this situation. beB Returning now to the situation where bins of type Y contain 2 items, we consider the different possible values of k separately. k must be < 4 since 5(278/1276+A) > 1. 59 Suppose k = 4. Then B_ = {b, ,b.,b. ,b . } with each b. of type 01234 l Y „ . We consider the possibilities for the bins B. containing items of type Y -. . If B is any bin containing a Y^-item b, then |b| = 3 since s(b) + 3(249/1276+A) > 1. B cannot contain an item a of type X„ or Y_ since then s(b.) >_ s(a) or else a would have been J -J x 4 placed in a bin with a Y.. .. item. But then Z s (b . ) >_ 4s(Y„) > 1. i=l Then Z w(c) _< w(b) + 2w(X, ) . Since this must be true for all of CeB the B. , i _> 1, Z Z w(b) < 4(24/29-A) + 8w(K ) = 6(24/29-A) < 5(l-(29/24) A) , i=0 beB. i since if b . ' is the Y -item corresponding to b . , w(b.) + w(b.') = 24/29 - A. Suppose k = 3. Let B be any bin of the OPT -packing containing an item b of type Y 11 . As before B cannot contain an item of type X ? or Y . Also B cannot contain 2 items neither of which is of type X, or X , since s(b) + 2s(Y ) > 1. Hence Z w(a) £ w(b) + w(X J + w(X, ) . aeB But then, if |B | = 3, 3 Z Z w(a) _< 3(24/29-A) + 3w(X ) + 3w(X.) i=0 aeB. i = (19/4)(24/29-A) < 4(l-(29/24) A) . If |b I =4, then there can be no items of type X„ since if there were such an item c, s(c) <_ s(b.) for the items b. of type Y „ in B_, and in that case 60 £ s(b) > 3s(X ) + 249/1276 + A > 1 . beB Hence for any bin B containing an item b of type Y , we have Z w(a) < w(b) + w(Y ) + w(X ) aeB Moreover at most one of the bins B , B , B , B_ can contain a Y~-item since if a is of type Y_, then w(a) < s(a) - 3(29/24)A, by Lemma 3.4.2.1. Hence Z E w(c) < 3(24/29-A) + w(Y ) + 6w(Y ) i=0 ceB. l = (143/30) (24/29-A) < 4(l-(29/24)A) . Suppose k = 2. Then none of the bins B. can contain an item of type Y„ or X,., by Lemma 3.4.2.1. Suppose | B n | = 3. Then unless B n contains an item of type X~, 2 I I w(b) <_ 2(24/29-A) + w(Y ) + 2w(X ) + 2w(X.) i=0 beB. l = (107/30) (24/29-A) < 3(l-(29/24)A) . If B contains an item c of type X_, then s(c) + s(b.') > 45/44 , i = 1,2 where b , b„ are the items of type Y ~ in B and b ', b ' are the corresponding items of type Y .. We conclude that s(b.') > 45/44 - s(X„) and therefore s(b.') + 2s(X.) > 1, so that B. cannot contain two more items without having an item of type X_. Suppose now that |bJ = 4. If B and B 2 each contain two X, -items, then 61 Z Z w(b) = 2(24/29-A) + 6w(X,) < 3(l-(29/24) A) . i=0 beB. 1 But if B. = {b.'.a.c} where b.' is the Y, 1 -item corresponding to the 11 l 11 Y 19 ~item b. in B_, a is of type X~, and c is of type X,, then s(b. ') + s(a) + s(c) < 1 s(b. ') + s(b.) + s(c) > 45/44 since c did not fit in the same FFD bin with b. and b.'. Thus a li s(b.) > s(X ) + 1/44. Hence Z s(b) > 2(s(Xj+l/44) + 2s(X,) = 1 + 14/1276 - (7/6)A . beB Q This must be less than 1 so A > 12/1276. But then Z s(b) > 2(s(X J+l/44) + 2(249/1276+A) > 1 . beB Q Suppose k = 1. As in the preceding case, we can assume that there are no Y„-items or X-items, nor more than one Y_-item if A _< 12/1276, in any of the bins B.. If [ B_ | = 3, then B n must contain an X„-item since otherwise Z Z w(b) < 2w(Y ) + w(X ) + w(X ) + (24/29-A) < 2(l-(29/24) A) i=0 beB. l 5 * l Let B n = {a,b,c} with a of type X„ , b of type Y „. If c is of type X„, we would have Z Z w(b) < w(X ) + 2w(X ) + w(X.) + (24/29-A) = 2(l-(29/24)A) i=0 beB. ~ 2 3 4 i 62 If c is of type Y or X~ , then s(b') + s(c) > 45/44 where b' is the Y n -item in B . Hence s(c) > 45/44 - (788/1276-2A) and s(c) + s(b) + s(a) > 527/1276 + 2A + 12/29 - A/2 + 278/1276 + A > 1 Finally suppose |B | = 4. Then B can contain at most one item of type X since s(b) > s(X ) for b of type Y _, and Z s(b) > 3s(Xj + s(X.) > 1 beB if there are at least 2 items of type X„. If B contains an item c of type Y , then s(c) + s(b') > 45/44 where b 1 is the Y -item in B and the argument in the preceding case shows that Z s(b) > 1. b E B But if B_ contains one item of type X^ and two of type X, , we would have Z Z w(b) < (24/29-A) + 2w(X ) + 3w(X ) = 2(l-(29/24)A) . i=0 bcB. i This completes the proof of the lemma. Theorem 3.4.2 . If ae [45/44, 30/29) , then for any list L, FFD a (L) < [(29/24)OPT 1 (L)1 + 1 . Proof . The preceding lemmas would be enough to prove quite simply that FFD*(a) = 29/24. We shall have to be a little more careful to obtain the constant 1. We assume that we are still dealing with the minimum counterexample used throughout the lemmas. The weight function has been defined as above, and for the exceptional bins B, we ensure that Z w(b) = 24/29 - A and w(b) < s(b) for all b in B . beB Then for all bins B except the last in the FFD -packing, we have 63 E w(b) = 24/29 - A. Hence beB E w(b) = (24/29-A)(FFD (M)-l)+w(m) beM " where m is the last item, s(m) = 249/1276 + A. We assign weight w(X ) to m if A < 12/1276, w(X 4 ) if 12/1276 < A ^ 309/5104, and w(X„) otherwise. Fo r any bin B of the OPT, -packing, we define XS(B) to be E w(b) - (l-(29/24)A) . If XS(B) > 0, from the lemmas we know that beB either B contains an exceptional item or else B is in a set of bins {B n ,...,B, } where the B. are as described in Lemma 3.4.2.3. If none k of the B. contain an exceptional item, then by that lemma E XS(B.) < i=0 X ~ If {C,,...,C } is the set of bins B for which XS(B) > and B is not fc k in a set of bins {B , ...,B } with E XS(B.) <_ 0, then U k i=0 x t E w(b) < (l-(29/24)A)0PT (M) + E XS(C.) . beM i=l 1 If the theorem is not satisfied by M, then FFD (M) > [(29/24)OPT 1 (M)l + 1 a 1 and since FFD (M) must be an integer, FFD (M) - 1 > [(29/24)OPT n (M) 1 + 1 > (29/24)OPT., (M) + 1 . a — 1 — 1 Hence (24/29-A)((29/24)OPT 1 (M)+l) + w(m) < (24/29-A)(FFD (M)-l) + w(m) — a = E w(b) < (l-(29/24)A)OPT (M) + E XS(C.) beM i=l X 64 Thus t (l-(29/24)A)0PT (M) + 24/29 - A + w(m) < (l-(29/24)A)0PT (M) + Z XS(C.), i=l X and t 24/29 - A + w(m) < E XS(C.) . i=l Now each bin C. can have XS(C.) at most (29/24)A. If A > 251/5104, then there are no Y..-bins, and the only exceptional items are of types Z„, V , and Z . Thus there are at most 7 bins for which XS(B) > 0. Hence t Z XS(C.) < 7(29/24) A < (7) (29) (143) /((24) (1276)) =1001/(24-1276) . i=l ± But this is less than w(m) + 24/29 - A, and the theorem follows for A > 251/5104. If 251/5104 ^A > 12/1276, then there are still only 7 excep- tional items. However, some could be in a set of as many as 5 bins {B Q ,B , ...,B } with each having XS(B.) > 0. Suppose no exceptional item is in such a set with k > 2. Then there are at most 21 bins B with XS(B) > 0. Moreover for the two V -items, since they average at least 15/44 in size, s(b) - w(b) > 39/1276 + (3/8)A > A , for A < 251/5104. Thus the bins containing these two items can con- t tribute at most 2(5/24)A to E XS(C). If there are no exceptional i=l 1 bins of any one of the types, then there are at most 5 exceptional items and even if each is in a set of 3 bins all having XS(B) nearly 65 (29/24) A, we would still have t I XS(C.) < (5) (3) (29/24) A < 30/29 - (5/4)A = 24/29 - A + w(m) . i=l 1 But if there is a Z 9 ~bin, then the smaller Z -item, a, would fit in a Y,-bin in place of the Y „ items unless the Y „-items were larger than a. But in this case, for any item b of type Y 19 , s(b) _> s(a) _> s(Y„) . Then it is impossible for either Z_-item or the larger V 9 -item to fit in a bin with two Y „-items. Hence I XS(C.) < (9+6+1) (29/24)A + (5/12)A 1=1 X and (16(29/24)+5/12)A > 30/29 - (5/4)A . Solving for A we get A > 440/(7-1276) > 251/5104. Thus there must be some bin containing three Y^-items. But then if b is of type Y 9 , s(b) < s(Y 9 ), and there can be no V 9 ~bin. Moreover s(b) > s(c), where c is the smaller Z 9 ~item. If any bin were to contain 4 items of type Y 19 , then s(b) _< 1/4 for the smallest and hence there could be no Z„-bin, since b would have to be bigger than the Z„-items. But then there are only two exceptional items, and even if each could contribute 5 bins with XS(B) = (29/24)A, we would still have t £ XS(C.) < 10(29/24)A < 30/29 - (5/4)A . i=l 1 Thus each exceptional item can contribute at most 4 bins with XS(B) > 0. 66 If a is the larger Z^-item and c the smaller one, then a cannot be in a bin with a Y -item, so either a is in a bin containing no Y 1 -items or a is in a bin with one Y.. „-item. Also a cannot be in a bin with a Y-^-item, b, since s(a) + s(b) > s(a) + s(c) > 1 - (249/1276+A) Thus there is only one bin B with XS(B) > associated with a. If c is in a bin with an item of type Y 19 , then c can be associated with at most 3 bins B with XS(B) > 0, since there can be at most two items of type Y „ in a bin with c. Hence t Z XS(C.) < (12+3+1) (29/24)A < 30/29 - (5/4)A . i=l X Thus c must be in a bin with an item of type Y .. . But then the set of bins must be B = {b l ,b 2 ,b 3 } * a11 b i ° f type Y 12 B 1 = {b 1 , ,c,d 1 > B 2 = {b 2 \e 2 ,d 2 } B 3 = {b 3 ',e 3 ,d 3 } , d ± of type X 4 Even if e„ and e are of type X„, 3 Z Z w(b) < w(c) + 3(24/29-A) + 3w(X ) + 2s(X ) i=0 beB. l < 1/3 + (53/12) (24/29-A) since s(c) < min (s(b.)) <_ 1/3. But l 0, we would still have t E XS(C.) < 55(29/24)A < 55(29/24) (12/1276) < 30/29 - (5/4)A . i=l X and the theorem is proved. For a in the interval [30/29,25/24), we wish to show that FFD*(a) = 6/5. From Example 3.3.3, we know that there are lists L for which FFD (L) >_ (6/5)OPT (L) . We shall prove in Theorem 3.4.3 that FFD (L) < \ (6/5)OPT., (L) 1 + 1 for all lists L. As before, we a — i assume that M is a minimum counterexample. Then we can assume that the smallest item, m, has size 30/29 - 5/6 + A = 35/174 + A. There can be at most 5 items in any bin of the FFD -packing, and at most 4 items in any bin of the OPT., -packing. We summarize the information about the items in the following table. 68 TYPE SIZE WEIGHT restriction; Y n 15/29 < s < 104/174- -2A < size A < 7/174 Y 12 41/174 + A < s < 15/29 < size A < 7/174 X 2 (5/6-A)/2 < s (5/6-A)/2 A < 21/174 Y 2 10/29 < s (2/5 or 3/8) (5/6-A) A < 10/174 X 3 (5/6-A)/3 < s (5/6-A)/3 A _< 23/174 Y 3 15/58 < s (4/15) (5/6-A) A < 1/174 h (5/6-A)/4 < s (5/6-A)/4 A < 10/174 x c 35/174 + A < s (5/6-A)/5 A < 1/174 The following lemmas leading up to the proof of Theorem 3.4.3 are all concerned with the minimum counterexample M. Lemma 3.4.3.1 . Let b be an item in M. (a) If b is of type Y 2 , then s(b) - w(b) > (12/5)A if A < 1/174 and s(b) - w(b) > (3/5)A if A > 1/174. (b) If b is of type Y , then s(b) - w(b) > 6A. (c) If b is of type X 5> then s(b) - w(b) > 6A. Proof . (a) If A < 1/174, then s(b) - w(b) > 10/29 - (2/5) (5/6-A) > 12A/5 If A > 1/174, then A < 10/174 and s(b) - w(b) > 10/29 - (3/8) (5/6-A) > 3A/5. (b) and (c) are proved similarly in a straightforward way. As a result of Lemma 3.4.3.1, we never have to consider having an item of type Y or X in any bin of the OPT.. -packing. Moreover, any bin B in the OPT.. -packing containing a Y -item will satisfy I w(b) < Z s(b) - 3A/5 < 1 - 3A/5 . beB beB 69 Lemma 3.4.3.2 . If B is any bin in the OPT -packing of M which con- tains neither an exceptional item nor an item from a Y..-bin, then I w(b) < 1 - (6/5)A. beB Proof . Suppose |b| = 3. Then B must contain an X_-item since 3w(Y„) < 1 - (6/5)A. B must also contain a Y_-item since w(X ) + 2s(X ) < 1 - (6/5)A. The third item must be of type X since w(Xj + w(Y„) + w(X.) < 1 - (6/5) A. But then this X„-item would fit Ilk— 3 in the bin of the FFD -packing containing the Y_-item, causing that bin to be of type X„. Suppose |B| = 4. Since (5/6-A)/2 + 3(35/174+A) > 1, B cannot contain an X„-item. If B contains no Y„-items, then £ w(b) < 2w(Xj + 2w(X.) < 1 - (6/5)A . bsB ~ 3 4 If B does contain an item of type Y~, however, it cannot contain an item of type X since s(Y ) + s(X ) + 2(35/174+A) > 1. But w(Y ) + 3w(X,) < 1 - (6/5)A. 4 Lemma 3.4.3.3 . If B is a bin of the OPT -packing containing k items of type Y , and if B.,...,B are the bins in the OPT -packing con- taining the k corresponding Y -items, and if none of the % ± contains an exceptional item, then k E Z w(b) < (k+l)(l-(6/5)A) . i=0 beB. x Proof . We begin by examining the special case when a Y -bin contains more than two items. In this case, 15/29 + 2w(X 5 ) > 5/6 - A. Hence 70 with the fallback items classified as type X. according to their size, we can still have Z w(b) = 5/6 - A and s(b)> w(b) for all beB b in B. In fact, if A < 1/174, 15/29 - (6/5)A + 2w(X ) > 5/6 - A and s(b) - w(b) will be > (6/5)A for all such items of type Y . If A > 1/174, then the two fallback items must have weight >_ w(X.) and 15/29 - (6/5)A + 2w(X 4 ) > 5/6 - A. Thus in either case, if b is an item of type Y , we have w(b) > s(b) - (6/5)A, and any bin B' containing b will satisfy Z w(x) < Z s(x) - (6/5)A < 1 - (6/5)A . xeB' xeB' Returning to the situation where bins of type Y contain two items, we consider the different possible values of k separately. We must have k <_ 4, since no bin of the OPT -packing has more than 4 items. Also if any B. contains a Y„ or X -item, by Lemma 3.4.3.1 the result holds. Suppose k = 4. If there are items of type X„, then s(b) >_ s(X„) or else the X„ items would have been used in place of the Y --item b. But then 4s(Y „) > 1. If there are no items of type X , then for each i > 0, Z w(b) < w(a) + 2w(X.) beB. i where a is the item of • type Y... in B . . JV 11 i But then k Z Z w(b) < 4(5/6-A) + 8w(X 4 ) = 5(l-(4/5)A) . i=0 beB l 71 fo Suppose k = 3. If there are items of type X_, then as above r any item b of type Y ., s(b) _> s(X„). Hence |b j < 4. Since s(b') + 2s (X) > 1 if b' is of type Y , we have Z Z w(b) < 3(5/6-A) + 3w(X ) + 3w(X ) < 4(l-(6/5)A) i=0 beB. l If there are no items of type X , then |B n | = 3 implies Z Z w(b) <_ 6w(X.) + 3(5/6-A) < 4(l-(6/5)A) , i=0 beB. l while |B n | =4 implies that Z Z w(b) < 7w(X ) + 3(5/6-A) < 4(l-(6/5)A) , i=0 beB. i since all remaining items must be of type X, . Suppose k = 2. If |B n | =4, then B must contain two X, -items since otherwise s(b) > s(X„) for all Y --items b. If b ' is the smaller of the two Y -items and b the corresponding Y --item in B_, then the bin B. containing b' cannot contain an X_-item since then s(b') < 1 - s(X 3 ) - (35/1974+A) = 272/522 - (2/3)A , and s(b) < (l-2(35/1974+A))/2 = 52/1974 - A . We would then have s(b) + s(b') < 5/6 - A. Consequently b' must be in a bin with two items of type X., and 72 I I w(b) < 2(5/6-A) + 5w(X ) + w(X ) < 3(l-(6/5)A) . i=0 beB. x If |b.| = 3, then the remaining item in B n must be of type X, since otherwise E £ w(b) < 2(5/6-A) + w(Y ) + 2w(X ) + 2w(X ) < 3(l-(6/5)A) . i=0 beB. 1 If either B.. or B_ contains two items of type X, , it is easy to check that the inequality of the theorem holds. If both contain an item of type X„, then for either item, b, of type Y we have, for the item a of type X , s(b) + s(a) > 30/29 while s(b) + s(X 3 ) + s(X 4 ) < 1 and s(a) > s(X^) + s(X 4 ) . Since the Y 19 ~items must have size at least s(X-), E s(x) > 3s (X) + s(X ) > 1 . « B Finally suppose k = 1. If |B | = 3, then B must contain an X_-item since 73 2s(Y 2 ) + w(X 3 ) + w(X 4 ) + (5/6-A) < 2(l-(6/5)A) . If the remaining item, b, is of type Y , then the Y item is at least s(Y 9 ) in size and E s(x) > 1. If b is of type X,, then the KeB o inequality of the theorem is easily checked. Thus b must be of type X„. But then the Y -item is at least s(X~) in size and since the X ? -item did not fit in the Y -bin, it must be at least s(X„) + s(X.) in size, unless B contains two X, -items . Thus if B contains an X~-item E s(b) > 3 S (X) + s(X,) > 1 bsB while if B, contains two X. -items 1 4 E E w(b) < (5/6-A) + w(X ) + 2w(X ) + w(X ) < 2(l-(6/5)A) . i=0 beB ± If |B | =4, then B cannot contain an X_- or Y -item since either s(b) > 2s (X.) for that item b, or else the Y 9 ~item must be larger than s(b). Either alternative leads to E s(x) > 1. X£B Similarly, B_ cannot contain two X -items. Unless B and B contain items of type X„ E E w(b) < 5/6 - A + w(X ) + 4w(X ) < 2(l-(6/5)A) i=0 beB. i But if both contain items of type X , letting b and b' respectively be the items of types Y and Y 1? , we have 74 s(b) < 1 - (7/12)(5/6-A) = 37/72 + 7A/12 and s(b f ) <1 - (5/6)(5/4-A) = 11/36 + 5A/6 . Now s(b) + s(b') > 5/6 - A implies A > 1/174. But then s(b) < 1 - s(X 3 ) -2(35/174+A) = 167/522 - (5/3)A and s(b) + s(b') < 5/6 - A , if A > 1/174. Theorem 3.4.3 . For any list L, FFD (L) <_ \ (6/5)OPT (L) 1 + 1, for ae[30/29, 25/24) . Proof . Suppose the list M is a minimum counterexample and m is the smallest item in M, s(m) = 35/174 + A. Then £ w(b) = (FFD (M)-l)(5/6-A) + w(m) bcM a since every bin B in the FFD -packing but the last has £ w(b) = 5/6 - A a beB If FFD (M) > [(6/5)0PT 1 (M) 1 + 1, then FFD (M)-l > r(6/5)OPT.(M)l + > (6/ 5) OPT, (M) + 1 . a — 1 — i Hence I w(b) > ((6/5)OPT (M)+l)(5/6-A) + w(m) beM = OPT 1 (M)(l-(6/5)A) 4- 5/6 - A + w(m) . 75 If we define XS(B) = E w(b) - (l-(6/5)A) for any bin B of the beB OPT -packing of M, then Z w(b) = OPT (M)(l-(6/5)A) + E XS(B) beM B > OPT (M)(l-(6/5)A) + 5/6 - A + w(m) and E XS(B) > 5/6 - A + w(m) B where the summation is over all bins B of the OPT, -packing. If A _< 1/1974, then m is of type X and w(m) = 1/6-A/5. If A > 1/174 then w(m) > (5/6-A)/4. We are interested only in bins for which XS(B) > 0. Either B contains an exceptional item or B is in a set of bins B , ...,B as U K. described in Lemma 3.4.3.3. If there are exceptional items in k k E B., then from Lemma 3.4.3.3 we know that E XS(B.) <_ . Thus i=0 1 i=0 x we are interested only in bins containing exceptional items or assoicated in this way to other bins containing exceptional items. We call these bins C, i = l,...,t. If A >_ 7/174, then there are no Y -bins, and there are at most 7 exceptional items: 2 of type Z , 2 of type V_, and 3 of type Z . Since s(b) > w(b) for all b in M, XS(B) < (6/5)A for any bin B in the OPT, -packing. There can be at most 7 bins containing exceptional items and thus t E XS(C.) < 7(6/5)A i=l 1 76 But 42A/5 < 5/6 - A + (5/6-A)/4 if A < 10/174, and if A > 10/174 there are at most 2 exceptional items. Thus we may assume that A < 7/174. If A _< 1/174, then there may be as many as 14 exceptional items but the 3 items of type V„ can contribute nothing to our sum. There are at most 5 bins B with XS(B) > for each exceptional item. Consequently, t £ XS(C.) < 55(6/5)A < 5/6 - A + (5/6-A)/5 . i=l X If Ae [1/174, 7/174) , then there are at most 7 exceptional items. If b is of type V„, then s(b) - w(b) > 3A/5, since for the two items b and b' of type V , s(b) + s(b') > 20/29 and w(b) + w(b') = (3/4)(5/6-A). Hence s(b) + s(b') - (w(b)+w(b ') ) > (6/5)A, and for each of b and b' we have a difference of at least 3A/5. If exceptional item is in a set B.,...,B , with k > 2, then t I XS(C.) < 19(6/5)A + 2(3/5)* < (5/6-A)(5/4) . i=l 1 If there are no Z„-items, then there are at most 4 items to consider and Z XS(C.) < 20(6/5)A < (5/4(5/6-A) i=l 1 no 77 If there are Z -items, then s(b) > s(X»), where b is any item of type Y _. Hence no bin can contain more than 3 items of type Y ~, and no bin containing 3 such items can contain anything else. Hence all the exceptional items must be in bins with items of type Y .. if they are to be in a set of more than 3 bins. If there are both V„ and Z bins, then each Y 9 ~item must be at least s(Y ) in size, and there can be at most 2 such items in any bin. Moreover the largest exceptional item cannot fit in a bin with an item of type Y - . We conclude that Z XS(C.) < 19(6/5)A < (5/4)(5/6-A) , i=l 1 and the proof of the theorem is complete. The interval covered by Example 3.3.5 is [25/24,20/19). In this interval, we wish to show that FFD*(a) = 19/16. As usual, for a = 25/24, in a minimum counterexample M, the smallest item m will have size s(m) = 25/24 - 16/19 + A = 91/456 + A. The following table summarizes the information about the items not in exceptional bins. TYPE Y 12 X, SIZE 25/48 < s < 274/456-2A 110/456 + A < s < 25/48 8/19 - A/2 < s 25/72 < s (16/19-A)/3 < s 25/96 < s 4/19 - A/4 < s 91/456 + A < s WEIGHT < size < size 8/19 - A/2 (3/8,2/5) (16/19-A) (16/19-A)/3 (4/15) (16/19-A) 4/19 - A/4 (16/19-A) /5 RESTRICTIONS A < 73/1824 A < 73/1824 A < 61/456 A < 37/608 A £ 61/456 A < 1/114 A < 37/608 A < 1/114 78 Lemma 3.4.4.1 . Let b be an item of M. (a) If b is of type Y^ then s(b) - w(b) > (19/16)A if A < 1/114 and s(b) - w(b) > (19/32)A if A > 1/114. (b) If b is of type Y , then s(b) - w(b) > 4(19/16)A. (c) If b is of type X , then s(b) - w(b) > 5(19/16)A. Proof . Straightforward computation using entries from the table. Lemma 3.4.4.2 . If B is any bin in the OPT., -packing containing neither exceptional items nor items from Y--bins, then E w(b) _< 1 - (19/16) A. beB Proof . Certainly the lemma holds if B contains a Y~-item, and X,.-item, or a Y -item if A _< 1/114, or two Y„-items if A > 1/114. Suppose |B| = 3. Since w(Y ) + 2w(X ) <_ 1 - (19/16) A, B must contain an X -item. Since w(X~) + 2w(X~) _< 1 - (19/16)A, B must also contain an item of type Y_. If the remaining item had type X, we would have E w(b) _< 1 - (19/16)A. Thus B - {a,b,c} where a is of type X , beB b of type Y , and c of type X„. Let b' be the other Y -item in the same bin in the FFD -packing as b, and let d be the fallback item. Since s(a) > s(b'), s(b) + s(b') + s(c) < 1 and hence s(d) >_ s(c). But then d is of type X~, and b and b' would be classified as type X~. Suppose |b| =4. B cannot contain an X 9 -item. If B contains a Y„-item, then B must contain two X. -items and one X„-item in 2 4 3 addition. But then either the X -item is smaller than the fallback item in the Y -bin, which is impossible, or the other Y -item in the Y_-bin is at least 8/19 + 1/24 - A/2 in size. But then we consider 79 the Y -bin as an exceptional bin and. there is no Z -bin. Moreover s(b) - w(b) > 5(19/16)A in this situation for both Y -items . If B contains no Y 9 -items, then E w(b) < 2w(Xj + 2w(X.) < 1 - (19/16) A . beB ~ 3 4 Lemma 3.4.4.3 . If B is a bin of the OPT.. -packing containing k items of type Y „, and if B ,...,B are the bins of the OPT -packing con- taining the corresponding Y -items, and if none of the B. contain exceptional items k E E w(b) < (k+l)(l-(19/16)A) . i=0 beB. l Proof . If there are Y -bins with more than 2 items, a proof similar to the ones in the preceding theorems can be constructed. If some B. contains a Y„-item, then k must be 4 by Lemma 3.4.3.1. But then i 3 J each Y „-item must be larger than s(Y ) and 4s(Y ) > 1. B cannot hold an X^-item and violate the theorem. Thus we can assume that there are no Y or X,. items. Suppose k = 4. If B is any bin of size 1 containing an item b of type Y , then |b| = 3, and the remaining items are of type X.. Let b ? be the smallest Y ? -item in B_, and b be the corresponding Y .-item. Since s(b') < 1/4, s(b) > 45/76 - A and s(b) + 2s(X ) _< 1 implies A > 1/114. But s(b) + 2(91/456+A) < 1 implies A < 1/114. Suppose k = 3. If |B | = 3, then E E w(b) < 3(16/19-A) + 3w(X ) + 3w(X ) < 4(1-(19/16) A) . i=0 beB. l 80 If |b | = 4, then all remaining items in the B. must be of type X . Thus Z Z w(b) = 3(16/19-A) + 7w(X ) = 4(1-(19/16)A) . i=0 beB. x Suppose k = 2. If |B | =3, then B n must contain either an X«-item or a Y„-item, b. In either case if either B or B„ contains an X„-item, then s(b) > s(X„) + s(X.) + 1/24 3 4 which is impossible if b is in a bin with two Y „-items, each of which must be larger than s(X»). If |B_| = 4, then B_ must contain two X, -items. If either B or B contains an X^-item, then for the Y-. „-items b^ and b„ in B , we must have s(b.) > 1/3 - (19/12)A . Since 2(l/3-(19/12)A) + 2(91/456+A) must be < 1, we get A > 55/798 contradicting A <_ 37/608. If both B.. and B contain two X, -items, then Z Z w(b) = 2(16/19-A) + 6w(X ) < 3(1-(19/16)A) . i=0 beB. x Suppose k = 1. If |B | =3, then B must contain an X„-item since if B n contains one Y_-item Z Z w(b) < (16/19-A) + w(Y ) + 2w(X ) + w(X ) < 2(1-(19/16)A) , i=0 beB. x 81 while if B_ contains two Y -items, the Y -item must be larger than s(Y 9 ) and I s(b) > 1. If the third item in B is an X,-item, then beB £ E w(b) < 16/19 - A + w(X ) + w(X„) + 2w(X.) < 2(1-(19/16) A) i=0 b£B. l If B.. contains an X„-item, then letting b be the X„-item in B , s(b) > s(X 3 ) + s(X 4 ) since b did not fit in the same FFD -bin as the Y in -item in B n . But a 11 1 then Z s(b) > 3s(X ) + s(X.) > 1 . bE B If |B n | =4, then B_ cannot contain a Y„-item. Thus the only possi- bility is for both B and B to contain an X„-item. In this case if b is the Y ..-item and b' the Y „-item, s(b) <1 - (16/19-A)/4 - (16/19-A)/4 = 29/57 + 7/12A , s(b') < 1 - (16/19-A)/4 - 2(91/456+A) = 146/456 - (5/3)A , and s(b) + s(b') < 16/19 - A which contradicts the definition of a Y -bin. Theorem 3.4.4. If [25/24,20/19), then for any list L, FFD (L) < f(19/16)OPT 1 (L)l + 1 . a - 1 Proof. If we define the bins C. and the function XS as we did in the l preceding two theorems, what we must show is that 82 Z XS(C.) _< 16/19 - A + w(m) . i=l X If A > 73/1824, then t _< 7, and t E XS(C.) _< 7(19/16)A < 16/19 - A + w(m) , i=l 1 unless A > 37/608, in which case t _< 2. Similarly if A < 1 1/114, t _< 55, and t Z XS(C.) < 55(19/16)A < 16/19 - A + w(tn) i=l X If 1/114 < A < 17/1824, then there are at most 7 exceptional items. For the V 2 -items, s(b) - w(b) > (19/32)A. The larger item of type Z„ can be in a bin with at most one Y --item, unless there are no Z„-items. Hence if no exceptional item is in a set of bins {B Q , . . .,B k ) with k > 2, I XS(C.) < 19(16/16)A < 16/19 - A + w(m) = (5/4) (16/19-A) . i=l X If there are no Z„-items, then there are at most 4 exceptional items, and Z XS(C.) £ 19(19/16)A < (5/4) (16/19-A) . i=l 2 But if there are Z -items, then for any item b of type Y „> s(b) >^ s(X„), and there can be at most 3 items of type Y „ in any bin, and no additional items in such a bin. If there are both 83 Zj- and V»-bins, then for an item b of type Y ~, s(b) >_ s(Y ) and we cannot have three Y 19 -items in the same bin. Hence there are at most 5 exceptional items, and the largest exceptional item, whether it is a Z„-item or a V 9 -item can be associated with at most three bins B with XS(B)> 0. Hence Z XS(C.) <_ 19(19/16)A < (5/4)(16/19-A) , i=l L completing the proof of the theorem. We now consider the interval [20/19,8/7), showing that for in this interval, FFD*(a) = 7/6. s(m) = 20/19 - 6/7 + A = 26/133 + A for our minimum counterexample. We obtain the following table as usual. TYPE Y n Y 12 x, SIZE 10/19 < s < 81/133 - 2A 33/133 < s < 10/19 3/7 - A/2 < s 20/57 < s 2/7 - A/3 < s 5/19 < s (6/7-A)/4 < s 26/133 + A < s WEIGHT < size < size 3/7 - A/2 (3/8,2/5)(6/7-A) 2/7 - A/2 (4/15M6/7-A) (6/7-A)/4 (6/7-A)/5 RESTRICTIONS A < 11/266 A < 11/266 A < 16/133 A < 9/133 A < 55/399 A < 2/133 A < 9/133 A < 2/133 Lemma 3.4.5.1 . If b is an item of M, then (a) if b is of type Y , then s(b) - w(b) > (7/12)A (b) if b is of type Y or X , then s(b) - w(b) > (7/3)A 84 Proof . Straightforward. Lemma 3.4.5.2 . If B is any bin of the OPT- -packing containing neither an exceptional item nor an item from a Y -bin, then E w(b) <_ 1 - (7/6) A beB Proof . From the preceding lemma, we need not examine bins containing X or Y -items nor bins with two Y -items. If |b| =5, then B must contain X^-items. Thus |b| <_ 4. Suppose |b| = 3. Then there must be an X^-item in B, and also a Y 2 ~item, a, since w(X„) + 2w(X„) _< 1 - (7/6)A. The remaining item must be of type X„ similarly. But then the fallback item in the Y„-bin with a must be larger than this X„-item, which forces the Y_-bin to be of type X~. Suppose |b| =4. Then B cannot contain an X_-item. If B contains a Y -item, b, then one can easily show that the Y„-bin containing b is exceptional, containing an item larger than s(X«). If B contains only X and X, items, then £ w(b) <_ 2w(X„) + 2w(X.) _< beB 1 - (7/6)A. Lemma 3.4.5.3 . If B is any bin of the OPT, -packing containing k items of type Y _, if B , . . . ,B are the bins of the OPT -packing con- taining the corresponding Y -items, and if none of the B. contain exceptional items, then k E E w(b) < (k+l)(l-(7/6)A) . i=0 beB. i Proof . The case where Y -bins contain more than 2 items is handled as in the preceding cases. 85 Suppose k = 4. Then each item b of type Y _ in B must satisfy s(b) < 1 - 3(33/133+A) = 34/133 - 3A . Then each item b' of 4 type Y,. in £ B. must satisfy 11 . n l i=l s(b') > 6/7 - A - (34/133-3A) = 80/133 + 2A . But then s(b') 4- 2s (X.) > 1, and each B. contains an X -item. Suppose k = 3. There can be at most one item of type X,. or 3 5 Y in S B.. If |B | = 4, then the fourth item must be either of i=0 X type X. or X r . The smallest Y, -item, b, must satisfy s(b) > 4 5 11 (l/3)(l-26/133-A) = 107/399 - A/3 and thus the smallest Y -item b', corresponding to b, must satisfy s(b) > 6/7 - A - (107/399-A/3) = 235/399 - (2/3)A . Then s(b") + 2s(X.) > 406/399 - (7/6)A and A > 2/133. But then 4 s(b') + 2(26/133+A) > 391/399 + (4/3)A > 1 . If B,J = 3, then no B. can contain an X -item, since 1 0' l 3 10/19 + s(X ) + 26/133 + A = 134/133 + 2A/3 > 1 . But then E £ w(b) < 3(6/7-A) + 5w(X ) + w(Y ) < 4(l-(7/6)A) . i=0 beB. J l Suppose k = 2. As in the preceding case, there can be at most one item of type Y„ or X r , and there can be no X -items in any B., 3 5 3 l i > 1. If |b_| = 3, then B. must contain an X_-item. No B. can — ' ' 2 i contain a Y -item since then b, the Y ..-item in that B., satisfies 86 s(b) < 1 - s(Y ) - s(X 4 ) - 139/266 + A/4 and s(b) is less than 10/19 unless A > 2/133, contradicting the existence of a Y„-item. But if each B., i > 1, contains two X. -items, 3 i — 4 then 2 I I w(b) < 2(6/7-A) + s(X ) + 4s(X ) = 3(l-(7/6)A) . i=0 beB. i If |B | = 4, each B., i _> 1, must still contain two X,-items, so the only possibility is for B to contain a Y -item, b. But then the fourth item in B- must be an X.-item which would then have fit in the H Y„-bin containing b, forcing b to be of type X, . Suppose k = 1. Then there can be no X or Y items. B must contain two X, -items. If |B n | = 3, then B n must contain an X -item since otherwise 1 Z E w(b) < 6/7 - A + 2w(Y ) + 2w(X ) < 2(l-(7/6)A) . i=0 beB. i But s(X 2 ) + s(Y 2 ) + 33/133 + A > 1 and 6/7 - A + w(X 2 ) + w(X 3 ) + 2w(X 4 ) = 2(l-(7/6)A) . If |B | =4, then B cannot contain a Y -item since s(Y ) + 2s(X ) + 33/133 + A > 1 . But 6/7 - A + w(X 3 ) + 4(X 4 ) = 2(l-(7/6)A) , 87 and thus B„ cannot contain an X -item and two X. -items. 3.4 Theorem 3.4.5 . If ae [20/19,8/7) , then for any list L, FFD a (L) < r(7/6)OPT 1 (L)l + 1 . Proof . If we define the bins C. and the function XS as before, we must show Z XS(C.) < 6/7 - A + w(m) . i=l 1 If A > 11/266, then t _< 7, and one easily shows the result. Similarly, if A _< 2/133, then there are at most 14 exceptional items. For those of type V„, s(b) - w(b) > 2(7/6) and thus will decrease the sum by 6(7/6)A. If there are Z -items then there can be at most 3 items of type Y „ in any bin and t Z XS(C.) < 56(7/6)A - 6(7/6)A < (6/7-A) + (6/7-A)/5 . i=l X But if there are no Z -items, then there are at most 11 exceptional items and Z XS(C.) < 55(7/6)A - 6(7/6)A < (6/5)(6/7-A) . i=l For 2/133 < A < 11/266, there are at most 7 exceptional items For those of type V„, s(b) - w(b) > (7/12) A. If no exceptional item is in a set of k bins, as in Lemma 3.4.5.3, with k > 2, then Z XS(C.) < 21(7/6)A - (7/6)A < (5/4)(6/7-A) . i=l X 88 We now wish to examine the interval [8/7,15/13). As shown by example 3.3.6, FFD (L) can be as large as [(13/12)OPT (L) 1 . We will show in Theorem 3.4.6, that for all list L, FFD (L) < a — f(13/12)OPT 1 (L)l, and consequently FFD*( a ) = 13/12 for ae [8/7,15/13) . We are able to reduce the constant in this case to primarily because we can have no bins of type Y , simplifying the proof con- siderably. Since the smallest item in any minimal counterexample M will have size greater than 20/91, the largest item can have size at most 1 - 2(20/91) = 51/91 which is less than a/2. Thus there can be no fallback 1-bins and the following table summarizes the information we need. TYPE SIZE WEIGHT RESTRICTIONS X 2 6/13 - A/2 < s 6/13 - A/2 A < 6/91 Y 2 8/21 < s (2/5,3/8)(12/13-A) A _< 6/91 X 3 4/13 - A/2 < s 4/13 - A/2 A < 31/273 Y 3 2/7 < s (4/15)(12/13-A) A < 4/455 X 4 3/13 - A/2 < s 3/13 - A/2 A < 6/91 x. 20/91 + A < s (12/13-A)/5 A < 4/455 Lemma 3.4.6.1 . If B is an item of M of type Y or X then s(b) - w(b) > (13/12)A. Proof . Straightforward. Lemma 3.4.6.2 . If B is any bin in the OPT., -packing of M which contains n o exceptional items, then Z w(b) _< 1 - (13/12)A. beB 89 Proof . Since 5(20/91) > 1, |b| < 5. Suppose |b| = 3. Then B must contain an item of weight > w(X„) . If B contains an item of type X ? , then the second largest item must be either of type Y or of type X since w(X ) + 2w(X ) < 1 - (13/12)A. But s (Y ) + s(X ) + 20/91 + A > 1 and s(X„) + 2s (X_) > 1. Thus B must contain an X~-item and an X,-item. But then E w(b) = 1 - (13/12)A. beB Suppose |b| = 4. Then B cannot contain an item of type Y or X„, B must contain an item larger than s(X.) , but 2s(X„) + 2s(X.) > 1, and w(Xj + 3w(X.) < 1 - (13/12)A. 3 4 — Theorem 3.4.6 . For any ae [8/7, 15/13) and any list L, FFD a (L) < [(13/12)0PT 1 (L)1 Proof. Defining C. and XS as before, what we must show here is that E XS(C.) < w(m) . i=l X If A > 6/91, there are no exceptional items. If A < 4/455, then t <_ 11, since the V -items cannot be in a bin B with XS(B) > 0. For any bin C, XS(C.) < (13/12)A. Thus E XS(C.) < 11(13/12)A < (12/13-A)/5 = w(m) . i=l X If 4/455 < A < 6/91, then t ^ 7 and w(m) = (12/13-A)/4. Let v and v be the two V ? -items. Then s( V;L ) + s(v 2 ) - (w(v 1 )+w(v 2 )) > 19/273 + 3A/4 > (7/4)A , and 90 s(v..) - w( Vi ) > (7/8)A, i = 1,2 . The same result holds for Y„-items also, of course. Thus if any C. contains an item of type V„ or Y , then XS(C.) < (5/24)A . Moreover, if A < 76/1547, then 19/273 + (3/4)A > 2(13/12)A and no bin B containing either v., or a Y -item, can have XS(B) > 0. In this case then, t < 5, and Z XS(C.) < 5(13/12)A < (12/13-A)/4 i=l X If A > 76/1547, then for any X,-item b s(b) - w(b) > 20/91 + A - (12/13-A)/4 > A Thus any bin B containing an X,-item has XS(B) < A/12. Suppose B and B 1 are the bins in the OPT., -packing containing b, the larger item of type Z , and b', the smaller item of type Z~, respectively. Then if there are two items in B \j B' other than b and b' which are larger than s(X~) in size we would have s(b) + s(b') + 2s(X 3 ) + 2(20/91+A) < 2 which implies A j< 3/91, contradicting A > 76/1547. Since there are 6 items in B U B', there are 3 items smaller than s(X ). If there are no Z -items, then XS(B) + XS(B') < 0. If there is one Z -item or two Z„-items one of which is larger than s(X~) then XS(B) + XS(B') < 2(A/12) , and 91 Z XS(C.) < 2(A/12) + 2(13/12)A + 2(5/24)A < w(ra) 1=1 If there are two Z -items of size s(X„), then E XS(C.) < A/12 + (13/12)A + (13/12)A + 2(5/24)A < w(m) i=l 1 Finally if all three Z -items are in B B', then Z XS(C.) < A/12 + (13/12)A + 2(5/24)A < w(m) . i=l 1 For ae [15/13,36/31) we wish to show FFD*(a) = 31/30. Then with notation as in the preceding cases, s(m) = 75/403 + A, A > 0. There are at most 6 items in any bin of size a and 5 items in a bin of size 1. We summarize our information about the items of M in the following table. TYPE Y ll 12 X, X, SIZE 15/26 < s < 253/403 - 2A 137/403 + A < s < 15/26A 15/31 - A/2 < s 5/13 < s 10/31 - A/3 < s 15/52 < s (30/31-A)/4 < s 3/13 < s 6/31 - A/5 < s 75/403 + A < s WEIGHT < size < size 15/31 - A/2 RESTRICTIONS A < 41/1612 A < 41/1612 A < 178/1205 (2/5,3/8,5/12) (30/31-A) A < 165/1612 10/31 - A/3 (4/15,5/18) (30/31-A) (30/31-A)/4 (5/24) (30/31-A) 6/31 - A/5 5/31 - A/6 A < 178/1205 A < 18/403 A < 165/1612 A < 5/806 A < 18/403 A < 5/806 92 In this interval, and for the succeeding ones, it will be possible for w(b) to be greater than s(b) if b has type Y and the fallback item is of type X,. In that case, of course, A <_ 5/806. Lemma 3.4.7.1 . If b is an item of M, then (a) if b has type Y , then s(b) - w(b) > 5/31/30)A if A _< 5/806 s(b) - w(b) > (31/30)A/2 if A > 5/806 s(b) - w(b) > (31/30)A + (5/12)(30/31-A) - s(Y 2 > if A < 5/806 (b) if b has type Y. or X,, then 4 o s(b) - w(b) > 4(31/30)A s(b) - w(b) > (31/30)A + (5/12)(30/31-A) - s(Y 2 ) Proof . Straightforward. Thus if A _< 5/806, no bin B of size 1 with an item of type Y , Y,, or X^ can have Z w(b) > 1 - (31/30)A. 4 6 beB Lemma 3.4.7.2 . If B is a bin in the OPT.. -packing containing neither exceptional items nor items from Y -bins, then £ w(b) <^ 1 - (31/ 30) A, beB Proof . If B is a counter example, B cannot contain items of types X, , Y., or Y„ if A < 5/806. If |b| = 3, then B must contain either an o 4 3 — X_-item or a Y -item. If it contains an X_-item, then it cannot also contain an X~-item since s(X„) + s(Y_) + 75/403 + A > 1. It cannot contain an X„-item since s(X ) + s(X.) + s(X. ) > 1, while 3 I 3 4 w(X 2 ) + w(X 3 ) + w(X 5 ) < 1 - (31/30)A. But w(X 2 > + w(Y 3 ) + w(X 4 > < 1 - (31/30) A, also. If B contains a Y -item, let B = {a,b,c}, with s(a) >_ s(b) >_ s(c), and a of type Y . Let B' = {a,a',d} be the bin of type Y_ containing a. Then since s(a') >^ s(b) , in order to prevent domination, s(c) > s(d) and 93 s(a) + s(a') + s(.c) > 15/13 while s(a) + s(b) + s(c) < 1 . Hence s(a') > s(b) + 2/13. If b were of type Y , then B' would be an exceptional bin since s(a') > s(X 9 ). Thus b must be of type X„. Then c must also be of type X„, since (5/12)(30/31-A) + w(X ) + w(X 4 ) <1 - (31/30)A . But then A > 18/403 to allow s(Y ) + 2s(X ) < 1. Then s(a') > 10/31 - A/3 + 2/13 > s(X 2 ) and B' is an exceptional bin. Suppose |B| = 4. Since s(X ) + 3(75/403+A) > 1, and s(Y ) + s(X ) + 2(75/403+A) > 1, B cannot contain an X -item, and if it contains a Y -item, then the remaining items are of type X . But then E w(b) _< 1 - (31/30) A. B cannot contain two Y -items so B beB must contain an X„-item. B cannot contain three items of type X, in addition, since either s(X 3 ) + 3s(X 4 ) > 1 or s(X ) + 3(75/403+A) > 1 . Hence E w(b) < w(X 3 ) + 2w(X 4 ) + w(X 5 ) = 1 - (31/30)A bcB 94 since s(X_) + s(Yj + s(X.) + 75/403 + A > 1 . 3 3 4 Suppose |B| =5. Either s(X ) + 4s(X ) > 1, or s(X.) + 4(75/403+A) > 1. Thus B cannot contain an X,-item. Hence B can only contain items of type X , and E w(b) _< 1 - (31/30)A. beB Lemma 3.4.7.3 . If B is a bin in the OPT, -packing containing k items of type Y 9 , if B ,...,B are the bins in the OPT -packing containing the Y -items corresponding to the Y -items in B , and if there are no exceptional items in any B., then k E E w(b) < (k+l)(l-(31/30)A) . i=0 beB. i Proof . Since 3(137/40 3+A) > 1, k must be £ 2. If B contains a Y 1 -item, B can contain no X.-items since 15/26 + s(X.) + (75/403+A) > 1, 11 4 4 Suppose k = 2. Then |B_| = 3. Since B_ cannot contain a Y 9 ~item, each B., i >_ 1, must contain two X,.-items. B_ cannot contain an X„-item so E Z w(b) < 2(30/31-A) + w(Y ) + 4w(X ) i=0 beB < 3(1-(31/30)A) Suppose k = 1. If there is no Y„-item in B , then B contains two X r -items. If |b„| =4, B. cannot contain a Y„-item or two X.-items 5 ' ' 3 4 But then E E w(b) j< 30/31 - A + w(X ) + 4w(X ) < 2(l-(31/30) A) . i=0 beB. x 95 If |B Q | - 3, I E w(b) < 30/31 - A + 2w(X ) + 2w(X ) = 2(1-(31/30)A ) . i=0 beB. l Thus B must contain a Y -item, a. Then |B | = 3, and if b is the item of type Y , B = {a,b,c}, with s(c) < 1 - s(Y ) - (137/403+A). Hence w(c) s(X,), we must have s(a) <_ 337/806 - 3A/4. If s(b) _> s(a), we would have s(a) + s(b) + s(c) > 1, but if s(b) < s(a), then s(a) + s(b') > 15/13, where b' is the Y -item in B . But then s(b') > 593/806, which is impossible. Theorem 3.4.7 . If ae [15/13, 36/31) , then for any list L, FFD (L) < |'(31/30)OPT 1 (L)1 + 1 • a — 1 Proof . If the bins C. and the function XS are defined in the usual way, what we need to show is E XS(C.) < 30/31 - A + w(m) . 1-1 If A >_ 41/1612, then there are at most 14 exceptional items and no bins of type Y, . XS(C.) <_ (31/30)A for each i and since t <_ 14, we have £ XS(C.) < 14(31/30)A < 30/31 - Atw(m) i=l X 96 if A < 18/403, while if A > 18/403, t _< 7 and 7(31/30) (178/1205) < 30/31 - A + w(m) = (5/4)(30/31-A). If A _< 5/806, then there are at most 23 exceptional items. Each one can be associated with at most 3 bins B with XS(B) > 0. Hence t _< 69 and t £ XS(C.) < 69(31/30) (5/806) < 30/31 - 5/806 + w(m) i=l X unless there are some Y -items satisfying s(b) < w(b) . But in order for this to be possible, there can be no items of types Z„, V , Z , or V,, making the number of exceptional items at most 9. Since w(b) - s(b) is much too small to make up the difference, our inequality is still satisfied. Suppose now that 5/806 < A < 41/1612. Then there are at most 14 exceptional items, and for an item of type V„, s(b) - w(b) > (4/3)(31/30)A. Hence t _< 42 and t Z XS(C.) < 42(31/30) (41/1612) - 4(31/30) (41/1612) i=l < 30/31 - 41/1612 + w(m), and the theorem is proved. For ae [36/31, 48/41), we wish to show FFD*(a) = 41/40. For the last element, m, in the minimum counterexample m, we have s(m) = 236/1271 + A, A > 0. We summarize our information in the usual table. 97 TYPE Y n Y 12 SIZE 18/31 < s < 799/1271 - 2A 441/1271 + A < s < 18/31 (40/4l-A)/2 < s 12/31 < s (40/41-A)/3 < s 9/31 < s (40/41-A)/4 < s 36/155 < s (40/41-A)/5 < s 236/1271 + A < s WEIGHT < size < size (40/41-A)/2 RESTRICTIONS A < 61/2542 A < 61/2542 A < 126/1271 (3/8,2/5,5/12) (40/41-A) A < 173/1271 (40/41-A)/3 (4/15,5/18) (40/41-A) (40/41-A)/4 (5/24) (40/41-A) (40/41-A) /5 (40/41-A) /6 A £ 563/3813 A < 296/6355 A < 173/1271 A _< 10/1271 A < 296/6355 A < 10/1271 As for the preceding interval, if A _< 10/1271 it is possible for s(b) to be less than w(b) , if b is of type Y„ and the fallback. item is of type X, . But as for that interval, in order for that to b happen for more than one item, we can have no items of types Z„, V , Z, or V, since they would have become the fallback items. Also there may be two fallback items of type X, in a Y 9 ~bin, but then we can assign the two Y„-items weight (40/41-A) /3 and treat them like X„-items . Lemma 3.4.8.1 . Let b be an item of M. (a) If b has type Y , then s(b) - w(b) > (41/40)A/2 if A > 10/1271, and s(b) - w(b) > 2(41/40)A if A ^ 10/1271. (b) If b has type Y. or X,, then s(b) - w(b) > 3(41/40)A and 4 6 s(b) - w(b) > (41/40)A+ (5/12) (40/41-A) - s(Y 2 ). Proof. Straightforward computation using entries from the table. 98 Lemma 3.4.8.2 . If B is a bin in the OPT., -packing containing neither exceptional items, nor items from Y -bins, then E w(b) <_ 1 - (41/40)A beB Proof . If B is a counterexample, then B cannot contain an item of either type X, or Y . Suppose |b| = 5. Then since either s(X 4 ) + 4s(X 5 ) > 1 or s(X,) + 4(236/1271+A) > 1 B cannot contain an item of type X,. But then E w(b) <^ 1 - (41/40)A. beB Suppose |b| =4. B cannot contain an X_-item, and s(Y ) + s(X ) + 2(236/1271+A) > 1 . Thus if B contains a Y -item, we must have E w(b) _< (5/12)(40/41-A) + 3w(X ) < 1 - (41/40)A . beB If B contains an X„-item, it cannot also contain an item of type Y since either s(X 3 ) + s(Y 3 ) + 2(236/1271+A) > 1 or s(X 3 ) + s(Y 3 ) + 2s(X 5 ) > 1 Also s(Xj + 2s(X,) + 236/1271 + A > 1 3 4 so B can contain only one X,-item and 99 w(Xj + w(X.) + 2w(X c ). < 1 - (41/40)A . 3 4 5 Suppose |b| = 3. Then B must contain either an X~-item or a Y 9 ~item. If B contains an X„-item, then B cannot also contain an X~-item, and w(Xj + w(Yj + w(X.) < 1 - (41/40)A . 2 3 4 If B = {a,b,c}, with a of type Y , and s(a) >_ s(b) >_ s(c), then b must either be of type X_ or Y since otherwise w(a) + w(b) + w(c) < ((5/12)+2(5/18))(40/4l-A) <1 - (41/40)A . But if b is of type Y~, then the other item, a', of type Y in the same FFD -bin as a satisfies s(a') > s(Y_) + 5/31 > s(X„). Thus b a 11 must have type X„ and s(a') > s(X ) + 5/31. This also is > s(X ) unless A _< 10/1271. If c has type Y or X , then s(a) + s(b) + s(c) > 12/31 + (40/41-A)/3 + 9/31 > 1 But if w(c) < w(X ) , w(a) + w(X ) + w(X.) < 1 - (41/40)A . 3 4 — Lemma 3.4.8.3 . If B is a bin in the OPT -packing containing k items of type Y „, if B , . . . ,B are the bins in the OPT -packing containing the corresponding Y -items, and if no B. contains an exceptional item, then k E I w(b) < (k+l)(l-(41/40)A) . i=0 beB. l 100 Proof . Since 3(236/1271+A) > 1, k < 2. If B is any bin in the OPT - packing containing a Y -item, then the remaining items must be of type Y. , X_, or X.. Unless B_ contains a Y--item, B cannot contain a 4 5 6 2 Y. or X -item and B must contain two X -items. 4 6 5 Suppose k = 2. Since 2(441/1271+A) + 2(236/1271+A) > 1 , we must have |B | = 3. Moreover, the third item must be of type Y , X, , Y. , X c , or X,. Since there can be no Y. or X, items, 4 4 5 6 4 6 E E w(b) < 2(40/41-A) + w(Y ) + 4w(X ) < 3(1-(41/40)A) . i=0 beB. i Suppose k = 1. If B. contains an item, a, of type Y„, then B = 3, and B = {a,b,c}, with'b of type Y 2 - Then s(b) >_ s(a) or else a would have fit in the Y, bin in place of b. Then s(c) < s(Y.) 1 4 since 2s(Y~) + s(Y.) > 1. There can be at most one Y.-item in B rt \J B, I 4 4 1 Thus E Z w(b) _< (40/41-A) + (4/5)(40/41-A) + s(Y ) < 2(1-(41/40)A) . i=0 beB. i If B. does not contain a Y -item, then neither B. can contain an 2 i item of type Y or X . If b has type Y also, s(b) - w(b) > 2(41/40)A, since A _< 61/2542. If |B | =4, then B can contain only X and X items, and at most one X,-item. Hence 4 1 E E w(b) _< 40/41 - A + s(X ) + 4s(X ) = 2(1-(41/40)A) . i=0 beB. l 101 If |B I = 3, then B can contain only X„, X , and X items. But if b is the Y -item, s(b) 4- 2s(X ) > 1, while if B contains an X,-item E I w(b) < 40/41 - A + w(X ) + w(X ) + 2w(X ) < 2(1-(41/40)A) i=0 beB. l Theorem 3.4.8 . If ae [36/31,48/41) , then for any list L, FFD a (L) < [(41/40)OPT (L)l + 1 . Proof . As usual we must prove Z XS(C.) < 40/41 - A + w(m) i=l X where C., XS , and m are defined as in the preceding theorems. The proofs for A > 61/2542 and A <_ 10/1271 are straightforward, keeping in mind that when A _< 10/1271, there may be items of type Y for which s(b) < w(b). If 10/1271 < A < 61/2542, then there are at most 14 exceptional items and the V„-items satisfy s(b) - w(b) > 2(41/40). Hence t < 42 and I XS(C.) < (42-6)(41/40)A < 40/41 - A + w(m) . i=l X completing the proof. We now examine the interval ae [48/41, 72/61) , showing that FFD*(a) = 61/60 for a in this interval. The minimum size for any element is s(m) = 464/2501 + A, A > 0. We summarize the usual information in table form. TYPE SIZE Y ll 24/41 < s < 1573/2501 - 2A Y 12 867/2501 + A < s < 24/41 X 2 30/61 - A/2 < s Y 2 16/41 < s X 3 20/61 - A/3 < s Y 3 12/41 < s X 4 15/61 - A/4 < s Y 4 48/205 < s X 5 12/61 - A/5 < s x* 464/2501 + A < s 102 WEIGHT RESTRICTIONS < size A < 109/5002 < size A < 109/5002 30/61 - A/2 A _< 222/2501 (3/8,2/5,5/12) (60/61-A) A ^519/5002 20/61 - A/3 A < 1109/7503 (4/15,5/18)(60/61-A) A ^60.4/12505 15/61 - A/4 A _< 519/5002 (5/24) (60/61-A) A < 70/7503 12/61 - A/5 A < 604/12505 10/61 - A/6 A < 70/7503 Lemma 3.4.9.1 . Let b be an item in M. (a) If b has type Y , then s(b) - w(b) > (61/60)A/2 if A > 109/5002, s(b) - w(b) > (3/2)(61/60)A if A < 109/5002, and s(b) - w(b) > 2(61/60)A if A < 70/7503 (b) If b has type Y, or X , then s(b) - w(b) > 3v61/60)A and s(b) - w(b) > (61/60)A + (5/12) (60/61-A) - s(Y 2 ). Proof . Straightforward. Lemma 3.4.9.2 . Let B be a bin in the OPT -packing containing neither exceptional items nor items from bins of type Y . Then E w(b) < 1 - (61/60)A . beB Proof . Suppose B is a counterexample. By Lemma 3.4.9.1, B cannot contain items of types Y. or X^. Suppose |b| =5. B cannot contain an X,-item since either 4 103 s(X 4 ) + 4s(X 5 ) > 1 or s(X.) + 4(464/2501+A) > 1 . 4 Hence B can only contain X -items, and Z w(b) < 1 - (61/60)A . beB Suppose |b| =4. B cannot contain an X 9 ~item, and if B contains a Y -item, the remaining items must be of type X . But then Z w(b) < (5/12)(60/61-A) + 3w(X ) = 1 - (61/60)A . beB B cannot contain an X -item, and a Y -item or an X -item and two X. -items. Hence if B contains an X„-item, 4 3 Z w(b) < w(Xj + w(X.) + 2w(X c ) < 1 - (61/60)A . beB If B contains a Y -item, then Z w(b) 1 while w(Xj + w(Yj + w(Xj < 1 - (61/60)A. If A > 70/7503, then I 3 4 — w(Xj + w(Yj + w(X.) < 1 - (61/60) A. But if B does not contain a I 3 4 — Y -item, 104 Z w(b) < w(Xj + 2w(X.) < 1 - (61/60)A . beB ~ 2 4 If B contains a Y -item, then let B = {a,b,c}, with s(a) >^ s(b) >_ s(c) and a of type Y~. If b has type Y , or X„, then a comes from an exceptional bin since s(a') > s(b) + 7/41 if a' is the other Y -item in the same bin as a in the FFD -packing. But then Z w(b) < w(Y ) + 2w(Y ) < 1 - (61/60)A . beB L J Lemma 3.4.9.3 . If B is a bin in the OPT -packing containing k items of type Y , if B , . . . ,B are the bins in the OPT -packing containing the corresponding Y -items, and if none of the B. contain exceptional items, then k Z Z w(b) < (k+l)(l-(61/60)A) . i=0 beB. i Proof . Since 3(867/2501+A) > 1, k < 2. Also |B | = 3 or 4, and no X, or Y.-item can be included unless there is a Y -item in B_. If B 6 4 2 is a bin in the OPT -packing containing a Y -item, then the remaining items must be X r or X -items. 5 6 Suppose k = 2. Since |B | = 3 and 2(867/2501+A) + s(Y ) > 1 we must have Z Z w(b) £ 2(60/61-A) + w(X ) + 4w(X ) = 3(1-(61/60)A) . i=0 beB. i Suppose k = 1. B cannot contain an X_-item, and if B contains a Y -item, then B = {a,b,c} with s(a) >_ s(b) >_ s(c), a of type Y , and b of type Y_. If c is of type X,., then 105 Z Z w(b) _< 60/61 - A + 3w(X ) + (5/12)(60/61-A) < 2(1-(61/60)A) i=0 beB. 1 If c is of type Y and w(b) < (2/5) (60/61-A) , then 1 Z Z w(b) _< 60/61 - A + (4/5+5/18) (60/61-A) < 2(1-(61/60)A) . i=0 beB. i But if w(b) = (5/12) (60/61-A) , then c would not fit in the Y -bin con- taining b and that bin is exceptional. If B_ contains neither an X -item nor a Y -item, then if |b I = 3, since 867/2501 + A + 25(X 3 ) > 1 , we must have Z Z w(b) < 60/61 - A + w(X ) + w(X ) + ws(X ) i=0 beB. i < 2(1-(61/60)A) . If |b J = 4, then B must contain an X,-item since otherwise Z Z w(b) < 60/61 - A + 5w(X ) < 2(1-(61/60)A) . i=0 beB. l But then if b and b' are the Y -and Y _-items in B B , s(b') < 1 - s(X.) - 2s(X c ) = 22/61 + (13/20)A 4 5 while s(b) < 1 - 2s(X 5 ) = 37/61 + (2/5)A 106 Hence s(b) + s(b') < 59/61 + 21A/20. Since s(b) + s(b') > 60/61 - A, we must have A < 70/7503. But then s(b) > 1577/2501 - 2A . Theorem 3.4.9 . If cte [48/41, 72/61) , then for any list L, FFD a (L). _< [(61/6)OPT 1 (L)l + 1 . Proof . If we define C . , XS, and m as usual, then we must prove t Z XS(C.) < 60/61 - A + w(m) . i=l 1 If A > 109/5002, then there at most 14 exceptional items. If A £ 604/12505, then t Z XS(C.) < 14(61/60) (604/12505) < 60/61 - A + w(m) i=l X if A > 604/12505, there are only 7 exceptional items and t Z XS(C.) < 7(61/60) (222/2501) < 60/61 - A + w(m) . i=l 1 If A <_ 70/7503, then there are at most 23 exceptional items. If there are no Y -items satisfying s(b) < w(b) , then t Z XS(C.) £ 69(61/60)(70/7503) < 60/61 - A + w(m) . i=l 1 If there are Y^-items satisfying s(b) < w(b) , then there are at most 9 exceptional items, and the Z~-items cannot be in a bin with a Y -item. Since w(b) - s(b) < 48/2501 - 5 /12, and there can be at most 7 of these in any of the C, 107 E XS(C.) < 7(48/2501-5A/12) + 27(61/60)A 1=1 X < 60/61 - A + w(m) Suppose now that 70/7503 < A < 109/5002. Then there are at most 14 exceptional items and the V -items satisfy s(b) - w(b) > (4/ 3)(61/60)A Thus I XS(C.) < (42-4) (61/60) (109/5002) < 60/61 - A + w(m) i=l X and the proof is complete. The last interval we examine in this section is [72/61,2). We wish to show that FFD*(a) = 1 for a in this interval. The smallest item, m, in M has s(m) = 11/61 + A, A > 0. There are at most 6 items in any bin of size 72/61, and at most 5 items in any bin of size 1. As usual, we construct an information table. TYPE SIZE WEIGHT RESTRICTIONS Y ll 36/61 < s < 39/61 - - 2A < size A < 3/122 Y 12 22/61 + A < s < 36/61 < size A < 3/122 X 2 (l-A)/2 < s (l-A)/2 A _< 17/183 Y 2 24/61 < s (3/8,2/5,5/12)(l-A) A < 7/61 X 3 (l-A)/3 < s (l-A)/3 A < 28/183 Y 3 18/61 < s (4/15,5/18) (1-A) A < 17/305 X 4 (l-A)/4 < s (l-A)/4 A < 7/61 Y 4 72/305 < s (5/24) (1-A) A < 1/61 X 5 (l-A)/5 < s (l-A)/5 A < 17/305 x* 11/61 + A< s (l-A)/6 A < 1/61 108 Lemma 3.4.10.1 . Let b be an item in M. (a) If b has type Y , then s(b) - w(b) > A if A < 1/61, and if A > 1/61, then s(b) - w(b) > 2A/3. (b) If b has type Y 4 , then s(b) - w(b) > (3/2)A. (c) If b has type X,, then s(b) - w(b) > 2A. b Proof . Straightforward. Lemma 3.4.10.2 . If B is any bin in the OPT -packing which contains neither exceptional items nor items from Y -bins, then £ w(b) _< 1 - A, beB Proof . Suppose B does not contain an item of type Y . Then B cannot contain Y. or X,-items, nor Y„-items if A < 1/61. |b| ^5 since if B 4 6 3 _ i i were to contain an item b with s(b) > s(X,), either s(b) + 4s(X ) > 1 or s(b) + 4(11/61+A) > 1. If |b| = 4, then B cannot contain an X_-item nor an X -item and two X, -items. Since 4 w(Xj + w(X.) + 2w(X c ) < 1 - A 3 4 5 and s(X 3 ) + s(Y 3 ) + 2(11/61+A) > 1 if A > 1/61, B cannot have an X -item. B cannot have two Y_-items no r a Y»-item and three X. -items. But if B contains only X. and 3 4 4 X,--items, the lemma certainly holds. If |b| = 3, then B must contain an X -item and cannot contain an X_-item. Thus B must contain a Y»-item, but then s(X„) + s (Y ) + s(X 4 ) > 1 and w(X 2 ) + w(X 5 ) + (5/18) (1-A) _< 1 - A. Thus B must contain a Y -item, and |b| _< 4. If |b| = 4, then B cannot contain an X,-item, since s(X.) + s(Y ) + 2(11/61+A) > 1. If B 109 contains an X,-item, then b Z w(b) < (5/12) (1-A) + 2(5/24) (1-A) + (l-A)/6 = 1 - A . beB But then if B contains a Y,-item, Z s(b) > s(Yj + s(Y.) + s(X c ) + 11/61 + A > 1 . beB 2 4 5 Thus B contains three X -items. If Z w(b) > 1 - A, then for b, the beB Y~-item, w(b) = (5/12) (1-A). In that case either b comes from an exceptional bin in the FFD -packing, or there are no X -bins and the X,.-items are in fact fallback items in other Y_-bins to the left of the bin containing B. In this case we can redefine our weight function so that all Y -items are given weight (5/12) (1-A) and all fallback items are given weight (l-A)/6. Then Z w(b) = 1 - A. beB Suppose |b| = 3. Let B = {a,b,c}, s(a) >_ s(b) >_s(c). Then a has type Y„ and b has type either Y ? or X„, since w(a) + 2(5/18) (1-A) < 1 - A . If {a,a',d} is the Y_-bin containing a in the FFD -packing then s(a') _> s(b) and to prevent domination s(a') + s(b) + 11/61 > s(X ), if s(b) _> s(X ). Thus {a,a',d} is exceptional. Lemma 3.4.10.3 . If B is any bin in the OPT.. -packing containing k items of type Y _, if B , ..., B are the bins in the OPT, -packing containing the corresponding Y 11 -items, and if no B. contains an exceptional item, where we include the last Y.-bin as exceptional if there are no V,-bins, then k Z Z w(b) _< (k+l)(l-A) . i=0 beB. 110 Proof . Since 3(22/ 61+A) > 1, k <_ 2. Suppose k = 2. Then |b | - 3, and the third item c satisfies s(c) < 17/61 - 2A . There can be at most 2 one item in KJ B. of type Y. or X, , since there are no Y -items. Any i-0 x 4 6 2 bin B containing an item of type Y - can only contain only items of type X_ or X,. Thus if c is of type X-, Z E w(b) < 2(1-A) + 5w(X ) - 3(1-A) i=0 beB. ^ l If c is of type X,, then 2 Z Z s(b) > 2(1-A) + (21/20) (1-A) > 1 i=0 beB. i if A < 1/61, while if A > 1/61 Z Z s(b) > 2(1-A) + s(X.) + 4(11/61+A) > 1 . i=0 beB. l Thus c must be of type Y, . Then B and B must each contain two X -items. Let B 1 be the Y,-bin in the FFD -packing containing c. Suppose that there is a bin B' 1 to the right of B' of type Y, or V . Then B'' contains an item d such that s(c) >_ s(d) > 72/305. For each of the X^-items, f, 4s(c) + s(f) > 72/61, or else f would have fit in B" making B" a bin of type X 5 - Thus s(c) > 18/61 - s(f)/4. Letting g denote the smallest of the X -items in B ^B , we have 2 Z Z s(b) > 2(1-A) + s(c) + 4s(g) i=0 beB. i > (15/4)s(g) - 43/61 - 2A . Ill This must be < 3 which implies A > 1/61. We conclude that B' is the last Y.-bin and that there are no V.-bins. This case is the special 4 4 one mentioned in the theorem. Suppose k = 1. Suppose B contains an item b of type Y . Then |B I = 3, and a, the Y „-item in B , satisfies s(a) >_ s(b). The remaining item must have type X,. or X,, but w(b) cannot be (5/12) (1-A) unless B rt (J B. contains only X, -items. Thus 1 6 Z Z w(b) < 1 - A + (2/5) (1-A) + 3w(X ) = 2(1-A) i=0 beB. i or Z E w(b) < 1 - A + (5/12) (1-A) + 3w(X ) < 2(1-A) . i=0 beB. l If B„ contains no item of type Y , then neither B. can contain an X,-item. |B_| > 3 since B. cannot contain an X -item if |B_| = 3. b U ' U Z ' U ' Thus |B_| = 4, and the remaining items must be of types X,, Y , or Xj. But if B contains an X,-item, then 1 Z Z s(b) > 1 - A + (21/20) (1-A) > 1 i=0 beB. if A < 1/61, while 1 Z Z s(b) > 1 - A + s(X.) + 4(11/61+A) > 1 i=0 beB. i if A > 1/61. Thus B must contain a Y,-item, b, and the same computa- tion used when k = 2 shows now that there is no Y. or V, bin to the 4 4 right of the Y,-bin containing b in the FFD -packing. 112 Theorem 3.4.10 . If ae [72/61,2), then for any list L, FFD a (L) < OPT (L) + 1 . Proof. We define C., XS, and m as usual. We need to show that l E XS(C.) < 1 - A + w(m) . i=l X If A > 7/61, then t _< 2 and XS(C.) < A for each C If A > 17/305, then t < 7 and E XS(C.) _< 7A < 1 - A + w(m) . i=l L If 17/305 >A> 3/122, then t < 14 and 14A < 1 - A + w(m) . If 1/61 < A < 3/122, then t _< 42, and 42(3/122) < (1-3/122) (6/5) . Suppose now that A <_ 1/61. There are at most 23 exceptional items. If there are no Y -items such that s(b) < w(b), then t _< 69, and E XS(C.) < 69A < 1 - A + (l-A)/6 . i=l If there are Y -items such that s(b) < w(b) , then there are no Z , V„, Z., or V. items and t < 27. At most 7 of these bins can have Y 3 4 4 — l items in them, and w(b) - s(b) < 17/732. Hence E XS(C.) < 27A + 7(17/732) <(l-A)(7/6) , i=l 1 and the theorem is proved. 113 3. 5 An Application to Multiprocessor- Scheduling In the preceding section, we showed that for ae[l,2), and for any list L, FFD (L) _< [FFD*(a)OPT (L) 1 + 1, while in section 3.3, we showed that for each a there exist lists L for which FFD (L) = a [FFD* (a) OPT (L) "I . For a < 72/61, we know of no case where the constant 1 is necessary, suggesting that with more care we might be able to prove FFD (L) _< fFFD*(a)OPT 1 (L) 1 , for all L. While this may be possible for a < 72/61, we show in example 3.5.1 that for ae [72/61,13/11) , there exist lists L for which FFD (L) = OPT (L) + 1 - FFD*(a)OPT (L) + 1 since FFD*(a) = 1 for ae[72/61,2). Example 3.5.1 . ae [72/61,13/11) . L consists of k items a 1 ,...,a. of size 1, 8 items b n ,...,b of size Ik 1 o 40/66, 8 items c 1 ,...,c Q of size 25/66, two items d , d of size 24/66, J. o 1 Z two items e 1 , e of size 17/66, 3 items f , , f 9 , f~ of size 16/66, and 16 items g n , g„, . . . ,g. , of size 13/66. The k items of size 1, of ± A lb course, are in separate bins with no other items in both packings. For the remaining items, in the FFD -packing we have 8 bins of type Y containing b. and c, i = 1,...,8. There is 1 bin of type Z containing d 1 , d , and e.. , 1 bin of type Z, containing e~, f .. , f„, f„. The 16 items of size 13/66 fit in 3 bins of type X and the last bin containing m = g ,. Thus FFD (L) = k + 14 . However ^ b i '8 2 i-l' 8 2i^ ' ± = ''-'•••' 8 ' * c 2i-l' °2i' f i* ' ± = 1 ' 2 ' 3 and {c. -,d.,e.}, i = 1,2 is a packing of the items of size < 1 into 13 bins of size 1. Hence OPT (L) = k + 13, and FFD (L) = OPT (L) + 1 114 for all a < 13/11. Figure 3.5.1 gives a pictorial representation of the two packings, indicating the sizes of items packed in the same bin. In Coffman, Garey, and Johnson (1978), an algorithm for multipro- cessor scheduling, called MULTIFIT, is described which uses the FFD - packing of items to obtain a near optimal schedule for independent jobs on identical processors. The basic idea of the algorithm is to consider the processors as bins of size a for different values of a, trying to pack the items, i.e. jobs, into the given number of bins, i.e. processors. If we had been able to prove that FFD 7 „,,,(L) j< OPT (L) for all lists L, this would have implied that any set of jobs which could be completed in time T on n processors, could also be completed in time T( 72/61) using the FFD..,-,,.. -packing to construct the schedule. Since there is, unfortunately, a constant 1 added on, we could only conclude that we could finish in time T( 72/61) on n+1 processors, a most unsatisfactory conclusion. Example 3.5.1 shows that for some sets of jobs, algorithm MULTIFIT requires time 13/11 times the minimum schedule length. We conjecture that for a >_ 13/11, it would be possible to prove that FFD (L) <_ OPT (L) for all lists L, but such a proof would require a very careful analysis of the behavior of the exceptional items. A proof that FFD^.^CL) <_ OPT (L) for all L would probably be much simpler since for a >^ 6/5, there would be no bins of type Y, . It seems likely that the worst case performance for algorithm MULTIFIT is between 13/11 and 6/5. One change in algorithm MULTIFIT that would seem to bring improved performance would be to use the largest processing time first, 115 k bins 8 bins 1 bin 1 bin 3 bins 1 bin (a) FFD -packing a k bins 8 bins 3 bins 2 bins (b) OPT 1 -packing Figure 3.5.1 Example where FFD -(L) = OPT^L) + 1, 2 < 13/11. 116 or LPT, scheduling algorithm, analyzed in Graham (1969) to get an initial estimate for the schedule length. Using this combination, the examples given for a = 72/61 would be packed more efficiently, and it is not unreasonable to expect that the worst case bound would be improved. Such a modification would also improve the running time of algorithm MULTIFIT in most cases since the initial upper bound used in Coffman, Garey, and Johnson (1978) is usually much larger than the length of the LPT schedule. 3.6 Results for a > 2 For < a < 2, we have been able to determine FFD*(a) exactly. While we can continue to do so for 2 <^ a < 3, the number of possibilities grows rapidly as a increases. We have not attempted to find upper bounds on FFD* (a) for a >_ 3, but we have examples which generalize the results for 2 _< a < 3, and would be a good guess for attaining the worst possible ratio of FFD (L) to OPT (L) . The following examples show that it is possible to attain the upper bounds that we will prove in Theorems 3.6.1, 3.6.2, and 3.6.3. Example 3.6.1 . ae[2,15/7); FFD*(a) >_ 7/12. L = (a ,a ,...,a 2k ,b ,...,b 2k ) s(a ± ) = 4/7, s(b ± ) = 3/7 for all i. FFD (L) = 7k: 4k bins {a„. ,a„. ,,a„.} i = 1,2, ...,4k a 3i-2 3i-l 3i 3k bins ^ b 4 i _3>b 4i _ 2 ,b 4 ._ 1 ,b 4 .}, i = l,...,3k OPT (L) = 12k: 12k bins' {a ,b}, i = 1,2, ...,12k FFD*(2) > 7k/12k = 7/12. 117 Example 3.6.2 . ae [15/7,9/4) ; FFD*(a) > 8/15. L = (a , . . . » a 15k » b 1 » • • •> b i5i c ) » s^) = 5 / 8 » s ( b ± ) = 3 /8, for a11 i- FFD (L) = 8k: 5k bins {a . ,a_. ..a^.}, i = l,...,5k a 3i-2 3i-l 3i 3k bins tt ) 5 i _4> b 5 i _3> b 5 i _2' b 5i-l' b 5i^ ' i = i*---* 31 * OPT, (L) = 15k: 15k bins {a.,b.}, i = l,...,15k 1 11 FFD*(15/7) > 8k/15k = 8/15. Example 3.7.3 . ae[9/4,3); FFD*(a) j>l/2. L = (a, , . . . ,a 01 ), s(a.) = 1, for all i. Then FFD (L) = k and OPT, (L) = 1 zk l a 1 2k for all ae[2,3) and FFD*(a) > 1/2 for ae[9/4,3). For a in the interval [2,15/7), we wish to show that the bound attained by example 3.6.1 is the worst possible. As usual we let M be a minimum counterexample for a = 2. Then for the smallest item in M, m, we have s (m) = 2/7 + A. There are at most six items in any bin of size 2, and at most 3 in any bin of size 1. We obtain the usual table. WEIGHT RESTRICTIONS 6/7 - A/2 (3/8,2/5,5/12) (12/7-A) 4/7 - A/3 (4/15,5/18) (12/7-A) A < 4/35 3/7- - A/4 (5/24) (12/7-A) A < 1/21 (12/7-A)/5 A < 4/35 2/7 - A/6 A < 1/21 TPE MINIMUM SIZE X 2 6/7 - A/2 Y 2 2/3 X 3 4/7 - A/3 Y 3 1/2 X 4 3/7 - A/4 Y 4 2/5 X 5 (12/7-A)/5 x^ 2/7 + A 118 Each item b satisfies s(b) > w(b) except when b has type Y and the fallback item is of type X- or X,. This can only happen if A j< 1/21. As usual w(b) = 12/7 - A for any bin in the FFD -packing. Lemma 3.6.1 . If b is of type Y„, Y. , or X,, then s(b) - w(b) > (7/12)A. Proof . Straightforward computation using entries from the table. Lemma 3.6.2 . If B is any bin of the OPT, -packing, then E w(b) < 1 - (7/12)A. beB Proof . Suppose no Y~-item is in B. Then B contains no Y , Y , or X, -items, by Lemma 3.6.1. If B contains an X_-item, then |b| = 1, and w(b) = 6/7 - A/2 < 1 - (7/12)A. If B contains an X„-item, then |b| = 2. If the other item has type X,, then E w(b) = 1 - (7/12) A. beB If there are no items larger than an X,-item in B and |b| = 2, then £ w(b) _< 2w(X ) < 1 - (7/12) A. If |b| =3, then B cannot contain an beB item of type X since 3/7 - A/4 + 2(2/7+A) > 1. But if all three items are of type X , then either 3s(X,.) > 1 or 3(2/7+A) > 1. Suppose now that B contains an item, b, of type Y_. Then |b| = 2, and if B =' {b,c}, s(c) < 1/3 since s(b) > 2/3. If A > 1/21 then 2/7 + A > 1/3, and c cannot exist. If A <_ 1/21, then s(X ) > 1/3, and the only possible type for c is X . But w(X ) + (5/12) (12/7-A) 1 - (7/12)A. Theorem 3.6.1 . If ae[2,15/7), then FFD*(a) = 7/12. Proof . By example 3.6.1, FFD* (a) _> 7/12. Using Lemma 3.6.2, we see I w(b) < OPT (M)(l-(7/12)A) beM while Z w(b) > (FFD (M)-C) (12/7-A) beM a 119 where C is the number of exceptional bins in the FFD -packing. Hence (FFD (M)-C)/OPT. (M) < 7/12 a 1 — and the theorem is proved. For the interval ae [15/7,9/4) , we wish to show FFD*(a) = 8/15. As usual we let s(m) = 15/56 + A. There can be at most 7 items in any bin in the FFD -packing and 3 in any OPT -bin. The following table provides the usual summary of information. TYPE MINIMUM SIZE WEIGHT RESTRICTIONS X 2 15/16 - A/2 (15/8-A)/2 Y 2 5/7 (3/7)(15/8-A) X 3 (15/8-A)/3 (15/8-A)/3 Y 3 15/28 (2/7,5/18,4/15) (15/8-A) X 4 (15/8-A)/4 (15/8-A)/4 Y 4 3/7 (3/14,5/24) (15/8-A) A < 9/112 X 5 (15/8-A)/5 (15/8-A) /5 Y 5 5/14 (6/35) (15/8-A) A < 15/392 X 6 (15/8-A)/6 (15/8-A)/6 A _< 9/112 x 7 15/56 + A (15/8-A)/7 A < 15/392 Then for any bin B in the FFD -packing E w(b) = 15/8 - A, unless a beB B contains exceptional items. For any b in M not of type Y , we have as usual s(b) > w(b) . If b has type X ? , Y , or Y,, then s(b) - w(b) > (8/15)A and b cannot be in a bin B of size 1 with E w(c) > 1 - (8/15)A, unless there is an item of type Y in B. But ceB a bin of size 1 cannot contain an item of type Y„ and any other item. 120 Suppose B is any bin in the OPT.. -packing. We claim that Z w(b) _< 1 - (8/15)A. If not, then |b| > 1. Suppose |b| = 2. Then beB there must be either an X~-item or a Y~-item. If the largest item in B has type X„, then Z w(b) <■ 1 - (8/15)A since w(X ) + w(X ) beB J ^ < 1 - (8/15)A while s(Xj + s(Y.) > 1. If the largest item b n has — 3 4 1 type Y_, then w(b n ) = 2/7(15/8-A) since (5/18) (15/8-A) + w(X.) < 1 - J 1 4 — (8/15) A. If B' = {b ,b ,b ,c} is the Y -bin containing b.. in the FFD - packing, then s(b ) + s(b„) + s(b«) + s(d) > 15/7, where d is the X,-item in B. Since s(b ) + s(d) <_ 1, s(b ) + s(b ) > 8/7. Since s(b ) < 1 - (15/32-A/4) < 4/7, there can be at most one such bin, and it can be treated like an exceptional bin, having no effect on FFD*(a) . In fact there can be no Y or V„ bin to the right of B', so we could call this bin the bin of type V . If |b| = 3, since 3s (Y) > 1, there must be at least one item of type x. or X^. Since s(X.) + 2(15/56) > 15/32 + 15/28 + (7/4)A > 1, o / 4 the largest item must be at most an item of type Y, . If it is a Y,-item, then s(Y 7 ) + 2s(Xj > 59/56 - A/3 > 1 since A < 9/112. Also 4 6 — — w(Y,) + w(Xj + w(Xj < 1 - (8/15)A and s(Y,) + s(Y c ) + s(Xj > 1. 4 ' 6 7 4 5/ If the largest item is an X c -item, then w(X c ) + ws(X,) < 1 - (8/15) A. j _> o — w(X ) + w(Y ) + w(X ) < 1 - (8/15)A, and s(X ) + s(Y ) + s(X & ) > 1 since A < 15/392. If the largest item has type Y , then Z w(b) < 3w(Y ) £ 5 beB (18/35) (15/8-A) _< 1 - (8/15)A. Thus with the exception of bins containing exceptional items we have Z w(b) _< 1 - (8/15) A for all beB bins B of the OPT., -packing. In the usual way, we can use this to prove the following theorem. 121 Theorem 3.6.2 . If ae [15/7,9/4) , then -FFD*(a) = 8/15. The final interval we shall examine is [9/4,3). We let M be a minimum counterexample as usual, and s(m) = 1/4 + A. There are at most 8 items in a bin of the FFD -packing, and at most 3 in an OPT -bin. a r 1 We obtain the usual table. TYPE MINIMUM SIZE WEIGHT RESTRICTI x 2 (2-A)/2 (2-A)/2 Y 2 3/4 (7/16) (2-A) X 3 . (2-A)/3 (2-A)/3 Y 3 9/16 (7/24) (2-A) X 4 (2-A)/4 (2-A)/4 Y 4 9/20 (7/32) (2-A) A < 1/8 X 5 (2-A)/5 (2-A)/5 Y 5 9/24 (7/40) (2-A) A < 1/14 X 6 (2-A)/6 (2-A)/6 A < 1/8 Y 6 9/28 (7/48) (2-A) A < 1/32 X 7 (2-A)/7 (2-A)/7 A < 1/14 x« 1/4 + A (2-A)/8 A < 1/32 Theorem 3.6.3. If [9/4,3), then FFD*(ct) = 1/2, Proof . For any bin of the OPT -packing, if B contains no items from exceptional bins, we shall show that £ w(b) < 1 - A/2. Since beB E w(b) = 2 - A, for all bins B' in the FFD -packing which are not beB' a exceptional, the theorem will follow. Suppose B is a bin in the OPT -packing containing no exceptional items with I w(b) > 1 - A/2. beB Obviously |b | > 1. 122 Suppose |b| = 2. Then B must contain either an item of type X_ or one of type Y . But w(X„) + w(X,). < 1 - A/2, while s(X„) + J J J 6 — J s(Y ) > 1. Thus B cannot contain an X~-item, and B must contain an item of type Y . But s(Y ) + s(Y ) > 1 and w(Y ) + w(X ) _< 1 - A/2. Suppose |b| = 3. Then the largest type an item in B can have is Y, , and at least one item has type larger than X,. If the largest item has type Y. , then the second largest item must have type Y, , X.., or X . 4 6 / o If b has type Y, or X , then s(b) - w(b) > A/2 and cannot be in B. b o But s(Y.) + 2s(X ) > 1, since A _< 1/14. If the largest item has type X , then the remaining items must have types X, and X ? . But s(X,) + s(Xj + x(Xj > 1, while w(X c ) + 2w(Xj < 1 - A/2. Finally jo/ D / — suppose the largest item has type Y . Then s(Y ) + 2s (X-) > 1 while J DO w(Y 5 ) + w(X 6 ) + w(Y 6 ) < 1 - A/2. We conclude that for all bins B in the OPT.. -packing, we have Z w(b) <■ 1 - A/2, while for all bins B' in the FFD -packing, we beB a have Z w(b) = 2 - A, in each case eliminating the exceptional items. beB' This is enough to prove the theorem by the methods we have been using. The next two theorems give our results for a _> 3. In examples 3.6.4, 3.6.5, and 3.6.6 we show examples giving lower bounds on FFD* (a) for all a >_ 3. Then we prove an easy theorem that shows that the bounds are tight for ae [n+l/2,n+l) , n an integer >^ 3. Theorem 3.6.4 . (a) If a£[n,((2n-l)(2n+l))/(4n-l)), then FFD*(a) > (4n-l) / (4n 2 -4n) . (b) If ae[((2n-l)(2n+l))/(4n-l),((2n-l)(2n+2))/(4n)), then FFD*(a) > 4n/(4n 2 -l). (c) If ae[((2n-l)(2n+2))/(4n),n+l), then FFD*(a) >^ 1/n. 123 Proof . Examples 3.6.4, 3.6.5, and 3.6.6 attain these bounds. Example 3.6.4 . L= (a 2 a 2n (2n-l)k' b l'-' b 2n(2n-l)k ) s(a.) = 2n/(4n 2 -4n), s (b . ) = (2n-l) / (4n 2 -4n) FFD a (L) - (4n-l)k: (2n-l)k bins { a 2ni _2 n +l a 2ni } ' 1 = x » • • • »(2n-l)k 2nk bins {b /0 , N . „ „,...,b /0 -i \ • } > i = l»«»-»2nk. (2n-l) i-2n+2 (2n-l)i OPT (L) = (4n 2 -4n)k: (4n 2 -4n)k bins {a ,b } i = l,...,4n -4n. Example 3.6.5 . L = (a..,...,a _,b..,...,b „ ) 1 4n (4n -l)k s(a ) = (2n+l)/(4n 2 -l), s(b.) = (2n-l) /(4n 2 -l) FFD (L) = 4nk: (2n+l)k bins each containing 2n-l a.'s (2n-l)k bins each containing 2n+l b.'s OPT (L) = (4n 2 -l)k: (4n 2 -l)k bins {a.,b.}, i = 1, . . . , (4n 2 -l)k Example 3.6.6. L = (a.,..., a ,), s(a.) = 1. 1 nk. l FFD (L) = k: k bins each containing n of the a. a i OPT (L) = nk: nk bins each containing a single item. Theorem 3.6.5 . If ae [n+l/2,n+l) , then FFD* (a) = 1/n. Proof . From the examples above we know that FFD*(a) >^ 1/n. We now show that FFD*(n+l/2) <_ 1/n. If any items in the minimum counterexample M are less than 1/2 in size, then all bins but the last are filled to level >_ n + 1/2 - 1/2 = n, and we would have n(FFD (M)-l) < OPT, (M) . Thus all items must have size > 1/2 and a — 1 OPT., (M) = |m| . Since each FFD -bin contains at least n items, 1 ' ' a FFD (M) < |M|/n, and (FFD (M)-l) /OPT, (M) < 1/n. a — a 1 — 3. 7 The Effect of the Maximum Size The methods used in this chapter can also be used to obtain results if one restricts the size of the items used. We define 124 FFD*(a,t) to be the corresponding asymptotic bound for FFD (L)/OPT (L) if the item sizes are restricted to s(b) <_ t. Thus from Theorems 3.4.1 to 3.4.9, we know that FFD*(a) = FFD*(a,5/8) for all a < 72/61, since for none of the examples did we need to use an item of size > 5/8. In Johnson (1974) it is proved that for a = 1, we have the following values: FFD*(l,t) = 11/9 for 1/2 £ t < 1 FFD*(l,t) = 71/60 for 8/29 £ t < 1/2 FFD*(l,t) = 7/6 for 1/4 < t FFD*(l,t) = 23/20 for 1/5 < t < 1/4 We will make no effort to present a complete picture of the situation. We prove that FFD*(36/31,l/2) = 1 to illustrate that, as one would expect, better results are obtained in the bin packing problems if one can restrict the size of items, and also to suggest that similar improvement could be expected for the scheduling algorithm MULTIFIT of Coffman, Garey, and Johnson (1978). Theorem 3.7.1 . If ae [ 36/31, 3/2) , then FFD*(a,l/2) = 1. Proof . If all items have size = 1/2, then FFD (L) = OPT (L) = |l|/2. Hence FFD* (36/ 31, 1/2) >^ 1 . As usual we only need to show that FFD*(36/31,l/2) _> 1. The minimum size for an object is 5/31 + A and consequently there may be as many as 7 objects in an FFD -bin. However, each bin must contain at least two items, and there are no Y, -bins. Thus we have the following summary. 125 TYPE MINIMUM SIZE WEIGHT RESTRICTIO X 2 (l-A)/2 (l-A)/2 Y 2 12/31 (3/7, 5/12, 2/5, 3/8) (1-A) X 3 (l-A)/3 (l-A)/3 Y 3 9/31 (2/7,5/18,4/15) (1-A) A < 11/165 X 4 (l-A)/4 (l-A)/4 Y 4 36/165 (3/14,5/24) (1-A) A <_ 1/31 X 5 (l-A)/5 (l-A)/5 A < 11/165 Y 5 6/31 (6/35) (1-A) A £ 1/217 X 6 (l-A)/6 (l-A)/6 A _< 1/31 x 7 5/31 + A (l-A)/7 A < 1/217 s(b) > w(b) unless b has type Y and the fallback item in that Y„-bin does not have type X, . If b has type Y or X 7 , then s(b) - w(b) > A. Since E w(b) = 1 - A for all bins B in the FFD - beB packing, all we need to do is to show that for all bins B' in the OPT -packing E w(b) _< 1 - A. beB Suppose that B is a bin in the OPT -packing of our minimum counterexample M, and that E w(b) > 1 - A, with no exceptional items beB in B. Then if B contains no items of type Y ? , then B can contain no items of type Y or X ? . B can contain at most 6 items, but if |B| = 6, then B cannot contain a Y„-item and if B contains an item of type X , or larger, then B must contain an item of type X.,. Thus B can only contain X, -items and E w(b) < 1 - A. 6 beB Suppose |b| = 5. Since B still cannot contain Y -items, we need not consider Y or X..-items. Suppose the largest item in B 126 has type X_. Then B cannot contain an item of type larger than X, since s(X 3 > + s(Y 5 ) + 3(5/31+A) > 1. But w(X ) + 4w(X ) <_ 1 - A. If the largest item has type Y , then B can only contain other items of types X c and X, since s(Yj + s(Y,) + 3(5/31+A) > 1. But s(Yj + 2s(X c ) + J O J 4 J 5 2s(X 6 ) > 1 while w(Y ) + w(X ) + 3w(X ) £ 1 - A. If the largest item in B has type X, , then there can be at most one item of type X, since 2w(X.) + 3w(X,) < 1 - A, while 2s(X.) + s(X n ) + 2s(Xj > 1. B must 4 6 — 4 5 6 contain an item of type Y, , since otherwise B could only contain X and X.-items; and w(X.) + 2w(X c ) + 2w(Xj < 1 - A, while s(X.) + 3s(X c ) + b 4 5 6 — 4 5 5/31 + A > 1. But if B contains a Y -item, then the remaining items must be of types X c and X,, and s(X.) + s(X.) + s(Y.) + 2s (X c ) + 5 6 4 4 4 5 s(X,) > 1 while w(X.) + w(Y.) + w(X c ) + 2w(X,) < 1 - A. o 4 4 5 6 — Suppose |B| = 4. B cannot contain an X_-item, since w(X„) 3w(X,) = 1 - A, while s(X_) + s(X c ) + 2s (X,) > 1. Suppose B contains b z 5 b an item, b, of type Y_. Then the next largest item, c, has s(c) < s(Y ) since s(Y ) + s(Y ) + 2(5/31+A) > 1. If c has type X^ then B cannot contain any other items except those of types Y , X,, or X ? , since s(b) + s(c) + s(X,.) + 5/31 + A > 1. B cannot contain two items of type Y , and unless w(b) = (3/7) (1-A), w(b) + w(c) + w(Y c ) + w(X,) < 1 - A. But then the X,-item would have fit in the 5 b — b Y -bin containing b unless s(b) > 36/31 - (1/2-A/2+1/6-A/6) > 43/93 + (2/3)A. But then s(b) + s(c) + s(Y c ) + s(X,) > 1. The same analysis j b holds if B were to contain two X,-items. Suppose now that c has type b Y 4 . Then s(b) + s(c) + s(Y 4 ) + 5/31 + A > 1 and s(b) + s(c) + 2s(X 5 ) > 1, so B cannot contain two Y. -items or a Y.-item and two X c -items. 4 4 5 Also s(b) + s(c) + w(X ) + s(Y ) > 1, since A < 1/217. But 127 w(b) + w(c) + 2w(Y ) <_ 1 - A. If c is an X,.-item, then B must contain 3 items of type X since w(b) + w(c) + w(X ) + w(Y ) < 1 - A . But w(b) + 3w(X<.) _< 1 - A unless the X,.-items would not fit in B ' , the Y -bin containing b. If b' is the other Y_ item in B ' , then s(b') > 5/31 + 2s (X) > s(X ) and B' would be exceptional. Hence B can contain no items of type Y-, and consequently no items of types X or Y . Suppose the largest item in B has type X_. Since w(X.) + 3w(Y.) _< 1 - A, B must contain an X,-item, a Y -item or another X„-item. B cannot contain two X. -items since s(X„) + 2s(X.) + s(X r ) > 1, while 4 3 4 5 w(Xj + 2w(X.) + w(X,J < 1 - A. If B contains an X.-item and a 3 ' 4 6 — 4 Y.-item, then s(Xj + s(X.) + 2s(Y.) > 1, while w(Xj + w(X.) + w(Y.) + 4 3 4 4 3 4 4 w(X c ) < 1 - A. Thus B must contain two X -items. But 2w(X_) + 2w(X,) < 5 — 3 3 6 — 1 - A, while 2s(X„) + s(X_) + s(X,) > 1. The final case for |b| = 4 J 5 D occurs if the largest item, b, in B has type Y . Since w(b) + 3w(Y.) _< 1 - A, there must be either an X,-item or another Y -item. If there are two Y„-items, then there must be an X,-item also since 2w(b) + 2w(Y.) < 1 - A, while 3s(Y ) + 5/31 + A > 1. But 2w(b) + w(X.) + 4 3 4 w(X,) < 1 - A and 2s(Yj + s(X.) + s(X c ) > 1. If the second largest b — 3 4 j item in B is of type X., then w(b) + 2w(X. ) + w(Y.) < 1 - A. The only 4 4 4 — possibility left is for B to contain three items of type X , . s(Y.) + 3s(X.) > 1 unless A > 5/93. The X, -items did not fit in 3 4 4 the bin B' of type Y containing B, so s(b") + s(b') + s(b) + s(d) > 36/31 where d is an item of type X,, and b, b', b'' are the Y„-items in B'. But s(b) + 3s(X.) < 1 implies that s(b") + s(b') > 2s(X,) + 4 — '4 5/31 > 41/62 - A/2. Hence this must be the first Y -bin and we can 128 treat it as an exceptional bin, since 3(41/124-A/4) + 5/31 <_ 36/31 implies 1/124 > (1/4)A contradicting A > 5/93. Suppose now that |b| =3. B must contain either an X -item or a Y_-item. If B contains an X 9 -item, B cannot also contain a Y -item or an X 7 ~item or a Y_-item. Then B must contain either an X -item or a Y -item. But w(X„) + w(X_) + w(X,) < 1 - A while s(X_) + s(Xj + -J 2. J D — Z J s(X ) > 1 unless A > 1/31. If A > 1/31, then s(X ) + s(X ) + 5/31 + A > 1. Thus B cannot contain an X -item and B must contain a Y_-item. But s(X 2 ) + s(Y 3 ) + s(Y ) > 1, while w(X„) + w(Y ) + w(X ) _< 1-A. . Finally suppose the largest item in B is of type Y_. Since w(Y„) + 2w(Y ) <. 1 - A, B must also contain an item of type X„ or another item of type Y . Suppose B = {a,b,c} with s(a) >^ s(b) ^L s(c) and the largest two items of type Y„. But then B' the Y -bin containing a dominates B unless it is exceptional. If the second largest item in B has type X then w(Y_) + w(X„) + w(Y.) < 1 - A. Since s(Yj + 2s (Xj > r 3 234— 2 3 1, the only remaining possibility is for the third item to have type X. . w(Y_) + w(X„) + w(X.) < 1 - A, unless the fallback item in the 4 2 3 4 — Y_-bin containing the largest item in B is of type X ? . But then to prevent the X,-item from fitting, s(b') > 46/93 + A/3, where b 1 is the other Y_-item in B'. Since such a Y -bin can occur only one time in the FFD -packing we can treat this bin as an exceptional bin. Moreover, s(b') > w(b') + 2A, so we could subtract A from w(b) to ensure that in each bin E w(b) < 1 - A. beB This lengthy analysis proves Theorem 3.7.1. Similar proofs could undoubtedly be devised for other combinations of a and t, but it seems pointelss to obtain further isolated results. If we could 129 carry the analysis of this example further, in particular to show that even taking the exceptional items into account, we would still have FFD (L) _< OPT 1 (L) , we would have a lower bound for algorithm MULTIFIT, if the lengths of the jobs were known to be less than half the length of the schedule. However, the large number of exceptional items makes this a very lengthy task, and in view of example 3.5.1, not necessarily one which would succeed. 130 CHAPTER 4 VARIATION OF PARAMETERS IN MULTIPROCESSOR SCHEDULING 4.1 Introduction In this chapter we consider a model of multiprocessor scheduling and the effect of varying certain parameters relating to the problem. In our basic model we have n identical processors to be used to execute a set of jobs,^. Each job J has a processing time, or execution time, y(J). We assume that there is a partial order, or precedence relation, ■< defined on the set v. If J and J' are jobs in \ and J -< J ' , we say that J precedes J' and J' succeeds J 1 ♦ If J precedes J', then J' cannot begin execution until J has completed execution. The directed graph with node set yr and edge set {(J,J')|j < J 1 } is called the J precedence graph of y. A schedule for V is a specification, at each moment of time, of which job is being executed on each processor. This specification must allow at most one job on any processor at any time and must respect ^ . We shall be interested primarily in non-preemptive schedules, that is, no job may be interrupted during its execution. A scheduling algorithm is a procedure which produces a schedule. We shall be concerned with a type of scheduling algorithm called list scheduling . A list scheduling algorithm assigns distinct priorities to the jobs, and whenever a processor becomes idle, the job of highest priority among those available at that time is started on that processor. 131 We assume that our goal is to produce a schedule with as small a finish time as we can. That is, we want the time required to complete execution of the entire set yj to be as small as possible. Since for the model we are interested in, the problem of finding an optimal schedule is NP-complete, we are interested in heuristic algorithms, particularly list scheduling algorithms, and in comparing the worst case finish time of the heuristic algorithm to the minimal finish time for any schedule for the set of jobs. 4.2 Variation of Parameters in the Basic Model The principal result of this section compares the worst case ratio of the finish time of an arbitrary list schedule using parameters n', y ' , -<' to the minimum finish time for any schedule using parameters n, u, <. We let c denote the length of the longest chain in (y, y, <), and c', the length of the longest chain in (y-*, y T , -<'), where the length of a chain is the sum of the processing times of the items in the chain. We assume that y and y' are related by the inequality y'(J) < ay (J) for all J e [ } . The finish time for a list schedule using list L will be denoted by u(L, n', y', -<') and the optimal solution will be denoted by oj^Cj-, n, y,-<). Finally, we define a job J to be a cover of an idle period if J begins execution at or before the beginning of the idle period and if J completes execution at or after the conclusion of the idle period. 132 Theorem 4.2.1. "(L."'^'^') < £l (1-1/n') + an/n' — c Proof . In the list schedule, the idle periods can be "covered" by a chain C of jobs J, < J„ -<* ... -^ J, , as was shown in Graham (1966) By assumption the length of this chain is at most c'. All n' pro- cessors are busy during the remaining time periods. Thus U)(L,n*,u\<') < c' + (1/n') Z y'(J) . Also we can bound the length of the optimal schedule by a) (^,n,y ,<) < c since there is a chain of this length and by a) (J,n,u,-<) > (1/n) Z y(J) U V JeC = (1/n) Z u(J) + (1/n) Z u(J) JeC HC Combining these three inequalities, we obtain u)(L,n\u\<') < Z y'(J) + (1/n') Z y'(J) JeC J£C < (l-l/n')c' + (1/n') Z y'(J) + (1/n') Z y ' ( J) JeC J£C < (l-l/n')c« + (1/n') Z ay(J) + (1/n') Z ay (J) JeC JiC < (l-l/n')c' + (an/n')((l/n) Z y(J) + (1/n) Z y(J)) JeC JiC c'a) Q,n,y,0 < (1-1/n') ^ + ^ra) (y,n,y,<) . 133 Dividing both sides by w (C^,n,y ,<) produces the result in the theorem. To obtain Graham's result from Theorem 4.2.1, we need only assume that a _< 1 and that <' is a weakening of < , thus forcing c' < c. In this case h)(L n',y',j') < (1/nf) + n/n , = x + (n _ 1)/n ,. a) C|-,n,y,^) - Allowing the parameters y and < to vary individually, we can obtain in a similar way the following corollaries. Corollary 4.2.1 . a3(] ;^ n ' y, ^ < a + 1 - l/n Corollary 4.2.2 . q)(L,n,y > < t ) < 1 + (c7c)(l-l/n) co n (v,n,y,-<) — j 4 .3 Scheduling with Overlap In this section, we consider the effect of allowing a job to begin slightly before the completion of its predecessors. The amount of overlap is a fraction, A, of the execution time of the predecessor: job J may begin at time t if for every job J ' -< J, J' will have completed execution by time t + Ay (J 1 ). One could ask the same question, of course, with A determined by other means. The model just described yields a particularly simple result, however. If we let the overlap be determined by the length of J, the successor job, the amount of overlap can be arbitrarily small even though the idle period is very long. In our situation, the 134 V 2 J 3 M J 2 /l J 4 /2 V 3 (a) Jobs and precedence relation J l J 3 0) (L) = 6 J 2 J 4 J 5 (b) Schedule without overlap on two processors J i \ h w(L) = 7 J 2 J 3 W//A (c) Schedule allowing overlap, A = 1/2, on two processors Figure 4.3.1 135 overlap is determined by the length of J', the predecessor job, which also determines the length of the idle period. Our main result in this section, Theorem 4.3.1, compares the length of an arbitrary list schedule allowing an overlap A as described above to the length of an optimal schedule if no overlap is allowed. This comparison seems to be the most reasonable one. One can also compare the list schedule with the optimal schedule allowing overlap in both cases, as we do in Theorem 4.3.2; however, Theorem 4.3.1 more closely relates to the theme of parameter variation. As we will show by an example, to compare the results of a particular list schedule with overlap to the schedule with the same list and no overlap can, in the worst case, show a decrease in performance by allowing the overlap. Just as the timing anomalies discussed by Graham (1966) show that adding a processor, or reducing all the execution times, or relaxing the precedence relation can produce a longer schedule, so does allowing a job to begin before its predecessors are finished, as illustrated in Figure 4.3.1. We begin with some definitions and notation, which will hopefully make the exposition clearer. In general, an idle period in a schedule means any time period during which at least one processor is idle at each instant of time. For our purposes it is convenient to be more restrictive. We require that during an idle period, no job is begun on any processor. Thus, if during an idle period in the usual sense, some processor were to begin a new job while another processor remained idle, we would divide the idle period into two 136 (or more) idle periods with a new idle period beginning at the start of the new job. Idle periods will be denoted by 1 , „, ..., <{>,. The length of an idle period will be written as y(.), its starting time s (c}> . ) and its termination time t(.). Similarly, the start and termination times of a job J c 0- will be denoted by s(J) and t(J). Therefore y(J) = t(J) - s(J) is the execution time for J. For a particular list of jobs L = (J.. , J , . . . , J ), we use w(L,A) to denote the finish time l l m of the list schedule using list L and allowing an overlap A. w (^-,0) denotes the optimal schedule length for the set of jobs with overlap 0. One or more jobs which will play a special role in the dis- cussion is the job or jobs which terminate the list schedule. This job can be any job whose termination time is w(L,A). We let J be such a job with smallest execution time. The role of this job will be made clear in the proof of Theorem 4.3.1. We extend the notion of a job J covering an idle period to the case of overlap by requiring (1) s(J) < s(<|>) and (2) either t(J) - Ay(J) > t() or t(J) = oj(L,A) . Every idle period is covered by at least one job. In fact, if <{> is terminated at time s(J'), then for some J < J', s(J') = t(J) - Ay(J) and J covers , except in the case t() = w(L,A). But then J covers . What we need to show is that there exists a chain of jobs J i(i)^ J i(2) X ■*• ^ J i(k) 137 such that each idle period . is covered by J #/ .s. lemma 4.3.1 . If the idle periods of the list schedule for L are , , ..., .) < s( .,-,), then there is a chain of jobs J ±(l)' < J ±(2) < '" ^ J i(k) with J./.s covering d> . . Proof. As already remarked, if t(d),) = oj(L.A), then J covers , . k co k If not then <$>, is terminated by the start of some job J which was not available until that time. Hence J was freed by the termination of some job J . ... such that t(J.,,.) - Ay(J.,, J = s(J) = t(, ) . Since J.,,, could not have started during <{>, , J . ,,. must cover tf>, . Proceeding backward we assume that , , , , .... j -l ) » thenJ i(j) covers 4. , , and we can set J./. , x *J./.\. If not, then some J-l i(j-l) i(j) predecessor J' of J.,.^ must be executing at time t(<$> . ,). If s(J') = t( . _. If s(J') < t( . .. ) , then s(J') _< s(<}>. ,), and we can let J./._i\ = J'« Thus the chain now covers . ,, ..., <)>,. Inductively we obtain a chain covering all idle J-L k periods. We denote this chain by C and obtain an upper bound for a)(L,A) in the following lemma. Lemma 4.3.2 . oj(L,A) < (1-A) E u(J) + (1/n) Z y(J) JeC 3tC + (A/n) I y(J) + Ay(J ) (1-1/n) . JeC 138 k Proof . If J t C, then (1-A) E m(J) >^ E y (<}>.) since y (<{>.) < W JeC j=l J J (l-A)y(J , ..) from the definition of covering. If J covers more than one idle period, then E y() < (l-A)y(J) 4> covered by J and in the sum E y(J) we can omit duplicate terms. Since all n JeC processors are busy the rest of the time, and the total remaining execution time outside of that covered by (1-A) E y (J) is at most JeC E y(J) + A E y(J) , JiC JeC we get u>(L,A) < (1-A) E y(J) + (1/n) ( E y ( J) + A E y(J)) JeC J# JeC and Lemma 4.3.2 follows in this case, even without the last term. However, if J e C> then y(. ) may be as large as y ( J ) . In 0) K. 0) that case k E y(.) _< (1-A) E y(J) + y(J ) i=l X JeC- {J } u and by the same reasoning used above, we obtain u(L,A) £ (1-A) E y(J) + y(J ) JeC-{J } w + 1/n E y(J) + (A/n) E y(J) J^C JeC- {J } to which is equivalent to the inequality in Lemma 4.3.2. Our main result follows easily from Lemma 4.3.2. 139 Theorem 4.3.1 . u)(L,A)-(l-l/n)Ay(J ) ™-^ — < 2 - 1/n - A(l-l/n) . Proof . From Lemma 4.3.2, we know that w(L,A) - (l-l/n)Ay(J ) _< (1-A) E y(J) + (1/n) I y(J) w JeC J# + (A/n) Z y(J) . JeC Since u).((kO) > Z y(J) ' " JeC and w nQ>°) 1 (l/n)( ^ P(J) + ? y(J)) , U ° JeC Jtf we conclude that (1-A) Z u(J) + (1/n) Z u(J) + (A/n) Z y(J) JeC Jtf JeC = (1-1/n-A) Z y(J) + (l/n)( Z y(J) + Z u(J)) + (A/n) Z y(J) JeC JeC JiC JeC < (l-l/n-A(l-l/n)) (1-A) Z y(J) + Ay(J ) ° ^ JeC Consequently if J eC , we obtain CO co(L,A) < (1-A) Z y(J) + (1/n) Z y(J) + (A/n) Z y(J) JeC J# JeC + Ay(J )(l-l/n) CO = (1-A) Z y(J) + Ay(J ) + (1/n) Z y(J) + (1/n) Z y(J) JeC w JeC JeC - (1/n) Z y(J) + (A/n) Z y(J) - (A/n)y(J ) JeC JeC W < u) n ( ,A) + co n ( ,A) - (l/n)((l-A) Z y(J) + Ay(J )) " ° ° JeC < (2-l/n)co Q (^,A) , proving Theorem 4.3.2 in this case. If J iC , then as remarked in the proof of Lemma 4.3.2, CO co(L,A) < (1-A) Z y(J) + (1/n) Z y(J) + (A/n) Z y(J) JeC JeC JeC < oo n (f/,A) + (l/n)( Z y(J) + Z y(J)) + (A/n-l/n) Z y(J) U ° JtC JeC JeC iu Q (j,A) +u Q,A) - (l/n)u) (^,A) completing the proof. 141 L = (J ,...,J ? ), y(J.) = 1 for i = 1,2, ...,n -n n -n+1 1 y(J 2 ) = n . n -n+1 (a) The set of jobs. The precedence relation is empty. p l pT J n + 1 r __ J 2 n -n+1 J 2 n ■ -n+1 P 2 i J 2 J n + 2 J 2 n -n+2 v/a 7// '////// P n J n 2n J 2 n -n | '///. VA (b) Schedule showing a)(L,A) = 2n-l for any A on n processors p 1 J ""' 12 n -n+1 P 2 J x J 2 n -2n+2 P 3 J 2 J 2 n -2n+3 • i P J 1 n n-1 — - ,..— - J 2 n -n (c) Optimal schedule showing w n (^» 0) = w n (0-, A) = n for all A. w(L, A)-A(l-l/n)y(J ) V&.o) 2n-l-A(l-l/n)n n = 2 - 1/n - A(l-l/n) Figure 4.3.2 142 As Figure 4.3.2 shows, these bounds may be attained. One would hope that better results would be obtained if a reasonable heuristic were used to choose the list L. If one uses the longest path method, assigning higher priorities to those jobs whose "distance" from the job at the root of the tree, under the assumption that the precedence graph is a tree, then we can extend a result of Kaufman (1974) to our setting. Kaufman proved that if the precedence graph is a tree and u> is the minimal finish time of a preemptive schedule, then w(L,0) < a) + k - [k/nl where k is the length of the longest job in 0\ We can show, using Kaufman's argument, that w(L,A) < o) + k - [k/nl _ P also, where oj is still the minimum preemptive finish time with no P overlap. Kaufman's examples show that one cannot do better, essentially because in the worst case no overlap is possible. One would hope that, in some circumstances, allowing overlap would guarantee better results, and to some extent, Theorem 4.3.3 justifies this hope. Theorem 4.3.3 . If A < 1/2 and the precedence graph is a tree with at most n/2 leaves, then u)(L,A) = (l-A)h + AX, where h is the length of the longest path to the root from a leaf and £ is the execution time of the job at the root of the tree. Proof . We use induction on the number of nodes. If there is only one job w(L,A) = (1-AH + A5, = I. Suppose now that J , ..., J are the 143 immediate predecessors of the root. Then for the subrees of which they are the root, we can apply our induction hypothesis. s(J.) = h.(l-A) + Ay (J.) - y(J.) for the subtree rooted at J.. Hence the last job is ready to execute at time max{s(J.)+y(J.)-Ay(J.)} i = max{h.(l-A)} . i But h = max{h.}. Thus the schedule is complete by time h(l-A) + £. i Note that the assumption that there are at most n/2 leaves is needed to ensure that there is a processor available whenever it is needed. We also need A j< 1/2 since more than 2 processors are needed to efficiently execute a chain with A > 1/2. In general, if the precedence graph is a tree one would expect all processors to be busy until we reached a stage where the unexecuted jobs formed a tree with fewer than n leaves. (The number of leaves is clearly non-increasing.) When the number of leaves is reduced to n/2, the above theorem would apply. However, in the worst case, by the time the number of leaves has been reduced to n/2, the last job may be executing and there would be no savings at all from having an overlap. Consequently Kaufman's results show that in the worst case, the bounds for the case with overlap are the same as those without overlap. 4. 4 Conclusions We have analyzed the effect of several parameters on the behavior of list scheduling algorithms. In each case we have seen 144 that, although for specific lists, there may be "anomalous" behavior, the worst case bound was directly related to the parameter. Thus if we reduce the processing times we decrease the worst case bound on the finish time by a proportional amount as we see in Corollary 4.2.1. Reducing the length of chains in the precedence graph reduces the excess of the finish time of the list schedule over the minimal finish time as indicated in Corollary 4.2.2. Theorem 4.3.1 shows that, except for the effect of the final idle period, the excess of the finish time of the list schedule with overlap A over the minimal finish time with no overlap is directly proportional to 1-A. These results all suggest, in agreement with one's intuition, that one should expect proportionally better results from more or faster processors, more independence among jobs, or allowing overlap. 145 CHAPTER 5 KNAPSACK AND POSTAGE STAMP PROBLEMS 5.1 Introduction The standard knapsack problem can be formulated as an integer linear programming problem with one constraint as follows: minimize C.X., + ... + c. x. 11 k k subiect to a..x, + ... + a, x. = y J 11 k k x. ^ and integral for all i. It is assumed further that the a., c., and y are integers >_ 0. The problem is known to be NP-complete, so several approximation algorithms have been devised. The simplest of these is the greedy algorithm, which may be described as setting x = [y/a J and solving for x , ..., x, , (recursively) in the smaller problem minimize c,x, + . . . + c, , x. n 1 1 k-1 k-1 subiect to a 1 x n + . . . + a. n x, , - y - a, Ly/a. J , 11 k-1 k-1 k k where we have assumed that the variables are labelled so that c./a. > c_/a > . . . > c. /a. . 11—22— — kk The problem we are concerned with is determining when the greedy solution, for modified versions of the problem, is optimal for all y. For the standard knapsack problem, S. K. Chang and A. Gill (19 70) 2 showed that it was sufficient to test approximately a, a, ,/(a -a , ) 146 numbers to determine if the greedy solution was always optimal. However, not only does this require a large number of tests, but each test requires solving a knapsack problem to get the optimal solution. L. Chang and J. Korsh (1976) improved this result, both by reducing the number of cases and eliminating the need for finding the optimal solution to any knapsack problems. However, the number of test cases still can be exponential in the number of variables. Generalizing work of Hu and Lenard (1973), Magazine, Nemhauser, and Trotter (1975) gave a fast method for determining if the greedy solution is always optimal for k variables if it is known that it is always optimal for the first k-1 variables. In section 5.2, we study the effect of varying the value of y on the behavior of the greedy algorithm, generalizing the results of Chang and Korsh, and Magazine, Nemhauser, and Trotter to this situation. k More precisely, we allow E a. x. to be in an interval [y,y+A] rather i=l X 1 than equal to a specific value. In the third section, we will restrict our attention to the "postage stamp problem," where all the c. are 1. The effect of bounding the variables, x. _< z,, will be considered. Although no general results of the type given in section 5.2 are known, the problem is solved for k _< 5, and some more general results are given. 5. 2 A Parametrized Version of the Knapsack Problem In this section we examine the following problem. Given integers y, A, c, , . . . , c , a , . . . , a >^ with 1 <_ a, <_ A + 1 and c^a, > c~/a~ > ... > c. /a. , find integers x. > to 11—22— — kk i — 14 7 minimize E c.x. i-1 X * subject to y_< E a.x. j< y + A i=l The minimal value of E c.x. will be denoted by H* A (y)- The greedy 1=1 solution, denoted by H a^' ^ s obtained recursively by setting x^ = L(y+A)/a k J and solving for x , ..., x . in the k-1 variable problem X K — X k-l minimize E c.x. i=l X X k-l subject to y - x,a _< E a.x. <^ y - x, a + A . K. K. ... IX K.K. 1=1 k If E a.x. > y the process terminates with all other x. =0. ..ii— l The condition a < A + 1 is needed to ensure the existence of a solution. We would like to obtain good conditions under which H l- A^ y ) = ^t A^ f° r a H y* Generalizing the work of Chang and Korsh K, A k, A , we have the following result, where a representation E a.y. "just k i=l X X exceeds" a number bif E a.y. - a. < b for all i such that y. ^ and k 1=1 J J E a.y. >_ b. Note that a number may have more than one representation, i=l some of which just exceed b, while others do not. Theorem 5.2.1 . Suppose there exists y such that H* A (y) < H, (y) . If m is the smallest such integer, then for some e <_ A, m + e has a representation which just exceeds a, or else m < a, - A . 1A8 Proof . Using the greedy algorithm, we obtain a representation k m + e = Z a.y. with y > if i > a, - A, < £. < i. The optimal 1=1 solution corresponds to a representation m + e„ = Z a.m. 2 i=l X X Since m is minimal, m, = or we would have m - a, as a smaller k counterexample. If Z a.m. just exceeds a, , we are done. If not, • t 1 1 1 i k i=l k-1 then some combination of terms Z a.b. = A must just exceed a, . By . - 1 1 K 1=1 minimality, A - e has a representation from the greedy algorithm k A-e +e„= Z a.t. which is minimal, and hence costs less than or 2 3 , i l k-1 k-1 k-1 equal to Z a.b.. Letting Z a.u. be the terms of Z a.m. not ..,11 .,11 ...li i=l i=l i=l in the representation of A, m + e» = m + e + e» - e„ k-1 = A + e - e_ + Z a.u. 3 2 . , 11 i=l and there is a representation of m + e„, which must be an optimal solution, and which has non-zero coefficient for a. . This contradicts k the minimality of m, and the theorem is proved. By Theorem 5.2.1, we only need to compare the representations k which just exceed some a., M = Z a.y., with the greedy representations 1=1 of M, M-l, M-2, ..., M-A. However, the number of representations which just exceed a can be exponential in k in the worst case. The only K. examples we know are easily seen to be either optimal or non-optimal. Thus it may not be necessary to examine exponentially many cases, but 149 certainly Theorem 5.2.1 applied directly would result in an exponential algorithm. A fast algorithm for special cases can be obtained from the work of Magazine, Nemhauser, and Trotter. We assume that the greedy algorithm is optimal for all y using the first k variables and obtain necessary and sufficient conditions for the greedy algorithm to be optimal for all y using k+1 variables. Lemma 5.2.1 . For any two integers a, b > 0, there is a y < min(a,A) such that H k,A (a+b) ^K,^ +H £,A (b) • Proof . Let X = (x..,...,x ) be an optimal solution for b. Then k E a.x. = b + 6 , 6„ <_ A i=l If 6 >_ a, then let y = a <_ 6 _< A. Thus y <_ min(a,A) . Since a + b <_ b+6 2 - a+b+A ' H k,A (a+b > i H k,A (b) ■ H k,A (a - a) + H k,A (b) If 6 9 < a, let Y = (y..,...,y,) be an optimal solution for a - 6„. Then k a - 6_ < a - 6 + 6, = E a.y. < a - 6 + A 2 — .2 1 .,ii— 2 1=1 Since Z = X + Y satisfies a + b < E a.x. =a-6 +6 1 +b+6 =a+b+6 1 then necessary and sufficient conditions for H (y) = H* (y) for K. i X j A K. i J. y A all y are c k+i + H k,A (6 " Y) i pc k for all Yj _< y i min(A,6), if A < a, . Proof . Suppose H (y) = H* (y) for all y. Let y <_ min(6,A), and choose y = pa, - y. Since y _< A, pa, - y <_ pa, _< pa, - y + A and x, = p,x. = 0, i / k, is a solution to the problem, with cost c,p. K. 1 iC Hence H A^y) _5 P c v* However, since y _< 6 , we have pa, - y >. a i, + i • Thus "h-laW = H k + i,A (a k + i +6 - Y) ■ c k« + Vi.a"-^ and for all y , < y < min(6 ,A) , C k+1 + H k+1,A (6 - Y) -± pC k * Conversely, suppose that for some y, H a^) > H v+1 A^' anc * let y be the smallest such number. If, in any minimal solution, x,,, # 0, then we could subtract x .a from y to get a smaller y still not satisfying our conditions. Thus x, . = in all optimal solutions, and by assumption. 151 Let y = ma + p, p < a, . Then K. 1C \,l W " mC k + H k,A (p) " "k+l.A^ Since A + y >^ a i.j.i » m must De t_ P~2» If m > p, then H k+l,A (y) ' H k+l,A (pa k +(m - p) \ +p) * H k + l,A (a k + l +6 + (m -P )a k +p) " c kn + Vi >4 ((, -' ,)a k^ ) i C k + 1 + H k,A ((m - p)a k + P- hS> since (m-p)a, + p + 6 < y and y was minimal. Thus \ + l,A ( ^ ± C k+1 + (m " p) Applying Lemma 5.2.1, we get (5 - 2 - 1> Vw* i c k + i + (m " p)c k + H k, 4 ( '>> H k.4 ( *" r) for some y <, min(A,6) . Similarly if m = p-1, then Vl.A^ " Vl.A^k+l^^V and A + 6 + p-a. >0 since A + y > a. , n . From this we see that k — — k+1 H k + l,A (y) " C k + 1 + "k+l.A'^-V i C k + 1 + \, ( ^-V Since A + 6 + p > a , H (6+p) = c + H (6+p-a ) so \ + l,«« S \ +1 ' \ + \,A (6+P) i C k + 1 " C k + H k,A (p) + H k,A (6 - Y) for some y j^min(6,A) by Lemma 5.2.1. This inequality is (5.2.1) with m = p-1, and thus (5.2.1) holds in this case. 152 If m » p-2, then a k+1 < y + A = (p-2)a k + p + A = a, . n + 6 + p + A - 2a. k+1 k Thus 6 + p + A >_ 2a and H k,A (S+p) " 2c k + H k,A (6+p - 2 V Then "fcfl.4^ = C k + 1 + H k,A (6+p - 2a k> " C k + 1 " 2c k + \,A (S+P) i C k + 1 " 2c k + H k,A (p) + \,A (6 - Y) for some y <_ min(6,A) by Lemma 5.2.1. This is (5.2.1) with m = p-2, and (5.2.1) holds in all cases. From (5.2.1) we get H k, 4 W " mC k + H k,A (p) < H k + 1,A <7) i C k + 1 + (m "P )c k + H k,A (p) + \,A (S -^ which simplifies to pC k < C k+1 + H k (6 " Y) ' contradicting our hypotheses. Therefore the conditions are also sufficient. Corollary 5.2.1. If a, ,. > a. , A 1 > A and ■* k+1 k — 153 VaW = H k,A (y) H k + i,A ( y> ■ h £+i,aW H k,A'W " "k.A'W for all y, then H k+1 A ,(y) = H* +1 A? (y) for all y. Proof. From Theorem 5.2.1, we know that C k+1 + Ya^' ± PC k where a, , n + 6 = pa, and y < min(6,A). This implies that k+1 k — C k+1 +H k,A' (6 " Y) -^ pC k for y < min(5,A) since H k,A'«^ " H K,A' (6 -^ i H ^A (6 - Y) = H k,A (6 -^ If A' > y > A, y < p' . n-3 n n This must be the case if (a n ,a„,...,a _,a ) is not optimal by Theorem 12 n-2 n 5.2.1. Letting H' , (y) denote the heuristic solution for A', we have n— 1 156 H (a +6') = H' .(a +6») = 1 + H _(6') n n n n-1 n n n-3 n -K > H (p'a J — n-1 n n-2 since (l,a ,...,a _) is optimal. Thus H (a +6') > H .(a +6') and A is not optimal, n n n n-1 n n Theorem 5.3.1. If Z = (z.,...,z ) with z„ = z„ = ... = z. = °°, then 2 n 2 3 i Z (y) = Z*(y) for all y and all z _ , ..., z , if and only if 1 + H.(6 ) < p i n — n where 6 and p are defined by a +6 = P a n ,0<6 Z*(y) for some y. If y is the smallest integer for which this is true, then we can assume that in any optimal solution, x =0. n 157 Otherwise we could reduce y by a , and if necessary reduce z by 1. Thus n-1 n-1 y = y a + Z y.a. = E x.a. . 3=1 J 3=1 We can assume that z , = °° since if y , < z 1 , increasing z .. cannot n-1 y n-l n-1 ° n-1 change the fact that Z . (y) < Z (y) , because of the optimality of Z , (y) by induction. On the other hand if y .. = z , , so is x n , n-1 n-1 n-1 n-1 and we could assume z = 0, or equivalently that a , does not exist, n-1 J n-1 again reducing the size of A so that by induction we would have a con- tradiction. We need Lemma 5.3.1 to ensure that Hu-optimality of the deleted set of a.. Thus we have l n-2 y=ya + Z y.a. J n n . •, 3 j 3=1 n-1 = Z x.a. . i-i J J We may also assume that y _- = since if that were not the case, then we could subtract y ., a . from y to get a smaller example. n-1 n-1 r If x - > p , then n-1 — n n-1 n-2 E x. > 1 + H.(6) + (x _-p ) + Z x. . .. 3 — x n-1 r n . 3 3=1 3=1 so that n-2 y = a + (x , -p )a , + Z x.a. + 6 J n n-1 r n n-1 . n i i 3=1 158 corresponds to an optimal solution with x ^ 0. Therefore x n < p . n n-1 r n Since y > a , we must have y = 1 and x , = p - 1. n J n n-1 n Consider now the representation of y 4- 6 . We know that Z n _ 1 (y+6) - Z* (y+6). Now n-2 y + 6 = (p -l)a . + Z x.a. + 6 r n n-1 . j j J=l n-2 = a + Z y.a. + 6 n • i 3 J J=l J n-2 = p a + Z y.a. n n , ■• j j j-1 Thus n-2 n-2 Z -, (y+6) = p + Z y.>l+ Z y. + H.(6) j=l j=l n-2 > p - 1 + Z x. + H.(6) j-1 > Z*_ 1 (y+6) since it corresponds to a legal decomposition of y + 6 . But this is a contradiction, since Z . (y) = Z*_, (y) for all y, and the theorem follows . Corollary 5.3.1 . If (l,a„,a ,a ) is Hu-optimal, then ((l,a ,a,), (z_,z.)) is optimal for all z_, z. and all y. 2 4 2 4 Proof . From Lemma 5.3.1, we know that (l,a ,a ) is Hu-optimal. From Theorem 5.3.1, we see that all we need is 1 + H 1 (6 3 ) < p 3 159 where a. + 6~ = p.a , _< 6„ < a . But this is precisely the condition for Hu-optimality . More generally this shows that if A is Hu-optimal, then restricting x and x n does not affect the optimality. n n-1 We define the set A to be the set of denominations obtained from A by deleting those whose subscripts are in the set I. With this notation we have the following theorem. Theorem 5.3.2 . Let A and Z satisfy the following condition: for all I Z*(y) . and let y be a minimal counterexample to be the theorem for (A,Z) = n ((l,a_,...,a ), (z~,...,z )). Then y = E y.a.. If for all i, 2 n 2 n J J i i i-1 E y.a. < a. i-i '* 1 then Z (y) = H*(y) < Z*(y) . Unless y = z , there must be some k e J n y n J — n J ; n n for which y, = z and k-1 E y . a . > a, . .-.11— k 1=1 n Suppose, in the optimal decomposition, y = E x.a.. If x, f 0, ,,11 J\. i=l we can reduce y by x, a and z, by x to obtain a new y and a new Z, 160 with the same A and J, and still Z (y) > Z*(y) . Now let A' = A, , , n n \ k,/ and Z' = Z, , , that is A and Z with the k-th item deleted. Clearly A' and Z' satisfy the hypotheses of the theorem with J' = J - {k} . Since |a' | < n, (A',Z f ) is optimal and since the optimal decomposition did not use a, . However, k < n and thus we have 1=1 x=l since ((l,a_,...,a .. ) , (z~, . . . ,z , ) ) is optimal for y - y a z n— 1 z n-l n n . Thus z(y) < z; i(y) - Z*(y) n — n— i n contradicting our assumption. The remaining case to consider occurs when y = z , and n-l E y.a. > a . Since there is no a , n , n ^ J. Ifx , = y -, = z n , , , i i- n n+1 n-l y n-l n-l x=l then we can eliminate a , , z . to obtain a smaller system. By n-l n-l Lemma 5.3.1, we know the resulting system satisfies the hypotheses. Since y , < x , , we know then that y , < z .. . If we have, for ^n-1 — n-l . .. y n-l n-l J-l no i e J, y. = z. with Z y.a. > a., then J J i=1 i i - 3 Z n (y) = Z^(y) , Z' = (»,«,... ,»,y n ) which by Theorem 5.3.1 is optimal. Since Z' _> Z, we have Z n (y) - z^(y~) - z^*(y~) < z*(7) . 161 On the other hand if there is some i e J for which y. = z. and 3-1 : J Z y.a. > a., the previous argument shows that we can delete i , a., i=l * 1 " 3 3 z. to show that Z (y) is optimal. J n We now turn our attention to systems with few variables. From Corollary 5.3.1, we know that any three variable problem will have (A,Z) optimal for all y if and only if it is Hu-optimal. For four variable problems, this is not true, but the following result gives necessary and sufficient conditions for optimality. Theorem 5.3.3 . Let A = (l,a ? ,a„,a.) be Hu-optimal. Then (A,(z„,z ,z )) is non-optimal if and only if (1) z 3 > P 4 and (2) 1 + Z 2 (a 3 -1) > P 4 + Z 2 (a 3 -l-5 4 > where a. + 6, = p,a„. 4 4 4 3 Proof . If (1) and (2) are satisfied, then Z 4 (a 4 +a 3 -l) - 1 + Z 2 (a 3 -1) > P 4 + Z 2 (a -l-6 4 > = Z 3 (p 4 a 3+ a 3 -l-6 4 ) = Z 3 (a 4 +a 3 -l) and the system is non-optimal. Conversely, suppose y is a counterexample with _ 4 4 y= Z y.a. = Z x.a. i=l i=l where the y. are the coefficients for the heuristic algorithm and the x. are the coefficients for the optimal decomposition. Then we can assume x. = since subtracting x.a. from y would give a new 4 4 4 162 counterexample, with a possibly reduced z,. Thus Z 4 (y) > Z 3 (y) = Z A (y) Also, if y ^ 0, we can subtract y.a. from y to obtain a new counterexample with a possibly reduced z~. Changing z~ and z does not affect condition 2 and if we have an example where (1) is not satisfied, reducing z will leave (1) unsatisfied. Suppose now that (1) is not satisfied: z. < p, . Then x_ must equal z_ since a. > (p.-l)a„ > z a_. Unless y_ = z_ and y, > a„, we 3 4 4 3 — 3 3 I I 1 2. have Z^Cy") = H*(7) = H^y") . Thus y 4 a 4 + Z 2 a 2 + y l = Z 3 a 3 + X 2 a 2 + X l and since z„a„ < a. < y,a., we must have x„a_ + x n > z_a. + y n , and 33 4—44 II 1 II 1 x = z , x > y . Thus y.a + y = z a + x and x > y , but x_ + z_ < y. + y. . This implies that x n > y n + y,a. - z„a„ > y, + 1 3—4 J 1 1—1 44 33 1 (y.-z„)a. while x. < y. + y. - z„, which is impossible. 434 1—1 4 3 Suppose (2) is not satisfied: 1 + H (a.,-1) <_ p, + H (a -1-6 ,) . As before we can assume that the minimal y has the two forms y ■ y 4 a 4 + z 2 a 2 + y i = x 3 a 3 + x 2 a 2 + X;L with z_a + y _< a - 1 and y , + z + y > x + x + x . Let y' = y 4 a 4 + a 3 - 1 = y 4 a 4 + y; [ = y + b, b - a 3 - 1 - z 2 a 2 . Then Z.(y') = Z (y) + b > Z (y) + b >_ Z (y+b) . Now 163 y' ■ (yz-Da,. + a, - 1 - 6. + a, + 5, ■ (x'-p 4 )a 3 + x^a 2 + x' + p 4 a 3 where y' = x'a„ + x'a + x' Z 4 (y'-(a 4 +6 4 )) = y 4 - 1 + Z^a^l^) Therefore p 4 + Z 2 (a 3 -l-6 4 ) = Z 4 (y'-(a 4 +6 4 )) + 1 - y 4 + p 4 _ a, > z a if (iii) applies) . Proof . Certainly if (A,Z) is optimal for all y, it must be optimal for the specific values of y given in (i)-(iii) . Suppose conversely that (i)-(iii) are satisfied and that Z,_(y) > Z*(y) for some y. Let y be a minimal counterexample. If in any optimal solution x q > we could reduce y by x a , and possibly z by x , to obtain a smaller y. Note that changing z does not affect (i)-(iii) unless z were reduced to 0. But if x = z , then Z (y) = Z*(y) since ((l,a 9 ,a ,a ) , (z ,z ,z )) is assumed optimal. Thus if there is a counterexample, then there is one with x,. = for all optimal solutions (possibly with a different z ) . Let y = ys a 5 + y 4 a 4 + y 3 a 3 + y 2 a 2 + y i " x 4 a 4 + X 3 a 3 + X 2 a 2 + X l 165 where the y! correspond to the Z solution and the x. to the optimal solution. If Z is reduced to 1, we would get y = a 5 + V4 + y 3 a 3 + y 2 a 2 + y l and since the coefficient of a,. ^ 0, 1 + Z y. > Ex. 1=1 1=1 Thus we can assume y = 1. We can also assume y, is zero by the following reasoning. If y, < z, , we can add y, to z without changing the hueristic solution. Increasing z. can only improve the optimal solution. Thus y is a counterexample for this increased Z. If, now, y is decreased by y,^, and z, is decreased back to its original value, we have a smaller counterexample and by minimality y, must have been 0. If, on the other hand, y, = z,, then certainly x, = z, and (A' ,Z ') =((l,a_,a„,a ) , (z„,z„,z )) is not optimal. By Lemma 5.3.1, A' is Hu-optimal, so by Theorem 5.3.2, Z^(a 5 +a 3 -l) > Z^*(a 5 +a 3 -l) . However Z^(a 5 +a 3 -l) = Z 5 (a 5 +a 3 -l) and this would contradict (ii) . Hence we must have y, < z, and thus y A = 0. To complete the proof, we consider three cases. 166 Case I. If a, > z A a A + z i a v t ^ ien ( A » z ) is always optimal. If, in fact, a,. _> z a 3 a + 7 "\ a --i + z ? a ?» tnen f° r an Y Y >. a c» Z 5 (y) = 1 + Z 4 (y-a 5 ) < 1 + y - a 5 Z 4 (y) = z 4 + Z 3 + Z 2 + y " (z 4 a 4 +Z 3 a 3 +Z 2 a 2 ) > z 4 + z 3 + z 2 + y - a 5 > 1 + y - a 5 unless z = z = z = 0. In this case, however, (l,a,.) is always optimal. If a < z.a + z -3 a Q + z 9 a o» then let a minimal counterexample be y = a 5 + y 3 a 3 + y^ + y ± = z 4 a 4 + Z 3 a 3 + X 2 a 2 + X l It should be pointed out that reducing z, , as we needed to do to insure y, = 0, does not change our conditions except possibly to make a r > z.a. + z~a~ + z_a_, a case which we have already handled. 5—443322 If y_ = z_, we can reduce y by y^a~ and z_ to to get a new counterexample. Again reducing z_ does not adversely affect our conditions since reducing z„ keeps ( (l,a„,a„,a.) , (z_,z„, z.) ) optimal. Similarly if y„ < z„, we can reduce y by y^a_ and z„ by y„ to get a new counterexample with y. = 0. If x = y„, then since a > z.a, + z.a., we must have x > y and x 1 + x_ + z, > y + y + 1 contradicting Z,.(y) > Z, (y) . Since x~ _> y , we must have x_ > y~. If, in reducing y by y 9 a_, we need not reduce z~, then we can assume that y~ = 0. In 167 this case Z s (y) = H*(y) since no constraints are violated. Thus x = z > y„. If we look at y - y 9 a~, however, we see that Z (y-y 2 a ) = H*(y-y 2 a 2 ) since Y x < a 2 < a 3 « Thus Z 5 (y-Y 2 a 2 ) 1 Z 4 (y-y 2 a 2 ) = Z^(y) - y 2 unless ^ > a 2 > y^ Since Z^y-y^) = Z c(y) ~ Yoj we have Z,(y) >_ ZAy) , and (A,Z) must be optimal. Case 2. If z.a. _ y„, we can assume that y_ = 0. If z. must be reduced, we still have an optimal system if in the new system we are in case 1, or we are still in case 2. Since z„ cannot be zero in case 2, we know that y~a + y-, < a„. Since for some i i-1 Z a.y . > a. ]-l 3 J - the only possibility is i = 2: y = a 5 + z 2 a 2 + y x with y >^ a„. Since a„ > z„a_ + y-i > we have Z 5 (a 5 +a 3 -l) - Z 5 (y) + a 3 - 1 - (y^+y^ and Z 4 (a 5 +a 3 _1) = Z 4 (z 4 a 4 +x 3 a 3 +x 2 a 2 +x l +a 3 -1_(y 2 a 2" fy l )) <_ Z^ + x 3 + x 2 + x 1 + a - 1 - (y 2 a 2 +y 1 ) - z*(7) + a 3 - l - (v 2 a 2 +y 1 ) < Z 5 (a 5 +a 3 -l) 168 contradicting (ii) . Case 3. If a,. _< z , a, , then one of (i)-(iii) must be violated. If y, = z , , then we are in the n = A case and the only possible counterexample is a, + a„ - 1, which corresponds to a s + z,a, + a~ - 1. But then Z 5 (a 5 +a 3 -l) = Z 5 (a 5 +z 4 a 4 +a 3 -l) - z^ > Z*(a 5 +z 4 a 4 +a 3 -l) - z 4 = Z*(a 5+ a 3 -l) > ZJ(a 5+ a 3 -l) and (ii) is contradicted. Thus y, < x. < z. . Since for some i, k 4—4 i-1 a. < E y.a. 1 - j-i ^ this i must be 2 or 3 or both. If both, then Z 5 (a 5 +a 4 -l) = Z 5 (y") + a 5 + a 4 - 1 - y" > Z 4 (y") + a 5 + a 4 - 1 - y >_ Z*(a +a,-l) , contradicting (i) . If y < z , then y_ must be for the minimal counterexample since Z 5 (y-y 3 a 3 ) = Z 5 (y) - y 3 > Z 4 Z^(y) - y 3 where z'=z+y and z 5 (y) - y 3 > z 4 (y-y 3 a 3 ) . 169 Then since y„ = < z~, y <_ a, + a - 1, and Z 5 (a 5 +a 3 -l) = Z 5 (y) + a^ + a^ - 1 > Z 4 (y) + a 5 + a 3 - 1 - y > Z 4 (a 5 +a 3 -l) contradicting (ii) . If y 3 = z„, and y_ < z , then y = a 5 + z 3 a 3 + y 2 a 2 + y ± - x 4 a 4 + X 3 a 3 + X 2 a 2 + X l If y _< x , then y 1 = by minimality of y. Let a 5 + a 4 - 1 = a 5 + z 3 a 3 + yfa + y ' . Since a, - 1 _> z a + y~a + y , we must have y ' >^ y and y ' >_ = y . Thus Z 5 (a 5 +a 4 -l) = Z 5 (y") + y 2 - y 2 + yj > z 4 (7) + y' - y 2 + yj > Z 4 (y+(y 2 -y 2 )a 2 +y|) unless x~ + y ' - y_ > z , and we have Z 5 (a 5 +a 4 _1) > Z 4 (a 5 +a 4 _1) contradicting (i) . Unless x = z , we have x _< y , and y' _< z . Thus x 2 + y ' - y„ <_ z 2 - If x„ = z , then x 2 > y_ would imply x 4 > !» x 3 1 y 3 > x 2 - ^2' X l - y l and z 4 (y) i z 5 (y) • 170 If x 1 < y 1 , we must have x 1 = by minimality. Also y ' < y 1 or we can still show a + a, - 1 to be a counterexample. Therefore y~ < y'. Since a, > z^a we can define 6, , p~ by a 4 + 6 4 = z 3 a 3 + P 2 a 2 ' ° - 6 4 < a 2 * Since 6^ _> 0, a^ + 6^ > a^ - 1 and y^ < p 2< Since y 2 < y^, Y 2 £ P 2 " 2 Now a 5 + a^ + 6^ - (a 2 +l) = a^ + z^ + (p 2 ~2)a 2 + a 2 - 1 and p 2 - 2 > y , a - 1 ^ y . Hence Z 5 (a 5 +a 4 +6 4 -a 2 -l) = Z^y") + p 2 - 2 - y £ + a £ - 1 - Y;L > Z 4 (7) + (p 2 -2) - y 2 + a 2 - 1 - Yl > Z 4 (a 5 +a 4 +6 4 -a 2 -l) provided x 2 + p 2 - 2 - y < z . If x >_ y , then x = z Since x < y < a - 1, we can reduce y by y 9 a ? without changing z since z„ is not invoked in either Z^ or Z, . But if y_ = 0, t hen y„a„ + y < a„ < a„. Thus a r + a. +6. - a_ - 1 must be a counter- 2 2 ; 1 2 3 5 4 4 2 example, completing the proof of the theorem. Each of the three cases above is possible as the following examples show: Example 5.3.1 . (A,Z) = ( (1, 5, 14,80, 226) , (»,1,«,») ) Z r (a r .+a.-l) = 15 = Z.(a,.+a,-l) and (i) is satisfied. 5 5 4 4 5 4 Z r (a c +a -1) = 2 <3 = Z.(a c +a -1) and (ii) is satisfied. 5 5 3 4 5 3 Z c (a c +a.+6.-a -1) = 18 > 14 = Z. (a c +a.+6.-a -l) . Thus (iii) is the 55442 45442 only one of the conditions which is not satisfied. 171 Example 5.3.2 . (A,Z) = ((1,5,9,26, 43) , (1,1, «,«)) Z_(a r +a -1) = 14 > 6 = Z,(a r +a,-l) and (i) is not satisfied. 5 5 4 4 5 4 Z r (a r +a„-l) =5 < 14 = Z.(a c +a -1) and (ii) is satisfied. 5 5 3 4 5 3 Since a, > z a + z_a , the third possibility does not arise, and only (i) is not satisfied. Example 5.3.3 . (A,Z) = ((1,5,13,21,45) , (1,1,»,«0) Z c (a r +a.-l) = 5 = Z.(a r +a / -l) and (i) is satisfied. 5 5 4 4 5 4 Z r (a c +a -1) = 9 > 7 = Z. (a r +a n -l) and (ii) is not satisfied. 5 5 3 4 5 3 Since a, > z a. z 9 a 9 > tne third possibility again does not arise. Thus only (ii) is not satisfied. From these three examples it seems difficult to state a satis- factory set of necessary and sufficient conditions which will generalize to arbitrary n. The sufficient condition of Theorem 5.3.2, suggests that we should expect at least one "critical" value of y for each z.