Quasirandom permutations are characterized by 4-point densities

For permutations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\pi}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\tau}$$\end{document} of lengths \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${|\pi|\le|\tau|}$$\end{document} , let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${t(\pi,\tau)}$$\end{document} be the probability that the restriction of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\tau}$$\end{document} to a random \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${|\pi|}$$\end{document} -point set is (order) isomorphic to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\pi}$$\end{document} . We show that every sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\{\tau_j\}}$$\end{document} of permutations such that \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${|\tau_j|\to\infty}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${t(\pi,\tau_j)\to 1/4!}$$\end{document} for every 4-point permutation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\pi}$$\end{document} is quasirandom (that is, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${t(\pi,\tau_j)\to 1/|\pi|!}$$\end{document} for every \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\pi}$$\end{document}). This answers a question posed by Graham.

In particular, quasirandomness has been extensively studied for graphs. Extending earlier results of Rödl [Rod86] and Thomason [Tho87], Chung et al. [CGW89] gave seven equivalent properties of graph sequences such that the sequence of random graphs {G n,1/2 } possesses them with probability one. These properties include densities of subgraphs, values of eigenvalues of the adjacency matrix or the typical size of the common neighborhood of two vertices. In particular, it follows from the results in [CGW89] that if the density of 4-vertex subgraphs in a large graph is asymptotically the same as in G n,1/2 , then this is true for every fixed subgraph. Graham (see [Coo04, page 141]) asked whether a similar phenomenon also occurs in the case of permutations.
Let us state his question more precisely. Let S k consist of permutations on [k] := {1, . . . , k}. We view each π ∈ S k as a bijection π : [k] → [k] and call |π| := k its GAFA QUASIRANDOM PERMUTATIONS 571 length. For π ∈ S k and τ ∈ S m with k ≤ m, let t(π, τ ) be the probability that a random k-point subset X of [m] induces a permutation isomorphic to π (that is, where X consists of x 1 < · · · < x k ). A sequence {τ j } of permutations has Property P(k) if |τ j | → ∞ and t(π, τ j ) = 1/k! + o(1) for every π ∈ S k . It is easy to see that P(k + 1) implies P(k). Graham asked whether there exists an integer m such that P(m) implies P(k) for every k. Here we answer this question: Theorem 1. Property P(4) implies Property P(k) for every k.
It is trivial to see that P(1) ⇒ P(2) and an example that P(2) ⇒ P(3) can be found in [Coo04]. An unpublished manuscript of Cooper and Petrarca [CP08] shows that P(3) ⇒ P(4) and mentions that Chung could also show this (as early as 2001). Being unaware of [CP08], we found yet another example that P(3) ⇒ P(4). Since it is quite different from the construction in [CP08], we present it in Section 4.
Since these notions deal with properties of sequences of permutations, we find it convenient to operate with an appropriately defined "limit object", analogous to that for graphs introduced by Lovász and Szegedy [LS06]. Here we use the analytic aspects of permutation limits that were studied by Hoppen et al. [HKMRS12,HKMS10] and we derive Theorem 1 from its analytic analog (Theorem 3).
Let the (normalized) discrepancy d(τ ) of τ ∈ S n be the maximum over intervals The proof of Proposition 2 can be found in Section 5. Thus our Theorem 1 implies that P(4) alone is equivalent to quasirandomness.
Finally, let us remark that McKay et al. [MMW02,pp. 121] also defined a notion of quasirandomness for permutations. Their definition, although related, is different from that of Cooper as it deals with sequences of sets of permutations.

Limits of Permutations
Here we define convergence of permutation sequences and show how a convergent sequence can be associated with an analytic limit object. We refer the reader to [HKMRS12,HKMS10] for more details.
It is easy to show that every sequence of permutations whose lengths tend to infinity has a convergent subsequence; see e.g. [HKMS10, Lemma 2.11]. Furthermore, for every convergent sequence {τ j } there is μ ∈ Z such that for every permutation π we have lim j→∞ t(π, τ j ) = t(π, μ). ( For the reader's convenience, we sketch the proof from [HKMRS12] that μ exists. For π ∈ S k , let μ π ∈ Z be obtained by dividing the square [0, 1] 2 into k × k equal squares and distributing the mass uniformly on the squares with indices (i, π(i)), i = 1, . . . , k. By Prokhorov's theorem, {μ τj } has a subsequence that weakly converges to some measure μ. We have μ ∈ Z as this set is closed in the weak topology. Finally, μ satisfies (3) because, for any fixed π, the function t(π, −) : Z → R is continuous in the weak topology and t(π, τ j ) = t(π, μ τj ) + O(1/|τ j |).

QUASIRANDOM PERMUTATIONS 573
We remark that Hoppen et al. [HKMRS12,HKMS10] proposed a slightly different limit object: the regular conditional distribution function of Y with respect to X, where (X, Y ) ∼ μ. Lemma 2.2 and Definition 2.3 in [HKMRS12] show how to switch back and forth between the two objects. Now, we are ready to state the analytic version of Theorem 1. Let us call μ ∈ Z k-symmetric if t(π, μ) = 1/k! for every π ∈ S k . Theorem 3. Every 4-symmetric μ ∈ Z is the (uniform) Lebesgue measure on [0, 1] 2 . In particular, μ is k-symmetric for every k.
Let us show how Theorem 3 implies Theorem 1. Suppose on the contrary that some {τ j } satisfies P(4) but not P(k). Fix π ∈ S k and a subsequence {τ j } such that lim j→∞ t(π, τ j ) exists and is not equal to 1/k!. Consider now a convergent subsequence {τ j } of {τ j } and let μ ∈ Z be its limit. By (3), μ is 4-symmetric and, by Theorem 3, μ is m-symmetric for every m. But then lim j→∞ t(π, τ j ) = t(π, μ) = 1/k!, which is the desired contradiction.
Let V = (X, Y ) ∼ μ and v = (x, y) ∼ λ be independent. For brevity, let us abbreviate where V ≤ (a, b) means that X ≤ a and Y ≤ b. Since μ has uniform marginals, the function F is continuous.
First, we show that the 4-symmetry of μ uniquely determines certain integrals.
. ., be independent random variables distributed according to μ. By Fubini's theorem, we have where D 3 is defined by (1) and the union is over π, τ ∈ S 3 such that π(1) = τ (1) = 3. The 4-symmetry of μ and (2) imply that μ k (A π,τ ) = (1/k!) 2 for every k ≤ 4 and π, τ ∈ S k . Since μ 3 (D 3 ) = 0, we have μ 3 (A) = 4 · (1/3!) 2 = 1/9, as required. Likewise, where B ⊆ [0, 1] 8 corresponds to the event that V 2 ≤ V 1 , X 3 ≤ X 1 and Y 4 ≤ Y 1 . One can derive (4) by replacing each factor by an integral (for example, X is replaced by X3≤X dV 3 ) and applying Fubini's theorem. The integral in the right-hand side of (4) is equal to the μ 4 -measure of the union of A π,τ over some (explicit) set of pairs π, τ ∈ S 4 . The measure of this set is uniquely determined by the 4-symmetry of μ. Thus the integral does not change if we replace μ by any other 4-symmetric measure. Considering the uniform measure λ, we obtain x 2 y 2 dv = 1/9, as required. Next, observe that (X 1 , Y 2 ) is uniformly distributed in [0, 1] 2 because V 1 and V 2 are independent and have uniform marginals. Again, the value of does not depend on the choice of μ and can be easily computed by taking μ = λ.
Since X is uniformly distributed in [0, 1], we have X 2 dV = 1/3. Also, We use the above identities and apply the Cauchy-Schwartz inequality twice to get the following series of inequalities: Thus we have equality throughout. However, the last inequality is equality if and only if F (a, b) is equal to a fixed multiple of ab almost everywhere with respect to GAFA QUASIRANDOM PERMUTATIONS 575 the uniform measure λ. Since F is continuous and F (1, 1) = 1, we conclude that F (a, b) = ab for all (a, b) ∈ [0, 1] 2 . Thus the measures μ and λ coincide on all rectangles [0, a] × [0, b] and on the ring of their finite Boolean combinations. Since this ring generates the Borel σ-algebra on [0, 1] 2 , we have that μ = λ by the uniqueness statement of the Carathéodory Theorem. This proves Theorem 3.
Remark 5. Our proof gives other sufficient conditions for μ = λ. For example, it suffices to require that each of the three integrals of Lemma 4 is 1/9. The proof of the lemma shows that, if desired, these integrals can be expressed as linear combinations of densities t(π, μ) for π ∈ S 4 . The single identity ( F (x, y)xy dv) 2 = 1 9 F (x, y) 2 dv is also sufficient for proving that μ = λ; however, if written as a polynomial in terms of permutation densities (by mimicking the proof of Lemma 4), it involves 5-point permutations. Our method can give other sufficient conditions in this manner; the choice of which one to use may depend on the available information about the sequence.
Remark 6. Also, the argument of Lemma 4 shows that, for every polynomial P (x, y) and μ ∈ Z, the value of P (x, y) dμ(x, y) can be expressed as a linear combination of permutation densities. This observation combined with the Stone-Weierstrass Theorem gives the uniqueness of a permutation limit: if μ, μ ∈ Z have the same permutation densities, then μ = μ (cf. [HKMRS12, Theorem 1.7]).
Remark 7. There are other ways how one can get an example of a 3-symmetric non-uniform measure by transforming M (0) into M (1). For example, for 0 < a < 1, let ν a ∈ Z assign measure a to M (0) and measure 1−a to M (1) with the conditional distributions being equal to μ 0 and μ 1 . Again by continuity, there is a such that ν a is 3-symmetric.

Proof of Proposition 2
Let {τ j } be an arbitrary sequence of permutations with |τ j | → ∞. Let μ j ∈ Z be the measure associated with τ j as is described after (3). It is straightforward to verify that d(τ j ) = d(μ j ) + o(1), where denotes the discrepancy of μ ∈ Z, with the supremum (in fact, it is maximum) being taken over intervals A, B ⊆ [0, 1]. Also, it is not hard to show (cf. Remark 6) that {τ j } converges to μ if and only if {μ j } weakly converges to μ.
First, suppose that {τ j } satisfies P(k) for each k. This means that {τ j } converges to the uniform limit λ.
we conclude that d(μ j ) ≤ 4 · F j − F ∞ . The weak convergence μ j → λ of measures in Z gives that F j → F pointwise. Since F and each function F j , defined on the compact space [0, 1] 2 , are √ 2-Lipschitz, this implies that