Skip to main content
Proceedings of the National Academy of Sciences of the United States of America logoLink to Proceedings of the National Academy of Sciences of the United States of America
. 2018 Sep 7;115(39):9666–9671. doi: 10.1073/pnas.1720804115

Gravitational allocation on the sphere

Nina Holden a, Yuval Peres b,1, Alex Zhai c
PMCID: PMC6166852  PMID: 30194230

Significance

Given a set L of n points on the sphere, an allocation is a way to divide the sphere into n cells of equal area, each associated with a point of L. Given two sets of n points A and B on the sphere, a matching is a bijective map from A to B. Allocation and matching rules that minimize the distance between matched points are related to optimal transport and discretization of continuous measures. We define a matching and allocation rule by considering the gravitational field associated with the point configurations and show that they are optimal in expectation up to multiplication by a constant when our points are chosen independently and uniformly at random.

Keywords: bipartite matching, allocation, transportation, gravity

Abstract

Given a collection L of n points on a sphere Sn2 of surface area n, a fair allocation is a partition of the sphere into n parts each of area 1, and each is associated with a distinct point of L. We show that, if the n points are chosen uniformly at random and if the partition is defined by a certain “gravitational” potential, then the expected distance between a point on the sphere and the associated point of L is O(logn). We use our result to define a matching between two collections of n independent and uniform points on the sphere and prove that the expected distance between a pair of matched points is O(logn), which is optimal by a result of Ajtai, Komlós, and Tusnády.


Suppose that we are given n points on the unit sphere S2R3. We would like to partition the sphere into n equally sized cells, assigning each point to a different cell. How can we make this partition so that each point is close to the points in the cell to which it has been assigned? This natural question, known as the fair allocation problem, has connections to optimal transport and discretization (or “quantization”) of continuous measures (1, 2). Allocation is also closely related to the matching problem, in which n red points and n blue points are chosen from the sphere (say, independently at random), and our goal is to pair each red point with a different blue point so as to make the distances between paired points as small as possible. Minimal matching for random points in the plane has generated a substantial literature in its own right (35).*

We analyze a particular allocation rule called gravitational allocation and apply it to matchings. Gravitational allocation is based on treating our n points as wells of a potential function. The cell allocated to a given point z is then taken to be the basin of attraction of z with respect to the flow induced by the negative gradient of this potential. When the potential takes a particular form that mimics the gravitational potential of Newtonian mechanics, it is ensured that each cell has area 1 (Fig. 1).

Fig. 1.

Fig. 1.

Gravitational allocation to n uniform and independent points on a sphere with n=15,40,200, and 750. The basin of attraction of each point has equal area. The basins become more elongated as n grows, reflecting Theorem 1. The MATLAB script used to generate the gravitational allocation figures in this article is based on code written by Manjunath Krishnapur.

Related Work

The idea of transportation between measures via gradient flows dates back at least to Dacorogna and Moser (6). However, the first analysis that we know of concerning the resulting allocation cells was carried out by Nazarov, Sodin, and Volberg (7), who studied allocation to zeroes of a Gaussian analytic function.

The term gravitational allocation was introduced by Chatterjee, Peled, Peres, and Romik (8, 9), who studied fair allocations to a Poisson process in Rd with d3. In that setting, they proved exponential tail bounds on the diameter of a typical cell, showing that this diameter is of constant order.

The same does not hold when d2: it was shown in refs. 10 and 11 that, for translation invariant allocation schemes in R or R2, the expected allocation distance must be infinite. For this reason, to understand what happens when d=2, it helps to consider a finite setting, such as the sphere. Suppose that we take the scaling where each cell has unit area. Then, it turns out that the typical allocation distance will need to be of at least order logn, which is also the same asymptotic behavior that is seen in minimal matching (3). In a recent paper, Ambrosio, Stra, and Trevisan (12) proved a more precise estimate of logn4π for the expectation of the minimum average squared distance between random points and the uniform measure, confirming a prediction of Caracciolo, Lucibello, Parisi, and Sicuro (13).

Other than gravitational allocation, other allocation schemes have been proposed and analyzed, many based on the Gale–Shapley stable matching algorithm (11, 1416.

Formal Definitions and Main Result

Let Sn2R3 denote the sphere centered at the origin with surface area n, so that we work in the scaling where each cell has unit area. Let λn denote the surface area measure on Sn2, so that λn(Sn2)=n.

For any set LSn2 consisting of n points, we say that a measurable function ψ:Sn2L{} is a fair allocation of λn to L if it satisfies the following:

λn(ψ1())=0,    λn(ψ1(z))=1,zL. [1]

For zL, we call ψ1(z) the cell allocated to z.

Let us now describe gravitational allocation in particular. First, we define a potential function U:Sn2R given by

U(x)=zLlog|xz|, [2]

where || denotes Euclidean distance in R3. For each location xSn2, let F(x) denote the negative gradient of U with respect to the usual spherical metric (i.e., the one induced from R3). We can view F(x) as lying in the plane tangent to Sn2 at x (i.e., the tangent space), so that F is a vector field on Sn2.

Second, we consider the flow induced by F. For any xSn2, let Yx(t) denote the integral curve that solves the differential equation

dYxdt(t)=F(Yx(t)),  Yx(0)=x. [3]

By standard results about ordinary differential equations, the curve Yx(t) can be defined up until some maximal time τx (possibly τx=). In fact, τx will be finite for all x, because by flowing along F, Yx will eventually fall into one of the wells of the potential U (i.e., one of the points in L) (Fig. 2).

Fig. 2.

Fig. 2.

Illustration of Yx, B(z), and ψ(x) for xSn2 and zL.

We thus define the basin of attraction of zL as

B(z)=xSn2:limtτxYx(t)=z [4]

(i.e., the set of points that will eventually flow into z). We then define the gravitational allocation function to be

ψ(x)=z  ifxB(z)forzL,  ifxzLB(z). [5]

It turns out that ψ indeed defines a fair allocation of λn to L, so that each B(z) has area 1. Before explaining why this is the case, let us first state our main result.

Theorem 1.

Let n2 be a positive integer. Consider any xSn2, and let LSn2 be a set of n points chosen uniformly and independently at random from Sn2. Then, there is a constant C>0 such that

E|ψ(x)x|Clogn. [6]

More generally, for any p>0, there is a constant Cp>0 depending only on p such that

E|ψ(x)x|pCp(logn)p/2. [7]

Why Is Gravitational Allocation a Fair Allocation?

The reader may find it somewhat surprising that the basins of attraction in gravitational allocation always have equal areas, even if a point in L is crowded by many other points in L (Fig. 3). As seen in Fig. 3, the surrounded point will still attract certain faraway points, so that its basin of attraction still has total area 1.

Fig. 3.

Fig. 3.

The center point is surrounded by seven other nearby points (Left). Nevertheless, it turns out that its basin of attraction (light blue; Right) can slip past its neighbors in certain places.

We give two explanations for this phenomenon. Both explanations rely on the fact that our potential U satisfies the Poisson equation

ΔSU(x)=2π+2πzLδz,

where ΔS denotes the spherical Laplacian (i.e., the Laplace–Beltrami operator on Sn2).

The first explanation is based on the divergence theorem. Consider any zL and its cell B(z). Since B(z) is a basin of attraction, F must be parallel to B(z) along its boundary. We can then apply the divergence theoremto obtain

0=B(z)Fnds=B(z)divFdλn
=B(z)ΔSUdλn=2π2πλn(B(z)).

It follows that λn(B(z))=1 as desired.

The second explanation is slightly longer, but it also provides a more detailed understanding of the flow under F. Imagine the surface area measure λn as representing the density of grains of sand uniformly distributed on the sphere. The sand is flowing along F, so that a grain of sand at x will be moved to location Yx(t) after time t.

In a small time ϵ, the net change in the density of sand at a point xSn2 will be approximately

ϵdivF(x)=ϵΔSU(x)=2πϵ+2πϵzLδz(x).

Thus, the density is decreasing everywhere at a uniform rate, except at points of L, where sand is accumulating (at the same rate for each point). Integrating this over time, the density of sand at a time t will be given by

λn,te2πtλn+(1e2πt)zLδz.

We find that limtλn,t=zLδz, so that the amount of sand at each point in L tends to one. Consequently, the area of each basin of attraction must have been one.

Proof Outline of the Main Theorem

The proof of Theorem 1 is based on estimating the magnitude of the gradient force F. In the previous section, we saw that, after time t, all but a e2πt proportion of the sphere will have reached one of the points in L, and therefore, the average time that it takes for a point to flow into a potential well is 0e2πtdt=1/2π. We can also estimate the average distance traveled in a similar way:

Sn20τx|F(Yx(t))|dtdλn(x)=0  Sn2\L|F(x)|dλn,t(x)dt  =0e2πtSn2|F(x)|dλn(x)dt  =12πSn2|F(x)|dλn(x). [8]

It remains to estimate the average magnitude of F(x), which is given by the following lemma.

Lemma 2. Fix any xSn2. Then, E|F(x)|=O(logn), where the expectation is taken over the randomness of L.

Taking expectations in Eq. 8 and then integrating Lemma 2 over all xSn2 proves Theorem 1 in the case p=1. Larger values of p can be handled in the same spirit, but it requires more involved estimates for F that we do not reproduce here (ref. 17 has details).

Proof: Let Uz(x)=log|xz| and Fz(x)=SUz(x), so that U(x)=zLUz(x) and F(x)=zLFz(x). Thus, Fz(x) represents the contribution to F(x) coming from the point zL.

To estimate F(x), it is convenient to decompose into the contributions of nearby and faraway points in L. For our purposes, “near” means points within the spherical cap of radius 1 around x, which we denote by B(x,1). Then, we may write

F(x)=zLB(x,1)Fz(x)Fnear(x)+zL\B(x,1)Fz(x)Ffar(x). [9]

When |zx|=r, an explicit computation shows that |Fz(x)| is of order 1/r. It is also not hard to calculate that the expected number of points in L with distance from x that is between r and r+dr is of order rdr. By the triangle inequality, we can estimate Fnear as

E|Fnear(x)|EzLB(x,1)|Fz(x)|=B(x,1)|Fy(x)|dy=O011r(rdr)=O(1). [10]

To estimate the far term, the triangle inequality is too weak, because we expect much cancellation between the Fz(x). In fact, by symmetry, we have E[Ffar(x)]=0. Thus, we instead estimate the second moment

E|Ffar(x)|2=EzL\B(x,1)|Fz(x)|2=Sn2\B(x,1)|Fy(x)|2dy=O1n1r2(rdr)=O(logn). [11]

Combining Eqs. 911 yields

E|F(x)|E|Fnear(x)|+E|Ffar(x)|2=O(logn),

which is the bound claimed in Lemma 2.

A Heuristic Picture

Lemma 2 also provides a good heuristic proof of Eq. 7. We know by Lemma 2 that, for a typical point x, we have F(x)=O(logn), and moreover, our above analysis suggests that the value of F(x) is dominated by contributions from faraway points. Thus, we expect that direction and speed of travel for x under the flow induced by F will remain relatively constant.

However, x will not travel forever in this way; suppose that it passes within O(1/logn) distance of a point zL. Then, the contribution Fz(x) from z to the overall “force” F will be of order logn, which may overpower the contribution from all other points, causing x to fall into the potential well at z.

Consider a strip of width 1/logn around the path of x (Fig. 4). If there is a point zL in this strip, then it is likely to “swallow” x (i.e., x will be allocated to z). The probability that any given region contains no points of L decays exponentially in its area, which suggests the heuristic

Pxtravels distance at leastrlogn  Pno points ofLin a strip of area roughlyrlogn(1/logn)=r  er,

giving Eq. 7, because |ψ(x)x| is bounded above by the distance traveled by x.

Fig. 4.

Fig. 4.

The speed F is mainly determined by points far away and is approximately constant in large regions, except very near points of L. A typical point, therefore, travels in an approximately straight line until it gets within distance O(1/logn) of some point in L.

From Allocations to Matchings

We now turn to the connection between fair allocations and optimal matchings. Suppose that A={a1,,an} and B={b1,,bn} are two sets of n points in Sn2. A matching from A to B is a bijective function φ:AB. Recall that the matching problem is to find the matching that minimizes the total distance between matched points.

When the points of A and B are drawn uniformly at random, the asymptotic behavior of the minimal matching distance was identified by Ajtai, Komlós, and Tusnády (3), who proved the following theorem.

Theorem 3 (Ajtai–Komlós–Tusnády). Suppose that A and B each consist of n points drawn uniformly and independently at random from [0,n]2. Let

dmatch(A,B)=minφ:ABbijective1naA|φ(a)a|.

Then, there are constants C1,C2>0 for which

limnPC1logndmatch(A,B)C2logn=1. [12]

It turns out that the average displacement of a fair allocation gives an upper bound on the matching distance, as the next proposition shows.

Proposition 4. Let A,BSn2 be two sets of n points, and let ψA and ψB be fair allocations of λn to A and B, respectively. Then, there exists a matching φ:AB such that

aA|aφ(a)|Sn2  |xψA(x)|dλn(x)+Sn2  |xψB(x)|dλn(x). [13]

Remark 5: Consider the case where A and B are drawn uniformly at random, and suppose that we use gravitational allocation for ψA and ψB in Proposition 4. Then, the p=1 case of Theorem 1 implies that the right-hand side of Eq. 13 has expectation of order nlogn. Comparing with Theorem 3, this implies that the asymptotic rate of logn in Theorem 1 is the best possible up to a constant factor. By Eq. 8, we also get that E|F(x)| is at least of order logn for any fixed xSn2.

The triangle inequality for the linear Wasserstein distance justifies why we can pass from an allocation to a matching, but we choose to describe the connection explicitly. Let Ai=ψA1(ai) denote the cell allocated to ai, and similarly, let Bi=ψB1(bi). Consider the n×n matrix M=(Mij)i,j=1n given by

Mij=λn(AiBj).

We see that M is a doubly stochastic matrix:

j=1nMij=j=1nλn(AiBj)=λn(Ai)=1,
i=1nMij=i=1nλn(AiBj)=λn(Bj)=1.

By the Birkhoff–von Neumann theorem (ref. 18, theorem 5.5), any doubly stochastic matrix is a convex combination of permutation matrices. For a permutation σ, we write Pσ to denote the corresponding permutation matrix, so that Pijσ=1 if j=σ(i) and Pijσ=0 otherwise. Then, we may write

M=k=1NckPσk, [14]

where ck are nonnegative numbers summing to one and σk are permutations.

Let X be chosen uniformly at random from Sn2. Observe that nP[XAiBj]=Mij and that |ψA(X)ψB(X)|=|aibj| on the event XAiBj. By Eq. 14 and this observation,

minσi=1nj=1nPijσ|aibj|i=1nj=1nMij|aibj|=nE|ψA(X)ψB(X)|. [15]

By the triangle inequality, the right side of Eq. 15 is bounded above by the right side of Eq. 13, which implies Proposition 4.

Online Matching

One can also consider an “online” version of the matching problem, in which we initially see only the points in B, and we are given the points in A={a1,a2,,an} one by one. As soon as ai is revealed to us, we must immediately match it to a point φ(ai) in B (that has not already been matched). In particular, we make this decision without knowing the locations of the remaining points in A.

There is a natural online matching algorithm using gravitational allocation. When a point ak is revealed, let B be the set of points in B that have not yet been matched. We then consider the gravitational allocation ψB to B and match ak to ψB(ak).

The analysis of this procedure is particularly simple if the points of A and B are sampled uniformly and independently at random. Consider what happens when we pair the first point a1. According to Theorem 1, the expected distance between a1 and its pair is bounded by

E|a1φ(a1)|=E|a1ψB(a1)|Clogn.

Since ψB gives a fair allocation and the first point a1 is drawn uniformly at random, each of the points in B is an equally likely match for a1 under our scheme. It follows that the remaining points B\{φ(a1)} will still be distributed uniformly and independently at random. Thus, we have reduced the problem to matching two sets of n1 independent random points on Sn2 after incurring a cost of Clogn for matching the first pair (Fig. 5).

Fig. 5.

Fig. 5.

Illustration of the online matching algorithm. The set B\φ(a1) consists of n1 uniform and independent points on the sphere Sn2 of area n.

We may iterate this analysis for each point in A. When we receive ak, there will be mnk+1 remaining unpaired points in B (still uniformly distributed), so that a typical distance in gravitational allocation will be On/mlogm, where the factor n/m comes from rescaling Sm2 to Sn2. Thus,

k=1nE|akφ(ak)|m=2nOn/mlogm
O(nlogn)m=2n1m=O(nlogn),

which shows that, even in the online setting, one has similar asymptotics as in Theorem 3.

We remark that our online matching algorithm can be implemented efficiently using the well-known “fast multipole method” introduced by Rokhlin (19) and Greengard and Rokhlin (20). This entails precomputing estimates of the gravitational potential from clusters of points in B, and these computations can be reused as new points of A are introduced.

Gravitational Allocation for Other Point Processes

So far, we have focused on the setting where our n points on Sn2 are taken independently at random. However, one may also analyze other random point processes where the points are not independent, which allows them to be distributed more evenly over the sphere.

One example is given by the roots of a certain Gaussian random polynomial. Specifically, we look at the polynomial

p(z)=k=0nζkn(n1)(nk+1)k!zk,

where ζ1,,ζn are independent standard complex Gaussians. The roots λ1,,λn of p are then n random points in the complex plane, which we can bring to the sphere via stereographic projection. More explicitly, let x0=(0,0,1). The function

P:zn4πx0+2(zx0)|zx0|2

maps the horizontal plane in R3 to Sn2. Then, viewing the λk as lying in the horizontal plane,

L=P(λk)k=1n

is a rotationally equivariant random set of n points on Sn2. [The rotational equivariance comes from the particular choice of coefficients for p (ref. 21, chapter 2.3).]

Heuristically, the points of L are distributed more evenly than independent uniformly random points, because roots of random polynomials tend to “repel” each other (Fig. 6). This can be quantified as follows. Let ψ:Sn2L be the gravitational allocation. Then, we claim that

1nESn2|xψ(x)|dλn(x)=O(1). [16]

Fig. 6.

Fig. 6.

A simulation of gravitational allocation to the zeroes of a Gaussian random polynomial. The cells are evenly proportioned, in contrast with the more elongated shapes seen in Fig. 1.

To prove this, by Eq. 8 and rotational symmetry, it suffices to show that E|F(x)|=O(1) for any point xSn2. It is convenient to pick x=(0,0,n/4π). Then, in the notation of the Proof of Lemma 2, we may calculate that

Fλk(x)=πnλ¯k1,

where we interpret the complex number on the right-hand side as a 2D vector. Thus, we have

F(x)=πnk=1nλ¯k1=πnζ¯1nζ¯01=πζ¯1ζ¯0,

which gives a simple expression for F in terms of two independent complex Gaussians. Taking expectations of the magnitude, we obtain

E|F(x)|=πE|ζ¯1||ζ¯0|=ππ2,

which establishes Eq. 16.

Open Problems

We conclude by describing two other matching algorithms for which we do not know a precise analysis.

First, one may consider a dynamic electrostatic version of gravitational allocation. Suppose that the points in A (B) are positive (negative) and that points of different (similar) kinds attract (repulse) each other. After some time, it seems that each point in A will collide with a point in B, forming a matching. What will be the average distance between the original positions of matched pairs?

Second, in the online matching problem, instead of matching each new point ak to a point in B according to gravitational allocation, suppose that we simply match ak to the closest point in B that has not been matched already. Alternatively, we can reveal A and B simultaneously and iteratively match closest pairs of points. In other words, we choose i,j{1,,n} such that |aibj| is minimized, we define φ(ai)=bj, and we repeat with the sets A\{ai} and B\{bj}. What will be the average matching distance in these settings? In the latter setting, ref. 16, theorem 6 suggests an upper bound for the matching distance of 0nr0.496dr=Θ(n0.252). Can this be improved?

Acknowledgments

We thank Manjunath Krishnapur for useful discussions as well as for sharing his code for producing simulations. Most of this work was carried out while N.H. and A.Z. were visiting Microsoft Research; we thank Microsoft Research for the hospitality.

Footnotes

The authors declare no conflict of interest.

See Profile on page 9646.

*We note that many results are stated for points in a square or a 2D torus instead of the sphere. As n, all of these settings are essentially equivalent. For the sake of consistency, in this article, we will state everything in terms of the sphere.

Except for a set of measure zero.

Assuming various smoothness properties, which we do not justify here.

References

  • 1.Huesmann M, Sturm KT. Optimal transport from Lebesgue to Poisson. Ann Probab. 2013;41:2426–2478. [Google Scholar]
  • 2.Dereich S, Scheutzow M, Schottstedt R. Constructive quantization: Approximation by empirical measures. Ann Inst Henri Poincaré Probab Stat. 2013;49:1183–1203. [Google Scholar]
  • 3.Ajtai M, Komlós J, Tusnády G. On optimal matchings. Combinatorica. 1984;4:259–264. [Google Scholar]
  • 4.Leighton T, Shor P. Tight bounds for minimax grid matching with applications to the average case analysis of algorithms. Combinatorica. 1989;9:161–187. [Google Scholar]
  • 5.Talagrand M. Matching theorems and empirical discrepancy computations using majorizing measures. J Am Math Soc. 1994;7:455–537. [Google Scholar]
  • 6.Dacorogna B, Moser J. On a partial differential equation involving the Jacobian determinant. Ann de l’Institut Henri Poincaré Analyse Non Linéaire. 1990;7:1–26. [Google Scholar]
  • 7.Nazarov F, Sodin M, Volberg A. Transportation to random zeroes by the gradient flow. Geom Funct Anal. 2007;17:887–935. [Google Scholar]
  • 8.Chatterjee S, Peled R, Peres Y, Romik D. Gravitational allocation to Poisson points. Ann Math. 2010;172:617–671. [Google Scholar]
  • 9.Chatterjee S, Peled R, Peres Y, Romik D. Phase transitions in gravitational allocation. Geom Funct Anal. 2010;20:870–917. [Google Scholar]
  • 10.Holroyd AE, Liggett TM. How to find an extra head: Optimal random shifts of Bernoulli and Poisson random fields. Ann Probab. 2001;29:1405–1425. [Google Scholar]
  • 11.Hoffman C, Holroyd AE, Peres Y. A stable marriage of Poisson and Lebesgue. Ann Probab. 2006;34:1241–1272. [Google Scholar]
  • 12.Ambrosio L, Stra F, Trevisan D. 2018 A PDE approach to a 2-dimensional matching problem. Probab Theory Relat Fields. Available at https://link.springer.com/article/10.1007%2Fs00440-018-0837-x#citeas. Accessed September 4, 2018.
  • 13.Caracciolo S, Lucibello C, Parisi G, Sicuro G. Scaling hypothesis for the Euclidean bipartite matching problem. Phys Rev E. 2014;90:012118. doi: 10.1103/PhysRevE.90.012118. [DOI] [PubMed] [Google Scholar]
  • 14.Holroyd AE, Peres Y. Extra heads and invariant allocations. Ann Probab. 2005;33:31–52. [Google Scholar]
  • 15.Hoffman C, Holroyd AE, Peres Y. Tail bounds for the stable marriage of Poisson and Lebesgue. Canad J Math. 2009;61:1279–1299. [Google Scholar]
  • 16.Holroyd AE, Pemantle R, Peres Y, Schramm O. Poisson matching. Ann Inst Henri Poincaré Probab Stat. 2009;45:266–287. [Google Scholar]
  • 17.Holden N, Peres Y, Zhai A. 2017. Gravitational allocation for uniform points on the sphere. arXiv:170408238. Preprint, posted April 26, 2017.
  • 18.van Lint JH, Wilson RM. A Course in Combinatorics. 2nd Ed Cambridge Univ Press; Cambridge, UK: 2001. [Google Scholar]
  • 19.Rokhlin V. Rapid solution of integral equations of classical potential theory. J Comput Phys. 1985;60:187–207. [Google Scholar]
  • 20.Greengard L, Rokhlin V. A fast algorithm for particle simulations. J Comput Phys. 1987;73:325–348. [Google Scholar]
  • 21.Hough JB, Krishnapur M, Peres Y, Virág B. 2009. Zeros of Gaussian Analytic Functions and Determinantal Point Processes, University Lecture Series (American Mathematical Society, Providence, RI), Vol 51. [Google Scholar]

Articles from Proceedings of the National Academy of Sciences of the United States of America are provided here courtesy of National Academy of Sciences

RESOURCES