Next Article in Journal
Ensembling EfficientNets for the Classification and Interpretation of Histopathology Images
Next Article in Special Issue
A Branch-and-Bound Algorithm for Polymatrix Games ϵ-Proper Nash Equilibria Computation
Previous Article in Journal
Rough Estimator Based Asynchronous Distributed Super Points Detection on High Speed Network Edge
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Communication

Short Communication: Optimally Solving the Unit-Demand Envy-Free Pricing Problem with Metric Substitutability in Cubic Time

by
Marcos M. Salvatierra
*,
Mario Salvatierra, Jr.
and
Juan G. Colonna
Institute of Computing, Federal University of Amazonas, Manaus 69067-005, Brazil
*
Author to whom correspondence should be addressed.
Algorithms 2021, 14(10), 279; https://doi.org/10.3390/a14100279
Submission received: 8 September 2021 / Revised: 22 September 2021 / Accepted: 23 September 2021 / Published: 26 September 2021
(This article belongs to the Special Issue Algorithmic Game Theory 2021)

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 O ( n 4 ) 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 O ( n 3 ) 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 O ( n 2 ) time algorithm for solving it when a competitive equilibrium is considered or a O ( n 3 ) 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 c j copies, and there are m consumers, each interested in buying a single copy of an item. The seller knows the valuation  v i j , 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 v i j p j , 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 O ( log n ) -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 v i to the item if the purchase is made in their own location and a substitution cost δ i j that is subtracted from v i if the purchase is made in location j. In addition, the cost set { δ i j } 1 i , j n has a metric space structure (that is, the function δ : { 1 , , n } 2 R satisfies, for any 1 i , j , k n , 1) δ i j = 0 i = j (identity of indiscernibles), δ i j = δ j i (symmetry), and δ i j δ i k + δ k j (triangle inequality)), which they called metric substitutability. Thus, if consumer i buys the item at location j, their utility is v i ( p j + δ i j ) . 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 O ( n 2 ) 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 O ( n 4 ) 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., m = n , 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 n + 1 nodes and n 2 arcs was constructed, whose shortest paths from nodes 1 j n 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 O ( n 3 ) 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.

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; v i , the valuation of consumer i if the item is purchased in their own location; δ i j , the substitution cost that is subtracted from v i if the purchase is made in location j, such that the cost set { δ i j } 1 i , j n has a metric space structure. These instances can be modeled as vertex- and edge-weighted undirected graphs, as shown in Figure 1.
For the EFPM, an instance consists of n, the number of consumers and items, and V = ( v i j ) , the valuation matrix. These instances can be modeled as bipartite edge-weighted graphs G = G ( I J , E ) , 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.
Thus, setting v i j = v i δ i j for all 1 i , j n , 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:
max i = 1 n j = 1 n x i j v i j s . t . j = 1 n x i j = 1 , 1 i n i = 1 n x i j = 1 , 1 j n x i j { 0 , 1 } , 1 i , j n .
This linear program also models the maximum-weight perfect matching in the bipartite graph shown in Figure 2. Since v i i = v i > v i δ i j = v i j for all 1 i , j n with i j , we have that the n-by-n identity matrix is the one that maximizes t r ( Π T V ) , i.e., the sum of the elements on the main diagonal of Π T V , where Π is an n-by-n permutation matrix. Thus, the solution of the model above is x i j = 1 if i = j or x i j = 0 otherwise, where x i j 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 0 , 1 , , n ; there is an arc from each node 1 i n to node 0 with weight v i i = v i ; there is an arc from node i to node j for all 1 i , j n such that i j with weight v i i v i j = δ i j . Thus, the shortest paths from nodes 1 i n to node 0 correspond to the envy-free prices p 1 , , p n [8]. The network is shown in Figure 3.
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 v 1 v 2 v n , then p 1 = v 1 .
Proof. 
In fact, if p 1 > v 1 , the envy-freeness condition of non-negative maximum utility is violated. If p 1 < v 1 , the other prices would be forced down until the other buyers’ utilities were at least v i 1 p 1 for all 2 i n , 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 v 1 v 2 v n , then p i = min 1 j < i { v i , v j + δ i j } for all 2 i n .
Proof. 
From the metric structure of the cost set, we have δ i j δ i k + δ k j for all 1 i , j , k n . Thus, the shortest path from node i to node 0 consists of either the arc connecting node i to node 0 with weight v i or the arcs connecting node i to some node j and node j to node 0 with weights δ i j and v j , respectively. Since v i v k for all i k , we have v i v k + δ i k for all i k , and then min 1 j < i { v i , v j + δ i j } v k + δ i k for all 2 i n with i k , 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.
 1:
Perform a permutation π such that v π 1 ( 1 ) v π 1 ( 2 ) v π 1 ( n )
 2:
p π 1 ( 1 ) v π 1 ( 1 )
 3:
p π 1 ( i ) min 1 j < i { v π 1 ( i ) , v π 1 ( j ) + δ π 1 ( i ) π 1 ( j ) } for all 2 i n
This algorithm allows us to state the following theorem:
Theorem 1.
The UDEFP with metric substitutability and clearing prices can be solved optimally in O ( n 2 ) time.
Proof. 
Lemma 1 ensures that Line 2 returns an optimal price for consumer π 1 ( 1 ) , and Lemma 2 ensures that Line 3 returns optimal prices for the others. The permutation in Line 1 can be performed in O ( n 2 ) with any classical sorting algorithm, and Line 3 performs n 1 times O ( n ) operations. Therefore, the overall time complexity of the algorithm is O ( n 2 ) . □

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 v 1 = 10 , v 2 = 4 , and δ 12 = δ 21 = 1 . Thus, p = (5, 4) is the optimal clearing envy-free pricing with revenue 9, but p = (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 v 1 v 2 v n , 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.
 1:
Perform a permutation σ such that v σ 1 ( 1 ) v σ 1 ( 2 ) v σ 1 ( n )
 2:
Use Algorithm 1 to compute the prices in the k-by-k matrix of consumers σ 1 ( 1 ) , , σ 1 ( k ) for all 1 k n . If k < n , p i v σ 1 ( 1 ) for all k < i n
 3:
Choose the allocation and prices that generate the maximum revenue
This second algorithm allows us to state the following theorem.
Theorem 2.
The UDEFP with metric substitutability can be solved optimally in O ( n 3 ) time.
Proof. 
It is easy to see that the highest computational cost is in Line 2. This line performs n times O ( n 2 ) 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 1 i n , we have p i = v i or p i = p j + δ i j for some j i (more specifically, j < i ), with p j = v j .
In order to justify this last statement, let us suppose that there is an i such that p i = v j + δ i j for some j < i with v j p j . This implies that p j < v j , and then p j = v k + δ j k for some k < j . Since δ i k δ i j + δ j k , we would have v k + δ i k v k + δ i j + δ j k = p j + δ i j < v j + δ i j , and then p i min 1 j < i { v i , v j + δ i j } , 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 δ i j does not necessarily have to be equal to δ j i (but positive) when i j , 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).
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 O ( n 2 ) in the competitive equilibrium scenario or less than O ( n 3 ) 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

  1. Foley, D.K. Resource allocation and the public sector. Yale Econ. Essays 1967, 7, 45–98. [Google Scholar]
  2. 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]
  3. Brânzei, S.; Filos-Ratsikas, A.; Miltersen, P.B.; Zeng, Y. Walrasian Pricing in Multi-Unit Auctions. arXiv 2017, arXiv:1602.08719. [Google Scholar]
  4. 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]
  5. 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]
  6. Chen, N.; Ghosh, A.; Vassilvitskii, S. Optimal envy-free pricing with metric substitutability. SIAM J. Comput. 2011, 40, 623–645. [Google Scholar] [CrossRef]
  7. 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]
  8. Arbib, C.; Karaşan, O.; Pınar, M. On envy-free perfect matching. Discret. Appl. Math. 2019, 261, 22–27. [Google Scholar] [CrossRef] [Green Version]
  9. 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]
  10. Bellman, R. On a routing problem. Q. Appl. Math. 1958, 16, 87–90. [Google Scholar] [CrossRef] [Green Version]
  11. 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]
  12. Günlük, O. A pricing problem under Monge property. Discret. Optim. 2008, 5, 328–336. [Google Scholar] [CrossRef] [Green Version]
  13. 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]
  14. Chen, N.; Deng, X. Envy-free pricing in multi-item markets. ACM Trans. Algorithms (TALG) 2014, 10, 1–15. [Google Scholar] [CrossRef]
  15. 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] [Green Version]
  16. 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]
  17. Nisan, N.; Roughgarden, T.; Tardos, E.; Vazirani, V.V. Algorithmic Game Theory; Cambridge University Press: New York, NY, USA, 2007. [Google Scholar]
Figure 1. An instance of the UDEFP with metric substitutability.
Figure 1. An instance of the UDEFP with metric substitutability.
Algorithms 14 00279 g001
Figure 2. An instance of the EFPM.
Figure 2. An instance of the EFPM.
Algorithms 14 00279 g002
Figure 3. The network constructed to find the envy-free prices.
Figure 3. The network constructed to find the envy-free prices.
Algorithms 14 00279 g003
Figure 4. An instance of the UDEFP with metric substitutability and non-symmetric costs.
Figure 4. An instance of the UDEFP with metric substitutability and non-symmetric costs.
Algorithms 14 00279 g004
Table 1. Algorithmic results for the UDEFP.
Table 1. Algorithmic results for the UDEFP.
Problem PropertiesResultAuthor, Year
The number of items n is constant ( 1 + ϵ ) -approximation algorithmHartline and Koltun, 2005 [11]
The consumers’ valuations satisfy the Monge property O ( m n 2 ) exact algorithmGünlük, 2008 [12]
Consumers grouped into segmentsHeuristic algorithmsShioda et al., 2011 [13]
Every buyer evaluates at most two items with a positive valuation O ( m 2 n 2 ) exact algorithmChen and Deng, 2014 [14]
Consumers grouped into segmentsHeuristic algorithmsMykelbust et al., 2016 [15]
m > > n ; the valuations of every buyer type come from the same support1.88-approximation algorithmAnshelevich et al., 2017 [16]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Salvatierra, M.M.; Salvatierra, M., Jr.; Colonna, J.G. Short Communication: Optimally Solving the Unit-Demand Envy-Free Pricing Problem with Metric Substitutability in Cubic Time. Algorithms 2021, 14, 279. https://doi.org/10.3390/a14100279

AMA Style

Salvatierra MM, Salvatierra M Jr., Colonna JG. Short Communication: Optimally Solving the Unit-Demand Envy-Free Pricing Problem with Metric Substitutability in Cubic Time. Algorithms. 2021; 14(10):279. https://doi.org/10.3390/a14100279

Chicago/Turabian Style

Salvatierra, Marcos M., Mario Salvatierra, Jr., and Juan G. Colonna. 2021. "Short Communication: Optimally Solving the Unit-Demand Envy-Free Pricing Problem with Metric Substitutability in Cubic Time" Algorithms 14, no. 10: 279. https://doi.org/10.3390/a14100279

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop