THE RIVAL COFFEE SHOP PROBLEM

. In this paper, we will address a modification of the following optimization problem: given a positive integer N and a compact Riemannian manifold X, the goal is to place a point x N ∈ X in such a way that the sequence { x 1 , . . . , x N } ⊂ X is distributed as uniformly as possible, considering that { x 1 , . . . , x N − 1 } ⊂ X already is. This can be thought as a way of placing coffee shops in a certain area one at a time in order to cover it optimally. So, following this modelization we will denote this problem as the coffee shop problem. This notion of optimal settlement is formalized in the context of optimal transport and Wasserstein distance. As a novel aspect, we introduce a new element to the problem: the presence of a rival brand, which competes against us by opening its own coffee shops. As our main tool, we use a variation of the Wasserstein distance (the Signed Wasserstein distance presented by Piccoli et al., Commun. Math. Sci. 21 (2023) 1279–1301), that allows us to work with finite signed measures and fits our problem. We present different results depending on how fast the rival is able to grow. With the Signed Wasserstein distance, we are able to obtain similar inequalities to the ones produced by the canonical Wasserstein one.


Introduction
Consider the following optimization problem: let X be a compact Riemannian manifold of dimension d and N a positive integer, the aim is to settle x N ∈ X such that the sequence {x 1 , . . ., x N } ⊂ X is placed as uniformly distributed as possible, regarding that {x 1 , . . ., x N −1 } ⊂ X already is.In real life, if X were a city and we wanted to control X with our brand of coffee shops (each store is modeled by x i ), the process would not involve simultaneous openings.Instead, each new store would be introduced one at a time, with careful consideration taking into account the available areas of the region, i.e., we pretend to uniformly cover X at each step.For that reason, from now on, we will denote this problem as the coffee shop problem.
This question deviates from the task of placing {x 1 , . . ., x N } ⊂ X at once as uniformly distributed as possible.Figure 1 shows an example with N = 4 and X = [0, 1] × [0, 1] for this different problem.While examining the coffee shop problem, Figure 1 appears distant from providing an accurate solution.As we consider the previous location of the sequence at each step, the configuration seems far from well distributed for N = 3 or N = 1 (Fig. 2). Figure 3 seems to provide a better solution to the coffee shop problem.A theoretical approach to these kind of questions about uniformly approximating regions by a discrete set of points is the one developed by the geometric discrepancy theory.The interested reader can find more about that perspective in this survey [1].We also present here more references related this interesting research field [2][3][4][5][6].Also, we want to highlight that, from the probability theory perspective, some work has also been developed [7][8][9].
Although geometric discrepancy theory is a very fruitful area, in order to approach the coffee shop problem, we have decided to deal with it from the optimal transport and Wasserstein space perspective.Optimal transport has shown its power to solve many different problems in a vast number of applied scenarios [10,11].We formally state the coffee shop problem as the problem of choosing x N ∈ X such that the following identity is satisfied: Figure 3. On the left: the settlement of the first Coffee shop.On the right: a settlement for four Coffee shops that seems to fit better the coffee shop problem than Figure 1.
where W 2 denotes the 2-Wasserstein distance, dx is the Riemannian volume measure of our space, normalized with dx(X) = 1, {x i } N −1 i=1 ⊂ X is a finite subset, and δ xi denotes the Dirac measure at x i .In this context, the Wasserstein distance models how close a uniformly distributed population is from a set of points, particularly, a set of coffee shops.
Louis Brown and Stephan Steinerberger dealt with the problem of distributing points evenly over a compact domain in [12][13][14].Particularly, they proved bounds on the cost of transporting Dirac measures supported on {x 1 , . . ., x N } ⊂ X to the normalized measure dx.These valuable inequalities relate the size of N with how close the points are to the uniform measure.Brown and Steinerberger's work has assisted us in addressing our modification to the coffee shop problem.Here, we briefly present their results.
In [14], Steinerberger uses the heat kernel and the Green function to obtain the following result for any sequence: Theorem 1.1 (Steinerberger,[14] Theorem 1).Let X be a smooth, compact d-dimensional manifold without boundary.Then, for any set of N points {x 1 , ..., x N } ⊂ X, the following inequality holds where G : X × X → R ∪ {∞} denote the Green's function of the Laplacian normalized to have average value 0 over the manifold and d ≥ 3.
If the manifold is two-dimensional, a slightly different inequality also holds The symbol ≲ X denotes the same relationship as ≤, but omits multiplication by a constant on the right-hand side that specifically depends on the manifold X. Steinerberger elaborates on this constant in [14], Section 3.For a more detailed explanation, readers can also consult [15,16].
Later, Brown and Steinerberger eliminate the Green term in (1.2) by defining the recursive sequence [13], Theorems 1 and 3.This is called a greedy sequence.Additionally, in [12], they obtain similar bounds using other sequences, but on the d-dimensional torus T d .
In comparison to the original problem, we introduce competition in the region X.This modification seems natural as, in a city, different coffee brands compete for control over certain areas.In this new scenario, the fundamental concept is to compare a new measure (1.4) with respect to dx.Here, our shops are represented by the positive deltas, while rival shops are represented by the negative ones.A discussion about the choice of the constant multiplying the subtraction of the summations of Dirac deltas has been included in Appendix A. However, for the sake of brevity, we believe that 1 N1+N2 is the one that best approximates the real situation we are considering as N 1 + N 2 are the total number of stores in the region and it behaves as a normalization term in µ.Now, it is essential to note that µ is not a probability measure, and, in fact, it is not even positive.To address this, we opt for the Signed Wasserstein distance introduced by Piccoli, Rossi, and Tournus in [17] and defined as follows: where µ = µ + − µ − denotes the Jordan decomposition of a signed measure, and W 1,1 1 is the generalized Wasserstein distance between µ, ν ∈ M(X) given by Recall that M(X) is the space of positive finite measures supported in X.
The Signed Wasserstein distance is less restrictive than the canonical Wasserstein and accommodates signed finite measures like µ.The monotonicity of the 1-Wasserstein distance (i.e., W 1 (µ, ν) ≤ W 2 (µ, ν) by Hölder inequality), will allow us to apply Steinerberger and Brown's results.Employing the Signed Wasserstein distance, we can now effectively compare µ with dx, obtaining bounds and establishing a robust framework for our new problem.
To clarify our choice of measure µ, let us consider the following: recognizing that competition negatively affects our Coffee Shop brand, we incorporate this factor by subtracting rivals ( N2 j=1 δ yj ) from our stores in (1.1).Equation (1.1) serves as a metric, measuring how closely the benefit from our Coffee Shop at x i aligns with the benefit derived from uniformly distributing stores across region X.Introducing competition requires subtracting the rival's benefit from ours, leading to a signed measure µ.Moreover, in the spirit of the optimal transport problem, with this subtraction we measure how close a uniformly distributed population is form a set of points, regarding the rival brand is negatively affecting us.
Thus, following the spirit of (1.1), the rival coffee shop problem can be understood as the problem of choosing x N ∈ X such that the following identity is satisfied: In order to deal with the rival coffee shop problem, we have considered two different scenarios: fixed and dynamic competition.
In the fixed competition scenario, we assume that the number of rivals is settled at N 2 > 0, and we obtain the same bounds as Steinerberger and Brown [12][13][14].First we replicate the bound for any set of points, depending on a Green function: denote the Green's function of the Laplacian normalized to have average value 0 over the manifold and N 1 , N 2 > 0. Then for any distinct sets of points {x 1 , . . ., x N1 } and {y 1 , . . ., y N2 } we obtain . where We have also achieved the same bound after choosing a greedy sequence (the explanation of these sequences is placed on Sect.3) to get rid of the Green function factor: We also establish a weak lower bound in the same spirit as the one obtained in [12][13][14].
Remark 1.5.As Steinerberger stated on [14], p. 4, Theorem 1.1 is sharp for d ≥ 3 and sharp up to possibly the factor of √ log n in d = 2.Moreover, he gave a brief explanation about that statement.Because of that, we decided to present our results only for the case of d ≥ 3 as our results should have the same behaviour as theirs for d = 2.
In the dynamic scenario, we consider three different cases: 1.An area of X is controlled by the rival.2. The rival's company grows faster than ours.3. The competition has the same growth rate as ours.
In the first case, we impose A ⊂ X a subset where we cannot settle any Dirac delta.Then, we study in Proposition 4.1 and Corollary 4.2 how the brand whose stores are place around X without restriction will have a winning strategy as they will have less 1-Wasserstein distance against dx than the other company.
In the last two cases, we will work with a rival who is comparable to us.Then, the measure µ will most likely not approach dx for N → ∞, so it will make sense to simply consider which brand is closer to the uniform distribution.Now, the same way that W 1,1 1 (µ, dx) is a metric of how well distributed our shops are (the lower the better), W 1,1 1 (−µ, dx) measures how well distributed the rival shops are, because the minus sign exchanges the positive and the negative deltas.Thus, we will say that the rival shops will win if they have a better position, that is, In that sense, we have obtained two interesting results: , then, for N 0 big enough, the rival shops will have a winning strategy for all N ≥ N 0 , i.e., they can choose a sequence such that j=1 δ yj , and N 0 > 0.Then, there exist values of K such that the rival shops will have a winning strategy for all N ≤ N 0 , i.e.
The structure of the paper is as follows: Section 2 presents the definitions and notation for the generalization of the Wasserstein distance in order to introduce the Signed Wasserstein distance.In Section 3, we study the case where the competition is fixed.In Section 4, we analyze the three different scenarios for dynamic competition.Lastly, Appendix A provides a brief discussion of the constant that multiplies The original impetus for this paper arose from the authors' participation in the PIMS-IFDS-NSF Summer School on Optimal Transport in Seattle in June, 2022 and a fruitful talk with Stephan Steinerberger after his lecture.The authors would like to thank the Kantorovich Initiative for organizing this stimulating event.They also want to thank Jaime Santos for his valuable comments and guidelines at different stages of this paper and their advisor Luis Guijarro for his final appreciations of the manuscript.

Generalizing the wasserstein distance
In this section we will recall the standard notions of optimal transport and Wasserstein distance.Then we will expand the definitions to signed measures.The definition of signed measure distance dates back to Piccoli [17], but see also Bubenik [18], Section 1.1.1 for an alternative exposition.
Let X be a compact Riemannian manifold of dimension d with distance function dist.Denote by M(X) the set of positive finite measures in X, and by M s (X) the set of signed finite measures in X.In addition, we will call dx the normalized Riemannian volume measure, (i.e.dx(X) = 1).Definition 2.1.A transference plan between two positive measures µ, ν ∈ M(X) of the same mass is a finite positive measure π ∈ M(X × X) which satisfies that, for all A, B Borel subsets of X, π(A × X) = µ(A), and π(X × B) = ν(B).
In other words, a valid plan π has to have µ and ν as marginal distributions.Note that we require |µ| = |ν| = π(X × X), where |µ| denote the total mass of a certain measure µ.We denote by Γ(µ, ν) the set of transference plans between those two measures.Then, we define the p-Wasserstein distance for p ≥ 1 and two positive Radon measures of the same mass by .
In order to calculate distances in our model, we will need to generalize this distance first for possibly |µ| ̸ = |ν| and then to signed measures.We can do that as follows.
Definition 2.2.[Generalized Wasserstein distance, [17,19]] Let µ, ν be two positive measures in M(X) with possibly different mass.The generalized Wasserstein distance between µ and ν is given for p ≥ 1 a > 0 and b > 0 by We can now extend this distance to signed measures µ, ν ∈ M s (X) by decomposing µ = µ + − µ − , known as the Jordan decomposition.Here, µ + and µ − are nonnegative finite measures mutually singular with disjoint support.The property of being mutually singular can be understood as the existence of a set X + ∈ B, where B denote the σ-algebra, such that µ + (X\X + ) = 0 and µ − (X + ) = 0. Of course, the same decomposition exists for ν.
We will work with W 1,1 1 on the paper, because we have as a consequence of the equivalence.
The key for W a,b 1 to induce a norm is that the distance does not change after adding any measure at both sides of W a,b 1 (•, •).Specifically, if µ, ν, η ∈ M s (X) are finite signed measures, then it is true that This property ensures that W a,b 1 is a distance, since it implies that the distance between two measures is unaffected by adding the same amount of mass to both of them.Remark 2.5.As we pointed in the Introduction, although Brown and Steinerberger's results are stated in terms of the 2-Wasserstein distance, due to the Hölder inequality, we can extend them to the 1-Wasserstein distance in order to use the Generalized and Signed Wasserstein distance.
A very interesting open question is regarding to extend their results to p > 2 as it is not straightforward from the proofs.Moreover, generalize them for geodesic metric spaces would also be of high interest.
We would also like to mention that there exist other notions of Wasserstein distances that may be applicable to the problem we are considering.One such distance is the Unbalanced Wasserstein Distance, introduced by Liero, Mielke, and Savaré in [20] and by Chizat, Peyré, Schmitzer, and Vialard in [21].This distance is a natural way to handle positive measures with different masses, and it benefits from concentrations of mass in the region of the support.However, it is not designed for signed measures, which are necessary for our purposes.Interested readers can find more information about the Unbalanced Wasserstein Distance in the following reference [22].In addition, the partial optimal transport presented by Figalli and Gigli [23,24] could also be a good setting for generalize all these kind of optimization, localization and transport problems.

Fixed competition
As we have pointed out in the introduction, we divide our study into two cases.In the first one, the competition only opens a fixed number N 2 > 0 of Coffee Shops.With the distance described in Section 2, we want to see how Intuitively, when N 1 is much bigger than N 2 , the rival's influence will be very small.We will formalize that in the following results.Theorem 3.1.Let X be a smooth, compact d-dimensional manifold without boundary, d ≥ 3, G : X × X → R ∪ {∞} denote the Green's function of the Laplacian normalized to have average value 0 over the manifold and N 1 , N 2 > 0. Then for any distinct sets of points {x 1 , . . ., x N1 } and {y 1 , . . ., y N2 } we obtain . where We note that the Green function is defined by where ϕ k are the eigenfunctions of the Laplace operator on X, and λ k its respective eigenvalues.That is, Proof.For the sake of simplicity, we denote

We can decompose
Now, we choose µ = B and ν = dx.So, we obtain, Now we will combine it with an upper bound for W 1 (B, dx) given in [14], Theorem 1: Moreover, Putting everything together, we obtain the desired result: Now suppose the sequence z n is defined in the following way: We will say that such sequence is a greedy sequence or that it is defined in a greedy manner.such that x i ̸ = y j for all i, j.Then Proof.We will pick the same notation as in the proof of Theorem 3.1.In this case, we are going to use another result from Steinerberger together with Brown [13], Theorem 3, which entails that for a sequence z n constructed in a greedy way, we have that for d ≥ 3. So, in our case, and we obtain our result.
In [12], Section 1.2, Brown and Steinerberger argue that their bound (3.2) is the best in terms of N possible, because, for every set of points {x 1 , . . ., x N } ⊂ X we have for c > 0 a constant depending only on the manifold.
Proposition 3.3.We have a lower bound that is independent of the sets {x 1 , . . ., x N1 } and {y 1 , . . ., y N2 }.Indeed, where c > 0 is the same constant from (3.3) that depends only on the manifold X.
If N 2 is fixed and N 1 → ∞, this bound is asymptotically as good as (3.3) when N → ∞, because they are comparable for big values of N : lim Proof.By the triangle inequality we know that 1 is invariant by translations, we can bound the last term by The inequality is obtained by choosing μ = ν = 0 in the infimum inside of W 1,1 1 .Now, substituting (3.3) at the left hand side of (3.4) and (3.5) at the right hand side, we have that which clearly implies our result.

Non-fixed competition
In this section, we provide an overview of scenarios where the rival's growth rate is comparable to ours.Although there may be a general framework that captures all such cases, we choose to examine each scenario separately for clarity.

Forbidden areas
Up until this point, we have measured victory solely in terms of the Signed Wasserstein distance between the difference of the sums of the Dirac deltas and the uniform distribution.An alternative approach is to compute the distance between each individual set of coffee shops and the uniform distribution, as described in the Steinerberger and Brown papers.
In this section, we consider a scenario where our rival has already opened coffee shops and "colonized" a certain area, such that we are unable to open our own shops within that region of our space X.Consequently, our limit as we approach the dx measure will not encompass this region, whereas our rival's will.
The key to our proof lies in the following proposition: positive and the negative deltas).We divide this part into two subsections.Before presenting these conditions, we prove a technical lemma that will be used throughout the rest of this section.
Lemma 4.4.Let µ, ν ∈ M s (X) be two signed finite measures.Then, Proof.It suffices to check the result for positive measures because We present a first result for the dynamic case under the hypothesis of the rival coffee shop complex growing a lot faster than ours.Precisely, we will suppose that f (N ) ≥ f (N − 1) + 2. That is, whenever we place a shop, our rivals will place two or more.j=1 δ yj .If f (N ) ≥ f (N − 1) + 2, then, for N 0 big enough, the rival shops will have a winning strategy for all N ≥ N 0 , i.e., they can choose a sequence such that Proof.The idea behind the proof is that our rival has a winning strategy.That is, at least he is able to copy the placement of our N -th shop with one of his shops because in every turn he adds at least two shops by hypothesis.So, he can copy ours and settle other shops in the remaining non-occupied space in X.We present a formal computation of this explanation.Suppose our sequence of shops is given by x 1 , . . ., x N .Then, following this procedure we would have with every other y j filling the space in a greedy manner.We would like to clarify two hidden implications before presenting the final inequalities.Firstly, our hypothesis clearly implies that f (N ) ≥ 2N .The other one is that we will call J the set of indexes of y j that fills X, that is, the ones that do not copy the sequence x i .It is a straightforward computation that the cardinality of J is |J| = f (N ) − N .Now, we are ready to finish our proof.On the one hand, choosing μ = 1 f (N )−N j∈J δ yj and ν = dx gives us due to Brown and Steinerberger results [13], Theorems 1 and 3. On the other hand, using Lemma 4.4, Finally, we observe that for any manifold X of dimension d we can choose N 0 such that c N d < 1 3 for all N ≥ N 0 (we remind that c > 0 is a constant depending only on the manifold X).Then, for N ≥ N 0 , we conclude that We imposed f (N ) ≥ f (N − 1) + 2 for two reasons: on the one hand, this restriction implies f (N ) ≥ 2N .On the other hand, due to this we were able to explicitly define the winning sequence (4.2).Losing that clarity we can make a more general statement: Corollary 4.6.The result also holds if lim inf f (N ) N = λ > 1.
Proof.The assumption lim inf f (N ) N = λ means that f (N ) will increase in a comparable way to λN , so the rival shops will still be able to copy our locations and establish new ones in an optimal way (possibly at a slower rate that once every turn, if λ < 2).
The bounds from the proof of Theorem 4.5 still applies.Bounding f (N ) ≥ λN − ε for N big enough yields the result.

Case f (N ) = N + K
Now, we will suppose f (N ) = N + K.That is, the rivals will set one shop every time we do, but they start with an advantage.In certain sense, we are growing at the same speed.It seems clear that, for big values of N the two chains of shops will be in a very similar position.For that reason, we will study the situation for fixed N .j=1 δ yj , and N 0 > 0.Then, there exist values of K such that the rival shops will have a winning strategy for all N ≤ N 0 , i.e.
Proof.In the same spirit as in Subsection 4.2.1, the rival has, at least, the strategy of choosing their first K shops in a greedy manner, and then y n+K = x n for all n.In that case, µ N = − K j=1 δ yj .Now, using Lemma 4.4 we can see that On the other hand, if we choose μ = 1 K K j=1 δ yj and ν = dx, we obtain that In the last inequality we've applied the result of Brown and Steinerberger [12] to the greedy sequence y 1 , . . ., y K .We recall that c is a positive constant which depends only on the manifold X.
Combining both inequalities, we have shown that whenever our result holds.And, by basic calculus, we know that for a fixed N 0 > 0 there exist a number K 0 > 0 such that for any K ≥ K 0 and all N ≤ N 0 , the inequality 4.4 is verified.
Appendix A. Discussion about the constants in the difference of dirac deltas During the initial steps of this paper, the authors considered three different constants to multiply the difference of the Dirac deltas N1 i=1 δ xi − N2 j=1 δ yj .In this appendix, we present our considerations about the matter: 1. 1 N1 in the first term and 1 N2 in the second term: The main objection to this choice is that it gives different masses to the coffee shops of each team if N 1 ̸ = N 2 .From our perspective, this does not capture the essence of our problem, as we consider that all Coffee Shops (regardless of which team they belong to) have the same power of attraction and, formally, the same weight.It would be interesting to consider the problem with different weights.For example, one of the teams could be a big consolidated coffee shop chain while the other team is composed of small ones.For that setting, this constant choice could possibly be appropriate.The virtue of this constant is that it normalizes the measure and turns it into a probability measure.In addition, it gives the same weight to each Coffee Shop.It seems that the fixed case computations of this paper hold for this constant.The problem with this choice is the case N 1 = N 2 , which leads to division by zero.Therefore, this constant is not suitable for our problem.This constant gives the correct weight to each Coffee Shop regardless of the team they belong to.It appeared when we tried to compute the optimality of all Coffee Shops against the volume measure regardless of which team they belong to.Moreover, as the denominator is always positive, we can use it for every N 1 , N 2 > 0 and if we join the masses of the two companies it would result in N 1 + N 2 , i.e., the total population of stores.The combination of deltas may not be normalized, but that is not a problem after the generalization of the Wasserstein distance.

Figure 2 .
Figure 2. On the left: one Coffee shop with the setup of Figure 1.On the right: three Coffee shops with the setup of Figure 1.