Arxiv:2107.10777V6 [Cs.DS] 19 Aug 2021
Total Page:16
File Type:pdf, Size:1020Kb
Randomized Online Algorithms for Adwords Vijay V. Vazirani*1 1University of California, Irvine Abstract The general adwords problem has remained largely unresolved. We define a subcase called k-TYPICAL, k ∈ Z+, as follows: the total budget of all the bidders is sufficient to buy k bids for each bidder. This seems a reasonable assumption for a “typical” instance, at least for moderate values of k. We give a randomized online algorithm, achieving a competitive ratio 1 1 of 1 − e − k , for this problem. Another subcase, when bids are small compared to budgets, has been of considerable practical significance in ad auctions [MSVV07]. For this case, we give an optimal randomized 1 online algorithm, achieving a competitive ratio of 1 − e . Previous algorithms for this case were based on LP-duality; the impact of our new approach remains to be seen. The key to these results is a simplification of the proof for RANKING, the optimal algo- rithm for online bipartite matching, given in [KVV90]. Our algorithms for adwords can be seen as natural extensions of RANKING. arXiv:2107.10777v9 [cs.DS] 19 Sep 2021 *Supported in part by NSF grant CCF-1815901. 1 1 Introduction The adwords problem captures a key computational issue that arises in the context of ad auctions, for instance in Google’s AdWords marketplace. Informally, this problem involves matching key- word queries, as they arrive online, to advertisers having budget limits. For formal statements of problems studied in this paper, see Section 2; for the sake of brevity, they will not be repeated in this section. For its small bids case, called SMALL in this paper, an optimal algorithm achieving 1 a competitive ratio of 1 − e was first given in [MSVV07]; for the impact of this result in the marketplace, see 1.1. However, the general adwords problem (GENERAL) has remained largely unresolved; see below for marginal progress made recently. We define a special case of GENERAL, called adwords under typical bidders, k-TYPICAL, k ∈ Z+, as follows: the total budget of all bidders is sufficient to buy k bids for each bidder. Observe that our definition is less restrictive than requiring that the budget of each bidder is sufficient to buy k bids. Even the latter seems a reasonable assumption for a “typical” bidder1, at least for moderate values of k. We give a randomized online algorithm achieving a competitive ratio of 1 1 1 1 − e − k for this problem. For example, our ratio is 0.9 − e = 0.5321 for 10-TYPICAL and 0.99 − 1 = 0.6221 for 100-TYPICAL. e The online bipartite matching (OBM) problem is a special case of GENERAL in which each bidder has a budget of $1 and the bids are 0/1. This problem has been of much consequence to theory and practice, see Sections 1.1 and 1.2. For OBM, a simple optimal randomized online algorithm, 1 called RANKING, was given in [KVV90]. Its competitive ratio is 1 − e and [KVV90] showed that no randomized online algorithm can achieve a better ratio than 1 − 1 + o(1); clearly, this e upper bound applies to GENERAL as well. The analysis of RANKING given in [KVV90] was considered “extremely difficult”. Over the years, several researchers contributed valuable ideas to simplifying its proof; indeed, our work would not have been possible without these ideas, see details in Section 1.2. Our paper starts by further simplifying the analysis, arriving at a proof that is suitable for a textbook2. Our simplification involves two main ideas, which are described in Section 1.3. These ideas turned out to be sufficiently powerful to give natural extensions of RANKING and its analysis to the following special cases of GENERAL, while still retaining its simplicity: k-TYPICAL and SMALL. Similar to the previous online algorithms for SMALL [MSVV07, BJN07], our algorithm is also op- 1 timal, with a competitive ratio of 1 − e . The difference lies in that the previous algorithms were obtained by viewing SMALL as a special case of b-matching, for which an optimal (deterministic) algorithm, called BALANCE, was given in [KP00]. In turn, the algorithms of [MSVV07, BJN07] can we viewed as extensions of BALANCE; both are LP-duality-based and are deterministic, see Section 1.2 for further details. In contrast, our algorithm for SMALL builds directly on RANKING and is randomized. It is more elementary than the previous algorithms — the effective bid of each bidder j for a query wj−1 is simply its bid multiplied by its price pj = e , where wj, called the rank of j, is picked at 1It is highly unlikely that an advertiser would want to buy only two or three queries in a day, since that may not result in the sale of even one item. Furthermore, our definition allows such bidders, as long as the average is fine. 2For a textbook-style exposition, see [EIV22]. 2 random from [0, 1]. Our new approach to SMALL is expected to provide new insights into this important problem. Will it also lead to new applications? That remains to be seen. For GENERAL, the greedy algorithm, which matches each query to the highest bidder, achieves a competitive ratio of 1/2. Until recently, that was the best possible. In [HZZ20] a marginally improved algorithm, with a ratio of 0.5016, was given. It is important to point out that this 60- page paper was a tour-de-force, drawing on a diverse collection of ideas — a testament to the difficulty of this problem. Part of the difficulty of GENERAL arises from an inherent structural issue, see Section 1.4. It turns out that these difficulties do not blend well with our proof technique, and as a result, the revenue generated by our algorithm needs to consist of real as well as “fake” money. Consequently, we are unable to ascertain the competitive ratio of our algorithm for GENERAL. However, for k- TYPICAL and SMALL, we manage to bound the fake money used, thereby giving the competitive ratio results mentioned above. Remark 1. The objective of all adwords problems studied in this paper is to maximize the total revenue accrued by the online algorithm. In economics, such a solution is referred to as efficient, since the amount bid by an advertiser is indicative of how useful the query is to it, and hence to the economy. 1.1 Significance and Practical Impact Google’s AdWords marketplace generates multi-billion dollar revenues annually and the current annual worldwide spending on digital advertising is almost half a trillion dollars. These revenues of Google and other Internet services companies enable them to offer crucial services, such as search, email, videos, news, apps, maps etc. for free – services that have virtually transformed our lives. We note that SMALL is the most relevant case of adwords for the search ads marketplace. A remarkable feature of Google, and other search engines, is the speed with which they are able to show search results, often in milliseconds. In order to show ads at the same speed, together with search results, the solution for SMALL needed to be minimalistic in its use of computing power, memory and communication. The online algorithm of [MSVV07] satisfied these criteria and therefore had a substantial impact in this marketplace. Furthermore, the idea underlying their algorithm was extracted into a simple heuristic, called bid scaling, which uses even less computation and is widely used by search engine companies today. Our randomized algorithm for SMALL is equally minimalistic as mentioned above. It will be useful to view the AdWords marketplace in the context of a bigger revolution, namely the advent of the Internet and mobile computing, and the consequent resurgence of the area of matching-based market design. The birth of this area goes back to the seminal 1962 paper of Gale and Shapley on stable matching [GS62]. Over the decades, this area became known for its highly successful applications, having economic as well as sociological impact. These included matching medical interns to hospitals, students to schools in large cities, and kidney exchange. 3 The resurgence led to a host of highly innovative and impactful applications. Besides the Ad- Words marketplace, which matches queries to advertisers, these include Uber, matching drivers to riders; Upwork, matching employers to workers; and Tinder, matching people to each other, see [Ins19] for more details. A successful launch of such markets calls for economic and game-theoretic insights, together with algorithmic ideas. The Gale-Shapley deferred acceptance algorithm and its follow-up works provided the algorithmic backbone for the “first life” of matching-based market design. The algorithm RANKING has become the paradigm-setting algorithmic idea in the “second life” of this area. Interestingly enough, this result was obtained in the pre-Internet days, over thirty years ago. 1.2 Related Works We start by describing simplifications3 to the proof of RANKING for OBM. The first simplifica- tions, in [GM08, BM08], got the ball rolling, setting the stage for the substantial simplification given in [DJK13], using a randomized primal-dual approach. [DJK13] introduced the idea of splitting the contribution of each matched edge into primal and dual contributions and lower- bounding each part separately. Their method for defining prices pj of goods, using randomiza- tion, was used by subsequent papers, including this one4. Interestingly enough, the next simplification involved removing the scaffolding of LP-duality and casting the proof in purely probabilistic terms5, using notions from economics to split the contribution of each matched edge into the contributions of the buyer and the seller. This elegant analysis was given by [EFFS21]. We note that when we move to generalizations of OBM, even this economic interpretation needs to be dropped, see Remark 15.