On Tuesday, I had the pleasure of seeing Nikhil Devanur present Static pricing for multi-unit prophet inequalities, which is joint with Thodoris Lykouris and Shuchi Chawla.
I liked the work, and want to bring it to other’s attention. In this post, I describe some of the main ideas in the paper. An accompanying post presents some new results that I derived after seeing the talk.
You are presented with a sequence of values . In period , you are shown , and must make an irrevocable decision to keep or dismiss it. You can keep at most values, and earn a reward equal to the sum of kept values. You do not initially know , but know that they are drawn independently from distributions . We assume that the are continuous distributions with finite mean, although all ideas can be extended to the case where the are discrete.
Although one could solve for the optimal policy using dynamic programming, we will instead focus on a class of much simpler policies.
Static Threshold Policies. Set a static threshold . Keep item if and only if and fewer than items have been kept so far. Let denote the expected performance of this policy.
We will benchmark these policies against a “prophet” who knows the values in advance, and keeps the highest.
Omniscient Benchmark. Let denote the expected sum of the highest values.
We wish to know, if we choose the threshold well, how much worse can a static threshold policy be than the omniscient solution? In other words, we want to compute
Computing this value is hard, so this paper gives a lower bound by (i) proposing an elegant way to choose , and (ii) analyzing the resulting performance.
The most studied case is . In that case, it is well-known that a suitable static threshold guarantees half of the omniscient value. (This is actually a pretty amazing fact, when you think about it.) No better guarantee is possible, as the following simple example shows that even the optimal policy guarantees only half of the omniscient value. Let be deterministically equal to 1, and let be with probability , and otherwise. Any optimal policy obtains expected reward of , whereas the omniscient policy obtains expected reward of .
There are several ways to choose the threshold to guarantee of omniscient. One especially elegant method from Samuel-Cahn (1984) is the “median strategy”: take to be the median of the distribution of the maximum of the . Another approach is the “mean strategy” of Kleinberg and Weinberg (2012): take to be half of the mean of the distribution of the maximum of the .
The latter approach generalizes to the case , producing an identical guarantee of . However, this guarantee is far from optimal. When is large, the law of large numbers kicks in, and you can do pretty well by choosing a threshold such that the expected number of items with value above is just a bit below . Hajiaghayi, Kleinberg and Sandholm (2007) show that static threshold policies can achieve a fraction of that is . Note in particular that this guarantee goes to as . However, the constants established in that work are such that for , the best known guarantee is .
The goal of the paper is to generalize the median strategy to arbitrary .
That is, is the “demand” at (number of values above ), gives the probability of keeping fewer than items when using threshold , and is our expected “fill rate” (the expected number of items that we keep, divided by ). The following result relates the performance of to and .
The key idea is that when we consider any value , the probability that we have not yet kept items (and could therefore choose if we wish) is at least . Meanwhile, if is high, then we don’t lose much due to keeping too few items.
An Algorithm For Choosing . Proposition 3.1 immediately implies the following.
This suggests an algorithm for choosing : since is increasing in , and is decreasing in , the supremum is obtained at a threshold such that . When , we have for all and . This implies that at their crossing point, both are equal to . In other words, we set a threshold such that our probability of keeping any item is : this is the median algorithm of Samuel-Cahn (1984)!
Notes on the Proof. The proof establishes a lower bound on , expressed in terms of the following function:1 The second inequality above uses my one of my favorite facts: for a non-negative random variable ,Jointly, Lemmas 3.1 and 3.2 imply Proposition 3.1. In fact, the resulting guarantee holds even against the benchmark of an LP relaxation of OMN, which is permitted to keep at most values in expectation, rather than for every realization. This relaxation sets a threshold such that the expected demand is equal to , and then accepts all such items. Its expected payout is
We now need to find a worst case choice of the distributions . One key advantage of this analysis is that the functions and depend only on the distribution of , which is a sum of independent Bernoulli random variables. Therefore, instead of optimizing over the space of all distributions, it is enough to optimize over the success probabilities (referred to as “biases” in the paper) .
The most involved step in their analysis is to show that the worst case is when the biases are equal, and follows a binomial distribution. We let denote a binomial random variable with trials and success probability .
We can use the following code to compute the values .
delta_binom = function(n,k,p){
return(pbinom(k-1,n,p))
}
mu_binom = function(n,k,p){
prob = dbinom(0:(k-1),n,p)
prob = c(prob,1-sum(prob))
return(sum(prob*c(0:k))/k)
}
guarantee_at_p = function(n,k){
return(Vectorize(function(p){return(min(delta_binom(n,k,p),mu_binom(n,k,p)))}))
}
guarantee_finite = Vectorize(function(n,k){
return(optimize(guarantee_at_p(n,k),interval=c(0,1),maximum=TRUE)$objective)
})
kVals = c(2:4)
colors = rainbow(length(kVals))
nMax = 10
plot(NULL,xlim=c(2,nMax),ylim=c(0.5,0.75),las=1,xlab='n',ylab='',main='Performance Guarantee')
for(i in 1:length(kVals)){
lines(c(kVals[i]:nMax),guarantee_finite(c(kVals[i]:nMax),kVals[i]),col=colors[i])
}
legend(2,.58,col=colors,lty=rep('solid',length(kVals)),legend = kVals)
The guarantee is increasing in and decreasing in , but depends much more on than . If we take , the binomial distribution becomes a Poisson, and we obtain bounds that hold for all .
delta_pois = function(lambda,k){return(ppois(k-1,lambda))}
mu_pois = function(lambda,k){
prob = dpois(0:(k-1),lambda)
prob = c(prob,1-sum(prob))
return(sum(prob*c(0:k))/k)
}
guarantee_at_lambda = function(k){
return(Vectorize(function(lambda){
return(min(delta_pois(lambda,k),mu_pois(lambda,k)))
}))
}
guarantee_pois = Vectorize(function(k){
return(optimize(guarantee_at_lambda(k),interval=c(0,k),maximum=TRUE)$objective)
})
kVals = c(1:10)
round(guarantee_pois(kVals),3)
## [1] 0.500 0.586 0.631 0.660 0.682 0.699 0.713 0.724 0.734 0.742
For , we recover the guarantee of , but this paper provides the first guarantee above for . The guarantee converges to (at an optimal rate) as .
What do I like about this paper?
The authors seem to have found the “right” generalization of the Samuel-Cahn median strategy, which is not at all obvious: Kleinberg and Weinberg (2012) write “it is hard to surpass the elegance of Samuel-Cahn’s proof”, but argue that the advantage of their approach is that “it generalizes to arbitrary matroids.” Meanwhile, these lecture notes call the median strategy “beautiful,” but “somewhat mysterious, and difficult to generalize.”
One special case of interest is when the are iid. Although this seems like an easier setting, simple examples show that their algorithm’s performance may match the lower bound of even with iid values. In this follow-up post, I explore a simple algorithm that improves upon this guarantee.
The authors use an extended analogy linking this setting to one in which an auctioneer has copies of an item and wishes to allocate them to the buyers with the highest values. The quantity can thus be interpreted as the total buyer surplus if each buyer allowed to purchase for price .↩