Tight results for Next Fit and Worst Fit with resource augmentation

Similar documents
V.Abramov - FURTHER ANALYSIS OF CONFIDENCE INTERVALS FOR LARGE CLIENT/SERVER COMPUTER NETWORKS

GENERATING CERTAIN QUINTIC IRREDUCIBLE POLYNOMIALS OVER FINITE FIELDS. Youngwoo Ahn and Kitae Kim

Comparison of Differences between Power Means 1

Comb Filters. Comb Filters

Solution in semi infinite diffusion couples (error function analysis)

In the complete model, these slopes are ANALYSIS OF VARIANCE FOR THE COMPLETE TWO-WAY MODEL. (! i+1 -! i ) + [(!") i+1,q - [(!

( ) () we define the interaction representation by the unitary transformation () = ()

SOME NOISELESS CODING THEOREMS OF INACCURACY MEASURE OF ORDER α AND TYPE β

Online Supplement for Dynamic Multi-Technology. Production-Inventory Problem with Emissions Trading

CS286.2 Lecture 14: Quantum de Finetti Theorems II

Testing a new idea to solve the P = NP problem with mathematical induction

Appendix H: Rarefaction and extrapolation of Hill numbers for incidence data

Epistemic Game Theory: Online Appendix

. The geometric multiplicity is dim[ker( λi. number of linearly independent eigenvectors associated with this eigenvalue.

On computing differential transform of nonlinear non-autonomous functions and its applications

Lecture 6: Learning for Control (Generalised Linear Regression)

Graduate Macroeconomics 2 Problem set 5. - Solutions

Existence and Uniqueness Results for Random Impulsive Integro-Differential Equation

. The geometric multiplicity is dim[ker( λi. A )], i.e. the number of linearly independent eigenvectors associated with this eigenvalue.

Relative controllability of nonlinear systems with delays in control

ON THE WEAK LIMITS OF SMOOTH MAPS FOR THE DIRICHLET ENERGY BETWEEN MANIFOLDS

Lecture 11 SVM cont

Survival Analysis and Reliability. A Note on the Mean Residual Life Function of a Parallel System

Linear Response Theory: The connection between QFT and experiments

Cubic Bezier Homotopy Function for Solving Exponential Equations

Li An-Ping. Beijing , P.R.China

Lecture VI Regression

Online Appendix for. Strategic safety stocks in supply chains with evolving forecasts

Mechanics Physics 151

[ ] 2. [ ]3 + (Δx i + Δx i 1 ) / 2. Δx i-1 Δx i Δx i+1. TPG4160 Reservoir Simulation 2018 Lecture note 3. page 1 of 5

Mechanics Physics 151

College of William & Mary Department of Computer Science

Multi-priority Online Scheduling with Cancellations

Department of Economics University of Toronto

Part II CONTINUOUS TIME STOCHASTIC PROCESSES

Lecture 18: The Laplace Transform (See Sections and 14.7 in Boas)

Track Properities of Normal Chain

Efficient Asynchronous Channel Hopping Design for Cognitive Radio Networks

On One Analytic Method of. Constructing Program Controls

Approximate Analytic Solution of (2+1) - Dimensional Zakharov-Kuznetsov(Zk) Equations Using Homotopy

e-journal Reliability: Theory& Applications No 2 (Vol.2) Vyacheslav Abramov

Dynamic Team Decision Theory. EECS 558 Project Shrutivandana Sharma and David Shuman December 10, 2005

Mechanics Physics 151

@FMI c Kyung Moon Sa Co.

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 4

Variants of Pegasos. December 11, 2009

Example: MOSFET Amplifier Distortion

Chapter 6: AC Circuits

UNIVERSITAT AUTÒNOMA DE BARCELONA MARCH 2017 EXAMINATION

The preemptive resource-constrained project scheduling problem subject to due dates and preemption penalties: An integer programming approach

DEEP UNFOLDING FOR MULTICHANNEL SOURCE SEPARATION SUPPLEMENTARY MATERIAL

A Deza Frankl type theorem for set partitions

A Competitive Test for Uniformity of Monotone Distributions

Volatility Interpolation

Panel Data Regression Models

Outline. Probabilistic Model Learning. Probabilistic Model Learning. Probabilistic Model for Time-series Data: Hidden Markov Model

Should Exact Index Numbers have Standard Errors? Theory and Application to Asian Growth

FTCS Solution to the Heat Equation

NATIONAL UNIVERSITY OF SINGAPORE PC5202 ADVANCED STATISTICAL MECHANICS. (Semester II: AY ) Time Allowed: 2 Hours

Method of upper lower solutions for nonlinear system of fractional differential equations and applications

Advanced Macroeconomics II: Exchange economy

HEAT CONDUCTION PROBLEM IN A TWO-LAYERED HOLLOW CYLINDER BY USING THE GREEN S FUNCTION METHOD

Bundling with Customer Self-Selection: A Simple Approach to Bundling Low Marginal Cost Goods On-Line Appendix

An introduction to Support Vector Machine

Let s treat the problem of the response of a system to an applied external force. Again,

John Geweke a and Gianni Amisano b a Departments of Economics and Statistics, University of Iowa, USA b European Central Bank, Frankfurt, Germany

EP2200 Queuing theory and teletraffic systems. 3rd lecture Markov chains Birth-death process - Poisson process. Viktoria Fodor KTH EES

F-Tests and Analysis of Variance (ANOVA) in the Simple Linear Regression Model. 1. Introduction

Notes on the stability of dynamic systems and the use of Eigen Values.

Chapter Lagrangian Interpolation

How about the more general "linear" scalar functions of scalars (i.e., a 1st degree polynomial of the following form with a constant term )?

Modeling and Solving of Multi-Product Inventory Lot-Sizing with Supplier Selection under Quantity Discounts

EEL 6266 Power System Operation and Control. Chapter 5 Unit Commitment

Computational results on new staff scheduling benchmark instances

Lecture 2 M/G/1 queues. M/G/1-queue

Bernoulli process with 282 ky periodicity is detected in the R-N reversals of the earth s magnetic field

Time-interval analysis of β decay. V. Horvat and J. C. Hardy

Appendix to Online Clustering with Experts

Optimal environmental charges under imperfect compliance

2/20/2013. EE 101 Midterm 2 Review

Reactive Methods to Solve the Berth AllocationProblem with Stochastic Arrival and Handling Times

Ordinary Differential Equations in Neuroscience with Matlab examples. Aim 1- Gain understanding of how to set up and solve ODE s

An Optimal Control Approach to the Multi-agent Persistent Monitoring Problem

THE PREDICTION OF COMPETITIVE ENVIRONMENT IN BUSINESS

Robustness Experiments with Two Variance Components

Political Economy of Institutions and Development: Problem Set 2 Due Date: Thursday, March 15, 2019.

ON THE ADDITION OF UNITS AND NON-UNITS IN FINITE COMMUTATIVE RINGS

Math 128b Project. Jude Yuen

Performance Analysis for a Network having Standby Redundant Unit with Waiting in Repair

SELFSIMILAR PROCESSES WITH STATIONARY INCREMENTS IN THE SECOND WIENER CHAOS

Attribute Reduction Algorithm Based on Discernibility Matrix with Algebraic Method GAO Jing1,a, Ma Hui1, Han Zhidong2,b

2 Aggregate demand in partial equilibrium static framework

Second-Order Non-Stationary Online Learning for Regression

THERMODYNAMICS 1. The First Law and Other Basic Concepts (part 2)

TSS = SST + SSE An orthogonal partition of the total SS

Robust and Accurate Cancer Classification with Gene Expression Profiling

New M-Estimator Objective Function. in Simultaneous Equations Model. (A Comparative Study)

A Tour of Modeling Techniques

Bandlimited channel. Intersymbol interference (ISI) This non-ideal communication channel is also called dispersive channel

Clustering (Bishop ch 9)

Transcription:

Tgh resuls for Nex F and Wors F wh resource augmenaon Joan Boyar Leah Epsen Asaf Levn Asrac I s well known ha he wo smple algorhms for he classc n packng prolem, NF and WF oh have an approxmaon rao of However, WF seems o e a more reasonale algorhm, snce never opens a new n f an exsng n can sll e used Usng resource augmened analyss, where he oupu of an approxmaon algorhm, whch can use ns of sze >, s compared o an opmal packng no ns of sze, we gve a complee analyss of he asympoc approxmaon rao of WF and of NF, and use o show ha WF s srcly eer han NF for any < <, whle hey have he same asympoc performance guaranee for all, and for = Inroducon Bn packng has een exensvely suded n oh he offlne and he onlne envronmens and has numerous applcaons [8,, 7, 4, 3] In he asc prolem, he goal s o pack a sequence of ems of szes s, s,, where s (0, ], no a mnmum numer of un-capacy locks, called ns, such ha he oal sze of he ems n each n does no exceed An em s denfed wh s ndex, and for a se of ems X {,, }, we denoe s(x) = s j Thus X can e packed n a n f s(x) If he prolem s j X onlne, hen he ems mus e packed rrevocaly one y one, whle fuure ems are unknown a he me of packng The goal s o mnmze he numer of ns conanng a leas one em, also called used ns The operaon of assgnng a frs em o a new n s called openng a new n For an algorhm A, we denoe s cos, e, he numer of used ns n s packng, on an npu I, y A(I) (or smply A) The cos of an opmal soluon OPT, for he same npu, s denoed y OPT(I) (or OPT) The asympoc approxmaon rao allows o compare he coss for npus for whch he opmal cos s suffcenly large The asympoc approxmaon rao of A, R A s defned as follows ( ) ALG(I) R A = lm N OPT(I) sup I:OPT(I) N Deparmen of Mahemacs and Compuer Scence, Unversy of Souhern Denmark, 530 Odense M, Denmark, joan@madasdudk Deparmen of Mahemacs, Unversy of Hafa, 3905 Hafa, Israel lea@mahhafaacl Chaya fellow Faculy of Indusral Engneerng and Managemen, The Technon, 3000 Hafa, Israel levnas@eechnonacl

In hs paper we only consder he asympoc approxmaon rao, whch s he common measure for n packng algorhms Thus we use he erm approxmaon rao hroughou he paper, wh he meanng of asympoc approxmaon rao In he early days of he sudy of n packng, several naural algorhms were nroduced Two such algorhms are NEXT FIT (NF) and WORST FIT (WF) [7] The wo algorhm were presened as offlne heurscs, u are n fac onlne algorhms whch process he ems as a ls NF keeps a sngle acve n a each me If he nex unpacked em canno e packed no he curren acve n, hen s closed and never used agan, whle a new acve n s opened n order o accommodae he em WF packs he nex em n a prevously opened n wh he mnmum oal packed sze of ems f such a n can accommodae hs em as well Only f no such n exss s a new n opened n order o accommodae he em Thus WF s nuvely he eer algorhm, hough NF s more effcen; s a ounded space algorhm In fac, Wors-F s provaly eer han Nex-F The followng resul (see also []) acually apples o Nex-F compared o any Any-F algorhm Proposon On any sequence of ems, I, NF wll use a leas as many ns as WF Proof Le B NF () denoe he n numer where NF places he em ha WF places as he frs n n We show y nducon on ha B NF () for all Boh values are for = Suppose holds for some value Then WF opens a new n,, wh em j and NF places j n some n Consder he em, k, where WF opens n + If NF has no already opened n +, has packed all ems eween ems j and k n n WF canno have pu more ems n n, so n n NF s packng s a leas as full as n n WF s packng Thus, NF mus open n + f has no already done so Snce B NF () for all, NF uses a leas as many ns as WF However, oh WF and NF have approxmaon raos of [7], so he sandard measure does no dsngush eween hese wo algorhms We use resource augmenaon [9, 5] n order o analyze he wo algorhms and compare her ehavor In resource augmenaon, an approxmaon (or onlne) algorhm s equpped wh resources whch are larger han hose of an opmal algorhm whch s compared o For n packng, resource augmenaon wh a rao > means ha he approxmaon algorhm may use ns whch are mes larger han hose of he opmal algorhm [5] Specfcally, we assume ha he algorhm uses ns of sze, whle, an opmal algorhm uses a n of sze Clearly, all em szes are n (0, ] Our resuls We show ha he approxmaon rao of WF, R WF (), s: R WF () = 3 We show ha he approxmaon rao of NF, R NF (), s:, for [, ], for [, ) 4 + + + 3 +, where = Thus, for >, = 0 and he rao ecomes If =, e, = + k for some neger k, he rao ecomes Moreover, n he case =, e, 3 4 4 <, we ge he rao 5 6, for

=, e, 4 3 < 3 6 7, we ge he rao 5 6, for = 3, e, 5 4 < 4 4 8 3, we ge he rao 7 0 ec In he case = we have =, and he approxmaon rao s For he analyss we use wegh funcons, whch are relaed o he wegh funcon orgnally nroduced for he analyss of FIRST FIT (FF) [8, ] We use clever generalzaons of hs ype of wegh funcon o acheve gh ounds for all values of Prevous work Resource augmenaon for n packng was suded y Csrk and Woegnger [5] They have suded ounded space n packng, where a consan numer of ns can e avalale a any me o receve new ems (acve ns) If he maxmum numer of open ns s reached, and a new n needs o e used, one of he acve ns mus e closed and never used agan They defned a funcon ρ(), and exended he Harmonc algorhms of [0] for he case of > The wors case rao of hs algorhm comes arrary close o a ceran ound ρ() They also proved ha no onlne ounded space algorhm can have an approxmaon rao smaller han ρ() n he wors case Unounded space resource augmened npackng was suded n [6], where mproved algorhms are desgned, and lower ounds for general onlne n packng algorhms are proved Some easy cases for he analyss of NF and WF In hs secon, we show some smple ounds on he approxmaon rao of he wo algorhms These ounds are n fac gh n a par of he nervals The more dffcul cases are dscussed laer Lemma The approxmaon raos of NF and WF are a mos, and a mos for Proof Snce no em has a sze of more han, every n excep for possly he las opened n has a oal sze of ems of a leas = Snce a n of an opmal packng can conan a oal of a mos, an approxmaon rao of a mos follows On he oher hand, snce for oh WF and NF, he sum of ems n wo consecuve ns s more han, f q ns are opened, he oal sze of ems s more han q (q ), so hese ems requre more han ns n a packng no ns of sze, ha s, a leas q for, and an approxmaon rao of a mos follows We nex show ha n he case, oh WF and NF have an approxmaon rao of exacly, e, he approxmaon rao for = s, s monooncally decreasng, and ends o zero as grows Theorem 3 Le The approxmaon rao of oh NF and WF s Proof By Lemma, we only need o prove a lower ound The followng lower ound consrucon s vald for oh algorhms for Le N e a large neger Le p = ( )N + Then ( )N < p ( )N + or + p N > and p N + N The sequence consss of N aches of p + ems, each of whch conans an em of sze, followed y p ems of sze N The oal sze of he ems of one ach s + p N A new em of sze canno e added o a n whch conans all ems of one ach snce he oal sze would e a leas + p N > Boh WF and NF need o open a new n for every large em, and hen all small ems are packed ogeher wh he larger em 3

In an opmal packng no a ns of sze, N ns are compleely flled wh ems of sze Each n can receve N smaller ems, hus p addonal ns are used The approxmaon rao s a leas + + N =, whch ends o + for large N N We nex consder he approxmaon rao of NF for cases where = +, for some neger Theorem 4 Le = + for an neger The approxmaon rao of NF s exacly Proof Le N e a large neger and consder an npu wh N aches of four jos, of he szes (+)N, +, (+)N N+ sze of (+)N and N N+p +, We clam ha NF uses wo new ns for each ach, and hese ns have a oal packed N+ (+)N, respecvely For N, oh of hese oal packed szes are less han Indeed, he hrd em canno e packed no a n of he frs ype snce canno e packed no a n of he second ype snce An opmal packng no ns of sze = + ems of he hrd ype, and ns for he oher ems Thus, he approxmaon rao s a leas N+ (+)N + N (+)N N+ (+)N + N N(+) >, and he frs em > as well Thus N ns are used uses N ns for he ems of he frs ype, N ns for he N N++N, whch ends o + = for large N 3 A complee analyss of NEXT FIT In hs secon, we analyze NF for values of whch sasfy + + < < +, for some neger An alernave defnon of s = These are he mssng cases for NF We defne he followng wegh funcon of he ems In oh he analyss of NF and he analyss of WF for he addonal cases, we use pecewse lnear funcons defned on (0, ] Thus he wegh of an em s only ased on s sze For a se X {,, }, and any funcon g : (0, ] R, we le g(x) = g(s ) Le I, for 0 e defned as I = ( ( ), + ] ( ), X and le J, for e defned as ( + J = ( + ), ( ] ) Noe ha for any, ( ) < + ( ) holds snce < +, and + ( + ) < ( ) holds snce > + + For, J I = ( + ( + ), + ( )], and I 0 = (0, + ], herefore J I = (0, ] 0 We defne he wegh funcon w as follows w(x) = x + (( + ) + ), for x I, 0 x ( + ), for x J, In he proofs of Clam 5 and Lemma 7, he reakpons eween he I s and J s are consdered We le p denoe he pon ( ) for 0 and p + s + ( ), for 0 These reakpons 4

are p j for j, whle p 0 and p + are he oundares of he doman of he funcon w Noe ha y defnon, p = p ( +)+, for, and p + = p ( +), for We analogously defne p + = ( + )( ) and p +3 = (+)+ ( ( + )) = We have p +3 + p 0 = and p + + p =, and hus p j + p +3 j = for any 0 j + 3 We also le w(0) = 0 Clam 5 The funcon w s connuous and monooncally ncreasng n (0, ] Proof Snce w s pecewse lnear, wh posve slopes, s suffcen o prove ha s connuous a reakpons The value of he funcon for p = ( ) for s ( ) ( + whle he value for p + ε, for a suffcenly small value of ε, s ( ) + ε + (( + ) + ) = ( + + 3 ), ) = ( + + 3 ) + ε In he second case, he value of he funcon for p + for 0 s + ( ) + (( + ) + whle he value for p + + ε, for a suffcenly small value of ε, s ( + ( ) + ε) ( + )( + Thus he funcon s connuous and herefore, monooncally ncreasng ) = ( + + 3 ) + + ) = ( + + 3 ) + + + ε Lemma 6 Le X e a se of ems such ha s(x), hen w(x) + + Proof Consder a se X We frs show ha we can assume whou loss of generaly ha all ems come from he nervals I 0, I and J Consder an em j of I for > Replace hs em wh ems of sze s j The resulng ems have a sze n (, + ] I, snce + ( ) s equvalen o + or ( ) + = (+)( ) Usng >, we ge ha hs s equvalen o + whch clearly holds The oal wegh of he new ems s herefore ( s j ), whch s equal o he wegh of he orgnal em + + + Consder an em j of J for > Replace hs em wh ems of sze s j sze n ( + + or +, ] J, snce + + + ( + )( ) + = ( + )( ) The resulng ems have a s equvalen o + + Usng >, we ge ha hs s equvalen o + + whch clearly holds The oal wegh of he new ems s herefore ( s j ( + )), whch s equal o he wegh of he orgnal em 5

Le K J and K I denoe he suses of ems n X, of szes n J and n I, respecvely, and le k J = K J and k I = K I w(x) = s j + s j k J ( + j X j K J ) + k I (( + ) + ) Clearly, j K J s j j K I s j k I( ) and j K J s j k J ( ) We consder wo cases If k I( ) k J( ), we have k I + k J, and snce k I and k J are negers and s no, we ge k I + k J = + Thus usng j X s j we ge, w(x) + k I( ) k J( + = (k I + k J )( + ) ) + k I (( + ) + ) ( + )( + ) = + + If k I( ) k J( ), we have k I + k J, and snce k I and k J are negers, we ge k I + k J = Thus w(x) + k J( ) k J( + + (( + ) + ) + k I (( + ) + ) = + + ) = + (k I + k J )(( + ) + ) We nex analyze he wegh n ns of NF For ha, we defne a modfed wegh funcon w y w (x) = w(x) w(x), where w(x) = x Denoe he ns used y NF y B, B,, B k, where k = NF, ha s, B s he se of ems packed no he -h n For a n B le γ = s(b ) denoe he oal sze of ems n B, and le τ denoe he sze of he frs em ever packed no B For a n B ( < k ) we defne a new wegh f(b ) = w(b ) + w (τ + ) = s(b ) + w (τ + ) If k s odd hen le k = k and oherwse k = k Thus k s even and NF k + Le n denoe he numer of ems n he npu Clearly, k n f(b ) < = j= w(s j ) + n n w (s j ) = w(s j ) j= j= Lemma 7 Le < k Then f(b ) + f(b + ) + + (+)(+) Proof Recall he reakpons p of he wegh funcon w Le Y, Z e such ha s(b ) Y = (p y, p y+ ] and s(b + ) Z = (p z, p z+ ], where y, z + Noe ha + < k, hus he n B + s no he las n, and an em was packed no n B +, so τ + s well-defned We have τ + > s(b ) and τ + > s(b + ) By defnon, s(b ) [p + y, p +3 y ) and s(b + ) [p + z, p +3 z ) We nex show y + z + Usng s(b ) + s(b + ) >, we ge p y+ + p z+ > Snce p y+ = p + y, we 6

ge p z+ > p + y Therefore, z + > + y or z + y > + Snce z, y are negers, hen z + y + If one of z and y s odd and he oher one s even, hen z + y + 3 We nex calculae f(b ) + f(b + ) = s(b ) + s(b + ) + w (τ + ) + w (τ + ) Consder a n B l, where l {, +}, and s(b l ) (p v, p v+ ] (hence v {y, z}) Noe ha snce w s a connuous pecewse lnear funcon whose slopes are non-negave, we conclude ha w s monooncally non-decreasng funcon, and hence f(b l ) = s(b l ) + w (τ l+ ) s(b l ) + w ( s(b l )) We nex oan a lower ound on f(b l ), hs ound depends on he pary of v If v s even, hen w ( s(b l )) = + v ( + + ), and s(b l )+w ( s(b l )) v ( If v s odd, hen )+ + v (+ + s(b l ) + w ( s(b l )) s(b l ) + s(b l ) + 3 v ( + ) = (+)(+ + )+ v ( + ) ) = + 3 v ( + ) We consder hree cases dependng on he pary of y and z, and n each of hese cases, we show ha f(b ) + f(b + ) + + (+)(+) Boh y and z are odd In hs case, usng + > 0 and y + z +, f(b ) + f(b + ) + 3 y ( + = + y + z 4 6 ( + ) ( + )( + ) + + 3 z ( + ) ) = + + ( + )( + ) The sum of y and z s odd Consder he case where y s odd and z s even, he oher case s symmerc In hs case we have y + z + 3 Snce + > 0, we conclude he followng: f(b ) + f(b + ) + 3 y = ( + )( + ) + + ( + )( + ) + + ( + ) + ( + )( + + ) + z ( + ) + ( y + z 3 )( + ) Boh y and z are even If y + z + 4, hen f(b ) + f(b + ) ( + )( + + ) + y ( + ( + )( + ) + 4 + ) + ( + )( + + ) + z ( + + ( + )( + 7 ) = + + ) ( + )( + )

Oherwse, snce he sum of z and y s even, and + y + z + 3, hen y + z = + f(b ) + f(b + ) s(b ) + s(b + ) + + y + 4 + 4 y z ( + + = ( + )( + ) + + ( + + ) + + z ) = + ( + )( + + ) ( + + ) Theorem 8 The approxmaon rao of NF for + + < < + s exacly 4 + + + 3 + Proof Le D denoe he se of ems By Lemma 6, w(d) + + OPT By Lemma 7 and he defnon of k, Thus w(d) k + 3 + NF (NF ) + 3 + 4 + + + OPT + 3 + + + For he lower ound, le N e a large neger, dvsle y Le ε = 4N The npu frs conans N aches Each of hese aches consss of four ems of he followng szes:, ε,, ε Every n wll conan an em of sze or, followed y an em of sze ε + Nex, he followng sequence of addonal ems s repeaed N mes (noe ha + > 0 and + 3 > 0, y he defnon of and usng > ) (+ 3) These are one em of sze +, 4N + ems of sze ε, one em of sze and an addonal 4N + ems of sze ε Noe ha + + + > 0 and ha (4N + )ε = 4N 4N + ε = + + + ε Snce + + + or, ncludng he frs such em of hs par of he npu, + + + ε = + ε, each em of sze + sars a new n + The numer of ns used y NF s a leas N + (+ 3) N Noe ha, snce hs s equvalen o + 3+ > 0 or o (+) > +, + (+ 3) < whch holds y he defnon of + (+ 3) N ems of sze, N ems of sze, a mos N) ems of sze ε Noe ha here are a mos N + + + + (+ 3) N ems of sze, and a mos N + (4N + )( We nex consder a packng no ns of sze There are a mos N + + (+ 3) (+ 3) of sze Snce ( ), ems of sze are packed no one n, resulng n N N ns wh one em ns Each such 8

n can eher receve an em of sze ( ) = +, or a leas ems of sze ε + ε = + + + 4N 4N + + Therefore, he oal numer of ems of sze ε whch are comned no exsng ns s a leas ( ) N + ( + 3) N (4N + + ) + 3 + = N (4N + ( + 3) + ) = ( + ) ( + 3) N (4N + + ) = 8N ( + ) ( + 3) ( + ) ( + 3) N + Therefore, he numer of remanng ems of sze ε s a mos N + (+ 3) N + (+ ) (+ 3) N We have + < + 3 and + < + 3, so he numer of remanng ems s a mos N + 4N < 6N, for any Snce + + < + + (+)/ = ++ + = + Therefore, snce +, a leas 4N ems of sze ε can share a n, so wo new ns are suffcen for he remanng ems of sze ε We ge a rao of a leas N+( values of N + (+ 3) N) N+ + (+ 3) N+ N +, whch ends o 4++ + 3 + for large enough 4 A complee analyss of WORST FIT In order o complee he analyss of WF, we need o consder he case < < In hs case, we wll show a gh ound of 3 on he approxmaon rao Thus s monooncally decreasng n hs case as well, and he approxmaon rao as a funcon of s connuous a = Theorem 9 For any < <, he approxmaon rao of WF s 3 Proof We sar wh he lower ound Le N e an even large neger Le ε = N The npu consss of N aches Each ach sars wh an em of sze, whch s followed y N + ems of sze ε The oal sze of he ems n a sngle ach s a leas +(N +) N = + + For large enough N, hs oal sze s also less han Thus each ach of N a separae n (once a new n s opened, he wors f of he nex ems of he ach s hs new n, and he N > 3 + ems s packed no oal sze of a ach ogeher wh he large em of he nex ach exceeds ) Afer hese N aches, here are 3 N addonal pars of ems, each of whch consss of ems of szes and ε Once agan, WF packs each par of ems no a dedcaed n The numer of ns used y WF s a leas N + 3 3 N N + N = N Noe ha here are N ems of sze, 3 N ems of sze, and a mos N(N + ) + 3 N + = N + N + + ems of sze ε 9

We nex consder a packng no ns of sze There are N ns wh one em of sze and one em of sze The oher ems of sze are packed no addonal ns A n whch already conans (only) an em of sze can receve addonal N ems of sze ε, snce + N N = The numer of ems of sze ε whch can e packed wh he remanng ems of sze (N 3 N)N s a leas 4( ) (N ) N = ( )N Hence, only a mos N + + unpacked small ems reman New ns are used for he remanng small ems One n can hold a leas N + The remanng ems requre a mos N+ + N+ N N N + N = (+3)N N + ( + 3) 0 addonal ns (snce < < ) N 3 = (+)N+ ems, snce N (+)N+ N + + We ge a rao of a leas N+0, whch ends o 3 for large enough values of N To prove he upper ound, we use a wegh funcon In order o defne hs funcon, we frs defne a hreshold rule for WF Consder a se A, whch conans ems of a oal sze α (for some α 0) The hreshold rule for WF s ha he larges em n A, has a sze of a leas α The movaon for hs hreshold rule s ha a n s opened y WF for an em of sze α, only f all prevously opened ns have a oal packed sze larger han α Noe ha n he resuls of [8] for FF, a hreshold rule s used as well, only n he case of FF, a smlar suaon mples ha all ems wll have a sze of a leas α, whle for WF hs s no necessarly he case We wll consder a wegh funcon for whch he followng hree properes hold The frs propery s ha f he oal sze of ems n a se A s a leas α, and A sasfes he hreshold rule, ha s, he sze of he larges em n A s a leas α, hen w(a) The second propery s ha f he oal sze of ems s only α β (for some β > 0), u he hreshold rule s sasfed for α (ha s, he sze of he larges em n A s a leas α, raher han α + β), hen w(a) lβ, where l = We only consder funcons w where l s fne sup 0<x w(x)/x The las propery whch s requred s ha for any se B, whch conans ems of a oal sze of a mos, holds ha w(b) R, where R s he approxmaon rao 3 Gven a wegh funcon w whch sasfes he hree properes, we consder only ns of wegh srcly smaller han Tha s, we remove all ns wh wegh a leas and consder he remanng ns We defne he coarseness of n, c, (see he analyss of FF n []) as he maxmum value such ha here exss a n j < whch has a oal sze of ems of c, ha s, he maxmum empy space n any precedng n We le c = 0 Snce all ns we consder have a oal wegh of ems smaller han, for n, he oal sze of ems s some value α, where he larges em packed n n has a sze of α β, for some β > 0 We always have (α β ) > c, as oherwse WF would pack hs em n he n j for whch he maxmum n he defnon of c s acheved We have c + α > c + β Le W e he oal wegh of n, hen we have W lβ If WF uses n ns, he oal wegh s n W n l( n β ) We calculae n β = = = n β β n + n (c + c ) β n + c n α n < The oal wegh of all ns s = = 0

herefore a leas WF l (noe ha hs nequaly holds even when we also consder he ns of wegh a leas, whch were removed earler) Assume ha he hrd propery s sasfed Each of OPT s ns s flled o a mos Hence, he oal wegh n each of OPT s ns s a mos 3, so 3 OPT s an upper ound on he oal wegh, and WF l OPT Thus n order o prove he heorem, suffces o show a wegh funcon w for whch 3 he hree properes hold, and he value of l s ounded y a fxed consan Defne he followng wegh funcon: w(x) = 3 x, for x (0, ] 4 3 x 3, for x (, ], for x (, ] For x, w(x) 3 x, snce x for x The funcon s connuous and monooncally non-decreasng We nex show ha hs funcon w sasfes he hree requred properes Lemma 0 Le A e a se of ems of oal sze α (α 0), where he larges em n A,, has a sze of a leas α Then w(a) Proof If s >, we are done If s, hen α s 3 = 3 All ems elong o he frs case of he wegh 3 3 funcon, so we ge a oal wegh of a leas = We are lef wh he case < s In hs case, he oal wegh s a leas 4 3 s 3 3 ( s ) + 4 3 s 3 = 3 ( α s ) + Lemma Le A e a se of ems, of a oal sze α β (for some β > 0), whch sasfes he hreshold rule for α Then w(a) lβ Proof Add a dummy em of sze β The hreshold rule for WF s sll kep wh α, and he new oal sze of ems s α Le W denoe he oal wegh of orgnal ems, and W, he oal wegh afer he modfcaon By Lemma 0, W We have W = W w(β) By he defnon of l, w(β) lβ, and he clam follows Lemma Le B a se of ems whch can e packed no a n of sze (e, s(b) ) Then w(b) 3 Proof If he n conans an em of sze y >, le y = e he oal sze of oher ems, each of whch has wegh 3 mes s sze The oal wegh s a mos + ( 3 )( ) = 3 Oherwse, f he n conans exacly one em of sze < y, hen he oal wegh s a mos 4 3 y 3 + ( y) 3 3 3 + ( ) 3 = 3, where he nequaly holds snce he maxmum of he lef sde s oaned for y = Fnally, f he n conans a leas wo ems n he nerval (, ], such ha her oal sze s y, hen 4 he oal wegh of B s a mos 3 y 3 + 3 ( y) = 3 y 4 3 + 3 + 3 3 4 3 + 3 + 3 = 3

The value of l s, snce 3, 4 3 x 3 x for any x, and clearly < x for x > References [] A Borodn and R El-Yanv Onlne Compuaon and Compeve Analyss Camrdge Unversy Press, 998 [] J Boyar, G Dósa, and L Epsen On he asolue approxmaon rao of well-known n packng algorhms Manuscrp sumed for pulcaon, 009 [3] E G Coffman Jr and J Csrk Performance guaranees for one-dmensonal n packng In T F Gonzalez, edor, Handook of Approxmaon Algorhms and Meaheurscs, chaper 3 Chapman & Hall/Crc, 007 8 pages [4] J Csrk and G J Woegnger On-lne packng and coverng prolems In A Fa and G J Woegnger, edors, Onlne Algorhms: The Sae of he Ar, pages 47 77, 998 [5] J Csrk and G J Woegnger Resource augmenaon for onlne ounded space n packng Journal of Algorhms, 44():308 30, 00 [6] L Epsen and R van See Onlne n packng wh resource augmenaon Dscree Opmzaon, 4(3-4):3 333, 007 [7] D S Johnson Fas algorhms for n packng Journal of Compuer and Sysem Scences, 8:7 34, 974 [8] D S Johnson, A Demers, J D Ullman, M R Garey, and R L Graham Wors-case performance ounds for smple one-dmensonal packng algorhms SIAM Journal on Compung, 3:56 78, 974 [9] B Kalyanasundaram and K Pruhs Speed s as powerful as clarvoyance Journal of he ACM, 47(4):67 643, 000 [0] C C Lee and D T Lee A smple onlne n packng algorhm Journal of he ACM, 3(3):56 57, 985 [] J D Ullman The performance of a memory allocaon algorhm Techncal Repor 00, Prnceon Unversy, Prnceon, NJ, 97