A Dynamic Near-Optimal Algorithm for Online Linear Programming

A natural optimization model that formulates many online resource allocation and revenue management problems is the online linear program (LP) in which the constraint matrix is revealed column by column along with the corresponding objective coeffici…

Authors: Shipra Agrawal, Zizhuo Wang, Yinyu Ye

Submitte d to Op er ati ons R ese ar ch man uscri p t (Plea se , pro vide the manuscript num b er!) Authors are encouraged to submit new pap ers to INF ORMS journals by means of a s tyle fil e template, whic h includes the journal title . How ev er, us e of a template do es not certify tha t the paper has b een accepted for publi cation in the named jour- nal. INF ORM S journal templ ates are for the exclusi v e purp os e of submitti ng to an INF OR M S journal and should not b e used to distribute the pap ers in print or online or to submit the papers to another publication. A Dynamic Near-Optimal Algorit hm for Online Linear Programming Shipra A g ra wal Microsoft Researc h India, B angalore, India, shipra@microsoft.com Zizh u o W ang Departmen t of Industrial and Systems Engineering, Universit y of Minnesota, Minneap olis, MN 55455, zw ang@umn.edu Yin yu Y e Departmen t of Managemen t Science and Engineering, Stanford Unive rsity , Stan f ord, CA 94305, yinyu-y e@stanford.edu A n atural optimization mo del that formula tes many online resource allocation problems is the online linear programming (LP) problem i n whic h the constraint matrix is revealed column by column along with the correspondin g ob jectiv e coefficient. In such a model, a decision v ariable has to b e set eac h time a column is rev ealed without observing the future inputs and the goal is to maximize t h e ove rall ob jective function. In this pap er, we prop ose a near-optimal algo rith m for this general class of online problems u nder the assumptions of random order of arriv al and some mild conditions on th e size of the LP right-hand-side input. Sp ecifically , our learning-based algorithm w orks by dynamically up dating a t hreshold price vector at geometric time in terva ls, where the du al prices learned from the revealed columns in the previous p erio d are used t o determine th e sequential decisions in the current p eriod . Due to the feature of d ynamic learning, the comp etitiveness of our algorithm improves ov er the past study of t he same problem. W e also presen t a w orst-case example showing that the p erformance of our algorithm is near-optimal. Key wor ds : online algorithms; linear programming; primal-du al; dyn amic price up date 1. Intro du c tion Online opt imization is attr a cting inc reasingly wide att en t ion in t he comput er sc ience, o p erat ion s research, and manag e men t science comm un it ies. In many p ractical problems, data do es not re v eal itself at the b eginning, but rather c omes in an online fashion. F or example, in online re v enue man- agement proble ms, c o nsumers arriv e sequen t ially , eac h requ e sting a subse t o f go o ds (e.g., m u lt i-leg fligh t s or a p erio d of sta y in a hotel) and offering a bid price. On observing a reque st , the seller nee ds to mak e an irrev o cable decision whether t o accept or re ject the cu rrent b id with t he o verall ob jec- tiv e of maximizing th e r ev enue while satisfying the re source constr a in ts. Similarly , in online routing 1 Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 2 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) problems, t he netw ork c apacity mana ger receives a sequenc e of reque sts from use r s with in te nded usage of t h e netw ork, each with a ce rtain utilit y . And h is ob je ctiv e is to allo cate the netw ork cap ac- it y to maximize the so cial welfare. A similar fo r mat also app e ars in online auctions, o nline keyw ord matching proble ms, online packing pr oblems, and v arious ot her o nline reven ue manag ement a nd resourc e allo c ation problems. F or an ov e rview o f the online op timization literatu re a nd its re c en t dev e lopment, w e refer the r e aders to Boro din and El-Y aniv (1998), B uc hbinder and Naor (20 09a ) and De v anur (2011). In many exa mples men tion ed ab ov e , t he problem can b e formulated as an online linear pro- gramming problem (Some times, p e ople con side r th e co rresp on ding integer program. While our discussion fo cuses on t he linear programming r e laxation of t hese prob lems, our result s natur ally extend t o in t e ger progr a ms. See S ection 5.2 f or the d isc u ssion on this). An online linea r progr am- ming problem tak e s a linear p rogram as its under lying form, while the const rain t mat rix is revealed column b y column with the corre sp onding co efficient in the ob j ectiv e fun ction. After observing the input arrived so far , an immediate decision m ust b e ma de without o bserving the fut ure data . T o b e prec ise, w e consider th e follo wing (offline) line ar prog r am maximize P n j =1 π j x j sub ject to P n j =1 a ij x j ≤ b i , i = 1 , . . . , m 0 ≤ x j ≤ 1 , j = 1 , . . . , n, (1) where for all j , π j ≥ 0, a j = { a ij } m i =1 ∈ [0 , 1] m , 1 and b = { b i } m i =1 ∈ R m . In the c orresp o nding online line ar p r o gr am m ing problem, at each t ime t , the co e fficien ts ( π t , a t ) are revealed, and the decision v ar iable x t has to b e chosen. Giv e n the previous t − 1 de cisions x 1 , . . . , x t − 1 , and input { π j , a j } t j =1 un t il time t , the t th decision v ariable x t has to satisfy P t j =1 a ij x j ≤ b i , i = 1 , . . . , m 0 ≤ x t ≤ 1 . (2) The go al in t h e online linea r prog r amming p roblem is to cho ose x t ’s such that the ob je ctiv e f u nction P n t =1 π t x t is maximized. In th is pap e r, we p rop ose algorit hms that achiev e g o o d p erfor mance for solving the on line linear programming problem. In o r der to defi ne the p e rformance of an algorit hm, w e fi rst need to make some assu mp tions re g arding the inp ut par ameters. W e adopt t he following rando m p ermutation mo del in this pap er: Assumption 1. The c o lum ns a j (with the obje ctive c o efficient π j ) arrive in a r andom or der. The set of c olumns ( a 1 , a 2 , ..., a n ) c an b e adversar ily picke d a t the start. However , the arriva l or der of ( a 1 , a 2 , ..., a n ) is uniform ly distribute d o ver al l the p er m utations. Assumption 2. We know the total numb er of c olumns n a pr iori. Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 3 The ra ndom p erm utation mo de l has b e en adopt ed in many existing literature for online problems (see Sec tion 1.3 for a compr ehensiv e review of the relate d lite rature ). It is an intermediate path b etw een using a worst-case analysis a nd assuming the distribution of t he input is known. Th e w or s t - case analysis, wh ic h is c ompletely robust t o input uncertaint y , ev aluates an algorit hm based on its p erfor mance on t h e worst-case input (see , e.g., M e h t a e t al. (2005), Buc hbinder and Naor ( 2009b)). Ho wev er, this leads t o v e ry p e ssimistic p erfo r mance b ounds for th is proble m: n o online algo- rithm can achiev e b ett er t h an O ( 1 /n ) approximation of the optimal offline solution ( Babaioff et a l. (2008)). On the other hand, although a priori input distribut ion can simplify the prob le m to a gre at extent, the c ho ice of distribut ion is v er y c r itical and t he p erforma n ce c an suffe r if th e act ual inpu t distribution is not a s assu med. S p ecifica lly , Assumption 1 is weak er tha n assuming th e c olumns are dra wn indep endently fr om some (p ossibly unkno wn) distribution . Indeed , o ne ca n view n i.i.d. columns as first drawi ng n samples f r om the underlying distribut ion and then rand omly p e rm ut e them. Th erefore , our prop o sed algorithm and its p erf o rmance w ould also ap p ly if t he inpu t data is drawn i.i.d. fro m some distribut ion. Assumption 2 is require d since we n eed to use the quan tity n to decide the length of history for learning the th reshold p r ices in our algorit hm. In fact, as shown in De v anur and Ha yes (20 09), it is necessary for an y algorithm to get a n ear-optimal p erfo rmance. 2 Ho wev er, this assumpt ion can b e relaxed to an approxi mate knowledge of n ( within a t mo st 1 ± ǫ m ultiplicat iv e err or), without affecting ou r r esults. W e de fi ne the comp etitiveness of online algor ithms as follows: Definition 1. Let OPT d enote t he op timal ob je ctiv e v alue for the offline proble m (1). An online algorithm A is c -c omp etitive in the rando m p erm utation mo del if the e xp ecte d v alue of t he online solution o btained b y using A is at le a st c factor of the optimal offline s o lution. That is, E σ " n X t =1 π t x t # ≥ c · OPT , where the exp ecta tion is taken ov e r u niformly random p e rm ut ations σ of 1 , . . . , n , and x t is the t th decision ma d e b y algorithm A when th e inputs arrive in order σ . In this pa p er, w e present a ne ar-optimal algorithm for t he online linear pr ogram (2) under the ab ov e tw o assump tions and a low er b ound con dition on t he size of b . W e also exten d ou r result s to the follo wing more general o nline linear optimizat ion pro blems with multi-dimensional decisions at ea c h time p erio d : • Co n sider a seque nce of n non-negat ive v ectors f 1 , f 2 , . . . , f n ∈ R k , mn n on-negative vectors g i 1 , g i 2 , . . . , g in ∈ [0 , 1] k , i = 1 , . . . , m, Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 4 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) and K = { x ∈ R k : x T e ≤ 1 , x ≥ 0 } ( we use e to de note t he all 1 v ect ors). The offline linear progr am is to cho ose x 1 ,..., x n to solve maximize P n j =1 f T j x j sub ject to P n j =1 g T ij x j ≤ b i , i = 1 , ..., m x j ∈ K . In t he corre sp onding online p roblem, given the previous t − 1 decisions x 1 , . . . , x t − 1 , eac h time w e c h o ose a k -dimensional dec ision x t ∈ R k , sat isfying: P t j =1 g T ij x j ≤ b i , i = 1 , . . . , m x t ∈ K , (3) using th e kno wledg e up to time t . And the ob ject iv e is t o maximize P n j =1 f T j x j o ver the en tire time hor iz on. Note tha t Problem (2) is a sp ecial case of Problem (3) with k = 1. 1.1. Sp ecific applications In the follo wing, w e show so me sp e c ific applications of the online linear prog ramming mo del. The examples ar e only a few among t he wide ran ge of app lica tions of th is mo del. 1.1.1. Online knapsac k/secretary problem The one dimension al version of the online linear progr amming p roblem studied in t his pap er is usua lly referre d as o nline knapsack or se c retary problem. In such problems, a dec ision mak er faces a sequence of opt io n s, each with a certain co st and a v alue, a nd he has t o c ho ose a subset o f the m in a n online f ashion so as to maximize th e to tal v alue w it hout violating the cost c onstraint. Applications o f t his proble m arise in ma ny contexts, suc h as h iring w or k ers, sc h eduling jobs a nd bidding in sp onso r ed searc h a uctions. Random p erm u tation mo del ha s b een widely adopt ed in th e st udy of this prob lem, see Kleinbe r g (2005) and Baba io ff et al. (2007) and refe rences t hereaft er. In those pap ers, e it her a constant comp et itiv e rat io is obta ined for finite-sized p roblems or a near-optimal algor ithm is prop osed for large-sized proble ms. In t his pap er , w e study an extension of t his problem to highe r dimensio n and prop os e a n ear-optimal algorit h m for it. 1.1.2. Online ro uting problem Conside r a compu t er netw ork connect ed b y m edges, e ac h edge i has a b oun d ed ca pacity ( b andwidth) b i . There are a large num b er of r equests arriving online, each asking for certain ca pacities a t ∈ R m in the netw ork, along with a utilit y or price fo r his/her request. The offline pro b lem for the d e cision maker is giv e n by the follo w ing integer program: maximize P n t =1 π t x t sub ject to P n t =1 a it x t ≤ b i i = 1 , . . . , m x t ∈ { 0 , 1 } . Discussions of t his prob le m can b e foun d in Buc hbinder and Naor ( 2009b), Aw er buch et al. (1993) and re ference s the r ein. Note that this p r oblem is also studied unde r the n ame of online pa c king problem. Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 5 1.1.3. Online adw ords problem Selling online advertisemen t s has b een the main reven ue driv er for man y in t ernet compa nies such as Go ogle, Y aho o, et c. Therefo re improving t h e p er- formance of ad s allo cat ion syst ems b ecomes extremely imp o r tant for those companies an d t hus has att racted gre at att en t ion in t he re search comm u nit y in the past de cade. In t h e literatu re, the ma jo rit y of t he resea r c h a dopts an o nline m atching mo de l, see e .g., Me hta et al. (2005), Go el and Meh ta (200 8), Dev anur and Ha y es (20 09), Karande et al. (201 1), B ahmani and Ka p ralo v (2010), Mahdian and Y an ( 2011), F e ldma n et al. ( 2010, 20 09a,b). In su c h mo dels, t here are n searc h queries arriving online. And t here are m bidders (a d v ert isers) ea c h with a daily budg et b i . Based on th e relev ance of e ac h sear ch k eyword, the i th bidde r will bid a certa in amou n t π ij on query j to display his ad vertisement along with t h e sear c h re sult. 3 F or t he j th query , t he de cision mak er (i.e., th e se arch engine) has to c ho o se an m -dimensional v ect or x j = { x ij } m i =1 , whe r e x ij ∈ { 0 , 1 } indicates wheth er th e j th query is allo ca ted to t h e i th bidder. The co r resp ond ing offline problem can b e form u lat ed as: maximize P n j =1 π T j x j sub ject to P n j =1 π ij x ij ≤ b i , i = 1 , . . . , m x T j e ≤ 1 x j ∈ { 0 , 1 } m . (4) The linear prog ramming relaxat ion of (4) is a sp e cial case o f th e gener al online linear programming problem (3) with f j = π j , g ij = π ij e i where e i is t h e i th unit vector of all zeros e xcept 1 for t he i th entry . In t he literatu re, the rando m p erm u tation assumption ha s attr a cted great in t erests re cen tly for its t ractab ilit y and ge nerality . Const an t comp etit iv e algorith m as well as near-optimal algor ithms ha ve b e e n prop osed. W e will g iv e a more comprehe nsiv e review in Sect ion 1.3. 1.2. Key ideas and main r e sults The main c on t ribution of this p ap er is to pr op ose an algor it hm that solves the online linea r pro- gramming p roblem with a nea r-optimal comp e titiv e ra tio und er the random p ermutation mo del. Our algorith m is base d on the obser v at ion that the o ptimal solution x ∗ for the offline linear p ro- gram can b e largely de termined b y the optimal dua l solution p ∗ ∈ R m corresp onding to the m inequality c o nstraints. The opt imal dua l solution act s as a thr eshold pric e so tha t x ∗ j > 0 only if π j ≥ p ∗ T a j . Our online algo rithm w orks by learning a thresh old price v e ctor fr o m some init ia l inputs. The price v e ctor is then use d to det ermine the de cisions for late r p erio d s. Ho wev er, instead of compu ting the price v ect or only once , our algorith m initially waits until ǫn steps or arr iv als, and t h en compute s a new price v e ctor e v ery time the hist ory doub le s, i.e., a t time ǫn, 2 ǫn , 4 ǫn , . . . and so on . W e show that our algorithm is 1 − O ( ǫ )-comp et itiv e in the random p ermutation mod el under a size co n dition of the righ t-hand-side inp ut. Our main result s ar e precise ly stated as fo llo ws: Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 6 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Theorem 1. F or any ǫ > 0 , our online a lgorithm is 1 − O ( ǫ ) c omp etitive fo r the online line ar pr o gr a m (2) in the r ando m p er mutation mo del, for al l inputs such that B = min i b i ≥ Ω  m log ( n/ ǫ ) ǫ 2  . (5) An alte r nativ e w ay to sta te Theorem 1 is t h at our algorithm has a comp etitive ra t io of 1 − O  p m log n/B  . W e prov e Th e orem 1 in Sect ion 3. Note tha t th e c ondition in Theorem 1 dep en d s on log n , whic h is far fr om satisfying ev eryone’s demand when n is large. I n Klein b erg (20 05), the author prov es t hat B ≥ 1 /ǫ 2 is necessa ry t o get a 1 − O ( ǫ ) comp e titiv e ra tio in t h e B -secretar y problem, whic h is the single dimensional c o un t erpart of the online LP problem with a t = 1 for all t . Th us, the d ep ende nce on ǫ in Theorem 1 is near-optimal. In the next theor em, w e sh o w th at a dep en dence on m is nece ssary for any online algorithm to obtain a n ear-optimal solut ion. Its pro of will a p p ear in Sect ion 4. Theorem 2. F or a ny algorithm fo r the online line ar p r o gr am m ing p r o blem (2) in the r ando m p er mutation mo del, ther e exists a n instanc e such that its c omp etitive r a tio is less than 1 − Ω( ǫ ) when B = min i b i ≤ log( m ) ǫ 2 . Or e quivalently, no algor ithm c a n achieve a c omp etitive r atio b etter than 1 − Ω  p log m/B  . W e also extend our re sults to t h e more ge neral mo del as intro duce d in (3) : Theorem 3. F or any ǫ > 0 , our algor ithm is 1 − O ( ǫ ) c om p etitive for the gener al online line ar pr o gr a mming p r o blem (3) in the r ando m p er mutation mo del, for al l inputs such that: B = min i b i ≥ Ω  m log ( nk / ǫ ) ǫ 2  . (6) No w we make some remarks on t h e condition s in Theorem 1 and 3. First of all, the c onditions only dep e nd on the right-hand-side input b i ’s, an d are inde p endent of t he size of OPT o r th e ob ject iv e co efficients. And b y t he ran dom p ermutation mo del, th ey are also indep en den t of the distribution of the inpu t dat a. In this sense, our results are quite robust in terms of t he inpu t data uncert ain ty . In partic ular, one adv antage of o ur result is t hat the condition s are c he ck able b efore the algorithm is implemen te d, which is un lik e the conditions in terms of OPT o r the ob jec t iv e co effic ie nts. Ev en ju st in te rms of b i , as sho wn in Theor e m 2, the dep end ence on ǫ is alre ady o ptimal and the d ep end ence o n m is nece ssary . Rega rding the dep enden ce on n , we on ly n e ed B to b e of ord e r log n , wh ic h is far less than t he tota l num b er of bids n . In deed, the c ondition might b e strict for some small-sized problems. Ho wev er, if the budge t is t o o small, it is not h ard to imagine that no online algorith m can do v ery well. On the contrary , in a pplications with lar g e amount of Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 7 inputs ( f o r exa mp le, in the on line adwords problem, it is e st imated t hat a lar ge se arc h engine could receive several billions of searches p e r day , e v en if w e f o cus on a sp ecific cate gory , the num b er can still b e in the millions) wit h reaso n ably large right-hand-side inputs ( e.g., the bud gets for the adv e rtiser), the co ndition is not har d to satisfy . F urthermo re, t he conditions in Theorem 1 and 3 are just the o retical result s, t he p erforma nce of our algo rithm migh t st ill b e v ery go o d even if t h e conditions are not satisfied (as shown in some numerical te sts in W ang (2012)). Therefo re, our results are of b ot h theore tical an d pract ical in te rests. Finally , we finish this se ction with t he following corollary: Corollar y 1. In the online line ar p r o gr am ming pr oblem (2) and (3), if the lar gest entry of c on- str aint c o efficients do es not e qual to 1 , then b oth our The or em 1 and 3 stil l hold with the c onditions (5) and (6) r eplac e d by: b i ¯ a i ≥ Ω  m log ( nk / ǫ ) ǫ 2  , ∀ i, wher e, for e ach r ow i , ¯ a i = max j {| a ij |} of (2), or ¯ a i = max j {k g ij k ∞ } of (3). 1.3. Related w ork The d esign and analysis of on line algor ithms hav e b e en a topic of wide in t erest in the com- puter science, ope rations rese arch, and management science comm unit ie s. Re cently , the ran- dom p er mutation mo del has attr a cted growing p opu larit y since it av oids the p essimistic low e r b ounds of the a dv ersa rial input mo del while still captur ing t he unc ertaint y of t he inputs. V ar iou s online algorithms ha ve b een studied u nder this mo del, inc luding the sec retary problem (Klein b e rg (2005), Babaioff et al. ( 2 008)), t he on line matching and adw ords problem (Dev anur an d Ha y e s (2009), F eldman et al. (2009b), G o el an d M eh t a (200 8), Mahd ian and Y an (2011), Ka r ande et al. (2011), Bah mani and Kapr alo v (2 010)) and the online packing problem (F eldman et al. (20 1 0), Molinaro and Ra vi (2 014)). Among these work, t w o typ es of resu lts are obta ined: one achiev es a constant co mp etitive rat io indep en den t of the inp ut parame t ers; the ot her fo cuses o n the p erfor - mance of t he algorithm whe n the input size is large. Our pap er falls into the se cond categ ory . In the followi ng literature review, we will fo cus ourse lv es o n this ca tegory of work. The fir st result th at achiev es a ne ar-optimal p er f ormance in the ra ndom p er mutation mo del is b y Kleinb erg (2005), in wh ic h a 1 − O (1 / √ B ) comp et itiv e algorithm is prop osed for the single dimensional m ultiple -choice se c retary problem. The a uthor a lso prov es that the 1 − O (1 / √ B ) c om- p etitive r atio a c hieved by his a lg o rithm is t he b est p ossible for this problem. Ou r re su lt ext ends his w ork t o m ut li-dimension a l case with comp e titiv e n ess 1 − O ( p m log n/B ). Although t he pr o blem lo oks similar, due to the m u lti-dimensional str ucture , different a lgorithms are needed and d ifferen t Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 8 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) techniques are require d fo r ou r a n alysis. Sp e cifically , Klein b erg (2005) rec ursiv ely applies a ran - domized version of the classical se cretar y algo rithm while we main tain a p rice based on the linear programming duality the ory and ha ve a fixed pr ic e u p dating sc he d ule. W e also prov e that no on line algorithm can ac hieve a comp etitiv e ra t io be tter t han 1 − Ω( p log m/B ) for the m ulti-dimension al problem. T o the b est of our kno wle d ge, th is is the first result that shows the ne cessity of de p en- dence on the dimension m , for t h e b e st comp etitive ra t io a c hiev able for this prob lem. It clea rly p oints o u t tha t high dimensiona lity indeed adds to the d iffic u lt y o f this pr o blem. Later, Dev anur an d Ha y e s (20 09) study a linear progr amming based appr oach fo r the online adw o rds problem. In t h eir a pproach, they solve a linear progra m onc e and utilize it s dual solu- tion as t hreshold price to mak e future dec isions. The aut hors pro ve a comp e titiv e ratio of 1 − O ( 3 p π max m 2 log n/ OPT) for t heir algorithm. In our w or k, we consider a more gen eral mo del and dev e lop an a lgorithm which up dat es the dual p rices at a care fully c h osen pace . By using dynami c up dat es, we achiev e a comp etitive rat io that can dep end only on B : 1 − O ( p m log n/B ). Th is is attra c tiv e in pract ice since B can b e c heck ed b efore the proble m is solv ed while OPT ca n not. Moreov er, we sho w that t he dep enden ce on B of our result is optimal. Although our algorit h m shares similar idea s to theirs, t he dynamic nat u re of our algorit hm requires a muc h more delicate design and ana lysis. W e also answer th e imp ortant question of how o ften we should up d a te the dual prices and we sh ow t hat signific a n t improv ements can b e made b y using th e dyna mic learning algorithm. Recently , F eldman e t al. (2010) st u dy a more gene ral on line packing problem which allo ws the dimension of t he c hoice se t to v ar y at each t ime p erio d (a furt her extension of (3)). The y pr o p ose a o ne-time learning algorithm which achiev es a comp etitive ra t io that d ep end s b oth on t he right- hand-side B and OPT. And the d ep ende nce on B is of order 1 − O ( 3 p m log n/B ) . The refore, comparing to the ir co mp etitive ra tio, our resu lt no t only remov es the dep enden ce on OPT, bu t also improv es the de p ende nce on B by an order. W e sho w that the improv e men t is due to t h e use of dynamic learning. More re cently , Molinaro and Ra vi (20 14) st udy the same prob lem an d obtain a comp etitive ratio of 1 − O ( p m 2 log m/B ). The main struct u re of their a lgorithm (e sp ecially t h e w a y the y obtain square ro ot rat her th a n c ubic r o ot) is mo dified from t hat in this pap e r . They furth er u se a nov el co v ering technique to remov e t he de p enden ce on n in the comp etitiv e ra tio, at an exp ense of increasing an order of m . In co n tr a st, we present the improv e me n t f r om the c ubic ro ot to square ro ot an d ho w to remov e the dep e ndence on OPT. A c o mparison of t he results of Kleinber g (2005), De v anur and Ha yes (2009), F eldman et al. (2010), Molinaro and Ra vi (2 014) and th is w or k is shown in T able 1. Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 9 Comp et it iv eness Klein b erg (20 0 5) 1 − O  1 / √ B  (only for m = 1) Dev an u r and Ha yes (2 0 09) 1 − O ( 3 p π max m 2 log n/ OPT) F eldman et al. (2010) 1 − O (max { 3 p m log n/B , π max m log n/O P T } ) Molinaro and Ra vi (2012) 1 − O ( p m 2 log m/B ) This pa p er 1 − O ( p m log n/B ) T able 1 Comparison of existing results Besides the ran dom p ermutation mo del, Dev anur e t al. (201 1) stu dy an o nline resourc e allo ca tion problem und e r what th e y call t he adv ersarial s t o chastic input mo del. Th is mo del gener a lizes t he case whe n th e columns are dra wn fro m an i.i.d. distr ibution, how ev er , it is more stringent than the random p ermutation mo del. In p articular, the ir mo de l do es not allo w t he situ ations whe n the re migh t b e a num b er o f “sho ck s” in the input series. F or this input mo del, they dev elop an algorit h m that achiev es a comp e titiv e rat io o f 1 − O  max { p log m/B , p π max log m/ OPT }  . Their result is significant in t hat it achiev es nea r-optimal dep e ndence on m . Ho wev er, the dep ende nce on OPT and the stronger assumption mak es it not directly comparable to our results. And their algorithm uses quite different t echniques f r om ours. In the op erations research and manageme n t science comm unities, a dynamic and o ptimal pricing strate gy f or v arious online reven ue manag ement an d resourc e allo cation p roblems h as alw ays b een an imp ortant resea rc h to p ic, some literat ure inc lude Elmaghraby and Keskino ca k (2003) ,Gallego a nd v an Ryzin (19 97, 1994), T alluri and v a n Ryzin (1998), Co op er (2 0 02) and Bitran and Caldentey ( 2 003). In G allego and v an Ryzin (1997, 19 94) and Bitran and Caldentey (2003), the ar riv al p ro cesse s ar e assumed to b e price sensitive. Ho w e ver, as c ommen ted in Co op er (2002), this mo del can b e reduc ed to a price indep ende n t arr iv al pro cess wit h a v ailability co n tr ol under Poisson a rriv als. Our mo del can b e furth er view ed as a discre t e version of the av ailabilit y control mo del which is also used as an underlying mo de l in T alluri and v an Ryzin (1998) and dis- cussed in Co op er (2 002). The idea of using a threshold - or “bid” - price is not new. It is initiate d in Williamson (1992), Simpson ( 1989) and inv estigat ed furt her in T alluri and v an Ryzin (1998). In T alluri and v an Ryzin (1998), the auth o rs show tha t t he bid price con trol p olicy is asymptoti- cally op timal. How e v er, th e y assu me the kno wledg e on the arriv al pro cess and th e refore the price is ob tained by “forec asting” t he futur e using t h e distribu tion informat ion rather t han “learn ing” from t he past observ ations as w e do in our p a p er. The idea o f using line ar pr ogramming to find the dual optimal bid price is discu ssed in Co op er (20 02) where asymptotic optimality is also achiev ed. But again, the arr iv al pr o cess is assu med to b e kno wn whic h makes the analysis quite different. The c o n tr ibution of this pap er is sev e r al fold. First, w e study a gen e ral online linear p rogramming framework, e xtending the sc op e of many prior work. And du e to it s dynamic lear ning ca p abilit y , Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 10 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) our algorit hm is distribution fr e e –no kn owledge on th e inpu t distribution is assumed exc e pt for the random ord er of arriv al an d the t otal num b er of e n tr ies. Mor eo ver, inst ead of learning the p rice just o nce, w e p rop ose a d ynamic lea rning algorith m that up dates t he prices as more informa tion is re vealed. The design o f such an alg o rithm answers the que stion raise d in Co op er ( 2002), th at is, how oft en and when sho u ld one up date th e pr ice? W e giv e an explicit a n sw er t o this question b y showing that u p dating the prices at geome tric time interv als -no t to o sparse n o r to o often- is optimal. Thus we present a prec isely quantified strategy fo r dynamic price up da t e. F urt h ermore, w e provide a non-trivial low er b ound for t his proble m, wh ic h is t he first of it s kind and show for the first time tha t the dimensiona lit y of the p r oblem adds t o its difficu lty . In ou r a nalysis, w e ap p ly man y standa rd te c hn iques from Probably Approximately Correct learning (P A C-learning ), in part icular, conce ntration b o unds and cov e r ing arguments. Our dynamic learning also shares a similar idea as the “doubling trick ” used in learning problems. How e v er, unlik e the doubling tr ick wh ic h is typically applied to an unkn o wn t ime h orizon (Cesa-Bian c hi and Lug osi (2006)), we sh o w th at a ge o metric pa ce of pric e up dating in a fixe d leng th of ho r izon with a care ful design c o uld also enha nce the p erforman c e of the algorith m. 1.4. Organization The rest of the pap er is org anized a s follows. In Section 2 a nd 3, we present our on line algo r ithm and prov e that it ac h iev es 1 − O ( ǫ ) comp etitive ratio und er mild co n ditions on the inpu t . T o k eep the d iscussions clear and easy to follo w, w e start in Sec tion 2 with a simpler one-time learn ing algorithm. W h ile the analysis for this simpler a lgorithm will b e useful t o d emonstra t e our pro of techniques, t he results obta ined in this set ting ar e w eak e r t han th ose obt ained b y our dynamic learning algor ithm, whic h is discusse d in S ection 3. In Section 4, we g iv e a deta iled pr o of of Theo rem 2 r egarding th e ne cessity of lo w er b ound co ndition use d in our main the orem. In Section 5, w e present sev eral e xtensions of our study . Then we conc lude our pap er in Sec t ion 6. 2. One-tim e Lear ning Algo rithm In this sect ion, w e prop ose a one-time learning algorit hm for the online linear pr o gramming prob- lem. W e c onsider the f ollo wing par tial linea r program defined only on t he input un til time s = ǫn (for t he eas e o f no tation, without loss of generality , we assume ǫn is an in teg er thr oughout our analysis): maximize P s t =1 π t x t sub ject to P s t =1 a it x t ≤ ( 1 − ǫ ) s n b i , i = 1 , . . . , m 0 ≤ x t ≤ 1 , t = 1 , . . . , s, (7) and its dual prob lem: minimize P m i =1 (1 − ǫ ) s n b i p i + P s t =1 y t sub ject to P m i =1 a it p i + y t ≥ π t , t = 1 , . . . , s p i , y t ≥ 0 , i = 1 , . . . , m, t = 1 , . . . , s. (8) Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 11 Let ( ˆ p , ˆ y ) b e t he optimal so lut ion to (8). Note that ˆ p has the nat ural meaning of t h e price for eac h resourc e . F or a ny giv e n price v ect or p , we define the allo cation rule x t ( p ) a s follo ws: x t ( p ) =  0 if π t ≤ p T a t 1 if π t > p T a t . (9) W e now state our on e-time learn ing a lgorithm: Algorithm OLA (O ne-tim e Learning Algorithm): 1. Initialize x t = 0, for all t ≤ s . And ˆ p is d efined as ab ov e. 2. F or t = s + 1 , s + 2 , . . . , n , if a it x t ( ˆ p ) ≤ b i − P t − 1 j =1 a ij x j for all i , set x t = x t ( ˆ p ); ot herwise, set x t = 0. Output x t . In t he o n e-time lea rning a lgorithm, we learn a dua l price vector using the first ǫn arriv als. Then, at each t ime t > ǫn , w e use this dual price to decide t he curre nt a llo cation, and exe cute this dec ision as lon g as it do esn’t violate an y of the c onstraints. An a t tract iv e feat ure of this a lg o rithm is t hat it require s to so lve on ly one small linear p rogram, define d on ǫ n v a riables. Note that the right- hand-side o f (7) is mo dified by a factor 1 − ǫ . This mo dific a tion is t o gu arantee that with high probability , the allo cat ion x t ( p ) do e s n ot violate the const rain t s. This tric k is also use d in Sect io n 3 when w e st u dy the d ynamic lear n ing algorithm. In the next subse ction, w e prov e the fo llo wing prop os it ion regarding the comp et itiv e ra t io of the one-time learning algorithm, which relies on a stronge r condition than The orem 1: Proposition 1. F or any ǫ > 0 , the one-time le arning algor ithm is 1 − 6 ǫ c omp etitive for the o nline line ar pr o gr am (2) in the r a ndom p ermutation mo del, for al l inputs such that B = min i b i ≥ 6 m log( n/ǫ ) ǫ 3 . 2.1. Comp etitive Ratio Analys is Observe that t he on e-time learning algorithm w a its u ntil time s = ǫn , and the n sets the solution at time t as x t ( ˆ p ), u nless it violates the constr ain ts. T o pro ve its c omp etitive ratio, w e follo w th e follo wing step s . First w e sho w that if p ∗ is th e optimal dual s o lution to ( 1), then { x t ( p ∗ ) } is c lose to th e primal optimal so lut ion x ∗ , i.e., learning the dua l price is sufficient to determine a close primal solutio n . How ev e r, sinc e the column s are revealed in a n online fa shion, w e are not able to obtain p ∗ during the decision p erio d. Instead , in our algorith m, w e use ˆ p as a substitute . W e then sho w t hat ˆ p is a go o d subst itute of p ∗ : 1 ) with high prob abilit y , x t ( ˆ p ) satisfie s all the co nstraints of the linear program; 2) the exp ected v alue of P t π t x t ( ˆ p ) is close to the opt imal offline v alue. B e fore w e start our analysis, we mak e the following simplifying t ec h nical assumption in o u r discussion: Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 12 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Assumption 3. The pr oblem inputs ar e in gener a l p osition, namely for a ny p ric e ve ctor p , ther e c an b e at mo st m c o lumns such that p T a t = π t . Assumption 3 is not nec essarily t rue f or all input s. How ev e r , as p ointed ou t by Dev an u r and Ha y es (2009), one can a lw ays ra ndomly p ert u rb π t b y arbitrarily small amo un t η thro ugh add ing a random v ar iable ξ t taking un iform d ist ribution on in ter v al [0 , η ]. In this wa y , with probability 1, no p c an satisfy m + 1 equat ions sim ulta n eously among p T a t = π t , and t he effect of t h is p er t urbation on the ob ject iv e can b e made arb it rarily small. Under this assump tion, we c an use the comp lemen t arit y conditions of linear pro gram (1) to ob tain the follo wing le mma. Lemma 1. x t ( p ∗ ) ≤ x ∗ t for al l t , and under Assumption 3, x ∗ t and x t ( p ∗ ) differs for no mor e than m values of t . Pro of. Consider the offline linear program (1) and its dual ( let p denote the dual v ariables asso ci- ated with th e first set of constraints and y t denote the dual v ariables a sso ciate d with th e con st rain t s x t ≤ 1) : minimize P m i =1 b i p i + P n t =1 y t sub ject to P m i =1 a it p i + y t ≥ π t , t = 1 , ..., n p i , y t ≥ 0 , i = 1 , ..., m, t = 1 , ..., n. (10) By the complementarit y slac kne ss c onditions, fo r any op timal solution x ∗ for the primal problem (1) and optimal solut ion ( p ∗ , y ∗ ) for the dual, we m u st hav e: x ∗ t · m X i =1 a it p ∗ i + y ∗ t − π t ! = 0 and (1 − x ∗ t ) · y ∗ t = 0 for all t. If x t ( p ∗ ) = 1, by (9), π t > ( p ∗ ) T a t . Thus, by the con st rain t in (10), y ∗ t > 0 and finally b y t h e last complementarit y con dition, x ∗ t = 1. The r efore, w e h a ve x t ( p ∗ ) ≤ x ∗ t for all t . On th e othe r hand, if π t < ( p ∗ ) T a t , then we m ust hav e b oth x t ( p ∗ ) and x ∗ t = 0. The refore, x t ( p ∗ ) = x ∗ t if ( p ∗ ) T a t 6 = π t . Under Assumpt ion 3, t h ere are at most m v alues of t such that ( p ∗ ) T a t = π t . The refore, x ∗ t and x t ( p ∗ ) differs for no more than m v alues of t .  Lemma 1 shows t hat if an opt imal du al solution p ∗ to ( 1) is known, then x t ( p ∗ )’s obt ained by our decision p olicy is close t o t he op t imal offline so lut ion. How ev e r, in our online alg o rithm, we use th e sample d ual pr ic e ˆ p lea rned from the first f ew input s, which c ould b e differe nt from t he optimal du al pric e p ∗ . The remaining discussion at tempts to sh o w tha t the sample dual pr ice ˆ p will b e sufficiently acc urate for our pu rp ose. In the follo wing , we will fr e quently use the fact that the r andom or d er assumption can b e in terp reted as that th e first s inputs are unifor m random samples without replace men t of size s from the n input s. And we use S to denot e the sample se t of size s , a n d N to deno te t h e comple t e input se t of size n . W e start with the following lemma whic h sho ws t hat with h igh proba bilit y , the primal solution x t ( ˆ p ) constr ucted using t he sample dual price is feasible: Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 13 Lemma 2. The primal solution c onstructe d using the sa m ple d ual pric e is a fe asible solution to the line ar pr o gr am (1) with h igh pr ob ability. Mor e pr e cisely, with pr ob ability 1 − ǫ , n X t =1 a it x t ( ˆ p ) ≤ b i , ∀ i = 1 , . . . , m given B ≥ 6 m l og( n/ǫ ) ǫ 3 . Pro of. Th e pr o of will pro ceed as follo ws: Consider an y fixed price p and i . W e sa y a sample S is “bad” for t his p and i if and only if p is t he opt imal du al pr ice to ( 8) for t he samp le se t S , b ut P n t =1 a it x t ( p ) > b i . First, w e sho w th a t the prob abilit y of bad sample s is sma ll fo r e v ery fixed p and i . Then, w e tak e a union b ou n d o ver all distinct prices to prov e th at with high probabilit y the learned pric e ˆ p will b e such that P n t =1 a it x t ( ˆ p ) ≤ b i for all i . T o start wit h, w e fix p a nd i . D efine Y t = a it x t ( p ). If p is an o p timal dua l so lu t ion for the samp le linear pro gram on S , applying Le mma 1 to t he sample pr oblem, w e hav e X t ∈ S Y t = X t ∈ S a it x t ( p ) ≤ X t ∈ S a it ˜ x t ≤ (1 − ǫ ) ǫb i , where ˜ x is the primal optimal solution to the sample linear pro g ram on S . Now w e conside r the probability of bad samp les for this p and i : P X t ∈ S Y t ≤ ( 1 − ǫ ) ǫb i , X t ∈ N Y t ≥ b i ! . W e first define Z t = b i Y t P t ∈ N Y t . It is easy to see that P X t ∈ S Y t ≤ (1 − ǫ ) ǫb i , X t ∈ N Y t ≥ b i ! ≤ P X t ∈ S Z t ≤ ( 1 − ǫ ) ǫb i , X t ∈ N Z t = b i ! . F urthermore , we ha ve P X t ∈ S Z t ≤ (1 − ǫ ) ǫb i , X t ∈ N Z t = b i ! ≤ P      X t ∈ S Z t − ǫ X t ∈ N Z t      ≥ ǫ 2 b i , X t ∈ N Z t = b i ! ≤ P      X t ∈ S Z t − ǫ X t ∈ N Z t      ≥ ǫ 2 b i      X t ∈ N Z t = b i ! ≤ 2 exp  − ǫ 3 b i 2 + ǫ  ≤ δ where δ = ǫ m · n m . Th e second t o last st ep fo llows f rom th e Ho effding-Bernst ein’s Inequality for sampling witho ut rep lacement ( Lemma 10 in App endix A) by tre ating Z t , t ∈ S as the samples without rep lac ement from Z t , t ∈ N . W e also used the fa ct that 0 ≤ Z t ≤ 1 for all t , t herefor e P t ∈ N ( Z t − ¯ Z ) 2 ≤ P t ∈ N Z 2 t ≤ b i (and ther efore the σ 2 R in Lemma 10 can b e b o unded by b i ). Fina lly , the last inequalit y is du e to th e a ssumption made on B . Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 14 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Next, we t ak e a union b ound ov er all distinct p ’s. W e c all tw o price vectors p and q distinct if and only if t hey result in d istinct so lutions, i.e., { x t ( p ) } 6 = { x t ( q ) } . Not e that w e only need to consider distinct prices, sinc e other wise all t he Y t ’s are exa c tly the same. Note tha t e ac h d istinct p is characterized by a un ique separat ion of n p oints ( { π t , a t } n t =1 ) in m + 1-dimensional sp a ce b y a hyp erplane. By result s fro m co mp utationa l ge o metry , the tot al num b er of such distinc t prices is at most n m (Orlik a n d T er ao (199 2)). T aking un ion b ound ov er the n m distinct pr ices, and i = 1 , . . . , m , w e get t he desired result.  Ab o ve we sho wed that with h igh proba bilit y , x t ( ˆ p ) is a fe a sible so lut ion. In t h e following, w e sho w that it is also a near -optimal solution. Lemma 3. The primal solution c onstructe d using the sample dual p ric e is a ne a r-optimal solution to the line a r pr o gr am (1) with high pr ob ability. Mor e pr e cisely, w ith pr ob a bility 1 − ǫ , X t ∈ N π t x t ( ˆ p ) ≥ (1 − 3 ǫ ) OPT given B ≥ 6 m l og( n/ǫ ) ǫ 3 . Pro of. The pro of is based on t wo o bserv ations. First , { x t ( ˆ p ) } n t =1 and ˆ p satisfy all the comple- men t arity co nditions, and hence is the optimal primal and d ual solut ion to the f ollo wing linear program: maximize P t ∈ N π t x t sub ject to P t ∈ N a it x t ≤ ˆ b i , i = 1 , . . . , m 0 ≤ x t ≤ 1 , t = 1 , . . . , n (11) where ˆ b i = P t ∈ N a it x t ( ˆ p ) if ˆ p i > 0, and ˆ b i = max { P t ∈ N a it x t ( ˆ p ) , b i } , if ˆ p i = 0. Second , w e show that if ˆ p i > 0, t hen with p robability 1 − ǫ , ˆ b i ≥ ( 1 − 3 ǫ ) b i . T o sho w t his, let ˆ p b e the optimal dual solut ion of th e samp le linear pro gram on set S and ˆ x b e t he optimal primal solution. By the co mplemen tarity condition s of the linear program, if ˆ p i > 0, the i th constra in t m ust b e satisfie d wit h equality . That is, P t ∈ S a it ˆ x t = (1 − ǫ ) ǫb i . Then, by Lemma 1 and t he con dition that B = min i b i ≥ m ǫ 2 , w e hav e X t ∈ S a it x t ( ˆ p ) ≥ X t ∈ S a it ˆ x t − m ≥ (1 − 2 ǫ ) ǫb i . Then, using the Ho effding-Bern stein’s Inequality for sa mpling wit hout rep la c ement, in a manner similar to the pro o f of Lemma 2, w e c a n sh ow t hat ( the detailed pro of is giv en in App endix A.2) giv en the low er b ound on B , with pr o babilit y at least 1 − ǫ , for all i suc h that ˆ p i > 0: ˆ b i = X t ∈ N a it x t ( ˆ p ) ≥ (1 − 3 ǫ ) b i . (12) Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 15 Com bine d with the c ase ˆ p i = 0, w e kno w that with probabilit y 1 − ǫ , ˆ b i ≥ (1 − 3 ǫ ) b i for a ll i . Last ly , observing that when ev er (12) holds, giv en an optimal solution x ∗ to (1), (1 − 3 ǫ ) x ∗ will b e a feasible solution to (11). Therefor e, the optimal v alue of (11) is at least (1 − 3 ǫ )OPT, w h ic h is e quiv alently sa ying that n X t =1 π t x t ( ˆ p ) ≥ (1 − 3 ǫ )OPT .  Therefor e, the ob jective v a lue for the online solut ion tak e n ov er th e e n tire p erio d is near-opt imal. Ho wev er, in the o ne-time learning algorithm, n o decision is made d uring the learn ing p er io d S , and only th e decisions from p erio d s { s + 1 , . . . , n } c on t ribute to the ob jec tiv e v a lue. The following lemma that relat es the optimal v alue of th e sample linear progr a m ( 7) to the optimal v alue of the offline linear program (1) will b oun d the contribution from the learning p er io d: Lemma 4. L et OPT ( S ) denote the optimal value o f the line ar p r o gr am (7) over samp le S , and OPT ( N ) denote the o ptimal value of the offline line ar pr o gr am (1) over N . Th en, E [ OPT ( S ) ] ≤ ǫ OPT ( N ) . Pro of. Let ( x ∗ , p ∗ , y ∗ ) and ( ˆ x , ˆ p , ˆ y ) denot e the optimal primal and dua l solut ions of linear prog ram (1) on N , and sa mple linear p rogram (7) on S , resp e ctiv e ly . ( p ∗ , y ∗ ) = arg min b T p + P t ∈ N y t s.t. p T a t + y t ≥ π t , t ∈ N p , y ≥ 0 ( ˆ p , ˆ y ) = arg min ( 1 − ǫ ) ǫ b T p + P t ∈ S y t s.t. p T a t + y t ≥ π t , t ∈ S p , y ≥ 0 . Note t hat S ⊆ N , thus ( p ∗ , y ∗ ) is a feasible solution to the dual of the linear prog ram on S . Therefor e, by the weak duality theorem: OPT( S ) ≤ ǫ b T p ∗ + X t ∈ S y ∗ t . Therefor e, E [OPT( S )] ≤ ǫ b T p ∗ + E " X t ∈ S y ∗ t # = ǫ ( b T p ∗ + X t ∈ N y ∗ t ) = ǫ OPT( N ) .  No w, w e are ready to pro ve Prop osition 1: Pro of of Prop osition 1: Using Lemma 2 and Lemma 3, with probability at least 1 − 2 ǫ , the follo wing even ts hap p en: n X t =1 a it x t ( ˆ p ) ≤ b i , i = 1 , . . . , m Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 16 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) n X t =1 π t x t ( ˆ p ) ≥ (1 − 3 ǫ ) O P T . That is, t he dec isions x t ( ˆ p ) are fea sib le and the ob je ctiv e v alue taken ov er the e ntire p er io d { 1 , . . . , n } is near-opt imal. De note this even t by E , where P ( E ) ≥ 1 − 2 ǫ . W e hav e by Lemma 2, 3 and 4: E " n X t = s +1 π t x t # = E " n X t =1 π t x t − s X t =1 π t x t # ≥ E " n X t =1 π t x t ( ˆ p ) I ( E ) # − E " s X t =1 π t x t ( ˆ p ) # ≥ (1 − 3 ǫ ) P ( E )OPT − ǫ OPT ≥ (1 − 6 ǫ )OPT where I ( · ) is th e ind icator func tion, the fir st inequality is b ecause unde r E , x t = x t ( ˆ p ), and the second last inequalit y uses t he fac t that x t ( ˆ p ) ≤ ˆ x t whic h is due t o Lemma 1 .  3. Dynami c Lea rni ng Algor ithm The algorith m discuss e d in Sect ion 2 uses t h e fi r st ǫn inputs to learn a thresh o ld price, and the n applies it in t he re maining time hor izon. While this algorit hm has its own merit s, in part icular, requires so lving only a small linear program defined on ǫn v ariab les, the lo wer b ound require d o n B is st ronger than t h at claimed in Theore m 1 by an ǫ fa ctor. In this section, w e prop o s e an impro v ed dynamic le arning algorit h m that will ac hie v e the r e sult in Theorem 1. Instead of computing t he price only once, the dynamic lea r ning algorithm will up date the price every t ime t he history doubles, tha t is, it learns a new price at t ime t = ǫn, 2 ǫn, 4 ǫn, . . . . T o b e precise, let ˆ p ℓ denote the opt imal dual solution for t he follo wing pa rtial linear program defined on th e inp uts until time ℓ : maximize P ℓ t =1 π t x t sub ject to P ℓ t =1 a it x t ≤ ( 1 − h ℓ ) ℓ n b i , i = 1 , . . . , m 0 ≤ x t ≤ 1 , t = 1 , . . . , ℓ (13) where the se t of n umbe r s h ℓ are define d as follows: h ℓ = ǫ p n ℓ . Also, fo r any g iv en dual price v ecto r p , we defi ne the sa me allo cat ion rule x t ( p ) a s in ( 9). Our dynamic lear ning algorithm is stated as follo ws: Algorithm DLA ( Dynamic Learning Algorithm): 1. Initialize t 0 = ǫn . Set x t = 0, for all t ≤ t 0 . 2. Rep eat for t = t 0 + 1 , t 0 + 2 , . . . Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 17 (a) Set ˆ x t = x t ( ˆ p ℓ ). Here ℓ = 2 r ǫn wh e re r is the largest integer such that ℓ < t . (b) If a it ˆ x t ≤ b i − P t − 1 j =1 a ij x j for all i , the n se t x t = ˆ x t ; ot herwise, set x t = 0. Output x t . Note tha t we up da te th e dual price vector ⌈ log 2 (1 /ǫ ) ⌉ times du r ing the en t ire time horizon . Th us, th e d ynamic learning algorithm requ ires mo re comp utation. Ho wev er, as we show next, it requires a w ea k er lo wer b ound on B f or proving the same c omp etit ive ratio. The intuition b eh ind this impro v e men t is as follo ws. Note th at initially , at ℓ = ǫn , h ℓ = √ ǫ > ǫ . Thus, w e hav e larger slac ks at the b e ginning, and the large deviation a r gument for constraint sat isfaction ( as in Lemma 2) re quires a w eaker condition on B . As t incr eases, ℓ inc reases, and h ℓ decrea ses. Ho wev er, for larger v alues of ℓ , t he sample size is larger, making a weak er condition on B sufficient t o pro v e the same error b oun d. F urth ermore, h ℓ decrea ses rap idly enough, suc h th a t the o v e r all loss on the ob ject iv e v alue is n o t significant. As on e will see, the ca r eful choice of the num b ers h ℓ pla ys an imp ortant role in proving our re sults. 3.1. Comp etitive Ratio Analys is The analysis for the d ynamic learning algorithm pro ce eds in a manner similar to that f o r the one- time learn ing algorith m. Ho wev er, stronge r results for the price le arned in each p erio d nee d t o b e prov ed here. In the following, w e assume ǫ = 2 − E and let L = { ǫn, 2 ǫn, . . . , 2 E − 1 ǫn } . Lemma 5 and 6 a re parallel to Lemma 2 an d 3 in Sect ion 2, how e v er re quire a w eak er condit ion on B : Lemma 5. F or any ǫ > 0 , with pr ob ability 1 − ǫ : 2 ℓ X t = ℓ +1 a it x t ( ˆ p ℓ ) ≤ ℓ n b i , for al l i ∈ { 1 , . . . , m } , ℓ ∈ L given B = min i b i ≥ 10 m l og ( n/ǫ ) ǫ 2 . Pro of. The pr o of is similar to th e pr o of o f Lemma 2 but a more ca reful analysis is ne e ded. W e pro vide a b rief ou tline he re wit h a deta iled pro of in App endix B .1. F irst , we fix p , i and ℓ . Th is time, w e sa y a p erm utation is “bad” fo r this p , i and ℓ if and o nly if p = ˆ p l (i.e., p is the learned pric e under the curre n t arriv al order ) but P 2 ℓ t = ℓ +1 a it x t ( ˆ p l ) > l n b i . By using the Ho effding-Bern stein’s In equalit y fo r sampling witho ut replace men t , w e sho w tha t the pr o babilit y of “ba d” p ermutations is less t h an δ = ǫ m · n m · E for any fixed p , i a nd ℓ under the c o ndition on B . Then b y t aking a union b ound o ver all distinct prices, all items i and p erio ds ℓ , t he lemma is prov ed .  Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 18 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) In the followi ng, we use LP s ( d ) to denot e the partial linear program that is defined on v a riables till time s with r ight-hand-side in t he inequa lit y co nstraints se t as d . That is, LP s ( d ) : maximize P s t =1 π t x t sub ject to P s t =1 a it x t ≤ d i , i = 1 , . . . , m 0 ≤ x t ≤ 1 , t = 1 , . . . , s. And let OPT s ( d ) den o te the opt imal ob jec tiv e v alue fo r LP s ( d ). Lemma 6. With pr ob ability at le ast 1 − ǫ , for al l ℓ ∈ L : 2 ℓ X t =1 π t x t ( ˆ p ℓ ) ≥ (1 − 2 h ℓ − ǫ ) OPT 2 ℓ  2 ℓ n b  given B = min i b i ≥ 10 m l og ( n/ǫ ) ǫ 2 . Pro of. Let ˆ b i = P 2 ℓ j =1 a ij x j ( ˆ p ℓ ) for i suc h that ˆ p ℓ i > 0, and ˆ b i = max { P 2 ℓ j =1 a ij x j ( ˆ p ℓ ) , 2 ℓ n b i } , otherw ise . Then t he solut ion pair ( { x t ( ˆ p ℓ ) } 2 ℓ t =1 , ˆ p ℓ ) satisfy all the c omplementarit y c onditions, t h us are optimal solutions ( primal and dua l resp ec tiv ely) t o t he linear pr ogram LP 2 ℓ ( ˆ b ): maximize P 2 ℓ t =1 π t x t sub ject to P 2 ℓ t =1 a it x t ≤ ˆ b i , i = 1 , . . . , m 0 ≤ x t ≤ 1 , t = 1 , . . . , 2 ℓ. This mea ns 2 ℓ X t =1 π t x t ( ˆ p ℓ ) = OPT 2 ℓ ( ˆ b ) ≥ min i ˆ b i b i 2 ℓ n ! OPT 2 ℓ  2 ℓ n b  . No w, w e analyze the ra tio ˆ b i 2 ℓb i /n . By d efinition, for i such t h at ˆ p ℓ i = 0, ˆ b i ≥ 2 ℓb i /n . Oth erwise, using techniques similar to t he pro of of Lemma 5, we can prov e t hat with pr obabilit y 1 − ǫ , for all i , ˆ b i = 2 ℓ X t =1 a it x t ( ˆ p ℓ ) ≥ (1 − 2 h ℓ − ǫ ) 2 ℓ n b i . (14) A det ailed pro of of (14) app ea rs in App endix B.2. And t he lemma follows from (1 4).  Next, similar to Lemma 4 in the p revious sec tion, we prov e the f o llo wing lemma re la t ing the optimal v alue o f the sample linear pro gram to the optimal v a lue of t he offline linear pro gram: Lemma 7. F or any ℓ , E  OPT ℓ  ℓ n b  ≤ ℓ n OPT . The pro of of lemma 7 is exactly the same as the pro of for Le mma 4 thus w e omit its pro of. No w w e are re a dy to prov e Theorem 1. Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 19 Pro of of Theorem 1: Observe that the ou tput of the o nline solution at time t ∈ { ℓ + 1 , . . . , 2 ℓ } is x t ( ˆ p ℓ ) as long as the constraints are n ot violated. B y Lemma 5 and Lemma 6 , with probability at least 1 − 2 ǫ : 2 ℓ X t = ℓ +1 a it x t ( ˆ p ℓ ) ≤ ℓ n b i , for all i ∈ { 1 , . . . , m } , ℓ ∈ L 2 ℓ X t =1 π t x t ( ˆ p ℓ ) ≥ (1 − 2 h ℓ − ǫ )OPT 2 ℓ  2 ℓ n b  , for all ℓ ∈ L. Denote this even t by E , wh e re P ( E ) ≥ 1 − 2 ǫ . The exp ected ob ject iv e v alue achiev ed b y the on line algorithm can b e b ou nded as follo ws: E " X ℓ ∈ L 2 ℓ X t = ℓ +1 π t x t # ≥ E " X ℓ ∈ L 2 ℓ X t = ℓ +1 π t x t ( ˆ p ℓ ) I ( E ) # ≥ X l ∈ L E " 2 ℓ X t =1 π t x t ( ˆ p l ) I ( E ) # − X ℓ ∈ L E " ℓ X t =1 π t x t ( ˆ p ℓ ) I ( E ) # ≥ X ℓ ∈ L (1 − 2 h l − ǫ ) E  OPT 2 ℓ  2 ℓ n b  I ( E )  − X ℓ ∈ L E  OPT ℓ  ℓ n b  I ( E )  ≥ P ( E ) · OPT − X ℓ ∈ L 2 h l E  OPT 2 ℓ  2 ℓ n b  I ( E )  − ǫ X ℓ ∈ L E  OPT 2 ℓ  2 ℓ n b  I ( E )  − E [OPT ǫn ( ǫ b ) I ( E ) ] ≥ (1 − 2 ǫ )OPT − X ℓ ∈ L 2 h l E  OPT 2 ℓ  2 ℓ n b  − ǫ X ℓ ∈ L E  OPT 2 ℓ  2 ℓ n b  − E [OPT ǫn ( ǫ b )] ≥ (1 − 2 ǫ )OPT − 4 X ℓ ∈ L h ℓ ℓ n OPT − 2 ǫ X l ∈ L ℓ n OPT − ǫ OPT ≥ (1 − 15 ǫ )OPT . The th ird ine qu alit y is due to Lemma 6, the second to last inequality is due to Lemma 7 an d the last inequa lit y follo ws from the fact that X ℓ ∈ L ℓ n = (1 − ǫ ) , and X ℓ ∈ L h ℓ ℓ n = ǫ X ℓ ∈ L r ℓ n ≤ 2 . 5 ǫ. Therefor e, Th eorem 1 is prov e d.  4. W or st-ca s e Bound fo r any Algor ithm In th is section , we prov e Th eorem 2, i.e., the condition B ≥ Ω(log m/ǫ 2 ) is necessar y for an y online algorithm to achiev e a c omp etit iv e ratio of 1 − O ( ǫ ). W e prov e t his b y constru c ting a n instance of (1) with m items and B u nits of each item such tha t no online algor ithm ca n achiev e a c o mp etitive ratio of 1 − O ( ǫ ) unless B ≥ Ω(log m/ǫ 2 ). Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 20 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) In this co n structio n , w e refer to the 0 − 1 v e ctors a t ’s as demand v ec tors, and π t ’s as pr o fit co effic ie nts. Assume m = 2 z for some in t e ger z . W e will const ruct z pairs of d e mand v ect ors su c h that th e demand v ector s in each pair are co mplemen t to each other, and do not sh are any it e m. Ho wev er, ev e ry set of z v ect ors consisting of exa ctly one v ect or from each p a ir will share at least one co mmon item. T o a chiev e this, conside r the 2 z p ossible b o o le an strings of lengt h z . The j th b o ole a n st ring rep resents j th item for j = 1 , . . . , m = 2 z (for illustrat iv e p urp ose, we index th e item from 0 in our la t er discu s sion ). Let s ij denote the v alu e at i th bit of the j th string. The n, w e constru ct a pair of demand vectors v i , w i ∈ { 0 , 1 } m , by setting v ij = s ij , w ij = 1 − s ij . T a ble 2 illustrates this construc tion fo r m = 8 ( z = 3): Demand vectors Demand vectors v 3 v 2 v 1 w 3 w 2 w 1 Items 0 0 0 0 Items 0 1 1 1 1 0 0 1 1 1 1 0 2 0 1 0 2 1 0 1 3 0 1 1 3 1 0 0 4 1 0 0 4 0 1 1 5 1 0 1 5 0 1 0 6 1 1 0 6 0 0 1 7 1 1 1 7 0 0 0 T able 2 Illustration of the worst-case b ound Note that th e pair o f vectors v i , w i , i = 1 , . . . , z are complement to ea c h other . Conside r a n y set of z demand v e ctors formed b y picking e xactly one of the t w o vectors v i and w i for each i = 1 , . . . , z . Then form a bit st ring b y setting s ij = 1 if th is set has vector v i and 0 if it has vector w i . Then, all the vectors in t his set sha re the ite m corre sp onding to t h e b o o le a n string. F or example , in T able 2, the dema n d vectors v 3 , w 2 , w 1 share item 4 ( = ′ 100 ′ ), the dema nd vectors w 3 , v 2 , v 1 share item 3(= ′ 011 ′ ) and so on. No w, w e con s t ruct an insta nce consisting of • B / z input s with pr o fit co effic ien t 4 a n d demand v ector v i , for each i = 1 , . . . , z . • q i inputs with profit 3 a nd dema n d vector w i , for eac h i , whe r e q i is a random v ariable fo llo wing Binomial(2 B /z , 1 / 2). • p B / 4 z inputs wit h profit 2 and demand vector w i , for ea c h i . • 2 B /z − q i inputs wit h profit 1 and demand vector w i , for ea c h i . Using the pro p erties o f demand v e ctors ensured in the const ruction, w e pr ov e the following c laim: Claim 1. L et r i denote the numb er of ve ctor s of typ e w i ac c epte d by any 1 − ǫ c omp etitive solution for the c onstructe d example. Then, it must hold that X i | r i − B / z | ≤ 7 ǫB . Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 21 Pro of. Le t OPT de note the optimal v alue of the offline problem. And let OPT i denote the profit obtained from dema nds accepted of t yp e i . Let topw i ( k ) deno t e the sum of profits of top k inpu t s with dema nd v ect or w i . The n OPT = z X i =1 OPT i ≥ z X i =1 (4 B /z + topw i ( B /z ) ) = 4 B + z X i =1 topw i ( B /z ) . Let [ OPT b e the ob jectiv e v alue o f a solut ion whic h accept s r i v ec t ors of t yp e w i . First, no te that P i r i ≤ B . This is b e cause all w i s share one common item, and there are at most B units of this item a v ailable. Le t Y b e the set { i : r i > B / z } , and X b e t he remaining i ’s, i.e. X = { i : r i ≤ B /z } . Then, w e sh ow that the total n umber of acc epted v i s canno t b e more than B − P i ∈ Y r i + | Y | B /z . Ob viously , t he set Y cannot contribute more than | Y | B /z v i s. Le t S ⊆ X co ntribute t he r emaining v i s. No w consider the item th at is common t o all w i s in set Y and v i s in the set S (th e re is at least one such item b y con struction ). Since only B units of t his item are av ailable, the t o tal num b er o f v i s c on t ributed by S cannot b e mo re than B − P i ∈ Y r i . The refore t he num b er of acce pted v i s is less than or equal t o B − P i ∈ Y r i + | Y | B /z . Denote P = P i ∈ Y r i − | Y | B / z , M = | X | B /z − P i ∈ X r i . Then, P, M ≥ 0. And t he ob jective v alue [ OPT ≤ z X i =1 topw i ( r i ) + 4 ( B − X i ∈ Y r i + | Y | B /z ) ≤ z X i =1 topw i ( B /z ) + 3 P − M + 4( B − P ) = OPT − P − M . Since OPT ≤ 7 B , th is means that , P + M m ust b e less th an 7 ǫB in or der to get an a pproxi ma tion ratio of 1 − ǫ or b ett er.  Here is a brief description o f t he re maining pr o of. By const ruction, for ev er y i , there are exac tly 2 B /z de mand v ec tors w i that hav e profit co e fficien t s 1 an d 3 , and among th e m e a c h ha s equ al probability t o tak e v a lue 1 or 3. Now, from the previous claim, in order to g et a near-optimal solution, one m u st selec t c lose t o B /z deman d vectors of typ e w i . There f ore, if t he tota l num b er of (3 , w i ) inputs are mo re than B /z , then sele cting a n y ( 2 , w i ) will cau se a loss of 1 in profit as compare d to the o ptimal profit; and if t he total n umbe r of (3 , w i ) inputs are less than B / z − p B / 4 z , then re jecting any (2 , w i ) will ca u se a loss of 1 in profit. Using t he central limit t heorem, at any step, b ot h t hese e v ents can h a pp en with a co nstant proba bilit y . Th us, ev ery decision for (2 , w i ) migh t result in a loss with c onstant pr obabilit y , whic h results in a total e xp ecte d loss of Ω( p B /z ) for every i , that is, a to t al loss of Ω( √ z B ). If the n um b er of w i s to b e accepted is not exactly B / z , some of these p B /z dec isions ma y not b e mist ak es, but a s in the claim ab o ve, such cases canno t b e more tha n 7 ǫB . Ther e fore, the exp ect ed v alue of online solution , ONLINE ≤ OPT − Ω( √ z B − 7 ǫB ) . Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 22 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Since OPT ≤ 7 B , in order to g e t (1 − ǫ ) appr o ximation fa c tor, w e need Ω( p z /B − 7 ǫ ) ≤ 7 ǫ ⇒ B ≥ Ω( z /ǫ 2 ) = Ω( log ( m ) /ǫ 2 ) . This c o mpletes the pro of of Th eorem 2. A det ailed exp osition of the steps u sed in this pro of app ea rs in App en dix C. 5. Extensions W e provi de a few exte n sions of our results in this sect ion . 5.1. Online multi-dimensional linea r pro gram W e consider the following more gene ral online linear pro grams with m u lt i-dimensional de cisions x t ∈ R k at each step, as defined in ( 3) in Sect ion 1: maximize P n t =1 f T t x t sub ject to P n t =1 g T it x t ≤ b i , i = 1 , . . . , m x T t e ≤ 1 , x t ≥ 0 , t = 1 , . . . , n x t ∈ R k , t = 1 , . . . , n. (15) Our online algorit h m remains essen t ially the same (as desc rib ed in S ection 3), with x t ( p ) now defined as follo ws: x t ( p ) =  0 if for all j , f tj ≤ P i p i g itj e r otherwise , where r ∈ arg max j ( f tj − P i p i g itj ) . Here e r is the un it v ect or with 1 at t he r th entry and 0 o therwise. And we break ties arbitrar ily in o ur algo rithm. Using the complementarit y con ditions of (15), and the lo wer b ou nd condit ion on B as assu med in Theo rem 3, we can prov e the following lemmas. 4 The pro ofs a re v e r y similar t o the pro ofs for t he one-dimensiona l ca se , and will b e provided in App e ndix D. Lemma 8. L et x ∗ and p ∗ b e the optimal primal a nd dual solutions to (15) r esp e ctively. Then x ∗ t and x t ( p ∗ ) differ s for at most m values of t . Lemma 9. Define p and q to b e di stinct if and only if x t ( p ) 6 = x t ( q ) fo r some t . Then, ther e ar e at most n m k 2 m distinct pric e ve ctor s. With th e ab ov e lemmas, t he pro of of Theorem 3 will follo w exact ly as the p r o of for Theo rem 1. 5.2. Online integer programs F rom th e definition o f x t ( p ) in (9), our algorithm alwa ys o utputs integer solution s. And since t he comp et itiv e rat io analysis compar es the online solution t o the optimal solution of t he corre sp onding linear p r ogramming relaxation , the c omp etit ive rat io stated in Theorem 1 also holds for the online in te ger prog rams. The sa me obse rv at ion ho lds for the gener al online linear programs intro duced in Section 5.1 since it also outpu ts in tege r so lutions. Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 23 5.3. F a s t solution for la rge linear pro grams b y column sampling Apart from o n line problems, our algorit hm can also b e applied for so lving ( offline) linear programs that ar e to o larg e to c o nsider all the v ariables e xplicitly . Similar to the one -t ime lea r ning online solution, o ne could ran domly sample of ǫn v ariables, and use the du al solution ˆ p for t his smaller program to se t the v alues of v ariables x j as x j ( ˆ p ). This ap proach is v ery similar to th e c olumn genera tion metho d used for solving large linear prog r ams Dan t zig (19 63). Our re sult provides the first rigoro us a n alysis of t h e a pprox imation achiev ed by the approach of reducing th e linear progra m size by randomly se le c ting a subse t of column s. 6. Conclusi ons In t h is pap er, w e provide a 1 − O ( ǫ ) co mp etitive algorithm for a g eneral c lass of on line linear programming pro b lems under t he assumption of random orde r of arriv al an d some mild condition s on the right-hand-side input. The co nditions w e use are inde p ende n t of the opt imal ob j e ctiv e v alue, the ob je ctiv e c o efficients, and the distr ib u tions of input data. Our dynamic lea r ning alg o rithm works b y d ynamically up dating a threshold p rice v e ctor at geometr ic t ime in t erv als, whe re the dual prices learned fr o m the revealed columns in the pre viou s p erio d are used to determine the sequential de cisions in the current p e rio d. Our d yn amic learning approach might b e u seful in de signing online algorithms for other problems. There are many quest io n s for futu re rese arch. One imp or tan t quest ion is whe ther the c urrent b ound o n the siz e of the righ t -hand-input B is t igh t? Currently as we show in this pa p er, the r e is a gap b etw een o ur a lgorithm an d t he low er b o und. Thro u gh some n umerical exp e rimen t s, w e find that the actu al p erfo rmance of ou r algo rithm is c los e to the lo wer b ound (see W a ng ( 2012)). Ho wev er, w e are not a ble to pro ve it. Filling that gap w ould b e a v ery in terest ing direction fo r future re search. App endix A: Supportin g lemmas f or Section 2 A.1. Ho eff ding-Bernstein’s Inequalit y f o r s ampling without replacement By Theor em 2.14.19 in v an der V aart an d W ellne r (199 6): Lemma 10. L et u 1 , u 2 , ...u r b e r andom samples without r eplac em ent fr om the r e al numb ers { c 1 , c 2 , ..., c R } . Then for ever y t > 0 , P      r X i =1 u i − r ¯ c      ≥ t ! ≤ 2 exp  − t 2 2 r σ 2 R + t ∆ R  wher e ∆ R = max i c i − min i c i , ¯ c = 1 R P i c i , and σ 2 R = 1 R P R i =1 ( c i − ¯ c ) 2 . Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 24 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) A.2. Pro of of inequalit y (12) W e pro ve that with probability 1 − ǫ , ˆ b i = P t ∈ N a it x t ( ˆ p ) ≥ ( 1 − 3 ǫ ) b i giv en P t ∈ S a it x t ( ˆ p ) ≥ ( 1 − 2 ǫ ) ǫb i . The pro o f is v ery similar to t he pr o of of Le mma 2. Fix a pr ic e vector p a n d i . Define a p ermutation is “bad” for p , i if b oth (a) P t ∈ S a it x t ( p ) ≥ (1 − 2 ǫ ) ǫb i and (b) P t ∈ N a it x t ( p ) ≤ (1 − 3 ǫ ) b i hold. Define Y t = a it x t ( p ). The n, the pro babilit y of bad p erm utation s is b ounde d b y: P      X t ∈ S Y t − ǫ X t ∈ N Y t      ≥ ǫ 2 b i      X t ∈ N Y t ≤ (1 − 3 ǫ ) b i ! ≤ P      X t ∈ S Z t − ǫ X t ∈ N Z t      ≥ ǫ 2 b i      X t ∈ N Z t = (1 − 3 ǫ ) b i ! ≤ 2 exp  − b i ǫ 3 3  ≤ ǫ m · n m where Z t = (1 − 3 ǫ ) b i Y t P t ∈ N Y t in the first inequality an d th e second inequalit y is b ecau se of Lemma 10 and the last inequa lit y follo ws from th at b i ≥ 6 m l og( n/ǫ ) ǫ 3 . Summing o ver n m distinct price s and i = 1 , . . . , m , w e get t h e desired inequality .  App endix B: Supportin g lemmas f or Section 3 B.1. Pro of of Lemma 5 Consider P t a it ˆ x t for a fixe d i . F or ea se of not ation, w e temp o rarily omit the subscript i . Defin e Y t = a t x t ( p ). If x and p are the opt imal primal and dual solutions fo r (13) an d its dual resp ectively , then we ha ve: ℓ X t =1 Y t = ℓ X t =1 a t x t ( p ) ≤ ℓ X t =1 a t x t ≤ ( 1 − h ℓ ) b ℓ n . Here the fir st inequality is b ecause o f th e defin ition of x t ( p ) a nd Le mma 1. There fore, the probability of “bad ” p ermutations for this p , i and ℓ is b o unded b y: P ℓ X t =1 Y t ≤ ( 1 − h ℓ ) bℓ n , 2 ℓ X t = ℓ +1 Y t ≥ bℓ n ! ≤ P ℓ X t =1 Y t ≤ ( 1 − h ℓ ) bℓ n , 2 ℓ X t =1 Y t ≥ 2 bℓ n ! + P      ℓ X t =1 Y t − 1 2 2 ℓ X t =1 Y t      ≥ h ℓ 2 bℓ n , 2 ℓ X t =1 Y t ≤ 2 bℓ n ! . (16) F or the first term, w e fi rst define Z t = 2 bℓY t n P 2 ℓ t =1 Y t . It is easy to see that P ℓ X t =1 Y t ≤ ( 1 − h ℓ ) bℓ n , 2 ℓ X t =1 Y t ≥ 2 bℓ n ! ≤ P ℓ X t =1 Z t ≤ ( 1 − h ℓ ) bℓ n , 2 ℓ X t =1 Z t = 2 bℓ n ! . And furth ermore, using Lemma 10, w e hav e P ℓ X t =1 Z t ≤ (1 − h ℓ ) bℓ n , 2 ℓ X t =1 Z t = 2 bℓ n ! ≤ P ℓ X t =1 Z t ≤ (1 − h ℓ ) bℓ n      2 ℓ X t =1 Z t = 2 bℓ n ! Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 25 ≤ P      ℓ X t =1 Z t − 1 2 2 ℓ X t =1 Z t      ≥ h ℓ bℓ n      2 ℓ X t =1 Z t = 2 bℓ n ! ≤ 2 exp  − ǫ 2 b 2 + h l  ≤ δ 2 where δ = ǫ m · n m · E . F or the sec o nd term o f (16), we can defi ne the same Z t , and w e ha ve P      ℓ X t =1 Y t − 1 2 2 ℓ X t =1 Y t      ≥ h ℓ 2 bℓ n , 2 ℓ X t =1 Y t ≤ 2 bℓ n ! ≤ P      ℓ X t =1 Z t − 1 2 2 ℓ X t =1 Z t      ≥ h ℓ 2 bℓ n , 2 ℓ X t =1 Z t = 2 bℓ n ! ≤ P      ℓ X t =1 Z t − 1 2 2 ℓ X t =1 Z t      ≥ h ℓ 2 bℓ n      2 ℓ X t =1 Z t = 2 bℓ n ! ≤ 2 exp  − ǫ 2 b 8 + 2 h ℓ  ≤ δ 2 where the secon d to last step is due to Lemma 10 and the last step holds b e cause h ℓ ≤ 1 and the condition mad e on B . Lastly , we defin e t wo price s to b e distinct the same wa y as w e do in the pro of o f Le mma 2.2. Then we ta ke a union b ou nd ov e r a ll t he n m distinct prices, i = 1 , . . . , m , and E v alue s o f ℓ , the lemma is pro ved.  B.2. Pro of of inequalit y (14) The pr o of is very similar t o the pro of of Le mma 5. Fix p , ℓ and i ∈ { 1 , . . . , m } , w e d efine “bad ” p ermutations for p , i, ℓ a s th ose p erm utation s suc h th a t all th e following condit ion s hold: (a) p = ˆ p ℓ , that is, p is th e pric e learned as the optimal d ual solution fo r ( 13), (b) p i > 0, and (c) P 2 ℓ t =1 a it x t ( p ) ≤ (1 − 2 h ℓ − ǫ ) 2 ℓ n b i . W e will sh o w that the probability of bad p ermutations is small. Define Y t = a it x t ( p ). If p is a n optimal dual solution for (13), an d p i > 0, then by the KKT conditions t he i th inequality constraint holds with equality . Therefo re, b y Le mma 1, we ha v e: ℓ X t =1 Y t = ℓ X t =1 a it x t ( p ) ≥ ( 1 − h ℓ ) ℓ n b i − m ≥ (1 − h ℓ − ǫ ) ℓ n b i , where th e last inequa lit y fo llo ws from B = min i b i ≥ m ǫ 2 , and ℓ ≥ nǫ . Therefo re, the prob abilit y of “bad” p e rm ut ations for p , i, ℓ is b ounded by: P ℓ X t =1 Y t ≥ (1 − h ℓ − ǫ ) ℓ n b i , 2 ℓ X t =1 Y t ≤ (1 − 2 h ℓ − ǫ ) 2 ℓ n b i ! ≤ P      ℓ X t =1 Y t − 1 2 2 ℓ X t =1 Y t      ≥ h ℓ b i ℓ n      2 ℓ X t =1 Y t ≤ ( 1 − 2 h ℓ − ǫ ) 2 ℓ n b i ! ≤ P      ℓ X t =1 Z t − 1 2 2 ℓ X t =1 Z t      ≥ h ℓ b i ℓ n      2 ℓ X t =1 Z t = (1 − 2 h ℓ − ǫ ) 2 ℓ n b i ! ≤ 2 exp  − ǫ 2 b i 2  ≤ δ, Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 26 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) where Z t = (1 − 2 h ℓ − ǫ )2 ℓb i Y t n P 2 ℓ t =1 Y t and δ = ǫ m · n m · E . The last inequalit y follows from t he co ndition on B . Next, w e take a un io n b ound ov er all th e n m distinct p ’s, i = 1 , . . . , m , a nd E v alues of ℓ , w e conclud e that with probability 1 − ǫ 2 ℓ X t =1 a it ˆ x t ( ˆ p ℓ ) ≥ (1 − 2 h ℓ − ǫ ) 2 ℓ n b i for all i such that ˆ p i > 0 and all ℓ .  App endix C: Detailed steps fo r Theo rem 2 Let c 1 , . . . , c n denote the n cust omers. F or each i , the set R i ⊆ { c 1 , . . . , c n } of custo me rs with bid v ec t or w i and bid v alue 1 or 3 is fixed with | R i | = 2 B /z for all i . Condit io n al on set R i the bid v alue s of custo mers { c j , j ∈ R i } a re inde p ende n t ran dom v ariables that t ak e v alue 1 or 3 wit h equa l probability . No w consider the t th bid o f (2 , w i ). In at least 1 / 2 of the r andom p erm utation s, the num b er of bids from se t R i b efore the bid t is less than B /z . Cond itional on t h is even t, wit h a constant probability the b ids in R i b efore t take v alue s such tha t the bids aft er t can make th e num b er of (3 , w i ) bids mor e than B /z with a constant pr obabilit y and less than B / z − p B / 4 z with a constant probability . This pr obabilit y calculat ion is similar to the one used by Kleinb e rg ( 2 005) in his pro of of the nec essit y of cond it ion B ≥ Ω(1 /ǫ 2 ). F or c ompletene ss, w e derive it in th e Le mma 11 tow ards the end of t he pro of. No w, in the first t yp e of instances ( in which the num b er of ( 3 , w i ) bids a re more t han B /z ) , retaining a (2 , w i ) bid is a “ p otential mistak e” of size 1; similarly , in the second type of instances (in which the num b er of (3 , w i ) bids are less than B /z ), skipp in g a ( 2 , w i ) bid is a p otential mistak e of size 1. W e call it a p otential mistake of size 1 b e cause it will co st a profit loss of 1 if t he online algorith m de cides t o p ic k B / z o f w i bids. Among t hese mist ak es, | r i − B /z | o f t hem ma y b e recov ered in each in st ance by deciding to pic k r i 6 = B / z of w i bids. The tot a l exp ected n u mb er of p ot en t ial mistakes is Ω( √ B z ) (since the r e a r e p B / 4 z o f (2 , w i ) bids for every i ) . By Claim 1, no more than a consta n t fr action of instances c an re co ver mor e th a n 7 ǫB of t he p ote n t ial mistakes. Let ONLINE denot e the exp e cted v alue for t he online algorithm ov er ra ndom p e rm ut ation and random instan ces of th e problem. The refore, ONLINE ≤ OPT − Ω( √ z B − 7 ǫB ) . No w, o b serv e t hat OPT ≤ 7 B . This is b e cause b y c onstruct ion ev er y set of demand v ec tors (con- sisting o f either v i or w i for each i ) will ha ve at leas t 1 item in common, and since ther e are o nly B units of t his item a v a ilable, at most 2 B de mand v ecto rs can b e accept ed giving a profit of at most Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 27 7 B . Therefore , ONLINE ≤ OPT(1 − Ω( p z /B − 7 ǫ )), and in or d er to get (1 − ǫ ) appro ximation factor we need Ω( p z /B − 7 ǫ ) ≤ O ( ǫ ) ⇒ B ≥ Ω( z /ǫ 2 ) . This c o mpletes the pro of of Theo rem 2. Lemma 11. Consider 2 k r andom variables Y j , j = 1 , . . . , 2 k tha t take value 0 / 1 indep endently with e qual pr ob ability. L et r ≤ k .Th en with c onstant pr ob ability Y 1 , . . . , Y r take value such that P 2 k j =1 Y j c an b e gr e ater or less than its exp e cte d value k by √ k / 2 with e qual c onstant pr ob ability. P      2 k X j =1 Y j − k      ≥ ⌈ √ k / 2 ⌉      Y 1 , . . . Y r ! ≥ c for some c onstant 0 < c < 1 . Pro of of Lemma 11: • G iven r ≤ k , | P j ≤ r Y j − r / 2 | ≤ √ k / 4 with constant pr obabilit y (b y central limit theo rem). • G iven r ≤ k , | P j >r Y j − (2 k − r ) / 2 ) | ≥ 3 √ k / 4 with constant probabilit y . Giv en t he ab ov e e v ents | P j Y j − k | ≥ √ k / 2, and by symmet ry b oth ev e n ts hav e equ a l probabilit y .  App endix D : Online multi-dimensional linear p rogram D.1. Pro of of Lemma 8 Using Lagrangian duality , o b serv e th a t giv e n optimal dual solution p ∗ , o ptimal solut ion x ∗ is g iv en b y: maximize f T t x t − P i p ∗ i g T it x t sub ject to e T x ≤ 1 , x t ≥ 0 . (17) Therefor e, it m ust b e true th a t if x ∗ tr = 1, th e n r ∈ arg max j { f tj − ( p ∗ ) T g tj } and f tr − ( p ∗ ) T g tr ≥ 0 This means that for t ’s such th at max j { f tj − ( p ∗ ) T g tj } is strict ly p o sitiv e and arg ma x j return s a unique solut ion, x t ( p ∗ ) and x ∗ t are identical. B y random p ertur b ation argu men t the re can b e a t most m v alues of t t hat do es no t sa tisfy t his condit ion ( for ea ch such t , p satisfies a n equatio n f tj − p T g tj = f tl − p T g tl for some j , l , or f tj − p T g tj = 0 fo r some j ) . This means x ∗ t and x t ( p ∗ ) differs for at most m v a lues of t .  D.2. Pro of of Lemma 9 Consider nk 2 expressions f tj − p T g tj − ( f tl − p T g tl ) , 1 ≤ j, l ≤ k , j 6 = l , 1 ≤ t ≤ n f tj − p T g tj , 1 ≤ j ≤ k , 1 ≤ t ≤ n. x t ( p ) is complet ely dete rmined onc e w e dete rmine the subse t of expre ssions out of th ese nk 2 expressions th at are a ssigned a non -negative v alue. By theory of comput ational g eometry , t here can b e at most ( nk 2 ) m suc h distinct a ssignments.  Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 28 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Endnotes 1. The assumption th at a ij ≤ 1 is not restrict iv e a s w e can no rmalize the constraint to meet this requirement. 2. An example to show the kno wled g e of n is nece ssary to obtain a near-opt imal algorithm is as follo ws. Supp o se there is only on e pro duct and t h e in ven tory is n . And all a i ’s are 1 . There might b e n or 2 n arriv als. And in e ither case , half of the m h av e v alue 1 and half of t hem hav e v alue 2. No w conside r a n y algorit h m. If it acc e pts less than 2 / 3 amon g the fi r st n a rriv als, the loss is at least n/ 3 (or 1 / 6 o f t he optimal v a lue) if in fac t th ere are n arriv als in to tal. On the oth e r h a nd, if it accept s more t han 2 / 3 amo ng the first n arriv als, then it must hav e acce pted more than n/ 6 bids wit h v alue 1. And if the tr ue n umb er of arriv als is 2 n , then it will a lso hav e a loss of a t least 1 / 12 of the true optimal v alue. Thus if o n e do esn’t kn o w the exac t n , t here alw ays exist s a c ase where the lo ss is a consta n t fract ion of the t rue optimal v alue. 3. Here we assume the search e ngines use a pay-per -impre ssion sc heme. Th e mo del can b e easily adapte d to a pa y-p er-click sc heme by multiplying the b id v alue b y t h e clic k-thr o ugh-rate parame - ters. Also w e assume th ere is only one advertisemen t slot for ea c h sea rc h re sult. 4. Here w e make an assump t ion similar t o Assumpt ion 3 . That is, for any p , there can b e at most m arriv als su ch t hat the r e are ties in f tj − P i p i g itj . As argue d in t he discu ssions f ollo wing Assumption 3, this assumpt io n is without loss of g enerality . Ac kn owledgmen ts The a uthors thank the tw o anonymous referees and the asso cia te editor for their insight ful commen ts and suggestions . References Aw erbuch, B., Y. Azar, S. Plo tkin. 19 9 3. T hr oughput-comp etitive on- line ro uting. F O CS’93: Pr o c e e dings of the 34th Annual IEEE Symp osium on F oundations of Computer S cienc e . 32–40. Babaioff, M., N. Immorlica, D. Kemp e , R. K le inber g. 20 07. A knapsa ck s e cretary pro blem with a pplica tions. Appr oximation, Rand omization, and Combinatoria l Optimization. Algorithms and T e chniques , Le ctur e Notes in Computer Scienc e , v ol. 4627. 16 –28. Babaioff, M., N. Immor lic a , D. Kemp e, R. Kleinberg. 2008. Online auctions and g eneralized secretar y problems. SIGe c om Exch. 7 (2) 1 – 11. Bahmani, B ., M. Kapralov. 2010. Improved b ounds for o nline sto chastic ma tc hing . ESA’10: Pr o c e e dings of the 18th annual Eur op e an c onfer enc e on Al gorithms: Part I . 170–18 1. Bitran, G., R. Caldentey . 200 3 . An ov erv iew o f pricing mo dels for reven ue mana gement. Manufacturing and Servic e Op er ations Management 5 (3) 203–229 . Agraw al, W ang and Y e: A Dynamic Near-Optimal A lg orithm for Online Line ar Pro g r amming Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, p rovide the manuscript number!) 29 Boro din, A., R. El-Y aniv. 1998 . Online c omputation and c omp etitive analysis . Combridge University Press . Buch binder, N., J . Naor. 200 9a. The design of c o mpetitive online alg orihms via a primal-dual appro ch. F oundations and T r ends in The or etic al Computer Scienc es 3 (2-3) 93– 2 63. Buch binder, N., J. Naor. 2009b. Online pr imal-dual alg orithms for covering and packing. Mathematics of Op er ations R ese ar ch 34 (2 ) 270– 286. Cesa-Bianchi, N., G. Lugosi. 2 0 06. Pr e diction, le arning, and games . Cambridge Universit y Press. Co op er, W. L. 2002. Asymptotic b ehavior o f an allo catio n p olicy for reven ue management. Op er at ions R ese ar ch 50 (4) 720–727 . Dant zig, G. 1963 . Line ar pr o gr amming and extensions . P rinceton University P ress. Dev a n ur , N. 2011. O nline a lgorithms with sto chastic input. S IGe c om Exch. 10 (2) 40– 4 9. Dev a n ur , N., T. Hayes. 2009. The a dw o rds pr oblem: online keyw o rd matching with budgeted bidders under random p ermutations. EC’09: Pr o c e e dings of the 10th ACM c onfer enc e on Ele ctr onic Commer c e . 71 – 78. Dev a n ur , N., K . Jain, B. Siv an, C. Wilkens. 20 11. Nea r optimal online a lgorithms and fas t approxima- tion a lgorithms for reso urce allo cation problems . EC’11: Pr o c e e dings of t he 12th ACM c onfer enc e on Ele ct r onic Commer c e . 29–3 8. Elmaghra b y , W., P . Keskino cak. 2003 . Dynamic pricing in the presence of inv entory consider ations: r esearch ov ervie w , c urrent pr actices and future dir e ctions. Management S cienc e 49 (1 0) 128 7–138 9. F eldman, J ., M. Henzinger , N. Ko rula, V. Mirrokni, C. Stein. 2 010. Online s to chastic packing applied to display ad allo ca tion. Algorithms–ESA 2010 182–19 4. F eldman, J., N. Kor ula, V. Mirrok ni, S. Muthukrishnan, M. Pal. 2009a . Online ad a s signment with free disp o sal. WINE’09: Pr o c e e dings of the 5th Workshop on Internet and N et work Ec onomics . 374– 385. F eldman, J., A. Mehta, V. Mirrokni, S. Muthukrishnan. 20 09b. O nline sto chastic matching: b eating 1 - 1/e. F O CS’09: Pr o c e e dings of the 50th Annual IEEE Symp osium on F oundations of Computer Scienc e . 117–1 26. Gallego, G., G. v an Ryzin. 1994. O ptimal dynamic pricing of inven tories with sto chastic demand o ver finite horizons. Management Scienc e 40 (8) 999–102 0. Gallego, G., G. v an Ryzin. 1997. A multiproduct dynamic pr icing problem and its application to netw or k yield management. O p er ations R ese ar ch 45 (1) 2 4–41. Go el, G., A. Mehta. 200 8. Online budgeted ma tc hing in r a ndom input mo dels with a pplications to adwords. SODA’08: Pr o c e e dings of the 19th Annual ACM -SIAM Symp osium on Discr ete Al gorithms . 982– 991. Karande, C., A. Meh ta , P . T ripathi. 201 1. Online bipartite ma tc hing with unknown distr ibutio ns. STOC’11: Pr o c e e dings of the 43r d annual ACM symp osium on The ory of Computing . 587–5 96. Kleinberg, R. 2005. A multiple-c hoice secr etary algor ithm with applications to online auctions. SODA’05: Pr o c e e dings of the 16th A nnual ACM - SIAM Symp osium on Discr ete Algorithms . 630– 6 31. Agraw al, W ang and Y e: A Dynamic Ne ar-Optimal Algorithm for Online Line ar Pr ogr amming 30 Article subm itted to Oper ations Rese ar ch ; manuscript no. (Ple ase, provide the manuscript number!) Mahdian, M., Q. Y an. 201 1. Online bipar tite matching with random arr iv a ls: a n approach ba sed o n strongly factor-re vealing LPs. STOC’11: Pr o c e e dings of the the 43r d annual A CM symp osium on The ory of Computing . 59 7–606 . Meht a, A., A. Sab eri, U. V azira ni, V. V azirani. 200 5. Adwords and g eneralized on- line matching. FOCS’05: Pr o c e e dings of the 46th A nnual IEEE Symp osium on F oundations of Computer Scienc e . 264 –273. Molinaro, M., R. Ravi. 2 014. Geometry of online packing linear progra ms. Mathematics of Op er ations R ese ar ch 39 (1) 46–59. Orlik, P ., H. T erao. 1992. Arr angement of hyp erplanes . Grundlehren der Mathematischen Wissenschaften [F undamen ta l P rinciples o f Mathematical Sciences], Spr inger-V erlag , Berlin. Simpson, R. W. 1989 . Using netw ork flow techniques to find shadow prices for mar ket and seat inv entory control. MIT Flight T ra n sp ortation L ab or atory Memor andum M89-1, Cambridge, MA . T alluri, K., G. v an Ryzin. 1998. An analy sis of bid-price c ont rols for net work reven ue mana gement. Man- agement Scienc e 44 (11) 1577–15 9 3. v a n der V aart, A., J. W ellner. 1996 . We ak c onver genc e and empiric al pr o c esses: with applic ations to statistics (Springer Series in S tatistics) . Springer. W ang, Z . 20 12. Dynamic le arning mechanism in re ven ue manag emen t problems. Ph.D. thesis, Stanford Univ ersity , Palo Alto. Williamson, E . L. 1992. Airline net work seat con tro l. Ph. D. The sis, MIT, Cambridge , MA .

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment