Quasirandom permutations are characterized by 4-point densities

For permutations P and T of lengths |P|\le|T|, let t(P,T) be the probability that the restriction of T to a random |P|-point set is (order) isomorphic to P. We show that every sequence \{T_j\} of permutations such that |T_j|\to\infty and t(P,T_j)\to 1/4! for every 4-point permutation P is quasirandom (that is, t(P,T_j)\to 1/|P|! for every P). This answers a question posed by Graham.

In particular, quasirandomness has been extensively studied for graphs. Extending earlier results of Rödl [21] and Thomason [22], Chung, Graham and Wilson [5] 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 [5] 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 [6, 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 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, τ (x i ) ≤ τ (x j ) iff π(i) ≤ π(j) 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 [6]. An unpublished manuscript of Cooper and Petrarka [7] shows that P(3) ⇒ P(4) and mentions that Chung could also show this (as early as 2001). Being unaware of [7], we found yet another example that P(3) ⇒ P(4). Since it is quite different from the construction in [7], 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 [17]. Here we use the analytic aspects of permutation limits that were studied by Hoppen et al. [12,14] and we derive Theorem 1 from its analytic analog (Theorem 3).
Let the (normalized) discrepancy d(τ ) of τ ∈ S n be the maximum over inter- Cooper [6] calls a permutation sequence {τ j } quasirandom if |τ j | → ∞ and d(τ j ) → 0. He also gives other equivalent properties ([6, Theorem 3.1]) and he discusses various applications of "random-like" permutations. Using the results of [12,14], it is not hard to relate quasirandomness and Properties P(k): Proposition 2. A sequence {τ j } of permutations is quasirandom if and only if it satisfies Property P(k) for every k.
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, Morse and Wilf [19, Page 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 [12,14] 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. [14,Lemma 2.11]. Furthermore, for every convergent sequence {τ j } there is µ ∈ Z such that for every permutation π we have lim j→∞ t(π, τ j ) = t(π, µ).
We remark that Hoppen et al. [12,14] 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 [12] 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.

Proof of Theorem 3
In this section, let µ ∈ Z be arbitrary with t(π, µ) = 1/4! for every π ∈ S 4 . Let λ ∈ Z denote the uniform measure on [0, 1] 2 . Our objective is to show that µ = λ. Let V = (X, Y ) ∼ µ and v = (x, y) ∼ λ be independent. For brevity, let us abbreviate [0,1] 2 to . Define a function F : 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.
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: 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. [12,Theorem 1.7]).
Take a sequence {τ j } of permutations that converges to µ b . For example, the random sequence {σ(j, µ b )} has this property with probability one, see [14,Corollary 4.3]. Any such sequence {τ j } satisfies P(3) but not P(4).

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( 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 continuous and monotone in both coordinates, this implies that (Alternatively, (5) directly follows from [12,Lemma 5.3].) Thus d(µ j ) → 0 and {τ j } is quasirandom. Next suppose that d(τ j ) → 0. One way to establish Property P(k) is to use one of the equivalent definitions of quasirandomness from [6, Theorem 3.1] (namely Property [mS]). Alternatively, if P(k) fails, then (by passing to a subsequence) we can assume that {τ j } converges to some µ ∈ Z with µ = λ. However, we have that d(µ) = 0, which implies µ = λ, contradicting our assumption. This finishes the proof of Proposition 2.

Concluding remarks
The theory of flag algebras developed by Razborov [20] can be applied to permutation limits: a permutation π : A → A is viewed as two binary relations, each giving a linear order on A. For example, Lemma 4 can be stated and proved within the flag algebra framework. This view has been helpful for us when developing our proof.
Lovász and Sós [16] and Lovász and Szegedy [18] presented various sufficient conditions for a graphon W to be finitely forcible which, in the above notation, means that there is m such that the distribution of G(m, W ) uniquely determines that of G(k, W ) for every k. As far as we can see, none of these conditions directly applies to the graphon associated with the uniform measure λ ∈ Z. Since we answered Graham's question on quasirandom permutations by other means, we did not pursue this approach any further.
We also refer the reader to Hoppen et al. [13,Section 5.3] who discuss finite forcibility for permutation limits, being motivated by some questions in parameter testing.