Links and the Diaconis-Graham Inequality

In 1977 Diaconis and Graham proved two inequalities relating different measures of disarray in permutations, and asked for a characterization of those permutations for which equality holds in one of these inequalities. Such a characterization was first given in 2013. Recently, another characterization was given by Woo, using a topological link in $\mathbb R^3$ that can be associated to the cycle diagram of a permutation. We show that Woo's characterization extends much further: for any permutation, the discrepancy in Diaconis and Graham's inequality is directly related to the Euler characteristic of the associated link. This connection provides a new proof of the original result of Diaconis and Graham. We also characterize permutations with a fixed discrepancy in terms of their associated links and find that the stabilized-interval-free permutations are precisely those whose associated links are nonsplit.


Introduction
Many different metrics can be used to measure the disarray of a shuffled list.Treating the list as a permutation π ∈ S n , and denoting by π i the number in position i of π, some popular metrics are: • I(π) = n i=1 #{j > i | π j < π i }, the number of inversions in π. • D(π) = n i=1 |π i − i|, the sum of the absolute differences between the indices and values of π (called Spearman's footrule).
• T (π), the minimum number of transpositions required to produce π.
Notice that all three metrics are zero when π is the identity permutation.In 1849 Cayley showed that T (π) is equal to n minus the number of cycles in π, i.e.T (π) = |π| − cyc(π) where cyc(π) is the number of cycles in π.
The so-called Diaconis-Graham inequalities [4] relate these three metrics for any permutation π: Diaconis and Graham give a simple proof of the second inequality, and permutations where equality holds have a nice characterization: D(π) = 2I(π) if and only if π contains no 3-inversions (a triplet i < j < k where π i > π j > π k , equivalently an occurrence of the pattern 321).Their proof of the first inequality is not so intuitive, however, and they don't characterize when equality holds.Such a characterization was first given in 2013 by Hadjicostas and Monico [6].Building on their work, and results of the present authors, Woo [12] gives a simpler, remarkable characterization of these permutations in terms of their cycle diagrams and an associated link.
The "cycle diagram" (or cobweb plot) of a permutation π is obtained by plotting the permutation as follows: For each index i, draw a vertical line from (i, i) to (i, π i ), followed by a horizontal line to (π i , π i ).If i is a fixed point of π then there is an isolated point plotted at (i, i).Such a diagram allows a nice visualization of the cycle structure of the permutation.After adding "decorations" at crossings, the cycle diagram may be viewed as a knot (or link) diagram.That is, considering lines in the diagram as strands of a knot, at each crossing between a vertical line and horizontal line we add the information that the vertical line is crossing over the horizontal.Now, if each isolated point (any fixed point of π) is made to represent a small disjoint and unlinked component, then we may consider this a planar diagram of a link, which we denote L π . 1  The method described here of associating a link to a permutation was first introduced in [3], where it is shown that the count of the cycles of length n associated to an unknotted planar diagram is enumerated by the large Schroeder numbers, and a generating function is given for the sequence enumerating permutations associated to an unlink. 2 Subsequently, Woo [12] showed that a permutation π is associated to an unlink if and only if equality holds in the first part of (1), i.e.I(π) + T (π) = I(π) + n − cyc(π) = D(π).In this paper we show that this analogy extends much further.
Denote by χ(L) the Euler characteristic of a link L, a well-known link invariant which is described in Section 2 below.We also introduce the function which will be the primary permutation statistic of interest in this paper.This quantity x(π) is essentially the difference between the two quantities in the first inequality of (1), up to the number of cycles occurring in π, i.e. x(π) = D(π) − (I(π) + T (π)) − cyc(π).Our main theorem describes the relationship between these two quantities.This result leads to a completely new proof of the first inequality of (1), described in Section 3.

Corollary 1.2 (First Diaconis-Graham inequality). The inequality
holds for all permutations π, with equality holding precisely for those permutations whose diagram corresponds to an unlink (for which the Euler characteristic equals cyc(π)).
We are able to similarly characterize those permutations π with a given number of cycles where D(π) exceeds I(π) + T (π) by a fixed amount.The corollary below follows immediately from Theorem 1.1. 1The term knot typically requires a single connected component, but a link may have multiple components.This happens whenever the permutation doesn't consist of a single cycle.
2 An unlink is a link that is topologically the same as one in which each of the link components is a round circle, and these circles bound disks that are pairwise disjoint.
Before giving the proof of Theorem 1.1 in Section 5, we prove several lemmata in Section 4 that will be needed in the proof.From these results we obtain the following theorem, which may be of independent interest.
A link L in R 3 is called a split link if there exists a surface in R 3 , homeomorphic to a 2-sphere, which is disjoint from L and has components of L in both its interior and exterior.If no such surface exists, L is called non-split.We are able to characterize those permutations corresponding to non-split links as follows.
Theorem 1.4.A permutation π corresponds to a non-split link L π if and only if π is a stabilized-interval-free permutation.
The stabilized-interval-free permutations were defined and enumeratated by Callan [2].See Section 4.1 for details.The following corollary then follows from his enumeration.
Corollary 1.5.The probability a randomly chosen derangement of n corresponds to a non-split link tends to 1 as n → ∞.

Cycle Diagrams and Seifert Surfaces of Links
As discussed in the introduction, the cycle diagram of a permutation π may be decorated with crossing information and viewed as a link diagram.We write G π for this decorated cycle diagram and L π for the associated link in R 3 .If there are no fixed points of π, the diagram G π is referred to in the literature as a grid diagram of the link (see [7] for a survey).Standard definitions of grid diagrams do not allow for isolated points, such as G π might contain on the diagonal.However, a grid diagram for L π is easily obtained by replacing each isolated point by a small square contained in adjacent rows and columns, thereby producing a grid diagram with size |π| + #{fixed points}.
We orient the strands of L π so that vertical lines are oriented away from the diagonal; tracing the diagram in the order that π permutes its elements agrees with this orientation of the link.
Each crossing in an oriented link diagram has a sign, positive or negative.Our orientation convention causes every crossing in G π to be negative, so every link L π is the mirror of a positive link.In addition, if L 1 and L 2 are two link components of L π then the linking number (cf.[9, Chapter 5]) of L 1 and L 2 must be non-positive, and is only 0 if the planar projections of L 1 and L 2 into G π are disjoint.Proposition 2.1.For a permutation π, the link L π is a split link if and only if G π is disconnected (as a subset of the plane).
Proof.The linking numbers of pairs of link components are a link invariant.Thus, given a split link, for any of its components L 1 that is on one side of the splitting sphere, L 1 has linking number 0 with every component found on the other side of the sphere.Hence, using the previous observation, there is a proper subset of the set of link components of L π whose planar projection in G π is disjoint from the projection of link components that are not in this subset (i.e., G π is disconnected as a union of lines and points in the plane).
Write cr(G π ) for the number of crossings in G π .Another statistic of G π of interest is the number of upper-right corners in the diagram: indices i, 1 ≤ i ≤ n, which satisfy both π(i) < i and π −1 (i) < i. Define s(G π ) to be the number of upper-right corners plus the number of fixed points of π. (Note: each small square replacing an isolated diagonal point would have exactly one upper-right corner.) Any link in R 3 may be regarded as the boundary of an oriented surface embedded in R 3 , a Seifert surface of the link.Given a diagram of the link (with orientation), Seifert described an algorithm to determine such a surface ( [10], cf.[9, Chapter 5]).Our manner of proving the main result is informed by this algorithm, so we describe it here.
Given an oriented link diagram Z, remove each crossing in Z by changing how the strands are connected in a neighborhood of the crossing, as in Figure 3 below.Note that the change is made to be coherent with the orientation on strands outside of the neighborhood.The result Ẑ is a union of oriented simple closed curves, no two of which intersect, called Seifert circles.As we will use them again in the algorithm, we remember the arcs on Seifert circles that were paired inside one of the neighborhoods.

Figure 3. Removing a crossing
Each Seifert circle bounds a disk, oriented so that the orientation on the Seifert circle agrees with the induced boundary orientation.Place the disks in R 3 at heights so that, if Seifert circles S and S ′ are such that S is in the interior of S ′ (in the plane of the diagram), then the disk for S is above the disk for S ′ .
Finally, for each crossing from Z we consider the associated arcs in Ẑ that were paired.Viewing these arcs as part of the boundary of disks for Seifert circles, attach at those arcs two opposite sides of a half-twisted band, as in Figure 4 (with the remaining, unattached, part of the band's boundary now agreeing with the original crossing strands from Z).This completes the construction of the surface.In Seifert's original algorithm, if the surface is disconnected after attachment of halftwisted bands then handles are added to connect the surface.This is needed when the link diagram is disconnected as a subset of the plane.In this paper, we leave the surface disconnected in this case. 3 Note that for a permutation π, the orientation convention and the fact that vertical segments cross over horizontal in G π make the result of removing a crossing always appear the same (see Figure 5).A consequence is that, for any Seifert circle of G π , above the diagonal it is (weakly) increasing in the vertical and horizontal directions; below the diagonal it is decreasing in the vertical and horizontal directions.Thus, there is exactly one upper-right corner and one lower-left corner on each Seifert circle.That is, s(G π ) equals the number of Seifert circles from the algorithm.The Euler characteristic of a surface F may be defined via a triangulation of the surface (see [11, pg. 85-87] for a brief, but informative, introduction to triangulations of surfaces).If a triangulation of F has v vertices, e edges, and f faces, the Euler characteristic is χ(F ) = v − e + f .While the Euler characteristic of F may be computed this way, it is an invariant of F and is independent of choice of triangulation.
To define the Euler characteristic of a link, we consider orientable surfaces having the link as boundary.Were we to allow for any such surface, then the Euler characteristic could be arbitrarily increased by adding a separate surface component that is a sphere (and has no boundary).To avoid this pitfall, but still allow for disconnected surfaces, we require that every surface component have a non-empty boundary.Definition 2.2.We say that an orientable surface F is a (potentially disconnected) Seifert surface of an oriented link L if every component of F has non-empty boundary and the boundary of F (with induced orientation) agrees with L. The Euler characteristic of L, written χ(L) is the maximal Euler characteristic of a Seifert surface of L.
A triangulation of F π may be chosen so that there is an edge corresponding to each paired arc where the half-twisted bands were attached to a disk of a Seifert circle.Note that a disk has Euler characteristic equal to 1.By choosing the triangulation to be such 3 For the sake of clarity, we highlight the difference between components of a diagram Gπ and the link components of Lπ ⊂ R 3 .For example, the diagrams depicted in Figure 6 each have a single connected component; however, the associated link has 3 link components.
that each of the half-twisted bands consists of exactly two triangles in the triangulation (sharing one "diagonal" edge in the interior of the band), one may check that ( There is a relationship between grid diagrams and Legendrian links that is often exploited in the knot theory (and Legendrian knot theory) literature.We use this relationship to see that F π has maximum Euler characteristic among Seifert surfaces of L π .
Proof.Let G π be the grid diagram obtained by rotating G π clockwise 90 • , changing all crossings to retain that vertical strands cross over horizontal.There is a Legendrian link Λ π associated to G π which has the topological type of the mirror of L π (see [7]).One of the classical invariants of a Legendrian link Λ is the Thurston-Bennequin number tb(Λ).For the Legendrian Λ π , its value comes out as tb(Λ π ) = cr(G π ) − s(G π ).Now, by the Eliashberg-Bennequin inequality [5], we have tb(Λ π ) ≤ −χ(F ) for any surface F with Λ π as its boundary link (not allowing connected components of F to have empty boundary).Since mirroring leaves the Euler characteristic of a surface unchanged, and noting that −χ(F π ) = cr(G π ) − s(G π ), we obtain the desired result.We also obtain a different proof of Alex Woo's [12] characterization of the permutations associated to an unlink.Corollary 3.2.A permutation is associated to an unlink if and only if it is shallow as defined in [1], namely D(π) − I(π) − |π| + cyc(π) = 0.This follows directly from Theorem 1.1.In particular, our Theorem implies that a permutation is shallow if and only if −χ(L π ) = −b; this occurs exactly when each component of F π is a disk, implying L π is an unlink.Unlike the proof in [12] this approach doesn't rely on the original recursive characterization of shallow permutations given by Hadjicostas and Monico.

Lemmata
We define the direct sum of two permutations, σ ⊕ τ in the usual way, if σ is a permutation of length m 1 and τ is a permutation of length m 2 then σ ⊕ τ is a permutation of m 1 + m 2 given by Lemma 4.1.The direct sum of two permutations satisfies both Proof.It follows immediately from the definitions that both D(σ ⊕ τ ) = D(σ) + D(τ ) and I(σ ⊕ τ ) = I(σ) + I(τ ), and so the same holds for the function x.Since the component of the diagram corresponding to σ is disconnected from the component corresponding to τ , and our convention is to construct disconnected surfaces for each component of the diagram of G σ⊕τ , we find that The following lemma shows that a "translation" of a grid diagram and corresponding permutation leaves both the link type and the statistic x(π) unchanged.Lemma 4.2.For a permutation π ∈ S n , and the permutation (in one line notation) Then the link type of L π is the same as that of L π ′ and also In the terminology of grid diagrams, the grid diagrams G π and G π ′ are related by two translations (one being horizontal and the other being vertical).By viewing the grid diagram as being on a torus, identifying opposite edges of the square, the conjugation action has the result of translating each column to the right by one, and each row up by one.The original rightmost column (respectively topmost row) appears on the far left side (bottom side) of the grid afterwards (see [7] for details and Figure 6 for an example).
Proof of Lemma 4.2.It is well known ( [7]) that the translation operation on a grid diagram leaves the associated link type unchanged.It then follows that L π and L π ′ have the same link type, and (3) Thus, we need only to show that x(π) = x(π ′ ).Write out π = π 1 π 2 . . .π n in one-line notation and define a, b to be the integers such that π a = n and π n = b.We can express the permutation π ′ as π In the edge case that a = n = b, the first line, indicating the value of π ′ k+1 , 1 ≤ k ≤ n − 1, is unchanged; however, instead of the second and third line we have that π ′ 1 = 1.
in the case when a = n.If it is the case that a = n (and so b = n also) then since |π ′ 1 − 1| and |π n − n| are both zero.In order to understand how the inversions change between π and π ′ , note that if i, j ∈ {a, n}, then (π i , π j ) are in the same relative position to each other in π (i.e.whether π i is left of or right of π j in one-line notation), as the relative position of (π ′ i+1 , π ′ j+1 ) in π ′ .Since every π i = b appears to the left of π n = b in π, we get that the two elements π i , π n make an inversion if and only if π i > b, a total of (n − b) inversions in π that involve π n .After translation, π ′ 1 = b + 1 is to the left of every other element in π ′ , so it makes an inversion with π ′ i+1 if and only if b In the edge case b = n, we get that there is a net change of 0 inversions involving n (in π) and 0 involving 1 in π ′ .
We can make similar considerations for inversions that involve π a in π and π ′ a+1 = 1 in π ′ (assuming a = n).One of these, already considered above, is the inversion involving π a , π n that associate with the inversion in π ′ involving π ′ 1 , π ′ a+1 .The net change in inversions going from π to π ′ involving the elements π a or π ′ a+1 respectively is a − (n − a) = 2a − n.When a = n and b = n, we have shown that In the case that a = n (forcing b = n also), we have both D(π) = D(π ′ ) and I(π) = I(π ′ ).Hence, we obtain the desired equality x(π ′ ) = x(π).
Lemma 4.3.The Seifert circles obtained from a connected component of a cycle diagram admit a partial order under containment, and there is a unique maximal Seifert circle S max containing all of the others.Furthermore, each Seifert circle has a unique upper-right and lower-left corner, and both are on the main-diagonal.
Proof.These results are all demonstrated in the proofs of Lemma 20 and Lemma 22 (and remark 21) of [3].While the statements of these lemmas refer only to diagrams corresponding to cycles, it is straightforward to see that all of the arguments go through identically for any connected component of a diagram.
We say that a permutation π stabilizes an interval I if π(i) ∈ I for every i ∈ I. Proof.It follows immediately that if π stabilizes an interval I, then a square drawn to encompass the points on the diagonal corresponding to the integers in I will disconnect the components of the diagram of π.So we focus on the reverse direction.
Suppose that the diagram of π is disconnected.This occurs if and only if there is a simple closed curve in the plane, not intersecting any point on G π , which separates the diagram into two (non-empty) sub-diagrams -one in the interior, the other in the exterior of the closed curve.Call these sub-diagrams G π .Note that the diagonal nodes {1, . . ., |π|} are split into two subsets s (1) (π) and s (2) π corresponds to an interval we are done, so suppose it does not, and let n 1 , n 2 ∈ s (1) π be the smallest pair of integers such that n 2 > n 1 + 1 and the entire interval π .If π stabilizes I, then again we are done.So we now suppose it does not and derive a contradiction, which will complete the proof.
If π does not stabilize I, then for some i ∈ I, π(i) / ∈ I, and hence, π(i) > n 2 (by the minimality of n 1 , n 2 ).Note that since the vertical line segment in G (2) π that extends upward from i, extends above height n 2 , we have π −1 (n 2 ) > i (otherwise, i and n 2 could not be in disconnected sub-diagrams, as the horizontal segment of G (1) π that is at height n 2 would intersect the vertical one extending upward from i).Thus π −1 (n 2 ) > n 2 .Similarly, there must be j > n 2 with π(j) ∈ I, and so, in order to avoid a crossing it must be that π(n 2 ) > n 2 .Thus, we find that the line segments adjacent to the point (n 2 , n 2 ) form a lower-left corner of some Seifert circle S 1 .
Appealing to Lemma 4.3, each Seifert circle has a unique lower-left and upper-right corner (both of which lie on the main diagonal).We find that S 1 must lie completely inside the Seifert circle S 2 that contains the line segments connected to the point (i, π i ) (whose lower left corner must have x-coordinate at most i < n 2 , and whose upper right corner has y-coordinate at least π i > n 2 ).Since the line segments connected to (i, π , all of the line segments that were used to create S 2 must also be part of G π .However, they completely surround the point (n 2 , n 2 ), disconnecting it from the diagonal points at or below n 1 , which is not possible with G 4.1.Non-split links and stabilized-interval-free permutations.Callan [2] defined a permutation π to be stabilized-interval-free if there is no nontrivial interval I ⊂ {1, 2, . . .|π|} stabilized by π.He then showed that such permutations are enumerated by sequence A075834 in the OEIS [8], the integer sequence whose generating function A(x) has the property that the coefficient of x n−1 in A(x) n is n!.
Theorem 1.4, that the permutations whose diagrams correspond to non-split links are precisely the stabilized-interval-free permutations, follows from Lemma 4.4 and Proposition 2.1.
Since the n-th term in the sequence A075834 is asymptotically n! e 1 − 1/n + O(n −2 ) , which is almost the same as that of the derangements (whose count is n! e + O(1)), and of which the stabilized-interval-free permutations are a subset, we find that the probability a randomly chosen derangement of n corresponds to a non-split link tends to 1 as n → ∞, as noted in Corollary 1.5.

Proof of Theorem 1.1
We will prove that x(π) = −χ(L π ) by induction on the length of the permutation, |π|.
An interesting problem would be to find a non-inductive proof of this theorem.
For permutations of length at most 2, the result is immediate: in every case the corresponding link L π is an unlink.(When π = 1 or π = 21, the permutation has a single cycle, the link has a single component, and x(π) = −χ(L π ) = −1.When π = 12 the permutation and link have 2 cycles/components, and x(π) = −χ(L π ) = −2.
We now suppose that the result holds for permutations of all lengths less than n and that |π| = n > 2. For any permutation of length n one of the following cases hold: The diagram G π is connected but there exists an index 1 < i < n such that either π j ≤ i for all j < i or π j ≥ i for all j > i.(In this situation the outermost Seifert circle touches the main diagonal at the index i.) • Case 3: The diagram G π is connected and no index with the property described in case 2 exists.(The outermost Seifert circle doesn't touch the main diagonal, except at the bottom left and upper right corners.) In each case we will see that the result can be reduced to the case of permutations of smaller length, which will complete the induction.
In this case, by Lemma 4.4, there exists a nontrivial subinterval I ⊂ [1, n] so that π stabilizes I.By repeated application of Lemma 4.2 (if necessary) we can translate the grid diagram of π to the grid diagram of another permutation π ′ (with x(π) = x(π ′ ) and −χ(L π ) = −χ(L π ′ )) such that the interval I has been translated to an interval, stabilized by π ′ , of the form [a, n] for some integer a.Now, it is clear that π ′ also stabilizes the complementary interval [1, a − 1] and so π ′ decomposes as a direct sum π ′ = ρ ⊕ τ .Since both ρ and τ are permutations of length shorter than |π|, we are done by Lemma 4.1 and induction.

Case 2.
The diagram G π is connected and there is an index 1 < i < n such that either π j ≤ i for all j < i or π j ≥ i for all j > i.
We consider the case π j ≤ i for all j < i, the other case being similar.Let L be a horizontal line drawn across G π at y = i + 1  2 .Since G π is connected, with components both above and below this horizontal line, it must contain vertical line segments crossing L. These vertical line segments must correspond to indices j where j and π j lie on opposite sides of the value i+ 1  2 .Furthermore, as π is a permutation, there must be an equal number of indices j < i + 1 2 with π j > i + 1 2 as there are j > i + 1 2 with π j < i + 1 2 .Given our hypothesis that π j ≤ i for all j < i, there exists precisely one index j that can satisfy the former property, namely j = i.Hence there exists also exactly one index k > i with π k < i + 1  2 .Thus the diagram G π crosses L twice, once at i and again at k. (Note that both of these line segments must be part of the outermost Seifert circle, S max , and that S max therefore "touches" the diagonal at the point (i, i).)We now produce a permutation π ′ , of length n+1, whose associated link corresponds to cutting the strands along the line L and reattaching the two loose ends on either side.
This new permutation Using that G π intersects L only at the vertical lines in positions i and k, it is not hard to check that D(π ′ ) = D(π) and I(π ′ ) = I(π).For example, the construction makes clear that if an inversion in π is at elements that are both in positions less than i, or that both have positions greater than i, then there is a corresponding inversion in π ′ (involving the same positions in the first case, and positions that are shifted by 1 in the latter case).An inversion in π that involves positions i and j, for j > i, corresponds to an inversion in π ′ involving i + 1 and j + 1; in addition, inversions involving j, for some j < i, and position k correspond to inversions in π ′ at positions j and i.
Since Recall that part of the surface F π is a disk in a horizontal plane of R 3 , having S max as its boundary.Viewing L as being contained in that plane, the surface F π ′ is homeomorphic to the result of cutting F π along the line L. Consequently, the Euler characteristic changes as χ(F π ′ ) = χ(F π ) + 1 (there is a triangulation so that the cut is along one edge between two vertices on the boundary of the surface, cf. Figure 8; cutting can be seen to duplicate the edge and the two vertices).Thus, the desired equality holds for π if and only if it holds for π ′ .Since G π ′ is not connected, the argument from Case 1 allows us to decompose π ′ as ρ ⊕ τ .Additionally, π ′ cannot have a fixed point.This implies that the length of ρ and the length of τ are at most two less than |π ′ |; that is, max{|ρ|, |τ |} ≤ n − 1.

Case 3.
The diagram G π is connected and no index with the property described in Case 2 exists.
In this case, we construct a new permutation π ′ with |π ′ | = |π| − 2. As we will see, the key observation is that all of the line segments occurring in the cycle diagram of this new permutation π ′ are also present in the cycle diagram of π, but all of those line segments in G π corresponding to the outermost Seifert circle have been removed.Furthermore, we will see that π ′ has the property that x(π ′ ) = −χ(F π ′ ) if and only if x(π) = −χ(F π ).
Some preliminaries are needed in order to define π ′ and prove that it has the desired property.First, as in Case 2, the connected diagram G π has a unique maximal Seifert circle S max .To define π ′ we need first to identify the columns in the diagram where S max has vertical line segments.These columns will necessarily be indexed by 1, n, and every column in which G π has a crossing that creates a part of the Seifert circle S max .Say that there are a such crossings that are above the diagonal and b such crossings that are below the diagonal.
Write i 1 < i 2 < • • • < i a for those columns where S max has a crossing above the diagonal.On the other side, write j 1 > j 2 > • • • > j b be the columns where S max has a crossing below the diagonal, written in decreasing order.Finally, define i 0 = 1 = j b+1 and i a+1 = n = j 0 .
Notice, by the hypothesis of Case 3 that no index with the property described in Case 2 exists, it is necessary that the outermost Seifert circle S max touches the main diagonal only at (1, 1) and (n, n), and so every vertical line segment of S max is in one of the columns indexed above.Thus, it must be that π ia = n and π j b = 1.Now, we define an intermediate permutation π ), using cycle notation.Alternatively, the construction of π can be made as follows.Beginning from the one-line notation π = π 1 π 2 . . .π n : move π 1 into position i 1 , then move π i 1 into S max Note that |π| = |π| and that π fixes both 1 and n.The permutation π ′ , used in the induction, is the permutation such that π = id 1 ⊕ π ′ ⊕ id 1 (where id 1 is the identity permutation on one element), and can be obtained from π by setting π ′ k = πk+1 − 1 for 1 ≤ k ≤ n − 2. Note, the link type of L π ′ is generally different than the link type of L π .
As mentioned above, we have the following relationship between the Seifert circles of G π and those of G π ′ , the verification of which is left to the reader.
Lemma 5.1.The diagram G π ′ is the result of removing S max from G π (after only smoothing the crossings on S max ).
Setting c = a + b, so that c is the number of crossings of G π on S max , we see that G π ′ has exactly c fewer crossings than G π .It also has exactly one less upper right corner, the one from S max .Since −χ(F π ) may be determined (2) as the number of crossings of G π minus the number of upper right corners of G π (and likewise for π ′ ), we get that −χ(F π ) + χ(F π ′ ) = c − 1.
We may finish Case 3, and so complete the proof of Theorem 1.1, by showing that x(π) − x(π ′ ) = c − 1.The remainder of the paper is devoted to doing just this, with the bulk of that effort focused on understanding how inversions in π compare to those in π ′ .

Figure 1 .
Figure 1.The cycle diagram of the cycle 452613 along with the associated knot, a trefoil.

Figure 4 .
Figure 4.A band is attached with a half-twist; diagonal pattern represents the opposite side of the surface.

Figure 5 .
Figure 5.The grid diagram obtained from the permutation 68517324 and the Seifert circles obtained from the link diagram, with orientation indicated by arrows.The circles surround each of the removed crossings.

3 .Corollary 3 . 1 .
Proof of Corollary 1.2 From the classification of surfaces, a connected surface with one boundary component has Euler characteristic at most 1 (and a connected surface with more than one boundary component has Euler characteristic less than 1).Let F be an oriented surface with b boundary components, such that every surface component has non-empty boundary.Since χ(F ) equals the sum of the Euler characteristics of the connected components of F , we have that χ(F ) ≤ b.Given a permutation π, if b is the number of cycles of π then b is also the number of link components in L π .This provides a new proof of the Diaconis-Graham inequality.Given any permutation π, I(π) + T (π) = I(π) + |π| − cyc(π) ≤ D(π).Proof.By Theorem 1.1, D(π) − I(π) − |π| + cyc(π) = −χ(F π ) + b ≥ 0 since b = cyc(π) counts both the number of boundary components of the surface F π and the number of cycles appearing in π.

Lemma 4 . 4 .
The diagram G π of a permutation π is disconnected (i.e. the union of any fixed points, vertical and horizontal segments of the diagram is disconnected as a subset of the plane) if and only if the permutation π stabilizes a nontrivial subinterval I ⊂ [1, n].

LFigure 7 .
Figure 7.The cycle diagram of π = 541298637 along with the line L corresponding to the index i = 5 satisfying the defining property of Case 2. To the right is the permutation π ′ obtained after "cutting" along L.

Figure 8 .
Figure 8. Cutting F π along L: Let A, B be the points where L intersects the boundary of the surface.A subdivision of a given triangulation will have A and B as vertices.Remove all edges that intersect L, and vertices (other than A and B) that intersect L as well as their incident edges.What remains is a continuous image of a polygon with L as a secant from one vertex to another.Triangulate this polygon with edges emanating only from A and B.