Approximating the revenue maximization problem with sharp demands

Approximating the revenue maximization problem with sharp demands

Theoretical Computer Science 662 (2017) 9–30 Contents lists available at ScienceDirect Theoretical Computer Science www.elsevier.com/locate/tcs App...

557KB Sizes 0 Downloads 39 Views

Theoretical Computer Science 662 (2017) 9–30

Contents lists available at ScienceDirect

Theoretical Computer Science www.elsevier.com/locate/tcs

Approximating the revenue maximization problem with sharp demands ✩ Vittorio Bilò a , Michele Flammini b,c , Gianpiero Monaco b,∗ a b c

Department of Mathematics and Physics “Ennio De Giorgi”, University of Salento, Provinciale Lecce-Arnesano, P.O. Box 193, 73100 Lecce, Italy Department of Information Engineering Computer Science and Mathematics, University of L’Aquila, Via Vetoio, Coppito, 67100 L’Aquila, Italy Gran Sasso Science Institute, L’Aquila, Italy

a r t i c l e

i n f o

Article history: Received 21 April 2016 Received in revised form 4 October 2016 Accepted 2 December 2016 Available online 21 December 2016 Communicated by P. Krysta Keywords: Envy-freeness Revenue maximization Auction with sharp demands

a b s t r a c t We consider the revenue maximization problem with sharp multi-demand, in which m indivisible items have to be sold to n potential buyers. Each buyer i is interested in getting exactly di items, and each item j gives a benefit v i j to buyer i. In particular, each item j has a quality q j , each buyer i has a value v i and the benefit v i j is defined as the product v i q j . The problem asks to determine a price for each item and an allocation of bundles of items to buyers with the aim of maximizing the total revenue, i.e., the sum of the prices of all the sold items. The allocation must be envy-free, that is, each buyer must be happy with her assigned bundle and cannot improve her utility, defined as the benefit of all the items in the bundle minus their purchase prices, by receiving any different bundle. We first prove that the problem cannot be approximated within a factor of O (m1− ), for any  > 0, unless P = NP and that this result is asymptotically tight. In fact, we show that a simple greedy algorithm provides an m-approximation of the optimal revenue (this approximation guarantee holds even for the generalization in which the benefits v i j are completely arbitrary). Then, we focus on an interesting subclass of “proper” instances, i.e., not containing buyers (useless buyers) who are a priori known to be not able to receive any bundle. For these instances, we design an interesting 2-approximation algorithm and show that no better approximation is possible unless P = NP. We stress that it is possible to efficiently check if an instance is proper and, if discarding useless buyers is allowed, an instance can be made proper in polynomial time without worsening the value of its optimal solution. © 2016 Elsevier B.V. All rights reserved.

1. Introduction A major decisional process in many business activities concerns whom to sell products (or services) to and at what price, with the goal of maximizing the total revenue. On the other hand, consumers would like to buy at the best possible prices and experience fair sale criteria.

✩ A preliminary version of this paper [3] appeared in the Proceedings of the 14th Scandinavian Symposium and Workshops on Algorithmic Theory (SWAT 2014). Corresponding author. E-mail addresses: [email protected] (V. Bilò), fl[email protected] (M. Flammini), [email protected] (G. Monaco).

*

http://dx.doi.org/10.1016/j.tcs.2016.12.002 0304-3975/© 2016 Elsevier B.V. All rights reserved.

10

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

We address this problem from a computational point of view, by considering a two-sided market in which the supply side consists of m indivisible items and the demand one is populated by n potential buyers (in the following also called consumers or customers), where each buyer i has a demand di (the number of items that i requests) and valuations v i j representing the benefit i gets when owning item j. We assume that, by means of market research or interaction with the consumers, the seller knows each customer’s valuation for each item (the same assumption was used in several papers on the topic, for instance see [18,9,16]). The seller sets up a price p j for each item j and assigns (i.e., sells) bundles of items to the buyers with the aim of maximizing her revenue, that is, the sum of the prices of all the sold items. When a consumer is assigned (i.e., buys) a set of items, her utility is the difference between the total valuation of the items she gets (valuations being additive) and the purchase price. The sets of the sold items, the purchasing customers and their purchase prices are completely determined by the allocation of bundles of items to customers unilaterally decided by the seller. Nevertheless, we require such an allocation to meet two basic fairness constraints:

(i ) each customer i is allocated at most one bundle not exceeding her demand di and providing her a non-negative utility, otherwise she would not buy the bundle;

(ii ) the allocation must be envy-free [25], i.e., each customer i prefers no subset of di items to the bundle she is assigned. Notice that the trivial allocation that sets p j = ∞ for each item j and does not assign any item to the buyers is envy-free. Many papers (see the Related Work section for a detailed reference list) considered the unit demand case in which di = 1 for each consumer i. Arguably, the multi-demand case, where di ≥ 1 for each consumer i, is more general and finds much more applicability. To this aim, we can identify two main multi-demand schemes. The first one is the relaxed multi-demand model, where each buyer i requests at most di ≥ 1 items, and the second one is the sharp multi-demand model, where each buyer i requests exactly di ≥ 1 items and, therefore, a bundle of size less than di has no value for buyer i. For relaxed multi-demand models, a standard technique can reduce the problem to the unit demand case in the following way: each buyer i with demand di is replaced by di copies of buyer i, each requesting a single item. However, such a trick does not apply to the sharp demand model. Moreover, as also pointed out in [9], the sharp multi-demand model exhibits a property that unit demand and relaxed multi-demand ones do not posses. In fact, while in the latter model any envy-free allocation is such that the price p j is always at most the value of v i j , in the sharp demand model, a buyer i may pay an item j more than her own valuation for that item, i.e., p j > v i j and compensate her loss with profits from the other items she gets (see Section 3.1 of [9]). Such a property, called overpricing, clearly adds an extra challenge to find an envy-free allocation of optimal revenue. 1.1. Motivations The sharp demand model is quite natural in several settings. Consider, for instance, a scenario in which a public organization has the need of buying a fixed quantity of items in order to reach a specific purpose (i.e., locations for offices, cars for services, bandwidth, storage, etc.), where each item might have a different valuation for the organization because of its size, reliability, position, etc. Yet, suppose a user wants to store on a remote server a file of a given size s and there is a memory storage vendor that sells slots of fixed size c, where each cell might have different features depending on the  server  location and speed and then yielding different valuations for the user. In this case, a number of items smaller than cs has no value for the user. Similar scenarios also apply to cloud computing. In [9], the authors used the following motivating applications of the sharp multi-demand model. In TV (or radio) advertising [21], advertisers may request different lengths of advertising slots for their ads programs. In banner (or newspaper) advertising, advertisers may request different sizes or areas for their displayed ads, which may be decomposed into a number of base units. Also, consider a scenario in which advertisers choose to display their advertisement using medias (video, audio, animation) [2,22] that would usually need a fixed number of positions, while text ads would need only one position each. An example of formulation of sponsored search using sharp multi-demands can be found in [14]. Other results concerning the sharp multi-demand model in the Bayesian setting can be found in [13]. 1.2. Related work Pricing problems have been intensively studied in the literature, see e.g., [23,1,19] just to cite a few, both in the case in which the consumers’ preferences are unknown (mechanism design [24]) and in the case of full information (where everything is known) that we consider in this paper. In fact, our interest here is in maximizing the seller’s profit assuming that consumers’ preferences are gathered through market research or conjoint analysis [18,9,16]. From an algorithmic point of view, [18] is the first paper dealing with the problem of computing the envy-free pricing of maximum revenue. The authors considered the limited supply unit demand and the unlimited supply single minded cases for which they gave O (log n) and O (log n + log m) approximation algorithms, respectively. An (log n) hardness result has been showed in [4] for the unit demand case, and a tight hardness results of (log1− n) recently appeared in [5–7]. For the single minded case, an (log n) hardness result can be found in [11]. The subcase in which every buyer positively evaluates at most two items has been studied in [8]. The authors proved that the problem is solvable in polynomial time and it becomes N P -hard if some buyer gets interested in at least three items. For the multi-demand model, [10] gave an O (log D ) approximation

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

11

algorithm when there is a metric space behind all items, where D is the maximum demand, and [4] showed that the problem is hard to approximate within a ratio of O (nε ) for some ε > 0. In [20] authors consider revenue maximization problem in which buyers have general combinatorial valuations and the seller has m copies of the same items. They consider different settings that is item pricing (the setting considered here) and bundle pricing (where the price is given to each bundle of items allocated to buyers) and both envy-free (considered here) and bundle envy-free (where a buyer can only envy a bundle assigned to some other buyer). In [17] authors consider revenue maximization problems in which buyers have combinatorial non-decreasing valuations and the seller could package the items into indivisible bundles. The paper shows a polynomial algorithm (given an access to agents’ demand oracles) that, given in input an allocation of maximum social welfare, returns an envy free solution where some items have been packed, that extracts revenue of O (log n) of the maximum social welfare (notice that the maximum social welfare is an upper bound to the maximum revenue). To the best of our knowledge, [9] is the first paper explicitly dealing with the sharp multi-demand model. The authors considered a particular valuation scheme (also used in [15] for keywords advertising scenarios) where each item j has a parameter q j measuring the quality of the item and each buyer i has a value v i representing the benefit that i gets when owning an item of unit quality. Thus, the benefit that i obtains from item j is given by v i q j . For such a problem, the authors proved that computing the envy-free pricing of maximum revenue is NP-hard. Moreover, they showed that, if the demand of each buyer is bounded by a constant, the problem becomes solvable in polynomial time. Paper [12] considered the sharp multi-demand model with the additional constraint in which items are arranged as a sequence and buyers want items that are consecutive in the sequence. Finally, [16] studied the pricing problem in the case in which buyers have a budget, but no demand constraints. The authors considered a special case in which all qualities are equal to 1 (i.e., q j = 1 for each item j). They proved that the problem is still NP-hard and provided a 2-approximation algorithm which assigns the same price to all the sold items. Many of the papers listed above deal with the case of limited supply. Another stream of research considers unlimited supply, that is, the scenario in which each item j exists in e j copies and it is explicitly allowed that e j = ∞. The limited supply setting seems generally more difficult than the unlimited supply one. In this paper, we consider the limited supply setting. Results for unlimited supply can be found in [18,11]. 1.3. Our contribution We consider the revenue maximization problem with sharp multi-demand and limited supply introduced in [9]. We first prove that the problem cannot be approximated within a factor of O (m1− ), for any  > 0, unless P = NP and that this result is asymptotically tight. In fact, we show that a simple greedy algorithm provides an m-approximation even for the general case in which the benefits are completely arbitrary. Our inapproximability proof relies on the presence of some buyers (useless buyers) who cannot be assigned any bundle of items in any envy-free outcome. Thus, it becomes natural to ask oneself what happens for instances, that we call proper, in which such pathological buyers do not occur. Interestingly, for proper instances, we design a 2-approximation algorithm and show that no better guarantee can be achieved unless P = NP. We remark that it is possible to efficiently decide whether an instance is proper. Moreover, if discarding useless buyers is allowed, an instance can be made proper in polynomial time, without worsening the value of its optimal solution. 1.4. Alternative solutions concept In the literature, three main solutions concept are adopted when dealing with envy-free pricing problems. In a competitive equilibrium, every buyer obtains a best possible allocation that maximizes her own utility and every unallocated item is priced at zero (i.e., market clearance). The envy-free outcome (the setting we consider in this paper), which only requires the fairness condition in the competitive equilibrium, where no buyer can get a larger utility from any other allocation for the given prices (i.e., the market clearance is not required). Finally, in a bundle (or pair) envy-free outcome, each buyer prefers her allocation to the allocations received by other buyers. It is easy to see that competitive equilibrium ⊂ envy-freeness ⊂ bundle (or pair) envy-freeness. It means that, a competitive equilibrium is both an envy-free and a pair envy-free outcome. Just as an envy-free outcome is also bundle envy-free. The study of competitive equilibria for the revenue maximization problem with sharp multi-demand, where buyers have valuations v i q j , was initiated in [9]. They proved that a competitive equilibrium may not exist. Moreover they present a polynomial time algorithm to determine the existence of a competitive equilibrium, and if one exists, it computes a revenue maximizing equilibrium. Clearly, the fact that a competitive equilibrium may not exist, largely ruins its applicability. Such non-existence, is a result of the market clearance condition, and therefore the authors studied envy-free outcomes (see related work). In this paper, we study the same model considered in [9], and provide improved results for the revenue maximization problem with sharp multi-demand, when dealing with envy-free outcomes. In particular, the outcomes of our algorithms are not (in general) competitive equilibria. Finally, we notice that, our algorithms also returns outcomes that are bundle envy-free. However, since there are instances of the problem where the optimal bundle envy-free outcome achieves much more revenue that the optimal envy-free one, our algorithms do not perform well when considering bundle envy-free outcomes.

12

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

1.5. Paper organization In the next section we provide the necessary definitions and some preliminary results. In Section 3 we define a useful pricing scheme of fundamental importance for our analysis. Sections 4 and 5 contain our results for general and proper instances, respectively. In the last section, we conclude and discuss further research directions. 2. Model and preliminaries In the Revenue Maximization Problem with Sharp Multi-Demands (RMPSD) investigated in this paper, we are given a market made up of a set M = {1, 2, . . . , m} of items and a set N = {1, 2, . . . , n} of buyers. Each item j ∈ M has unit supply (i.e., only one available copy) and is characterized by a quality (or desirability) q j > 0, while each buyer i ∈ N has a value v i > 0 measuring the benefit she gets when receiving a unit of quality, thus, the overall benefit that buyer i has for item j is v i j = v i q j . Finally, each buyer i has a demand di ∈ Z+ , which specifies the exact number of items she wants to get. In the following, we assume that items and bidders are listed in non-increasing order, that is, v i ≥ v i  for i < i  and q j ≥ q j  for j < j . Definition 1. An allocation vector is an n-tuple X = ( X 1 , . . . , X n ), where X i ⊆ M, with | X i | ∈ {0, di }, and X i ∩ X i  = ∅ for each i = i  ∈ N, is the set of items sold to buyer i. A price vector is an m-tuple p = ( p 1 , . . . , pm ), where p j > 0 is the price of item j. An outcome of the market is a pair (X, p).  Notice that in our model we do not require market clearance. Moreover, we observe that X i ∩ X i  = ∅ for each i = i ∈ N implies that | X | ≤ m. i i∈N Given an outcome (X, p), we denote with u i j (p) = v i j − p j the utility that buyer i gets when she is sold item j and with u i (X, p) = j ∈ X i u i j (p) the overall utility of buyer i in (X, p). When the outcome (or the price vector) is clear from the context, we simply write u i and u i j . In the next two definitions, we formalize the two basic properties that need to be satisfied by any feasible solution to the RMPSD: individual rationality and envy-freeness.

Definition 2. An outcome (X, p) is individually rational if u i ≥ 0 for each i ∈ N. Definition 3. An individually rational outcome (X, p) is envy-free if u i ≥ T ⊆ M with | T | = di .



j∈T

u i j , for each buyer i ∈ N and set of items

Say that a buyer i is a winner if X i = ∅ and denote with W (X) the set of all winners in X. It follows by definition that an outcome (X, p) is envy-free if and only if the following three conditions hold:

(i ) u i ≥ 0 for each i ∈ N, (ii )  u i j ≥ u i j  for each i ∈ W (X), j ∈ X i and j  ∈ / Xi , (iii ) / W (X) and T ⊆ M with | T | = di . j ∈ T u i j ≤ 0 for each i ∈ Note also that, as already remarked, envy-free solutions always exist, since the outcome (X, p) such that X i = ∅ for each i ∈ N and p j = ∞ for each j ∈ M is envy-free. Moreover, deciding whether an outcome is envy-free can be done in polynomial time. In fact, conditions (i ) and (ii ) can be easily tested in O (m) time, while condition (iii ) can be verified in O (m log m) di time by sorting all values u i j in non-increasing order and then checking that u ≤ 0. j =1 i j  according to the allocation vector X. The (market) Denote with M (X) = i ∈ N X i the set of items sold to some buyer  revenue generated by an outcome (X, p) is defined as rev (X, p) = j ∈ M (X) p j . RMPSD asks for the determination of an envy-free outcome of maximum revenue. In the sequel, we will model any instance of the RMPSD as a triple (V, D, Q), where V = ( v 1 , . . . , v n ) and D = (d1 , . . . , dn ) are the vectors of buyers’ values and demands, while Q = (q1 , . . . , qm ) is the vector of item qualities. By the definition of envy-freeness, if i ∈ W ( X ) is a winner, then all the buyers i  with v i  > v i and di  ≤ di must be winners as well, otherwise i  would envy a subset of the bundle assigned to i. This motivates the following definition, which restricts to instances not containing buyers (useless buyers) who can be a priori excluded from the set of winners in any envy-free assignment. Definition 4. An instance (V, D, Q) is proper if di +



i  | v i  > v i ,di  ≤di

di  ≤ m, for each buyer i ∈ N.

We stress that it is possible to efficiently check if an instance is proper, and if discarding useless buyers is allowed, an instance can be made proper in polynomial time, without worsening the value of its optimal solution. For the sake of clearness, in Fig. 1 we show two similar instances of the RMPSD, only one of which is proper.

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

13

i

1

2

3

4

5

i

1

2

3

4

5

vi

5

4

3

2

1

vi

5

4

3

2

1

di

m/2

m

m/3

m/3

m/10

di

m/2

2m/5

m/3

m/3

m/10

Fig. 1. Two similar instances of the RMPSD: only the one on the right side is proper. For the non-proper instance on the left side, buyer 2 is useless. Observe, in fact, that it is not possible to satisfy the demands of both buyers 1 and 2 and satisfying buyer 2 only would make buyer 1 (who has a better value and a non-higher demand) envious.

We conclude this section with three lemmas describing some properties that need to be satisfied by any envy-free outcome. The first two were already proved in [9], nevertheless, for the sake of completeness, we reprove them here. We start by showing that any envy-free outcome has to satisfy the monotonicity property described in the following definition. Definition 5. An allocation vector X is monotone if, for every two buyers i , i  ∈ W (X) with v i > v i  , it holds that j ≥ j  for every two items j ∈ X i and j  ∈ X i  , that is, all the items allocated to i are of quality not smaller than the one of any item allocated to i  . Lemma 1 ([9]). If an outcome (X, p) is envy-free, then X is monotone. Proof. Let (X, p) be an envy-free outcome and assume, for the sake of contradiction, that X is not monotone, i.e., that there exist two buyers i , i  ∈ W (X) with v i > v i and two items j ∈ X i and j  ∈ X i  such that q j < q j  . By the envy-freeness of (X, p), it follows that u i j ≥ u i j  and u i  j  ≥ u i  j which imply, respectively, p j − p j  ≤ v i (q j − q j  ) and p j − p j  ≥ v i  (q j − q j  ). Dividing both inequalities by q j − q j  < 0, we get v i  ≥

p j − p j q j −q j 

and v i ≤

p j − p j q j −q j 

which imply v i ≤ v i  : a contradiction.

2

Given an outcome (X, p), an item j ∈ X i with u i j < 0 is overpriced. For a sold item j ∈ M (X), we denote with bX ( j ) the buyer i ∈ W (X) such that j ∈ X i , that is the buyer receiving j, while, for an unsold item j ∈ / M (X), we define bX ( j ) = 0, that is, we assume that j is assigned to a virtual buyer having index 0. Moreover, for a winner i ∈ W (X), we denote with f X (i ) = min{ j ∈ M (X) : j ∈ X i } the best-quality item in X i . Also in this case, when the allocation vector is clear from the context, we simply write b( j ) and f (i ). Finally, we denote with β(X) = max{i ∈ N : i ∈ W (X)} the maximum index of a winner in X. Next lemma shows that, in any envy-free outcome, overpriced items can only be assigned to the “last” winner, i.e., to the buyer in W (X) having maximum index. Lemma 2 ([9]). Let (X, p) be an envy-free outcome and j ∈ M (X) be an overpriced item. Then, b( j ) = β(X). Proof. Let (X, p) be an envy-free outcome and assume, for the sake of contradiction, that there exists an overpriced item j ∈ X i with i < β(X). Hence, u i j = v i j − p j < 0. Since β(X) ∈ W (X) and (X, p) is individually rational it holds that u β(X) ≥ 0 which implies that there exists an item j  ∈ X β(X) such that u β(X) j  = v β(X) j  − p j  ≥ 0. Moreover, by the envy-freeness of (X, p), u i j ≥ u i j  . By using v i ≥ v β(X) , we get

u i j ≥ u i j

= v i q j − p j ≥ v β(X) q j  − p j  = u β(X) j  ≥ 0, which contradicts the assumption that u i j < 0.

2

The following lemma establishes that, if a buyer i is not a winner, then the total number of items assigned to buyers with valuation strictly smaller than v i is less than di . Lemma 3. Let (X, p) be an envy-free outcome and i be a buyer such that i ∈ / W (X). Then, di >



k>i :k∈ W (X) dk .

 Proof. Let (X, p) be an envy-free outcome / W (X) and i  ∈ W (X). Assume,  and let i , i be two buyers such that v i > v i  , i ∈ for the sake of contradiction, that di ≤ k>i :k∈ W (X) dk . This implies that there exists T ⊆ M, of cardinality di , such that all  items j ∈ T are assigned to buyers with values of at most v i and at least one item j  ∈ T is assigned  to buyer i . Moreover, since uk ≥ 0 for each k ∈ W (X) by the feasibility of (X, p), we can assume that T satisfies u i  j  + j ∈ T \{ j  } u b( j ) j ≥ 0. Hence, we obtain

14

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30





u i j = u i j +

ui j

j ∈ T \{ j  }

j∈T



> u i j +

u b( j ) j

j ∈ T \{ j  }

≥ 0,  where the strict inequality follows from the  fact that v i > v i  and v i ≥ v b( j) for each j ∈ T \ { j }. Thus, since there exists a set of items T of cardinality di such that u > 0, it follows that ( X , p ) is not envy-free: a contradiction. 2 j∈T i j

3. A pricing scheme for monotone allocation vectors We call pricing scheme a function which, given an allocation vector X, returns a price vector. In this section, we propose a pricing scheme for monotone allocation vectors which will be at the basis of our approximability and inapproximability results. For the sake of readability, in describing the following pricing function, given X, we assume a re-ordering of the buyers in such a way that all the winners appear first, still in non-increasing order of values. For a monotone allocation vector X, define the price vector  p :=  p(X) such that, for each j ∈ M (X),

 pj =

⎧ ∞ ⎪ ⎨

if b( j ) = 0,

⎪ ⎩ v b( j ) q j −

β( X) 



( v k−1 − v k )q f (k)

otherwise.

k=b( j )+1

Next lemma shows that  p is indeed a price vector. Lemma 4. For each j ∈ M (X),  p j > 0. Proof. Clearly, the claim holds for each j such that b( j ) ∈ {0, β(X)}. For each other item j such that 0 < b( j ) < β(X), we have

 p j = v b( j ) q j −

β( X) 



( v k−1 − v k )q f (k)

k=b( j )+1

β( X)−1

= v b( j ) (q j − q f (b( j )+1) ) +



(q f (k) − q f (k+1) ) v k + v β(X) q f (β(X))

k=b( j )+1

> 0, where the inequality holds since v β(X) q f (β(X)) > 0 and all the other terms are non-negative since X is monotone.

2

We continue by showing the following important property, closely related to the notion of envy-freeness, possessed by the outcome (X,  p) for each monotone allocation vector X.



Lemma 5. For each monotone allocation vector X, the outcome (X,  p) is individually rational and u i ≥ j ∈ T u i j , for each winner i ∈ W (X) and set of items T ⊆ M such that | T | = di . Thus, the allocation is envy-free for the subset of winners W (X). Proof. Given a monotone allocation vector X, consider a winner i ∈ W (X). If i is the only winner in W (X), it immediately  follows that u i ≥ j ∈ T u i j for each T ⊆ M of cardinality d i since all items not assigned to i have infinite price. We prove the claim for the case in which | W (X)| > 1 by showing that, for each j , j  ∈ M (X) such that j ∈ X i and j  ∈ / X i , it holds that u i j ≥ u i j . To this aim, consider an item j  such that 0 < b( j  ) < i = b( j ) (whenever it exists). We have

u i j − u i j = v i q j −  p j − v i q j +  p j β( X) 

= v i q j − v b( j ) q j +



( v k−1 − v k )q f (k) − v i q j  + v b( j  ) q j  −

= v b( j  ) q j  − v i q j  +

k = i +1





k=b( j  )+1

k=b( j )+1

β( X) 

β( X) 

( v k−1 − v k )q f (k) −

β( X)  k=b( j  )+1



( v k−1 − v k )q f (k)

( v k−1 − v k )q f (k)

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

i 

= ( v b( j  ) − v i )q j  −



( v k−1 − v k )q f (k)

15

k=b( j  )+1 i 

≥ ( v b( j  ) − v i )q j  −



( v k−1 − v k )q j 

k=b( j  )+1

= ( v b( j  ) − v i )q j  − ( v b( j  ) − v i )q j  = 0, where the second equality comes from i = b( j ) and the inequality follows from the monotonicity of X. Now consider an item j  such that b( j  ) > i = b( j ) (whenever it exists). Similarly as above, we have

u i j − u i j = v i q j −  p j − v i q j +  p j

= v b( j  ) q j  − v i q j  +

β( X) 



( v k−1 − v k )q f (k) −

b( j  )





( v k−1 − v k )q f (k)

k=b( j  )+1

k = i +1

= ( v b( j  ) − v i )q j  +

β( X) 

( v k−1 − v k )q f (k)

k = i +1 b( j  )

≥ ( v b( j  ) − v i )q j  +



( v k−1 − v k )q j 

k = i +1

= ( v b( j  ) − v i )q j  + ( v i − v b( j  ) )q j  = 0, where the inequality follows from the monotonicity of X and the fact that q j  ≤ q f (b( j  )) by the definition of f X . Finally, for any item j  with b j  = 0, for which  p j  = ∞, u i j ≥ u i j  trivially holds. Thus, in order to conclude the proof, we are just left to show that u i ≥ 0 for each i ∈ W (X). To this aim, note that, for each j  ∈ X β(X) , u β(X) j  = 0 by definition of  p, which yields u β(X) = 0. Let j  be any item belonging to X β(X) . Since, as we have shown, for each buyer i ∈ W (X) and item j ∈ X i , it holds that u i j ≥ u i j  , it follows that

ui =



(v i q j −  p j)

j∈ X i

p j ) ≥ di ( v i q j  −  p j ) ≥ di ( v β(X) q j  − 

= di u β(X) j  =0 and this concludes the proof.

2

4. Results for generic instances In this section, we show that the RMPSD cannot be approximated within a factor of O (m1− ), for any  > 0, unless P = NP and design a simple m-approximation algorithm whose approximation guarantee holds even for the generalization in which the benefits v i j are completely arbitrary. 4.1. Inapproximability result For an integer k > 0, we denote with [k] the set {1, . . . , k}. Recall that an instance of the Partition problem is made up of k strictly positive numbers q1 , . . . , qk such that i ∈[k ] q i = Q , where Q > 0 is an even number. It is well-known that deciding whether there exists a subset J ⊂ [k] such that i ∈ J q i = Q /2 is an NP-complete problem. The inapproximability result that we derive in this subsection is obtained through a reduction from a specialization of the Partition problem, that we call Constrained Partition problem, which we define in the following. An instance up of an even number k of non-negative numbers q1 , . . . , qk  of the Constrained Partition problem is made 3 such that i ∈[k] {q i } ≥ maxi ∈[k] {q i }. In this case, we are asked to decide i ∈[k] q i = Q , where Q is an even number and 2 min whether there exists a subset J ⊂ [k], with | J | = k/2, such that i ∈ J q i = Q /2.

16

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

Lemma 6. The Constrained Partition problem is NP-complete. Proof. Let I = {q1 , . . . , qk } be an instance of the Partition problem and denote with qmin = mini ∈[k] {qi } and qmax = maxi ∈[k] {qi }. We construct an instance I  = {q1 , . . . , qk  } of the Constrained Partition problem as follows: set k = 2k, then, for each i ∈ [k], set qi = qi + 2qmax , while, for each k + 1 ≤ i ≤ k , set qi = 2qmax . It is easy to see that, by construction, k





   is an even number, 32 mini ∈[k ] {qi } ≥ 3qmax = maxi ∈[k ] {qi } and that i ∈[k ] q i = i ∈[k] q i + 2k qmax = Q + 2k qmax is an even number, so that I  is a valid instance of the Constrained Partition problem. In order to show the claim, we have to prove that there exists a positive answer to I if and only if there exists a positive answer to I  .     To this aim, let J ⊂ [k], with i ∈ J q i = Q /2, be a positive answer to I . Let J ⊆ {k + 1, . . . , k }, with | J | = k − | J |, be any   set of k − | J | numbers of value 2qmax . Note that, by the definition of k and the   the fact that | J | < k, J = ∅. We claim that   set J ∪ J  is a positive answer to I  . In fact, | J ∪ J  | = k and i∈ J ∪ J  qi = i ∈ J (q i + 2qmax ) + 2qmax (k − | J |) = Q /2 + k qmax .



k

      Now, let J  ⊂ [k ], with i ∈ J  q i = Q /2 + k qmax , be a positive answer to I . Note that, since k = 2k, i =k+1 q i = k qmax .   Hence, since Q > 0, there must exist at least one index i ∈ J such that i ∈ [k]. Let  J = {i ∈ J : i ∈ [k]} = ∅ be the set of all   such indexes. We claim that J is a positive answer to I . In fact, we have i∈ J qi = i ∈ J  q i − k qmax = Q /2. 2

We can now proceed to show our first inapproximability result. Theorem 1. For any  > 0, the RMPSD cannot be approximated within a factor of O (m1− ) unless P = NP. Proof. Given an integer k ≥ 3, consider an instance I of the Constrained Partition problem with 2(k − 1) numbers 2(k−1) q1 , . . . , q2(k−1) such that qi = Q and define qmin = mini ∈[2(k−1)] {qi }. Remember that, by definition, Q is even and i =1

≥ maxi ∈[2(k−1)] {qi }. Note that this last property, together with Q ≥ 2(k − 1)qmin , implies that q j ≤ 4(3Q < Q2 for each k−1) j ∈ [2(k − 1)] since k ≥ 3.   For any  > 0, define α = 2 + 1 and λ = kα . Note that, by definition, λ ≥ k2 . We create an instance (V, D, Q) of the RMPSD as follows. There are n = 5 buyers and m = λ + k − 1 items divided into four groups: 3 q 2 min

• • • •

k items of quality Q , one item of quality Q /2, 2(k − 1) items of qualities q i , with i ∈ [2(k − 1)], inherited from I , qmin and λ − 2k items of quality q := 100 > 0.

The five buyers are such that

• v 1 = 2 and d1 = k, 2kq+k Q (λ+1)/2 • v 2 = 1 + λ1 Q − and d2 = λ, Q k+ Q −2kq+λq • v 3 = 1 + λ1 and d3 = k, Q −kq • v 4 = 1 + λ1 Q +(λ− and d4 = λ − k, 2k)q • v 5 = 1 and d5 = λ − 2k.

Note that v i > v i +1 for each i ∈ [4]. In fact, v 4 > 1 = v 5 , since λ > 2k and Q ≥ 2(k − 1)qmin = 200(k − 1)q > kq for k ≥ 2. Q Moreover, v 4 < 1 + λ1 , since λ > k implies Q − kq < Q + (λ − 2k)q. Finally, v 2 > 1 + λ1 , since λ > 2 = k( Q k−QQ /2) > k Qk− 2q 1) implies Q − 2kq + k Q (λ+ > Q k + Q − 2kq + λq and v 2 < 2 = v 1 , since λ > 2 2kq + λq). The basic ideas behind our reduction are the following ones:

k 2

1) + 1 implies Q − 2kq + k Q (λ+ < λ( Q k + Q − 2

(i ) although buyers 2 and 4 are useless, they do generate envy; (ii ) each envy-free assignment of sufficiently high revenue has to satisfy the demand of buyer 5; (iii ) in any envy-free assignment satisfying the demand of buyer 5, the set of items allocated to buyer 3 has to provide a positive answer to the Constrained Partition problem I , otherwise either buyer 2 or 4 become envious. In particular, we show that, if there exists a positive answer to I , then there exists an envy-free outcome for (V, D, Q) of revenue at least (λ − 2k)q, while, if a positive answer to I does not exists, then no envy-free outcome of revenue greater than 6(k + 3)(k − 1)qmin can exist for (V, D, Q). Lemma 7. If there exists a positive answer to I , then there exists an envy-free outcome for (V, D, Q) of revenue greater than (λ − 2k)q.

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

17

Proof. Consider the allocation vector X such that X 1 is made up of k items of quality Q , X 3 contains the item of quality Q /2 plus the k − 1 items forming a positive answer to I , X 5 is made up of the λ − 2k items of quality q and X 2 = X 4 = ∅. Note that X is monotone. We show that the outcome (X,  p) is envy-free. (λ+1)q −q

(3λ+1) Q −2q

j According to the price vector  p,  pj = for each j ∈ X 1 ,  pj = for each j ∈ X 3 and  p j = q for each 2λ λ j ∈ X5 . Because of Lemma 5,  in order to show that (X,  p) is envy-free, we only need to prove that, for each buyer i ∈ / W (X) and T ⊆ M (X) with | T | = di , j ∈ T u i j ≤ 0. Note that the buyers not belonging to W (X) are buyers 2 and 4. For buyer 2, since there are exactly λ items having a non-infinite price, it follows that T = X 1 ∪ X 3 ∪ X 5 is the only set of items of cardinality d2 which can give buyer 2 a non-negative utility. We have



v 2q j −  pj

j∈T 

=

1 + λ1

Q −2kq+ k2Q (λ+1) Q k+ Q −2kq+λq

 (k Q + Q + (λ − 2k)q) −

k((3λ+1) Q −2q) 2λ



(λ+1) Q −kq λ

− (λ − 2k)q

= 0. For buyer 4, for each pair of items ( j , j  ) with j ∈ X 1 and j  ∈ X 3 , u 4 j < u 4 j  , while, for each pair of items ( j  , j  ) with j  ∈ X 3 and j  ∈ X 5 , u 4 j  < u 4 j  . In fact, we have



u4 j − u4 j = v 4q j − v 4 Q − q j 1 +

>



1

λ ≥ 0,

Q 2



1



λ

+

Q 2



3+

1



λ

−qj

where the first inequality follows from 1 < v 4 < 3/2 and the second one follows from q j ≤ Q /2 for each j ∈ X 3 ; and

u 4 j  − u 4 j  = v 4 q − q − v 4 q j + q j +



= (q j − q) 1 +

1

λ

qj





q

λ

− v4

> 0, where the inequality follows from v 4 < 1 + 1/λ and q j > q for each j ∈ X 3 . Hence, the set of items of cardinality d4 which gives the highest utility to buyer 4 is T = X 3 ∪ X 5 . We have





v 4q j −  pj = 1+

j∈T

Q − kq

1

λ Q + q(λ − 2k)



( Q + (λ − 2k)q) −

(λ + 1) Q − kq − (λ − 2k)q λ

= 0. Thus, we can conclude that the outcome (X,  p) is envy-free and rev (X,  p) > (λ − 2k)q.

2

Now we stress the fact that, in any envy-free outcome (X, p) for (V, D, Q) such that rev (X, p) > 0, it must be that X 1 = ∅. In fact, assume that there exists an envy-free outcome (X, p) such that X 1 = ∅ and X i = ∅ for some 2 ≤ i ≤ 5, then, since d1 ≤ di and v 1 > v i for each 2 ≤ i ≤ 5, it follows that there exists a subset of d1 items T such that u 1 > u i ≥ 0, which contradicts the envy-freeness of (X, p). As a consequence of this fact and of the definition of the demand vector, it follows that each possible envy-free outcome (X, p) for (V, D, Q) can only fall into one of the following three cases: 1. X 1 = ∅ and X i = ∅ for each 2 ≤ i ≤ 5, 2. X 1 , X 3 = ∅ and X 2 , X 4 , X 5 = ∅, 3. X 1 , X 3 , X 5 = ∅ and X 2 , X 4 = ∅. Note that, for each envy-free outcome (X, p) falling into one of the first two cases, it holds that

rev (X, p) ≤ v 1 k Q + v 3

3 2

Q

≤ Q (2k + 3) 3

≤ (2k + 3)2(k − 1) qmin 2

= 6(k + 3)(k − 1)qmin .

18

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

Thus, in the remainder of this proof, we will focus only on outcomes falling into case (3). First, we show that, if any such an outcome is envy-free, then the sum of the qualities of the items assigned to buyer 3 cannot exceed Q . Lemma 8. In any envy-free outcome (X, p) falling into case (3),



j∈ X3

qj ≤ Q .



Proof. Let (X, p) be an envy-free outcome falling into case (3) and assume, for the sake of contradiction, that j∈ X3 > Q . Note that, in this case, because of Lemma 1 and the fact that no subset of k items inherited from I can sum a total quality greater than Q , X 3 must contain the item of quality Q /2 and X 1 must contain all items of quality Q . By the feasibility of (X, p), u 5 ≥ 0 which implies that there exists one item j  ∈ X 5 such that p j  ≤ q j  . Moreover, by the envy-freeness of (X, p), for each j ∈ X 3 , we have

u3 j =

λ+1 qj − pj λ

≥ u3 j λ+1 = q j − p j λ λ+1 ≥ q j − q j λ =

q j

λ

,

q j q 1 λ+1   which implies p j ≤ λ+ λ q j − λ ≤ λ q j − λ for each j ∈ X 3 . Let j denote the item of quality Q /2. Since j ∈ X 3 , it follows q λ+ 1 Q that p j  ≤ λ 2 − λ . Again, by the envy-freeness of (X, p), for each j ∈ X 1 , we have

u 1 j = 2Q − p j

≥ u 1 j  = Q − p j  λ+1 Q q ≥Q − + , λ 2 λ 3Q λ+ Q −2q

which implies p j ≤ . 2λ Define T = X 1 ∪ X 3 ∪ X 5 and let us compute the utility that buyer 2 achieves if she is assigned set T such that | T | = λ = d2 . We have

u2 =

 ( v 2q j − p j ) j∈T

= v2  ≥

 j∈ X5

qj −



p j + v2

j∈ X5

kQ 1 Q −2kq+ 2 (λ+1) Q +(λ−2k)q

λ



 j∈ X3

qj −



p j + v2

j∈ X3

q j + (v 2 − v 3)



 j∈ X1 kq

qj −



pj

j∈ X1



q j + λ + k v2 Q −

j∈ X5 j∈ X3 (λ−2k)( Q −2kq+ k2Q (λ+1)) ( Q k(λ−1)−2λq) Q + 2λ( Q (k+1)+(λ−2k)q) + kq λ λ( Q +(λ−2k)q)

> = 0,

 + k v2 Q −

3Q λ+ Q −2q 2λ

3Q λ+ Q −2q 2λ

where the first inequality comes from the fact that, for each j ∈ X 1 , q j = Q and p j ≤





λ+1 λ qj

q





3Q λ+ Q −2q , 2λ

the fact that u 5 ≥ 0 implies

qj ≥ that p j < − λ for each j ∈ X 3 , while the second inequality comes from the fact j ∈ X j ∈ X 5 p j and the fact 5  that j ∈ X 5 q j ≥ (λ − 2k)q and j∈ X3 q j > Q . Hence, since there exists a subset of d2 items for which buyer 2 gets a strictly positive utility and buyer 2 is not a winner in X, it follows that the outcome (X, p) cannot be envy-free: a contradiction. 2 On the other hand, we also show that, for any envy-free outcome (X, p) falling into case (3), the sum of the qualities of the items assigned to buyer 3 cannot be smaller than Q . Lemma 9. In any envy-free outcome (X, p) falling into case (3),



j∈ X3

qj ≥ Q .



Proof. Let (X, p) be an envy-free outcome falling into case (3) and assume, for the sake of contradiction, that j∈ X3 < Q . By the feasibility of (X, p), u 5 ≥ 0 which implies that there exists one item j  ∈ X 5 such that p j  ≤ q j  . Moreover, by the envy-freeness of (X, p), for each j ∈ X 3 , we have

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

u3 j =

19

λ+1 qj − pj λ

≥ u3 j

λ+1 q j − p j λ λ+1 ≥ q j − q j λ

=

=

q j

λ

, q 

q

j 1 λ+1 which implies p j ≤ λ+ λ q j − λ ≤ λ q j − λ for each j ∈ X 3 . Define T = X 3 ∪ X 5 and let us compute the utility that buyer 4 achieves if she is assigned set T such that | T | = λ − k = d4 . We have

u4 =

 ( v 4q j − p j ) j∈T

= v4 ≥



qj −



p j + v4



qj −



pj

j∈ j∈ X3 j∈ X3 5  j∈ X5 X  Q −kq 1 q + ( v − v ) qj 4 3 j λ Q +(λ−2k)q j∈ X5 j∈ X3 (λ−2k)( Q −kq)q Q (λ−k)q kq λ( Q +(λ−2k))q − λ( Q +(λ−2k)q) + λ

+

kq

λ

> = 0

  q 1 where the first inequality comes from the fact that u 5 ≥ 0 implies fact that p j ≤ λ+ j∈ X5 q j ≥ j ∈ X 5 p j and the λ qj − λ   for each j ∈ X 3 , while the second inequality comes from the fact that q ≥ (λ − 2k ) q and q < Q . j∈ X5 j j∈ X3 j Hence, since there exists a subset of d4 items for which buyer 4 gets a strictly positive utility and buyer 4 is not a winner in X, it follows that the outcome (X, p) cannot be envy-free: a contradiction. 2 As a consequence of Lemmas 8 and 9, it follows that there exists an envy-free outcome (X, p) falling into case (3) only  if j ∈ X 3 q j = Q . Since, as we have already observed, in such a case the item of quality Q /2 has to belong to X 3 , it follows that there exists an envy-free outcome (X, p) falling into case (3) only if there are k − 1 items inherited from I whose sum is exactly Q /2, that is, only if I admits a positive solution. Any envy-free outcome not falling into case (3) can raise a revenue of at most 6(k + 3)(k − 1)qmin . Hence, if there exists a positive answer to I , then, by Lemma 7, there exists a solution to (V, D, Q) of revenue greater than (λ − 2k)q, while, if there is no positive answer to I , then there exists no solution to (V, D, Q) of revenue more than 6(k + 3)(k − 1)qmin . Thus, if there (λ−2k)q exists an r-approximation algorithm for the RMPSD with r ≤ 600(k+3)(k−min , it is then possible to decide in polynomial 1)qmin time the Constrained Partition problem, thus implying P = NP. Since, by the definition of α ,

  λ − 2k = O k α −2 600(k + 3)(k − 1)   = O m1−2/α and m1− < m1−2/α , the claim follows.

2

We stress that this inapproximability result heavily relies on the presence of two useless buyers, namely buyers 2 and 4, who cannot be winners in any envy-free solution. This situation suggests that better approximation guarantees may be possible for proper instances, as we will show in the next section. 4.2. The approximation algorithm In this subsection, we design a simple m-approximation algorithm for the RMPSD. The inapproximability result given in Theorem 1 shows that, asymptotically speaking, this is the  best approximation one can hope for unless P = NP. For each i ∈ N, let T i = argmax T ⊆ M :| T |=di





j∈T i



j∈T

vij

be the set of the di best items for buyer i and define R i =

v i j /di . Let i ∗ be the index of the buyer with the highest value R i . Consider the algorithm best which returns

the outcome (X, p) such that X i ∗ = T i ∗ , X i = ∅ for each i = i ∗ , p j = R i ∗ for each j ∈ T i ∗ and p j = ∞ for each j ∈ / T i ∗ . It is easy to see that the computational complexity of algorithm best is O (nm).

20

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

Theorem 2. Algorithm best returns an m-approximate solution for the RMPSD even for the more general case where the valuation v i j are completely arbitrary. Proof. It is easy to see that the outcome (X, p) returned by Algorithm best is individually rational. In order to prove that ∗ it di , is also envy-free, we just need to show that, for each buyer i = i with di ≤ di ∗ and each T i ⊆ T i ∗ of cardinality  ( v − p ) ≤ 0. Assume, for the sake of contradiction, that there exists a set T i of cardinality di such that ij j j∈T i j∈T i ( v i j − p j ) > 0. We obtain

0<



(v i j − p j )

j∈T i

=



v i j − di R i ∗

j∈T i

≤ di R i − di R i ∗ = di ( R i − R i ∗ ), which implies R i > R i ∗ : a contradiction. Hence, (X, p) is envy-free. As to the approximation guarantee, note that rev (X, p) = di ∗ R i ∗ ≥ R i ∗ . The maximum possible revenue achievable by any outcome (X, p), not even an envy-free one, is at most



vij ≤

i∈N j∈ X i



(di R i )

i ∈ W (X)

≤ mR i ∗ , which yields the claim.

2

Observe that neither the definition of Algorithm best nor the proof of its approximation guarantee rely on the fact that v i j = v i q j , hence, this result can be extended to the generalization of the problem in which the benefits v i j are completely arbitrary. 5. Results for proper instances Given a proper instance I = (V, D, Q), denote with δ the number of different values in V and, for each k ∈ [δ], let A k ⊆ N denote the set of buyers with the kth highest value and v ( A k ) denote the value of all buyers in A k . For k ∈ [δ], denote with k δ A ≤k = h=1 A h the set of buyers having one of the kth highest values and with A ≥k = h=k A h the set of buyers having

k−1

one of the (δ − k)th lowest values. Similarly, we denote with A k = h= k+1 A h the set of buyers having one of the (δ − k − 1)th lowest values. For a subset of buyers A ⊆ N, denote with d( A ) = i ∈ A di the aggregate demand of all buyers in A. Denote with δ ∗ ∈ [δ] the minimum index such that d( A ≤δ ∗ ) > m and let  A ⊂ A δ ∗ be a subset of buyers in A δ ∗ such that

 A ∈ argmax A ⊂ A

δ ∗ :d( A )+d( A <δ ∗ )≤m

{d( A )} .

In other words  A is a subset of buyers in A δ ∗ that maximizes the number of allocated items among all sets of buyers whose aggregate demand, summed to the aggregate demand of A <δ ∗ , does not exceed m. Note that any instance I for which δ ∗ does not exist can be suitably extended with a dummy buyer n + 1, such that v n+1 < v n and dn+1 = m + 1, which is equivalent in the sense that it does not change the set of envy-free outcomes of I . Hence, in this section, we will always assume that δ ∗ is well-defined for each proper instance of the RMPSD. For our purposes, we need to break ties among values of the buyers in A δ ∗ in such a way that each buyer in  A comes before any buyer in A δ ∗ \  A. In order to achieve this task, we need to explicitly compute the subset of buyers  A. This can be done by reducing this problem to the Knapsack problem. It is easy to see that, in this case, the well-known pseudopolynomial time algorithm for Knapsack is polynomial in the dimensions of I , as di ≤ m for every i ∈ N. Because of the above discussion, from now on we can assume that ties among values of the buyers in A δ ∗ are broken in such a way that each buyer in  A comes before any buyer in A δ ∗ \  A. For each k ∈ [δ ∗ ], define



α (k) =

max{i ∈ A k } if k ∈ [δ ∗ − 1], max{i ∈  A } if k = δ ∗ ,

as the index of the last buyer in A k for k ∈ [δ ∗ − 1], or as the index of the last buyer in  A for k = δ ∗ . Hence, by setting α (0) = 0, it is possible to use the indexes α (k)s to list the set of buyers in each class. In particular, it follows that Ak =

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

21

α (δ ∗ ) α (k) {i } for each k ∈ [δ ∗ − 1] and that  A = i =α (δ ∗ −1)+1 {i }. By the definition of δ ∗ and  A, we have d ≤ m for i =1 i each k ∈ [δ ∗ ]. Moreover, we observe that, for each k ∈ [δ ∗ ], it holds that α (k)

i =α (k−1)+1

α (k) 



di ≥

i =α (k−1)+1

d( A ).

(1)

A ⊆ A k :d( A )+d( A
Inequality (1) holds trivially for any k ∈ [δ ∗ − 1] since, by definition, we have m; moreover, it holds true also for k = δ ∗ since, by definition, we have

 A ∈ argmax A ⊂ A

α (k)

i =α (k−1)+1

α (δ ∗ )

di = d( A k ) and d( A k ) + d( A
  ∗ i =α (δ ∗ −1)+1 d i = d( A ), d( A ) + d( A <δ ) ≤ m and

{d( A )}. Informally speaking, inequality (1) states that, for each k ∈ [δ ∗ − 1] (resp. for k = δ ∗ ),  the set of buyers A k (resp. A) is the subset of buyers of maximum aggregate demand that can be joined to the set of buyers δ ∗ :d( A )+d( A <δ ∗ )≤m

A


Proof. Since X is monotone, by exploiting Lemma 5, we only need to prove that / W (X) and j ∈ T u i j ≤ 0, for each buyer i ∈ set T ⊆ M of cardinality di . Note that i ∈ / W (X) if and only if i > h. For each i > h, v i ≤ v h . Moreover, for each j such that b( j ) = h, u hj = 0. Since, because of Lemma 5, u hj ≥ u hj  for any item j  ∈ M (X), it follows that u hj  = v h q j  −  p j  ≤ 0 for each j  ∈ M (X). Hence, for each j  ∈ M (X), we derive u i j  = v i q j −  p j ≤ v h q j −  p j  ≤ 0 and this concludes the proof. 2 Given an allocation vector X, for each i ∈ [δ], denote with M i (X) = { j ∈ M (X) : v b( j ) = v ( A i )} the set of items allocated to the buyers with the ith highest value in V. Recall that, since X is an h-prefix of I , it holds that β(X) = h. The following lemma gives a lower bound on the revenue generated by the outcome (X,  p). Lemma 11. rev (X,  p) ≥ v h



j ∈ M h (X) q j .

Proof. By the definition of  p, it follows that

rev (X, p) ≥



 pj

j ∈ M h (X)



= vh

2

q j.

j ∈ M h (X)

5.1. Computing an h-prefix of I of maximum revenue In this subsection, we design a polynomial time algorithm ComputePrefix which, given a proper instance I and a value h ∈ [α (δ ∗ )], outputs the h-prefix Xh∗ of I such that the outcome (Xh∗ ,  p) achieves the highest revenue among all possible h-prefixes of I in time O (mh). Recall that, by definition of h-prefixes of I , the set of buyers whose demand is to be satisfied is exactly characterized. Moreover, once fixed a set of items which exactly satisfies the demands of the considered buyers, by the monotonicity of h-prefixes of I , we know exactly which items must be assigned to each buyer. Hence, in this setting, our task becomes that of determining the set of items maximizing the value rev (X,  p) . To this aim, we first show that this problem reduces to that of determining, for each i ∈ [h], the item f (i ). In fact, it holds that

rev (X, p) =



 pj

j ∈ M (X)

=



⎛ ⎝v i q j −

i ∈[h] j ∈ X i

=

 i ∈[h]



⎝v i

 j∈ X i





h 

( v k−1 − v k )q f (k) ⎠

k = i +1

q j⎠ −

 i ∈[h]

⎛ ⎝di



h 

( v k−1 − v k )q f (k) ⎠

k = i +1

22

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

=

 i ∈[h]



⎛ ⎝v i



⎞ q j⎠ −

j∈ X i





 h 

( v i −1 − v i )q f (i )

i =2





i −1

 k =1

dk .



T2

T1

Note that only those items j such that j = f (i ) for some i ∈ [h] contribute to the term T 2 and that the per-quality contribution of each item to the term T 1 is always strictly positive. This implies that, once fixed all the items j such that j = f (i ) for each i ∈ [h], the remaining di − 1 items to be assigned to buyer i in each optimal outcome are exactly the items j + 1, . . . , j + di − 1. Because of the above discussion, we are now allowed to concentrate only on the problem of determining the set of best-quality items assigned to each buyer in [h] in an optimal envy-free outcome. Let us denote with r i j the maximum revenue which can be achieved by an envy-free outcome in which the best-quality item of the first i buyers have been h i −1 chosen among the first j ones. Hence, r i j is defined for 0 ≤ i ≤ h and k=i dk and has the k=1 dk + 1 ≤ j ≤ m + 1 − following expression:

ri j =

⎧ 0 ⎪ ⎪ ⎪ j +di −1 ⎪  ⎪ ⎪ ⎪ v i qk ⎨ ti q j +

if i = 0, if i > 0 ∧ j =

k = j +1

⎪ ⎪ j +di −1 ⎪  ⎪ ⎪ ⎪ max { r + t q ; r } + v i qk if i > 0 ∧ j > ⎪ i − 1 , j − 1 i j i , j − 1 ⎩ k = j +1

i −1  k =1 i −1 

dk + 1, dk + 1,

k =1

i −1

where t i = v i − ( v i −1 − v i ) k=1 dk is the contribution that item f (i ) gives to the revenue per each unit of quality. Clearly, by definition, rh,m+1−dh gives the maximum revenue which can be achieved by an envy-free outcome (X,  p) such that W (X) = [h]. Such a quantity, as well as the allocation vector Xh∗ realizing it, can be computed by the following dynamic programming algorithm of complexity O (mh). Algorithm 1 Algorithm ComputePrefix: input: instance I , integer h; output: allocation vector Xh∗ . 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:

for j = 1, . . . , m do r0 j ← 0 end for for i = 1, . . . , h do i −1 r i j ← t i · q j where j = k=1 dk + 1 fi ← j end for for i = 1, . . . , h do i −1 h for j = k=1 dk + 2, . . . , m + 1 − k=i dk do if r i , j −1 ≥ r i −1, j −1 + t i · q j then r i j ← r i , j −1 else r i , j ← r i −1, j −1 + t i · q j f i := j end if end for end for for i = 1, . . . , h do X i ← { f i , f i + 1, . . . , f i + di − 1} end for return Xh∗ = ( X 1 , . . . , X h )

Let X (h) be the set of all possible h-prefixes of I . As a consequence of the analysis carried out above, we can claim the following result. Lemma 12. For each h ∈ [α (δ ∗ )], algorithm ComputePrefix computes the h-prefix Xh∗ of I such that rev (Xh∗ ,  p) = maxX∈X (h) {rev (X,  p)} in time O (mh). 5.2. The approximation algorithm In this subsection, we describe algorithm Prefix which produces a 2-approximation of the optimal revenue achievable on proper instances. Algorithm Prefix generates a set of prefixes of I ; for each prefix, computes the allocation of items of maximum revenue, by exploiting the algorithm ComputePrefix as a subroutine, and finally returns the solution with the highest revenue. In particular, two types of prefixes are generated as described in the following. At lines 3–4, the algorithm uses the pseudo-polynomial time algorithm for the Knapsack problem to determine the subset of buyers  A, and

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

23

then reorders the buyers in such a way that each i ∈  A comes before any i  ∈ A δ ∗ \  A, as discussed at the beginning of the section. The first set of prefixes is generated and processed at lines 5–11. In particular, α (δ ∗ ) different prefixes are generated by considering the set of the first h buyers, for each h = 1, . . . , α (δ ∗ ). The second set of prefixes is generated and processed at lines 12–22. In particular, for each k = 0, . . . , δ ∗ − 1, | A k+1 | prefixes are generated by appending the ith buyers in A k+1 to the set of the first α (k) buyers, for each i = 1, . . . , | A k+1 |. Algorithm 2 Algorithm Prefix: input: instance I ; output: allocation vector X∗ . 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24:

best ← ∅ value ← −1 compute  A reorder the buyers in such a way that each i ∈  A comes before any i  ∈ A δ ∗ \  A for h = 1, . . . , α (δ ∗ ) do Xh∗ ← ComputePrefix( I , h) if rev (Xh∗ ,  p) > value then best ← Xh∗ value ← rev (Xh∗ ,  p) end if end for for k = 0, . . . , δ ∗ − 1 do for each i ∈ A k+1 do reorder the buyers in A k+1 in such a way that i is the first buyer in A k+1 if d( A ≤k ) + di ≤ m then Xk∗ ← ComputePrefix( I , | A ≤k | + 1) end if if rev (Xk∗ ,  p) > value then best ← Xk∗ value ← rev (Xk∗ ,  p) end if end for end for return best

It is easy to see that the computational complexity of algorithm Prefix is O (mn3 ). Before proving its approximation guarantee, we show a very important result stating that revenue generated by the price vector  p is the best one can hope for when overpricing is not allowed. Such a result, of independent interest, plays a crucial role in the proof of the approximation guarantee of algorithm Prefix. To this aim, given an h-prefix X of I , denote with PEF (X) the set of price vectors p such that the outcome (X, p) in envy-free and does not overprice any item. Lemma 13. Let X be an h-prefix of I . Then  p ∈ argmax{rev (X, p) : p ∈ PEF (X)}. Proof. It is easy to see that the price vector  p does not overprice any item in M (X) so that  p ∈ PEF (X). For any p ∈ PEF (X), we show by backward induction that p j ≤  p j for each j ∈ M (X). As a base case, for each j ∈ M h (X), we have p j ≤ v h q j =  p j because p cannot overprice any item. For the inductive step, consider an item j such that b( j ) = i < h and assume the claim true for each item j  such that b( j  ) > i. By the envy-freeness of (X, p), it holds that u i j − u i j  ≥ 0 for j  = f (i + 1). This implies

0 ≤ u i j − u i j

= v i q j − p j − v i q j + p j ≤ v i q j − p j − v i q j +  p j , where the last inequality comes from the inductive hypothesis. Hence, we can conclude that

p j ≤ v i (q j − q j  ) +  p j

= v i (q j − q j  ) + v b( j  ) q j  −

h 

(( v k−1 − v k )q f (k) )

k=b( j  )+1

= v i (q j − q f (i +1) ) + v i +1 q f (i +1) −

h 

(( v k−1 − v k )q f (k) )

k = i +2

= viq j −

h 

(( v k−1 − v k )q f (k) )

k = i +1

= p j,

24

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

where the second equality comes from j  = f (i + 1) and b( j  ) = i + 1. This completes the induction and shows the claim. 2 We are now ready to prove the approximation guarantee of algorithm Prefix. Theorem 3. The approximation ratio of algorithm Prefix is 2 when applied to proper instances. Proof. Let I be a proper instance and let (X, p) be its optimal envy-free outcome. We denote with rev (Prefix) the revenue of the outcome returned by algorithm Prefix. The proof is divided into two cases. Case (1): X is an h-prefix of I for some h ∈ [α (δ ∗ )]. p) has to be considered by algorithm Prefix as a candidate solution. By the Since X is an h-prefix of I , the outcome (Xh∗ ,  definition of algorithm Prefix and by Lemma 11, it follows that

rev (Prefix) ≥ rev (Xh∗ , p) ≥ v h Assume first that rev (X, p) ≤ 2

rev (X, p) ≤ 2







j ∈ M h (X)

p j ≤ 2 · vh

j ∈ M h (X)

q j.

(2)

j ∈ M h (Xh∗ )

p j . By the feasibility of (X, p), it follows that



q j.

(3)

j ∈ M h (X)

By combining (2) and (3), we obtain rev (X, p) ≤ 2 · rev (Prefix), as desired. Assume now that

rev (X, p) > 2



p j.

(4)

j ∈ M h (X)

Define i  = max{i ∈ N : v i > v h } (note that (4) implies that i  is well-defined) and X as the i  -prefix of I such that X i = X i for each i ∈ [i  ]. By Lemma 2, it follows that (X , p) is an outcome without overpricing. In this case, we derive

rev (X, p) < 2 · rev (X , p) p) ≤ 2 · rev (X , p) ≤ 2 · rev (X∗i  ,

≤ 2 · rev (Prefix), where the first inequality comes from (4), the second one comes from Lemma 13 by recalling that (X , p) is an outcome without overpricing, and the last two ones come from the definition of algorithm Prefix , the fact that X is an i  -prefix of I and from Lemma 12. Thus, the proof of Case (1) is complete. Case (2): X is not an h-prefix of I for any h ∈ [α (δ ∗ )]. / W (X)}. Since X is not an h-prefix of I for any h ∈ [α (δ ∗ )], it follows that β(X) > i ∗ . Assume first Let i ∗ = min{i ∈ N : i ∈ that

rev (X, p) ≤ 2

∗ −1 i



pj

(5)

i =1 j ∈ X i

and define X as the (i ∗ − 1)-prefix of I such that X i = X i for each i ∈ [i ∗ − 1] (note that (5) implies that (i ∗ − 1)-prefixes of I do exist). Similarly as in the previous case, we derive

rev (X, p) ≤ 2

∗ −1 i



pj

i =1 j ∈ X i

= 2 · rev (X , p) p) ≤ 2 · rev (X , p) ≤ 2 · rev (X∗i ∗ −1 ,

≤ 2 · rev (Prefix), where the first inequality comes from (5), the second one comes from Lemma 13 by recalling that (X , p) is an outcome without overpricing, and the last two ones come from the definition of algorithm Prefix , the fact that X is an (i ∗ − 1)-prefix of I and from Lemma 12.

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

25

Hence, we are only left to prove the claim assuming that

rev (X, p) > 2

∗ −1 i



p j.

(6)

i =1 j ∈ X i

Under this assumption, however, we need to delve into a more intricate case analysis. We start by considering the case in which the following inequality holds:



di < di ∗ .

i >i ∗ :i ∈ W (X)

!

Define qmax = max q j : j ∈

(7)



i >i ∗



rev (X, p) < 2

"

X i . We have



pj

i >i ∗ :i ∈ W (X) j ∈ X i





≤2

⎝v i

i >i ∗ :i ∈ W (X)



≤2





≤ 2 · v i ∗ qmax

q j⎠

j∈ X i

⎝ v i∗

i >i ∗ :i ∈ W (X)









(8)

q j⎠

j∈ X i

di

i >i ∗ :i ∈ W (X)

< 2 · v i ∗ di ∗ qmax , where the first inequality comes from (6), the second one comes from the feasibility of (X, p), the third one comes from the fact that buyers are arranged in non-decreasing order of values, the fourth one comes from the definition of qmax and the fifth one comes from (7). We now identify the following two subcases: i ) there exists a buyer i  < i ∗ such that di  > di ∗ , ii ) for all buyers i  < i ∗ , we have di  ≤ di ∗ . Subcase i): Clearly, by the definition of i ∗ , i ∈ W (X) for each i ∈ [i  ], so that i  -prefixes of I are guaranteed to exist. Define X as the i  -prefix of I such that X i = X i for each i ∈ [i  ]. We have

rev (X, p) < 2 · v i ∗ di ∗ qmax

< 2 · v i  di  qmax  ≤ 2 · v i qj j∈ X i

≤ 2 · v i



qj

j ∈ X  i

≤ 2 · rev (X , p) p) ≤ 2 · rev (X∗i  ,

≤ 2 · rev (Prefix), where the first inequality comes from (8), the second one comes from the hypothesis of assumption i ), the third one comes from monotonicity of X, the fourth one comes from the construction of X , the fifth one comes from Lemma 11, the sixth one comes from Lemma 12 and the last one comes from the definition of algorithm Prefix . Thus, the proof of Subcase i) is complete.



Subcase ii): Let k be the index such that i ∗ ∈ A k . Under the hypothesis of assumption ii ), it follows that i
26

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

rev (Prefix) ≥ rev (X , p)



≥ v i∗

qj

(9)

j ∈ X i∗

> v i ∗ di ∗ qmax , where the first inequality comes from the definition of algorithms Prefix and ComputePrefix, the second one comes from Lemma 11 and the last one comes from (7) combined with W (X) ∩ W (X ) = A


di ≥ di ∗ .

(10)

i >i ∗ :i ∈ W (X)

Note that, under this hypothesis, we can assume v i ∗ = v β(X) since, otherwise, inequality (10) would contradict Lemma 3. Moreover, (10) also implies that i ∗ -prefixes of I do exist, that is, i ∗ ∈ A k for some k ∈ [δ ∗ ]. Define H = {i ∈ W (X) : v i = v i ∗ } and let i  = min{i : i ∈ H } if H = ∅, otherwise set i  = i ∗ . Let X be the allocation vector which assigns the best-quality items to the first α (k) buyers. Note that X is an α (k)-prefix of I and [i  − 1] ⊆ W (X ) ∩ W (X). This fact, together with (1) and the definition of X implies





α (k) 

qj ≤

i ≥i  :i ∈ W (X) j ∈ X i



q j.

(11)

i =α (k−1)+1 j ∈ X i

We have

rev (X, p) < 2





pj

i ≥i  :i ∈ W (X) j ∈ X i

≤2





⎝v i

i ≥i  :i ∈ W (X)

=2





q j⎠

j∈ X i



⎝ v i∗

i ≥i  :i ∈ W (X)

≤ 2 · v i∗





⎞ q j⎠

j∈ X i

α (k) 



qj

i =α (k−1)+1 j ∈ X i

= 2 · v i∗



qj

j ∈ M i ∗ (X )

≤ 2 · rev (X , p) p) ≤ 2 · rev (X∗α (k) ,

≤ 2 · rev (Prefix), where the first inequality comes from (6) and the definition of i  , the second one comes from the feasibility of (X, p), the first equality comes from v i = v i ∗ for each i ≥ i  such that i ∈ W (X), the third inequality comes from (11), the second equality comes from the definition of X , the fourth inequality comes from Lemma 11, the fifth one comes from Lemma 12 and the fact that X is an α (k)-prefix of I and the last one comes from the definition of algorithm Prefix. Thus, since we have analyzed each possible case, the proof is complete. 2 We conclude this section by showing that the approximation ratio achieved by algorithm Prefix is the best one can hope for proper instances unless P = NP. Theorem 4. For any 0 <  ≤ 1, the RMPSD on proper instances cannot be approximated within a factor of 2 −  unless P = NP. Proof. For an integer k ≥ 3, consider an instance I of the Constrained Partition problem with 2(k − 1) numbers q1 , . . . , q2(k−1) such that

2(k−1) i =1

qi = Q and define qmin = mini ∈[2(k−1)] {qi } and qmax = maxi ∈[2(k−1)] {qi }. Remember that, by definition, Q is

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

27

even and it holds 32 qmin ≥ qmax . Also in this case, as observed in the proof of Theorem 1, it holds that q j < Q /2 for each j ∈ [2(k − 1)]. For any 0 <  ≤ 1, define

 $ % # (5k + 3)(2 −  ) Q 4(k + 1) −2 . λ = max 600k2 ; +



q

We create an instance (V, D, Q) of the RMPSD as done in the proof of Theorem 1 with the addition of a buyer 0, with (λ−2k)q v 0 = ( Q +q)k and d0 = k, and k + 1 items of quality Q + q. We first show that v 0 > 2 = v 1 . It holds that

(λ − 2k)q ( Q + q)k (λ − 2k)q > (3(k − 1)qmin + q)k (λ − 2k)q = (300(k − 1)q + q)k

v0 =



600k2 − 2k 300k2 − 299k

> 2, where the first inequality follows from Q ≤ 2(k − 1)qmax ≤ 3(k − 1)qmin . Moreover, note that, in the proof of Theorem 1, we only needed λ > 3k in order to show that v i > v i +1 for each i ∈ [4]. Hence, we can conclude that v i > v i +1 for each 0 ≤ i ≤ 4. It follows that, with the addition of buyer 0 and the k + 1 items of quality Q + q, the instance (V, D, Q) is now proper. The spirit of the proof is the same of that used in the one of Theorem 1, i.e., we show that, if I admits a positive answer, then there exists a solution for (V, D, Q) with revenue above a certain value, while, if I admits no positive answers, then all the solutions for (V, D, Q) must raise a revenue below a certain other value. First of all, let us determine the set of all possible non-empty allocation vectors able to yield an envy-free outcome. To this aim, we can claim the following set of constraints which come from the fact that v i > v i +1 for each 0 ≤ i ≤ 4: i) ii ) iii ) i v)

Since Since Since Since

d0 ≤ di for each i ≥ 1, it d1 ≤ di for each i ≥ 2, it d3 ≤ di for each i ≥ 4, it d2 ≤ d3 + d4 , it must be

must be X 0 = ∅; 5 must be X 1 = ∅ when i =2 X i = ∅; must be X 3 = ∅ when X 4 ∪ X 5 = ∅; X 2 = ∅ when X 3 , X 4 = ∅;

Hence, for each envy-free outcome (X, p), X can only fall into one of the following five cases: 1. 2. 3. 4. 5.

X 0 = ∅ and X i = ∅ for each i ≥ 1; X 0 , X 1 = ∅ and X i = ∅ for each i ≥ 2; X 0 , X 1 , X 2 = ∅ and X i = ∅ for each i ≥ 3; X 0 , X 1 , X 3 = ∅ and X 2 , X 4 , X 5 = ∅; X 0 , X 1 , X 3 , X 5 = ∅ and X 2 , X 4 = ∅.

When X falls into case (1), for any pricing vector p such that (X, p) is envy-free, we have rev (X, p) ≤ v 0 k( Q + q) = (λ − 2k)q. When X falls into case (2), for any pricing vector p such that (X, p) is envy-free, we have rev (X, p) ≤ v 0 k( Q + q) + 2(k Q + q) = (λ − 2k)q + 2(k Q + q). When X falls into case (4), for any pricing vector p such that (X, p) is envy-free, we have rev (X, p) ≤ v 0 k( Q + q) + 2(k Q + q) + 32 v 3 k Q < (λ − 2k)q + 5k Q + 2q since v 3 < 2. When X falls into case (3), the following three conditions hold:

• X 0 only contains items of quality Q + q, • the remaining item of quality Q + q, denote it by j, is assigned to X 1 , • X 2 contains an item of quality Q . For any pricing vector p such that (X, p) is envy-free, there must exist an item j  ∈ X 2 such that p j  ≤ v 2 q j  < 2q j  . Moreover, it must be u 1 j = 2( Q + q) − p j ≥ u 1 j  = 2q j  − p j  > 0 which implies p j ≤ 2( Q + q). Finally, for each item j  ∈ X 0 , it must be p j  = p j  since q j  = q j  . Hence, we have

 rev (X, p) ≤ 4k Q + 2(k + 1)q + v 2

5 2

 Q + (λ − 2k)q

28

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

1 Q − 2kq + k Q (λ + 1)/2

5





5

= 4k Q + 2(k + 1)q + Q + (λ − 2k)q + Q + (λ − 2k)q 2 λ Q k + Q − 2kq + λq 2   (2(λ − 2k)q + 5Q )(k Q (λ + 1) + 2Q − 4kq) 5 = 4k + Q + (λ + 2)q + 2 4λ((λ − 2k)q + (k + 1) Q ) k Q (λ + 1) + 2Q < (4k + 3) Q + (λ + 2)q + 2λ < (4k + 3) Q + (λ + 2)q + k Q = (5k + 3) Q + (λ + 2)q, where the first strict inequality follows from 2(k + 1) > 5 and the second one follows from k + 2 < kλ. Hence, we can conclude that, when X falls into one of the cases from (1) to (4), for any pricing vector p such that (X, p) is envy-free, it holds that rev (X, p) < (5k + 3) Q + (λ + 2)q. In the remaining of this proof, we restrict to the case in which X falls into case (5). Lemma 14. If there exists a positive answer to I , then there exists an envy-free outcome for (V, D, Q) of revenue greater than 2(λ − 2k)q. Proof. Consider the allocation vector X such that X 0 contains the k items of quality Q + q, X 1 contains k items of quality Q , X 3 contains the item of quality Q /2 plus the k − 1 items forming a positive answer to I , X 5 contains the λ − 2k items of quality q and X 2 = X 4 = ∅. Note that X is monotone. We showthat the p) is envy-free.  outcome (X,  (λ−2k)q According to the price vector  p, it holds that  pj = + 3 + λ1 k

Q 2



q

λ for each j

∈ X0 ,  pj =

(3λ+1) Q −2q for each 2λ

(λ+1)q −q

j j ∈ X1 ,  pj = for each j ∈ X 3 and  p j = q for each j ∈ X 5 . λ  Because of Lemma 5, in order to show that (X,  p) is envy-free, we only need to prove that j ∈ T u i j ≤ 0, for each buyer i∈ / W (X) and T ⊆ M with | T | = di . Note that the buyers not belonging to W (X) are buyers 2 and 4. For buyer 2, for each pair of items ( j , j  ) with j ∈ X 0 and j  ∈ X 1 , it holds that u 2 j < u 2 j  , for each pair of items ( j  , j  ) with j  ∈ X 1 and j  ∈ X 3 , it holds that u 2 j  < u 2 j  and, for each pair of items ( j  , j  ) with j  ∈ X 1 and j  ∈ X 5 , it holds that u 2 j  < u 2 j  . In fact, we have

u2 j − u2 j =

λq

>

− 2q − v 2 q  λ −4 q

k



k

> 0, where the first inequality follows from v 2 < 2 and the second one follows from λ > 4k;

u 2 j  − u 2 j  = v 2 q j − q j −

>

1



λ 

Q

− v2 Q +

3 2

Q +

Q 2λ

−qj

2

λ > 0,

qj

where the first inequality follows from 1 < v 2 < 3/2 and the second one follows from q j < Q /2 for each j ∈ X 3 ; and

u 2 j  − u 2 j  = v 2 q − q − v 2 Q +

3 2

Q +

Q 2λ



q

λ

> 0, where the inequality follows from 1 < v 2 < 3/2 and q < Q /2. Hence, the set of items of cardinality d2 which gives the highest utility to buyer 2 is T = X 1 ∪ X 3 ∪ X 5 . We have





v 2q j −  p j = k v2 Q −

j∈T

3 2

Q −

Q 2λ

+

q

λ



+ v2 Q − Q −

Q

λ

+

kq

λ

+ (λ − 2k)( v 2 q − q)

= 0. For buyer 4, for each pair of items ( j , j  ) with j ∈ X 0 and j  ∈ X 1 , it holds that u 4 j < u 4 j  , for each pair of items ( j  , j  ) with j  ∈ X 1 and j  ∈ X 3 , it holds that u 4 j  < u 4 j  and, for each pair of items ( j  , j  ) with j  ∈ X 1 and j  ∈ X 5 , it holds that u 4 j  < u 4 j  . In fact, we have

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

u4 j − u4 j =

29

λq

>

− 2q − v 4 q  λ −4 q

k



k

> 0, where the first inequality follows from v 4 < 2 and the second one follows from λ > 4k;

u 4 j  − u 4 j  = v 4 q j − q j −

>

1



Q 2

λ > 0,

qj

λ 

− v4 Q +

3 2

Q +

Q 2λ

−qj

where the first inequality follows from 1 < v 4 < 3/2 and the second one follows from q j < Q /2 for each j ∈ X 3 ; and

u 4 j  − u 4 j  = v 4 q − q − v 4 q j + q j +



= (q j − q) 1 +

1

λ



qj

λ



q

λ

− v4

>0 where the inequality follows from v 4 < 1 + 1/λ and q j > q for each j ∈ X 3 . Hence, the set of items of cardinality d4 which gives the highest utility to buyer 4 is T = X 3 ∪ X 5 . We have



v 4q j −  p j = v4 Q − Q −

j∈T

Q

λ

+

kq

λ

+ (λ − 2k)( v 4 q − q)

= 0. Hence, we can conclude that the outcome (X,  p) is envy-free and rev (X,  p) > 2(λ − 2k)q.

2

We continue by showing that, for any envy-free outcome (X, p) falling into case (5) and such that X 1 contains an item of quality Q + q, it holds that rev (X, p) < (λ + 2)q + (4k + 3) Q . Note that, in such a case, by Lemma 1, X 0 can only contain items of quality Q + q. For any pricing vector p such that (X, p) is envy-free, there must exist an item j  ∈ X 5 such that p j  ≤ q j  . Let j  be the index of the item of quality Q + q belonging to X 1 . By the envy-freeness of (X, p), we have

u 1 j  = 2( Q + q) − p j 

≥ 2q j  − p j  = q j which implies p j  < 2( Q + q). Clearly, since (X, p) is envy-free, for each item j ∈ X 0 , it must be p j = p j  since q j = q j  . Hence, rev (X, p) < 4k Q + 2(k + 1)q + 32 v 3 Q + (λ − 2k)q < (λ + 2)q + (4k + 3) Q because v 3 < 2. Since (λ + 2)q + (4k + 3) Q < (λ + 2)q + (5k + 3) Q , it follows that, either when X falls into case (5) and X 1 contains an item of quality Q + q or X falls into one of the cases from (1) to (4), for any pricing vector p such that (X, p) is envy-free, rev (X, p) ≤ (λ + 2)q + (5k + 3) Q . Now we are only left to consider envy-free outcomes (X, p) such that X falls into case (5) and X 1 does not contain any item of quality Q + q. Assume that j ∈ X 3 > Q . This can only happen when buyer 3 is assigned an item of quality at least Q /2. In such a case, since X 1 does not contain any item of quality Q + q, it can only be the case that each item in X 1 is of quality Q and X 3 gets the item of quality Q /2. This means that the items allocated by X to buyers 1, 3 and 5 are drawn from the same instance (V, D, Q)  considered in the proof of Theorem 1. Hence, we can replicate the arguments used in the proof of Lemma 8 to show that j ∈ X 3 > Q yields a contradiction. Similarly, assume that j ∈ X 3 < Q . This can only happen when the items allocated by X to buyers 3 and 5 are drawn from the same instance (V, D, Q)considered in the proof of Theorem 1. Hence, we can replicate the arguments used in the proof of Lemma 9 to show that j ∈ X 3 < Q yields a contradiction. We can conclude that  there exists an envy-free outcome (X, p) falling into case (5) in which no item of quality Q + q belongs to X 1 only if j ∈ X 3 q j = Q . Since, as we have already observed, in such a case the item of quality Q /2 has to belong to X 3 , it follows that there exists an envy-free outcome (X, p) falling into case (5) in which no item of quality Q + q

30

V. Bilò et al. / Theoretical Computer Science 662 (2017) 9–30

belongs to X 1 only if there are k − 1 items inherited from I whose sum is exactly Q /2, that is, only if I admits a positive solution. Any other envy-free outcome can raise a revenue of at most (λ + 2)q + (5k + 3) Q . Hence, if there exists a positive answer to I , then, by Lemma 14, there exists a solution to (V, D, Q) of revenue strictly greater than 2(λ − 2k)q, while, if there is no positive answer to I , then there exists no solution to (V, D, Q) of revenue more than (λ + 2)q + (5k + 3) Q . 2(λ−2k)q Thus, if there exists an r-approximation algorithm for the RMPSD on proper instances with r ≤ (λ+2)q+(5k+3) Q , it is then possible to decide in polynomial time the Constrained Partition problem, thus implying P = NP. By λ ≥ 2, it follows that

2(λ−2k)q (λ+2)q+(5k+3) Q

4(k+1)



+ (5k+3)( q2− ) Q −

≥ 2 −  which implies the claim. 2

6. Conclusions We have studied the approximability of the RMPSD: an NP-complete problem introduced in [9]. We have shown that a simple greedy algorithm provides an m-approximation of the optimal solution and that this approximation guarantee is essentially the best one can hope for, unless P = NP. In fact, by exploiting a gap-preserving reduction, we have proved that any approximation algorithm for the RMPSD achieving an approximation guarantee of O (m1− ), for some  > 0, can be used to efficiently decide the Constrained Partition problem: a special case of the Partition problem that remains NP-complete. We note that our inapproximability result is due to the presence of useless buyers: buyers who can never be assigned bundles of items in any envy-free outcome, that is, their role is to generate envy only. For such a reason, we focus on the approximability of instances of the RMPSD avoiding useless buyers. For this type of instances, we design a 2-approximation algorithm and show, once again, that this guarantee is the best one can hope for unless P = NP. It is important to note that useless buyers can be detected in polynomial time and that discarding them from a given instance does not worsen the value of the optimal solution. This observation opens an intriguing research direction in pricing problems, that is, that of determining the set of buyers to be discarded so as to maximize the seller’s revenue in an envy-free outcome. References [1] G. Aggarwal, T. Feder, R. Motwani, A. Zhu, Algorithms for multi-product pricing, in: Proceedings of the 31st International Colloquium on Automata, Languages, and Programming, ICALP 2004, pp. 72–83. [2] A. Bezjian-Avery, B. Calder, D. Iacobucci, New media interactive advertising vs. traditional advertising, J. Advert. Res. (1998) 23–32. [3] V. Bilò, M. Flammini, G. Monaco, Approximating the revenue maximization problem with sharp demands, in: Proceedings of the 14th Scandinavian Symposium and Workshops on Algorithmic Theory, SWAT 2014, pp. 74–85. [4] P. Briest, Uniform budgets and the envy-free pricing problem, in: Proceedings of the 35th International Colloquium on Automata, Languages and Programming, ICALP 2008, pp. 808–819. [5] P. Chalermsook, J. Chuzhoy, S. Kannan, S. Khanna, Improved hardness results for profit maximization pricing problems with unlimited supply, in: Proceedings of the 15th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, APPROX 2012, pp. 73–84. [6] P. Chalermsook, B. Laekhanukit, D. Nanongkai, Independent set, induced matching, and pricing: connections and tight (subexponential time) approximation hardnesses, in: Proceedings of the 54th Annual Symposium on Foundations of Computer Science, FOCS 2013, pp. 370–379. [7] P. Chalermsook, B. Laekhanukit, D. Nanongkai, Graph products revisited: tight approximation hardness of induced matching, poset dimension and more, in: Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, pp. 1557–1576. [8] N. Chen, X. Deng, Envy-free pricing in multi-item markets, in: Proceedings of the 37th International Colloquium on Automata, Languages and Programming, ICALP 2010, pp. 418–429. [9] N. Chen, X. Deng, P.W. Goldberg, J. Zhang, On revenue maximization with sharp multi-unit demands, J. Comb. Optim. 31 (3) (2016) 1174–1205. [10] N. Chen, A. Ghosh, S. Vassilvitskii, Optimal envy-free pricing with metric substitutability, SIAM J. Comput. 40 (3) (2011) 623–645. [11] E.D. Demaine, U. Feige, M. Hajiaghayi, M.R. Salavatipour, Combination can be hard: approximability of the unique coverage problem, SIAM J. Comput. 38 (4) (2008) 1464–1483. [12] X. Deng, P. Goldberg, Y. Sun, B. Tang, J. Zhang, Pricing ad slots with consecutive multi-unit demand, in: Proceedings of the 6th International Symposium on Algorithmic Game Theory, SAGT 2013, pp. 255–266. [13] X. Deng, P.W. Goldberg, B. Tang, J. Zhang, Multi-unit Bayesian auction with demand or budget constraints, Comput. Intell. 32 (3) (2016) 355–368. [14] X. Deng, Y. Sun, M. Yin, Y. Zhou, Mechanism design for multi-slot ADS auction in sponsored search markets, in: Proceedings of the Fourth International Frontiers of Algorithmics Workshop, FAW 2010, pp. 11–22. [15] B. Edelman, M. Ostrovsky, M. Schwarz, Internet advertising and the generalized second-price auction, Amer. Econ. Rev. 97 (1) (2007) 242–259. [16] M. Feldman, A. Fiat, S. Leonardi, P. Sankowski, Revenue maximizing envy-free multi-unit auctions with budgets, in: Proceedings of the ACM Conference on Electronic Commerce, EC 2012, pp. 532–549. [17] M. Feldman, N. Gravin, B. Lucier, Combinatorial Walrasian equilibrium, SIAM J. Comput. 45 (1) (2016) 29–48. [18] V. Guruswami, J.D. Hartline, A.R. Karlin, D. Kempe, C. Kenyon, F. McSherry, On profit-maximizing envy-free pricing, in: Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2005, pp. 1164–1173. [19] P. Glynn, P. Rusmevichientong, B. Van Roy, A non-parametric approach to multi-product pricing, Oper. Res. 54 (1) (2006) 82–98. [20] G. Monaco, P. Sankowski, Q. Zhang, Revenue maximization envy-free pricing for homogeneous resources, in: Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, pp. 90–96. [21] N. Nisan, J. Bayer, D. Chandra, T. Franji, R. Gardner, Y. Matias, N. Rhodes, M. Seltzer, D. Tom, H. Varian, D. Zigmond, Google’s auction for TV Ads, in: Proceedings of the 36th International Colloquium on Automata, Languages and Programming, ICALP 2009, pp. 309–327. [22] G. Rosenkrans, The creativeness and effectiveness of online interactive rich media advertising, J. Interact. Advert. 9 (2) (2009). [23] A.D. Shocker, V. Srinivasan, Multiattribute approaches for product concept evaluation and generation: a critical review, J. Mark. Res. 16 (1979) 159–180. [24] W. Vickrey, Counterspeculation, auctions, and competitive sealed tenders, J. Finance 16 (1961) 8–37. [25] L. Walras, Elements of Pure Economics, Allen and Unwin, 1954.