Introduction
In the AdWords problem [13 ] queries arrive online, each query is eligible for some advertisers with given bids, and every advertiser has a hard budget. When every bid is small compared with the budget, the algorithm BALANCE is ( 1 − 1 / e ) (1 - 1/e) ( 1 − 1/ e ) -competitive, and this is optimal even for randomized algorithms [13 ] . The loss comes entirely from not knowing the future. The advice model [8 , 12 , 3 , 5 ] quantifies it. An oracle that sees the whole input writes a bit string, and the advice complexity of ratio ρ \rho ρ is the least number of bits that an online algorithm must read to be ρ \rho ρ -competitive.
Advice lower bounds are usually proved by counting or by a reduction from string guessing [2 , 6 ] , and they are usually stated up to constant factors. For bipartite matching, for instance, ratio 1 − ϵ 1-\epsilon 1 − ϵ is known to need Ω ( n log 1 ϵ ) \Omega\left(n\log\frac{1}{\epsilon}\right) Ω ( n log ϵ 1 ) bits, and O ( n / ϵ 5 ) O(n/\epsilon^5) O ( n / ϵ 5 ) bits suffice [9 ] . Exact constants are rare, and a notable exception is asymmetric string guessing, whose advice complexity Boyar et al. [6 ] determined exactly. Motivated by this, we study the advice complexity of budgeted allocation and determine it exactly, to the second-order term, or to the first-order term on the instance families that underlie the known lower bounds.
The Online AdWords Problem with Hard Budgets
An instance I = ( U , V , E , B , b ) I=(U,V,E,B,b) I = ( U , V , E , B , b ) of OAW-HB consists of a set U = { 1 , … , n } U=\{1,\ldots,n\} U = { 1 , … , n } of advertisers, advertiser i i i having an integer budget B i B_i B i , a sequence V V V of m m m queries that arrive one by one, and bids b i j ≥ 0 b_{ij}\ge0 b ij ≥ 0 on the edges of a bipartite graph G = ( U , V , E ) G=(U,V,E) G = ( U , V , E ) . When query j j j arrives, its neighborhood N ( j ) N(j) N ( j ) and its bids are revealed. The algorithm then assigns j j j irrevocably to some i ∈ N ( j ) i\in N(j) i ∈ N ( j ) whose spent amount plus b i j b_{ij} b ij does not exceed B i B_i B i , collecting b i j b_{ij} b ij , or it rejects j j j . We write ALG ( I ) \operatorname{ALG}(I) ALG ( I ) and OPT ( I ) \operatorname{OPT}(I) OPT ( I ) for the revenue of the online algorithm and of an optimal offline allocation. With unit bids and unit budgets the problem is online bipartite matching. Under the small-bid assumption every bid is small compared with the budget, and in the limit the demand becomes divisible.
Our Contributions
Our results are summarized in Table 1 .
Table 1. Main results, with n n n advertisers and m m m queries. The o ( n ) o(n) o ( n ) term in the first row holds as ϵ → 0 \epsilon\to0 ϵ → 0 and ϵ n → ∞ \epsilon n\to\infty ϵ n → ∞ , and the bound Ω ( n log m n ) \Omega(n\log\frac{m}{n}) Ω ( n log n m ) holds when m / n m/n m / n is large enough.
The exact cost of ratio 1 − ϵ 1-\epsilon 1 − ϵ for small bids. Let N π ( n , B ) N_\pi(n,B) N π ( n , B ) be the nested instance behind the bound 1 − 1 / e 1-1/e 1 − 1/ e . It has n n n advertisers of budget B B B and n n n phases of B B B unit-bid queries, and phase t t t is eligible for the advertisers π ( t ) , … , π ( n ) \pi(t),\ldots,\pi(n) π ( t ) , … , π ( n ) of a hidden order π \pi π . We establish (Theorems 1 and 2, Corollary 1) that ratio 1 − ϵ 1-\epsilon 1 − ϵ on this family costs
b ∗ ( n , ϵ ) = n log 2 1 ϵ − n log 2 e ± O ( ϵ n log 1 ϵ + 1 ϵ + log n ) b^*(n,\epsilon)=n\log_2\frac{1}{\epsilon}-n\log_2 e\mathbin{\pm}O\left(\epsilon n\log\frac{1}{\epsilon}+\frac{1}{\epsilon}+\log n\right) b ∗ ( n , ϵ ) = n log 2 ϵ 1 − n log 2 e ± O ( ϵ n log ϵ 1 + ϵ 1 + log n )
bits, for every budget B ≥ 1 B\ge1 B ≥ 1 (so in particular for bipartite matching) and in the divisible model as well. Exact optimality costs exactly ⌈ log 2 n ! ⌉ \lceil\log_2 n!\rceil ⌈ log 2 n !⌉ bits for every B B B (Corollary 2), which extends the bound of Miyazaki for matching [15 ] . The optimal advice is not what one might expect. Instead of spreading the demand as BALANCE does, the optimal algorithm spends its whole error budget at the start to build a reserve of full advertisers, after which the advice only has to guarantee that each exit falls into a sliding window of the size of the reserve (Figure 2 ).
Figure 2. The two strategies on N π ( 6 , 1 ) N_{\pi}(6,1) N π ( 6 , 1 ) . Row π ( i ) \pi(i) π ( i ) is the advertiser that exits after phase i i i . A cell shows its fill after the phase has been placed, the thick cell is its exit, and its unused budget there is lost. D t D_t D t is the loss after t t t exits. (a) BALANCE spreads every phase over all live advertisers, so every early exit wastes budget, and it loses 1.9. (b) B U F σ \mathrm{BUF}_{\sigma} BUF σ with σ = ( π ( 3 ) , π ( 2 ) , π ( 5 ) , π ( 4 ) , π ( 6 ) , π ( 1 ) ) \sigma=(\pi(3),\pi(2),\pi(5),\pi(4),\pi(6),\pi(1)) σ = ( π ( 3 ) , π ( 2 ) , π ( 5 ) , π ( 4 ) , π ( 6 ) , π ( 1 )) , on an order in the event E σ ( π ) E_{\sigma}(\pi) E σ ( π ) of Theorem 2. It spends its whole error budget K = 1 K=1 K = 1 on the first exit and then keeps a sliding reserve of min { K + 1 , n − t + 1 } \min\{K+1,n-t+1\} min { K + 1 , n − t + 1 } full advertisers, so it loses 1. Until the first rejection (phase 5 in (a) and phase 6 in (b)) the live load after phase t t t equals 1 + D t − 1 1+D_{t-1} 1 + D t − 1 , the most that the reserve law allows, and the two strategies differ only in how they distribute it.
Every decreasing instance. An instance is decreasing if its eligible sets shrink along the stream, as when campaigns end one after another, while budgets, exit times and demands are arbitrary. The natural advice is a priority class for each advertiser, which is used by BALANCE refined into L L L priority classes. We
prove that on every decreasing instance this algorithm loses at most the optimal load of one class, minus one advertiser (Theorem 3). The proof is a single cut argument (Figure 3 ). With classes cut along an optimal solution, ⌈ n log 2 ⌈ 1 / ϵ ⌉ ⌉ \lceil n\log_2\lceil1/\epsilon\rceil\rceil ⌈ n log 2 ⌈ 1/ ϵ ⌉⌉ bits give ratio 1 − ϵ 1-\epsilon 1 − ϵ (Corollary 3). Since the nested family is decreasing, the advice complexity of decreasing instances is n log 2 1 ϵ + O ( n ) n\log_2\frac{1}{\epsilon}+O(n) n log 2 ϵ 1 + O ( n ) , and exact optimality on them costs exactly ⌈ log 2 n ! ⌉ \lceil\log_2 n!\rceil ⌈ log 2 n !⌉ bits. On the nested family, priority classes exceed the optimum b ∗ b^* b ∗ by at most log 2 e + log 2 ( 1 + ϵ ) \log_2 e+\log_2(1+\epsilon) log 2 e + log 2 ( 1 + ϵ ) bits per advertiser, up to the error terms of Corollary 1. These log 2 e \log_2 e log 2 e bits are exactly the price of fixed instead of sliding windows (Remark 1 and Figure 1 ).
Figure 1. The price of competitiveness on the nested family N π ( n , B ) N_\pi(n,B) N π ( n , B ) . The solid curve is the leading term log 2 1 e ϵ \log_2\frac{1}{e\epsilon} log 2 eϵ 1 of b ∗ ( n , ϵ ) / n b^*(n,\epsilon)/n b ∗ ( n , ϵ ) / n , sharp as ϵ → 0 \epsilon\to0 ϵ → 0 (Corollary 1). The dashed steps show log 2 L \log_2 L log 2 L bits for L = 2 k L=2^k L = 2 k priority classes, plotted at their exact asymptotic ratios 1 − r L + 1 / L 1-r_{L+1}/L 1 − r L + 1 / L (Proposition 1). At the corners, the gap tends to log 2 e \log_2 e log 2 e bits (Remark 1). The leading term vanishes at ϵ = 1 / e \epsilon=1/e ϵ = 1/ e , the ratio of BALANCE; we do not claim sharpness near 1 − 1 / e 1-1/e 1 − 1/ e .
Figure 3. (a) A decreasing instance as a bipartite graph. Round t t t brings demand d t d_t d t that is eligible for every advertiser exiting at or after t t t (here τ = ( 1 , 2 , 2 , 3 , 4 ) \tau= (1, 2, 2, 3, 4) τ = ( 1 , 2 , 2 , 3 , 4 ) ), so the eligible sets shrink. (b) The quantities in the proof of Theorem 3. Advertisers are drawn in the exit order ≺ \prec ≺ , a box shows the budget and the shading the final load, and dotted lines separate the classes. Advertiser j j j is the last one that ends with unused budget, and the cut is at s = τ j + 1 s = \tau_j + 1 s = τ j + 1 . Everything after the cut ends full, nothing is rejected before it, and demand placed on S S S before round s s s (orange) can only go to the class of j j j , never to its first member i a i_a i a . So the loss relative to an optimal solution x x x is at most x ( a − ) x(a^{-}) x ( a − ) .
Hidden targets above 3 / 4 3/4 3/4
We also consider a two-phase family in which flexible demand must be placed before it is revealed which advertisers will receive rigid demand. On this family BALANCE is exactly 3 / 4 3/4 3/4 -competitive. We prove that ratio 3 / 4 + ϵ 3/4+\epsilon 3/4 + ϵ needs, and can be achieved with, Θ ( ϵ 2 n ) \Theta(\epsilon^2 n) Θ ( ϵ 2 n ) bits, for every budget and even against randomized algorithms (Theorems 4 and 5, Corollary 4). Moreover the advice complexity of this family equals the logarithm of a covering number with a defect (Theorem 6).
Techniques
All our lower bounds rest on a classical principle [10 , 14 ] . An algorithm that reads b b b bits is one of 2 b 2^b 2 b advice-free algorithms. So if a random input defeats every advice-free algorithm except with probability P P P , then b ≥ log 2 ( 1 / P ) b \ge\log_2(1/P) b ≥ log 2 ( 1/ P ) . We bound P P P optimally , by an exponential moment whose base and input distribution make the bound for each round tight.
For AdWords the payoff of an exit depends on everything the algorithm did before, and the moment becomes computable through the reserve law . The budget filled on advertisers that are still present is at most one phase of demand plus the loss incurred so far, so an algorithm can hedge only to the extent that it has already lost. The same law suggests the optimal algorithm, which loses early on purpose. For priority classes we look at the last advertiser that ends with unused budget. Every later advertiser ends full, nothing is rejected before it leaves, and every unit placed early on a later advertiser stays inside its class, so the cut at its exit bounds the loss by one class. For hidden targets the upper bound is a covering family built from an anti-concentration bound for the hypergeometric distribution.
Related Works
Advice complexity was introduced in [8 , 12 , 3 ] , and we refer to the survey [5 ] . String guessing [2 ] and its asymmetric version ASG [6 ] are the standard sources of lower bounds. Boyar et al. [6 ] determined the advice complexity of ASG via covering designs and defined the class AOC. For online bipartite matching, Miyazaki [15 ] proved that ⌈ log 2 n ! ⌉ \lceil\log_2 n! \rceil ⌈ log 2 n !⌉ bits are necessary and sufficient for optimality. Dürr et al. [9 ] showed that ratio 1 − ϵ 1-\epsilon 1 − ϵ needs Ω ( n log 1 ϵ ) \Omega(n\log\frac{1}{\epsilon}) Ω ( n log ϵ 1 ) bits and admits O ( n / ϵ 5 ) O(n/\epsilon^5) O ( n / ϵ 5 ) bits, and beating ratio 1 / 2 1/2 1/2 costs Θ ( log log n ) \Theta(\log\log n) Θ ( log log n ) bits [16 , 7 ] . Online knapsack is AdWords with one advertiser and private queries, and for it one bit gives ratio 1 / 2 1/2 1/2 while beating 1 / 2 1/2 1/2 costs about log m \log m log m bits [4 ] . To the best of our knowledge, the advice complexity of AdWords has not been studied before.
Preliminaries
An oracle that knows the instance writes an infinite tape, and a deterministic online algorithm reads a prefix of it. An algorithm that reads at most b b b bits behaves on every instance as one of the 2 b 2^b 2 b advice-free algorithms A σ A_\sigma A σ that read the tape σ 0 ∞ \sigma0^\infty σ 0 ∞ , σ ∈ { 0 , 1 } b \sigma\in\{0,1\}^b σ ∈ { 0 , 1 } b . Its decisions on a common prefix of two instances coincide whenever it reads the same advice, and we call this execution invariance . Two generic tools are used throughout.
Lemma 1. (i) Let μ \mu μ be a distribution on a family F \mathcal{F} F of instances such that every advice-free deterministic algorithm meets a given guarantee on a μ \mu μ -random instance with probability at most P P P . Then every deterministic algorithm that meets the guarantee on all of F \mathcal{F} F reads at least log 2 ( 1 / P ) \log_2(1/P) log 2 ( 1/ P ) bits on some instance.
(ii) Let Z 1 , … , Z n Z_1,\ldots,Z_n Z 1 , … , Z n take values in R ∪ { + ∞ } \mathbb{R} \cup\{+\infty\} R ∪ { + ∞ } and be adapted to a filtration ( G i ) (\mathcal{G}_i) ( G i ) ,
and let u ∈ ( 0 , 1 ) u \in(0,1) u ∈ ( 0 , 1 ) and c i ≥ 0 c_i \ge0 c i ≥ 0 satisfy E [ u − Z i ∣ G i − 1 ] ≤ c i \mathbb{E}[u^{-Z_i} \mid\mathcal{G}_{i-1}] \le c_i E [ u − Z i ∣ G i − 1 ] ≤ c i (with u + ∞ = 0 u^{+\infty}=0 u + ∞ = 0 ). Then Pr [ ∑ i Z i ≤ z ] ≤ u − z ∏ i c i \Pr[\sum_i Z_i \le z] \le u^{-z}\prod_i c_i Pr [ ∑ i Z i ≤ z ] ≤ u − z ∏ i c i for all real z z z .
Proof. (i) The success events of the 2 b 2^b 2 b algorithms A σ A_\sigma A σ cover F \mathcal{F} F , so 1 ≤ 2 b P 1 \le2^bP 1 ≤ 2 b P . (ii) Since u < 1 u<1 u < 1 , the event ∑ i Z i ≤ z \sum_i Z_i \le z ∑ i Z i ≤ z means u ∑ i Z i ≥ u z u^{\sum_i Z_i} \ge u^z u ∑ i Z i ≥ u z . By the tower property E [ u ∑ i Z i ] ≤ ∏ i c i \mathbb{E}[u^{\sum_i Z_i}] \le\prod_i c_i E [ u ∑ i Z i ] ≤ ∏ i c i , and Markov’s inequality gives the claim. □ \square □
Lemma 2. Let F \mathcal{F} F be a finite family of instances and D \mathcal{D} D a distribution over deterministic advice-free algorithms such that every I ∈ F I \in\mathcal{F} I ∈ F is served by a D \mathcal{D} D -random algorithm with probability at least q > 0 q>0 q > 0 . Then some N ≤ ln ∣ F ∣ / q + 1 N \le\ln|\mathcal{F}|/q+1 N ≤ ln ∣ F ∣/ q + 1 algorithms serve all of F \mathcal{F} F between them, so ⌈ log 2 N ⌉ \lceil\log_2 N\rceil ⌈ log 2 N ⌉ bits of advice suffice.
Proof. For N N N independent draws the expected number of unserved instances is at most ∣ F ∣ ( 1 − q ) N ≤ ∣ F ∣ e − q N < 1 |\mathcal{F}|(1-q)^N \le|\mathcal{F}|e^{-qN}<1 ∣ F ∣ ( 1 − q ) N ≤ ∣ F ∣ e − q N < 1 once N > ln ∣ F ∣ / q N>\ln|\mathcal{F}|/q N > ln ∣ F ∣/ q . The oracle names a serving algorithm. □ \square □
The Exact Cost of Ratio 1 − ϵ 1-\epsilon 1 − ϵ for Small Bids
Until § 3.3 the instance is N π ( n , B ) N_\pi(n,B) N π ( n , B ) from § 1 . Advertiser π ( t ) \pi(t) π ( t ) exits after phase t t t , O P T = n B \mathrm{OPT}=nB OPT = n B , and ratio 1 − ϵ 1-\epsilon 1 − ϵ means losing at most ϵ n B \epsilon nB ϵ n B queries. In the divisible model a phase is a parcel of mass B B B that may be split arbitrarily, and indivisible algorithms are a special case.
The Reserve Law and the Lower Bound
Theorem 1. Let n ≥ 1 n \ge1 n ≥ 1 , B ≥ 1 B \ge1 B ≥ 1 , ϵ ∈ ( 0 , 1 4 ] \epsilon\in(0,\frac{1}{4}] ϵ ∈ ( 0 , 4 1 ] and K = ϵ n K=\epsilon n K = ϵ n . Every deterministic algorithm that is ( 1 − ϵ ) (1-\epsilon) ( 1 − ϵ ) -competitive on all instances N π ( n , B ) N_\pi(n,B) N π ( n , B ) , divisible or not, reads at least
log 2 1 P n ( K ) ≥ n log 2 n e ( K + 1 ) − 2 K log 2 n + 1 K − 0.45 K \log_2 \frac{1}{P_n(K)} \ge n\log_2\frac{n}{e(K+1)}-2K\log_2\frac{n+1}{K}-0.45K log 2 P n ( K ) 1 ≥ n log 2 e ( K + 1 ) n − 2 K log 2 K n + 1 − 0.45 K bits, where P n ( K ) = inf s > 0 e − s ( n − K ) ∏ ℓ = 1 n ( 1 + ( e s − 1 ) min { 1 , K + 1 ℓ } ) P_n(K)=\inf_{s>0}e^{-s(n-K)}\prod_{\ell=1}^{n}\left(1+(e^s-1)\min\left\{1,\frac{K+1}{\ell}\right\}\right) P n ( K ) = inf s > 0 e − s ( n − K ) ∏ ℓ = 1 n ( 1 + ( e s − 1 ) min { 1 , ℓ K + 1 } ) .
Proof. Normalize the budgets to 1 1 1 , fix an advice-free algorithm, and let π \pi π be uniform. Let X t ∈ [ 0 , 1 ] X_t \in[0,1] X t ∈ [ 0 , 1 ] be the fill of π ( t ) \pi(t) π ( t ) when it exits. It receives nothing later, so the revenue is ∑ t X t \sum_t X_t ∑ t X t . Put D t = ∑ s ≤ t ( 1 − X s ) D_t=\sum_{s\le t}(1-X_s) D t = ∑ s ≤ t ( 1 − X s ) , so that success means D n ≤ K D_n \le K D n ≤ K .
(a) By execution invariance, the loads after phase t t t depend only on the exits π ( 1 ) , … , π ( t − 1 ) \pi(1),\ldots,\pi(t-1) π ( 1 ) , … , π ( t − 1 ) . Given these, π ( t ) \pi(t) π ( t ) is uniform among the ℓ t = n − t + 1 \ell_t=n-t+1 ℓ t = n − t + 1 live advertisers.
(b) Reserve law. After phase t t t at most t t t units have been placed, and ∑ s < t X s \sum_{s<t}X_s ∑ s < t X s of them sit on exited advertisers. So the live advertisers hold at most 1 + D t − 1 1+D_{t-1} 1 + D t − 1 . Hence E [ X t ∣ π < t ] ≤ min { 1 , ( 1 + D t − 1 ) / ℓ t } \mathbb{E}[X_t\mid\pi<t]\le\min\{1,(1+D_{t-1})/\ell_t\} E [ X t ∣ π < t ] ≤ min { 1 , ( 1 + D t − 1 ) / ℓ t } . Let Y t = X t 1 [ D t − 1 ≤ K ] Y_t=X_t\mathbf{1}[D_{t-1}\le K] Y t = X t 1 [ D t − 1 ≤ K ] . Success forces ∑ t Y t ≥ n − K \sum_tY_t\ge n-K ∑ t Y t ≥ n − K , and by convexity of y ↦ e s y y\mapsto e^{sy} y ↦ e sy on [ 0 , 1 ] [0,1] [ 0 , 1 ] ,
E [ e s Y t ∣ π < t ] ≤ 1 + ( e s − 1 ) min { 1 , K + 1 ℓ t } . \mathbb{E}[e^{sY_t}\mid\pi<t]\le1+(e^s-1)\min\left\{1,\frac{K+1}{\ell_t}\right\}. E [ e s Y t ∣ π < t ] ≤ 1 + ( e s − 1 ) min { 1 , ℓ t K + 1 } .
Lemma 1 with u = e − s u=e^{-s} u = e − s and Z t = − Y t Z_t=-Y_t Z t = − Y t gives the first bound. For the explicit form let M = K + 1 M=K+1 M = K + 1 and m = ⌊ M ⌋ m=\lfloor M\rfloor m = ⌊ M ⌋ . The factors with ℓ ≤ m \ell\le m ℓ ≤ m equal e s e^s e s . For ℓ > m \ell>m ℓ > m we use ln ( 1 + ( e s − 1 ) a ) ≤ s + ln a + e − s / a \ln(1+(e^s-1)a)\le s+\ln a+e^{-s}/a ln ( 1 + ( e s − 1 ) a ) ≤ s + ln a + e − s / a with a = M / ℓ a=M/\ell a = M / ℓ . This gives ln P n ( K ) ≤ s K + ∑ ℓ > m ln M ℓ + e − s n ( n + 1 ) 2 M \ln P_n(K)\le sK+\sum_{\ell>m}\ln\frac{M}{\ell}+e^{-s}\frac{n(n+1)}{2M} ln P n ( K ) ≤ sK + ∑ ℓ > m ln ℓ M + e − s 2 M n ( n + 1 ) . The sum is at most − n ln n e M -n\ln\frac{n}{eM} − n ln e M n , by ln n ! ≥ n ln n e \ln n!\ge n\ln\frac{n}{e} ln n ! ≥ n ln e n and m ! ≤ M m m!\le M^m m ! ≤ M m . The choice e − s = 2 M K n ( n + 1 ) e^{-s}=\frac{2MK}{n(n+1)} e − s = n ( n + 1 ) 2 M K bounds the other two terms by 2 K ln n + 1 K + ( 1 − ln 2 ) K 2K\ln\frac{n+1}{K}+(1-\ln2)K 2 K ln K n + 1 + ( 1 − ln 2 ) K . □ \square □
The Buffer Algorithm, or Losing Early on Purpose
For a priority order σ \sigma σ , algorithm B U F σ \mathrm{BUF}_{\sigma} BUF σ assigns every query to the first advertiser in the order σ \sigma σ that is eligible and has room, and it rejects the query if there is none. Since a phase brings exactly one budget of demand, every advertiser is either empty or full at the end of every phase. The algorithm does not use B B B , and for B = 1 B=1 B = 1 it is a matching algorithm. Figure 2 compares it with BALANCE.
Theorem 2. Let n ≥ 2 n\ge2 n ≥ 2 , B ≥ 1 B\ge1 B ≥ 1 and let K K K be an integer with 1 ≤ K ≤ n / 4 1\le K\le n/4 1 ≤ K ≤ n /4 . There is a deterministic algorithm that loses at most K B KB K B queries on every instance N π ( n , B ) N_{\pi}(n,B) N π ( n , B ) and reads at most
n log 2 n e ( K + 1 ) − K log 2 n K + 1 + ( 2 K + K ( K + 1 ) n + 2 ) log 2 e + 5 2 log 2 n + 1 n\log_2\frac{n}{e(K+1)}-K\log_2\frac{n}{K+1}+\left(2K+\frac{K(K+1)}{n}+2\right)\log_2 e+\frac{5}{2}\log_2 n+1 n log 2 e ( K + 1 ) n − K log 2 K + 1 n + ( 2 K + n K ( K + 1 ) + 2 ) log 2 e + 2 5 log 2 n + 1 bits of advice.
Proof. Let F t F_t F t be the set of live full advertisers after phase t t t has been placed, and let E σ ( π ) E_\sigma(\pi) E σ ( π ) be the event that π ( t ) ∉ F t \pi(t) \notin F_t π ( t ) ∈ / F t for t ≤ K t \le K t ≤ K and π ( t ) ∈ F t \pi(t) \in F_t π ( t ) ∈ F t for t > K t > K t > K . On E σ ( π ) E_\sigma(\pi) E σ ( π ) the following holds by induction.
For t ≤ K t \le K t ≤ K , F t F_t F t consists of the first t t t advertisers in the order σ \sigma σ among those that have not exited before phase t t t , and the exiting advertiser is empty.
For t > K t > K t > K , ∣ F t ∣ = min { K + 1 , n − t + 1 } \lvert F_t\rvert= \min\{K+1,n-t+1\} ∣ F t ∣ = min { K + 1 , n − t + 1 } , since a full advertiser exits and the next phase fills the next empty one.
So exactly K K K advertisers exit empty, and the loss is K B KB K B . By (a) in the proof of Theorem 1, for uniform π \pi π
Pr [ E σ ( π ) ] = ∏ t = 1 K ( 1 − t n − t + 1 ) ∏ ℓ = K + 2 n − K K + 1 ℓ = : P . \Pr[E_\sigma(\pi)] = \prod_{t=1}^{K}\left(1-\frac{t}{n-t+1}\right)\prod_{\ell=K+2}^{n-K}\frac{K+1}{\ell} =: P. Pr [ E σ ( π )] = t = 1 ∏ K ( 1 − n − t + 1 t ) ℓ = K + 2 ∏ n − K ℓ K + 1 =: P .
The event depends only on the relative order of σ \sigma σ and π \pi π , so for fixed π \pi π and uniform σ \sigma σ it also has probability P P P . Lemma 2 over the n ! n! n ! instances gives advice log 2 ( 1 / P ) + log 2 ( ln n ! + 1 ) + 1 ≤ log 2 ( 1 / P ) + 2 log 2 n + 1 \log_2(1/P)+\log_2(\ln n!+1)+1 \le\log_2(1/P)+2\log_2 n+1 log 2 ( 1/ P ) + log 2 ( ln n ! + 1 ) + 1 ≤ log 2 ( 1/ P ) + 2 log 2 n + 1 . The estimate of log 2 1 P \log_2 \frac{1}{P} log 2 P 1 that gives the stated bound is in Appendix B. □ \square □
Corollary 1. For all B ≥ 1 B \ge1 B ≥ 1 , ϵ ∈ ( 0 , 1 4 ] \epsilon\in(0,\frac{1}{4}] ϵ ∈ ( 0 , 4 1 ] and n ≥ 1 / ϵ n \ge1/\epsilon n ≥ 1/ ϵ ,
∣ b ∗ ( n , ϵ ) − n log 2 1 e ϵ ∣ ≤ 3 ϵ n log 2 2 ϵ + 2 ϵ + 3 log 2 n + 5. \left|b^*(n,\epsilon)-n\log_2\frac{1}{e\epsilon}\right| \le3\epsilon n\log_2\frac{2}{\epsilon}+\frac{2}{\epsilon}+3\log_2 n+5. b ∗ ( n , ϵ ) − n log 2 eϵ 1 ≤ 3 ϵ n log 2 ϵ 2 + ϵ 2 + 3 log 2 n + 5. where b ∗ ( n , ϵ ) b^*(n,\epsilon) b ∗ ( n , ϵ ) is the least advice for ratio 1 − ϵ 1-\epsilon 1 − ϵ on N π ( n , B ) N_\pi(n,B) N π ( n , B ) . Hence b ∗ ( n , ϵ ) = n log 2 1 ϵ − n log 2 e + o ( n ) b^*(n,\epsilon)=n\log_2\frac{1}{\epsilon}-n\log_2 e+o(n) b ∗ ( n , ϵ ) = n log 2 ϵ 1 − n log 2 e + o ( n ) as ϵ → 0 \epsilon\to0 ϵ → 0 and ϵ n → ∞ \epsilon n\to\infty ϵ n → ∞ .
Proof. For the lower bound we take K = ϵ n K=\epsilon n K = ϵ n in Theorem 1 and use three estimates, namely n log 2 n e ( K + 1 ) ≥ n log 2 1 e ϵ − log 2 e ϵ n\log_2\frac{n}{e(K+1)}\ge n\log_2\frac{1}{e\epsilon}-\frac{\log_2 e}{\epsilon} n log 2 e ( K + 1 ) n ≥ n log 2 eϵ 1 − ϵ l o g 2 e , 2 K log 2 n + 1 K ≤ 2 ϵ n log 2 2 ϵ 2K\log_2\frac{n+1}{K}\le2\epsilon n\log_2\frac{2}{\epsilon} 2 K log 2 K n + 1 ≤ 2 ϵ n log 2 ϵ 2 , and 0.45 K ≤ 0.15 ϵ n log 2 2 ϵ 0.45K\le0.15\epsilon n\log_2\frac{2}{\epsilon} 0.45 K ≤ 0.15 ϵ n log 2 ϵ 2 . For the upper bound we take K = ⌊ ϵ n ⌋ K=\lfloor\epsilon n\rfloor K = ⌊ ϵ n ⌋ in Theorem 2. There K + 1 > ϵ n K+1>\epsilon n K + 1 > ϵ n bounds the leading term by n log 2 1 e ϵ n\log_2\frac{1}{e\epsilon} n log 2 eϵ 1 , the second term is non-positive, and ( 2 K + K ( K + 1 ) n + 2 ) log 2 e ≤ 3.25 ϵ n + 3.25 \left(2K+\frac{K(K+1)}{n}+2\right)\log_2 e\le3.25\epsilon n+3.25 ( 2 K + n K ( K + 1 ) + 2 ) log 2 e ≤ 3.25 ϵ n + 3.25 . □ \square □
Corollary 2. For all n n n , B ≥ 1 B\ge1 B ≥ 1 , exact optimality on N π ( n , B ) N_\pi(n,B) N π ( n , B ) costs exactly ⌈ log 2 n ! ⌉ \lceil\log_2 n!\rceil ⌈ log 2 n !⌉ bits, divisible or not.
Proof. With K = 0 K=0 K = 0 the bound in the proof of Theorem 1 is ∏ ℓ ( e − s + ( 1 − e − s ) / ℓ ) → 1 / n ! \prod_{\ell}(e^{-s}+(1-e^{-s})/\ell)\to1/n! ∏ ℓ ( e − s + ( 1 − e − s ) / ℓ ) → 1/ n ! as s → ∞ s\to\infty s → ∞ . Writing π \pi π suffices for the upper bound. □ \square □
Priority Classes on Every Decreasing Instance
An instance is decreasing if its demand arrives in rounds 1 , … , T 1,\ldots,T 1 , … , T , where round t t t brings demand d t ≥ 0 d_t\ge0 d t ≥ 0 that is eligible for a set E t E_t E t of advertisers, with E 1 ⊇ ⋯ ⊇ E T E_1\supseteq\cdots\supseteq E_T E 1 ⊇ ⋯ ⊇ E T . Budgets B i > 0 B_i>0 B i > 0 are arbitrary. As above we work in the divisible model, and a unit of demand earns 1 wherever it is placed. The nested family is the case d t = B d_t=B d t = B and E t = { π ( t ) , … , π ( n ) } E_t=\{\pi(t),\ldots,\pi(n)\} E t = { π ( t ) , … , π ( n )} . Advertiser i i i exits at τ i = max { t : i ∈ E t } \tau_i=\max\{t:i\in E_t\} τ i = max { t : i ∈ E t } , with τ i = 0 \tau_i = 0 τ i = 0 if i ∉ E 1 i \notin E_1 i ∈ / E 1 . We fix a total order ≺ \prec ≺ of the advertisers such that τ i < τ j \tau_i < \tau_j τ i < τ j implies i ≺ j i \prec j i ≺ j . A monotone labeling gives every advertiser a class c ( i ) ∈ { 1 , … , L } c(i) \in\{1, \ldots, L\} c ( i ) ∈ { 1 , … , L } such that i ≺ j i \prec j i ≺ j implies c ( i ) ≤ c ( j ) c(i) \le c(j) c ( i ) ≤ c ( j ) . For a class a a a let a − a^{-} a − be a a a without its ≺ \prec ≺ -first member. A solution x x x assigns the demand offline, x i x_i x i being the amount that advertiser i i i receives, and x ( S ) = ∑ i ∈ S x i x(S) = \sum_{i \in S} x_i x ( S ) = ∑ i ∈ S x i . The advice gives every advertiser its class, which costs ⌈ n log 2 L ⌉ \lceil n \log_2 L \rceil ⌈ n log 2 L ⌉ bits. Algorithm B A L L L \mathrm{BALL}_L BALL L routes demand to an eligible advertiser that is not full and minimizes (class, fill fraction) lexicographically. For L = 1 L = 1 L = 1 this is BALANCE.
Theorem 3. On every decreasing instance, for every monotone labeling and every optimal solution x x x , B A L L L \mathrm{BALL}_L BALL L serves at least O P T − max a x ( a − ) \mathrm{OPT} - \max_a x(a^{-}) OPT − max a x ( a − ) . This holds for every algorithm that routes demand to an eligible non-full advertiser of the smallest class and rejects demand only when every eligible advertiser is full, whatever it does within a class.
Proof. Let f i f_i f i be the final load of advertiser i i i , so that the algorithm serves ∑ i f i \sum_i f_i ∑ i f i . If every advertiser ends full, it serves ∑ i B i ≥ O P T \sum_i B_i \ge\mathrm{OPT} ∑ i B i ≥ OPT . Otherwise let j j j be the ≺ \prec ≺ -last advertiser that ends with unused budget, let a = c ( j ) a = c(j) a = c ( j ) and s = τ j + 1 s = \tau_j + 1 s = τ j + 1 , and let S = { i : τ i ≥ s } S = \{i : \tau_i \ge s\} S = { i : τ i ≥ s } be the set of advertisers eligible from round s s s on. Then the following hold.
(a) Every i ∈ S i \in S i ∈ S satisfies j ≺ i j \prec i j ≺ i , so it ends full.
(b) Nothing is rejected before round s s s , since j j j is eligible in every round t ≤ τ j t \le\tau_j t ≤ τ j and is never full. (c) If demand is placed on some i ∈ S i \in S i ∈ S in a round t < s t < s t < s , then c ( i ) ≤ c ( j ) c(i) \le c(j) c ( i ) ≤ c ( j ) , because j j j was an eligible non-full advertiser at that moment, and c ( i ) ≥ c ( j ) c(i) \ge c(j) c ( i ) ≥ c ( j ) , because j ≺ i j \prec i j ≺ i . So i ∈ S ∩ a i \in S \cap a i ∈ S ∩ a .
Let A = ∑ t < s d t A = \sum_{t<s} d_t A = ∑ t < s d t , and let p p p be the demand placed on S S S before round s s s . Advertisers outside S S S receive nothing from round s s s on, so by (b) they end with A − p A-p A − p in total. By (a) the advertisers in S S S end with ∑ i ∈ S B i \sum_{i\in S} B_i ∑ i ∈ S B i , and by (c) p ≤ ∑ i ∈ S ∩ a B i p \le\sum_{i\in S\cap a} B_i p ≤ ∑ i ∈ S ∩ a B i . Moreover S ∩ a ⊆ a − S \cap a \subseteq a^{-} S ∩ a ⊆ a − , since the first member of a a a precedes or equals j j j and so exits before s s s . Hence the algorithm serves
A − p + ∑ i ∈ S B i ≥ A + ∑ i ∈ S ∖ a − B i . A-p+\sum_{i\in S}B_i \ge A+\sum_{i\in S\setminus a^{-}}B_i. A − p + i ∈ S ∑ B i ≥ A + i ∈ S ∖ a − ∑ B i .
On the other hand, x x x restricted to the advertisers outside a − a^{-} a − is a solution that serves O P T − x ( a − ) \mathrm{OPT}-x(a^{-}) OPT − x ( a − ) . It serves at most A A A before round s s s and at most ∑ i ∈ S ∖ a − B i \sum_{i\in S\setminus a^{-}} B_i ∑ i ∈ S ∖ a − B i from round s s s on, so O P T − x ( a − ) ≤ A + ∑ i ∈ S ∖ a − B i \mathrm{OPT}-x(a^{-}) \le A+\sum_{i\in S\setminus a^{-}} B_i OPT − x ( a − ) ≤ A + ∑ i ∈ S ∖ a − B i , which is at most what the algorithm serves. □ \square □
With singleton classes the bound is OPT, i.e., serving the earliest exit first is optimal. The proof also applies verbatim to unit bids and integral budgets (online b b b -matching), where every advertiser that is not full can accept a query.
Corollary 3. Let b d e c ( n , ϵ ) b_{\mathrm{dec}}(n,\epsilon) b dec ( n , ϵ ) be the least advice with which a deterministic algorithm has ratio at least 1 − ϵ 1-\epsilon 1 − ϵ on all decreasing instances with n n n advertisers. Then b d e c ( n , 0 ) = ⌈ log 2 n ! ⌉ b_{\mathrm{dec}}(n,0)=\lceil\log_2 n!\rceil b dec ( n , 0 ) = ⌈ log 2 n !⌉ and, for 0 < ϵ < 1 0<\epsilon<1 0 < ϵ < 1 ,
b d e c ( n , ϵ ) ≤ n log 2 ⌈ 1 ϵ ⌉ ≤ n log 2 1 ϵ + n log 2 ( 1 + ϵ ) + 1. b_{\mathrm{dec}}(n,\epsilon)\le n\log_2\left\lceil\frac{1}{\epsilon}\right\rceil\le n\log_2\frac{1}{\epsilon}+n\log_2(1+\epsilon)+1. b dec ( n , ϵ ) ≤ n log 2 ⌈ ϵ 1 ⌉ ≤ n log 2 ϵ 1 + n log 2 ( 1 + ϵ ) + 1. For ϵ ≤ 1 4 \epsilon\le\frac{1}{4} ϵ ≤ 4 1 and n ≥ 1 / ϵ n\ge1/\epsilon n ≥ 1/ ϵ , b d e c ( n , ϵ ) ≥ n log 2 1 ϵ − 3 ϵ n log 2 2 ϵ − 3 log 2 n − 5 b_{\mathrm{dec}}(n,\epsilon)\ge n\log_2\frac{1}{\epsilon}-3\epsilon n\log_2\frac{2}{\epsilon}-3\log_2 n-5 b dec ( n , ϵ ) ≥ n log 2 ϵ 1 − 3 ϵ n log 2 ϵ 2 − 3 log 2 n − 5 . Hence b d e c ( n , ϵ ) = n log 2 1 ϵ ± O ( n ) b_{\mathrm{dec}}(n,\epsilon)=n\log_2\frac{1}{\epsilon}\pm O(n) b dec ( n , ϵ ) = n log 2 ϵ 1 ± O ( n ) .
Proof. For the upper bound we fix an optimal solution x x x and go through the advertisers in the order ≺ \prec ≺ . We open a new class whenever adding the current advertiser to the current class would make x ( a − ) x(a^{-}) x ( a − ) exceed ϵ O P T \epsilon\ \mathrm{OPT} ϵ OPT . Every class then has x ( a − ) ≤ ϵ O P T x(a^{-})\le\epsilon\ \mathrm{OPT} x ( a − ) ≤ ϵ OPT , so Theorem 3 gives ratio 1 − ϵ 1-\epsilon 1 − ϵ . For consecutive classes a a a and a + 1 a+1 a + 1 we have x ( a − ) + x i a + 1 > ϵ O P T x(a^{-})+x_{i_{a+1}}>\epsilon\ \mathrm{OPT} x ( a − ) + x i a + 1 > ϵ OPT , where i a + 1 i_{a+1} i a + 1 opens class a + 1 a+1 a + 1 . These sets are disjoint for different a a a , so ( L − 1 ) ϵ O P T < O P T (L-1)\epsilon\ \mathrm{OPT}<\mathrm{OPT} ( L − 1 ) ϵ OPT < OPT and L ≤ ⌈ 1 / ϵ ⌉ L\le\lceil1/\epsilon\rceil L ≤ ⌈ 1/ ϵ ⌉ . The oracle writes the labels as one number in base ⌈ 1 / ϵ ⌉ \lceil1/\epsilon\rceil ⌈ 1/ ϵ ⌉ . For ϵ = 0 \epsilon=0 ϵ = 0 singleton classes give OPT, and the oracle writes ≺ \prec ≺ in ⌈ log 2 n ! ⌉ \lceil\log_2 n!\rceil ⌈ log 2 n !⌉ bits. The lower bounds hold because the nested family is decreasing (Corollaries 1 and 2). □ \square □
On the nested family, the corollary exceeds the optimum b ∗ ( n , ϵ ) b^*(n,\epsilon) b ∗ ( n , ϵ ) by at most n ( log 2 e + log 2 ( 1 + ϵ ) ) n(\log_2 e+\log_2(1+\epsilon)) n ( log 2 e + log 2 ( 1 + ϵ )) bits plus the error terms of Corollary 1. There the loss of B A L L \mathrm{BAL}_L BAL L telescopes over the classes and can be computed exactly. The ratio tends to 1 − r L + 1 / L 1-r_{L+1}/L 1 − r L + 1 / L with r 1 = 0 r_1=0 r 1 = 0 and r a + 1 = e r a − 1 r_{a+1}=e^{r_a-1} r a + 1 = e r a − 1 , which is 1 − 1 / e 1-1/e 1 − 1/ e for L = 1 L=1 L = 1 (Appendix A and Figure 1). A demand-based variant of Theorem 3 also holds for indivisible bids of size at most γ B i \gamma B_i γ B i , provided the demand of every window is at most ( 1 − γ ) (1-\gamma) ( 1 − γ ) times the capacity of the next class (Appendix A).
Hidden Targets and the Exact Margin above 3 / 4 3/4 3/4
Let N = 2 k N=2k N = 2 k advertisers have budget B B B , and let S \mathcal{S} S be the family of k k k -subsets of [ N ] [N] [ N ] . For S ∈ S S \in\mathcal{S} S ∈ S the instance X ( S ) X(S) X ( S ) has two phases.
Phase 1 (flexible demand). k B kB k B queries arrive, each with bid 1 for every advertiser.
Phase 2 (hidden targets). In variant U every v ∈ S v \in S v ∈ S receives B B B private queries of bid 1, and in variant H every v ∈ S v \in S v ∈ S receives one private query of bid B B B .
Filling [ N ] ∖ S [N] \setminus S [ N ] ∖ S in Phase 1 serves everything, so OPT = 2 k B \operatorname{OPT}=2kB OPT = 2 k B . For even B B B , BALANCE leaves every advertiser half full after Phase 1. It then earns ratio exactly 3 / 4 3/4 3/4 in variant U and 1 / 2 1/2 1/2 in variant H, for every S S S . The question is how much information about S S S improves on this.
For an advice-free algorithm let y ∈ { 0 , … , B } N y \in\{0,\ldots,B\}^{N} y ∈ { 0 , … , B } N be its Phase-1 spending, which does not depend on S S S , and let s = ∑ v y v ≤ k B s=\sum_v y_v \le kB s = ∑ v y v ≤ k B . Let T = { v : y v = 0 } T=\{v:y_v=0\} T = { v : y v = 0 } and t = N − ∣ T ∣ t=N-|T| t = N − ∣ T ∣ . In variant U a target v v v earns at most B − y v B-y_v B − y v , and in variant H it earns only if y v = 0 y_v=0 y v = 0 . So the ratio on X ( S ) X(S) X ( S ) is at most
ρ U ( S ) = 1 2 + s − ∑ v ∈ S y v 2 k B , ρ H ( S ) = s 2 k B + ∣ S ∩ T ∣ 2 k . (1) \rho_U(S)=\frac{1}{2}+\frac{s-\sum_{v\in S}y_v}{2kB},\qquad\rho_H(S)=\frac{s}{2kB}+\frac{|S\cap T|}{2k}. \tag*{(1)} ρ U ( S ) = 2 1 + 2 k B s − ∑ v ∈ S y v , ρ H ( S ) = 2 k B s + 2 k ∣ S ∩ T ∣ . (1)
Theorem 4. Let ϵ ∈ ( 0 , 1 4 ) \epsilon\in(0,\frac14) ϵ ∈ ( 0 , 4 1 ) , B ≥ 1 B\ge1 B ≥ 1 , and let the variant be U or H. Suppose that
b ≤ ϵ 2 ln 2 N − log 2 2 ϵ . b\le\frac{\epsilon^2}{\ln2}N-\log_2\frac{2}{\epsilon}. b ≤ ln 2 ϵ 2 N − log 2 ϵ 2 . Then for every randomized algorithm that reads at most b b b bits of advice there is a target set S ∈ S S\in\mathcal{S} S ∈ S on which its expected ratio is at most 3 4 + 5 8 ϵ < 3 4 + ϵ \frac34+\frac58\epsilon<\frac34+\epsilon 4 3 + 8 5 ϵ < 4 3 + ϵ . Here a randomized algorithm with advice is a probability distribution over deterministic algorithms with advice, and the advice may depend on the instance and even on the random choice.
Proof. Step 1. Fix a deterministic advice-free algorithm, with Phase-1 spending y y y as above, and let S S S be uniform on S \mathcal{S} S . We show that
Pr S [ ρ ( S ) > 3 4 + ϵ 2 ] ≤ e − ϵ 2 N , (2) \Pr_{S}\left[\rho(S)>\frac34+\frac{\epsilon}{2}\right]\le e^{-\epsilon^2N}, \tag*{(2)} S Pr [ ρ ( S ) > 4 3 + 2 ϵ ] ≤ e − ϵ 2 N , (2)
where ρ \rho ρ is ρ U \rho_U ρ U or ρ H \rho_H ρ H from (1).
:::
Variant U. Let Z = ∑ v ∈ S y v Z=\sum_{v\in S}y_v Z = ∑ v ∈ S y v . Then ρ U ( S ) > 3 4 + ϵ 2 \rho_U(S)>\frac{3}{4}+\frac{\epsilon}{2} ρ U ( S ) > 4 3 + 2 ϵ means s − Z > ( 1 2 + ϵ ) k B s-Z>\left(\frac{1}{2}+\epsilon\right)kB s − Z > ( 2 1 + ϵ ) k B , and since s ≤ k B s\le kB s ≤ k B this implies Z < s 2 − ϵ k B Z<\frac{s}{2}-\epsilon kB Z < 2 s − ϵ k B . Each advertiser lies in S S S with probability 1 2 \frac{1}{2} 2 1 , so E Z = s 2 \mathbb{E}Z=\frac{s}{2} E Z = 2 s . Moreover Z Z Z is a sum of k k k values drawn without replacement from the population { y v } ⊆ [ 0 , B ] \{y_v\}\subseteq[0,B] { y v } ⊆ [ 0 , B ] . Hoeffding’s inequality for sampling without replacement [11 Thm. 4] gives Pr [ Z ≤ E Z − ϵ k B ] ≤ exp ( − 2 ( ϵ k B ) 2 / ( k B 2 ) ) = e − 2 ϵ 2 k = e − ϵ 2 N \Pr[Z\le\mathbb{E}Z-\epsilon kB]\le\exp\left(-2(\epsilon kB)^2/(kB^2)\right)=e^{-2\epsilon^2 k}=e^{-\epsilon^2N} Pr [ Z ≤ E Z − ϵ k B ] ≤ exp ( − 2 ( ϵ k B ) 2 / ( k B 2 ) ) = e − 2 ϵ 2 k = e − ϵ 2 N .
Variant H. Let Q = ∣ S ∩ T ∣ Q=|S\cap T| Q = ∣ S ∩ T ∣ , so E Q = ∣ T ∣ 2 = k − t 2 \mathbb{E}Q=\frac{|T|}{2}=k-\frac{t}{2} E Q = 2 ∣ T ∣ = k − 2 t . Only the t t t touched advertisers spend, each at most B B B , and the Phase-1 demand is k B kB k B , so s / B ≤ min { k , t } ≤ k + t 2 s/B\le\min\{k,t\}\le\frac{k+t}{2} s / B ≤ min { k , t } ≤ 2 k + t . Then ρ H ( S ) > 3 4 + ϵ 2 \rho_H(S)>\frac{3}{4}+\frac{\epsilon}{2} ρ H ( S ) > 4 3 + 2 ϵ means Q > ( 3 2 + ϵ ) k − s B Q>\left(\frac{3}{2}+\epsilon\right)k-\frac{s}{B} Q > ( 2 3 + ϵ ) k − B s , which implies Q > k − t 2 + ϵ k = E Q + ϵ k Q>k-\frac{t}{2}+\epsilon k=\mathbb{E}Q+\epsilon k Q > k − 2 t + ϵ k = E Q + ϵ k . Hoeffding’s inequality with values in { 0 , 1 } \{0,1\} { 0 , 1 } gives the same bound e − ϵ 2 N e^{-\epsilon^2N} e − ϵ 2 N .
Step 2. A deterministic algorithm that reads at most b b b bits behaves, on every instance, like one of the 2 b 2^b 2 b advice-free algorithms A σ A_\sigma A σ obtained by fixing its first b b b advice bits σ \sigma σ (§ 2 ). Whatever advice it receives on X ( S ) X(S) X ( S ) , its ratio there is at most max σ ρ σ ( S ) \max_\sigma\rho_\sigma(S) max σ ρ σ ( S ) , where ρ σ \rho_\sigma ρ σ is (1) for A σ A_\sigma A σ . Let G G G be the event that ρ σ ( S ) ≤ 3 4 + ϵ 2 \rho_\sigma(S)\le\frac{3}{4}+\frac{\epsilon}{2} ρ σ ( S ) ≤ 4 3 + 2 ϵ for every σ \sigma σ . By (2) , a union bound and the hypothesis on b b b ,
Pr [ G ‾ ] ≤ 2 b e − ϵ 2 N ≤ ϵ 2 . \Pr[\overline{G}]\le2^b e^{-\epsilon^2N}\le\frac{\epsilon}{2}. Pr [ G ] ≤ 2 b e − ϵ 2 N ≤ 2 ϵ .
Every ratio is at most 1 1 1 , so
E S [ r a t i o ] ≤ ( 3 4 + ϵ 2 ) + Pr [ G ‾ ] ( 1 − 3 4 − ϵ 2 ) ≤ 3 4 + ϵ 2 + ϵ 2 ( 1 4 − ϵ 2 ) ≤ 3 4 + 5 8 ϵ . \mathbb{E}_S[\mathrm{ratio}]\le\left(\frac{3}{4}+\frac{\epsilon}{2}\right)+\Pr[\overline{G}]\left(1-\frac{3}{4}-\frac{\epsilon}{2}\right)\le\frac{3}{4}+\frac{\epsilon}{2}+\frac{\epsilon}{2}\left(\frac{1}{4}-\frac{\epsilon}{2}\right)\le\frac{3}{4}+\frac{5}{8}\epsilon. E S [ ratio ] ≤ ( 4 3 + 2 ϵ ) + Pr [ G ] ( 1 − 4 3 − 2 ϵ ) ≤ 4 3 + 2 ϵ + 2 ϵ ( 4 1 − 2 ϵ ) ≤ 4 3 + 8 5 ϵ .
Step 3. A randomized algorithm is a distribution over deterministic algorithms, each reading at most b b b bits, and Step 2 applies to each of them whatever its advice function. Averaging over the random choice gives E S E r [ r a t i o ] ≤ 3 4 + 5 8 ϵ \mathbb{E}_S\mathbb{E}_r[\mathrm{ratio}]\le\frac{3}{4}+\frac{5}{8}\epsilon E S E r [ ratio ] ≤ 4 3 + 8 5 ϵ . Hence some S S S has E r [ r a t i o ] ≤ 3 4 + 5 8 ϵ \mathbb{E}_r[\mathrm{ratio}]\le\frac{3}{4}+\frac{5}{8}\epsilon E r [ ratio ] ≤ 4 3 + 8 5 ϵ . □ \square □
Theorem 5. Let k k k be even, B ≥ 1 B\ge1 B ≥ 1 , and let t t t be an integer with 0 ≤ t ≤ k / 4 0\le t\le k/4 0 ≤ t ≤ k /4 . Put
M = ⌈ ( 2 k + 1 ) ( k + 1 ) 2 ln 2 ⋅ e 16 t 2 / ( 3 k ) ⌉ . M=\left\lceil(2k+1)(k+1)^2\ln2\cdot e^{16t^2/(3k)}\right\rceil. M = ⌈ ( 2 k + 1 ) ( k + 1 ) 2 ln 2 ⋅ e 16 t 2 / ( 3 k ) ⌉ . There is a deterministic algorithm that reads ⌈ log 2 M ⌉ \lceil\log_2 M\rceil ⌈ log 2 M ⌉ bits of advice and has ratio at least 3 4 + t N \frac{3}{4}+\frac{t}{N} 4 3 + N t on every instance of either variant.
The advice names a reservation set R R R of size k k k that meets S S S in at most k 2 − t \frac{k}{2}-t 2 k − t elements, and the algorithm fills R R R in Phase 1. The proof is in Appendix C.
Corollary 4. Let k ≥ 8 k\ge8 k ≥ 8 be even, N = 2 k N=2k N = 2 k , B ≥ 1 B\ge1 B ≥ 1 and ϵ ∈ ( 0 , 1 16 ] \epsilon\in\left(0,\frac{1}{16}\right] ϵ ∈ ( 0 , 16 1 ] , and consider either variant.
(i) A deterministic algorithm with at most 32 3 ln 2 ϵ 2 N + 3 log 2 ( N + 2 ) + 3 \frac{32}{3\ln2}\epsilon^2N+3\log_2(N+2)+3 3 l n 2 32 ϵ 2 N + 3 log 2 ( N + 2 ) + 3 bits of advice has ratio at least 3 4 + ϵ \frac{3}{4}+\epsilon 4 3 + ϵ on every instance.
(ii) Every randomized algorithm whose expected ratio is at least 3 4 + ϵ \frac{3}{4}+\epsilon 4 3 + ϵ on every instance reads more than ϵ 2 ln 2 N − log 2 2 ϵ \frac{\epsilon^2}{\ln2}N-\log_2\frac{2}{\epsilon} l n 2 ϵ 2 N − log 2 ϵ 2 bits of advice.
Hence there is a constant C C C such that the advice complexity of ratio 3 4 + ϵ \frac{3}{4}+\epsilon 4 3 + ϵ is Θ ( ϵ 2 N ) \Theta(\epsilon^{2}N) Θ ( ϵ 2 N ) whenever ϵ 2 N ≥ C log N \epsilon^{2}N \ge C\log N ϵ 2 N ≥ C log N , for deterministic and for randomized algorithms.
The proof is in Appendix § 9 . The lower bound uses only concentration and the upper bound only covering, so the advice complexity of the family is a covering number. For the high-bid variant with ∣ S ∣ = t |S|=t ∣ S ∣ = t targets this can be made exact. We call R \mathcal{R} R a λ \lambda λ -defect covering family for ( N , t ) (N,t) ( N , t ) if every t t t -set S S S has some R ∈ R R\in\mathcal{R} R ∈ R with ∣ S ∩ R ∣ ≥ max { ∣ R ∣ , t } − λ |S\cap R|\ge\max\{|R|,t\}-\lambda ∣ S ∩ R ∣ ≥ max { ∣ R ∣ , t } − λ , and we let M ( N , t , λ ) M(N,t,\lambda) M ( N , t , λ ) be the least size of such a family.
Theorem 6. For variant H with t t t targets and Phase-1 demand ( N − t ) B (N-t)B ( N − t ) B , the least advice for deterministic ratio ρ \rho ρ is exactly ⌈ log 2 M ( N , t , ⌊ ( 1 − ρ ) N ⌋ ) ⌉ \left\lceil\log_{2}M(N,t,\lfloor(1-\rho)N\rfloor)\right\rceil ⌈ log 2 M ( N , t , ⌊( 1 − ρ ) N ⌋) ⌉ .
The proof and estimates of M M M are in Appendix § 9 . For a margin below t / 8 t/8 t /8 and t ≤ N t\le\sqrt{N} t ≤ N we get log 2 M = Θ ( t log N t ) \log_{2}M=\Theta\left(t\log\frac{N}{t}\right) log 2 M = Θ ( t log t N ) , so the advice must essentially name S S S . At margin Θ ( t ) \Theta(t) Θ ( t ) it collapses to Θ ( ϵ 2 N ) \Theta(\epsilon^{2}N) Θ ( ϵ 2 N ) .
Further Results
Ratios just above 1 − 1 / e 1-1/e 1 − 1/ e . On independent blocks of the nested family, ratio 1 − 1 e + δ 1-\frac{1}{e}+\delta 1 − e 1 + δ costs Ω ( δ 3 n ) \Omega(\delta^{3}n) Ω ( δ 3 n ) bits (Theorem 10 in Appendix § 10 ). One bit per advertiser already lifts the ratio on the nested family to about $0.734 ({xref}Appendix A`).
All unit-bid instances. With one proportional weight per advertiser [1 ] as advice, 2 n log 2 1 ϵ + n log 2 log n ϵ + O ( n ) 2n\log_{2}\frac{1}{\epsilon}+n\log_{2}\log\frac{n}{\epsilon}+O(n) 2 n log 2 ϵ 1 + n log 2 log ϵ n + O ( n ) bits give ratio 1 − ϵ 1-\epsilon 1 − ϵ on every divisible unit-bid instance (Theorem 15 ). Hence Θ ( n log 1 ϵ ) \Theta\left(n\log\frac{1}{\epsilon}\right) Θ ( n log ϵ 1 ) is the answer beyond decreasing instances whenever 1 n ≤ ϵ ≤ 1 log n \frac{1}{n}\le\epsilon\le\frac{1}{\log n} n 1 ≤ ϵ ≤ l o g n 1 .
Large bids. Without the small-bid assumption no deterministic algorithm without advice is competitive. One bit gives ratio 1 / 6 1/6 1/6 on every instance (Theorem 11 ). For large m / n m/n m / n , every ratio above 1 / 2 1/2 1/2 costs Ω ( n log m n ) \Omega\left(n\log\frac{m}{n}\right) Ω ( n log n m ) bits even when every query has a single eligible advertiser (Theorem 12 ). In that case O ( n ϵ log m ) O\left(\frac{n}{\epsilon}\log m\right) O ( ϵ n log m ) bits give ratio 1 − 2 ϵ 1-2\epsilon 1 − 2 ϵ (Theorem 13 ). For one advertiser these are known facts about online knapsack [4 ] , and our contribution is the extension to many advertisers. Exact optimality costs m log 2 ( Δ + 1 ) m\log_{2}(\Delta+1) m log 2 ( Δ + 1 ) bits up to lower-order terms, for m m m queries of degree at most Δ \Delta Δ (Theorem 14 ). Since an AOC-complete problem needs Ω ( ℓ ) \Omega(\ell) Ω ( ℓ ) bits for ratio 1 / 6 1/6 1/6 on inputs of length ℓ \ell ℓ [6 ] , no class of OAW-HB instances is AOC-complete.
Conclusion
Three questions remain open. (1) Do n log 2 1 ϵ + O ( n ) n\log_{2}\frac{1}{\epsilon}+O(n) n log 2 ϵ 1 + O ( n ) bits suffice on all small-bid instances, and is − n log 2 e -n\log_{2}e − n log 2 e the right second-order term on every decreasing instance? For matching, where fractional solutions cannot be rounded online, the bounds are still Ω ( n log 1 ϵ ) \Omega\left(n\log\frac{1}{\epsilon}\right) Ω ( n log ϵ 1 ) and O ( n / ϵ 5 ) O(n/\epsilon^{5}) O ( n / ϵ 5 ) [9 ] . (2) Is Θ ( ϵ 2 n ) \Theta(\epsilon^{2}n) Θ ( ϵ 2 n ) the answer for the whole two-phase class? (3) For large bids and private queries, the cost of ratio 1 − ϵ 1-\epsilon 1 − ϵ is known only up to a factor of order 1 / ϵ 1/\epsilon 1/ ϵ .
Priority Classes, Exact Losses and Indivisible Bids
The divisible model. We work in the small-bid (fluid) limit. Advertiser i i i has budget B i B_i B i , demand arrives as a sequence of parcels, a parcel of mass μ \mu μ with eligible set N N N may be split arbitrarily among the advertisers of N N N , and no advertiser is loaded beyond its budget. This is the limit of instances with small bids, and the model in which BALANCE is exactly ( 1 − 1 / e ) (1 - 1/e) ( 1 − 1/ e ) -competitive [13 ] .
A demand-based variant. Theorem 3 compares the algorithm with an optimal solution. The following variant compares it with the total demand instead, and for this reason it extends to indivisible bids. For a decreasing instance we partition the rounds into consecutive windows W 1 , … , W L W_1,\ldots,W_L W 1 , … , W L . Class a a a consists of the advertisers with τ i ∈ W a \tau_i \in W_a τ i ∈ W a (advertisers that are never eligible play no role), C a C_a C a is its total budget and D a D_a D a is the demand of window a a a , and we put C = ∑ a C a C = \sum_a C_a C = ∑ a C a and D = ∑ a D a D = \sum_a D_a D = ∑ a D a . The windows are equitable if C 1 = ⋯ = C L = C / L C_1 = \cdots= C_L = C/L C 1 = ⋯ = C L = C / L , and balanced if D a ≤ C a D_a \le C_a D a ≤ C a for every a a a . In the indivisible version every query q q q has a single bid b q b_q b q , the same for all advertisers eligible for it. An advertiser has room for q q q if its remaining budget is at least b q b_q b q , and BALL assigns q q q to an eligible advertiser with room that minimizes (class, fill fraction) lexicographically, or rejects q q q if there is none. For γ ∈ [ 0 , 1 ) \gamma\in[0,1) γ ∈ [ 0 , 1 ) the instance is γ \gamma γ -small if b q ≤ γ B i b_q \le\gamma B_i b q ≤ γ B i for every query q q q and every advertiser i i i eligible for it. The divisible model is the case γ = 0 \gamma= 0 γ = 0 .
Theorem 7. Let a decreasing instance be divisible (γ = 0 \gamma= 0 γ = 0 ) or γ \gamma γ -small with indivisible queries, and let the windows satisfy D a ≤ ( 1 − γ ) C a + 1 D_a \le(1 - \gamma)C_{a+1} D a ≤ ( 1 − γ ) C a + 1 for every a < L a < L a < L . Then BALL, with n ⌈ log 2 L ⌉ n\lceil\log_2 L\rceil n ⌈ log 2 L ⌉ bits of advice, rejects only demand of window L L L , so it serves at least D − D L D - D_L D − D L . In particular, if the instance is divisible and the windows are equitable and balanced, then B A L L L ≥ D − C L \mathrm{BALL}_L \ge D - \frac{C}{L} BALL L ≥ D − L C , and its ratio is at least 1 − 1 L 1 - \frac{1}{L} 1 − L 1 when D = C D = C D = C . If the instance is γ \gamma γ -small and the windows are equitable with D a ≤ ( 1 − γ ) C L D_a \le(1 - \gamma)\frac{C}{L} D a ≤ ( 1 − γ ) L C for every a a a , then B A L L L ≥ D − ( 1 − γ ) C L \mathrm{BALL}_L \ge D - (1 - \gamma)\frac{C}{L} BALL L ≥ D − ( 1 − γ ) L C .
Proof. Every advertiser i i i is eligible exactly in the rounds t ≤ τ i t \le\tau_i t ≤ τ i , because i ∈ E τ i ⊆ E t i \in E_{\tau_i} \subseteq E_t i ∈ E τ i ⊆ E t for t ≤ τ i t \le\tau_i t ≤ τ i . Hence during window a a a the advertisers of the classes below a a a have exited and those of the classes above a a a are all live. We show by induction on a a a that during window a a a all demand is assigned to the classes a a a and a + 1 a + 1 a + 1 , and that none is rejected if a < L a < L a < L .
Fix a < L a < L a < L and assume the claim for the earlier windows. Then no demand has reached class a + 1 a + 1 a + 1 before window a a a . During window a a a the algorithm prefers class a a a . It moves on to class a + 1 a + 1 a + 1 only when no live member of class a a a has room, and beyond class a + 1 a + 1 a + 1 , or to a rejection, only when in addition no member of class a + 1 a + 1 a + 1 has room. Suppose that at some moment of window a a a no member of class a + 1 a + 1 a + 1 has room for the current demand. In the divisible model every member of class a + 1 a + 1 a + 1 is then full, so the load of the class is C a + 1 ≥ D a C_{a+1} \ge D_a C a + 1 ≥ D a . In the indivisible model the current query q q q finds every member i i i of class a + 1 a + 1 a + 1 with remaining budget below b q ≤ γ B i b_q \le\gamma B_i b q ≤ γ B i , so the load of the class exceeds ( 1 − γ ) C a + 1 ≥ D a (1 - \gamma)C_{a+1} \ge D_a ( 1 − γ ) C a + 1 ≥ D a . But all of this load comes from window a a a , whose total demand is D a D_a D a and includes the current demand, which is not yet placed. So the load is less than D a D_a D a , a contradiction. Hence during window a a a every demand that class a a a does not take goes to class a + 1 a+1 a + 1 , and nothing is rejected. Consequently, all demand of the windows 1 , … , L − 1 1,\ldots,L-1 1 , … , L − 1 is served, the rejected demand is at most D L D_L D L , and B A L L ≥ D − D L \mathrm{BAL}_L \ge D-D_L BAL L ≥ D − D L . For the two special cases note that D a ≤ C a = C a + 1 D_a \le C_a=C_{a+1} D a ≤ C a = C a + 1 and D L ≤ C L D_L \le\frac{C}{L} D L ≤ L C in the first, and D a ≤ ( 1 − γ ) C a + 1 D_a \le(1-\gamma)C_{a+1} D a ≤ ( 1 − γ ) C a + 1 and D L ≤ ( 1 − γ ) C L D_L \le(1-\gamma)\frac{C}{L} D L ≤ ( 1 − γ ) L C in the second. □ \square □
The family. Let N ( g ) \mathcal{N}(g) N ( g ) consist of the following instances. There are g g g advertisers of budget 1 and a hidden bijection π \pi π from positions [ g ] [g] [ g ] to advertisers. Advertiser π ( p ) \pi(p) π ( p ) is eligible in the phases 1 , … , p 1,\ldots,p 1 , … , p and exits after phase p p p . Phase t t t is a parcel of mass 1 with eligible set E t = { π ( t ) , … , π ( g ) } E_t=\{\pi(t),\ldots,\pi(g)\} E t = { π ( t ) , … , π ( g )} , so E 1 ⫌ E 2 ⫌ ⋯ ⫌ E g E_1 \supsetneqq E_2 \supsetneqq\cdots\supsetneqq E_g E 1 ⫌ E 2 ⫌ ⋯ ⫌ E g is a laminar chain. Assigning phase t t t to π ( t ) \pi(t) π ( t ) serves every parcel and exhausts every budget, so O P T = g \mathrm{OPT}=g OPT = g and the total budget equals the total demand.
The algorithm. The advice is a map ℓ \ell ℓ from the advertisers to [ L ] [L] [ L ] , which costs g ⌈ log 2 L ⌉ g\lceil\log_2 L\rceil g ⌈ log 2 L ⌉ bits. Algorithm B A L L \mathrm{BAL}_L BAL L routes the arriving demand to an eligible advertiser that is not full and minimizes ( ℓ i , f i ) (\ell_i,f_i) ( ℓ i , f i ) lexicographically, where f i f_i f i is the fraction of B i B_i B i already spent. Equivalently, for each parcel let a a a be the smallest class containing an eligible non-full advertiser, raise the common fill fraction of the eligible non-full advertisers of class a a a until the parcel is exhausted or they are full, and in the latter case continue with the next class. For L = 1 L=1 L = 1 this is B A L A N C E \mathrm{BALANCE} BALANCE .
Theorem 8. Let L L L divide g g g , put h = g / L h=g/L h = g / L , and let the oracle set ℓ π ( p ) = ⌈ p L / g ⌉ \ell_{\pi(p)}=\lceil pL/g\rceil ℓ π ( p ) = ⌈ p L / g ⌉ . Then on every instance of N ( g ) \mathcal{N}(g) N ( g ) ,
B A L L ≥ ( 1 − 1 L ) O P T , \mathrm{BAL}_L \ge\left(1-\frac{1}{L}\right)\mathrm{OPT}, BAL L ≥ ( 1 − L 1 ) OPT , with g ⌈ log 2 L ⌉ g\lceil\log_2 L\rceil g ⌈ log 2 L ⌉ bits of advice.
Proof. We call window a a a the phases ( a − 1 ) h + 1 , … , a h (a-1)h+1,\ldots,ah ( a − 1 ) h + 1 , … , ah and class a a a the h h h advertisers whose positions lie in window a a a . Class a a a has total budget h h h , and all its advertisers exit during window a a a . Let f i f_i f i be the fill fraction of i i i when it exits and W = ∑ i ( 1 − f i ) W=\sum_i(1-f_i) W = ∑ i ( 1 − f i ) the total budget left unused. Since the budgets are 1 and the total demand equals the total budget g g g ,
B A L L = ∑ i f i = g − W . (3) \mathrm{BAL}_L=\sum_i f_i=g-W. \tag*{(3)} BAL L = i ∑ f i = g − W . (3)
We prove W ≤ h W\le h W ≤ h , which together with (3) gives the claim. We show by induction on a a a that at the beginning of window a a a (i) the advertisers of class a a a are all live and share a common fill fraction ρ a < 1 \rho_a<1 ρ a < 1 , (ii) every advertiser of a class above a a a has fill 0, and (iii) every advertiser of a class below a a a has exited. For a = 1 a=1 a = 1 this holds with ρ 1 = 0 \rho_1=0 ρ 1 = 0 .
Assume (i)--(iii) for a a a . By (iii) the classes below a a a are gone, so class a a a is the lowest class with live advertisers for the whole of window a a a , and B A L L \mathrm{BAL}_L BAL L routes demand to class a + 1 a+1 a + 1 only when the live members of class a a a are full. Within window a a a the live members of class a a a keep a common fill, because by (i) they start equal, the rule raises the common fill of all of them, and the departure of one does not change the fill of the others. We write λ 0 = ρ a \lambda_0=\rho_a λ 0 = ρ a and λ j \lambda_j λ j for their common fill after the j j j -th phase of the window. Exactly h − j + 1 h-j+1 h − j + 1 of them are live during phase j j j , so
λ j = min { 1 , λ j − 1 + 1 h − j + 1 } . (4) \lambda_j=\min\left\{1,\lambda_{j-1}+\frac{1}{h-j+1}\right\}. \tag*{(4)} λ j = min { 1 , λ j − 1 + h − j + 1 1 } . (4)
and the member exiting after phase j j j does so with fill λ j \lambda_j λ j . Let S a S_a S a be the total mass routed out of class a a a during window a a a . By (ii) the recipients are the members of class a + 1 a+1 a + 1 , which are all live and all at fill 0 at the start of the window, so the rule keeps their fills equal, and we put ρ a + 1 = S a / h \rho_{a+1}=S_a/h ρ a + 1 = S a / h . In phase 1 of the window the h h h members of class a a a are live with fill ρ a < 1 \rho_a<1 ρ a < 1 , so class a a a absorbs at least min { 1 , h ( 1 − ρ a ) } > 0 \min\{1,h(1-\rho_a)\}>0 min { 1 , h ( 1 − ρ a )} > 0 of that phase, whence
S a ≤ h − min { 1 , h ( 1 − ρ a ) } < h , S_a\le h-\min\{1,h(1-\rho_a)\}<h, S a ≤ h − min { 1 , h ( 1 − ρ a )} < h ,
so ρ a + 1 < 1 \rho_{a+1}<1 ρ a + 1 < 1 . In particular the members of class a + 1 a+1 a + 1 never become full during window a a a , so no mass reaches a class beyond a + 1 a+1 a + 1 and none is rejected, and (i)–(iii) hold for a + 1 a+1 a + 1 .
It remains to compute W W W . Class a a a receives ρ a h \rho_a h ρ a h during window a − 1 a-1 a − 1 and h − S a h-S_a h − S a during window a a a , since the mass h h h of window a a a is routed entirely to the classes a a a and a + 1 a+1 a + 1 , and it receives nothing at any other time. Hence ∑ i ∈ c l a s s a f i = ρ a h + h − S a \sum_{i\in\mathrm{class}\ a}f_i=\rho_a h+h-S_a ∑ i ∈ class a f i = ρ a h + h − S a and
W a : = ∑ i ∈ c l a s s a ( 1 − f i ) = h − ρ a h − h + S a = h ( ρ a + 1 − ρ a ) , W_a:=\sum_{i\in\mathrm{class}\ a}(1-f_i)=h-\rho_a h-h+S_a=h(\rho_{a+1}-\rho_a), W a := i ∈ class a ∑ ( 1 − f i ) = h − ρ a h − h + S a = h ( ρ a + 1 − ρ a ) ,
where for a = L a=L a = L we read ρ L + 1 = S L / h \rho_{L+1}=S_L/h ρ L + 1 = S L / h , with S L < h S_L<h S L < h the mass of window L L L that class L L L does not absorb (it is lost, since there is no class L + 1 L+1 L + 1 ). Summing over a a a telescopes to
W = ∑ a = 1 L W a = h ( ρ L + 1 − ρ 1 ) = h ρ L + 1 < h . W=\sum_{a=1}^{L}W_a=h(\rho_{L+1}-\rho_1)=h\rho_{L+1}<h. W = a = 1 ∑ L W a = h ( ρ L + 1 − ρ 1 ) = h ρ L + 1 < h .
The proof also gives the exact loss h ρ L + 1 h\rho_{L+1} h ρ L + 1 , and (4) determines ρ L + 1 \rho_{L+1} ρ L + 1 .
Proposition 1. Fix L L L and let h → ∞ h\to\infty h → ∞ . Then ρ a → r a \rho_a\to r_a ρ a → r a , where r 1 = 0 r_1=0 r 1 = 0 and r a + 1 = e r a − 1 r_{a+1}=e^{r_a-1} r a + 1 = e r a − 1 , and the competitive ratio of B A L L \mathrm{BAL}_L BAL L on N ( g ) \mathcal{N}(g) N ( g ) tends to 1 − r L + 1 / L 1-r_{L+1}/L 1 − r L + 1 / L . Moreover 1 − r L + 1 = Θ ( 1 / L ) 1-r_{L+1}=\Theta(1/L) 1 − r L + 1 = Θ ( 1/ L ) , so the bound of Theorem 8 is tight up to its second-order term.
Proof. By (4), as long as λ j < 1 \lambda_j<1 λ j < 1 we have λ j = ρ a + ( H h − H h − j ) \lambda_j=\rho_a+(H_h-H_{h-j}) λ j = ρ a + ( H h − H h − j ) , with H H H the harmonic numbers. Let j ∗ j^* j ∗ be the least j j j with ρ a + H h − H h − j ≥ 1 \rho_a+H_h-H_{h-j}\ge1 ρ a + H h − H h − j ≥ 1 . The phases after j ∗ j^* j ∗ contribute their whole mass to class a + 1 a+1 a + 1 and phase j ∗ j^* j ∗ contributes a part, so S a = h − j ∗ + O ( 1 ) S_a=h-j^*+O(1) S a = h − j ∗ + O ( 1 ) and ρ a + 1 = ( h − j ∗ ) / h + O ( 1 / h ) \rho_{a+1}=(h-j^*)/h+O(1/h) ρ a + 1 = ( h − j ∗ ) / h + O ( 1/ h ) . Since H h − H h − j = ln h h − j + O ( 1 h − j ) H_h-H_{h-j}=\ln\frac{h}{h-j}+O\left(\frac{1}{h-j}\right) H h − H h − j = ln h − j h + O ( h − j 1 ) , and h − j ∗ ≥ h / e − O ( 1 ) h-j^*\ge h/e-O(1) h − j ∗ ≥ h / e − O ( 1 ) because ρ a ≥ 0 \rho_a\ge0 ρ a ≥ 0 , we get ( h − j ∗ ) / h = e ρ − 1 + O ( 1 / h ) (h-j^*)/h=e^{\rho-1}+O(1/h) ( h − j ∗ ) / h = e ρ − 1 + O ( 1/ h ) . The map ρ ↦ e ρ − 1 \rho\mapsto e^{\rho-1} ρ ↦ e ρ − 1 is continuous and maps [ 0 , 1 ) [0,1) [ 0 , 1 ) into itself, and L L L is fixed, so composing L L L windows gives ρ L + 1 → r L + 1 \rho_{L+1}\to r_{L+1} ρ L + 1 → r L + 1 , and the ratio 1 − ρ L + 1 / L 1-\rho_{L+1}/L 1 − ρ L + 1 / L tends to 1 − r L + 1 / L 1-r_{L+1}/L 1 − r L + 1 / L . Finally, with x a = 1 − r a x_a=1-r_a x a = 1 − r a the recursion reads x a + 1 = 1 − e − x a = x a − x a 2 2 + O ( x a 3 ) x_{a+1}=1-e^{-x_a}=x_a-\frac{x_a^2}{2}+O(x_a^3) x a + 1 = 1 − e − x a = x a − 2 x a 2 + O ( x a 3 ) , whence x a = ( 2 + o ( 1 ) ) / a x_a=(2+o(1))/a x a = ( 2 + o ( 1 )) / a . □ \square □
Estimates for Theorem 2
We bound ln 1 P \ln\frac{1}{P} ln P 1 for the probability P P P in the proof of Theorem 2. In the first product, t / ( n − t + 1 ) ≤ 1 3 t/(n-t+1)\le\frac{1}{3} t / ( n − t + 1 ) ≤ 3 1 and − ln ( 1 − x ) ≤ 3 2 x -\ln(1-x)\le\frac{3}{2}x − ln ( 1 − x ) ≤ 2 3 x give a contribution of at most K ( K + 1 ) / n K(K+1)/n K ( K + 1 ) / n to ln 1 P \ln\frac{1}{P} ln P 1 . For the second, N ! ≤ e N N + 1 / 2 e − N N!\le eN^{N+1/2}e^{-N} N ! ≤ e N N + 1/2 e − N and N ! ≥ ( N / e ) N N!\ge(N/e)^N N ! ≥ ( N / e ) N give
ln ( n − K ) ! ( K + 1 ) ! ( K + 1 ) n − 2 K − 1 ≤ ( n − K ) ln n − K K + 1 − n + 2 K + 2 + 1 2 ln n ≤ n ln n e ( K + 1 ) − K ln n K + 1 + 2 K + 2 + 1 2 ln n . \begin{aligned}
\ln\frac{(n-K)!}{(K+1)!(K+1)^{n-2K-1}}
\le(n-K)\ln\frac{n-K}{K+1}-n+2K+2+\frac{1}{2}\ln n \\
&\le n\ln\frac{n}{e(K+1)}-K\ln\frac{n}{K+1}+2K+2+\frac{1}{2}\ln n.
\end{aligned} ln ( K + 1 )! ( K + 1 ) n − 2 K − 1 ( n − K )! ≤ ( n − K ) ln K + 1 n − K − n + 2 K + 2 + 2 1 ln n ≤ n ln e ( K + 1 ) n − K ln K + 1 n + 2 K + 2 + 2 1 ln n .
Together with the bound log 2 ( 1 / P ) + 2 log 2 n + 1 \log_2(1/P)+2\log_2 n+1 log 2 ( 1/ P ) + 2 log 2 n + 1 on the advice this gives the theorem.
Proofs for Section 4
Lemma 3. Let k k k be even, t t t an integer with 0 ≤ t ≤ k / 4 0\le t\le k/4 0 ≤ t ≤ k /4 , S S S a fixed k k k -subset of [ 2 k ] [2k] [ 2 k ] , and T T T a uniformly random k k k -subset. Then
Pr [ ∣ S ∩ T ∣ = k 2 − t ] ≥ 1 ( k + 1 ) 2 exp ( − 16 t 2 3 k ) . \Pr\left[|S\cap T|=\frac{k}{2}-t\right]\ge\frac{1}{(k+1)^2}\exp\left(-\frac{16t^2}{3k}\right). Pr [ ∣ S ∩ T ∣ = 2 k − t ] ≥ ( k + 1 ) 2 1 exp ( − 3 k 16 t 2 ) .
Proof. With j = k 2 − t j=\frac{k}{2}-t j = 2 k − t , choosing T T T amounts to choosing j j j elements of S S S and k − j k-j k − j elements of its complement, so Pr [ ∣ S ∩ T ∣ = j ] = ( k j ) ( k k − j ) / ( 2 k k ) = ( k j ) 2 / ( 2 k k ) \Pr[|S\cap T|=j]=\binom{k}{j}\binom{k}{k-j}/\binom{2k}{k}=\binom{k}{j}^2/\binom{2k}{k} Pr [ ∣ S ∩ T ∣ = j ] = ( j k ) ( k − j k ) / ( k 2 k ) = ( j k ) 2 / ( k 2 k ) . Let H H H be the binary entropy and p = j / k p=j/k p = j / k . The term ( k j ) p j ( 1 − p ) k − j \binom{k}{j}p^j(1-p)^{k-j} ( j k ) p j ( 1 − p ) k − j is the largest of the k + 1 k+1 k + 1 terms of the binomial distribution with parameters k k k and p p p , so it is at least 1 k + 1 \frac{1}{k+1} k + 1 1 . Since p j ( 1 − p ) k − j = 2 − k H ( p ) p^j(1-p)^{k-j}=2^{-kH(p)} p j ( 1 − p ) k − j = 2 − k H ( p ) , this gives ( k j ) ≥ 2 k H ( j / k ) / ( k + 1 ) \binom{k}{j}\ge2^{kH(j/k)}/(k+1) ( j k ) ≥ 2 k H ( j / k ) / ( k + 1 ) . Together with ( 2 k k ) ≤ 4 k \binom{2k}{k}\le4^k ( k 2 k ) ≤ 4 k we obtain Pr ≥ 2 − 2 k ( 1 − H ( 1 / 2 − x ) ) / ( k + 1 ) 2 \Pr\ge2^{-2k(1-H(1/2-x))}/(k+1)^2 Pr ≥ 2 − 2 k ( 1 − H ( 1/2 − x )) / ( k + 1 ) 2 with x = t / k ≤ 1 / 4 x=t/k\le1/4 x = t / k ≤ 1/4 . From the expansion
1 − H ( 1 2 − x ) = 1 ln 2 ∑ r ≥ 1 ( 2 x ) 2 r 2 r ( 2 r − 1 ) ≤ 1 2 ln 2 4 x 2 1 − 4 x 2 ≤ 8 x 2 3 ln 2 ( x ≤ 1 4 ) 1-H\left(\frac{1}{2}-x\right)=\frac{1}{\ln2}\sum_{r\ge1}\frac{(2x)^{2r}}{2r(2r-1)}
\le\frac{1}{2\ln2}\frac{4x^2}{1-4x^2}
\le\frac{8x^2}{3\ln2}\qquad(x\le\tfrac{1}{4}) 1 − H ( 2 1 − x ) = ln 2 1 r ≥ 1 ∑ 2 r ( 2 r − 1 ) ( 2 x ) 2 r ≤ 2 ln 2 1 1 − 4 x 2 4 x 2 ≤ 3 ln 2 8 x 2 ( x ≤ 4 1 )
we get 2 − 2 k ( 1 − H ( 1 / 2 − x ) ) ≥ exp ( − 16 3 k x 2 ) = exp ( − 16 t 2 3 k ) 2^{-2k(1-H(1/2-x))}\ge\exp(-\frac{16}{3}kx^2)=\exp(-\frac{16t^2}{3k}) 2 − 2 k ( 1 − H ( 1/2 − x )) ≥ exp ( − 3 16 k x 2 ) = exp ( − 3 k 16 t 2 ) . □ \square □
Proof (of Theorem 5). The algorithm. The advice names a reservation set R R R with ∣ R ∣ = k |R|=k ∣ R ∣ = k from a fixed list. In Phase 1 the algorithm gives B B B queries to each advertiser of R R R , which uses all k B kB k B queries and earns k B kB k B . In Phase 2 it accepts every feasible query. The advertisers outside R R R are untouched, so in either variant every target outside R R R earns B B B . Hence, if ∣ S ∩ R ∣ ≤ k 2 − t |S \cap R| \le\frac{k}{2}-t ∣ S ∩ R ∣ ≤ 2 k − t ,
ALG ≥ k B + B ∣ S ∖ R ∣ ≥ k B + ( k 2 + t ) B . \operatorname{ALG} \ge kB+B|S\setminus R| \ge kB+\left(\frac{k}{2}+t\right)B. ALG ≥ k B + B ∣ S ∖ R ∣ ≥ k B + ( 2 k + t ) B .
and since OPT = 2 k B \operatorname{OPT}=2kB OPT = 2 k B the ratio is at least 3 4 + t 2 k = 3 4 + t N \frac{3}{4}+\frac{t}{2k}=\frac{3}{4}+\frac{t}{N} 4 3 + 2 k t = 4 3 + N t .
The list. We say that R R R serves S S S if ∣ S ∩ R ∣ ≤ k 2 − t |S\cap R|\le\frac{k}{2}-t ∣ S ∩ R ∣ ≤ 2 k − t . For a uniformly random k k k -set R R R , Lemma 3 gives
Pr [ R serves S ] ≥ Pr [ ∣ S ∩ R ∣ = k 2 − t ] = ( k k / 2 − t ) 2 / ( 2 k k ) ≥ q : = e − 16 t 2 / ( 3 k ) ( k + 1 ) 2 . \Pr[R\text{ serves }S]\ge\Pr\left[|S\cap R|=\frac{k}{2}-t\right]=\binom{k}{k/2-t}^{2}\bigg/\binom{2k}{k}\ge q:=\frac{e^{-16t^2/(3k)}}{(k+1)^2}. Pr [ R serves S ] ≥ Pr [ ∣ S ∩ R ∣ = 2 k − t ] = ( k /2 − t k ) 2 / ( k 2 k ) ≥ q := ( k + 1 ) 2 e − 16 t 2 / ( 3 k ) .
for every fixed S S S . Lemma 2, applied to the ∣ S ∣ = ( 2 k k ) < 4 k |S|=\binom{2k}{k}<4^k ∣ S ∣ = ( k 2 k ) < 4 k target sets, yields a list of at most ln ( 4 k ) / q + 1 = 2 k ln 2 ( k + 1 ) 2 e 16 t 2 / ( 3 k ) + 1 ≤ M \ln(4^k)/q+1=2k\ln2\,(k+1)^2e^{16t^2/(3k)}+1\le M ln ( 4 k ) / q + 1 = 2 k ln 2 ( k + 1 ) 2 e 16 t 2 / ( 3 k ) + 1 ≤ M sets that serves every S S S , where we used ( k + 1 ) 2 ln 2 ≥ 1 (k+1)^2\ln2\ge1 ( k + 1 ) 2 ln 2 ≥ 1 . The oracle writes the index of a serving set. □ \square □
Proof (of Corollary 4). (i) We take t = ⌈ ϵ N ⌉ t=\lceil\epsilon N\rceil t = ⌈ ϵ N ⌉ in Theorem 5 and check three estimates.
Range and ratio. t ≤ 2 ϵ k + 1 ≤ k 8 + 1 ≤ k 4 t\le2\epsilon k+1\le\frac{k}{8}+1\le\frac{k}{4} t ≤ 2 ϵ k + 1 ≤ 8 k + 1 ≤ 4 k because k ≥ 8 k\ge8 k ≥ 8 , and the ratio is at least 3 4 + t N ≥ 3 4 + ϵ \frac{3}{4}+\frac{t}{N}\ge\frac{3}{4}+\epsilon 4 3 + N t ≥ 4 3 + ϵ .
Exponent. 16 t 2 3 k ≤ 16 3 ( 4 ϵ 2 k + 4 ϵ + 1 k ) ≤ 32 3 ϵ 2 N + 2 \frac{16t^2}{3k}\le\frac{16}{3}(4\epsilon^2k+4\epsilon+\frac{1}{k})\le\frac{32}{3}\epsilon^2N+2 3 k 16 t 2 ≤ 3 16 ( 4 ϵ 2 k + 4 ϵ + k 1 ) ≤ 3 32 ϵ 2 N + 2 , using 4 ϵ ≤ 1 4 4\epsilon\le\frac{1}{4} 4 ϵ ≤ 4 1 and 1 k ≤ 1 8 \frac{1}{k}\le\frac{1}{8} k 1 ≤ 8 1 .
Polynomial factor. ( 2 k + 1 ) ( k + 1 ) 2 ≤ ( N + 2 ) 3 4 (2k+1)(k+1)^2\le\frac{(N+2)^3}{4} ( 2 k + 1 ) ( k + 1 ) 2 ≤ 4 ( N + 2 ) 3 .
With x = ( 2 k + 1 ) ( k + 1 ) 2 ln 2 ⋅ e 16 t 2 / ( 3 k ) ≥ 1 x=(2k+1)(k+1)^2\ln2\cdot e^{16t^2/(3k)}\ge1 x = ( 2 k + 1 ) ( k + 1 ) 2 ln 2 ⋅ e 16 t 2 / ( 3 k ) ≥ 1 , the advice is ⌈ log 2 ⌈ x ⌉ ⌉ ≤ log 2 x + 2 \lceil\log_2\lceil x\rceil\rceil\le\log_2x+2 ⌈ log 2 ⌈ x ⌉⌉ ≤ log 2 x + 2 , and
log 2 x ≤ 3 log 2 ( N + 2 ) − 2 + log 2 ln 2 + ( 32 3 ϵ 2 N + 2 ) log 2 e ≤ 32 3 ln 2 ϵ 2 N + 3 log 2 ( N + 2 ) + 1. \begin{aligned}
\log_2x\le3\log_2(N+2)-2+\log_2\ln2+\left(\frac{32}{3}\epsilon^2N+2\right)\log_2e \\
&\le\frac{32}{3\ln2}\epsilon^2N+3\log_2(N+2)+1.
\end{aligned} log 2 x ≤ 3 log 2 ( N + 2 ) − 2 + log 2 ln 2 + ( 3 32 ϵ 2 N + 2 ) log 2 e ≤ 3 ln 2 32 ϵ 2 N + 3 log 2 ( N + 2 ) + 1.
(ii) If the advice were at most ϵ 2 ln 2 N − log 2 2 ϵ \frac{\epsilon^2}{\ln2}N-\log_2\frac{2}{\epsilon} l n 2 ϵ 2 N − log 2 ϵ 2 bits, then by Theorem 4 some instance would have expected ratio at most 3 4 + 5 8 ϵ < 3 4 + ϵ \frac{3}{4}+\frac{5}{8}\epsilon<\frac{3}{4}+\epsilon 4 3 + 8 5 ϵ < 4 3 + ϵ .
For the last claim, ϵ 2 N ≥ C log N \epsilon^2N\ge C\log N ϵ 2 N ≥ C log N makes both 3 log 2 ( N + 2 ) + 3 3\log_2(N+2)+3 3 log 2 ( N + 2 ) + 3 and log 2 2 ϵ ≤ 1 + 1 2 log 2 N \log_2\frac{2}{\epsilon}\le1+\frac{1}{2}\log_2N log 2 ϵ 2 ≤ 1 + 2 1 log 2 N at most a small constant fraction of ϵ 2 N \epsilon^2N ϵ 2 N . □ \square □
Recall that R R R is a λ \lambda λ -defect covering family for ( N , t ) (N,t) ( N , t ) if for every S ⊆ [ N ] S\subseteq[N] S ⊆ [ N ] with ∣ S ∣ = t |S|=t ∣ S ∣ = t there is R ∈ R R\in\mathcal{R} R ∈ R with
∣ S ∩ R ∣ ≥ max { ∣ R ∣ , t } − λ . (5) |S\cap R|\ge\max\{|R|,t\}-\lambda. \tag*{(5)} ∣ S ∩ R ∣ ≥ max { ∣ R ∣ , t } − λ . (5)
Lemma 4. If R R R satisfies (5) for some S S S with ∣ S ∣ = t |S|=t ∣ S ∣ = t , then ∣ R ∣ ≤ t + λ |R|\le t+\lambda ∣ R ∣ ≤ t + λ .
Proof. ∣ R ∣ − λ ≤ max { ∣ R ∣ , t } − λ ≤ ∣ S ∩ R ∣ ≤ ∣ S ∣ = t |R|-\lambda\le\max\{|R|,t\}-\lambda\le|S\cap R|\le|S|=t ∣ R ∣ − λ ≤ max { ∣ R ∣ , t } − λ ≤ ∣ S ∩ R ∣ ≤ ∣ S ∣ = t . □ \square □
Proof (of Theorem 6). Fix a deterministic algorithm and an advice string σ \sigma σ , and let R σ R_\sigma R σ be the set of advertisers on which it spends nothing during the first phase. Since the first phase is the same in all instances of the family, R σ R_\sigma R σ does not depend on S S S (execution invariance). The first phase earns the total spend, which is at most the capacity B ( N − ∣ R σ ∣ ) B(N-|R_\sigma|) B ( N − ∣ R σ ∣ ) of the advertisers it touches and at most the demand ( N − t ) B (N-t)B ( N − t ) B . In the second phase a query of bid B B B is accepted only by an advertiser whose budget is untouched, that is, by a member of S ∩ R σ S\cap R_\sigma S ∩ R σ . Hence
ALG ≤ B min { N − t , N − ∣ R σ ∣ } + B ∣ S ∩ R σ ∣ , (6) \operatorname{ALG} \le B\min\{N-t,N-|R_\sigma|\}+B|S\cap R_\sigma|, \tag*{(6)} ALG ≤ B min { N − t , N − ∣ R σ ∣ } + B ∣ S ∩ R σ ∣ , (6)
and, since OPT = N B \operatorname{OPT}=NB OPT = N B , the algorithm is ρ \rho ρ -competitive on the instance X ( S ) X(S) X ( S ) only if
min { N − t , N − ∣ R σ ∣ } + ∣ S ∩ R σ ∣ ≥ ρ N . \min\{N-t,N-|R_\sigma|\}+|S\cap R_\sigma|\ge\rho N. min { N − t , N − ∣ R σ ∣ } + ∣ S ∩ R σ ∣ ≥ ρN .
The left-hand side is an integer and ⌈ ρ N ⌉ = N − ⌊ ( 1 − ρ ) N ⌋ = N − λ \lceil\rho N\rceil=N-\lfloor(1-\rho)N\rfloor=N-\lambda ⌈ ρN ⌉ = N − ⌊( 1 − ρ ) N ⌋ = N − λ , so the displayed inequality is equivalent to (5) for R σ R_\sigma R σ . Therefore a ρ \rho ρ -competitive algorithm that reads at most b b b bits yields a λ \lambda λ -defect covering family { R σ : σ ∈ { 0 , 1 } b } \{R_\sigma:\sigma\in\{0,1\}^{b}\} { R σ : σ ∈ { 0 , 1 } b } , whence 2 b ≥ M ( N , t , λ ) 2^b\ge M(N,t,\lambda) 2 b ≥ M ( N , t , λ ) .
Conversely, let R \mathcal{R} R be a λ \lambda λ -defect covering family of size M M M . The oracle writes, in ⌈ log 2 M ⌉ \lceil\log_2 M\rceil ⌈ log 2 M ⌉ bits, the index of some R ∈ R R\in\mathcal{R} R ∈ R that satisfies (5) for the hidden S S S . The algorithm accepts a first-phase query whenever some advertiser outside R R R still has budget, and assigns it there, and it accepts every second-phase query it can. The first phase then earns exactly B min { N − t , N − ∣ R ∣ } B\min\{N-t,N-|R|\} B min { N − t , N − ∣ R ∣ } and the second at least B ∣ S ∩ R ∣ B|S\cap R| B ∣ S ∩ R ∣ , so ALG ≥ B min { N − t , N − ∣ R ∣ } + B ∣ S ∩ R ∣ \operatorname{ALG}\ge B\min\{N-t,N-|R|\}+B|S\cap R| ALG ≥ B min { N − t , N − ∣ R ∣ } + B ∣ S ∩ R ∣ , and by (5) this is at least B ( N − λ ) ≥ ρ N B B(N-\lambda)\ge\rho NB B ( N − λ ) ≥ ρN B . □ \square □
Theorem 9. Let N ≥ t ≥ 1 N\ge t\ge1 N ≥ t ≥ 1 and λ ≥ 0 \lambda\ge0 λ ≥ 0 be integers.
(i) M ( N , t , 0 ) = ( N t ) M(N,t,0)=\binom{N}{t} M ( N , t , 0 ) = ( t N ) , and M ( N , t , λ ) ≤ ( N t ) M(N,t,\lambda)\le\binom{N}{t} M ( N , t , λ ) ≤ ( t N ) for every λ \lambda λ .
(ii) If λ ≤ t / 3 \lambda\le t/3 λ ≤ t /3 then
M ( N , t , λ ) ≥ ( N t ) ( t + λ t − λ ) ( N λ ) . M(N,t,\lambda)\ge\frac{\binom{N}{t}}{\binom{t+\lambda}{t-\lambda}\binom{N}{\lambda}}. M ( N , t , λ ) ≥ ( t − λ t + λ ) ( λ N ) ( t N ) . (iii) If 1 ≤ λ ≤ t / 8 1\le\lambda\le t/8 1 ≤ λ ≤ t /8 , t ≤ N t\le\sqrt{N} t ≤ N and N ≥ 64 N\ge64 N ≥ 64 , then
1 4 t log 2 N t ≤ log 2 M ( N , t , λ ) ≤ t log 2 e N t , \frac{1}{4}t\log_2\frac{N}{t}\le\log_2 M(N,t,\lambda)\le t\log_2\frac{eN}{t}, 4 1 t log 2 t N ≤ log 2 M ( N , t , λ ) ≤ t log 2 t e N , so log 2 M = Θ ( t log N t ) = Θ ( log ( N t ) ) \log_2 M=\Theta\left(t\log\frac{N}{t}\right)=\Theta\left(\log\binom{N}{t}\right) log 2 M = Θ ( t log t N ) = Θ ( log ( t N ) ) .
Proof. (i) The family of all t t t -subsets satisfies (5) with R = S R=S R = S for every λ ≥ 0 \lambda\ge0 λ ≥ 0 . For λ = 0 \lambda=0 λ = 0 , condition (5) forces S ⊆ R S\subseteq R S ⊆ R and ∣ R ∣ ≤ t |R|\le t ∣ R ∣ ≤ t , so a usable R R R equals the unique S S S it serves, and no family smaller than ( N t ) \binom{N}{t} ( t N ) works.
(ii) Fix a usable R R R , and put r = ∣ R ∣ ≤ t + λ r=|R|\le t+\lambda r = ∣ R ∣ ≤ t + λ (Lemma 4) and q = max { r , t } − λ q=\max\{r,t\}-\lambda q = max { r , t } − λ . The sets S S S that R R R serves have ∣ S ∩ R ∣ ≥ q |S\cap R|\ge q ∣ S ∩ R ∣ ≥ q , so each is obtained by choosing q q q of its elements in R R R and the remaining t − q t-q t − q anywhere, which gives at most ( r q ) ( N t − q ) \binom{r}{q}\binom{N}{t-q} ( q r ) ( t − q N ) of them. Now t − q = t − max { r , t } + λ ≤ λ ≤ N / 2 t-q=t-\max\{r,t\}+\lambda\le\lambda\le N/2 t − q = t − max { r , t } + λ ≤ λ ≤ N /2 , so ( N t − q ) ≤ ( N λ ) \binom{N}{t-q}\le\binom{N}{\lambda} ( t − q N ) ≤ ( λ N ) . Also q ≥ t − λ q\ge t-\lambda q ≥ t − λ and r ≤ t + λ r\le t+\lambda r ≤ t + λ , so ( r q ) ≤ ( t + λ q ) \binom{r}{q}\le\binom{t+\lambda}{q} ( q r ) ≤ ( q t + λ ) , and since t ≥ 3 λ t\ge3\lambda t ≥ 3 λ we have t − λ ≥ ( t + λ ) / 2 t-\lambda\ge(t+\lambda)/2 t − λ ≥ ( t + λ ) /2 . Hence q ↦ ( t + λ q ) q\mapsto\binom{t+\lambda}{q} q ↦ ( q t + λ ) is non-increasing on [ t − λ , t + λ ] [t-\lambda,t+\lambda] [ t − λ , t + λ ] and ( r q ) ≤ ( t + λ t − λ ) \binom{r}{q}\le\binom{t+\lambda}{t-\lambda} ( q r ) ≤ ( t − λ t + λ ) . A family must serve all ( N t ) \binom{N}{t} ( t N ) sets S S S , which gives the bound. (iii) The upper bound is (i) together with ( N t ) ≤ ( e N / t ) t \binom{N}{t} \le(eN/t)^t ( t N ) ≤ ( e N / t ) t . For the lower bound we take logarithms in (ii) and use ( N t ) ≥ ( N / t ) t \binom{N}{t} \ge(N/t)^t ( t N ) ≥ ( N / t ) t , ( N λ ) ≤ ( e N / λ ) λ \binom{N}{\lambda} \le(eN/\lambda)^\lambda ( λ N ) ≤ ( e N / λ ) λ and ( t + λ t − λ ) ≤ ( e ( t + λ ) 2 λ ) 2 λ \binom{t+\lambda}{t-\lambda} \le\left(\frac{e(t+\lambda)}{2\lambda}\right)^{2\lambda} ( t − λ t + λ ) ≤ ( 2 λ e ( t + λ ) ) 2 λ , which give
log 2 M ≥ t log 2 N t − λ log 2 e N λ − 2 λ log 2 e ( t + λ ) 2 λ . \log_2 M \ge t\log_2\frac{N}{t}-\lambda\log_2\frac{eN}{\lambda}-2\lambda\log_2\frac{e(t+\lambda)}{2\lambda}. log 2 M ≥ t log 2 t N − λ log 2 λ e N − 2 λ log 2 2 λ e ( t + λ ) .
Since t ≤ N t \le\sqrt{N} t ≤ N we have log 2 N t ≥ 1 2 log 2 N \log_2\frac{N}{t} \ge\frac{1}{2}\log_2 N log 2 t N ≥ 2 1 log 2 N and log 2 t ≤ 1 2 log 2 N ≤ log 2 N t \log_2 t \le\frac{1}{2}\log_2 N \le\log_2\frac{N}{t} log 2 t ≤ 2 1 log 2 N ≤ log 2 t N . Using λ ≤ t / 8 \lambda\le t/8 λ ≤ t /8 , the second term is at most t 8 ( log 2 N + log 2 e ) ≤ 1 4 t log 2 N t + t 5 \frac{t}{8}(\log_2 N+\log_2 e) \le\frac{1}{4}t\log_2\frac{N}{t}+\frac{t}{5} 8 t ( log 2 N + log 2 e ) ≤ 4 1 t log 2 t N + 5 t , and the third is at most t 4 log 2 9 e t 16 λ ≤ t 4 ( log 2 t + 1 ) ≤ 1 4 t log 2 N t + t 4 \frac{t}{4}\log_2\frac{9et}{16\lambda} \le\frac{t}{4}(\log_2 t+1) \le\frac{1}{4}t\log_2\frac{N}{t}+\frac{t}{4} 4 t log 2 16 λ 9 e t ≤ 4 t ( log 2 t + 1 ) ≤ 4 1 t log 2 t N + 4 t . As N / t ≥ N ≥ 8 N/t \ge\sqrt{N} \ge8 N / t ≥ N ≥ 8 we have log 2 N t ≥ 3 \log_2\frac{N}{t} \ge3 log 2 t N ≥ 3 , so t 5 + t 4 ≤ 1 4 t log 2 N t \frac{t}{5}+\frac{t}{4} \le\frac{1}{4}t\log_2\frac{N}{t} 5 t + 4 t ≤ 4 1 t log 2 t N , and the three subtracted terms leave at least 1 4 t log 2 N t \frac{1}{4}t\log_2\frac{N}{t} 4 1 t log 2 t N . □
Proofs for Section 5
The Barrier at 1 − 1 / e 1-1/e 1 − 1/ e
The family. Let B ≥ 1 B \ge1 B ≥ 1 , g ≥ 3 g \ge3 g ≥ 3 and s ≥ 1 s \ge1 s ≥ 1 be integers and n = g s n=gs n = g s . There are s s s blocks, and block r r r has g g g advertisers u r , 1 , … , u r , g u_{r,1},\ldots,u_{r,g} u r , 1 , … , u r , g of budget B B B and a permutation π r ∈ S g \pi_r \in S_g π r ∈ S g . Block r r r consists of g g g phases, and phase t t t is a run of B B B queries, each bidding 1 on every advertiser of N r , t = { u r , π r ( h ) : t ≤ h ≤ g } N_{r,t}=\{u_{r,\pi_r(h)}: t \le h \le g\} N r , t = { u r , π r ( h ) : t ≤ h ≤ g } . Blocks are presented one after the other. Every bid is the fraction 1 / B 1/B 1/ B of a budget, and assigning phase t t t of block r r r to u r , π r ( t ) u_{r,\pi_r(t)} u r , π r ( t ) serves every query, so OPT = g s B =gsB = g s B . The neighborhoods N r , 1 ⊃ N r , 2 ⊃ ⋯ ⊃ N r , g N_{r,1} \supset N_{r,2} \supset\cdots\supset N_{r,g} N r , 1 ⊃ N r , 2 ⊃ ⋯ ⊃ N r , g of the phases of one block form a laminar chain.
Lemma 5. Fix a deterministic algorithm (in particular, an algorithm with a fixed advice string) and fix everything presented before block r r r . If π r \pi_r π r is uniform on S g S_g S g , the expected number of rejected queries of block r r r is at least B ( g / e − 2 ) B(g/e-2) B ( g / e − 2 ) .
Theorem 10. Let B ≥ 1 B \ge1 B ≥ 1 , g ≥ 3 g \ge3 g ≥ 3 , s ≥ 1 s \ge1 s ≥ 1 and n = g s n=gs n = g s . Every deterministic algorithm that reads at most b b b bits of advice has, on some instance of the family above (all bids equal to 1 / B 1/B 1/ B of the budget), competitive ratio at most
1 − 1 e + 2 g + b ln 2 2 s . 1-\frac{1}{e}+\frac{2}{g}+\sqrt{\frac{b\ln2}{2s}}. 1 − e 1 + g 2 + 2 s b ln 2 . Consequently, (i) with b = 0 b=0 b = 0 and g , s → ∞ g,s \to\infty g , s → ∞ , no advice-free deterministic algorithm has ratio above 1 − 1 / e + o ( 1 ) 1-1/e+o(1) 1 − 1/ e + o ( 1 ) on small-bid instances, and (ii) a ratio of at least 1 − 1 e + δ 1-\frac{1}{e}+\delta 1 − e 1 + δ with δ > 2 g \delta> \frac{2}{g} δ > g 2 requires b ≥ 2 ln 2 ( δ − 2 g ) 2 s b \ge\frac{2}{\ln2}\left(\delta-\frac{2}{g}\right)^2s b ≥ l n 2 2 ( δ − g 2 ) 2 s bits. Choosing g = ⌈ 4 / δ ⌉ g=\lceil4/\delta\rceil g = ⌈ 4/ δ ⌉ and s = ⌊ n / g ⌋ s=\lfloor n/g\rfloor s = ⌊ n / g ⌋ , with the remaining n − g s n-gs n − g s advertisers receiving no queries, gives b = Ω ( δ 3 n ) b=\Omega(\delta^3n) b = Ω ( δ 3 n ) .
Proof (of Lemma 5). We drop the index r r r . For phase j j j let x j , u x_{j,u} x j , u be the number of its queries assigned to u u u and ρ j = B − ∑ u x j , u \rho_j=B-\sum_u x_{j,u} ρ j = B − ∑ u x j , u the number rejected. Fix t ∈ { 2 , … , g } t \in\{2,\ldots,g\} t ∈ { 2 , … , g } and let T t = { u π ( t ) , … , u π ( g ) } T_t=\{u_{\pi(t)},\ldots,u_{\pi(g)}\} T t = { u π ( t ) , … , u π ( g ) } , of total capacity ( g − t + 1 ) B (g-t+1)B ( g − t + 1 ) B . Phases j ≥ t j \ge t j ≥ t have neighborhoods inside T t T_t T t , and the mass w t = ∑ j < t ∑ u ∈ T t x j , u w_t = \sum_{j<t}\sum_{u\in T_t} x_{j,u} w t = ∑ j < t ∑ u ∈ T t x j , u placed on T t T_t T t by earlier phases is already spent. The ( g − t + 1 ) B (g-t+1)B ( g − t + 1 ) B queries of phases j ≥ t j \ge t j ≥ t can therefore be served only up to ( g − t + 1 ) B − w t (g-t+1)B-w_t ( g − t + 1 ) B − w t , so at least w t w_t w t of them are rejected, and the number of rejected queries of the block is at least ∑ j < t ρ j + w t \sum_{j<t}\rho_j+w_t ∑ j < t ρ j + w t .
At phase j j j the algorithm has seen only π ( 1 ) , … , π ( j − 1 ) \pi(1),\ldots,\pi(j-1) π ( 1 ) , … , π ( j − 1 ) (through the removed advertisers) and the earlier blocks, so x j , ⋅ x_{j,\cdot} x j , ⋅ is determined by this history, while the advertisers of N j N_j N j occupy the positions j , … , g j,\ldots,g j , … , g in a uniformly random order. Hence E [ ∑ u ∈ T t x j , u ∣ history ] = ( B − ρ j ) g − t + 1 g − j + 1 \mathbb{E}[\sum_{u\in T_t}x_{j,u}\mid\text{history}] = (B-\rho_j)\frac{g-t+1}{g-j+1} E [ ∑ u ∈ T t x j , u ∣ history ] = ( B − ρ j ) g − j + 1 g − t + 1 , and since ρ j + ( B − ρ j ) q ≥ B q \rho_j+(B-\rho_j)q \ge Bq ρ j + ( B − ρ j ) q ≥ B q for q ∈ [ 0 , 1 ] q\in[0,1] q ∈ [ 0 , 1 ] ,
E [ ∑ j < t ρ j + w t ] ≥ B ( g − t + 1 ) ∑ j < t 1 g − j + 1 = B k ( H g − H k ) , k = g − t + 1. \mathbb{E}\left[\sum_{j<t}\rho_j+w_t\right]\ge B(g-t+1)\sum_{j<t}\frac{1}{g-j+1}=Bk(H_g-H_k),\qquad k=g-t+1. E [ j < t ∑ ρ j + w t ] ≥ B ( g − t + 1 ) j < t ∑ g − j + 1 1 = B k ( H g − H k ) , k = g − t + 1.
We take k = ⌊ g / e ⌋ k=\lfloor g/e\rfloor k = ⌊ g / e ⌋ , so that 1 ≤ k < g 1\le k<g 1 ≤ k < g for g ≥ 3 g\ge3 g ≥ 3 . Using H g − H k ≥ ln g + 1 k + 1 ≥ ln g + 1 g / e + 1 ≥ 1 − e g + 1 H_g-H_k\ge\ln\frac{g+1}{k+1}\ge\ln\frac{g+1}{g/e+1}\ge1-\frac{e}{g+1} H g − H k ≥ ln k + 1 g + 1 ≥ ln g / e + 1 g + 1 ≥ 1 − g + 1 e and k ≥ g / e − 1 k\ge g/e-1 k ≥ g / e − 1 , we get k ( H g − H k ) ≥ ( g / e − 1 ) ( 1 − e g + 1 ) k(H_g-H_k)\ge(g/e-1)(1-\frac{e}{g+1}) k ( H g − H k ) ≥ ( g / e − 1 ) ( 1 − g + 1 e ) .
Proof (of Theorem 10). For a string σ ∈ { 0 , 1 } b \sigma\in\{0,1\}^b σ ∈ { 0 , 1 } b let A σ A_\sigma A σ be the advice-free algorithm that reads the tape σ 0 ∞ \sigma0^\infty σ 0 ∞ . An algorithm that reads at most b b b bits behaves on every instance exactly as A σ A_\sigma A σ for the first b b b bits σ \sigma σ of its tape. Let π = ( π 1 , … , π s ) \pi=(\pi_1,\ldots,\pi_s) π = ( π 1 , … , π s ) be uniform and let Y r σ Y_r^\sigma Y r σ be the number of rejected queries of block r r r under A σ A_\sigma A σ , so Y r σ ∈ [ 0 , g B ] Y_r^\sigma\in[0,gB] Y r σ ∈ [ 0 , g B ] and L σ ( π ) = ∑ r Y r σ L_\sigma(\pi)=\sum_rY_r^\sigma L σ ( π ) = ∑ r Y r σ is the total loss. By Lemma 5, E [ Y r σ ∣ π 1 , … , π r − 1 ] ≥ B ( g / e − 2 ) \mathbb{E}[Y_r^\sigma\mid\pi_1,\ldots,\pi_{r-1}]\ge B(g/e-2) E [ Y r σ ∣ π 1 , … , π r − 1 ] ≥ B ( g / e − 2 ) , because π r \pi_r π r is independent of the earlier blocks. Hence ∑ r ( Y r σ − E [ Y r σ ∣ π < r ] ) \sum_r(Y_r^\sigma-\mathbb{E}[Y_r^\sigma\mid\pi_{<r}]) ∑ r ( Y r σ − E [ Y r σ ∣ π < r ]) is a martingale whose increments lie in intervals of length g B gB g B , and the Azuma–Hoeffding inequality gives, for every λ > 0 \lambda>0 λ > 0 ,
Pr [ L σ ( π ) ≤ s B ( g / e − 2 ) − λ ] ≤ exp ( − 2 λ 2 s g 2 B 2 ) . \Pr\left[L_\sigma(\pi)\le sB(g/e-2)-\lambda\right]\le\exp\left(-\frac{2\lambda^2}{sg^2B^2}\right). Pr [ L σ ( π ) ≤ s B ( g / e − 2 ) − λ ] ≤ exp ( − s g 2 B 2 2 λ 2 ) .
Suppose the algorithm has loss at most ℓ \ell ℓ on every instance. Then for every π \pi π some σ \sigma σ has L σ ( π ) ≤ ℓ L_\sigma(\pi)\le\ell L σ ( π ) ≤ ℓ . If ℓ < s B ( g / e − 2 ) − λ \ell<sB(g/e-2)-\lambda ℓ < s B ( g / e − 2 ) − λ , a union bound over the 2 b 2^b 2 b strings gives 1 ≤ 2 b exp ( − 2 λ 2 / ( s g 2 B 2 ) ) 1\le2^b\exp(-2\lambda^2/(sg^2B^2)) 1 ≤ 2 b exp ( − 2 λ 2 / ( s g 2 B 2 )) , which fails as soon as λ > g B s b ln 2 / 2 \lambda>gB\sqrt{sb\ln2/2} λ > g B s b ln 2/2 . Hence ℓ ≥ s B ( g / e − 2 ) − g B s b ln 2 / 2 \ell\ge sB(g/e-2)-gB\sqrt{sb\ln2/2} ℓ ≥ s B ( g / e − 2 ) − g B s b ln 2/2 , and dividing by O P T = g s B \mathrm{OPT}=gsB OPT = g s B gives the stated bound on the ratio. For (ii) we solve b ln 2 / ( 2 s ) ≥ δ − 2 / g \sqrt{b\ln2/(2s)}\ge\delta-2/g b ln 2/ ( 2 s ) ≥ δ − 2/ g , which is possible because δ − 2 / g > 0 \delta-2/g>0 δ − 2/ g > 0 . With g = ⌈ 4 / δ ⌉ g=\lceil4/\delta\rceil g = ⌈ 4/ δ ⌉ we have δ − 2 / g ≥ δ / 2 \delta-2/g\ge\delta/2 δ − 2/ g ≥ δ /2 and s ≥ n δ / 5 − 1 s\ge n\delta/5-1 s ≥ n δ /5 − 1 .
Large Bids
Conventions. An edge ( i , j ) (i,j) ( i , j ) is usable if b i j ≤ B i b_{ij}\le B_i b ij ≤ B i , and edges with b i j > B i b_{ij}>B_i b ij > B i can never be served and are deleted. A usable edge is big if B i / 2 < b i j ≤ B i B_i/2<b_{ij}\le B_i B i /2 < b ij ≤ B i and small if b i j ≤ B i / 2 b_{ij}\le B_i/2 b ij ≤ B i /2 . Let I S I_S I S (I B I_B I B ) be the instance restricted to small (big) edges, with optimum O P T S \mathrm{OPT}_S OPT S (O P T B \mathrm{OPT}_B OPT B ). The restriction of an optimal allocation of I I I to small (big) edges is feasible for I S I_S I S (I B I_B I B ), so
O P T ( I ) ≤ O P T S + O P T B . (7) \mathrm{OPT}(I)\le\mathrm{OPT}_S+\mathrm{OPT}_B. \tag*{(7)} OPT ( I ) ≤ OPT S + OPT B . (7)
We write ρ i \rho_i ρ i for the remaining budget of advertiser i i i .
Proposition 2 (Known for one advertiser [4 ] ). Let A A A be a deterministic online algorithm that uses no advice, and let ρ ∈ ( 0 , 1 ] \rho\in(0,1] ρ ∈ ( 0 , 1 ] . There is an instance with one advertiser and at most two queries on which A L G < ρ ⋅ O P T \mathrm{ALG} < \rho\cdot\mathrm{OPT} ALG < ρ ⋅ OPT .
Proof. Let B = 1 B=1 B = 1 and δ = ρ / 2 \delta=\rho/2 δ = ρ /2 , and present a probe with bid δ \delta δ . If A A A accepts it, we present a second query (the commitment) with bid 1 1 1 . It is infeasible because δ + 1 > 1 \delta+1>1 δ + 1 > 1 , so A L G = ρ / 2 < ρ = ρ ⋅ O P T \mathrm{ALG}=\rho/2<\rho=\rho\cdot\mathrm{OPT} ALG = ρ /2 < ρ = ρ ⋅ OPT , as O P T = 1 \mathrm{OPT}=1 OPT = 1 . If A A A rejects the probe, we stop, and then A L G = 0 < ρ δ = ρ ⋅ O P T \mathrm{ALG}=0<\rho\delta=\rho\cdot\mathrm{OPT} ALG = 0 < ρ δ = ρ ⋅ OPT .
Lemma 6. Let G S G_S G S (resp. G B G_B G B ) be the advice-free algorithm that, on each query j j j , considers only advertisers i i i for which ( i , j ) (i,j) ( i , j ) is a small (resp. big) usable edge with b i j ≤ ρ i b_{ij}\leq\rho_i b ij ≤ ρ i , assigns j j j to one of them with the largest bid (ties broken deterministically), and rejects j j j if there is none. Then A L G ( G S ) ≥ O P T S / 3 \mathrm{ALG}(G_S)\geq\mathrm{OPT}_S/3 ALG ( G S ) ≥ OPT S /3 and A L G ( G B ) ≥ O P T B / 3 \mathrm{ALG}(G_B)\geq\mathrm{OPT}_B/3 ALG ( G B ) ≥ OPT B /3 .
Proof. We run G S G_S G S and let S i S_i S i be the final revenue from advertiser i i i and r j r_j r j the revenue collected on query j j j , so A L G = ∑ i S i = ∑ j r j \mathrm{ALG}=\sum_i S_i=\sum_j r_j ALG = ∑ i S i = ∑ j r j . We call i i i full if S i > B i / 2 S_i>B_i/2 S i > B i /2 . If i i i is not full, then at every moment ρ i ≥ B i − S i ≥ B i / 2 ≥ b i j \rho_i\geq B_i-S_i\geq B_i/2\geq b_{ij} ρ i ≥ B i − S i ≥ B i /2 ≥ b ij for each small edge ( i , j ) (i,j) ( i , j ) , so i i i is available for every query it has a small edge to. Let M M M be an optimal allocation of I S I_S I S . For ( i , j ) ∈ M (i,j)\in M ( i , j ) ∈ M with i i i not full, G S G_S G S chose for j j j an advertiser with bid at least b i j b_{ij} b ij , so b i j ≤ r j b_{ij}\leq r_j b ij ≤ r j . Since M M M uses each query at most once, these edges contribute at most ∑ j r j = A L G \sum_j r_j=\mathrm{ALG} ∑ j r j = ALG . For full i i i the revenue of M M M at i i i is at most B i < 2 S i B_i<2S_i B i < 2 S i , so full advertisers contribute at most 2 A L G 2\mathrm{ALG} 2 ALG . Hence O P T S ≤ 3 A L G \mathrm{OPT}_S\leq3\mathrm{ALG} OPT S ≤ 3 ALG .
Two big bids of one advertiser exceed its budget, so in G B G_B G B and in every allocation of I B I_B I B each advertiser serves at most one query. Let M M M be an optimal allocation of I B I_B I B and ( i , j ) ∈ M (i,j)\in M ( i , j ) ∈ M . If i i i is unmatched at the end of G B G_B G B , it was available when j j j arrived, so b i j ≤ r j b_{ij}\leq r_j b ij ≤ r j . If i i i is matched with a bid b i ′ b'_i b i ′ , then b i ′ > B i / 2 ≥ b i j / 2 b'_i>B_i/2\geq b_{ij}/2 b i ′ > B i /2 ≥ b ij /2 . The edges of the first kind involve distinct queries and contribute at most A L G \mathrm{ALG} ALG , and those of the second kind involve distinct advertisers and contribute less than 2 ∑ i b i ′ ≤ 2 A L G 2\sum_i b'_i\leq2\mathrm{ALG} 2 ∑ i b i ′ ≤ 2 ALG . Hence O P T B ≤ 3 A L G \mathrm{OPT}_B\leq3\mathrm{ALG} OPT B ≤ 3 ALG .
Theorem 11 (Part (b) known for online knapsack [4 ] ). (a) There is a deterministic online algorithm that uses one bit of advice and is 1 / 6 1/6 1/6 -competitive on every OAW-HB instance, independently of n n n , m m m and the bid sizes. (b) For n = 1 n=1 n = 1 one bit gives ratio 1 / 2 1/2 1/2 . (c) If every query has degree one, n n n bits (one per advertiser) give ratio 1 / 2 1/2 1/2 .
Proof. (a) The oracle computes O P T S \mathrm{OPT}_S OPT S and O P T B \mathrm{OPT}_B OPT B and writes bit 0 if O P T S ≥ O P T B \mathrm{OPT}_S\geq\mathrm{OPT}_B OPT S ≥ OPT B and bit 1 otherwise. The algorithm runs G S G_S G S on bit 0 and G B G_B G B on bit 1. By Lemma 6 and (7) , A L G ≥ max { O P T S , O P T B } / 3 ≥ ( O P T S + O P T B ) / 6 ≥ O P T / 6 \mathrm{ALG}\geq\max\{\mathrm{OPT}_S,\mathrm{OPT}_B\}/3\geq(\mathrm{OPT}_S+\mathrm{OPT}_B)/6\geq\mathrm{OPT}/6 ALG ≥ max { OPT S , OPT B } /3 ≥ ( OPT S + OPT B ) /6 ≥ OPT /6 .
(b) Let the bit be 1 if and only if the instance contains a big usable item. On bit 1 the algorithm accepts the first big item and rejects everything else, so A L G ≥ B / 2 ≥ O P T / 2 \mathrm{ALG}\geq B/2\geq\mathrm{OPT}/2 ALG ≥ B /2 ≥ OPT /2 . On bit 0 all usable items have size at most B / 2 B/2 B /2 , and the algorithm accepts each item that fits. If the final spend S S S satisfies S > B / 2 S>B/2 S > B /2 , then A L G > B / 2 ≥ O P T / 2 \mathrm{ALG}>B/2\geq\mathrm{OPT}/2 ALG > B /2 ≥ OPT /2 . Otherwise S ≤ B / 2 S\leq B/2 S ≤ B /2 , so at every moment the remaining
budget is at least B / 2 B/2 B /2 and every item fit when it arrived. Hence all usable items were accepted and A L G ≥ O P T \mathrm{ALG} \ge\mathrm{OPT} ALG ≥ OPT .
(c) With degree-one queries the instance splits into n n n independent single-advertiser instances, and each advertiser gets its own bit as in (b). Then A L G i ≥ O P T i / 2 \mathrm{ALG}_i \ge\mathrm{OPT}_i/2 ALG i ≥ OPT i /2 for every i i i . □ \square □
Theorem 12. Let ρ ∈ ( 1 / 2 , 1 ) \rho\in(1/2,1) ρ ∈ ( 1/2 , 1 ) , θ = 2 ρ − 1 3 − 2 ρ ∈ ( 0 , 1 ) \theta= \frac{2\rho-1}{3-2\rho} \in(0,1) θ = 3 − 2 ρ 2 ρ − 1 ∈ ( 0 , 1 ) , and let n ≥ 1 n \ge1 n ≥ 1 and k ≥ 2 k \ge2 k ≥ 2 be integers. There is a family F n , k \mathcal{F}_{n,k} F n , k of OAW-HB instances with n n n advertisers of equal budgets, m = n ( k + 1 ) m = n(k+1) m = n ( k + 1 ) queries, and all queries of degree one, such that every deterministic algorithm that is ρ \rho ρ -competitive on F n , k \mathcal{F}_{n,k} F n , k uses in the worst case at least
c log 2 k − log 2 ( n c ) ≥ θ n log 2 k − n bits , c = ⌈ θ n ⌉ . c\log_2 k-\log_2\binom{n}{c}\ge\theta n\log_2 k-n \qquad\text{bits}, \qquad c=\lceil\theta n\rceil. c log 2 k − log 2 ( c n ) ≥ θ n log 2 k − n bits , c = ⌈ θ n ⌉ . For n = 1 n=1 n = 1 the bound is ⌈ log 2 k ⌉ = ⌈ log 2 ( m − 1 ) ⌉ \lceil\log_2 k\rceil=\lceil\log_2(m-1)\rceil ⌈ log 2 k ⌉ = ⌈ log 2 ( m − 1 )⌉ bits. If ρ = 1 − ϵ \rho=1-\epsilon ρ = 1 − ϵ with ϵ ≤ 1 / 8 \epsilon\le1/8 ϵ ≤ 1/8 , then θ ≥ 1 − 4 ϵ \theta\ge1-4\epsilon θ ≥ 1 − 4 ϵ and the bound is at least ( 1 − 4 ϵ ) n log 2 k − n H 2 ( 4 ϵ ) (1-4\epsilon)n\log_2 k-nH_2(4\epsilon) ( 1 − 4 ϵ ) n log 2 k − n H 2 ( 4 ϵ ) .
Proof. We normalize all budgets to 1 1 1 . Let w = ρ / 2 + 1 / 4 w=\rho/2+1/4 w = ρ /2 + 1/4 , so 1 / 2 < w < ρ 1/2<w<\rho 1/2 < w < ρ , ρ − w = ( 2 ρ − 1 ) / 4 \rho-w=(2\rho-1)/4 ρ − w = ( 2 ρ − 1 ) /4 and 1 − w = ( 3 − 2 ρ ) / 4 1-w=(3-2\rho)/4 1 − w = ( 3 − 2 ρ ) /4 . For i = 1 , … , k i=1,\ldots,k i = 1 , … , k let
s i = 1 2 + ( w − 1 2 ) k + 1 − i k + 1 , s_i=\frac{1}{2}+\left(w-\frac{1}{2}\right)\frac{k+1-i}{k+1}, s i = 2 1 + ( w − 2 1 ) k + 1 k + 1 − i ,
so that 1 2 < s k < ⋯ < s 1 < w \frac{1}{2}<s_k<\cdots<s_1<w 2 1 < s k < ⋯ < s 1 < w .
For t ∈ [ k ] t\in[k] t ∈ [ k ] let J t J_t J t be the following sequence of queries for a single advertiser of budget 1 1 1 . It consists of the prefix s 1 , … , s t s_1,\ldots,s_t s 1 , … , s t (as bids), then the follow-up f t = 1 − s t f_t=1-s_t f t = 1 − s t , and then k − t k-t k − t queries with bid 0 0 0 . The gadget has three properties. (a) Any two prefix bids sum to more than 1 1 1 , so at most one prefix item is accepted. (b) O P T ( J t ) = 1 = s t + f t \mathrm{OPT}(J_t)=1=s_t+f_t OPT ( J t ) = 1 = s t + f t . (c) If an algorithm accepts a prefix item s j s_j s j with j < t j<t j < t , its remaining budget is 1 − s j < 1 − s t = f t 1-s_j<1-s_t=f_t 1 − s j < 1 − s t = f t (as s j > s t s_j>s_t s j > s t ), so f t f_t f t cannot be accepted and the revenue is s j < w s_j<w s j < w . If it accepts no prefix item, the revenue is at most f t < 1 / 2 < w f_t<1/2<w f t < 1/2 < w . Only if it accepts the last prefix item s t s_t s t can the revenue exceed w w w , and it is at most 1 1 1 .
For t = ( t 1 , … , t n ) ∈ [ k ] n \mathbf{t}=(t_1,\ldots,t_n)\in[k]^n t = ( t 1 , … , t n ) ∈ [ k ] n let I t I_{\mathbf{t}} I t present the gadgets J t 1 , … , J t n J_{t_1},\ldots,J_{t_n} J t 1 , … , J t n one after the other, gadget i i i for advertiser i i i with all its queries of degree one. All I t I_{\mathbf{t}} I t have m = n ( k + 1 ) m=n(k+1) m = n ( k + 1 ) queries and O P T = n \mathrm{OPT}=n OPT = n . We call block i i i of I t I_{\mathbf{t}} I t a hit if the algorithm accepts the last prefix item of block i i i .
If h h h blocks are hits then by (c) A L G ≤ h + ( n − h ) w \mathrm{ALG}\le h+(n-h)w ALG ≤ h + ( n − h ) w , with strict inequality if h < n h<n h < n . If A \mathcal{A} A is ρ \rho ρ -competitive, then ρ n ≤ A L G \rho n\le\mathrm{ALG} ρ n ≤ ALG , hence h ( 1 − w ) ≥ n ( ρ − w ) h(1-w)\ge n(\rho-w) h ( 1 − w ) ≥ n ( ρ − w ) and h ≥ ρ − w 1 − w n = θ n h\ge\frac{\rho-w}{1-w}n=\theta n h ≥ 1 − w ρ − w n = θ n , i.e., h ≥ c h\ge c h ≥ c .
Let b b b be the maximum number of advice bits read by A \mathcal{A} A on the family and σ ( t ) ∈ { 0 , 1 } b \sigma(\mathbf{t})\in\{0,1\}^b σ ( t ) ∈ { 0 , 1 } b the first b b b bits of the tape used on I t I_{\mathbf{t}} I t . We fix σ ∈ { 0 , 1 } b \sigma\in\{0,1\}^b σ ∈ { 0 , 1 } b and consider only those t \mathbf{t} t with σ ( t ) = σ \sigma(\mathbf{t})=\sigma σ ( t ) = σ . On these instances A \mathcal{A} A behaves as with tape σ 0 ∞ \sigma0^\infty σ 0 ∞ . We fix t 1 , … , t i − 1 t_1,\ldots,t_{i-1} t 1 , … , t i − 1 . By execution invariance the decisions of A \mathcal{A} A on the prefix items of block i i i do not depend on t i t_i t i , so the index a i ∈ [ k ] ∪ { ⊥ } a_i\in[k]\cup\{\bot\} a i ∈ [ k ] ∪ { ⊥ } of the first prefix item accepted in block i i i is determined by σ \sigma σ and t 1 , … , t i − 1 t_1,\ldots,t_{i-1} t 1 , … , t i − 1 alone. Since at most one prefix item is accepted, block i i i is a hit if and only if t i = a i t_i=a_i t i = a i . Consequently, for a fixed set R ⊆ [ n ] R\subseteq[n] R ⊆ [ n ] of size c c c , at most k n − c k^{n-c} k n − c vectors t \mathbf{t} t with σ ( t ) = σ \sigma(\mathbf{t})=\sigma σ ( t ) = σ have all blocks in R R R as hits, because the coordinates in R R R are determined one after the other and the others are free. Every ρ \rho ρ -competitive instance has at least c c c hits, so at most ( n c ) k n − c \binom{n}{c}k^{n-c} ( c n ) k n − c instances are served by σ \sigma σ . All k n k^n k n instances must be served, hence k n ≤ 2 b ( n c ) k n − c k^n \le2^b\binom{n}{c}k^{n-c} k n ≤ 2 b ( c n ) k n − c , i.e., b ≥ c log 2 k − log 2 ( n c ) b \ge c\log_2 k-\log_2\binom{n}{c} b ≥ c log 2 k − log 2 ( c n ) . Finally ( n c ) ≤ 2 n \binom{n}{c} \le2^n ( c n ) ≤ 2 n and c ≥ θ n c \ge\theta n c ≥ θ n . For n = 1 n=1 n = 1 we have c = 1 c=1 c = 1 and ( 1 1 ) = 1 \binom{1}{1}=1 ( 1 1 ) = 1 , so 2 b ≥ k 2^b \ge k 2 b ≥ k . If ρ = 1 − ϵ \rho=1-\epsilon ρ = 1 − ϵ with ϵ ≤ 1 / 8 \epsilon\le1/8 ϵ ≤ 1/8 , then θ = 1 − 2 ϵ 1 + 2 ϵ ≥ 1 − 4 ϵ \theta=\frac{1-2\epsilon}{1+2\epsilon}\ge1-4\epsilon θ = 1 + 2 ϵ 1 − 2 ϵ ≥ 1 − 4 ϵ , so c ≥ ( 1 − 4 ϵ ) n c\ge(1-4\epsilon)n c ≥ ( 1 − 4 ϵ ) n and n − c ≤ 4 ϵ n ≤ n / 2 n-c\le4\epsilon n\le n/2 n − c ≤ 4 ϵ n ≤ n /2 . Hence ( n c ) = ( n n − c ) ≤ 2 n H 2 ( 4 ϵ ) \binom{n}{c}=\binom{n}{n-c}\le2^{nH_2(4\epsilon)} ( c n ) = ( n − c n ) ≤ 2 n H 2 ( 4 ϵ ) , which gives the stated refinement. □ \square □
Theorem 13. Let ϵ ∈ ( 0 , 1 / 2 ] \epsilon\in(0,1/2] ϵ ∈ ( 0 , 1/2 ] and let m m m be known. For OAW-HB instances in which every query has degree one there is a deterministic online algorithm that is ( 1 − 2 ϵ ) (1-2\epsilon) ( 1 − 2 ϵ ) -competitive and uses at most
n [ ( ⌈ 1 / ϵ ⌉ − 1 ) ⌈ log 2 m ⌉ + 2 ⌈ log 2 ( ⌈ 1 / ϵ ⌉ + 1 ) ⌉ ] = O ( n ϵ log m ) n\left[(\lceil1/\epsilon\rceil-1)\lceil\log_2 m\rceil+2\lceil\log_2(\lceil1/\epsilon\rceil+1)\rceil\right]=O\left(\frac{n}{\epsilon}\log m\right) n [ (⌈ 1/ ϵ ⌉ − 1 ) ⌈ log 2 m ⌉ + 2 ⌈ log 2 (⌈ 1/ ϵ ⌉ + 1 )⌉ ] = O ( ϵ n log m ) bits of advice.
Proof. With degree-one queries the instance decomposes into n n n independent single-advertiser instances, and OPT = ∑ i OPT i \operatorname{OPT}=\sum_i\operatorname{OPT}_i OPT = ∑ i OPT i , where OPT i ≤ B i \operatorname{OPT}_i\le B_i OPT i ≤ B i is the largest subset sum of the usable bids of i i i not exceeding B i B_i B i . We fix i i i and an optimal subset O i O_i O i . Let L i = { j ∈ O i : b i j > ϵ B i } L_i=\{j\in O_i:b_{ij}>\epsilon B_i\} L i = { j ∈ O i : b ij > ϵ B i } , so that ∣ L i ∣ < 1 / ϵ \lvert L_i\rvert<1/\epsilon ∣ L i ∣ < 1/ ϵ , let w i = ∑ j ∈ L i b i j w_i=\sum_{j\in L_i}b_{ij} w i = ∑ j ∈ L i b ij , w ^ i = ⌈ w i / ( ϵ B i ) ⌉ ∈ { 0 , … , ⌈ 1 / ϵ ⌉ } \widehat{w}_i=\lceil w_i/(\epsilon B_i)\rceil\in\{0,\ldots,\lceil1/\epsilon\rceil\} w i = ⌈ w i / ( ϵ B i )⌉ ∈ { 0 , … , ⌈ 1/ ϵ ⌉} and w ‾ i = w ^ i ϵ B i ∈ [ w i , w i + ϵ B i ) \overline{w}_i=\widehat{w}_i\epsilon B_i\in[w_i,w_i+\epsilon B_i) w i = w i ϵ B i ∈ [ w i , w i + ϵ B i ) . The advice for i i i consists of ∣ L i ∣ \lvert L_i\rvert ∣ L i ∣ , the indices of the queries in L i L_i L i , and w ^ i \widehat{w}_i w i .
Algorithm for i i i . The algorithm maintains the small spend σ i \sigma_i σ i , initially 0. On a query j j j of i i i it accepts if j ∈ L i j\in L_i j ∈ L i . Otherwise, if b i j ≤ ϵ B i b_{ij}\le\epsilon B_i b ij ≤ ϵ B i and σ i + b i j ≤ B i − w ‾ i \sigma_i+b_{ij}\le B_i-\overline{w}_i σ i + b ij ≤ B i − w i , it accepts and sets σ i ← σ i + b i j \sigma_i\leftarrow\sigma_i+b_{ij} σ i ← σ i + b ij , and else it rejects.
At any time the spend on i i i is at most w i + σ i w_i+\sigma_i w i + σ i , and σ i ≤ max { 0 , B i − w ‾ i } \sigma_i\le\max\{0,B_i-\overline{w}_i\} σ i ≤ max { 0 , B i − w i } . As w ‾ i ≥ w i \overline{w}_i\ge w_i w i ≥ w i , the spend never exceeds B i B_i B i , and every query in L i L_i L i fits when it arrives. We have ALG i = w i + σ i f i n \operatorname{ALG}_i=w_i+\sigma_i^{\mathrm{fin}} ALG i = w i + σ i fin . If no query with b i j ≤ ϵ B i b_{ij}\le\epsilon B_i b ij ≤ ϵ B i and j ∉ L i j\notin L_i j ∈ / L i was rejected, then all of O i ∖ L i O_i\setminus L_i O i ∖ L i was accepted and ALG i ≥ OPT i \operatorname{ALG}_i\ge\operatorname{OPT}_i ALG i ≥ OPT i . Otherwise some such query j 0 j_0 j 0 was rejected because σ i + b i j 0 > B i − w ‾ i \sigma_i+b_{ij_0}>B_i-\overline{w}_i σ i + b i j 0 > B i − w i , whence σ i f i n > B i − w ‾ i − ϵ B i > B i − w i − 2 ϵ B i \sigma_i^{\mathrm{fin}}>B_i-\overline{w}_i-\epsilon B_i>B_i-w_i-2\epsilon B_i σ i fin > B i − w i − ϵ B i > B i − w i − 2 ϵ B i and ALG i > ( 1 − 2 ϵ ) B i ≥ ( 1 − 2 ϵ ) OPT i \operatorname{ALG}_i>(1-2\epsilon)B_i\ge(1-2\epsilon)\operatorname{OPT}_i ALG i > ( 1 − 2 ϵ ) B i ≥ ( 1 − 2 ϵ ) OPT i . Summing over i i i proves the ratio. □ \square □
Theorem 14. Let s , Δ , k ≥ 1 s,\Delta,k\ge1 s , Δ , k ≥ 1 . There is a family of OAW-HB instances with n = s Δ n=s\Delta n = s Δ advertisers of budget 2 k + 1 2^{k+1} 2 k + 1 , with s ( k + Δ ) s(k+\Delta) s ( k + Δ ) queries of degree at most Δ \Delta Δ and integer bids, on which every optimal deterministic algorithm reads at least s k log 2 ( Δ + 1 ) sk\log_2(\Delta+1) s k log 2 ( Δ + 1 ) bits of advice on some instance. Conversely, on every instance with m m m queries of degree at most Δ \Delta Δ , ⌈ m log 2 ( Δ + 1 ) ⌉ \lceil m\log_2(\Delta+1)\rceil ⌈ m log 2 ( Δ + 1 )⌉ bits suffice for optimality.
Proof. The oracle fixes an optimal solution and writes, for every query, the position of its advertiser among the at most Δ \Delta Δ eligible ones, or a rejection. These m m m symbols form one number in base Δ + 1 \Delta+1 Δ + 1 .
The advertisers form s s s blocks of size Δ \Delta Δ , and B = 2 k + 1 B=2^{k+1} B = 2 k + 1 . In the first phase every block receives queries j = 1 , … , k j=1,\ldots,k j = 1 , … , k , where query j j j bids 2 j − 1 2^{j-1} 2 j − 1 on each advertiser of the block. The first phase is the same in all instances. An instance is given by maps f r : [ k ] → [ Δ ] ∪ { ⊥ } f_r:[k]\to[\Delta]\cup\{\perp\} f r : [ k ] → [ Δ ] ∪ { ⊥ } , one for each block r r r . Let s r , i = ∑ j : f r ( j ) = i 2 j − 1 s_{r,i}=\sum_{j:f_r(j)=i}2^{j-1} s r , i = ∑ j : f r ( j ) = i 2 j − 1 . In the second phase advertiser i i i of block r r r receives one private query of bid B − s r , i B-s_{r,i} B − s r , i .
The optimum is unique in the first phase. Assigning the first phase by the maps f r f_r f r , with ⊥ \bot ⊥ meaning rejection, fills every advertiser exactly, so O P T = n B \mathrm{OPT}=nB OPT = n B , and a solution is optimal only if every advertiser ends exactly full. Fix an optimal solution and advertiser i i i of block r r r , and let ℓ \ell ℓ be its load after the first phase. The first phase of a block has total bid 2 k − 1 < B 2^k-1<B 2 k − 1 < B , so the advertiser must accept its private query. This needs ℓ ≤ s r , i \ell\le s_{r,i} ℓ ≤ s r , i , and fullness then gives ℓ = s r , i \ell=s_{r,i} ℓ = s r , i . Since binary representations are unique, the set of first-phase queries assigned to i i i is exactly f r − 1 ( i ) f_r^{-1}(i) f r − 1 ( i ) . Hence an optimal algorithm assigns the first phase exactly by the maps f r f_r f r .
An algorithm that reads at most b b b bits is one of 2 b 2^b 2 b advice-free algorithms, and by execution invariance each of them has a single behaviour on the common first phase. The ( Δ + 1 ) s k (\Delta+1)^{sk} ( Δ + 1 ) s k instances need pairwise different behaviours, so 2 b ≥ ( Δ + 1 ) s k 2^b\ge(\Delta+1)^{sk} 2 b ≥ ( Δ + 1 ) s k . □ \square □
For s = 1 s=1 s = 1 the family has m = k + Δ m=k+\Delta m = k + Δ queries, so exact optimality costs m log 2 ( Δ + 1 ) m\log_2(\Delta+1) m log 2 ( Δ + 1 ) bits up to an additive Δ log 2 ( Δ + 1 ) + 1 \Delta\log_2(\Delta+1)+1 Δ log 2 ( Δ + 1 ) + 1 . The bids have k k k bits, and with bids at most W W W the theorem gives Ω ( n Δ log W log ( Δ + 1 ) ) \Omega\!\left(\frac{n}{\Delta}\log W\log(\Delta+1)\right) Ω ( Δ n log W log ( Δ + 1 ) ) . For Δ = 1 \Delta=1 Δ = 1 and s = 1 s=1 s = 1 this is the known bound for online knapsack [4 ] .
All Unit-Bid Instances
We consider instances in which every query has unit demand and bids 1 on each advertiser of its eligible set, budgets are arbitrary integers, and queries are divisible. No structure of the eligible sets is assumed. For weights β ∈ R > 0 \beta\in\mathbb{R}_{>0} β ∈ R > 0 the proportional allocation sends the fraction β i ∑ i ′ ∈ N ( j ) β i ′ \frac{\beta_i}{\sum_{i'\in N(j)}\beta_{i'}} ∑ i ′ ∈ N ( j ) β i ′ β i of query j j j to advertiser i ∈ N ( j ) i\in N(j) i ∈ N ( j ) , and an advertiser accepts what it receives until it is full. This rule is online, and it earns ∑ i min { B i , A i } \sum_i\min\{B_i,A_i\} ∑ i min { B i , A i } , where A i A_i A i is the total amount sent to i i i .
Theorem 15. Let ϵ ∈ ( 0 , 1 ] \epsilon\in(0,1] ϵ ∈ ( 0 , 1 ] . There is R = O ( ϵ − 2 log n ϵ ) R=O(\epsilon^{-2}\log\frac{n}{\epsilon}) R = O ( ϵ − 2 log ϵ n ) such that a deterministic algorithm with ⌈ n log 2 ( 2 R + 1 ) ⌉ \lceil n\log_2(2R+1)\rceil ⌈ n log 2 ( 2 R + 1 )⌉ bits of advice has ratio at least 1 − ϵ 1-\epsilon 1 − ϵ on every divisible unit-bid instance with n n n advertisers. This is 2 n log 2 1 ϵ + n log 2 log n ϵ + O ( n ) 2n\log_2\frac{1}{\epsilon}+n\log_2\log\frac{n}{\epsilon}+O(n) 2 n log 2 ϵ 1 + n log 2 log ϵ n + O ( n ) bits.
Proof. Agrawal, Zadimoghaddam and Mirrokni [1 Thm. 1] proved that for every instance there are weights of the form β i = ( 1 + ϵ ′ ) k i \beta_i=(1+\epsilon')^{k_i} β i = ( 1 + ϵ ′ ) k i with integers ∣ k i ∣ ≤ R |k_i|\le R ∣ k i ∣ ≤ R and ϵ ′ = Θ ( ϵ ) \epsilon'=\Theta(\epsilon) ϵ ′ = Θ ( ϵ ) , for which the proportional allocation earns at least ( 1 − ϵ ) (1-\epsilon) ( 1 − ϵ ) times the optimal fractional value. These are the weights of their iterative procedure after R R R rounds, which starts from β i = 1 \beta_i=1 β i = 1 and changes every weight by a factor ( 1 + ϵ ′ ) ± 1 (1+\epsilon')^{\pm1} ( 1 + ϵ ′ ) ± 1 or not at all in each round. The optimal fractional value equals O P T \mathrm{OPT} OPT because budgets are integers. The oracle writes ( k 1 , … , k n ) (k_1,\ldots,k_n) ( k 1 , … , k n ) as one number in base 2 R + 1 2R+1 2 R + 1 , and the algorithm runs the proportional allocation.
With Theorem 1, whose instances are of this type, the advice complexity of ratio 1 − ϵ 1-\epsilon 1 − ϵ on divisible unit-bid instances lies between n log 2 1 ϵ − O ( n + 1 ϵ ) n\log_2\frac{1}{\epsilon}-O(n+\frac{1}{\epsilon}) n log 2 ϵ 1 − O ( n + ϵ 1 ) , for ϵ ≤ 1 4 \epsilon\le\frac{1}{4} ϵ ≤ 4 1 , and 2 n log 2 1 ϵ + n log 2 log n ϵ + O ( n ) 2n\log_2\frac{1}{\epsilon}+n\log_2\log\frac{n}{\epsilon}+O(n) 2 n log 2 ϵ 1 + n log 2 log ϵ n + O ( n ) . So it is Θ ( n log 1 ϵ ) \Theta(n\log\frac{1}{\epsilon}) Θ ( n log ϵ 1 ) whenever 1 n ≤ ϵ ≤ 4 log n \frac{1}{n}\le\epsilon\le\frac{4}{\log n} n 1 ≤ ϵ ≤ l o g n 4 , on all instances and not only on decreasing ones. For indivisible queries, assigning every query at random with the same probabilities loses a further factor 1 − O ( 1 min i B i ) 1 - O\left(\frac{1}{\sqrt{\min_i B_i}}\right) 1 − O ( m i n i B i 1 ) in expectation [1 Remark 1] . This uses large budgets, and for matching (B i = 1 B_i = 1 B i = 1 ) the bounds Ω ( n log 1 ϵ ) \Omega\left(n \log\frac{1}{\epsilon}\right) Ω ( n log ϵ 1 ) and O ( n ϵ 5 ) O\left(\frac{n}{\epsilon^5}\right) O ( ϵ 5 n ) of [9 ] remain the best known.