This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A Cayley–Menger formula for the earth mover’s simplex

William Q. Erickson William Q. Erickson
Department of Mathematics
Baylor University
One Bear Place #97328
Waco, TX 76798
[email protected]
Abstract.

The earth mover’s distance (EMD) is a well-known metric on spaces of histograms; roughly speaking, the EMD measures the minimum amount of work required to equalize two histograms. The EMD has a natural generalization that compares an arbitrary number of histograms; in this case, the EMD can be viewed as hypervolume in dd dimensions, where the histograms are vertices of a dd-simplex. For d=2d=2, it is known that the EMD between three histograms equals half the sum of the pairwise EMDs — a sort of Heron’s formula for histograms, but where the area equals the semiperimeter. In this paper, by introducing an object we call the earth mover’s simplex, we prove two generalizations of this Heron-like formula in arbitrary dimension: the first (a sort of Cayley–Menger formula) expresses the EMD in terms of the edge lengths (the pairwise EMDs), the second in terms of the facets (EMDs excluding one histogram).

Key words and phrases:
Earth mover’s distance, abstract simplices, generalized volume formulas
2020 Mathematics Subject Classification:
Primary 52B05; Secondary 62R01

1. Introduction

1.1. Cayley–Menger formula for geometric simplices

Among the more famous results of antiquity is Heron’s formula for the area of a triangle ABC\triangle ABC in terms of its side lengths a,b,ca,b,c:

(1) area of ABC=s(sa)(sb)(sc),\text{area of }\triangle ABC=\sqrt{s(s-a)(s-b)(s-c)},

where s=(a+b+c)/2s=(a+b+c)/2 is the semiperimeter. Although named for Heron of Alexandria, who recorded it in his Metrica in the first century, this result was likely known much earlier, perhaps even to Archimedes.

A natural question is whether Heron’s formula generalizes to a formula for (hyper)volume in higher dimensions; the answer depends on what exactly we wish to generalize, since in the original formula (1) in two dimensions, the side lengths a,b,ca,b,c have both dimension 1 and codimension 1. On one hand, if we view them as having dimension 1, then the problem is to express the volume of a dd-dimensional simplex Δ\Delta in terms of its edge lengths (i.e., the volumes of its 1-dimensional faces). The answer to this problem is the Cayley–Menger determinant below:

(2) volume of Δ=(1)d+1(d!)22ddet[ij2]i,j=0d+1,\text{volume of }\Delta=\frac{(-1)^{d+1}}{(d!)^{2}2^{d}}\cdot\det\!\big{[}\ell^{2}_{ij}\big{]}_{i,j=0}^{d+1},

where ij\ell_{ij} is the length of the edge between the iith and jjth vertices (and i,d+1=d+1,i1\ell_{i,d+1}=\ell_{d+1,i}\coloneqq 1 for all idi\leq d, and d+1,d+10\ell_{d+1,d+1}\coloneqq 0). On the other hand, if we view the sides of a triangle as having codimension 1, then the question is whether the volume of Δ\Delta can be expressed only in terms of its “surface area” (i.e., the volumes of its facets). In this case, the answer is no, since even for the tetrahedron it is clear that the four facet areas do not determine the volume. Hence any generalization of Heron’s formula with respect to the facets must require additional information.

1.2. Statement of the problem

The problem in this paper is to find an analogue of the Cayley–Menger formula (2), in the very specific context of the earth mover’s distance (EMD). The EMD is a metric on spaces of histograms, or probability distributions, and is essentially synonymous with the 1-Wasserstein distance and the Mallows distance [Bickel]: roughly speaking, the EMD measures the minimum amount of work required to equalize two histograms, where “work” is defined by the geometry of the feature space of the histograms. Although outside the scope of the present paper, the EMD can be viewed as the solution to the transportation problem (the founding problem of optimal transport theory), and is central to a burgeoning range of important applications in mathematics, physics, and the social sciences; see Villani’s comprehensive reference [Villani] for further details.

In this paper, we consider histograms in which the bins are the integers 1,,n1,\ldots,n on the number line. It is natural to generalize the EMD in order to compare an arbitrary number of histograms h0,,hdh_{0},\ldots,h_{d}, rather than only two at a time: in this case, the EMD measures the minimum amount of work required to equalize all d+1d+1 histograms. In the special case d=2d=2, it was observed [Erickson20]*Prop. 5 that there is a simple linear relationship between the EMD of three histograms, on one hand, and the three pairwise EMDs, on the other hand:

(3) EMD(h0,h1,h2)=12[EMD(h1,h2)+EMD(h0,h2)+EMD(h0,h1)].{\rm EMD}(h_{0},h_{1},h_{2})=\frac{1}{2}\big{[}{\rm EMD}(h_{1},h_{2})+{\rm EMD}(h_{0},h_{2})+{\rm EMD}(h_{0},h_{1})\big{]}.

This identity instantly reminds one of Heron’s formula, where the histograms hih_{i} are vertices of a triangle, their EMD is the area, and the pairwise EMDs are the side lengths. In this EMD setting, however, the Heron analogue (3) is much simpler than the Euclidean version (1), since in (3) the area simply equals the semiperimeter. It is also shown in [Erickson20] that a simple formula of the kind in (3), expressing overall EMD exclusively in terms of the pairwise EMDs, cannot exist for d>2d>2. The purpose of this paper, then, is to find the correct generalization of (3) in arbitrary dimensions.

1.3. Overview of results

As our primary tool, we introduce a combinatorial object Δ\Delta we call the earth mover’s (EM) simplex (see Definition 3.1). We endow Δ\Delta with a “volume” in such a way that, if the vertices of Δ\Delta are taken to be the cumulative histograms of h0,,hdh_{0},\ldots,h_{d}, then the volume of Δ\Delta equals EMD(h0,,h1){\rm EMD}(h_{0},\ldots,h_{1}). In this way, we translate the problem into that of expressing the volume of Δ\Delta in terms of its edge lengths. In fact, this “volume” is merely the first in a sequence of generalized volumes we define on Δ\Delta; it turns out that the second generalized volume measures the failure of the obvious analogue of (3). Hence our main result (Theorem 4.1), a sort of Cayley–Menger formula for EM simplices, takes the especially nice form

Vol(Δ)=1d(Vol2(Δ)+edges of ΔVol()).{\rm Vol}(\Delta)=\frac{1}{d}\Bigg{(}{\rm Vol}_{2}(\Delta)+\sum_{\mathclap{\begin{subarray}{c}\textup{edges $\mathcal{E}$}\\ \textup{of $\Delta$}\end{subarray}}}{\rm Vol}(\mathcal{E})\Bigg{)}.

We also prove a second volume formula for EM simplices (Theorem 4.3), this time in terms of the surface area SA(Δ){\rm SA}(\Delta):

Vol(Δ)=1d(SA(Δ)+d+12|Med(Δ)|),{\rm Vol}(\Delta)=\frac{1}{d}\left({\rm{SA}}(\Delta)+\frac{d+1}{2}\cdot|{\rm Med}(\Delta)|\right),

where |Med(Δ)||{\rm Med}(\Delta)| is the number of elements contained in exactly half of the vertices (which, in an EM simplex, are themselves sets). We point out that in even dimensions, we automatically have |Med(Δ)|=0|{\rm Med}(\Delta)|=0; we find it interesting that the dimensional parity affects the EMD in this way, since a similar effect has been observed with regard to its expected value [Erickson20]*§5.4.

In Section 5 we present a fully illustrated example of both main theorems, which may be helpful in understanding the definition of an EM simplex. We are also hopeful that the results in this paper might suggest a direction for future research by experts in topological data analysis, using the tools of persistent homology; see our closing remarks in Section 6.

2. The earth mover’s distance

2.1. EMD between two histograms

Classically, the earth mover’s distance (EMD) measures the similarity between two histograms: the EMD is defined to be the minimum amount of work required to transform one histogram into the another. In this paper, the histograms we consider have bins 1,,n1,\ldots,n, and some fixed number mm of data points. We define one unit of work to be the work required to move one data point by one bin. We denote a histogram by a lower-case h=(h(1),,h(n))h=(h(1),\ldots,h(n)), where h(i)h(i) is the number of data points in bin ii. We denote the cumulative histogram of hh by an upper-case H=(H(1),,H(n))H=(H(1),\ldots,H(n)), where H(j)=i=1jh(i)H(j)=\sum_{i=1}^{j}h(i). It will be convenient for us to identify HH with the set of dots in its dot diagram, as in the following example:

(4) h=(3,0,1,4,2),H=(3,3,4,8,10)=h=(3,0,1,4,2),\qquad H=(3,3,4,8,10)=\leavevmode\hbox to44.34pt{\vbox to67.1pt{\pgfpicture\makeatletter\hbox{\hskip 3.33301pt\lower-3.33301pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}} {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{5.69046pt}{5.69046pt}\pgfsys@moveto{7.69043pt}{5.69046pt}\pgfsys@curveto{7.69043pt}{6.79501pt}{6.79501pt}{7.69043pt}{5.69046pt}{7.69043pt}\pgfsys@curveto{4.5859pt}{7.69043pt}{3.69049pt}{6.79501pt}{3.69049pt}{5.69046pt}\pgfsys@curveto{3.69049pt}{4.5859pt}{4.5859pt}{3.69049pt}{5.69046pt}{3.69049pt}\pgfsys@curveto{6.79501pt}{3.69049pt}{7.69043pt}{4.5859pt}{7.69043pt}{5.69046pt}\pgfsys@closepath\pgfsys@moveto{5.69046pt}{5.69046pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{5.69046pt}{11.38092pt}\pgfsys@moveto{7.69043pt}{11.38092pt}\pgfsys@curveto{7.69043pt}{12.48547pt}{6.79501pt}{13.38089pt}{5.69046pt}{13.38089pt}\pgfsys@curveto{4.5859pt}{13.38089pt}{3.69049pt}{12.48547pt}{3.69049pt}{11.38092pt}\pgfsys@curveto{3.69049pt}{10.27637pt}{4.5859pt}{9.38095pt}{5.69046pt}{9.38095pt}\pgfsys@curveto{6.79501pt}{9.38095pt}{7.69043pt}{10.27637pt}{7.69043pt}{11.38092pt}\pgfsys@closepath\pgfsys@moveto{5.69046pt}{11.38092pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{5.69046pt}{17.07138pt}\pgfsys@moveto{7.69043pt}{17.07138pt}\pgfsys@curveto{7.69043pt}{18.17593pt}{6.79501pt}{19.07135pt}{5.69046pt}{19.07135pt}\pgfsys@curveto{4.5859pt}{19.07135pt}{3.69049pt}{18.17593pt}{3.69049pt}{17.07138pt}\pgfsys@curveto{3.69049pt}{15.96683pt}{4.5859pt}{15.07141pt}{5.69046pt}{15.07141pt}\pgfsys@curveto{6.79501pt}{15.07141pt}{7.69043pt}{15.96683pt}{7.69043pt}{17.07138pt}\pgfsys@closepath\pgfsys@moveto{5.69046pt}{17.07138pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{11.38092pt}{5.69046pt}\pgfsys@moveto{13.38089pt}{5.69046pt}\pgfsys@curveto{13.38089pt}{6.79501pt}{12.48547pt}{7.69043pt}{11.38092pt}{7.69043pt}\pgfsys@curveto{10.27637pt}{7.69043pt}{9.38095pt}{6.79501pt}{9.38095pt}{5.69046pt}\pgfsys@curveto{9.38095pt}{4.5859pt}{10.27637pt}{3.69049pt}{11.38092pt}{3.69049pt}\pgfsys@curveto{12.48547pt}{3.69049pt}{13.38089pt}{4.5859pt}{13.38089pt}{5.69046pt}\pgfsys@closepath\pgfsys@moveto{11.38092pt}{5.69046pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{11.38092pt}{11.38092pt}\pgfsys@moveto{13.38089pt}{11.38092pt}\pgfsys@curveto{13.38089pt}{12.48547pt}{12.48547pt}{13.38089pt}{11.38092pt}{13.38089pt}\pgfsys@curveto{10.27637pt}{13.38089pt}{9.38095pt}{12.48547pt}{9.38095pt}{11.38092pt}\pgfsys@curveto{9.38095pt}{10.27637pt}{10.27637pt}{9.38095pt}{11.38092pt}{9.38095pt}\pgfsys@curveto{12.48547pt}{9.38095pt}{13.38089pt}{10.27637pt}{13.38089pt}{11.38092pt}\pgfsys@closepath\pgfsys@moveto{11.38092pt}{11.38092pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{11.38092pt}{17.07138pt}\pgfsys@moveto{13.38089pt}{17.07138pt}\pgfsys@curveto{13.38089pt}{18.17593pt}{12.48547pt}{19.07135pt}{11.38092pt}{19.07135pt}\pgfsys@curveto{10.27637pt}{19.07135pt}{9.38095pt}{18.17593pt}{9.38095pt}{17.07138pt}\pgfsys@curveto{9.38095pt}{15.96683pt}{10.27637pt}{15.07141pt}{11.38092pt}{15.07141pt}\pgfsys@curveto{12.48547pt}{15.07141pt}{13.38089pt}{15.96683pt}{13.38089pt}{17.07138pt}\pgfsys@closepath\pgfsys@moveto{11.38092pt}{17.07138pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{17.07138pt}{5.69046pt}\pgfsys@moveto{19.07135pt}{5.69046pt}\pgfsys@curveto{19.07135pt}{6.79501pt}{18.17593pt}{7.69043pt}{17.07138pt}{7.69043pt}\pgfsys@curveto{15.96683pt}{7.69043pt}{15.07141pt}{6.79501pt}{15.07141pt}{5.69046pt}\pgfsys@curveto{15.07141pt}{4.5859pt}{15.96683pt}{3.69049pt}{17.07138pt}{3.69049pt}\pgfsys@curveto{18.17593pt}{3.69049pt}{19.07135pt}{4.5859pt}{19.07135pt}{5.69046pt}\pgfsys@closepath\pgfsys@moveto{17.07138pt}{5.69046pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{17.07138pt}{11.38092pt}\pgfsys@moveto{19.07135pt}{11.38092pt}\pgfsys@curveto{19.07135pt}{12.48547pt}{18.17593pt}{13.38089pt}{17.07138pt}{13.38089pt}\pgfsys@curveto{15.96683pt}{13.38089pt}{15.07141pt}{12.48547pt}{15.07141pt}{11.38092pt}\pgfsys@curveto{15.07141pt}{10.27637pt}{15.96683pt}{9.38095pt}{17.07138pt}{9.38095pt}\pgfsys@curveto{18.17593pt}{9.38095pt}{19.07135pt}{10.27637pt}{19.07135pt}{11.38092pt}\pgfsys@closepath\pgfsys@moveto{17.07138pt}{11.38092pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{17.07138pt}{17.07138pt}\pgfsys@moveto{19.07135pt}{17.07138pt}\pgfsys@curveto{19.07135pt}{18.17593pt}{18.17593pt}{19.07135pt}{17.07138pt}{19.07135pt}\pgfsys@curveto{15.96683pt}{19.07135pt}{15.07141pt}{18.17593pt}{15.07141pt}{17.07138pt}\pgfsys@curveto{15.07141pt}{15.96683pt}{15.96683pt}{15.07141pt}{17.07138pt}{15.07141pt}\pgfsys@curveto{18.17593pt}{15.07141pt}{19.07135pt}{15.96683pt}{19.07135pt}{17.07138pt}\pgfsys@closepath\pgfsys@moveto{17.07138pt}{17.07138pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{17.07138pt}{22.76186pt}\pgfsys@moveto{19.07135pt}{22.76186pt}\pgfsys@curveto{19.07135pt}{23.86641pt}{18.17593pt}{24.76183pt}{17.07138pt}{24.76183pt}\pgfsys@curveto{15.96683pt}{24.76183pt}{15.07141pt}{23.86641pt}{15.07141pt}{22.76186pt}\pgfsys@curveto{15.07141pt}{21.6573pt}{15.96683pt}{20.76189pt}{17.07138pt}{20.76189pt}\pgfsys@curveto{18.17593pt}{20.76189pt}{19.07135pt}{21.6573pt}{19.07135pt}{22.76186pt}\pgfsys@closepath\pgfsys@moveto{17.07138pt}{22.76186pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{5.69046pt}\pgfsys@moveto{24.76183pt}{5.69046pt}\pgfsys@curveto{24.76183pt}{6.79501pt}{23.86641pt}{7.69043pt}{22.76186pt}{7.69043pt}\pgfsys@curveto{21.6573pt}{7.69043pt}{20.76189pt}{6.79501pt}{20.76189pt}{5.69046pt}\pgfsys@curveto{20.76189pt}{4.5859pt}{21.6573pt}{3.69049pt}{22.76186pt}{3.69049pt}\pgfsys@curveto{23.86641pt}{3.69049pt}{24.76183pt}{4.5859pt}{24.76183pt}{5.69046pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{5.69046pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{11.38092pt}\pgfsys@moveto{24.76183pt}{11.38092pt}\pgfsys@curveto{24.76183pt}{12.48547pt}{23.86641pt}{13.38089pt}{22.76186pt}{13.38089pt}\pgfsys@curveto{21.6573pt}{13.38089pt}{20.76189pt}{12.48547pt}{20.76189pt}{11.38092pt}\pgfsys@curveto{20.76189pt}{10.27637pt}{21.6573pt}{9.38095pt}{22.76186pt}{9.38095pt}\pgfsys@curveto{23.86641pt}{9.38095pt}{24.76183pt}{10.27637pt}{24.76183pt}{11.38092pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{11.38092pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{17.07138pt}\pgfsys@moveto{24.76183pt}{17.07138pt}\pgfsys@curveto{24.76183pt}{18.17593pt}{23.86641pt}{19.07135pt}{22.76186pt}{19.07135pt}\pgfsys@curveto{21.6573pt}{19.07135pt}{20.76189pt}{18.17593pt}{20.76189pt}{17.07138pt}\pgfsys@curveto{20.76189pt}{15.96683pt}{21.6573pt}{15.07141pt}{22.76186pt}{15.07141pt}\pgfsys@curveto{23.86641pt}{15.07141pt}{24.76183pt}{15.96683pt}{24.76183pt}{17.07138pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{17.07138pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{22.76186pt}\pgfsys@moveto{24.76183pt}{22.76186pt}\pgfsys@curveto{24.76183pt}{23.86641pt}{23.86641pt}{24.76183pt}{22.76186pt}{24.76183pt}\pgfsys@curveto{21.6573pt}{24.76183pt}{20.76189pt}{23.86641pt}{20.76189pt}{22.76186pt}\pgfsys@curveto{20.76189pt}{21.6573pt}{21.6573pt}{20.76189pt}{22.76186pt}{20.76189pt}\pgfsys@curveto{23.86641pt}{20.76189pt}{24.76183pt}{21.6573pt}{24.76183pt}{22.76186pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{22.76186pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{28.45232pt}\pgfsys@moveto{24.76183pt}{28.45232pt}\pgfsys@curveto{24.76183pt}{29.55687pt}{23.86641pt}{30.45229pt}{22.76186pt}{30.45229pt}\pgfsys@curveto{21.6573pt}{30.45229pt}{20.76189pt}{29.55687pt}{20.76189pt}{28.45232pt}\pgfsys@curveto{20.76189pt}{27.34776pt}{21.6573pt}{26.45235pt}{22.76186pt}{26.45235pt}\pgfsys@curveto{23.86641pt}{26.45235pt}{24.76183pt}{27.34776pt}{24.76183pt}{28.45232pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{28.45232pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{34.14278pt}\pgfsys@moveto{24.76183pt}{34.14278pt}\pgfsys@curveto{24.76183pt}{35.24733pt}{23.86641pt}{36.14275pt}{22.76186pt}{36.14275pt}\pgfsys@curveto{21.6573pt}{36.14275pt}{20.76189pt}{35.24733pt}{20.76189pt}{34.14278pt}\pgfsys@curveto{20.76189pt}{33.03822pt}{21.6573pt}{32.1428pt}{22.76186pt}{32.1428pt}\pgfsys@curveto{23.86641pt}{32.1428pt}{24.76183pt}{33.03822pt}{24.76183pt}{34.14278pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{34.14278pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{39.83325pt}\pgfsys@moveto{24.76183pt}{39.83325pt}\pgfsys@curveto{24.76183pt}{40.9378pt}{23.86641pt}{41.83322pt}{22.76186pt}{41.83322pt}\pgfsys@curveto{21.6573pt}{41.83322pt}{20.76189pt}{40.9378pt}{20.76189pt}{39.83325pt}\pgfsys@curveto{20.76189pt}{38.7287pt}{21.6573pt}{37.83328pt}{22.76186pt}{37.83328pt}\pgfsys@curveto{23.86641pt}{37.83328pt}{24.76183pt}{38.7287pt}{24.76183pt}{39.83325pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{39.83325pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{22.76186pt}{45.52371pt}\pgfsys@moveto{24.76183pt}{45.52371pt}\pgfsys@curveto{24.76183pt}{46.62827pt}{23.86641pt}{47.52368pt}{22.76186pt}{47.52368pt}\pgfsys@curveto{21.6573pt}{47.52368pt}{20.76189pt}{46.62827pt}{20.76189pt}{45.52371pt}\pgfsys@curveto{20.76189pt}{44.41916pt}{21.6573pt}{43.52374pt}{22.76186pt}{43.52374pt}\pgfsys@curveto{23.86641pt}{43.52374pt}{24.76183pt}{44.41916pt}{24.76183pt}{45.52371pt}\pgfsys@closepath\pgfsys@moveto{22.76186pt}{45.52371pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{5.69046pt}\pgfsys@moveto{30.45229pt}{5.69046pt}\pgfsys@curveto{30.45229pt}{6.79501pt}{29.55687pt}{7.69043pt}{28.45232pt}{7.69043pt}\pgfsys@curveto{27.34776pt}{7.69043pt}{26.45235pt}{6.79501pt}{26.45235pt}{5.69046pt}\pgfsys@curveto{26.45235pt}{4.5859pt}{27.34776pt}{3.69049pt}{28.45232pt}{3.69049pt}\pgfsys@curveto{29.55687pt}{3.69049pt}{30.45229pt}{4.5859pt}{30.45229pt}{5.69046pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{5.69046pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{11.38092pt}\pgfsys@moveto{30.45229pt}{11.38092pt}\pgfsys@curveto{30.45229pt}{12.48547pt}{29.55687pt}{13.38089pt}{28.45232pt}{13.38089pt}\pgfsys@curveto{27.34776pt}{13.38089pt}{26.45235pt}{12.48547pt}{26.45235pt}{11.38092pt}\pgfsys@curveto{26.45235pt}{10.27637pt}{27.34776pt}{9.38095pt}{28.45232pt}{9.38095pt}\pgfsys@curveto{29.55687pt}{9.38095pt}{30.45229pt}{10.27637pt}{30.45229pt}{11.38092pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{11.38092pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{17.07138pt}\pgfsys@moveto{30.45229pt}{17.07138pt}\pgfsys@curveto{30.45229pt}{18.17593pt}{29.55687pt}{19.07135pt}{28.45232pt}{19.07135pt}\pgfsys@curveto{27.34776pt}{19.07135pt}{26.45235pt}{18.17593pt}{26.45235pt}{17.07138pt}\pgfsys@curveto{26.45235pt}{15.96683pt}{27.34776pt}{15.07141pt}{28.45232pt}{15.07141pt}\pgfsys@curveto{29.55687pt}{15.07141pt}{30.45229pt}{15.96683pt}{30.45229pt}{17.07138pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{17.07138pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{22.76186pt}\pgfsys@moveto{30.45229pt}{22.76186pt}\pgfsys@curveto{30.45229pt}{23.86641pt}{29.55687pt}{24.76183pt}{28.45232pt}{24.76183pt}\pgfsys@curveto{27.34776pt}{24.76183pt}{26.45235pt}{23.86641pt}{26.45235pt}{22.76186pt}\pgfsys@curveto{26.45235pt}{21.6573pt}{27.34776pt}{20.76189pt}{28.45232pt}{20.76189pt}\pgfsys@curveto{29.55687pt}{20.76189pt}{30.45229pt}{21.6573pt}{30.45229pt}{22.76186pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{22.76186pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{28.45232pt}\pgfsys@moveto{30.45229pt}{28.45232pt}\pgfsys@curveto{30.45229pt}{29.55687pt}{29.55687pt}{30.45229pt}{28.45232pt}{30.45229pt}\pgfsys@curveto{27.34776pt}{30.45229pt}{26.45235pt}{29.55687pt}{26.45235pt}{28.45232pt}\pgfsys@curveto{26.45235pt}{27.34776pt}{27.34776pt}{26.45235pt}{28.45232pt}{26.45235pt}\pgfsys@curveto{29.55687pt}{26.45235pt}{30.45229pt}{27.34776pt}{30.45229pt}{28.45232pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{28.45232pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{34.14278pt}\pgfsys@moveto{30.45229pt}{34.14278pt}\pgfsys@curveto{30.45229pt}{35.24733pt}{29.55687pt}{36.14275pt}{28.45232pt}{36.14275pt}\pgfsys@curveto{27.34776pt}{36.14275pt}{26.45235pt}{35.24733pt}{26.45235pt}{34.14278pt}\pgfsys@curveto{26.45235pt}{33.03822pt}{27.34776pt}{32.1428pt}{28.45232pt}{32.1428pt}\pgfsys@curveto{29.55687pt}{32.1428pt}{30.45229pt}{33.03822pt}{30.45229pt}{34.14278pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{34.14278pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{39.83325pt}\pgfsys@moveto{30.45229pt}{39.83325pt}\pgfsys@curveto{30.45229pt}{40.9378pt}{29.55687pt}{41.83322pt}{28.45232pt}{41.83322pt}\pgfsys@curveto{27.34776pt}{41.83322pt}{26.45235pt}{40.9378pt}{26.45235pt}{39.83325pt}\pgfsys@curveto{26.45235pt}{38.7287pt}{27.34776pt}{37.83328pt}{28.45232pt}{37.83328pt}\pgfsys@curveto{29.55687pt}{37.83328pt}{30.45229pt}{38.7287pt}{30.45229pt}{39.83325pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{39.83325pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{45.52371pt}\pgfsys@moveto{30.45229pt}{45.52371pt}\pgfsys@curveto{30.45229pt}{46.62827pt}{29.55687pt}{47.52368pt}{28.45232pt}{47.52368pt}\pgfsys@curveto{27.34776pt}{47.52368pt}{26.45235pt}{46.62827pt}{26.45235pt}{45.52371pt}\pgfsys@curveto{26.45235pt}{44.41916pt}{27.34776pt}{43.52374pt}{28.45232pt}{43.52374pt}\pgfsys@curveto{29.55687pt}{43.52374pt}{30.45229pt}{44.41916pt}{30.45229pt}{45.52371pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{45.52371pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{51.21417pt}\pgfsys@moveto{30.45229pt}{51.21417pt}\pgfsys@curveto{30.45229pt}{52.31873pt}{29.55687pt}{53.21414pt}{28.45232pt}{53.21414pt}\pgfsys@curveto{27.34776pt}{53.21414pt}{26.45235pt}{52.31873pt}{26.45235pt}{51.21417pt}\pgfsys@curveto{26.45235pt}{50.10962pt}{27.34776pt}{49.2142pt}{28.45232pt}{49.2142pt}\pgfsys@curveto{29.55687pt}{49.2142pt}{30.45229pt}{50.10962pt}{30.45229pt}{51.21417pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{51.21417pt}\pgfsys@fill\pgfsys@invoke{ } {}{{}}{}{{{}}{}{}{}{}{}{}{}{}}\pgfsys@moveto{28.45232pt}{56.90465pt}\pgfsys@moveto{30.45229pt}{56.90465pt}\pgfsys@curveto{30.45229pt}{58.0092pt}{29.55687pt}{58.90462pt}{28.45232pt}{58.90462pt}\pgfsys@curveto{27.34776pt}{58.90462pt}{26.45235pt}{58.0092pt}{26.45235pt}{56.90465pt}\pgfsys@curveto{26.45235pt}{55.8001pt}{27.34776pt}{54.90468pt}{28.45232pt}{54.90468pt}\pgfsys@curveto{29.55687pt}{54.90468pt}{30.45229pt}{55.8001pt}{30.45229pt}{56.90465pt}\pgfsys@closepath\pgfsys@moveto{28.45232pt}{56.90465pt}\pgfsys@fill\pgfsys@invoke{ } \par{}{{}}{} {}{}{{}}{}{{ {\pgfsys@beginscope\pgfsys@setlinewidth{0.32pt}\pgfsys@setdash{}{0.0pt}\pgfsys@roundcap\pgfsys@roundjoin{} {}{}{} {}{}{} \pgfsys@moveto{-1.19998pt}{1.59998pt}\pgfsys@curveto{-1.09998pt}{0.99998pt}{0.0pt}{0.09999pt}{0.29999pt}{0.0pt}\pgfsys@curveto{0.0pt}{-0.09999pt}{-1.09998pt}{-0.99998pt}{-1.19998pt}{-1.59998pt}\pgfsys@stroke\pgfsys@endscope}} }{}{}{{}}\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@lineto{33.68279pt}{0.0pt}\pgfsys@stroke\pgfsys@invoke{ }{{}{{}}{}{}{{}}{{{}}{{{}}{\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{33.68279pt}{0.0pt}\pgfsys@invoke{ }\pgfsys@invoke{ \lxSVG@closescope }\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}{{}}}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{37.67578pt}{0.0pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} {}{{}}{} {}{}{{}}{}{}{}{}{{}}\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@lineto{0.0pt}{56.44466pt}\pgfsys@stroke\pgfsys@invoke{ }{{}{{}}{}{}{{}}{{{}}{{{}}{\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{0.0}{1.0}{-1.0}{0.0}{0.0pt}{56.44466pt}\pgfsys@invoke{ }\pgfsys@invoke{ \lxSVG@closescope }\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}{{}}}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{0.0pt}{60.43765pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \par \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}

Note that in the language of combinatorics, each histogram can be identified with a unique (weak) composition of mm into nn parts, while a cumulative histogram is a partition of iH(i)\sum_{i}H(i) into nn parts. It is customary to identify a partition with its Ferrers diagram, which is essentially the dot diagram here (up to rotation by 180 degrees). By ignoring the last column of HH, which always contains mm dots, it is easy to see [Erickson23]*§3 that the set of cumulative histograms is in bijection with the set of Ferrers diagrams fitting inside an m×(n1)m\times(n-1) rectangle.

Given two histograms h0,h1h_{0},h_{1}, it is well known that EMD(h0,h1){\rm EMD}(h_{0},h_{1}) equals the 1\ell_{1}-norm of H0H1H_{0}-H_{1}, as a difference of functions on {1,,n}\{1,\ldots,n\}. (See  [Rabin]*eqn. (8) and Fig. 1; it follows that the EMD is a true metric on the space of histograms.) From the perspective of [Erickson23], this means that

(5) EMD(h0,h1)=|H0H1|,{\rm EMD}(h_{0},h_{1})=|H_{0}\,\scalebox{0.75}{$\triangle$}\,H_{1}|,

where H0H1(H0H1)(H0H1)=(H0H1)(H1H0)H_{0}\,\scalebox{0.75}{$\triangle$}\,H_{1}\coloneqq(H_{0}\cup H_{1})\setminus(H_{0}\cap H_{1})=(H_{0}\setminus H_{1})\cup(H_{1}\setminus H_{0}) denotes the symmetric difference. In words, the EMD is the number of dots occurring in exactly one of the two cumulative histograms; see the example in Figure 1.

H0=H_{0}=h0=(3,0,1,4,2)h_{0}=(3,0,1,4,2)
H1=H_{1}=h1=(1,4,1,1,3)h_{1}=(1,4,1,1,3)
H0H1=H_{0}\,\scalebox{0.75}{$\triangle$}\,H_{1}=EMD(h0,h1)=7{\rm EMD}(h_{0},h_{1})=7
Figure 1. The EMD between histograms h0h_{0} and h1h_{1} is the size of the symmetric difference H0H1H_{0}\,\scalebox{0.75}{$\triangle$}\,H_{1}. In the right-hand picture, the unfilled dots are not elements of the symmetric difference, since they are in the intersection H0H1H_{0}\cap H_{1}. The minimum of 7 units of work can be attained by transporting the following data points in h0h_{0}: move two points from bin 1 to bin 2, move one point from bin 3 to bin 2, one from 4 to 2 (which expends two units of work), one from 4 to 3, and one from 4 to 5.

2.2. Generalized EMD

The EMD has a natural generalization for any number of histograms, rather than only two at a time. (See, for example, [Bein] and [Kline] for computational treatments of the higher-dimensional earth mover’s problem in greater generality.) Given histograms h0,,hdh_{0},\ldots,h_{d}, one simply defines EMD(h0,,hd){\rm EMD}(h_{0},\ldots,h_{d}) to be the minimum amount of work required to transform all of the hih_{i} into a common histogram (allowing data points to be transported within each histogram).

In order to extend the conceptual method of Figure 1 beyond the classical case d=1d=1, we require the correct generalization of the symmetric difference. It turns out that the key property of the symmetric difference (with regard to the EMD) was this: for each dot xH1H2x\in H_{1}\cup H_{2}, the symmetric difference measures how far away xx is from either belonging to none of the HiH_{i} or belonging to all of the HiH_{i}. When d=1d=1 this is a binary measurement: if xx belongs to neither/both of the HiH_{i}, then it appears 0 times in the symmetric difference, and otherwise it appears 1 time in the symmetric difference. For arbitrary dd, however, generalizing this measurement requires the symmetric difference to be a multiset: the multiplicity of each dot xx is either the number of HiH_{i} containing xx, or the number of HiH_{i} not containing xx, whichever is smaller.

Throughout the paper, we write \uplus to denote the union of multisets, and we write xmx^{m} to denote a multiset element with multiplicity mm. If 𝒳\mathcal{X} is a family of sets, then for each xX𝒳Xx\in\bigcup_{X\in\mathcal{X}}X, its degree, written as deg𝒳(x)\deg_{\mathcal{X}}(x), is the number of sets X𝒳X\in\mathcal{X} such that xXx\in X.

Definition 2.1 ([Erickson23]*Def. 7.5).

Let 𝒳={X0,,Xd}\mathcal{X}=\{X_{0},\ldots,X_{d}\} be a family of sets. The generalized symmetric difference is the multiset

(𝒳)k=0d+1{xmin{k,dk+1}deg𝒳(x)=k}.\blacktriangle(\mathcal{X})\coloneqq\biguplus_{k=0}^{d+1}\{x^{\min\{k,\>d-k+1\}}\mid\deg_{\mathcal{X}}(x)=k\}.
Proposition 2.2 ([Erickson23]*Prop. 7.7).

Let h0,,hdh_{0},\ldots,h_{d} be histograms, and let ={H0,,Hd}\mathcal{H}=\{H_{0},\ldots,H_{d}\} be the family of cumulative histograms. Then

EMD(h0,,hd)=|()|.{\rm EMD}(h_{0},\ldots,h_{d})=|\blacktriangle(\mathcal{H})|.

See Figure 2 for a toy example, which we will revisit in Section 5.

H0=H_{0}=h0=(2,0,1)h_{0}=(2,0,1)      H1=H_{1}=h1=(0,3,0)h_{1}=(0,3,0)      H2=H_{2}=h2=(1,0,2)h_{2}=(1,0,2)      H3=H_{3}=h3=(0,0,3)h_{3}=(0,0,3)
000011122(H0,,H3)=\blacktriangle(H_{0},\ldots,H_{3})=EMD(h0,,h3)=7{\rm EMD}(h_{0},\ldots,h_{3})=7
Figure 2. Example of the generalized EMD, where d=n=m=3d=n=m=3. Using Definition 2.1, we depict the multiset (H0,,H3)\blacktriangle(H_{0},\ldots,H_{3}) by labeling each dot with its multiplicity (where the 0’s are unfilled dots). In particular, the multiplicity of a dot is 0, 11, 22, 11, or 0, depending on whether it is contained in 0, 11, 22, 33, or 44 of the HiH_{i}, respectively. (Note that the middle dot in the bottom row has degree 3, and therefore its multiplicity is min{3, 1}=1\min\{3,\>1\}=1. Likewise, the dots in the third column have degree 4, and therefore multiplicity min{4,0}=0\min\{4,0\}=0.) The EMD is then obtained via Proposition 2.2. The reader can check that one way to equalize the histograms with only 7 units of work is to transform each of them into (0,2,1)(0,2,1).

3. The earth mover’s simplex

In this section, we introduce an abstract structure we call the earth mover’s (EM) simplex: this is a combinatorial simplex whose vertices are finite sets XiX_{i}, equipped with face labelings λ,λ,λ′′,\lambda,\lambda^{\prime},\lambda^{\prime\prime},\ldots, to be defined below. The labeling λ\lambda^{\prime} in particular induces a notion of “volume” that is compatible with the EMD, whenever the vertices are chosen to be cumulative histograms HiH_{i}. Hence at the end of this section we will prove the motivating fact that EMD(h0,,hd){\rm EMD}(h_{0},\ldots,h_{d}) is precisely the volume of the EM simplex on the HiH_{i}.

3.1. Standard terminology

Let Δ=Δ(V)\Delta=\Delta(V) be the (abstract) dd-simplex on the vertex set V={v0,,vd}V=\{v_{0},\ldots,v_{d}\}. In other words, Δ\Delta is the power set of VV, so that the elements (faces) of Δ\Delta are simply the subsets FVF\subseteq V. The dimension of a face is one less than its cardinality: hence we write dimF#F1\dim F\coloneqq\#F-1, and in particular we have dim=1\dim\varnothing=-1. By definition, dimΔdimV=d\dim\Delta\coloneqq\dim V=d. The codimension of a face is codimFddimF\operatorname{codim}F\coloneqq d-\dim F. The 0-dimensional faces {vi}\{v_{i}\} are called vertices, and the 1-dimensional faces {vi,vj}\{v_{i},v_{j}\} are called edges. The (d1)(d-1)-dimensional faces {v0,,v^i,,vd}\{v_{0},\ldots,\widehat{v}_{i},\ldots,v_{d}\} are called facets of Δ\Delta, and the missing viv_{i} is called the vertex opposite the facet.

It is customary, when convenient, to view a face as the simplex it defines. For example, we call FF a facet of GΔG\in\Delta whenever FGF\subset G with dimF=dimG1\dim F=\dim G-1, although technically it would be more proper to call FF a facet of Δ(G)\Delta(G). In this case, we also say that GG is a cofacet of FF. Clearly the number of facets of GG equals its cardinality #G\#G.

We denote the kk-skeleton of Δ\Delta by skelk(Δ){FΔdimFk}{\rm skel}_{k}(\Delta)\coloneqq\{F\in\Delta\mid\dim F\leq k\}. Finally, the link of a face FF is the subsimplex of Δ\Delta containing all faces which are disjoint from FF. (This is a special case of the standard definition of link in simplicial complexes.)

3.2. Face labelings

In our upcoming definition of an EM simplex, the role of vertices viv_{i} will be played by finite sets XiX_{i}. Hence let 𝒳={X0,,Xd}\mathcal{X}=\{X_{0},\ldots,X_{d}\} be a family of finite sets, and from now on, let Δ=Δ(𝒳)\Delta=\Delta(\mathcal{X}). We use the shorthand 𝒳X𝒳X\cup\mathcal{X}\coloneqq\bigcup_{X\in\mathcal{X}}X, and we partition 𝒳\cup\mathcal{X} into three subsets according to degree:

Min(𝒳)\displaystyle{\rm Min}(\mathcal{X}) {x𝒳|deg𝒳(x)<d+12},\displaystyle\coloneqq\left\{x\in\cup\mathcal{X}\;\middle|\;\deg_{\mathcal{X}}(x)<\frac{d+1}{2}\right\},
Med(𝒳)\displaystyle{\rm Med}(\mathcal{X}) {x𝒳|deg𝒳(x)=d+12},\displaystyle\coloneqq\left\{x\in\cup\mathcal{X}\;\middle|\;\deg_{\mathcal{X}}(x)=\frac{d+1}{2}\right\},
Maj(𝒳)\displaystyle{\rm Maj}(\mathcal{X}) {x𝒳|deg𝒳(x)>d+12}.\displaystyle\coloneqq\left\{x\in\cup\mathcal{X}\;\middle|\;\deg_{\mathcal{X}}(x)>\frac{d+1}{2}\right\}.

(These are the elements contained in the minority, in the median number, or in the majority of the XiX_{i}, respectively.) Note that if dd is even, then Med(𝒳)={\rm Med}(\mathcal{X})=\varnothing. Define a map ϵ\epsilon which assigns to each x𝒳x\in\cup\mathcal{X} a face ϵ(x)\epsilon(x) in the “half-skeleton” of Δ\Delta, according to the memberships of xx:

(6) ϵ:𝒳skel(d1)/2(Δ),x{{X𝒳xX},xMin(𝒳)Med(𝒳),{X𝒳xX},xMaj(𝒳).\displaystyle\begin{split}\epsilon:\cup\mathcal{X}&\longrightarrow{\rm skel}_{\lfloor(d-1)/2\rfloor}(\Delta),\\ x&\longmapsto\begin{cases}\{X\in\mathcal{X}\mid x\in X\},&x\in{\rm Min}(\mathcal{X})\cup{\rm Med}(\mathcal{X}),\\ \{X\in\mathcal{X}\mid x\not\in X\},&x\in{\rm Maj}(\mathcal{X}).\end{cases}\end{split}

We now define a sequence λ(0),λ(1),λ(2),\lambda^{(0)},\lambda^{(1)},\lambda^{(2)},\ldots of face labelings, as follows. Begin by defining λ(0)ϵ1\lambda^{(0)}\coloneqq\epsilon^{-1}, thereby labeling each face skel(d1)/2(Δ)\mathcal{F}\in{\rm skel}_{\lfloor(d-1)/2\rfloor}(\Delta) by its fiber:

(7) λ(0)(){x𝒳ϵ(x)=}.\lambda^{(0)}(\mathcal{F})\coloneqq\{x\in\cup\mathcal{X}\mid\epsilon(x)=\mathcal{F}\}.

Then recursively define

(8) λ(i+1)()cofacets𝒢 of λ(i)(𝒢).\lambda^{(i+1)}(\mathcal{F})\coloneqq\biguplus_{\mathclap{\begin{subarray}{c}\text{cofacets}\\ \text{$\mathcal{G}$ of $\mathcal{F}$}\end{subarray}}}\lambda^{(i)}(\mathcal{G}).

Note that λ(0)()\lambda^{(0)}(\mathcal{F}) and λ(1)()\lambda^{(1)}(\mathcal{F}) are multiplicity-free (i.e., they are true sets), whereas for i2i\geq 2, the labels λ(i)()\lambda^{(i)}(\mathcal{F}) can be multisets. The reader may prefer to imagine constructing the labels λ(i+1)()\lambda^{(i+1)}(\mathcal{F}) as follows: starting with a clean slate, choose a face 𝒢\mathcal{G}, and add one copy of its previous label λ(i)(𝒢)\lambda^{(i)}(\mathcal{G}) to each facet \mathcal{F} of 𝒢\mathcal{G}. Doing this for all 𝒢\mathcal{G} where λ(i)(𝒢)\lambda^{(i)}(\mathcal{G}) exists, the resulting multiset unions are precisely the new labels λ(i+1)()\lambda^{(i+1)}(\mathcal{F}). Hence, intuitively, one can regard each successive labeling as spreading #𝒢\#\mathcal{G} copies of the previous label of 𝒢\mathcal{G} across the boundary (𝒢)\partial(\mathcal{G}), for each face 𝒢\mathcal{G} in the appropriate skeleton.

Note that the domain of λ(i)\lambda^{(i)} is skel(d1)/2i(Δ){\rm skel}_{\lfloor(d-1)/2\rfloor-i}(\Delta), and so the nonempty labelings are given by the finite sequence λ(0),,λ(d/2)\lambda^{(0)},\ldots,\lambda^{(\lceil d/2\rceil)}. From now on, we will use the familiar shorthand λλ(0)\lambda\coloneqq\lambda^{(0)}, λλ(1)\lambda^{\prime}\coloneqq\lambda^{(1)}, and λ′′λ(2)\lambda^{\prime\prime}\coloneqq\lambda^{(2)}. These are the only labelings that play a role in this paper, and it will turn out that the notation is intentionally suggestive of derivatives.

3.3. Volume of the EM simplex

We now make the two central definitions of this paper:

Definition 3.1 (EM simplex).

Let 𝒳=(X0,,Xd)\mathcal{X}=(X_{0},\ldots,X_{d}) be a family of finite sets. Then the earth mover’s (EM) simplex on 𝒳\mathcal{X} is the abstract dd-simplex Δ=Δ(𝒳)\Delta=\Delta(\mathcal{X}), equipped with the face labelings λ(i)\lambda^{(i)} defined in (7)–(8).

Definition 3.2 (Volume of an EM simplex).

Let Δ\Delta be an EM simplex. The iith generalized volume of Δ\Delta is

Voli(Δ)|λ(i)()|,{\rm Vol}_{i}(\Delta)\coloneqq\sum_{\mathcal{F}}|\lambda^{(i)}(\mathcal{F})|,

where the nonzero summands range over the faces skel(d1)/2i(Δ)\mathcal{F}\in{\rm skel}_{\lfloor(d-1)/2\rfloor-i}(\Delta). When i=1i=1, we will suppress the subscript, and simply call Vol(Δ)Vol1(Δ){\rm Vol}(\Delta)\coloneqq{\rm Vol}_{1}(\Delta) the volume of Δ\Delta.

As mentioned in Section 3.1, each face Δ\mathcal{F}\in\Delta determines the EM simplex Δ()\Delta(\mathcal{F}), and so for notational clarity we will write Vol()Vol(Δ()){\rm Vol}(\mathcal{F})\coloneqq{\rm Vol}(\Delta(\mathcal{F})).

Example 3.3 (Volumes of EM simplices).
  1. (1)

    If d=0d=0, then λ(i)\lambda^{(i)} is just the empty labeling for all i>0i>0. Hence Vol(Δ)=0{\rm Vol}(\Delta)=0, just as we would expect for a 0-dimensional simplex.

  2. (2)

    If d=1d=1, then we have λ({X0})=X0X1\lambda(\{X_{0}\})=X_{0}\setminus X_{1} and λ({X1})=X1X0\lambda(\{X_{1}\})=X_{1}\setminus X_{0} and λ()=X0X1\lambda(\varnothing)=X_{0}\cap X_{1}. Then the domain of λ\lambda^{\prime} is just skel1(Δ)={}{\rm skel}_{-1}(\Delta)=\{\varnothing\}, and we have

    λ()\displaystyle\lambda^{\prime}(\varnothing) =(X0X1)(X1X0)=X0X1\displaystyle=(X_{0}\setminus X_{1})\cup(X_{1}\setminus X_{0})=X_{0}\,\scalebox{0.75}{$\triangle$}\,X_{1}
    Vol(Δ)\displaystyle{\rm Vol}(\Delta) =|X0X1|.\displaystyle=|X_{0}\,\scalebox{0.75}{$\triangle$}\,X_{1}|.

    This fact about “edge length” is crucial to our main result (Theorem 4.1).

  3. (3)

    When d=2d=2, the process above shows that Vol(Δ)=#{x𝒳deg𝒳(x)=1 or 2}=|(𝒳)|{\rm Vol}(\Delta)=\#\{x\in\cup\mathcal{X}\mid\deg_{\mathcal{X}}(x)=1\text{ or }2\}=|\blacktriangle(\mathcal{X})|. Note that Vol(Δ){\rm Vol}(\Delta) does not behave like Euclidean volume: for instance, in the situation X0=X1X2X_{0}=X_{1}\neq X_{2} where two vertices are equal, we always have nonzero Vol(Δ)=|X0X2|{\rm Vol}(\Delta)=|X_{0}\,\scalebox{0.75}{$\triangle$}\,X_{2}|.

  4. (4)

    Notice that for d2d\leq 2, we had Voli(Δ)=0{\rm Vol}_{i}(\Delta)=0 for all i>1i>1. See Section 5 for a three-dimensional example where Vol2(Δ)0{\rm Vol}_{2}(\Delta)\neq 0.

  5. (5)

    In any dimension dd, if all the XiX_{i} are identical, then the only nonempty λ()\lambda(\mathcal{F}) is λ()=X0==Xd\lambda(\varnothing)=X_{0}=\cdots=X_{d}. Since \varnothing has no facets, we have Vol(Δ)=0{\rm Vol}(\Delta)=0.

  6. (6)

    In any dimension dd, if the XiX_{i} are pairwise disjoint, then λ()\lambda(\mathcal{F}) is nonempty if and only if \mathcal{F} is a vertex, in which case λ({Xi})=Xi\lambda(\{X_{i}\})=X_{i}. Hence the only nonempty λ()\lambda^{\prime}(\mathcal{F}) is λ()=𝒳\lambda^{\prime}(\varnothing)=\cup\mathcal{X}, meaning that Vol(Δ)=|𝒳|{\rm Vol}(\Delta)=|{\cup\mathcal{X}}|. Likewise, for any face Δ\mathcal{F}\in\Delta we have Vol()=||{\rm Vol}(\mathcal{F})=|{\cup\mathcal{F}}|.

The following proposition reveals the reason for choosing notation λ,λ,λ′′,\lambda,\lambda^{\prime},\lambda^{\prime\prime},\ldots suggestive of derivatives. Specifically, the generating function for #ϵ(x)\#\epsilon(x) encodes all of the generalized volumes Voli(Δ){\rm Vol}_{i}(\Delta), as its iith derivatives evaluated at unity:

Proposition 3.4.

Let Δ=Δ(𝒳)\Delta=\Delta(\mathcal{X}) be an EM simplex, and let v(t)x𝒳t#ϵ(x)\displaystyle v(t)\coloneqq\sum_{x\in\cup\mathcal{X}}t^{\#\epsilon(x)}. Then for all i0i\geq 0, we have

Voli(Δ)=v(i)(1).{\rm Vol}_{i}(\Delta)=v^{(i)}(1).
Proof.

We will first show by induction that

(9) v(i)(t)=x𝒳k0Δ:#=k(multiplicity of x in λ(i)())tk,v^{(i)}(t)=\sum_{x\in\cup\mathcal{X}}\hskip 4.30554pt\sum_{k\geq 0}\hskip 4.30554pt\sum_{\begin{subarray}{c}\mathcal{F}\in\Delta:\\ \#\mathcal{F}=k\end{subarray}}\Big{(}\text{multiplicity of $x$ in $\lambda^{(i)}(\mathcal{F})$}\Big{)}t^{k},

where the multiplicity is 0 if λ(i)()\lambda^{(i)}(\mathcal{F}) is not defined. In the base case i=0i=0, we have

v(t)xt#ϵ(x)=xk#=k𝟏λ()(x)tk,v(t)\coloneqq\sum_{x}t^{\#\epsilon(x)}=\sum_{x}\sum_{k}\sum_{\#\mathcal{F}=k}\mathbf{1}_{\lambda(\mathcal{F})}(x)\cdot t^{k},

which agrees with (9) since λ()\lambda(\mathcal{F}) is multiplicity-free. Now taking (9) as our induction hypothesis, we have

v(i+1)(t)=ddtv(i)(t)\displaystyle v^{(i+1)}(t)=\frac{d}{dt}\>v^{(i)}(t) =xk#𝒢=kk(mult. of x in λ(i)(𝒢))tk1\displaystyle=\sum_{x}\sum_{k}\sum_{\#\mathcal{G}=k}k\Big{(}\text{mult.\ of $x$ in $\lambda^{(i)}(\mathcal{G})$}\Big{)}t^{k-1}
=xk#𝒢=kfacets of 𝒢(mult. of x in λ(i+1)())tk1\displaystyle=\sum_{x}\sum_{k}\sum_{\#\mathcal{G}=k}\sum_{\begin{subarray}{c}\text{facets}\\ \text{$\mathcal{F}$ of $\mathcal{G}$}\end{subarray}}\Big{(}\text{mult.\ of $x$ in $\lambda^{(i+1)}(\mathcal{F})$}\Big{)}t^{k-1}
=xk#=k1(mult. of x in λ(i+1)())tk1,\displaystyle=\sum_{x}\sum_{k}\sum_{\#\mathcal{F}=k-1}\Big{(}\text{mult.\ of $x$ in $\lambda^{(i+1)}(\mathcal{F})$}\Big{)}t^{k-1},

which, upon re-indexing, proves the claim (9). Evaluating (9) at t=1t=1, we obtain

v(i)(1)=xk#=k(mult. of x in λ(i)())=Δ|λ(i)()|Voli(Δ),v^{(i)}(1)=\sum_{x}\sum_{k}\sum_{\#\mathcal{F}=k}\Big{(}\text{mult.\ of $x$ in $\lambda^{(i)}(\mathcal{F})$}\Big{)}=\sum_{\mathcal{F}\in\Delta}|\lambda^{(i)}(\mathcal{F})|\eqqcolon{\rm Vol}_{i}(\Delta),

as in Definition 3.2. ∎

Corollary 3.5.

Let Δ=Δ(𝒳)\Delta=\Delta(\mathcal{X}) be an EM simplex. Then we have

Voli(Δ)=x𝒳(#ϵ(x))i{\rm Vol}_{i}(\Delta)=\sum_{x\in\cup\mathcal{X}}(\#\epsilon(x))_{i}

where (a)ia(a1)(ai+1)(a)_{i}\coloneqq a(a-1)\cdots(a-i+1) is the Pochhammer symbol for the falling factorial. In particular, we have

(a) Vol0(Δ)\displaystyle{\rm Vol}_{0}(\Delta) =|𝒳|,\displaystyle=|{\cup\mathcal{X}}|,
(b) Vol(Δ)\displaystyle{\rm Vol}(\Delta) =x#ϵ(x)=|(𝒳)|,\displaystyle=\sum_{x}\#\epsilon(x)=|\blacktriangle(\mathcal{X})|,
(c) Vol2(Δ)\displaystyle{\rm Vol}_{2}(\Delta) =x#ϵ(x)dimϵ(x).\displaystyle=\sum_{x}\#\epsilon(x)\cdot\dim\epsilon(x).
Proof.

The general formula follows immediately from Proposition 3.4; the only statement requiring proof is the second equality in (b). By (6) we have

#ϵ(x)={deg𝒳(x),xMin(𝒳)Med(𝒳),d+1deg𝒳(x),xMaj(𝒳),\#\epsilon(x)=\begin{cases}\deg_{\mathcal{X}}(x),&x\in{\rm Min}(\mathcal{X})\cup{\rm Med}(\mathcal{X}),\\ d+1-\deg_{\mathcal{X}}(x),&x\in{\rm Maj}(\mathcal{X}),\end{cases}

in which both cases take the common form #ϵ(x)=min{deg𝒳(x),d+1deg𝒳(x)}\#\epsilon(x)=\min\{\deg_{\mathcal{X}}(x),\>d+1-\deg_{\mathcal{X}}(x)\}. Hence by Definition 2.1, we see that #ϵ(x)\#\epsilon(x) is the multiplicity of xx in (𝒳)\blacktriangle(\mathcal{X}), and the result follows. ∎

We conclude this section with the following corollary, which is the motivating fact behind the definition (and the name) of the EM simplex:

Corollary 3.6.

Let h0,,hdh_{0},\ldots,h_{d} be histograms, and let ={H0,,Hd}\mathcal{H}=\{H_{0},\ldots,H_{d}\} be the family of cumulative histograms. Then

EMD(h0,,hd)=Vol(Δ()),{\rm EMD}(h_{0},\ldots,h_{d})={\rm Vol}(\Delta(\mathcal{H})),

where Δ()\Delta(\mathcal{H}) is the EM simplex on \mathcal{H}.

Proof.

This is immediate upon comparing Proposition 2.2 with Corollary 3.5(b). ∎

4. Main results

We now present our analogue of the Cayley–Menger formula, expressing the volume of an EM simplex in terms of its edge lengths (i.e., the volumes of its 11-dimensional faces). We then present another volume formula, this time in terms of surface area, which, in even dimensions, is an exact generalization of the observation (3) for d=2d=2. For each of our two formulas, we also record a corollary translating the result into the language of the EMD (by means of Corollary 3.6 above), which was the original motivation behind this paper.

Theorem 4.1 (Cayley–Menger formula for EM simplices).

Let Δ\Delta be an EM simplex of dimension dd. Then we have

Vol(Δ)=1d(Vol2(Δ)+edges of ΔVol()).{\rm Vol}(\Delta)=\frac{1}{d}\Bigg{(}{\rm Vol}_{2}(\Delta)+\sum_{\mathclap{\begin{subarray}{c}\textup{edges $\mathcal{E}$}\\ \textup{of $\Delta$}\end{subarray}}}{\rm Vol}(\mathcal{E})\Bigg{)}.
Proof.

By Corollary 3.5(b), we have

dVol(Δ)\displaystyle d\cdot{\rm Vol}(\Delta) =x𝒳#ϵ(x)d\displaystyle=\sum_{x\in\cup\mathcal{X}}\#\epsilon(x)\cdot d
=x#ϵ(x)(dimϵ(x)+codimϵ(x))\displaystyle=\sum_{x}\#\epsilon(x)\cdot\Big{(}\dim\epsilon(x)+\operatorname{codim}\epsilon(x)\Big{)}
=x#ϵ(x)dimϵ(x)+x#ϵ(x)codimϵ(x)\displaystyle=\sum_{x}\#\epsilon(x)\cdot\dim\epsilon(x)+\sum_{x}\#\epsilon(x)\cdot\operatorname{codim}\epsilon(x)
=Vol2(Δ)+x#ϵ(x)codimϵ(x)# edges connectingϵ(x) and its link,\displaystyle={\rm Vol}_{2}(\Delta)+\sum_{x}\underbrace{\#\epsilon(x)\cdot\operatorname{codim}\epsilon(x)}_{\begin{subarray}{c}\text{\# edges connecting}\\ \text{$\epsilon(x)$ and its link}\end{subarray}},

where we used Corollary 3.5(c) to rewrite the first sum as a generalized volume. As for our claim below the second sum, any such edge clearly has #ϵ(x)\#\epsilon(x) choices for its first vertex, and codimϵ(x)\operatorname{codim}\epsilon(x) choices for its second vertex. Now, for any edge ={Xi,Xj}\mathcal{E}=\{X_{i},X_{j}\}, we have xXiXjx\in X_{i}\,\scalebox{0.75}{$\triangle$}\,X_{j} if and only if xx belongs to exactly one of the two sets, i.e., \mathcal{E} connects ϵ(x)\epsilon(x) to its link. Therefore, summing over all x𝒳x\in\cup\mathcal{X}, our computation above becomes

dVol(Δ)\displaystyle d\cdot{\rm Vol}(\Delta) =Vol2(Δ)+i<j|XiXj|\displaystyle={\rm Vol}_{2}(\Delta)+\sum_{i<j}|X_{i}\,\scalebox{0.75}{$\triangle$}\,X_{j}|
=Vol2(Δ)+edges of ΔVol(),\displaystyle={\rm Vol}_{2}(\Delta)+\sum_{\mathclap{\begin{subarray}{c}\textup{edges $\mathcal{E}$}\\ \textup{of $\Delta$}\end{subarray}}}{\rm Vol}(\mathcal{E}),

where we have rewritten the symmetric differences as edge lengths, using part (2) of Example 3.3. ∎

Corollary 4.2.

Let h0,,hdh_{0},\ldots,h_{d} be histograms, and let \mathcal{H} be the family of cumulative histograms. Then

EMD(h0,,hd)=1d(0i<jdEMD(hi,hj)+k=2d/2k(k1)#{x|deg(x)=k or dk+1}).\displaystyle{\rm EMD}(h_{0},\ldots,h_{d})=\frac{1}{d}\left(\sum_{0\leq i<j\leq d}{\rm EMD}(h_{i},h_{j})+\sum_{k=2}^{\lceil d/2\rceil}k(k-1)\cdot\#\Big{\{}x\in\cup\mathcal{H}\;\Big{|}\;\deg_{\mathcal{H}}(x)=\textup{$k$ or $d-k+1$}\Big{\}}\right).

Our second main result is a volume formula in terms of surface area rather than edge lengths:

Theorem 4.3 (Volume via surface area).

Let Δ=Δ(𝒳)\Delta=\Delta(\mathcal{X}) be an EM simplex of dimension dd. Then

Vol(Δ)=1d(SA(Δ)+d+12|Med(𝒳)|),{\rm Vol}(\Delta)=\frac{1}{d}\left({\rm{SA}}(\Delta)+\frac{d+1}{2}\cdot|{\rm Med}(\mathcal{X})|\right),

where SA(Δ){\rm SA}(\Delta) denotes the surface area (i.e., the sum of the volumes of the facets).

Proof.

In this proof, we reserve the symbol “\mathcal{F}” specifically for facets of Δ\Delta, rather than generic faces. We will write ϵ(x)\epsilon_{{}_{\mathcal{F}}}(x) to denote the map ϵ\epsilon in the context of Δ()\Delta(\mathcal{F}) rather than Δ(𝒳)\Delta(\mathcal{X}): hence the conditions in the definition (6) pertain to the membership of xx in Min(){\rm Min}(\mathcal{F}), Maj(){\rm Maj}(\mathcal{F}), or Med(){\rm Med}(\mathcal{F}). We begin by expressing #ϵ(x)d\#\epsilon(x)\cdot d in terms of #ϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x), for each x𝒳x\in\cup\mathcal{X}:

Case 1: xMin(𝒳)x\in{\rm Min}(\mathcal{X}). We have

#ϵ(x)d\displaystyle\#\epsilon(x)\cdot d =#ϵ(x)(dimϵ(x)+codimϵ(x))\displaystyle=\#\epsilon(x)\cdot\Big{(}\dim\epsilon(x)+\operatorname{codim}\epsilon(x)\Big{)}
(10) =#ϵ(x)dimϵ(x)+codimϵ(x)#ϵ(x),\displaystyle=\#\epsilon(x)\cdot\dim\epsilon(x)+\operatorname{codim}\epsilon(x)\cdot\#\epsilon(x),

which we interpret combinatorially (from left to right) as follows. First, #ϵ(x)\#\epsilon(x) is the number of facets \mathcal{F} whose opposite vertex contains xx; for any such \mathcal{F}, we have #ϵ(x)=#ϵ(x)1=dimϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)=\#\epsilon(x)-1=\dim\epsilon(x). Next, codimϵ(x)\operatorname{codim}\epsilon(x) is the number of facets \mathcal{F} whose opposite vertex does not contain xx; for any such \mathcal{F}, we have #ϵ(x)=#ϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)=\#\epsilon(x), since xMin(𝒳)xMin()Med()x\in{\rm Min}(\mathcal{X})\Longrightarrow x\in{\rm Min}(\mathcal{F})\cup{\rm Med}(\mathcal{F}). It follows that the expansion (10) is the sum of the #ϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)’s, taken over all facets \mathcal{F}:

(11) xMin(𝒳)#ϵ(x)d=#ϵ(x).x\in{\rm Min}(\mathcal{X})\Longrightarrow\#\epsilon(x)\cdot d=\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x).

Case 2: xMaj(𝒳)x\in{\rm Maj}(\mathcal{X}). In this case, we have a “dual” interpretation of (10), as follows (from right to left). First, codimϵ(x)\operatorname{codim}\epsilon(x) is the number of facets \mathcal{F} whose opposite vertex contains xx; for any such \mathcal{F}, we have #ϵ(x)=#ϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)=\#\epsilon(x). This is because xMaj(𝒳)xMed()Maj()x\in{\rm Maj}(\mathcal{X})\Longrightarrow x\in{\rm Med}(\mathcal{F})\cup{\rm Maj}(\mathcal{F}), and so ϵ(x)\epsilon_{{}_{\mathcal{F}}}(x) equals #(deg𝒳(x)1)=d+1deg𝒳(x)=#ϵ(x)\#\mathcal{F}-(\deg_{\mathcal{X}}(x)-1)=d+1-\deg_{\mathcal{X}}(x)=\#\epsilon(x). Next, #ϵ(x)\#\epsilon(x) is the number of facets \mathcal{F} whose opposite vertex does not contain xx; for any such \mathcal{F}, we have #ϵ(x)=#ϵ(x)1=dimϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)=\#\epsilon(x)-1=\dim\epsilon(x). Therefore, just as in Case 1, the expansion (10) is the sum of all #ϵ(x)\#\epsilon_{{}_{\mathcal{F}}}(x)’s:

(12) xMaj(𝒳)#ϵ(x)d=#ϵ(x).x\in{\rm Maj}(\mathcal{X})\Longrightarrow\#\epsilon(x)\cdot d=\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x).

Case 3: xMed(𝒳)x\in{\rm Med}(\mathcal{X}). This time, for each of the d+1d+1 facets \mathcal{F}, we have #ϵ(x)=d+121\#\epsilon_{{}_{\mathcal{F}}}(x)=\frac{d+1}{2}-1, regardless of whether xx is contained in the opposite vertex. Hence

#ϵ(x)=(d+1)(d+121)=d(d+12)#ϵ(x)d+12,\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)=(d+1)\left(\frac{d+1}{2}-1\right)=d\cdot\underbrace{\left(\frac{d+1}{2}\right)}_{\#\epsilon(x)}-\frac{d+1}{2},

which we rearrange to obtain

(13) xMed(𝒳)#ϵ(x)d=#ϵ(x)+d+12.x\in{\rm Med}(\mathcal{X})\Longrightarrow\#\epsilon(x)\cdot d=\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)+\frac{d+1}{2}.

Combining these results, we conclude that

dVol(Δ)Cor. 3.5(b)=x𝒳#ϵ(x)d\displaystyle d\cdot\overbrace{{\rm Vol}(\Delta)}^{\text{Cor.~{}\ref{cor:Vol IDs}\eqref{Vol1}}}=\sum_{x\in\cup\mathcal{X}}\#\epsilon(x)\cdot d =xMin(𝒳)#ϵ(x)d(11)+xMaj(𝒳)#ϵ(x)d(12)+xMed(𝒳)#ϵ(x)d(13)\displaystyle=\overbrace{\sum_{\mathclap{x\in{\rm Min}(\mathcal{X})}}\#\epsilon(x)\cdot d}^{\eqref{epsilon(x) d for MinX}}+\overbrace{\sum_{\mathclap{x\in{\rm Maj}(\mathcal{X})}}\#\epsilon(x)\cdot d}^{\eqref{epsilon(x) d for MajX}}+\overbrace{\sum_{\mathclap{x\in{\rm Med}(\mathcal{X})}}\#\epsilon(x)\cdot d}^{\eqref{epsilonx for MedX}}
=xMed(𝒳)(#ϵ(x))+xMed(𝒳)(#ϵ(x)+d+12)\displaystyle=\sum_{x\not\in{\rm Med}(\mathcal{X})}\left(\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)\right)+\sum_{x\in{\rm Med}(\mathcal{X})}\left(\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)+\frac{d+1}{2}\right)
=x𝒳(#ϵ(x))+xMed(𝒳)(d+1)/2\displaystyle=\sum_{x\in\cup\mathcal{X}}\left(\sum_{\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)\right)+\sum_{\mathclap{x\in{\rm Med}(\mathcal{X})}}(d+1)/2
=(x#ϵ(x))Vol()+xMed(𝒳)(d+1)/2\displaystyle=\sum_{\mathcal{F}}\underbrace{\left(\sum_{x\in\cup\mathcal{F}}\#\epsilon_{{}_{\mathcal{F}}}(x)\right)}_{{\rm Vol}(\mathcal{F})}\hskip 4.30554pt+\sum_{\mathclap{x\in{\rm Med}(\mathcal{X})}}(d+1)/2
=SA(Δ)+d+12|Med(𝒳)|.\displaystyle={\rm SA}(\Delta)+\frac{d+1}{2}\cdot|{\rm Med}(\mathcal{X})|.\qed
Corollary 4.4.

Let h0,,hdh_{0},\ldots,h_{d} be histograms, and let \mathcal{H} be the family of cumulative histograms. Then

EMD(h0,,hd)=1di=0dEMD(h0,,h^i,,hd)+{0,d even,d+12d|Med()|,d odd.{\rm EMD}(h_{0},\ldots,h_{d})=\frac{1}{d}\sum_{i=0}^{d}{\rm EMD}(h_{0},\ldots,\widehat{h}_{i},\ldots,h_{d})+\begin{cases}0,&\textup{$d$ even},\\ \frac{d+1}{2d}\cdot|{\rm Med}(\mathcal{H})|,&\textup{$d$ odd}.\end{cases}

5. Full example

We revisit the example from Figure 2, where d=3d=3, with the hih_{i} and HiH_{i} below:

H0=H_{0}=h0=(2,0,1)h_{0}=(2,0,1)      H1=H_{1}=h1=(0,3,0)h_{1}=(0,3,0)      H2=H_{2}=h2=(1,0,2)h_{2}=(1,0,2)      H3=H_{3}=h3=(0,0,3)h_{3}=(0,0,3)

We have already seen that EMD(h0,,h3)=7{\rm EMD}(h_{0},\ldots,h_{3})=7; now we will verify Theorems 4.1 and 4.3. This example may also help to clarify the definitions introduced in Section 3.

Let ={H0,,H3}\mathcal{H}=\{H_{0},\ldots,H_{3}\}, and let Δ=Δ()\Delta=\Delta(\mathcal{H}) be the EM simplex. First we note that \cup\mathcal{H} has 8 elements, namely all dots in the 3×33\times 3 grid except the dot in the upper-left, which does not appear in any of the HiH_{i}. We have the following partition of \cup\mathcal{H}:

Min(){\rm Min}(\mathcal{H})      Med(){\rm Med}(\mathcal{H})      Maj(){\rm Maj}(\mathcal{H})

Next we determine the faces ϵ(x)\epsilon(x) for each dot xx\in\cup\mathcal{H}, maintaining the 3×33\times 3 arrangement from above:

{H1}{H0}{H0,H1}{H0,H2}{H3}\begin{array}[]{lll}&\{H_{1}\}&\varnothing\\ \{H_{0}\}&\{H_{0},H_{1}\}&\varnothing\\ \{H_{0},H_{2}\}&\{H_{3}\}&\varnothing\end{array}

Below, recalling that the labeling λ\lambda is just the preimage of ϵ\epsilon, we depict each set λ()\lambda(\mathcal{F}) by a dot diagram placed at the face skel1(Δ)\mathcal{F}\in{\rm skel}_{1}(\Delta). Note that these faces are either \varnothing, vertices, or edges. If λ()=\lambda(\mathcal{F})=\varnothing, then we omit the label on \mathcal{F}:

H1H_{1}H3H_{3}H2H_{2}H0H_{0}λ()=\lambda(\varnothing)=

To compute Vol(Δ){\rm Vol}(\Delta), we depict the labeling λ\lambda^{\prime} below. A copy of each previous label λ()\lambda(\mathcal{F}) is sent to each facet of \mathcal{F}. Note that \varnothing is the only facet of a vertex:

H1H_{1}H3H_{3}H2H_{2}H0H_{0}λ()=\lambda^{\prime}(\varnothing)=

This verifies Corollary 3.6: counting dots above, we have Vol(Δ)|λ()|=7{\rm Vol}(\Delta)\coloneqq\sum_{\mathcal{F}}|\lambda^{\prime}(\mathcal{F})|=7, which was the EMD computed in Figure 2. To deterine Vol2(Δ){\rm Vol}_{2}(\Delta), we determine one more labeling λ′′\lambda^{\prime\prime}, by iterating the process above, namely, sending one copy of λ()\lambda^{\prime}(\mathcal{F}) to each facet of \mathcal{F}. Clearly λ′′()\lambda^{\prime\prime}(\mathcal{F}) is nonempty only for =\mathcal{F}=\varnothing, in which case we have the multiset union of the three labels shown above:

22λ′′()=\lambda^{\prime\prime}(\varnothing)=

where each dot occurs with multiplicity 2. Hence Vol2(Δ)|λ′′()|=4{\rm Vol}_{2}(\Delta)\coloneqq\sum_{\mathcal{F}}|\lambda^{\prime\prime}(\mathcal{F})|=4.

Now to verify Theorem 4.1, we compute the edge lengths of Δ\Delta, which is easily done by inspecting the pairwise symmetric differences of the HiH_{i}, as in Figure 1:

332342H1H_{1}H3H_{3}H2H_{2}H0H_{0}

The sum of the edge lengths is 17. We therefore have 1d[Vol2(Δ)+Vol()]=13(4+17)=7\frac{1}{d}[{\rm Vol}_{2}(\Delta)+\sum_{\mathcal{E}}{\rm Vol}(\mathcal{E})]=\frac{1}{3}(4+17)=7, which we know to equal Vol(Δ)=EMD(h0,,h3){\rm Vol}(\Delta)={\rm EMD}(h_{0},\ldots,h_{3}), just as predicted by Theorem 4.1.

Finally, to verify Theorem 4.3, we compute the areas of the four facets of Δ\Delta by inspecting the sizes of the generalized symmetric differences \blacktriangle, as in Corollary 3.5(b):

Vol({H1,H2,H3})\displaystyle{\rm Vol}(\{H_{1},H_{2},H_{3}\}) =4,\displaystyle=4,
Vol({H0,H2,H3})\displaystyle{\rm Vol}(\{H_{0},H_{2},H_{3}\}) =4,\displaystyle=4,
Vol({H0,H1,H3})\displaystyle{\rm Vol}(\{H_{0},H_{1},H_{3}\}) =5,\displaystyle=5,
Vol({H0,H1,H2})\displaystyle{\rm Vol}(\{H_{0},H_{1},H_{2}\}) =4.\displaystyle=4.

Hence Δ\Delta has surface area 17. Recalling from above that |Med()|=2|{\rm Med}(\mathcal{H})|=2, we thus again obtain 1d[SA(Δ)+d+12|Med()|]=13(17+22)=7\frac{1}{d}[{\rm SA}(\Delta)+\frac{d+1}{2}\cdot|{\rm Med}(\mathcal{H})|]=\frac{1}{3}(17+2\cdot 2)=7, agreeing with Theorem 4.3.

Remark 5.1.

We kept this example three-dimensional in order to include the pictures, but note the price we pay: due to the relationship (3), since each edge is contained in exactly two facets, the sum of the (2-dimensional) facet areas is the same as the sum of the edge lengths. It is therefore much more interesting to contrast the results of Theorems 4.1 and 4.3 in more than three dimensions.

6. Concluding remarks and open problems

In this paper, we introduced the notion of an EM simplex in order to solve one very specific problem, namely, finding an expression for the generalized EMD in terms of pairwise EMDs. As we have seen, it turns out that among the generalized volumes Voli(Δ){\rm Vol}_{i}(\Delta) with which we endowed an EM simplex, only Vol(Δ)=Vol1(Δ){\rm Vol}(\Delta)={\rm Vol}_{1}(\Delta) and Vol2(Δ){\rm Vol}_{2}(\Delta) were required to solve our problem. It was straightforward to see that Vol0(Δ){\rm Vol}_{0}(\Delta) is just the size of the union 𝒳\cup\mathcal{X} of the vertex sets XiX_{i}, and that Vol(Δ){\rm Vol}(\Delta) equals the EMD of the histograms corresponding to the vertices. As a consequence of Theorem 4.1, we can now interpret Vol2(Δ){\rm Vol}_{2}(\Delta) as the “obstruction” to a perfect generalization of the simple relationship (3) observed previously in dimension 2.

Problem 6.1.

Find an interpretation and/or an application for the higher generalized volumes Voli(Δ){\rm Vol}_{i}(\Delta) for i3i\geq 3.

We would be remiss to conclude without mentioning the field of topological data analysis. For an EM simplex Δ\Delta, it is clear that 𝒢Δ\mathcal{F}\subseteq\mathcal{G}\in\Delta implies Vol()Vol(𝒢){\rm Vol}(\mathcal{F})\leq{\rm Vol}(\mathcal{G}). This is also obvious from the very definition of the generalized EMD, since it is impossible that including more histograms can lessen the work required to equalize them. Therefore, given an arbitrary number of histograms, the EMD induces a filtration on the associated simplicial complex, in the sense of persistent homology: roughly speaking, the EMD functions as a threshold for determining whether a given subset of histograms forms a face. We are hopeful that this may prove to be a fruitful direction for future research.

References