Abstract
In general, the unit-demand envy-free pricing problem has proven to be APX-hard, but some special cases can be optimally solved in polynomial time. When substitution costs that form a metric space are included, the problem can be solved in time, and when the number of consumers is equal to the number of items—all with a single copy so that each consumer buys an item—a time method is presented to solve it. This work shows that the first case has similarities with the second, and, by exploiting the structural properties of the costs set, it presents a time algorithm for solving it when a competitive equilibrium is considered or a time algorithm for more general scenarios. The methods are based on a dynamic programming strategy, which simplifies the calculations of the shortest paths in a network; this simplification is usually adopted in the second case. The theoretical results obtained provide efficiency in the search for optimal solutions to specific revenue management problems.
1. Introduction
Suppose that a seller has n different items, each one with copies, and there are m consumers, each interested in buying a single copy of an item. The seller knows the valuation , the largest amount that consumer i is willing to pay for a copy of item j. If consumer i buys a copy of item j, their utility is , which is the difference between the valuation and the purchase price. The seller needs to decide which item j (a copy of it) will be sold (or not) to consumer i, i.e., to set an allocation of items, and what the price of each item will be so that consumers who buy a copy of the same item pay the same price for it, and the copy of item j sold to consumer i is the one that maximizes their (non-negative) utility, thus satisfying the envy-freeness (the concept of envy-freeness used in this work is different from that introduced by Foley [1], in which all buyers prefer their allocations to the allocations obtained by other agents, which some recent authors, such as Bilò et al. [2], Brânzei et al. [3], and Monaco et al. [4] call pair envy-freeness) property. The goal is to maximize the revenue from the sale of copies of items, i.e., the sum of prices of all copies sold.
The problem above is the unit-demand envy-free pricing problem (UDEFP), and was presented by Guruswami et al. [5], after which several variants and special cases were studied. These authors have shown that the general problem is APX-hard, even if each item exists in unlimited supply and each consumer has equal valuations (of either 1 or 2) for all of the items in which they have any interest. In addition, they provided a -approximation algorithm based on a maximum-weight-matching strategy.
Chen et al. [6] considered the following case of the UDEFP: The seller has a single item with unlimited supply, and n consumers are in different locations. Each consumer i assigns a valuation to the item if the purchase is made in their own location and a substitution cost that is subtracted from if the purchase is made in location j. In addition, the cost set has a metric space structure (that is, the function satisfies, for any , 1) (identity of indiscernibles), (symmetry), and (triangle inequality)), which they called metric substitutability. Thus, if consumer i buys the item at location j, their utility is . In this scenario, they showed that the problem can be solved optimally in polynomial time by proving that every consumer receives an item in their own location; then, a perfect graph with vertices is constructed, and in this graph is found a maximum-weighted independent set whose weight corresponds to the optimal revenue. Therefore, by using the ellipsoid method [7], this strategy takes time to find a maximum-weighted independent set and, thus, an optimal envy-free pricing.
Another special case of the UDEFP that can be solved optimally in polynomial time was studied by Arbib et al. [8]. They considered that the items have a single copy and the number of consumers is equal to the number of items, i.e., , which they called envy-free perfect matching (EFPM), so that each consumer buys an item. A maximum-weight perfect matching in the bipartite graph of consumers and items was used to find the allocation, and then a network consisting of nodes and arcs was constructed, whose shortest paths from nodes to an auxiliary node 0 coincided with the envy-free prices of the corresponding items. Therefore, by using a Fibonacci heap [9] to find a maximum-weight perfect matching and the Bellman–Ford algorithm [10] to find the shortest paths, this strategy took time to find an optimal envy-free pricing.
This work aims to reduce the time complexity in the search for an optimal envy-free pricing in the UDEFP in the metric substitutability case. The main hypothesis that led the authors to pursue this goal is that the validity of the triangular inequality on the substitution costs provides a means of simplifying the search for the shortest paths in the constructed network in order to model the problem, thus providing the development of a combinatorial algorithm that runs in cubic time for this special case. Therefore, by proving that UDEFP with metric substitutability is, in some sense, a particular case of EFPM, we show that it is possible to reduce the time complexity involved in finding optimal solutions for that case.
2. Materials and Methods
2.1. Literature Review
To create an intuition aimed at increasing the performance in the search for optimal solutions for the UDEFP with metric substitutability, the strategies used in the heuristics, approximation algorithms, and exact methods proposed in the works about the UDEFP that were found were analyzed. Table 1 shows a summary of the results in particular cases of the UDEFP, in addition to those already mentioned in the introduction.
Table 1.
Algorithmic results for the UDEFP.
2.2. The Algorithms’ Design Scheme
To design our algorithms, first, we transform an instance of the UDEFP with metric substitutability into an instance of the EFPM. The properties of the main diagonal of the valuation matrix in this new approach are used to define an allocation. A network whose arc lengths are based on specific relations of the entries of the valuation matrix is constructed and, since the shortest paths to a single target node correspond to the envy-free prices that maximize the revenue, we use the triangle inequality to simplify the calculations of these shortest paths with a dynamic programming strategy instead of resorting to the use of the Bellman–Ford algorithm.
3. Results
3.1. Clearing Prices
First, let us consider that all consumers buy the item. In this way, the allocation and pricing are determined so that there is a market-clearing competitive equilibrium, and the solutions are Pareto Efficient [17].
3.1.1. Reduction of the Udefp with Metric Substitutability into the Efpm
An instance of the UDEFP with metric substitutability consists of: n, the number of consumers; , the valuation of consumer i if the item is purchased in their own location; , the substitution cost that is subtracted from if the purchase is made in location j, such that the cost set has a metric space structure. These instances can be modeled as vertex- and edge-weighted undirected graphs, as shown in Figure 1.
Figure 1.
An instance of the UDEFP with metric substitutability.
For the EFPM, an instance consists of n, the number of consumers and items, and , the valuation matrix. These instances can be modeled as bipartite edge-weighted graphs , where I represents the consumer set, J represents the item set, and the weight of the edge connecting vertex i to vertex j represents the valuation assigned by consumer i for item j, as shown in Figure 2.
Figure 2.
An instance of the EFPM.
Thus, setting for all , it is easy to see that, from the abstract point of view, the UDEFP with metric substitutability is a particular case of the EFPM. With this approach, the rows of V represent the consumers, and the columns represent the locations.
3.1.2. Allocation
From the First Welfare Theorem [17], we know that an optimal allocation for the EFPM maximizes the social welfare, i.e., the sum of valuations of the buyers for their allocations. In terms of mathematical linear programming, this allocation is a solution for the model:
This linear program also models the maximum-weight perfect matching in the bipartite graph shown in Figure 2. Since for all with , we have that the n-by-n identity matrix is the one that maximizes , i.e., the sum of the elements on the main diagonal of , where is an n-by-n permutation matrix. Thus, the solution of the model above is if or otherwise, where are the binary variables.
These considerations about the optimal allocation allow us to state the following proposition.
Proposition 1.
Every consumer buys the item in their own location.
3.1.3. Pricing
Once an allocation is found, let us consider the following network: The set of nodes consists of nodes ; there is an arc from each node to node 0 with weight ; there is an arc from node i to node j for all such that with weight . Thus, the shortest paths from nodes to node 0 correspond to the envy-free prices [8]. The network is shown in Figure 3.
Figure 3.
The network constructed to find the envy-free prices.
Instead of using the Bellman–Ford algorithm to find the shortest paths to node 0, we will explore the metric structure of the cost set to simplify the calculations, but, before that, we will see that it is possible to find a particular price without having to calculate the corresponding shortest path.
Lemma 1.
If , then .
Proof.
In fact, if , the envy-freeness condition of non-negative maximum utility is violated. If , the other prices would be forced down until the other buyers’ utilities were at least for all , and then the prices would not maximize the revenue, from which the results follow. □
We are now able to iteratively find the remaining prices from this first discovery.
Lemma 2.
If , then for all .
Proof.
From the metric structure of the cost set, we have for all . Thus, the shortest path from node i to node 0 consists of either the arc connecting node i to node 0 with weight or the arcs connecting node i to some node j and node j to node 0 with weights and , respectively. Since for all , we have for all , and then for all with , from which the results follow. □
3.1.4. The Algorithm
The considerations made above allow us to present an algorithm for finding an optimal solution for the UDEFP with metric substitutability and clearing prices. The procedure is described in the following Algorithm 1.
| Algorithm 1 Find an optimal clearing envy-free pricing. |
|
This algorithm allows us to state the following theorem:
Theorem 1.
The UDEFP with metric substitutability and clearing prices can be solved optimally in time.
Proof.
Lemma 1 ensures that Line 2 returns an optimal price for consumer , and Lemma 2 ensures that Line 3 returns optimal prices for the others. The permutation in Line 1 can be performed in with any classical sorting algorithm, and Line 3 performs times operations. Therefore, the overall time complexity of the algorithm is . □
3.2. General Scenario
In some cases, it may happen that not selling the item in some locations may increase revenue. As an example, let us consider two consumers with , and . Thus, = (5, 4) is the optimal clearing envy-free pricing with revenue 9, but = (10, 10) is an envy-free pricing with revenue 10, where consumer 2 does not buy the item.
It is clear that Proposition 1 also holds in the general scenario (since higher valuations produce higher prices), with the following modification:
Proposition 2.
Every buyer makes the purchase in their own location.
Instead of using brute force to check all of sub-allocation combinations of the allocation defined in Section 3.1.2, it is easy to see that we just need to look at allocations to higher-valued consumers. Thus, if , we can compute the prices and revenue of the leading principal submatrices of the valuation matrix V, and then we choose the allocation and prices with the highest revenue. The procedure is described in the following Algorithm 2.
| Algorithm 2 Find an optimal envy-free pricing. |
|
This second algorithm allows us to state the following theorem.
Theorem 2.
The UDEFP with metric substitutability can be solved optimally in time.
Proof.
It is easy to see that the highest computational cost is in Line 2. This line performs n times operations with Theorem 1, from which the result follows. □
4. Discussion and Conclusions
Our results about the properties of optimal allocations and envy-free prices are in agreement with those presented by Chen et al. [6]: Each consumer who buys the item makes the purchase in their own location, and the price paid by a consumer is either the valuation in their own location or the price paid by another consumer plus its substitution cost for the location of that consumer, i.e., for each buyer , we have or for some (more specifically, ), with .
In order to justify this last statement, let us suppose that there is an i such that for some with . This implies that , and then for some . Since , we would have , and then , which is a contradiction.
Our approach to the UDEFP with metric substitutability in terms of EFPM allowed, in addition to the presentation of alternative theoretical proofs, the reduction of the time complexity in the search for optimal solutions to the problem. Furthermore, we note that the symmetry property of the cost set was not required in order to find an optimal envy-free pricing. Thus, we can assume that does not necessarily have to be equal to (but positive) when , which adds more subjectivity to the modeling of the problem, making it more realistic. In this way, the instances of the UDEFP with metric substitutability become networks with weights on nodes and arcs (see Figure 4).
Figure 4.
An instance of the UDEFP with metric substitutability and non-symmetric costs.
An interesting question that can be studied in future work is the verification of whether, by strengthening the triangular inequality and transforming the cost set into an ultrametric space, the UDEFP with (ultra)metric substitutability can be optimally solved in a time less than in the competitive equilibrium scenario or less than in general.
Author Contributions
M.M.S. contributed with the algorithms. M.S.J. contributed with the mathematical formalizations. J.G.C. contributed with the methodology and the organization of the text. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Foley, D.K. Resource allocation and the public sector. Yale Econ. Essays 1967, 7, 45–98. [Google Scholar]
- Bilò, V.; Flammini, M.; Monaco, G. Approximating the Revenue Maximization Problem with Sharp Demands. Theor. Comput. Sci. 2017, 662, 9–30. [Google Scholar] [CrossRef][Green Version]
- Brânzei, S.; Filos-Ratsikas, A.; Miltersen, P.B.; Zeng, Y. Walrasian Pricing in Multi-Unit Auctions. arXiv 2017, arXiv:1602.08719. [Google Scholar]
- Monaco, G.; Sankowski, P.; Zhang, Q. Revenue Maximization Envy-free Pricing for Homogeneous Resources. In Proceedings of the 24th International Conference on Artificial Intelligence (IJCAI’15), Buenos Aires, Argentina, 25–31 July 2015; pp. 90–96. [Google Scholar]
- Guruswami, V.; Hartline, J.D.; Karlin, A.R.; Kempe, D.; Kenyon, C.; McSherry, F. On Profit-maximizing Envy-free Pricing. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA’05, Vancouver, BC, Canada, 23–25 January 2005; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2005; pp. 1164–1173. [Google Scholar]
- Chen, N.; Ghosh, A.; Vassilvitskii, S. Optimal envy-free pricing with metric substitutability. SIAM J. Comput. 2011, 40, 623–645. [Google Scholar] [CrossRef]
- Grötschel, M.; Lovász, L.; Schrijver, A. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica 1981, 1, 169–197. [Google Scholar] [CrossRef]
- Arbib, C.; Karaşan, O.; Pınar, M. On envy-free perfect matching. Discret. Appl. Math. 2019, 261, 22–27. [Google Scholar] [CrossRef]
- Fredman, M.L.; Tarjan, R.E. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM (JACM) 1987, 34, 596–615. [Google Scholar] [CrossRef]
- Bellman, R. On a routing problem. Q. Appl. Math. 1958, 16, 87–90. [Google Scholar] [CrossRef]
- Hartline, J.D.; Koltun, V. Near-optimal pricing in near-linear time. In Workshop on Algorithms and Data Structures; Springer: Berlin/Heidelberg, Germany, 2005; pp. 422–431. [Google Scholar]
- Günlük, O. A pricing problem under Monge property. Discret. Optim. 2008, 5, 328–336. [Google Scholar] [CrossRef][Green Version]
- Shioda, R.; Tunçel, L.; Myklebust, T.G.J. Maximum utility product pricing models and algorithms based on reservation price. Comp. Opt. Appl. 2011, 48, 157–198. [Google Scholar] [CrossRef]
- Chen, N.; Deng, X. Envy-free pricing in multi-item markets. ACM Trans. Algorithms (TALG) 2014, 10, 1–15. [Google Scholar] [CrossRef]
- Myklebust, T.G.J.; Sharpe, M.A.; Tunçel, L. Efficient heuristic algorithms for maximum utility product pricing problems. Comput. OR 2016, 69, 25–39. [Google Scholar] [CrossRef]
- Anshelevich, E.; Kar, K.; Sekar, S. Envy-Free Pricing in Large Markets: Approximating Revenue and Welfare. ACM Trans. Econ. Comput. 2017, 5, 16:1–16:42. [Google Scholar] [CrossRef]
- Nisan, N.; Roughgarden, T.; Tardos, E.; Vazirani, V.V. Algorithmic Game Theory; Cambridge University Press: New York, NY, USA, 2007. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).