1 Introduction

Here we consider the Random Euclidean Matching problem with exponent 2 for some unbounded distribution in the plane. The case of unbounded distributions is important both from a mathematical and an applied point of view.

In particular we consider the case of the Gaussian, the case of the Maxwellian and we give some hints on the case of other unbounded exponentially decaying densities.

Random Euclidean Matching is a combinatorial optimization problem in which N red points and N blue points extracted independently from the same probability distribution are paired, a red point with a single blue point and vice versa, in order to minimize the sum of the distances (the distance raised to a certain power) between the points. The problem is equivalent to calculating the Wasserstein distance between the two empirical measures associated with the points or, which is the same, finding the optimal transport between the two empirical measures.

Apart for the great mathematical interest in the subject, in the last years applications of Matching and Optimal Transport in statistical learning and more in general in applied mathematics has enormously increased. In particular we refer to [12, 18, 25] and references therein for applications of Optimal Transport to statistical learning, computer graphics, image processing, shape analysis, pattern recognition, particle systems and more. For general reviews on Optimal Transport we refer to [30] and with a more applicative aim to [26], while for a general review of results and tools and methods in probability, with applications to the matching problem we refer the reader to [28].

Coming to the mathematical problem, recently there has been a lot of activity on this topic because of some sharp progress, starting from a conjecture by Caracciolo et al., which shows how the problem can be rephrased in terms of PDE.

Let \(\mu \) be a probability distribution defined on \(\Lambda \subset {\mathbb {R}}^2.\) Let us consider two sets \(X^N =\{X_i\}_{i=1}^N\) and \(Y^N = \{Y_i\}_{i=1}^N\) of N points independently sampled from the distribution \(\mu \). The Euclidean Matching problem with exponent 2 consists in finding the matching \(i\rightarrow \pi _i\), i.e. the permutation \(\pi \) of \(\{1,\dots , N\}\) which minimizes the sum of the squares of the distances between \(X_i\) and \(Y_{\pi _i}\), that is

$$\begin{aligned} C_N(X^N,Y^N):= \min _{\pi }\sum _{i=1}^N |X_i-Y_{\pi _i}|^2. \end{aligned}$$
(1.1)

The cost defined above can be seen, but for a constant factor N,  as the square of the 2-Wasserstein distance between two probability measures. In fact, the p-Wasserstein distance \(W_p(\mu ,\nu )\), with exponent \(p\ge 1\), between two probability measures \(\mu \) and \(\nu ,\) is defined by

$$\begin{aligned} W_p^p(\mu ,\nu ):=\inf _{J_{\mu ,\nu }} \int dJ_{\mu , \nu } (x,y) |x- y|^p, \end{aligned}$$

where the infimum is taken on all the joint probability distributions \(dJ_{\mu ,\nu }(x,y)\) with marginals with respect to dx and dy given by \(\mu \) and \(\nu \), respectively. Defining the empirical measures

$$\begin{aligned} \mu ^N:=\frac{1}{N}\sum _{i=1}^N\delta _{X_i},\quad \nu ^N:=\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}, \end{aligned}$$

it is possible to show that

$$\begin{aligned} C_N(X^N, Y^N) = N W^2_2(\mu ^N,\nu ^N), \end{aligned}$$

(see for instance [13]). In the sequel we will shorten \(C_N: = C_N(X^N,Y^N)\).

The first general result on Random Euclidean Matching was obtained by Ajtai et al. by combinatorial arguments in [1]. In particular, in the case of dimension 2 and exponent 2, assumed that \(X_i\) and \(Y_i\) are independently sampled with uniform density on the unit square Q they prove that \(\mathbb {E}_\sigma [W_2^2(\mu ^N,\nu ^N)] \) behaves like \(\frac{\log N}{N}\), where with \(\mathbb {E}_\sigma \) we have indicated the expected value with respect to the uniform distribution \(d\sigma (x) = dx\) of the points \(\{X_i\}\) and \(\{Y_i\}\).

In the challenging paper [15], Caracciolo et al. conjecture that

$$\begin{aligned} \mathbb {E}_\sigma [C_N] \sim \frac{\log N}{2\pi }, \end{aligned}$$
(1.2)

where we say that \(f\sim g\) if \(\lim _{N\rightarrow +\infty } f(N)/g(N) =1\). In terms of \(W_2^2\) the conjecture is equivalent to

$$\begin{aligned} \mathbb {E}_\sigma [W_2^2(\mu ^N,\nu ^N)] \sim \frac{\log N}{2\pi N}. \end{aligned}$$
(1.3)

Furthermore, in [15] it is conjectured that asymptotically the expected value of \(W_2^2(\mu ^N,\sigma )\) between the empirical density \(X^N\) and the uniform probability measure \(\sigma \) on Q is given by

$$\begin{aligned} \mathbb {E}_\sigma [W_2^2(\mu ^N,\sigma )] \sim \frac{\log N}{4\pi N}. \end{aligned}$$
(1.4)

The above conjectures were proved by Ambrosio et al. [4]. In [2] more precise estimates are given and it is proved that the result can be extended to the case where particles are sampled from the uniform measure on a two-dimensional Riemannian compact manifold. In [3] it is shown that the optimal transport map for \(W_2(\mu ^N,\sigma )\) can be approximated as conjectured in [15].

We notice that, by simple scaling arguments, if we consider squares or manifold \(\Lambda \) of measure \(|\Lambda |\), the cost has to be multiplied by \(|\Lambda |\).

Then, in [8] it has been conjectured that, if the points are sampled from a smooth and strictly positive density \(\rho \) in a regular set \(\Lambda ,\) then the result is the same: i.e. the leading term of the expected value of the cost is \( \frac{|\Lambda |}{2\pi }\log N.\) The conjecture is based on a linearization of Monge–Ampere equation close to a non uniform density and a proof of the estimate form above is given when \(\Lambda \) is a square. This result has been proved by Ambrosio et al. [5]. In particular they generalize the result to Hölder continuous positive densities in bounded regular sets and in Riemannian manifolds.

Summarizing, if the density \(\sigma =\rho dx ,\) is supported in a bounded regular set \(\Lambda \) where \(\rho \) is Hölder continuous, and if there exist constants a and b such that \(0< a<\rho <b,\) then

$$\begin{aligned} \mathbb {E}_\sigma [C_N] \sim \frac{|\Lambda |}{2\pi }\log N. \end{aligned}$$
(1.5)

In [9], in the case of constant densities, the correction to the leading behavior has been studied. In particular it is conjectured that the correction is given in terms of the regularized trace of the inverse of the Laplace operator in the set. This result seems very hard to be proven. A related question is if in a generic domain \(\mathbb {E}_\sigma [C_N] \sim \frac{|\Lambda |}{2\pi }\log N +O(1).\) Recently Goldman et al. [21] proved that \(\mathbb {E}_\sigma [C_N] \sim \frac{|\Lambda |}{2\pi }\log N +O(\log \log N).\)

1.1 Main Results

Interestingly (1.5) implies that the limiting average cost is not continuous in the space of densities, even in \(L_{\infty }\) norm.

Indeed, if we consider a sequence of smooth strictly positive densities \(\rho _k\) on a disk of radius 2,  converging, as \(k\rightarrow \infty \) to \(\rho =\frac{1}{\pi }1_{|x|<1},\) that is the uniform density on the disk of radius 1,  we get that for any k :  \(\mathbb {E}_{\rho _k}[C_N] \sim 2\log N,\) while for the limiting density \(\rho \) we get \(\mathbb {E}_\rho [C_N] \sim \frac{1}{2}\log N.\)

It is therefore natural to ask if it is possible to define sequences of densities \(\rho _N\), positive on all the disk of radius 2,  that converge to the density \(\rho =\frac{1}{\pi }1_{|x|<1},\) and such that \(\mathbb {E}_{\rho _N}[C_N] \sim c\log N,\) where \(c\in (\frac{1}{2},2).\) The answer is yes.

For instance, if we consider, in the disk of radius 2 the sequence of N-dependent “multiscaling” densities

$$\begin{aligned} \rho _N= {\left\{ \begin{array}{ll} \frac{1}{\pi }\left( 1-N^{\alpha -1}\right) \,; 0<|x|\le 1\\ \frac{1}{3\pi } N^{\alpha -1}; 1 < |x|\le 2 \end{array}\right. }{,} \end{aligned}$$
(1.6)

where \(0< \alpha <1.\) That is, in the average, there are \(N-N^\alpha \) points in the disk and \(N^\alpha \) points in the annulus (Fig. 1).

Fig. 1
figure 1

A two-level multiscaling density

In this case if \(d\sigma (x)=\rho _N(x)dx\), as we prove in Sect. 3, the average of the cost is given by

$$\begin{aligned} \mathbb {E}_\sigma [C_N] \sim \frac{1}{2\pi }(\pi \log N + 3\pi \log N^\alpha )=\left( \frac{1}{2}+\frac{3}{2} \alpha \right) \log N. \end{aligned}$$

Here we consider three problems.

The first is a generalization of the example seen above to any finite number of circular annuli. As we shall see this can be considered as a toy model for the Gaussian case.

Under suitable monotonicity conditions we will prove, see Theorem 3.1, that the average cost is given by

$$\begin{aligned} \mathbb {E}_\sigma [C_N]\sim \frac{1}{2\pi }\int _{\Lambda }dx \log (N \rho _N(x)). \end{aligned}$$

The second case is the case of the Gaussian distribution, that is \(d\mu (x)=\rho (x)dx\) and

$$\begin{aligned} \rho (x)=\frac{1}{2\pi }e^{-\frac{|x|^2}{2}}. \end{aligned}$$

In this case Talagrand proved [29] that the average cost, for large N satisfies

$$\begin{aligned} \frac{1}{C}(\log N)^2 \le \mathbb {E}_\mu [C_N]\le C (\log N)^2. \end{aligned}$$

An estimate from above proportional to \((\log N)^2\) was previously proved by Ledoux in [23], see also [22] where an estimate from below is proved using PDE techniques as in [4].

In this case we prove, see Theorem 4.1, that the average cost is

$$\begin{aligned} \mathbb {E}_\mu [C_N]\sim \frac{1}{2} (\log N)^2 . \end{aligned}$$

The third case, is when the density is given by

$$\begin{aligned} \rho (x)=\chi _{[0,1]}(x_1)\frac{1}{\sqrt{2\pi }}e^{-\frac{x_2^2}{2}}, \end{aligned}$$

and again \(d\mu (x)=\rho (x)dx\). This density, interpreting \(x_2\) as a velocity, is simply the Maxwellian distribution for a gas in the box (the segment) [0, 1].

In this case we prove, see Theorem 5.1, that the average limit cost is

$$\begin{aligned} \mathbb {E}_\mu [C_N]\sim \frac{2\sqrt{2}}{3\pi } (\log N)^{3/2} . \end{aligned}$$

As we shall see the problem of the Gaussian and the problem of the Maxwellian can be considered as the limit of a suitable sequence of the multiscaling densities, in particular, in both cases we obtain that

$$\begin{aligned} \mathbb {E}_\mu [C_N]\sim \frac{1}{2\pi }\int dx[\log (N \rho (x))]_+ .\end{aligned}$$
(1.7)

Dealing with other radially symmetric exponentially decaying densities, that is with densities proportional to \(e^{-|x|^\alpha }\), Talagrand showed that the leading behavior is proportional to \((\log N)^{1+2/\alpha }.\) We think that it would be possible to modify the proofs given here to deal with these cases and to get also in this case the exact leading behavior (i.e. determining also the multiplicative constant). More precisely, by (1.7) we would get

$$\begin{aligned} \mathbb {E}_\mu [C_N]\sim \frac{\alpha }{4+2\alpha }(\log N)^{1+2/\alpha }. \end{aligned}$$

Note that for \(\alpha = 2\) we find the constant \(\frac{1}{4}\) instead of \(\frac{1}{2}\) because here we are considering the Gaussian \(e^{-|x|^2}\) and not \(e^{-|x|^2/2}.\)

To prove this is out of the aim of the present paper and the technique would be slightly different, because here we make use of the fact that the gaussian is a product measure.

For what concerns probability distributions that decays as a power of the distance, for instance \(\frac{1}{1+|x|^\alpha },\) we do not dare to make conjectures. In that case the slow decay of the distribution does not allow us to apply techniques similar to those used in this work.

1.2 Further Questions and Literature

Now we briefly review what it is known, up to our knowledge, on the Random Euclidean Matching in dimension \(d\ne 2,\) with particular attention to the case of the constant distribution in the unite cube and of the Gaussian distribution.

In dimension 1 the Random Euclidean Matching problem is almost completely characterized, for any \(p\ge 1.\) This is due to the fact that the best matching between two set of points on a line is monotone, see for instance [11, 14, 16] where a general discussion on the one-dimensional case, also for the case of non-constant densities is given. In particular, for a segment of length 1 and for \(p=2:\) \(\mathbb {E}[C_N]\rightarrow 1/3\) as \(N\rightarrow \infty .\) For the normal distribution in dimension 1 in [10] it is proved that \(\mathbb {E}[C_N]\sim \log \log N,\) while in [11] estimates from below and from above proportional to \(\log \log N\) were given.

In dimension \(d\ge 3,\) for the constant density in a cube, it has been proved that \(\mathbb {E}[C_N]\) behaves as \(N^{1-p/d},\) for any \(p\ge 1\) (see [17, 23, 27]). In [20] it has been proved the existence of the limit \(\frac{\mathbb {E}[C_N]}{N^{1-p/d}}\) for any \(p\ge 1\).

In dimension \(d\ge 3\), the case of unbounded densities and in particular the gaussian case has been widely studied, see [6, 17, 24, 29]. In particular, in [6], it has been proved that \(\mathbb {E}[C_N]\) behaves as \(N^{1-p/d},\) for any \(0< p < d/2,\) and an explicit expression for the constant multiplying \(N^{1-p/d}\) is conjectured, while in [24], it has been proved that \(\mathbb {E}[C_N]\) behaves as \(N^{1-p/d},\) for any \(1\le p < d.\) General results on Random Euclidean Matching, including the case \(p > d\) and the case of unbounded densities are given in [19].

The structure of the paper is the following.

In Sect. 2 we give some general results on Wasserstein distance that we use in the sequel.

In Sect. 3 we consider the case of multiscaling densities, in Sect. 4 the case of the Gaussian density and in Sect. 5 the case of the Maxwellian density.

2 Useful Results and Notations

In this section, we recall some preliminary results that we will need later.

The following Lemma links the cost of semidiscrete problem to the cost of bipartite one.

Lemma 2.1

([4], Proposition 4.8) Let \(\rho \) be any probability density on \(\mathbb {R}^2\) and let \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) independent random variables in \(\mathbb {R}^2\) with common distribution \(\rho \), then

$$\begin{aligned} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \le 2\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] . \end{aligned}$$

We will use also the following property for the upper bounds of the leading terms, that is a consequence of Benamou–Brenier formula.

Theorem 2.1

([7], Benamou–Brenier formula) If \(\mu \) and \(\nu \) are probability measures on \(\Omega \subseteq \mathbb {R}^d\), then

$$\begin{aligned} W_2^2(\mu ,\nu )=\inf \left\{ \left. \int _0^1dt\int _{\Omega }d\mu _t|v_t|^2\right| \begin{array}{lcr}\frac{d}{dt}\mu _t+{ div}(v_t\mu _t)=0\\ \mu _0=\mu ,\mu _1=\nu \end{array}\right\} . \end{aligned}$$

The result we will use is the following.

Theorem 2.2

([2], Corollary 4.4) If \(\mu \) and \(\nu \) are probability densities on \(\Omega \subseteq \mathbb {R}^d\) and \(\phi \) is a weak solution of \(\Delta \phi =\mu -\nu \) with Neumann boundary conditions, then

$$\begin{aligned} W_2^2(\mu ,\nu )\le 4\int _{\Omega }dx\frac{|\nabla \phi (x)|^2}{\mu (x)}. \end{aligned}$$

Remark 2.1

Above \(\Omega \) is a regular convex domain. Otherwise, the distance between the points is understood as the geodesic distance and not the Euclidean distance.

We will also use a result by Talagrand, that relates the Wasserstein distance with the relative entropy, that is the following.

Theorem 2.3

([27], Talagrand inequality) Let \(\rho \) be the Gaussian density in \(\mathbb {R}^d\), that is \(\rho (x)=\frac{1}{\sqrt{2\pi }^d}e^{-\frac{|x|^2}{2}}\). If \(\mu \) is another density on \(\mathbb {R}^d\), then we have

$$\begin{aligned} W_2^2(\rho ,\mu )\le \int _{\mathbb {R}^d}dx\mu (x)\log \frac{\mu (x)}{\rho (x)}. \end{aligned}$$

Then, when proving the convergence, while for the upper bound we will use the canonical Wasserstein distance, for the lower bound we will use, as in [5], a distance between non-negative measures introduced in [18], that is

$$\begin{aligned} Wb_2^2(\mu ,\nu ):=\inf \left\{ \left. \int _{\bar{\Omega }\times \bar{\Omega }}dJ(x,y)|x-y|^2\right| \begin{array}{lc}\pi ^1_{\#}J|_{\Omega }=\mu \\ \pi ^2_{\#}J|_{\Omega }=\nu \end{array}\right\} . \end{aligned}$$
(2.1)

In the following Theorem we denote with \(W_{2,*}\) either the canonical \(W_2\) and the boundary version of it, that is \(Wb_2\), and we collect some known results that we will need later.

Theorem 2.4

([5], Theorems 1.1 & 1.2, Propositions 3.1 & 3.2) Let \(\Omega \subseteq \mathbb {R}^2\) be a bounded connected domain with Lipschitz boundary and let \(\rho \) be a Hölder continuous probability density on \(\Omega \) uniformly strictly positive and bounded from above. Given iid random variables \(\{X_i\}_{i=1}^N\) and \(\{Y_i\}_{i=1}^M\) with common distribution \(\rho \), we have

$$\begin{aligned}{} & {} \frac{N}{\log N}\mathbb {E}\left[ W_{2,*}^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{|\Omega |}{4\pi }, \end{aligned}$$
(2.2)
$$\begin{aligned}{} & {} \frac{N}{\log N}\mathbb {E}\left[ W_{2,*}^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{M}\sum _{i=1}^M\delta _{Y_i}\right) \right] \xrightarrow [N,M\rightarrow \infty ]{\frac{N}{M}\rightarrow q}\frac{|\Omega |}{4\pi }(1+q). \end{aligned}$$
(2.3)

Finally, we specify that hereafter we will denote the expected value conditioned to a random variable X as \(\mathbb {E}_{X}[\cdot ]:=\mathbb {E}[\cdot |X]\).

In the sequel, we denote with the same symbol a probability measure absolutely continuous with respect to Lebesgue measure and its density.

3 A Piecewise Multiscaling Density

In this section, we examine the transportation cost of a random matching problem when \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are independent random variables in the disk \(C=\{|x|\le S\}\) with common distribution \(\rho ^L_N\), defined by

$$\begin{aligned} \rho ^L_N(x):=\frac{N-\sum _{l=1}^{L-1}N^{\alpha _l}}{N}\frac{\mathbbm {1}_{C_0}(x)}{|C_0|}+\sum _{l=1}^{L-1}\frac{N^{\alpha _l}}{N}\frac{\mathbbm {1}_{C_l}(x)}{|C_l|}, \end{aligned}$$
(3.1)

where we have chosen the exponents \(\alpha _l\) strictly positive and decreasing with the index l, \(\alpha _0:=1,\) and where the annuli \(C_l\) are defined by

$$\begin{aligned} C_l:=\{s_l<|x|<s_{l+1}\},\quad 0=s_0<s_1<\dots<s_{L-1}<s_L=S. \end{aligned}$$

This density is piecewise constant on the annuli \(C_l\), it depends on the number of particles we are considering and it allows to have (in the expected value) \(N^{\alpha _l}\) particles (or \(N-\sum _{l=1}^{L-1}N^{\alpha _l}\) if \(l=0\)) in the annulus \(C_l\). Here we prove the following theorem.

Fig. 2
figure 2

Multiscaling density

Theorem 3.1

If \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are iid random variables with common distribution \(\rho ^L_N\), it holds

$$\begin{aligned}{} & {} \frac{N}{\log N}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho ^L_N\right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{1}{4\pi }\sum _{l=0}^{L-1}\alpha _l|C_l|, \\{} & {} \frac{N}{\log N}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{1}{2\pi }\sum _{l=0}^{L-1}\alpha _l|C_l|. \end{aligned}$$

Let us notice that also if \(\rho ^L_N\) is supported on all the disk C the asymptotic cost of the problem (except for a factor \(2\pi \) or \(4\pi \)) is multiplied for \(\sum _{l=0}^{L-1}\alpha _l|C_l|\), and

$$\begin{aligned} \frac{\log N}{N}|C_0|=\frac{\log N}{N}\alpha _0|C_0|<\frac{\log N}{N}\sum _{l=0}^{L-1}\alpha _l|C_l|<\frac{\log N}{N}\sum _{l=0}^{L-1}|C_l|=|C|\frac{\log N}{N}, \end{aligned}$$

therefore the cost is strictly smaller than the cost of the problem with particles distributed with a density bounded from below from a positive constant, as proved in [5]. This happens because \(\rho ^L_N\) is not bounded from below: except for the disk \(C_0\) it is everywhere vanishing for large N (Fig. 2).

We can also notice that

$$\begin{aligned} \rho ^L_N\xrightarrow [N\rightarrow \infty ]{\Vert \Vert _{\infty }}\frac{\mathbbm {1}_{C_0}}{|C_0|}=\mu _0, \end{aligned}$$

while the total cost is strictly larger than the cost of the problem when the particles are distributed with measure \(\mu _0\).

Finally, let us notice that the second statement of Theorem 3.1 is equivalent to

$$\begin{aligned} \mathbb {E}_{\rho ^L_N}[C_N]\sim \frac{1}{2\pi }\int dx \log (N \rho ^L_N(x)). \end{aligned}$$

First we prove the following Lemma, similar to propositions proved in [5, 8]. It allows to compute the total cost as the sum of the costs of the problems on the annuli. The argument used to estimate the Wasserstein distance between two measures that are not bounded from below is that when we use Benamou–Brenier formula we find a divergent term due to a vanishing denominator. This term in the annulus \(C_l\) is balanced from the numerator, which involves the fluctuations of the particles in \(C_l\) and in \(\cup _{l=0}^{L-1}C_l\), whose order is the same thanks to the choice of the exponents \(\alpha _l\).

Lemma 3.1

There exists a constant \(c>0\) such that if \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are independent random variables in C with common distribution \(\rho ^L_N\), \(N_l\) and \(M_l\) are respectively the number of points \(X_i\) and \(Y_i\) in \(C_l\), i.e. \(N_l:=\sum _{i=1}^N\mathbbm {1}(X_i\in C_l)\) and \(M_l:=\sum _{i=1}^N\mathbbm {1}(Y_i\in C_l)\), \(\theta \) small enough and

$$\begin{aligned} A_{\theta }:=\left\{ \begin{array}{lcr}|N_l-N\rho ^L_N(C_l)|&{}\le &{}\theta N\rho ^L_N(C_l)\\ |M_l-N\rho ^L_N(C_l)|&{}\le &{}\theta N\rho ^L_N(C_l)\end{array}\forall l=0,\dots ,L\right\} , \end{aligned}$$

it holds

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \rho ^L_N,\sum _{l=0}^{L-1}\frac{N_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \right] \le \frac{c}{N}, \end{aligned}$$
(3.2)
$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \rho ^L_N,\sum _{l=0}^{L-1}\frac{M_l-N_l}{3\theta N}+\frac{M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \mathbbm {1}_{A_{\theta }}\right] \le \frac{c}{\theta ^2N}, \end{aligned}$$
(3.3)
$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \sum _{l=0}^{L-1}\frac{3\theta M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)},\sum _{l=0}^{L-1}\frac{M_l-N_l+3\theta M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \mathbbm {1}_{A_{\theta }}\right] \le \frac{c}{\theta N}. \end{aligned}$$
(3.4)

Proof

Since the proofs are very similar, we only focus on (3.2) and then we explain how to obtain (3.3) and (3.4).

Let \(f_N\) be the weak solution of

$$\begin{aligned} \Delta f_N=\rho ^L_N-\sum _{l=0}^{L-1}\frac{N_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}, \end{aligned}$$

then by Theorem 2.2 we get

$$\begin{aligned} W_2^2\left( \rho ^L_N,\sum _{l=0}^{L-1}\frac{N_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right)\le & {} 4\int _Cdx\frac{|\nabla f_N(x)|^2}{\rho ^L_N(x)} \nonumber \\= & {} 4\sum _{l=0}^{L-1}\int _{C_l}dx|\nabla f_N(x)|^2\frac{1}{\rho ^L_N|_{C_l}}. \end{aligned}$$
(3.5)

As explained before, now we are going to prove that, when we take the expectation, the divergent term due to the vanishing density is balanced by the small fluctuations of the particles.

We can find \(f_N\) depending only on |x|, i.e. in the form

$$\begin{aligned} f_N(x)=\int _0^{|x|}dr\frac{1}{r}\int _0^rdss\Delta f_N(s)+constant. \end{aligned}$$

Then, if we define

$$\begin{aligned} B_l:=\cup _{i=0}^{l-1}C_i,\quad P_l:=\sum _{i=0}^{l-1}N_i=\sum _{i=1}^N\mathbbm {1}(X_i\in B_l), \end{aligned}$$

and we observe that the factor \(2\pi s\) is exactly what we need to write the integral in polar coordinates, we have

$$\begin{aligned} \int _{C_l}dx|\nabla f_N(x)|^2= & {} \int _{s_l}^{s_{l+1}}dr\frac{1}{2\pi r}\left( \int _{B_l\cup \{s_l<|x|<r\}}dx\Delta f_N(x)\right) ^2 \nonumber \\= & {} \int _{s_l}^{s_{l+1}}dr\frac{1}{2\pi r}\left[ \sum _{i=0}^{l-1}\int _{C_i}dx\rho ^L_N(x)\left( 1-\frac{N_i}{N\rho ^L_N(C_i)}\right) \right. \nonumber \\{} & {} +\left. \int _{s_l<|x|<r}dx\rho ^L_N(x)\left( 1-\frac{N_l}{N\rho ^L_N(C_l)}\right) \right] ^2 \nonumber \\= & {} \int _{B_l}dr\frac{1}{2\pi r}\left[ \frac{N\rho ^L_N(C_l)-P_l}{N}+\frac{N\rho ^L_N(C_l)-N_l}{N}\frac{r^2-s_l^2}{s_{l+1}^2-s_l^2}\right] ^2 \nonumber \\\le & {} c\left[ \frac{(N\rho ^L_N(B_l)-P_l)^2}{N^2}+\frac{(N\rho ^L_N(C_l)-N_l)^2}{N^2}\right] , \end{aligned}$$
(3.6)

where in the last inequality we have used that if \(l=0\) the first summand disappears since \(P_l=N\rho ^L_N(B_l)=0\) almost everywhere and therefore the function \(2\pi r\) in the denominator is multiplied for \(r^4\), thus it is integrable. Moreover, thanks to the choice of \(\{\alpha _l\}_{l=0}^{L-1}\) we have

$$\begin{aligned} \rho ^L_N(B_l)(1-\rho ^L_N(B_l))=\underbrace{\frac{N-\sum _{j=l}^{L-1}N^{\alpha _j}}{N}}_{\le 1}\underbrace{\frac{\sum _{j=l}^{L-1}N^{\alpha _j}}{N}}_{\le c\frac{N^{\alpha _l}}{N}}\le c\frac{N^{\alpha _l}}{N}=c\rho ^L_N|_{C_l}|C_l|, \end{aligned}$$

where c depends on L. Therefore

$$\begin{aligned} \mathbb {E}\left[ \frac{(N\rho ^L_N(B_l)-P_l)^2}{N^2}\right] =\frac{\rho ^L_N(B_l)(1-\rho ^L_N(B_l))}{N}\le c\frac{\rho ^L_N|_{C_l}|C_l|}{N}, \end{aligned}$$
(3.7)

while

$$\begin{aligned} \mathbb {E}\left[ \frac{(N\rho ^L_N(C_l)-N_l)^2}{N^2}\right]= & {} \frac{\rho ^L_N(C_l)(1-\rho ^L_N(C_l))}{N}\le c\frac{\rho ^L_N|_{C_l}|C_l|}{N}. \end{aligned}$$

Finally from (3.5), (3.6) and (3.7) we get

$$\begin{aligned} \mathbb {E}\left[ W_2^2\left( \rho ^L_N,\sum _{l=0}^{L-1}\frac{N_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \right] \le c\sum _{l=0}^{L-1}\frac{\rho ^L_N|_{C_l}|C_l|}{\rho ^L_N|_{C_l}N}=\frac{c|C|}{N}. \end{aligned}$$

Then, the proof of (3.3) is exactly the same as (3.2).

To obtain (3.4) it is sufficient to observe that in \(A_{\theta }\)

$$\begin{aligned}{} & {} W_2^2\left( \sum _{l=0}^{L-1}\frac{3\theta M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)},\sum _{l=0}^{L-1}\frac{M_l-N_l+3\theta M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \\{} & {} \quad \le 6\theta W_2^2\left( \sum _{l=0}^{L-1}\frac{M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)},\rho ^L_N\right) \\{} & {} \qquad + 6\theta W_2^2\left( \rho ^L_N,\sum _{l=0}^{L-1}\frac{M_l-N_l}{3\theta N}+\frac{M_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) , \end{aligned}$$

and then we use (3.2) and (3.3). \(\square \)

Now we can prove Theorem 3.1.

Thanks to Lemma 2.1 it is sufficient to prove the upper bound for semidiscrete matching, in Proposition 3.1, and the lower bound for bipartite matching, in Proposition 3.2.

The structure of the proofs is the same as Theorem 1 in [8] and Theorems 1.1 and 1.2 in [5]. First, we use the fact that the total transportation cost on the disk C is estimated by the sum of the costs on the annuli \(C_l\). This is possible thanks to Lemma 3.1. Then we use the fact that the problem on the annulus \(C_l\) has been solved in [5] (it is a particular case of Theorem 1.1 and 1.2) because the probability density \(\rho ^L_N\) is piecewise constant on the annuli \(C_l\) (and, thus, piecewise bounded from below). Therefore, if \(N_l\) is the number of particles in \(C_l\), each annulus contributes to the total cost with a term approximated by

$$\begin{aligned} |C_l|\frac{\log N_l}{N_l}\approx |C_l|\frac{\log \mathbb {E}(N_l)}{N_l}, \end{aligned}$$

except for a factor \(4\pi \) or \(2\pi \) in semidiscrete and bipartite matching respectively. The total cost is a convex combination of all these terms, so the main contributions (avoiding the factors \(4\pi \) and \(2\pi \)) turns out to be

$$\begin{aligned} \sum _{l=0}^{L-1}|C_l|\frac{\log \mathbb {E}(N_l)}{N}\approx \frac{\log N}{N}\sum _{l=0}^{L-1}\alpha _l|C_l|. \end{aligned}$$

Proposition 3.1

Let \(X_1,\dots ,X_N\) be independent random variables in C with common distribution \(\rho ^L_N\). Then

$$\begin{aligned} \limsup _{N\rightarrow \infty }\frac{N}{\log N}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho ^L_N\right) \right] \le \frac{1}{4\pi }\sum _{l=0}^{L-1}\alpha _l|C_l|. \end{aligned}$$

Proof

Let \(N_l\) be the number of points \(X_i\) in \(C_l\), i.e. \(N_l:=\sum _{i=1}^N\mathbbm {1}(X_i\in C_l)\). Then, we define

$$\begin{aligned} \frac{1}{N}\sum _{i=1}^N\delta _{X_i}=\sum _{l:N_l>0}\frac{N_l}{N}\frac{1}{N_l}\sum _{i: X_i\in C_l}\delta _{X_i}=:\sum _{l:N_l>0}\frac{N_l}{N}\mu ^{N_l}. \end{aligned}$$

Hence, thanks to triangle inequality and convexity of quadratic Wasserstein distance, if \(\beta >0\)

$$\begin{aligned} W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho ^L_N\right)= & {} W_2^2\left( \sum _{l:N_l>0}\frac{N_l}{N}\mu ^{N_l},\rho ^L_N\right) \nonumber \\\le & {} (1+\beta )\sum _{l:N_l>0}\frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \nonumber \\{} & {} +\frac{1+\beta }{\beta }W_2^2\left( \sum _{l=0}^{L-1}\frac{N_l}{N}\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)},\rho ^L_N\right) , \end{aligned}$$
(3.8)

and, since \(\beta >0\) is arbitrary, combining (3.8) with (3.2) of Lemma 3.1 we get

$$\begin{aligned}{} & {} \limsup _{N\rightarrow \infty }\frac{N}{\log N}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho ^L_N\right) \right] \nonumber \\{} & {} \quad \le \limsup _{N\rightarrow \infty }\frac{N}{\log N}\mathbb {E}\left[ \sum _{l:N_l>0}\frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \right] . \end{aligned}$$
(3.9)

Let now \(A_l\) be defined as

$$\begin{aligned} A_l:=\left\{ N_l\ge \frac{N\rho ^L_N(C_l)}{2}\right\} =\left\{ N_l\ge \frac{\mathbb {E}(N_l)}{2}\right\} . \end{aligned}$$

We can compute the expected value in (3.9) separately in the sets \(A_l^c\) and \(A_l\).

In \(A_l^c\) we have the bound

$$\begin{aligned} \frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \le c\rho ^L_N(C_l), \end{aligned}$$
(3.10)

while

$$\begin{aligned} \mathbb {P}(A_l^c)\le \mathbb {P}\left( |N_l-N\rho ^L_N(C_l)|\ge \frac{\rho ^L_N(C_l)}{2}\right) \le \frac{4}{N\rho ^L_N(C_l)}. \end{aligned}$$
(3.11)

Using (3.10) and (3.11) we get

$$\begin{aligned} \mathbb {E}\left[ \sum _{l:N_l>0}\frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \mathbbm {1}_{A_l^c}\right] \le \frac{c}{N}. \end{aligned}$$
(3.12)

Therefore we can limit ourselves to consider the expected value in \(A_l\): we use the properties of the conditioned expected value and (2.2) of Theorem 2.4.

Indeed, since \(\min _{l=0,\dots ,L-1}N\rho ^L_N(C_l)\xrightarrow [N\rightarrow \infty ]{}\infty \), there exists a function \(\omega (N)\xrightarrow [N\rightarrow \infty ]{}0\) such that

$$\begin{aligned}&\mathbb {E}&\left[ \sum _{l:N_l>0}\frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \mathbbm {1}_{A_l}\right] \nonumber \\{} & {} =\mathbb {E}\left[ \sum _{l=0}^{L-1}\frac{N_l}{N}\mathbbm {1}_{A_l}\mathbb {E}_{N_l}\left[ W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \right] \right] \nonumber \\{} & {} \le \mathbb {E}\left[ \sum _{l=0}^{L-1}\frac{\log N_l}{4\pi N}|C_l|(1+\omega (N))\right] . \end{aligned}$$
(3.13)

Finally, we use the concavity of the function \(\log x\) to observe that

$$\begin{aligned} \mathbb {E}\left[ \sum _{l=0}^{L-1}\frac{\log N_l}{4\pi N}|C_l|\right] \le \sum _{l=0}^{L-1}\frac{\log \mathbb {E}(N_l)}{4\pi N}|C_l|\le \frac{\log N}{4\pi N}\sum _{l=0}^{L-1}\alpha _l|C_l|. \end{aligned}$$
(3.14)

Thus, using (3.12), (3.13) and (3.14) we obtain

$$\begin{aligned} \mathbb {E}\left[ \sum _{l:N_l>0}\frac{N_l}{N}W_2^2\left( \mu ^{N_l},\frac{\rho ^L_N\mathbbm {1}_{C_l}}{\rho ^L_N(C_l)}\right) \right] \le \frac{\log N}{4\pi N}\sum _{l=0}^{L_1}\alpha _l|C_l|(1+\omega (N))+\frac{c}{N}, \end{aligned}$$

and combining this with (3.9) we obtain the thesis. \(\square \)

Proposition 3.2

Let \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) independent random variables in C with common distribution \(\rho ^L_N\). Then it holds

$$\begin{aligned} \liminf _{N\rightarrow \infty }\frac{N}{\log N}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \ge \frac{1}{2\pi }\sum _{l=0}^{L-1}\alpha _l|C_l|. \end{aligned}$$

Proof

(Sketch) Since the proof is quite similar to the previous one, we only explain the differences.

First, we can restrict to a special set

$$\begin{aligned} A_{\theta }:=\left\{ \begin{array}{lcr}|N_l-N\rho ^L_N(C_l)|&{}\le &{}\theta N\rho ^L_N(C_l)\\ |M_l-N\rho ^L_N(C_l)|&{}\le &{}\theta N\rho ^L_N(C_l)\end{array}\qquad \forall l=0,\dots ,L\right\} , \end{aligned}$$

where \(\theta =\frac{1}{\sqrt{\log N}}\). Its complementary has small probability. Then, if \(N_l\) and \(M_l\) are respectively the number of particles \(X_i\) and \(Y_i\) in \(C_l\), we rename

$$\begin{aligned} \mu ^{N_l}:=\frac{1}{N_l}\sum _{i:X_i\in C_l}\delta _{X_i},\quad \nu ^{M_l}:=\frac{1}{M_l}\sum _{i:Y_i\in C_l}\delta _{Y_i}. \end{aligned}$$

Using the superadditivity of \(Wb_2^2\), we obtain

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \nonumber \\{} & {} \quad \ge (1-\beta )\mathbb {E}\left[ \sum _{l=0}^{L-1}\frac{N_l}{N}\mathbb {E}\left[ Wb_2^2(\mu ^{N_l},\nu ^{M_l})\right] \mathbbm {1}_{A_{\theta }}\right] \end{aligned}$$
(3.15)
$$\begin{aligned}{} & {} \qquad -\frac{1-\beta }{\beta }\mathbb {E}\left[ W_2^2\left( \sum _{l=0}^{L-1}\frac{N_l}{N}\nu ^{M_l},\sum _{l=0}^{L-1}\frac{M_l}{N}\nu ^{M_l}\right) \mathbbm {1}_{A_{\theta }}\right] . \end{aligned}$$
(3.16)

The main contribution is given by the term in (3.15), and as in the previous Theorem it can be estimated using (2.3) of Theorem 2.4.

To prove that the term in (3.16) is negligible, it is sufficient to recall Lemmas 6.2 and 3.1.

Letting \(\beta \rightarrow 0\), we get the thesis. \(\square \)

Now we have proved Theorem 3.1. Let us observe that we can choose the exponents \(\alpha _l\) and the annuli \(C_l\) in an interesting way. If

$$\begin{aligned} 0=c_0<c_1<\dots<c_{L-1}<c_L=1,\quad s_l=c_lS, \end{aligned}$$

and

$$\begin{aligned} \alpha _l=1-c_l^2,\quad l=0,\dots ,L, \end{aligned}$$

we obtain

$$\begin{aligned} \sum _{l=0}^{L-1}\alpha _l|C_l|=\pi S^2\sum _{l=0}^{L-1}\alpha _l(c_{l+1}^2-c_l^2)=\pi S^2\sum _{l=0}^{L-1}\alpha _l(\alpha _l-\alpha _{l+1}), \end{aligned}$$

that is a Riemann sum for the function \(f(x)=\pi S^2x\). Therefore, if we decrease \(\max _{l=0,\dots ,L-1}\{\alpha _l-\alpha _{l+1}\}\), in the limit we obtain

$$\begin{aligned} \pi S^2\int _0^1dxx=\frac{\pi S^2}{2}. \end{aligned}$$

In particular, the case \(S=\sqrt{2\log N}\) introduces us to Sect. 4, indeed the Gaussian density has the following property: if \(\alpha _0=1>\alpha _1>\dots >\alpha _L=0\), the annulus \(A_l\), defined by

$$\begin{aligned} A_l:=\{\sqrt{2(1-\alpha _l)\log N}\le |x|\le \sqrt{2(1-\alpha _{l+1})\log N}\}, \end{aligned}$$

has measure \(2\pi (\alpha _l-\alpha _{l+1})\log N\). Moreover the averaged number of particles in \(A_l\) is \(N^{\alpha _l}-N^{\alpha _{l+1}}\sim N^{\alpha _l}\), therefore it contributes to the total cost with

$$\begin{aligned} \frac{1}{2\pi }2\pi (\alpha _l-\alpha _{l+1})\log N\log [N^{\alpha _l}]=\alpha _l(\alpha _l-\alpha _{l+1})(\log N)^2, \end{aligned}$$

and by summing over \(l=0,\dots ,L-1\) and decreasing \(\max _{l=0,\dots ,L-1}\{\alpha _l-\alpha _{l+1}\}\) we get

$$\begin{aligned} \frac{1}{2}(\log N)^2. \end{aligned}$$

Notwithstanding this, the case of the Gaussian density have some further difficulties.

The first one is that what we have proved in the case of the multiscaling density depends on the number of the annuli we are considering, while we are currently not able to approximate the Gaussian density with a piecewise multiscaling density on a finite number of annuli. Otherwise, if we consider a countable set of annuli, we need a uniform bound for the cost of the problem on an annulus. Instead, when dividing the disk of radius \(\sqrt{2\log N}\) into squares, using a rescaling argument, we only need a bound for the cost of the problem on a square (and we already have it from [4]). Moreover, the main property we use here is not that the Gaussian density is a radial density, but rather that it is a product measure, i.e. a function of \(x_1\) times a function of \(x_2.\)

4 The Gaussian Density

This section concerns the problem of \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) independent random variables in \(\mathbb {R}^2\) distributed according to Gaussian measure \(\rho \), that is

$$\begin{aligned} \rho (x):=\mu (x_1)\mu (x_2),\quad \mu (z):=\frac{e^{-\frac{z^2}{2}}}{\sqrt{2\pi }}. \end{aligned}$$

In Subsect. 4.2 we prove the following theorem.

Theorem 4.1

If \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are iid random variables distributed with the Gaussian density \(\rho \), it holds

$$\begin{aligned}{} & {} \frac{N}{(\log N)^2}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{1}{4}, \\{} & {} \frac{N}{(\log N)^2}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{1}{2}. \end{aligned}$$

First, we underline that also if Gaussian density has an unbounded support, the number of particles in a cube of side dx is \(Ne^{-{\frac{|x|^2}{2}}}dx\), and we can notice that \(Ne^{-\frac{|x|^2}{2}}\) is strictly smaller than 1 when \(|x|>\sqrt{2\log N}\). Therefore, using the results in [5, 8], we can suppose that the cost for semidiscrete and bipartite matching is

$$\begin{aligned} \frac{1}{N}\int _{|x|\le \sqrt{2\log N}}dx\log (N\rho (x))=\pi \frac{(\log N)^2}{N}+\frac{O(1)}{N}, \end{aligned}$$

except for a factor \(\frac{1}{4\pi }\) or \(\frac{1}{2\pi }\) respectively.

To achieve these result, we apply a cut-off and we substitute \(\rho \) with a density that we will call again \(\rho _N\) and whose support is contained in \(\{|x|\le \sqrt{2\log N}\}\). To define \(\rho _N\), we proceed in the following way. We cannot arrive exactly at \(\sqrt{2\log N}\), otherwise there would be too few particles close to the boundary of \(\{|x|\le \sqrt{2\log N}\}\), therefore we define

$$\begin{aligned} r_N:=\sqrt{2\log \left( \frac{N}{(\log N)^{\alpha }}\right) },\quad 1<\alpha <2, \end{aligned}$$

and we construct a collection of squares that covers \(\{|x|\le r_N\}\), in this way

$$\begin{aligned} \mathcal{J}:= & {} \left\{ \left. (a_j,a_{j+1}):=\left( \frac{j\epsilon }{r_N},\frac{(j+1)\epsilon }{r_N}\right) \right| j\in \mathbb {Z}\right\} , \\ \mathcal{K}:= & {} \left\{ \left. (b_k,b_{k+1}):=\left( \frac{k\epsilon }{r_N},\frac{(k+1)\epsilon }{r_N}\right) \right| k\in \mathbb {Z}\right\} . \end{aligned}$$

\(\mathcal{J}\) is a set of intervals in direction \(x_1\), while \(\mathcal{K}\) is a set of intervals in direction \(x_2\). Now we define a set of squares that covers \(\{|x|\le r_N\}\), as follows. First, we denote by \(k_{\min }\) and \(k_{\max }\) and by \(j_k^{\min }\) and \(j_k^{\max }\)

$$\begin{aligned} k_{\min }:= & {} -\left\lfloor \frac{r_N^2}{\epsilon }\right\rfloor -1,\quad k_{\max }:=\left\lfloor \frac{r_N^2}{\epsilon }\right\rfloor , \\ j_k^{\min }:= & {} \inf \{j\in \mathbb {Z}|(a_j,a_{j+1})\times (b_k,b_{k+1})\cap \{|x|\le r_N\}\ne \emptyset \}, \\ j_k^{\max }:= & {} \sup \{j\in \mathbb {Z}|(a_j,a_{j+1})\times (b_k,b_{k+1})\cap \{|x|\le r_N\}\ne \emptyset \}, \end{aligned}$$

and then we define \(\mathcal{Q}\) as the minimal set of squares that covers \(\{|x|\le r_N\}\), that is

$$\begin{aligned} \mathcal{Q}:=\left\{ Q^j_k:=(a_j,a_{j+1})\times (b_k,b_{k+1})\left| \begin{array}{lc}k_{\min }\le k\le k_{\max }\\ j_k^{\min }\le j\le j_k^{\max }\end{array}\right\} \right. . \end{aligned}$$
Fig. 3
figure 3

The set of squares \(Q^j_k\) where the cut-off is applied

Before going on, here we can notice that, thanks to the choice of the squares (Fig. 3), if \(N^j_k\) is the (random) number of points in the square \(Q^j_k\) when the distribution of the particles is Gaussian (after having applied the cut-off, the expectation of this number can only increase) we have

$$\begin{aligned} \mathbb {E}(N^j_k)=N\int _{Q^j_k}dx\rho (x)\ge N\left( \frac{\epsilon }{r_N}\right) ^2\frac{e^{-\frac{\left( r_N+\frac{\epsilon \sqrt{2}}{r_N}\right) ^2}{2}}}{\sqrt{2\pi }}\ge c\epsilon ^2(\log N)^{\alpha -1}\xrightarrow [N\rightarrow \infty ]{}\infty . \end{aligned}$$

Let also \(\mathcal{R}\) be set of horizontal rectangles that covers \(\{|x|\le r_N\}\), that is

$$\begin{aligned} \mathcal{R}:=\left\{ R_k:=\bigcup _{j_k^{\min }\le j\le j_k^{\max }} Q^j_k\right\} , \end{aligned}$$

(Fig. 4) with projections \(J^k\) on the axis \(x_1\), where each \(J^k\) is defined by

$$\begin{aligned} J^k:=\bigcup _{j_k^{\min }\le j\le j_k^{\max }} (a_j,a_{j+1}). \end{aligned}$$
Fig. 4
figure 4

The set of rectangles where the cut-off is applied, except for zero measure sets

Finally, we define \(E_N\) as

$$\begin{aligned} E_N:=\bigcup _{Q^j_k\in \mathcal{Q}}Q^j_k, \end{aligned}$$

and \(\rho _N\) is the Gaussian measure restricted to \(E_N\), that is

$$\begin{aligned} \rho _N:=\frac{\rho \mathbbm {1}_{E_N}}{\rho (E_N)}. \end{aligned}$$

Hereafter, if \({\tilde{X}}_1,\dots ,{\tilde{X}}_N\) and \(\tilde{Y}_1,\dots ,{\tilde{Y}}_N\) are independent and identically distributed with measure \(\rho _N,\) and we define

$$\begin{aligned} N^j_k:=\sum _{i=1}^N\mathbbm {1}({\tilde{X}}_i\in Q^j_k),\quad M^j_k:=\sum _{i=1}^N\mathbbm {1}({\tilde{Y}}_i \in Q^j_k), \end{aligned}$$

as the number of points \({\tilde{X}}_i\) and \({\tilde{Y}}_i\) in the square \(Q^j_k,\) respectively.

Finally, where not specified, we denote \(\sum _{j,k}:=\sum _{k=k_{\min }}^{k_{\max }}\sum _{j=j_k^{\min }}^{j_k^{\max }}\).

In Subsect. 4.1 we prove some bounds that we will need for the proof of Theorem 4.1 in Subsect. 4.2.

4.1 Preliminary Estimates

This first result proves that we can substitute N independent random variables with common distribution \(\rho \) with N independent random variables with common distribution \(\rho _N\).

Lemma 4.1

Let \(\rho \) and \(\rho _N\) defined as before, \(X_1,\dots ,X_N\) independent random variables in \(\mathbb {R}^2\) with common distribution \(\rho \) and \(T:\mathbb {R}^2\rightarrow \mathbb {R}^2\) the optimal map that transports \(\rho \) in \(\rho _N\). Then we have

$$\begin{aligned}{} & {} W_2^2\left( \rho ,\rho _N\right) \le c\frac{(\log N)^{\alpha }}{N}, \end{aligned}$$
(4.1)
$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{T(X_i)}\right) \right] \le c\frac{(\log N)^{\alpha }}{N}. \end{aligned}$$
(4.2)

Proof

For (4.1) we use again Theorem 2.3 to write

$$\begin{aligned} W_2^2\left( \rho ,\rho _N\right)\le & {} 2\int _{E_N}dx\rho (x)\frac{\rho _N(x)}{\rho (x)}\log \left( \frac{\rho _N(x)}{\rho (x)}\right) \\= & {} 2\log \left( \frac{1}{\rho (E_N)}\right) \le 2\log \left( \frac{1}{\rho (\{|x|\le r_N\})}\right) \le c\frac{(\log N)^{\alpha }}{N}, \end{aligned}$$

while as for (4.2), if T is the optimal map that transports \(\rho \) in \(\rho _N\), that is

$$\begin{aligned} \rho _N(E)= & {} \rho (T^{-1}(E)), \\ W_2^2\left( \rho ,\rho _N\right)= & {} \int _{\mathbb {R}^2}dx\rho (x)|x-T(x)|^2, \end{aligned}$$

we have

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{T(X_i)}\right) \right] \le \mathbb {E}\left[ \frac{1}{N}\sum _{i=1}^N|X_i-T(X_i)|^2\right] \\{} & {} \quad =\int _{\mathbb {R}^2}dx\rho (x)|x-T(x)|^2=W_2^2(\rho ,\rho _N), \end{aligned}$$

that is the thesis thanks to (4.1). \(\square \)

The following Proposition allows us to compute the total cost of the problem as the sum of the costs of the problems on the squares \(Q^j_k\). We have to bound the expectation of the distance between the Gaussian measure and the same Gaussian measure modified on the squares \(Q^j_k\) by a factor \(\frac{N^j_k}{N\rho (Q^j_k)}\). Therefore the two measures we are considering are \(\rho \) and \(\sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\).

The reason why these measures should be similar is that \(N^j_k\) is very close to its expectation, that is \(\mathbb {E}(N^j_k)=N\rho (Q^j_k)\). To prove it, we proceed in two steps and use the triangle inequality between the two measure involved and a third measure, that is \( \sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\), where \(N_k\) is the number of points \({\tilde{X}}_i\) in the rectangle \(R_k\).

As for the distance between \(\sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\) and \(\sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\), first we use convexity of Wasserstein distance to restrict the problem to the rectangles, indeed we have

$$\begin{aligned} W_2^2\left( \sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\right) \le \sum _{k:N_k>0}\frac{N_k}{N}W_2^2\left( \frac{N^j_k}{N_k}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\right) . \end{aligned}$$

Then, we argue as in Lemma 3.1: when using Benamou–Brenier formula there is a vanishing density in the denominator, and this causes a divergent term. But this divergent term is completely balanced from the fluctuations of the particles, which are very few.

Then, we use again Talagrand inequality to bound the distance between \(\sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\) and \(\rho \).

Proposition 4.1

There exist a constant \(c>0\) such that if \({\tilde{X}}_1,\dots ,\tilde{X}_N\) and \({\tilde{Y}}_1,\dots ,{\tilde{Y}}_N\) are independent random variables with common distribution \(\rho _N\) and if

$$\begin{aligned} A_{\theta }:=\bigcap _{j,k}\left\{ \begin{array}{lcr}|N^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\\ |M^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\end{array}\right\} , \end{aligned}$$

then

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right) \right] \le c\frac{(\log N)^{\frac{3}{2}}}{\epsilon N}+c\frac{(\log N)^{\alpha }}{N},\end{aligned}$$
(4.3)
$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \sum _{j,k}\left( \frac{M^j_k-N^j_k}{3\theta N}+\frac{M^j_k}{N}\right) \frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right) \mathbbm {1}_{A_{\theta }}\right] \nonumber \\{} & {} \quad \le c\frac{(\log N)^{\frac{3}{2}}}{\epsilon \theta ^2N}+c\frac{(\log N)^{\alpha }}{N}, \end{aligned}$$
(4.4)
$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \sum _{j,k}\frac{3\theta M^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\sum _{j,k}\frac{M^j_k-N^j_k+3\theta M^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \mathbbm {1}_{A_{\theta }}\right] \nonumber \\{} & {} \quad \le c\frac{(\log N)^{\frac{3}{2}}}{\epsilon \theta N}+c\theta \frac{(\log N)^{\alpha }}{N}. \end{aligned}$$
(4.5)

Proof

We only prove (4.3) and (4.5), indeed (4.4) is analogue to (4.3).

We start by proving (4.3), therefore we define

$$\begin{aligned} N_k:=\sum _{j=j_k^{\min }}^{j_k^{\max }}N^j_k, \end{aligned}$$

so that \(N_k\) is the numbers of particles \(X_i\) in the whole rectangle \(R_k\) and

$$\begin{aligned} P^j_k:=\sum _{i=j_k^{\min }}^{j-1}N^i_k. \end{aligned}$$

Therefore \(P^j_k\) is the numbers of particles \(X_i\) in \(R_k\) not in the whole rectangle, but rather only until \(a_j\).

As for (4.4), the only difference in the proof is that where we have summands involving \(N^j_k\) we will find the same terms involving \(M^j_k+\frac{N^j_k-M^j_k}{\theta }\) (if \(M^j_k\) is the number of points \(Y_i\) in the square \(Q^j_k\)).

We proceed in two steps. First, we focus on the distance between the density modified on all the squares \(Q^j_k\) and the one modified only on the rectangles \(R_k\); then, we study the distance between the measure modified on the rectangles \(R_k\) and the Gaussian measure itself.

Using first the triangle inequality and then the convexity of quadratic Wasserstein distance we get

$$\begin{aligned} W_2^2\left( \sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right)\le & {} 2\sum _{k:N_k>0}\frac{N_k}{N}W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\right) \end{aligned}$$
(4.6)
$$\begin{aligned}{} & {} +2W_2^2\left( \sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)},\rho \right) . \end{aligned}$$
(4.7)

As for the term in (4.6), we observe that we are considering again product measures in the rectangle \(R_k\) whose marginals coincide in the direction \(x_2\), indeed we have

$$\begin{aligned} \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\rho (x)\mathbbm {1}_{Q^j_k}(x)}{\rho (Q^j_k)}= & {} \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\mu (x_1)\mathbbm {1}_{(a_j,a_{j+1})}(x_1)}{\mu (a_j,a_{j+1})}\frac{\mu (x_2)\mathbbm {1}_{(b_k,b_{k+1})}(x_2)}{\mu (b_k,b_{k+1})}, \\ \frac{\rho (x)\mathbbm {1}_{R_k}(x)}{\rho (R_k)}= & {} \frac{\mu (x_1)\mathbbm {1}_{J^k}(x_1)}{\mu (J^k)}\frac{\mu (x_2)\mathbbm {1}_{(b_k,b_{k+1})}(x_2)}{\mu (b_k,b_{k+1})}. \end{aligned}$$

therefore we just have a one dimensional problem: thanks to Lemma 6.1 we get

$$\begin{aligned} W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\right) \le W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\mu \mathbbm {1}_{(a_j,a_{j+1})}}{\mu (a_j,a_{j+1})},\frac{\mu \mathbbm {1}_{J^k}}{\mu (J^k)}\right) . \end{aligned}$$
(4.8)

To bound this term we argue as in Lemma 3.1: we define \(f:J^k\rightarrow \mathbb {R}\) such that if \(x_1\in (a_j,a_{j+1})\)

$$\begin{aligned} f'(x_1)=\frac{P^j_k-\mathbb {E}_{N_k}(P^j_k)}{N_k}+\frac{N^j_k-\mathbb {E}_{N_k}(N^j_k)}{N_k}\frac{\mu (a_j,x_1)}{\mu (a_j,a_{j+1})}, \end{aligned}$$

so that, thanks to \(\mathbb {E}_{N_k}(N^j_k)=N_k\frac{\mu (a_j,a_{j+1})}{\mu (J^k)}\), f is the weak solution of

$$\begin{aligned} f''(x_1)=\sum _{j=j_k^{\min }}^{j_k^{\max }}\left( \frac{N^j_k}{N_k}\frac{\mu (x_1)}{\mu (a_j,a_{j+1})}-\frac{\mu (x_1)}{\mu (J^k)}\right) \mathbbm {1}_{(a_j,a_{j+1})}(x_1), \end{aligned}$$

that is the difference between the densities we are considering.

Then, thanks to Theorem 2.2 we have

$$\begin{aligned}{} & {} W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\mu \mathbbm {1}_{(a_j,a_{j+1})}}{\mu (a_j,a_{j+1})},\frac{\mu \mathbbm {1}_{J^k}}{\mu (J^k)}\right) \le 4\int _{J^k}dx_1\frac{(f'(x_1))^2}{\mu (x_1)}\mu (J^k) \nonumber \\{} & {} \quad \le c\sum _{j=j_k^{\min }}^{j_k^{\max }}\left[ \left( \frac{P^j_k-\mathbb {E}_{N_k}(P^j_k)}{N_k}\right) ^2+\left( \frac{N^j_k-\mathbb {E}_{N_k}(N^j_k)}{N_k}\right) ^2\right] \mu (J^k)\int _{a_j}^{a_{j+1}}dx_1\frac{e^{\frac{x_1^2}{2}}}{\sqrt{2\pi }} \nonumber \\{} & {} \quad \le c\sum _{j=j_k^{\min }}^{j_k^{\max }}\left[ \left( \frac{P^j_k-\mathbb {E}_{N_k}(P^j_k)}{N_k}\right) ^2\right] \mu (J^k)(a_{j+1}-a_j)e^{\frac{a_j^2}{2}} \end{aligned}$$
(4.9)
$$\begin{aligned}{} & {} \qquad +c\sum _{j=j_k^{\min }}^{j_k^{\max }}\left[ \left( \frac{N^j_k-\mathbb {E}_{N_k}(N^j_k)}{N_k}\right) ^2\right] \mu (J^k)(a_{j+1}-a_j)e^{\frac{a_j^2}{2}}, \end{aligned}$$
(4.10)

where in the last inequality we have used that, thanks to the choice of the points \(a_j\), we have \(|a_{j+1}^2-a_j^2|\le c\).

We are going to estimate these two terms using the fact that where the density is small there are also small fluctuations of the particles, so that there will be a balance between the fluctuations and the divergent terms. In particular, our aim is to show that all the terms in the last two sums perfectly balance, and only \((a_{j+1}-a_j)\) remains (Fig. 5).

Thus, to bound (4.9) and (4.10) we observe that we can condition to the number of particles \(X_i\) in \(R_k\) (that is \(N_k\)) to obtain

$$\begin{aligned} \mathbbm {E}_{N_k}\left[ \left( \frac{P^j_k-\mathbb {E}_{N_k}(P^j_k)}{N_k}\right) ^2\right]= & {} \frac{1}{N_k}\frac{\mu (a_{j_k^{\min }},a_j)}{\mu (J^k)}\frac{\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}, \\ \mathbbm {E}_{N_k}\left[ \left( \frac{N^j_k-\mathbb {E}_{N_k}(N^j_k)}{N_k}\right) ^2\right]= & {} \frac{1}{N_k}\frac{\mu (a_j,a_{j+1})}{\mu (J^k)}\left( 1-\frac{\mu (a_j,a_{j+1})}{\mu (J^k)}\right) \nonumber \end{aligned}$$
(4.11)
$$\begin{aligned}\le & {} \frac{1}{N_k}\frac{\mu (a_j,a_{j+1})}{\mu (J^k)}. \end{aligned}$$
(4.12)

Before going on, here we observe that, when proving (4.4), to bound (4.9) and (4.10) at this point we should condition both to \(N_k\) and to \(M_k\) (and not only to \(N_k\)). In this way instead of \(\frac{1}{N_k}\) in (4.11) and (4.12), up for a constant we would obtain

$$\begin{aligned} \frac{1}{M_k+\frac{M_k-N_k}{3\theta }}+\frac{M_k+N_k}{\theta ^2\left( M_k+\frac{M_k-N_k}{3\theta }\right) ^2}, \end{aligned}$$

and this term can be estimated (in \(A_{\theta }\), and but for multiplicative constants) by

$$\begin{aligned} \frac{1}{\theta ^2\left( M_k+\frac{M_k-N_k}{3\theta }\right) }. \end{aligned}$$

Finally, combining (4.8) with (4.9) and (4.10) we get

$$\begin{aligned}{} & {} \mathbb {E}_{N_k}\left[ W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\mu \mathbbm {1}_{(a_j,a_{j+1})}}{\mu (a_j,a_{j+1})},\frac{\mu \mathbbm {1}_{J^k}}{\mu (J^k)}\right) \right] \nonumber \\{} & {} \quad \le \frac{c}{N_k}\sum _{j=j_k^{\min }}^{j_k^{\max }}\left[ \mu (a_j,a_{j+1})+\frac{\mu (a_{j_k^{\min }},a_j)\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}\right] e^{\frac{a_j^2}{2}}(a_{j+1}-a_j).\nonumber \\ \end{aligned}$$
(4.13)
Fig. 5
figure 5

A graphical representation of the proof. \(N^j_k\) is the number of particles in \(Q^j_k\) (the first square in blue), while \(P^j_k\) is the number of particles in the red rectangle. Once fixed \(N_k\), that is the number of particles in \(R_k\), the fluctuations of the particles in the red rectangle are exactly the fluctuations of the particles in the blue one (Color figure online)

Now for (4.13) we claim that there exist a constant \(c>0\) such that \(\forall j\)

$$\begin{aligned}{} & {} \mu (a_j,a_{j+1})e^{\frac{a_j^2}{2}}\le c, \\{} & {} \frac{\mu (a_{j_k^{\min }},a_j)\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}e^{\frac{a_j^2}{2}}\le c. \end{aligned}$$

The first inequality follows from

$$\begin{aligned} \mu (a_j,a_{j+1})e^{\frac{a_j^2}{2}}=\int _{a_j}^{a_{j+1}}dx_1\frac{e^{-\frac{x_1^2}{2}}}{\sqrt{2\pi }}e^{\frac{a_j^2}{2}}\le c(a_{j+1}-a_j)e^{-\frac{a_j^2}{2}}e^{\frac{a_j^2}{2}}=c(a_{j+1}-a_j), \end{aligned}$$

while the second one is a consequence of

$$\begin{aligned} \text { if }j\ge & {} 0\quad \frac{\mu (a_{j_k^{\min }},a_j)\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}e^{\frac{a_j^2}{2}}\le \mu (a_j,a_{j_k^{\max }+1})e^{\frac{a_j^2}{2}} \\\le & {} \int _{a_j}^{+\infty }dx_1e^{-\frac{x_1^2}{2}}e^{\frac{a_j^2}{2}}\le \max _{x\ge 0}e^{\frac{x^2}{2}}\int _x^{+\infty }dye^{-\frac{y^2}{2}}, \\ \text { if } j< & {} 0\quad \frac{\mu (a_{j_k^{\min }},a_j)\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}e^{\frac{a_j^2}{2}}\le \mu (a_{j_k^{\min }},a_j)e^{\frac{a_j^2}{2}} \\\le & {} \int _{-\infty }^{a_j}dx_1e^{-\frac{x_1^2}{2}}e^{\frac{a_j^2}{2}}\le \max _{x\le 0}e^{\frac{x^2}{2}}\int _{-\infty }^xdye^{-\frac{y^2}{2}}. \end{aligned}$$

Thus the claim is proved and we have

$$\begin{aligned}{} & {} \sum _{j=j_k^{\min }}^{j_k^{\max }}\left[ \mu (a_j,a_{j+1})+\frac{\mu (a_{j_k^{\min }},a_j)\mu (a_j,a_{j_k^{\max }+1})}{\mu (J^k)}\right] e^{\frac{a_j^2}{2}}(a_{j+1}-a_j) \nonumber \\{} & {} \quad \le c\sum _{j=j_k^{\min }}^{j_k^{\max }}(a_{j+1}-a_j)=c|J^k|\le c\sqrt{\log N}. \end{aligned}$$
(4.14)

Applying (4.14) to (4.13) and using the properties of the conditioned expected value we get

$$\begin{aligned}{} & {} \mathbb {E}\left[ \sum _{k:N_k>0}\frac{N_k}{N}W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)}\right) \right] \nonumber \\{} & {} \quad \le \mathbb {E}\left[ \sum _{k:N_k>0}\frac{N_k}{N}\mathbb {E}_{N_k}\left[ W_2^2\left( \sum _{j=j_k^{\min }}^{j_k^{\max }}\frac{N^j_k}{N_k}\frac{\mu \mathbbm {1}_{(a_j,a_{j+1})}}{\mu (a_j,a_{j+1})},\frac{\mu \mathbbm {1}_{J^k}}{\mu (J^k)}\right) \right] \right] \nonumber \\{} & {} \quad \le \mathbb {E}\left[ \sum _{k:N_k>0}\frac{N_k}{N}\frac{c\sqrt{\log N}}{N_k}\right] =c\frac{|\mathcal{R}|\sqrt{\log N}}{N}\le c\frac{(\log N)^{\frac{3}{2}}}{\epsilon N}. \end{aligned}$$
(4.15)

Now we have bounded the expectation of (4.6).

To estimate (4.7) we argue in the following way: thanks to Theorem 2.3 and using \(\log x\le x-1\) and \(\mathbb {E}(N_k)=N\rho _N(R_k)=N\frac{\rho (R_k)}{\rho (E_N)},\) we have

$$\begin{aligned}{} & {} W_2^2\left( \sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)},\rho \right) \le 2\sum _k\frac{N_k}{N\rho (R_k)}\int _{R_k}dx\rho (x)\log \left( \frac{N_k}{N\rho (R_k)}\right) \\{} & {} \quad \le 2\sum _k\frac{\mathbb {E}(N_k)}{N}\frac{N_k}{\mathbb {E}(N_k)}\left( \frac{N_k}{\mathbb {E}(N_k)}-1\right) +2\log \left( \frac{1}{\rho (E_N)}\right) . \end{aligned}$$

Therefore

$$\begin{aligned} \mathbb {E}\left[ W_2^2\left( \sum _k\frac{N_k}{N}\frac{\rho \mathbbm {1}_{R_k}}{\rho (R_k)},\rho \right) \right]\le & {} 2\sum _k\frac{N\rho _N(R_k)(1-\rho _N(R_k))}{N^2\rho _N(R_k)}+2\log \left( \frac{1}{\rho (E_N)}\right) \nonumber \\\le & {} c\frac{\log N}{\epsilon N}+c\frac{(\log N)^{\alpha }}{N}. \end{aligned}$$
(4.16)

Before concluding the proof we can observe that for (4.4) at this point we would obtain the following term

$$\begin{aligned} \sum _k\frac{\mathbb {E}\left( \frac{M_k-N_k}{3\theta }+M_k\right) }{N}\frac{\frac{M_k-N_k}{3\theta }+M_k}{\mathbb {E}\left( \frac{M_k-N_k}{3\theta }+M_k\right) }\left( \frac{\frac{M_k-N_k}{3\theta }+M_k}{\mathbb {E}\left( \frac{M_k-N_k}{3\theta }+M_k\right) }-1\right) , \end{aligned}$$

that is analogue to the previous one but with a restriction to the set \(A_{\theta }\): we can bound the expectation computed in \(A_{\theta }\) with the expectation computed everywhere because this term is everywhere positive (indeed the function \(f(x)=x^2-x\) is convex and we are considering a convex combination of the summands).

Finally, combining (4.6) with (4.15) and (4.7) with (4.16) we obtain (4.3).

To prove (4.5) we observe that in \(A_{\theta }\)

$$\begin{aligned}{} & {} W_2^2\left( \sum _{j,k}\frac{3\theta M^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\sum _{j,k}\frac{M^j_k-N^j_k+3\theta M^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \\{} & {} \quad \le 6\theta W_2^2\left( \sum _{j,k}\frac{M^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right) +6\theta W_2^2\left( \sum _{j,k}\frac{M^j_k+\frac{M^j_k-N^j_k}{3\theta }}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right) , \end{aligned}$$

and this implies the thesis thanks to (4.3) and (4.4). \(\square \)

With the following Lemma we prove that thanks to the choice of the squares \(Q^j_k\) we can transport \(\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\) in the uniform measure. This implies that the problem on the square \(Q^j_k\) is (approximately) a random matching problem in the square with the uniform measure, and thus solved in [4].

Lemma 4.2

There exist a function \(\epsilon (N)\xrightarrow [N\rightarrow \infty ]{}2\epsilon \) such that if \({\tilde{X}}_1,\dots ,{\tilde{X}}_{N^j_k}\) and \({\tilde{Y}}_1,\dots ,\tilde{Y}_{M^j_k}\) are independent random variables in \(Q^j_k\) with common distribution \(\frac{\rho _N\mathbbm {1}_{Q^j_k}}{\rho _N(Q^j_k)}\) and \(Z_1,\dots ,Z_{N^j_k}\) and \(W_1,\dots ,W_{M^j_k}\) are independent random variables in \(Q^j_k\) with common distribution \(\frac{\mathbbm {1}_{Q^j_k}}{|Q^j_k|}\), then

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N^j_k}\sum _{i=1}^{N^j_k}\delta _{\tilde{X}_i},\frac{\rho _N\mathbbm {1}_{Q^j_k}}{\rho _N(Q^j_k)}\right) \right] \nonumber \\{} & {} \quad \le e^{\epsilon (N)}\mathbb {E}\left[ W_2^2\left( \frac{1}{N^j_k}\sum _{i=1}^{N^j_k}\delta _{Z_i},\frac{\mathbbm {1}_{Q^j_k}}{|Q^j_k|}\right) \right] , \nonumber \\{} & {} \mathbb {E}\left[ Wb_2^2\left( \frac{1}{N^j_k}\sum _{i=1}^{N^j_k}\delta _{\tilde{X}_i},\frac{1}{M^j_k}\sum _{i=1}^{M^j_k}\delta _{\tilde{Y}_i}\right) \right] \end{aligned}$$
(4.17)
$$\begin{aligned}{} & {} \quad \ge e^{-\epsilon (N)}\mathbb {E}\left[ Wb_2^2\left( \frac{1}{N^j_k}\sum _{i=1}^{N^j_k}\delta _{Z_i},\frac{1}{M^j_k}\sum _{i=1}^{M^j_k}\delta _{W_i}\right) \right] . \end{aligned}$$
(4.18)

Proof

To prove the statement, arguing as in [8], we can reduce to find a suitable map \(S:Q^j_k\rightarrow Q^j_k\) which transports \(\frac{\rho _N\mathbbm {1}_{Q^j_k}}{\rho _N(Q^j_k)}\) in \(\frac{1}{|Q^j_k|}\). Let \(S_j:(a_j,a_{j+1})\rightarrow (a_j,a_{j+1})\) and \(S^k:(b_k,b_{k+1})\rightarrow (b_k,b_{k+1})\) be defined by

$$\begin{aligned} \int _{a_j}^{S_j(x_1)}dy_1e^{-\frac{y_1^2}{2}}= & {} \int _{a_j}^{a_{j+1}}dy_1e^{-\frac{y_1^2}{2}}\frac{x_1-a_j}{a_{j+1}-a_j}, \\ \int _{b_k}^{S^k(x_2)}dy_2e^{-\frac{y_2^2}{2}}= & {} \int _{b_k}^{b_{k+1}}dy_2e^{-\frac{y_2^2}{2}}\frac{x_2-b_k}{b_{k+1}-b_k}. \end{aligned}$$

Then the map \(S:Q^j_k\ni x\mapsto (S_j(x_1),S^k(x_2))\in Q^j_k\) and its inverse switch the measures we are considering and fix the boundary of \(Q^j_k\), and since

$$\begin{aligned} S_j'(x_1)= & {} e^{\frac{S_j^2(x_1)}{2}}\frac{\int _{a_j}^{a_{j+1}}dy_1e^{-\frac{y_1^2}{2}}}{a_{j+1}-a_j}\in \left[ e^{-\frac{|a_{j+1}^2-a_j^2|}{2}},e^{\frac{|a_{j+1}^2-a_j^2|}{2}}\right] , \\ {S^k}'(x_2)= & {} e^{\frac{{S^k}^2(x_2)}{2}}\frac{\int _{b_k}^{b_{k+1}}dy_2e^{-\frac{y_2^2}{2}}}{b_{k+1}-b_k}\in \left[ e^{-\frac{|b_{k+1}^2-b_k^2|}{2}},e^{\frac{|b_{k+1}^2-b_k^2|}{2}}\right] , \end{aligned}$$

if \(\epsilon (N):=2\epsilon +\frac{\epsilon ^2}{r_N^2}\), we find

$$\begin{aligned} |a_{j+1}^2-a_j^2|\le 2\frac{|j|\epsilon ^2}{r_N^2}+\frac{\epsilon ^2}{r_N^2}\le 2\epsilon +\frac{\epsilon ^2}{r_N^2}=\epsilon (N), \\ |b_{k+1}^2-b_k^2|\le 2\frac{|k|\epsilon ^2}{r_N^2}+\frac{\epsilon ^2}{r_N^2}\le 2\epsilon +\frac{\epsilon ^2}{r_N^2}=\epsilon (N). \end{aligned}$$

Therefore

$$\begin{aligned} e^{-\epsilon (N)}|x-y|^2\le |S(x)-S(y)|^2\le e^{\epsilon (N)}|x-y|^2, \end{aligned}$$

and this concludes the proof. \(\square \)

The following Lemma allows us to restrict to a good event in the bound from below for bipartite matching. It only uses Chernoff bound, as in [5].

Lemma 4.3

Let \({\tilde{X}}_1,\dots ,{\tilde{X}}_N\) and \({\tilde{Y}}_1,\dots ,{\tilde{Y}}_N\) be independent random variables with common distribution \(\rho _N\). Then if \(\theta =\theta (N):=\frac{1}{(\log N)^{\xi }}\), \(0<\xi<\frac{\alpha -1}{2}<\frac{1}{2},\) and

$$\begin{aligned} A_{\theta }:=\bigcap _{j,k}\left\{ \begin{array}{lcr}|N^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\\ |M^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\end{array}\right\} , \end{aligned}$$

it holds

$$\begin{aligned} \mathbb {P}(A^c_{\theta })\xrightarrow [N\rightarrow \infty ]{}0. \end{aligned}$$

Proof

Thanks to Chernoff bound we have

$$\begin{aligned} \mathbb {P}\left( |N^j_k-N\rho _N(Q^j_k)|\ge \theta N\rho _N(Q^j_k)\right)\le & {} \exp \left\{ -\frac{\theta ^2}{2}N\rho _N(Q^j_k)\right\} \\\le & {} \exp \left\{ -c\epsilon ^2(\log N)^{\alpha -1-2\xi }\right\} , \end{aligned}$$

therefore

$$\begin{aligned} \mathbb {P}(A^c_{\theta })\le & {} 2\sum _{j,k}\exp \left\{ -c\epsilon ^2(\log N)^{\alpha -1-2\xi }\right\} \\= & {} 2|\mathcal{Q}|\exp \left\{ -c\epsilon ^2(\log N)^{\alpha -1-2\xi }\right\} \\\le & {} c\frac{(\log N)^2}{\epsilon ^2}\exp \left\{ -c\epsilon ^2(\log N)^{\alpha -1-2\xi }\right\} , \end{aligned}$$

that implies the thesis. \(\square \)

Finally, this last Proposition collects all the contributions to the total cost given from each square. It makes rigorous the idea explained at the beginning of this section.

Proposition 4.2

Let \({\tilde{X}}_1,\dots ,{\tilde{X}}_N\) be independent random variables with common distribution \(\rho _N\). Then we have

$$\begin{aligned} \frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{(\log N)^2}\xrightarrow [N\rightarrow \infty ]{}\pi . \end{aligned}$$

Proof

First, we focus on the estimate from above, therefore we choose \(0=\alpha _0<\alpha _1<\dots <\alpha _L=1\) and we define

$$\begin{aligned} C_l:= & {} \{x\in \mathbb {R}^2|\sqrt{\alpha _l}r_N\le |x|\le \sqrt{\alpha _{l+1}}r_N\}, \\ W_l:= & {} \bigcup _{j,k:Q^j_k\cap C_l\ne \emptyset }Q^j_k, \\ N_l:= & {} \sum _{i=1}^N\mathbbm {1}(X_i\in W_l)=\sum _{j,k:Q^j_k\cap C_l\ne \emptyset }N^j_k, \end{aligned}$$

so that

$$\begin{aligned} \hbox { if}\ l=0\quad \log \mathbb {E}(N_l)\le & {} \log N, \\ \text { if }l>0\quad \log \mathbb {E}(N_l)\le & {} \log \left[ N\int _{\sqrt{\alpha _l}r_N-\frac{\epsilon \sqrt{2}}{r_N}}^{\sqrt{\alpha _{l+1}}r_N+\frac{\epsilon \sqrt{2}}{r_N}}dr2\pi r\frac{e^{-\frac{r^2}{2}}}{2\pi \rho (E_N)}\right] \\\le & {} \log \left[ N\int _{\sqrt{\alpha _l}r_N-\frac{\epsilon \sqrt{2}}{r_N}}^{+\infty }dr re^{-\frac{r^2}{2}}\right] -\log \rho (E_N) \\\le & {} \log N(1-\alpha _l)+c\log \log N, \end{aligned}$$

and

$$\begin{aligned} \sum _{j,k:Q^j_k\cap C_l\ne \emptyset }|Q^j_k|\le 2\pi (\alpha _{l+1}-\alpha _l)\log N+c. \end{aligned}$$

These last two properties imply

$$\begin{aligned} \sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)\le & {} \sum _{l=0}^{L-1}\sum _{j,k:Q^j_k\cap C_l\ne \emptyset }|Q^j_k|\log \mathbb {E}(N^j_k) \\\le & {} \sum _{l=0}^{L-1}\log \mathbb {E}(N_l)\sum _{j,k:Q^j_k\cap C_l\ne \emptyset }|Q^j_k| \\\le & {} 2\pi \sum _{l=0}^{L-1}(1-\alpha _l)(\alpha _{l+1}-\alpha _l)(\log N)^2+c\log N\log \log N, \end{aligned}$$

therefore

$$\begin{aligned} \limsup _{N\rightarrow \infty }\frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{(\log N)^2}\le 2\pi \sum _{l=0}^{L-1}(1-\alpha _l)(\alpha _{l+1}-\alpha _l). \end{aligned}$$

Now we recognize in the right hand side of this inequality a Riemann sum for the function \(f(x)=1-x\) which verifies

$$\begin{aligned} \int _0^1dx(1-x)=\frac{1}{2}, \end{aligned}$$

and since our choice of \(\{\alpha _l\}_{l=0}^{L}\) was arbitrary in [0, 1] we have

$$\begin{aligned} \limsup _{N\rightarrow \infty }\frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{(\log N)^2}\le \pi . \end{aligned}$$

As for the estimate from below, since function \(\log x\) is concave, for a suitable function \(\zeta (N)\xrightarrow [N\rightarrow \infty ]{}0\) we have

$$\begin{aligned}{} & {} \sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k) \\{} & {} \quad =\log N\sum _{j,k}|Q^j_k|+\sum _{j,k}|Q^j_k|\log \left( \frac{1}{|Q^j_k|}\int _{Q^j_k}dx\rho _N(x)\right) +\sum _{j,k}|Q^j_k|\log |Q^j_k| \\{} & {} \quad \ge 2\pi (\log N)^2(1-\zeta (N))+\int _{E_N}dx\log \rho _N(x)-\log \left( \frac{2\log N}{\epsilon ^2}\right) \sum _{j,k}|Q^j_k| \\{} & {} \quad \ge \pi (\log N)^2(1-\zeta (N))-c\log N\log \log N, \end{aligned}$$

therefore

$$\begin{aligned} \liminf _{N\rightarrow \infty }\frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{(\log N)^2}\ge \pi . \end{aligned}$$

\(\square \)

4.2 Convergence Theorems

In this subsection we prove Theorem 4.1.

Thanks to Lemma 2.1 it is sufficient to prove the upper bound for semidiscrete matching, in Theorem 4.2, and the lower bound for bipartite matching, in Theorem 4.3. The structure of the proof is the same as Theorem 1 in [8] and Theorem 1.1 and 1.2 in [5].

Both in Theorem 4.2 and in Theorem 4.3, the first step consists in substituting N independent random variables with common distribution \(\rho \) with N independent random variables with common distribution \(\rho _N\). This is possible thanks to Lemma 4.1.

Then we have to bound the distance between two measures, one of which is \(\rho \) (in semidiscrete case, the first one) or the empirical measure on N independent random variables with distribution \(\rho _N\) (in bipartite case, the second one) while the other is the same measure as the first , multiplied in each square \(Q^j_k\) by \(\frac{N^j_k}{N\rho (Q^j_k)}\). This factor is expected to be very close to one, and this is the reason why the two measures involved are similar. This is possible thanks to Proposition 4.1.

At this point, we are allowed to compute the total cost of the problem as the sum of the costs on the squares. When proving the upper bound we use a subadditivity argument while for the lower bound we use, as in [5], the distance introduced in [18], that is (2.1). This distance is superadditive.

Then, since we need that in each square \(Q^j_k\) there is an increasing (with N) number of particles, in Theorem 4.2 we consider separately two events: the event in which the number of particles in the square is close to its expected value, and its complementary, and we show that the contribution of the second event is negligible. In Theorem 4.3 we simply restrict to a good event (that is \(A_{\theta }\)) and thanks to Lemma 4.3 we are sure its probability to be close to 1.

Once made these assumptions, thanks to Lemma 4.2 we can approximate the probability measure on the square \(Q^j_k\) whose density is \(\frac{\rho _N\mathbbm {1}_{Q^j_k}}{\rho _N(Q^j_k)}\) with the uniform measure on the square itself. Therefore, using the results obtained in [4, 5] except for a factor \(4\pi \) or \(2\pi \) the cost with uniform measure (on the square \(Q^j_k\)) is bounded from above and below by a term close to

$$\begin{aligned} |Q^j_k|\frac{\log N^j_k}{N^j_k}\approx |Q^j_k|\frac{\log \mathbb {E}(N^j_k)}{N^j_k}. \end{aligned}$$

Finally, the total cost is a convex combination of all these contributions and the main term in the estimate turns out to be

$$\begin{aligned} \frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{N}, \end{aligned}$$

divided by \(4\pi \) in Theorem 4.2 and \(2\pi \) in Theorem 4.3. We have already examined it in Proposition 4.2, and this concludes both the proofs.

Theorem 4.2

If \(X_1,\dots ,X_N\) are independent random variables with common distribution \(\rho \), it holds

$$\begin{aligned} \limsup _{N\rightarrow \infty }\frac{N}{(\log N)^2}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \le \frac{1}{4}. \end{aligned}$$

Proof

As explained before, first we substitute \(X_1,\dots ,X_N\) with N independent random variables distributed with the probability measure whose density is \(\rho _N\). If \(\gamma >0\) and if \(T:\mathbb {R}^2\rightarrow \mathbb {R}^2\) is the map that transports \(\rho \) in \(\rho _N\), we denote \({\tilde{X}}_i:=T(X_i)\). Using the triangle inequality we have

$$\begin{aligned} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right]\le & {} (1+\gamma )\mathbb {E}\left[ \sum _{j,k:N^j_k>0}\frac{N^j_k}{N}W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \nonumber \\{} & {} +2\frac{1+\gamma }{\gamma }\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{\tilde{X}_i}\right) \right] \nonumber \\{} & {} +2\frac{1+\gamma }{\gamma }\mathbb {E}\left[ W_2^2\left( \sum _{j,k}\frac{N^j_k}{N}\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)},\rho \right) \right] . \end{aligned}$$
(4.19)

The first term in the sum in (4.19) gives the main contribution, while we have a bound for the second and the third one thanks to (4.2) of Lemma 4.1 and (4.3) of Proposition 4.1. So we only focus on the first term.

To estimate it first we exclude the events with few particles in any square \(Q^j_k\), therefore we define

$$\begin{aligned} A^j_k:=\left\{ N^j_k\ge \frac{\mathbb {E}(N^j_k)}{2}\right\} =\left\{ N^j_k\ge \frac{N\rho _N(Q^j_k)}{2}\right\} , \end{aligned}$$

and we observe that the contributions in the events \({A^j_k}^c\) are negligible, indeed

$$\begin{aligned}{} & {} \mathbb {E}\left[ \frac{N^j_k}{N}W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \mathbbm {1}_{{A^j_k}^c}\mathbbm {1}(N^j_k>0)\right] \\{} & {} \quad \le \frac{\rho _N(Q^j_k)}{2}\frac{2\epsilon ^2}{r_N^2}\mathbb {P}({A^j_k}^c)\le \frac{\rho _N(Q^j_k)}{2}\frac{2\epsilon ^2}{r_N^2}\frac{4}{N\rho _N(Q^j_k)}=\frac{4|Q^j_k|}{N}, \end{aligned}$$

and therefore

$$\begin{aligned}{} & {} \mathbb {E}\left[ \sum _{j,k:N^j_k>0}\frac{N^j_k}{N}W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \nonumber \\{} & {} \quad \le \mathbb {E}\left[ \sum _{j,k}\frac{N^j_k}{N}W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \mathbbm {1}_{A^j_k}\right] +4\frac{\sum _{j,k}|Q^j_k|}{N} \nonumber \\{} & {} \quad \le \sum _{j,k}\mathbb {E}\left[ \frac{N^j_k}{N}\mathbbm {1}_{A^j_k}\mathbb {E}_{N^j_k}\left[ W_2^2\left( \sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \right] +c\frac{\log N}{N}. \end{aligned}$$
(4.20)

Then, we use (4.17) of Lemma 4.2, therefore if \(Z_i:=S({\tilde{X}}_i)\) where S is the map that transports \(\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\) in the uniform measure on the square \(Q^j_k\), we have

$$\begin{aligned} \mathbb {E}_{N^j_k}\left[ W_2^2\left( \frac{1}{N^j_k}\sum _{i:X_i\in Q^j_k}\delta _{X_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \le e^{\epsilon (N)}\mathbb {E}_{N^j_k}\left[ W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{Z_i},\frac{\mathbbm {1}_{Q^j_k}}{|Q^j_k|}\right) \right] , \end{aligned}$$

for a suitable function \(\epsilon (N)\xrightarrow [N\rightarrow \infty ]{}2\epsilon \).

Moreover, since in the event \(A^j_k\), \(N^j_k\ge \frac{\mathbb {E}(N^j_k)}{2}\ge \frac{\epsilon ^2}{r_N^2}\frac{e^{-\frac{r_N^2}{2}}}{2\sqrt{2\pi }}\ge c\epsilon ^2(\log N)^{\alpha -1}\), we can use (2.2) of Theorem 2.4 to find a function \(\omega (N)\xrightarrow [N\rightarrow \infty ]{}0\) such that in \(A^j_k\)

$$\begin{aligned} \mathbb {E}_{N^j_k}\left[ W_2^2\left( \frac{1}{N^j_k}\sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \le e^{\epsilon (N)}|Q^j_k|\frac{\log N^j_k}{4\pi N^j_k}\left( 1+\omega (N)\right) , \end{aligned}$$

which leads to

$$\begin{aligned}{} & {} \mathbb {E}\left[ \frac{N^j_k}{N}\mathbbm {1}_{A_j}\mathbb {E}_{N^j_k}\left[ W_2^2\left( \sum _{i:\tilde{X}_i\in Q^j_k}\delta _{\tilde{X}_i},\frac{\rho \mathbbm {1}_{Q^j_k}}{\rho (Q^j_k)}\right) \right] \right] \nonumber \\{} & {} \quad \le \mathbb {E}\left[ \frac{N^j_k}{N}\mathbbm {1}_{A_j}e^{\epsilon (N)}|Q^j_k|\frac{\log N^j_k}{4\pi N^j_k}\left[ 1+\omega (N)\right] \right] \nonumber \\{} & {} \quad \le |Q^j_k|\frac{\log \mathbb {E}(N^j_k)}{4\pi N}\left[ 1+\omega (N)\right] . \end{aligned}$$
(4.21)

Finally, combining (4.19), (4.20) and (4.21) and using Lemma 4.1 and Proposition 4.1, we have

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \le (1+\gamma )e^{\epsilon (N)}\frac{\sum _{j,k}|Q^j_k|\log \mathbb {E}(N^j_k)}{4\pi N}\left[ 1+\omega (N)\right] \\{} & {} \quad +(1+\gamma )c\frac{\log N}{N}+2\frac{1+\gamma }{\gamma }c\frac{(\log N)^{\alpha }}{N}+2\frac{1+\gamma }{\gamma }c\left[ \frac{(\log N)^{\frac{3}{2}}}{\epsilon N}+\frac{(\log N)^{\alpha }}{N}\right] . \end{aligned}$$

Using Proposition 4.2 we find

$$\begin{aligned} \limsup _{N\rightarrow \infty }\frac{N}{(\log N)^2}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \le \frac{(1+\gamma )e^{2\epsilon }}{4}, \end{aligned}$$

and letting \(\gamma ,\epsilon \rightarrow 0\) we conclude. \(\square \)

Theorem 4.3

If \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are independent random variables with common distribution \(\rho \), we have

$$\begin{aligned} \liminf _{N\rightarrow \infty }\frac{N}{(\log N)^2}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \ge \frac{1}{2}. \end{aligned}$$

Proof

(Sketch) Except for some steps, the proof is very similar to the previous one, therefore we only underline the differences. Once made the substitution of \(\{X_i,Y_i\}_{i=1}^N\) with \(\{{\tilde{X}}_i,{\tilde{Y}}_i\}_{i=1}^N\), we restrict to the set

$$\begin{aligned} A_{\theta }:=\bigcap _{j,k}\left\{ \begin{array}{lcr}|N^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\\ |M^j_k-N\rho _N(Q^j_k)|&{}\le &{}\theta N\rho _N(Q^j_k)\end{array}\right\} , \end{aligned}$$

where \(\theta =\frac{1}{(\log N)^{\xi }}\) and \(0<\xi<\frac{\alpha -1}{2}<\frac{1}{2}\).

Then, if we rename

$$\begin{aligned} \mu ^{N^j_k}:=\frac{1}{N^j_k}\sum _{i:{\tilde{X}}_i\in Q^j_k}\delta _{\tilde{X}_i},\quad \nu ^{M^j_k}:=\frac{1}{M^j_k}\sum _{i:{\tilde{Y}}_i\in Q^j_k}\delta _{{\tilde{Y}}_i}, \end{aligned}$$

we apply triangle inequality and superadditivity of \(Wb_2^2\) to obtain

$$\begin{aligned}{} & {} \mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{\tilde{X}_i},\frac{1}{N}\sum _{i=1}^N\delta _{\tilde{Y}_i}\right) \mathbbm {1}_{A_{\theta }}\right] \nonumber \\{} & {} \quad \ge (1-\delta )\mathbb {E}\left[ \sum _{j,k}\frac{N^j_k}{N}Wb_2^2(\mu ^{N^j_k},\nu ^{M^j_k})\mathbbm {1}_{A_{\theta }}\right] \end{aligned}$$
(4.22)
$$\begin{aligned}{} & {} \qquad - \frac{1-\delta }{\delta }\mathbb {E}\left[ W_2^2\left( \sum _{j,k}\frac{N^j_k}{N}\nu ^{M^j_k},\sum _{j,k}\frac{M^j_k}{N}\nu ^{M^j_k}\right) \mathbbm {1}_{A_{\theta }}\right] . \end{aligned}$$
(4.23)

The main term is (4.22) and it can be estimated with (4.18) and (2.3) of Theorem 2.4, as in the previous theorem.

Then, as proved in Lemma 6.2 and Proposition 4.1, up for a constant, the term in (4.23) is bounded by

$$\begin{aligned} \frac{(\log N)^{2-\xi }}{N}+\frac{(\log N)^{\frac{3}{2}+\xi }}{\epsilon N}+c\frac{(\log N)^{\alpha -\xi }}{N}, \end{aligned}$$

and therefore, sending \(\delta \) and \(\epsilon \) (which is hidden in (4.22)) to 0 we get the proof. \(\square \)

5 The Maxwellian Density

In this section we briefly focus on the Maxewellian density, that is

$$\begin{aligned} \rho (x):=\mathbbm {1}_{[0,1]}(x_1)\mu (x_2),\quad \mu (z):=\frac{e^{-\frac{z^2}{2}}}{\sqrt{2\pi }}, \end{aligned}$$

where \(\rho \) is uniform in one direction and Gaussian in the other one.

We consider \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) independent random variables with values in \((0,1)\times \mathbb {R}\) with density \(\rho \).

Arguing as in the case of the Gaussian density, we can prove the following result

Theorem 5.1

If \(X_1,\dots ,X_N\) and \(Y_1,\dots ,Y_N\) are independent random variables in \(\mathbb {R}^2\) with common distribution \(\rho \), we have

$$\begin{aligned}{} & {} \frac{N}{(\log N)^{\frac{3}{2}}}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\rho \right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{\sqrt{2}}{3\pi }, \\{} & {} \frac{N}{(\log N)^{\frac{3}{2}}}\mathbb {E}\left[ W_2^2\left( \frac{1}{N}\sum _{i=1}^N\delta _{X_i},\frac{1}{N}\sum _{i=1}^N\delta _{Y_i}\right) \right] \xrightarrow [N\rightarrow \infty ]{}\frac{2\sqrt{2}}{3\pi }. \end{aligned}$$

The idea is again that the number of particles \(X_i\) or \(Y_i\) close to a point \(x\in (0,1)\times \mathbb {R}\) is \(Ne^{-\frac{x_2^2}{2}}dx\), that is strictly smaller than 1 when \(|x_2|>\sqrt{2\log N}\). Therefore, also if the density \(\rho \) has an unbounded support, we expect all the particles to be in the domain \((0,1)\times (-\sqrt{2\log N},\sqrt{2\log N})\). As for the case of the Gaussian density we expect the total cost to be estimated by

$$\begin{aligned} \frac{1}{N}\int _0^1dx_1\int _{-\sqrt{2\log N}}^{\sqrt{2\log N}}dx_2\log \left( N\frac{e^{-\frac{x_2^2}{2}}}{\sqrt{2\pi }}\right) =\frac{4\sqrt{2}}{3}\frac{(\log N)^{\frac{3}{2}}}{N}+\frac{O(1)}{N}, \end{aligned}$$

once omitted the factor \(\frac{1}{2\pi }\) or \(\frac{1}{4\pi }\).

To make this rigorous we substitute again \(\rho \) with a density (that we will call \(\rho _N\)) whose support is compact but increases with N. To define \(\rho _N\), first we define \(r_N\) and \({\tilde{r}}_N\) as

$$\begin{aligned} r_N:=\sqrt{2\log \left( \frac{N}{(\log N)^{\alpha }}\right) },\qquad 1<\alpha <2,\qquad \tilde{r}_N:=\frac{\lfloor m\lfloor r_N\rfloor r_N\rfloor +1}{m\lfloor r_N\rfloor }. \end{aligned}$$

We define \({\tilde{r}}_N\) in this way because when multiplying for \(m\lfloor r_N\rfloor \) we obtain an integer number and therefore the set can easily covered by an integer number of squares, while \(\frac{{\tilde{r}}_N}{r_N}\xrightarrow [N\rightarrow \infty ]{}1\). Moreover, m will be sent to \(\infty \) in the end.

Then we apply the cut-off:

$$\begin{aligned} \rho _N:=\frac{\rho \mathbbm {1}_{(0,1)\times (-{\tilde{r}}_N,\tilde{r}_N)}}{\rho ((0,1)\times (-{\tilde{r}}_N,{\tilde{r}}_N))}. \end{aligned}$$

Finally we cover \((0,1)\times (-{\tilde{r}}_N,{\tilde{r}}_N)\) with squares \(\{Q^j_k\}_{j,k}\) whose side is \(\frac{1}{m\lfloor r_N\rfloor }\), and we also define the horizontal rectangles \(\{R_k\}_{k}:=\{\cup _j Q^j_k\}_k\), which are aimed to be used in the analogous of the Proposition 4.1 (Fig. 6).

Fig. 6
figure 6

On the left: the squares \(\{Q^j_k\}_{j,k}\). On the right: the horizontal rectangles \(\{R_k\}_k\)

Using this partition the arguments used are analogous to the Gaussian case, and in this way we can prove Theorem 5.1.