The Combinatorics of $\mathsf{A_2}$-webs

The nonelliptic $\mathsf{A_2}$-webs with $k$"$+$"s on the top boundary and $3n-2k$"$-$"s on the bottom boundary combinatorially model the space $\mathsf{Hom}_{\mathfrak{sl}_3}(\mathsf{V}^{\otimes (3n-2k)}, \mathsf{V}^{\otimes k})$ of $\mathfrak{sl}_3$-module maps on tensor powers of the natural $3$-dimensional $\mathfrak{sl}_3$-module $\mathsf{V}$, and they have connections with the combinatorics of Springer varieties. Petersen, Pylyavskyy, and Rhodes showed that the set of such $\mathsf{A_2}$-webs and the set of semistandard tableaux of shape $(3^n)$ and type $\{1^2,\dots,k^2,k+1,\dots, 3n-k\}$ have the same cardinalities. In this work, we use the $\sf{m}$-diagrams introduced by Tymoczko and the Robinson-Schensted correspondence to construct an explicit bijection, different from the one given by Russell, between these two sets. In establishing our result, we show that the pair of standard tableaux constructed using the notion of path depth is the same as the pair constructed from applying the Robinson-Schensted correspondence to a $3\,2\,1$-avoiding permutation. We also obtain a bijection between such pairs of standard tableaux and Westbury's $\mathsf{A_2}$ flow diagrams.

have the same cardinalities. In this work, we use the m-diagrams introduced by Tymoczko and the Robinson-Schensted correspondence to construct an explicit bijection, different from the one given by Russell, between these two sets. In establishing our result, we show that the pair of standard tableaux constructed using the notion of path depth is the same as the pair constructed from applying the Robinson-Schensted correspondence to a 3 2 1-avoiding permutation. We also obtain a bijection between such pairs of standard tableaux and Westbury's A 2 flow diagrams.

Introduction
Combinatorial spiders can be used to describe the space of invariants of tensor products of irreducible representations for Lie algebras and their quantum analogues. Kuperberg [K] gave a description of the spiders for types A 1 , A 2 , B 2 , G 2 using certain combinatorial graphs called webs. In this paper, we will focus on webs of type A 2 .
An A 2 -web is a directed graph such that (1) vertices on a boundary line have degree one; (2) internal vertices are trivalent; and (3) each vertex is either a sink (all its edges are directed inward) or a source (all its edges are directed outward). A boundary vertex that is a sink corresponds to the natural three-dimensional module V for sl 3 or U q (sl 3 ) and carries a label "+"; while a boundary vertex that is a source corresponds to the dual module V * and is labeled "−". An A 2 -web is said to be nonelliptic if each interior face is bounded by at least six edges.
Let λ = (λ 1 ≥ λ 2 ≥ ⋯ ≥ λ ≥ 0) ⊢ d be a partition of the integer d. The corresponding Young diagram is a left-justified array with λ 1 boxes in the first row, λ 2 boxes in the second row, and so forth. A standard tableau of shape λ is a filling of the Young diagram with d distinct positive integers in such a way that the entries in the boxes increase left to right across each row and from top to bottom down each column. Let n 1 < n 2 < ⋯ < n r be positive integers. A semistandard tableau of shape λ and type {n 1 a 1 , n 2 a 2 , . . . , n r ar } such that ∑ r i=1 a i = d is a filling of the boxes of λ with a 1 entries n 1 , a 2 entries n 2 etc., so that the entries in the boxes weakly increase left to right across the rows and strictly increase from top to bottom down each column. Petersen-Pylyavskyy-Rhoades [PPR] re-interpreted Kuperberg's result [K,Thm. 6.1] on the dimension of the space of invariants (i.e. the number of A 2 -webs) in terms of semistandard tableaux of a particular shape and type.
In [T], Tymoczko gave a bijective proof of Theorem 1.1 for the case k = 0 by exhibiting an explicit bijection between the set of standard tableaux of shape (3 n ) and the set of nonelliptic A 2 -webs which have 3n "−"s on the boundary. Her approach introduces the notion of an m-diagram. An mdiagram on n vertices consists of a boundary line labeled with the numbers 1, 2, . . . , n, together with a collection of arcs drawn above it. For a given standard tableau T of shape (3 n ), Tymoczko associates an m-diagram to T by the following algorithm: Algorithm 1.2. (1) Take the conjugate of T (transpose the rows and columns) to obtain a standard tableau T t of shape (n, n, n).
(2) Starting with the bottom row of T t , read the entries of T t from left to right across the rows. If is an entry in this reading, connect vertex to vertex j on the boundary line of the m-diagram with an arc, where j is the largest number less than in the row immediately above the row with that has not already been connected with an arc. After finishing with the bottom row, move to the entries in the second row of T t and repeat the same procedure. . Starting with 5 in the bottom row, connect it to 4, and then connect 6 to 3. Moving to the second row, begin with 3 and connect it to 2, since 2 is the largest entry less than 3 in the first row. Finally, connect 4 and 1. The resulting m-diagram associated to T is The next step of Tymoczko's procedure is to replace vertices in the mdiagram with certain configurations as pictured below.
This is called trivalizing in [T], because vertices off the boundary become trivalent by this process. For Example 1.3 above, the corresponding A 2 -web is In [Ru], Russell exhibited a bijection between the set of semistandard tableaux of shape (3, 3, . . .) = (3 n ) and type {1 2 , . . . , k 2 , k + 1, . . . , 3n − k} and the nonelliptic A 2 -webs with one boundary line having k "−" vertices and 3n − 2k "+" vertices for arbitrary k such that 2k ≤ 3n. In this paper, we demonstrate an explicit bijection between the set of such semistandard tableaux and the nonelliptic A 2 -webs having k "+" vertices on the top boundary line and 3n − 2k "−" vertices on the bottom boundary line. Such webs combinatorially model the space Hom sl 3 (V ⊗(3n−2k) , V ⊗k ). Several noteworthy special cases are when k = 0, which corresponds to the space Hom sl 3 (V ⊗3n , C) = Inv(V ⊗3n ) of sl 3 -invariants in V ⊗3n , and when n = k, which corresponds to the centralizer algebra End sl 3 (V ⊗k ) of the sl 3 -action on the tensor space V ⊗k .
Our approach uses classical results from the representation theory of the symmetric group S such as the well-known Robinson-Schensted correspondence (RS correspondence). That the representation theory of S plays an essential role is no surprise, as S is closely related with the representation theory and invariant theory of the general linear and special linear groups via Schur-Weyl duality. Another example of the connection with the RS correspondence can be found in [HRT].
The RS correspondence (see for example, [S,Sec. 3.1] or [W]) is a bijection between permutations and ordered pairs of standard tableaux of the same shape, consisting of an insertion tableau and a recording tableau. Here, we reverse the order of the standard tableaux in the pair, so that a permutation σ corresponds to (R, Q), where R is the recording tableau and Q is the insertion tableau. This switch is simply a notational convenience for when we show in what follows that the pair of standard tableaux constructed using the notion of path depth is the same as the pair (R, Q).
For example, suppose σ = 1 2 3 4 5 4 2 1 5 3 . The tableau Q is created by inserting the numbers 4 2 1 5 3 in succession, and R is created by recording where the new box has been added to Q at each step. In the insertion process, a number x is adjoined to the right-hand end of first row of Q unless that violates the "standard" property. When a violation occurs, the smallest y in the row such that x < y is bumped to the next row, and x is placed in the position vacated by y. The insertion-bumping process then continues with y until a number is adjoined to the end of a row in the tableau. For σ, the steps to construct (R, Q) are as follows: In Section 2, we review basic definitions related to A 2 -webs and their connections with centralizer algebras of the sl 3 -action on tensor products. In Section 3, we construct a map Φ from semistandard tableaux to A 2 -webs, and then prove in Section 4 that the webs are nonelliptic. The results on 3 2 1avoiding permutations in Section 5 are used in Section 6 to show that Φ is indeed a bijection. In Section 7, we illustrate how Westbury's flow diagrams provide a different bijection, which avoids using the RS correspondence. We obtained this alternate bijection after submitting the first version of this paper, and thank Heather Russell for bringing [We] to our attention.
We note that the result on shuffle and join obtained in [Ru,Thm. 3] as an application of Russell's bijection can be proved using our bijection also, although we do not include that proof here.

A -webs and centralizer algebras
The A 2 -spider category introduced by Kuperberg in [K] describes the invariants of tensor products of copies of the natural 3-dimensional representation V + = V of the complex Lie algebra sl 3 and its dual representation V − = V * . A tensor product of copies of V + and V − corresponds to a string s = s 1 ⋯s n of symbols + and −, and we write The objects in the A 2 -spider category are finite strings of + and − signs, including the empty string. The morphisms of the A 2 -spider category are A 2 -webs. An A 2 -web is defined combinatorially as a directed graph with a boundary labeled by the sign string s = s 1 ⋯s n so that 1. vertices on the boundary have degree one and are labeled by the components of s in a counterclockwise fashion; 2. internal vertices are trivalent; and 3. each vertex is either a sink (all its edges are directed inward) or a source (all its edges are directed outward).
Such an A 2 -web is said to be nonelliptic if each interior face is bounded by at least six edges. The following is an example of nonelliptic A 2 -web with boundary s = − − − + − + −: No distinction is made between two diagrams that are the same up to rotation. Let B(s) denote the set of nonelliptic A 2 -webs with boundary condition s. The vector space of formal linear combinations of B(s) is the A 2 -web space W(s).
Theorem 2.1. ( [K,Thm. 6.1]) Assume s is a sign string. Then the vector spaces W(s) and Inv(V s ) have the same dimensions.
Consider the special case that s consists of k minuses followed by k pluses, The above theorem implies that we may label a basis of the centralizer algebra Z k = End sl 3 (V ⊗k ) by nonelliptic A 2 -webs that have a bottom row of k minus signs and a top row of k plus signs. For example, is an element in Z 5 . Multiplication of A 2 -webs is governed by the following rules: For example, The product of and is computed by placing the first graph above the second and concatenating the diagrams using the rules above: The thick edge indicates the portion of the web to which the rule is applied. The symmetric group S k acts on V ⊗k by permuting the tensor factors, and this action commutes with the action of sl 3 . Classical Schur-Weyl duality says that there is an epimorphism CS k → End sl 3 (V ⊗k ) = Z k and that the kernel of this map is the ideal generated by the Young symmetrizer ∑ σ (−1) σ σ, where the sum is over the permutations σ of {1, 2, 3, 4}.
The transpositions s i = (ii+1) for i = 1, . . . , k −1 generate S k . We let f i for 1 ≤ i < k, denote the image of id − s i in Z k . Then, the elements f i , 1 ≤ i < k, generate Z k , and they satisfy the following relations:
Remark 3.2. The theorem above has a number of applications; for example, it can be used to prove results about representations. We illustrate this with one quick example. Recall that the finite-dimensional irreducible representations V(λ) of the complex special linear Lie algebra sl k are indexed by partitions λ with at most k parts (i.e. k rows). The irreducible representations S µ k of the symmetric group S k are labeled by partitions µ of k and have a basis indexed by the standard tableaux of shape µ with entries {1, . . . , k}. Now V(λ) decomposes into weight spaces (common eigenspaces) relative to the diagonal matrices in sl k , and the weight space corresponding to a 1 ε 1 + ⋯ + a k ε k (where ε i projects a diagonal matrix onto its (i, i)-entry) has a basis indexed by the semistandard tableaux of shape λ and type {1 a 1 , 2 a 2 , . . . , k a k }. Because matrices in sl k have zero trace, ε 1 + ⋯ + ε k = 0 on sl k , and the weight 0 corresponds to the semistandard tableaux of type {1 a , 2 a , . . . , k a }, where each entry occurs with the same multiplicity. Thus, if 0 is a weight of V(λ), then λ ⊢ ak is a multiple of k. The converse holds as well, which can be seen by filling the boxes of λ ⊢ ak with 1, . . . , 1 a , 2, . . . , 2 a , . . . , k, . . . , k a in order, starting with the first row of λ and moving left to right across the rows from top to bottom. In particular, if λ is a partition of (n − 1)k, for some n ≥ 2, and λ ⊆ (n k ), then λ c is a partition of k. The zero weight space V(λ) 0 of V(λ) has a basis indexed by the semistandard tableaux of type {1 n−1 , 2 n−1 , . . . , k n−1 }. Since the standard tableaux of shape (λ c ) t are in one-to-one correspondence with the standard tableaux of shape λ c , which give a basis for the irreducible S k -module S λ c k , we have the following consequence of the bijection in Theorem 3.1 under these assumptions: is the product of the hook-lengths of the boxes in λ c .
The last equality comes from the well-known hook-length formula that gives dimensions of the irreducible S k -modules (see e.g. [S,Thm. 3.10.2]).

Semistandard tableaux and A 2 -webs
The bijection we define consists of a sequence of elementary steps, which we illustrate by a running example.
Step 5. Assign a pair (T + ◻ , T + ◇ ) to T + by the following procedure: Let 1 < ⋯ < λ 3 be the entries in the third row of T + . Do the following steps in order to create the tableaux T + ◻ and T + ◇ : (I) Place 1 . . . , λ 3 from left to right across the third row of T + ◻ . (II) For p = 1, . . . , λ 3 , let j p be the largest entry in the second row of T + less than p , such that j p is different from j 1 , . . . , j p−1 when p > 1. Place j 1 , . . . , j λ 3 in the second row of T + ◻ so that they are increasing from left to right across the row.
(III) For p = 1, . . . , λ 3 , let i p be the largest entry in the first row of T + less than j p , such that i p is different from i 1 , . . . , i p−1 when p > 1. Place i 1 , . . . , i λ 3 in the first row of T + ◻ so that they are increasing from left to right across the row.
(IV) Shift the remaining entries in each row of the tableau T + to the left to form the tableau T + ◇ . The shape of T + ◻ is (λ 3 , λ 3 , λ 3 ), and the shape of T + ◇ is the two-rowed By its construction, T + ◻ is a standard tableau. To verify that T + ◇ is standard, it suffices to show that if a is the (1, s)-entry and b is the (2, t)-entry of T + , and they are in the same column of T + ◇ , then s ≤ t. Assume the contrary, that s > t. Since a is immediately above b in the same column of T + ◇ and s > t, there must be a pair (i p , j p ) from Step 5 above with i p to the left of a and j p to the right of b in T + , such that a < j p . However, this contradicts the way i p was chosen in Step 5. So, we conclude that T + ◇ is a standard tableau.
Step 6. Perform (2) of Algorithm 1.2 with T + ◻ to get an m-diagram M + and then trivalize the vertices to obtain an A 2 -web W + whose boundary has k "+"s on the top: Step 7. Apply Step 5 to T − , to obtain T − ◻ and T − ◇ : Step 8. Apply Step 6 to T − ◻ to obtain an m-diagram M − and an A 2 -web W − whose boundary has 3n − 2k "−"s on the bottom: Step 9. If {α 1 < ⋅ ⋅ ⋅ < α } are the entries of T + ◇ , and {β 1 < ⋅ ⋅ ⋅ < β } are the entries of T − ◇ , replace each α i and each β i by i to produce a pair of standard tableaux with entries in {1, . . . , }. Then perform the inverse of the Robinson-Schensted correspondence on the pair to get a permutation σ in S : Step 10. For each i = 1, . . . , , connect vertex α i on the top row to vertex β σ(i) on bottom row (which we refer to as isolated vertices) according to the following rule: The path from α i to β σ(i) should stay within the open region R o between the two webs W + and W − and cross the smallest number of arcs in W + and W − . After these paths are drawn, let Φ * (T) be the resulting diagram.
Step 11. Trivalize the vertices as described in Section 1 to produce an A 2 -web Φ(T): Our aim is to show the following: is a bijection between the set of semistandard tableaux T of shape (3 n ) and type {1 2 , . . . , k 2 , k + 1, . . . , 3n − k} and the set of nonelliptic A 2 -webs with k "+"s on the top boundary and 3n − 2k "−"s on the bottom boundary.
We close this section with some comments and a result we will use later.
Recall that a permutation σ ∈ S is 3 2 1-avoiding if there do not exist It is well known that the RS correspondence gives a bijection between the set of 3 2 1-avoiding permutations in S and the set of pairs of tableaux of shape λ for some partition λ of , whose length is less than or equal to 2 (see for example, [Wi]). Because the tableaux T + ◇ and T − ◇ above are of the same shape and have at most 2 rows, the permutation obtained in Step 9 will be 3 2 1-avoiding. The steps above construct an A 2 -web having k "+"s on the top boundary and 3n − 2k "−"s on the bottom boundary. The top and bottom boundaries have the same number of isolated vertices, and the 3 2 1-avoiding permutation σ prescribes how to connect the isolated vertices on the top boundary to those on the bottom boundary. Therefore, we have the following corollary: Corollary 3.5. Assume T is a semistandard tableau as in Theorem 3.4. Then Steps 1-10 above associate to T a triple (M + , M − , σ), where M + is an m-diagram with k "+"s on the top boundary, M − is an m-diagram with 3n−2k "−"s on the bottom boundary, and σ is a 3 2 1-avoiding permutation.
The notions of circle depth and path depth from [T] will enable us to prove Theorem 3.4. The faces (regions) determined by an m-diagram M and its trivalization W are the same.
Definition 3.6. Suppose M is an m-diagram that lies above a horizontal boundary line, and let W be its trivalization. Let x be a point lying on a face of M (or W).
• The circle depth of x, denoted d c (x), is the number of semicircles in M that lie above x.
• The path depth of x, denoted d p (x), is the minimal number of edges in W crossed by any path from x to the unbounded region f ∞ that lies above the boundary line.
In particular, any point in f ∞ has circle depth and path depth equal to 0.
The following result can be found in [T]. In the following example, the numbers indicate path (circle) depths, which are the same for all interior points in a given face. Remark 3.8. Because of this result, the only time we will need to make a distinction between an m-diagram and its trivalization is when we show the nonelliptic property.

Φ(T) is a nonelliptic A 2 -web
We fix two positive integers k and n such that 2k ≤ 3n for all arguments in what follows. Let T be a semistandard tableau of shape (3 n ) and type {1 2 , . . . , k 2 , k + 1, . . . , 3n − k}, and assume Φ(T) is the A 2 -web obtained by applying the algorithm given in the previous section. Although the process certainly defines an A 2 -web, it is not readily apparent that Φ(T) is nonelliptic.
We give a proof that Φ(T) is nonelliptic in this section. We will use the notation from the steps in Section 3 that created Φ(T). In particular, M + and M − are the m-diagrams produced from 3-rowed standard tableaux in Steps 6 and 8, respectively.
In Algorithm 1.2, an entry in the third row of a tableau is connected to an entry j in the second row, and j is connected to an entry i in the first row. We refer to the union of the arcs connecting with j and j with i as an m-configuration. Thus, the m-diagrams considered here are collections of m-configurations.  Proof. Assume m has vertices labeled i < j < . Since v is an isolated vertex, a lies in either the first or second row of T − . If v is in m R , then a is greater than j, so it must lie in the first row of T − by the way j was chosen. Similarly, if v is in m L , then a is greater than i and less than j, so it must lie in the second row of T − by the way i was chosen.  Proof. Due to Proposition 3.7, there exists a shortest path from v to R o , and such a path is determined by the circle depth of v. The path moves from one face of M − to another so that the circle depth is strictly decreased. Therefore, if there is only one choice of direction for moving, the shortest path must be unique. There is only one choice by Corollary 4.3, because there can be no isolated vertices in the shaded regions of figures IV and V of Lemma 4.1, since those regions lie inside both a right semicircle and a left semicircle.
Proof. For both (i) and (ii), we present the proof only for the case M + .
(i) Assume v 1 and v 2 lie inside one semicircle. Then they are in either m L or m R of an m-configuration of M + . Therefore, a and b must be on the same row of T + ◇ . Suppose that a and b are in the second row of T + ◇ , and suppose on the contrary that σ (i(a)) > σ (i(b)). Consider the RS correspondence applied to . Since a is in the second row of T + ◇ , there is a bump when we insert σ(i(a)). So there exists an x with x < i(a), σ(x) > σ (i(a)). Thus, we have x < i(a) < i(b) and σ(x) > σ (i(a)) > σ ((i(b)). This contradicts the fact that σ is 3 2 1-avoiding.
Suppose that a and b are in the first row of T + ◇ , that is, v 1 and v 2 are in the right semicircle m R . Let i < j < k be the three vertex labels of m, so that j < a < b < k. We again assume that σ (i(a)) > σ (i(b)). Note that, when we insert σ (i(a)), there is no bump, since a is in the first row of T + ◇ . Then, since b is in the first row, there is no bump when we insert σ (i(b)) also. But σ (i(a)) > σ (i(b)). Hence, σ (i(a)) must be bumped down to second row before inserting σ (i(b)). Therefore, there exists x with i(a) < x < i(b) and i −1 (x) is in the second row of T + ◇ . This is impossible by the way j was chosen since j < x < k.
(ii) If v 1 is inside m 1 L and v 2 is inside m 2 R , then a is in the second row of T + ◇ and b is in the first row of T + ◇ . Suppose on the contrary that σ (i(a)) > σ (i(b)). Since a is in the second row, there is a bump when we insert σ (i(a)) while applying the RS correspondence to σ. So there exists an x with x < i(a) and σ(x) > σ (i(a)). Then, x < i(a) < i(b) and σ(x) > σ (i(a)) > σ (i(b)). This contradicts the 3 2 1-avoiding property of σ.
Lemma 4.6. Let R be a bounded region in Φ * (T), where Φ * (T) is as in Step 10 of Section 3. Suppose that there is a point of crossing (which has not yet been trivalized) on the boundary of R such that a directed edge on the boundary is moving toward the point, and the other directed edge on the boundary is moving away from the point. Then when we trivalize the crossing, there will be one more boundary edge added to the boundary of R.
Proof. This is clear from the definition of trivalizing: → . (4.7) The following proposition completes the proof that Φ(T) in Theorem 3.4 is a nonelliptic A 2 -web.
Proof. Let R be a bounded, internal region of Φ * (T), and let R o be the open region between the A 2 -webs W + and W − of Φ * (T), as in Step 10 of Section 3. After trivalization has taken place, internal regions are bounded by an even number of edges, since sink and source vertices alternate along the boundary of internal faces. Hence, if R has more than four boundary edges in Φ * (T), then after trivalization, R is bounded by at least six edges. So we may restrict our attention to the case that R is bounded by either three or four edges. We know from the work of Tymoczko [T], that W + and W − (as A 2 -webs) have no internal regions with four edges. Therefore, we may suppose that R has at least one edge coming from a vertical line. At this juncture, we break our considerations into several cases.

Case 1: R is not contained in R o
We treat only the W − case, since every argument can be translated to W + by reversing the arrows on the directed edges.
Since there are no crossings between vertical lines outside R o , there must be a part of the vertical line passing two semicircular arcs of W − ; let them be m 1 • and m 2 • so that the vertical line passes m 1 first in going from bottom to top, where • is either R or L. By Corollary 4.3 and Lemma 4.1, we see that m 1 • and m 2 • do not intersect each other.
Hence, there must be another arc (part of a vertical line or a semicircle).
Since the direction of every arc in W − is upward, before trivalization there will be at least one point (of crossing) such that one edge on the boundary of R is moving from the point while the other is toward the point. This crossing point is indicated by C in the illustrations above. Therefore, as in (4.7), at least one more boundary edge will be added to R upon trivalizing, so there will be at least six edges on the boundary of R in Φ(T).
Case 2: R is contained in R o .
• The boundary edges of R are all from vertical lines: Since the permutation σ in Step 9 is 3 2 1-avoiding, there cannot be a bounded region with three sides. But when R is bounded by four edges, then since every vertical line moves upward, trivalizing crossings will add at least one more edge (see (4.7)).
• There are boundary edges of R from just one of the webs W + or W − : Assume that R has an boundary edge a from W + . Then a must be a connected arc. If a is a part of a semicircle, then there must be two vertical lines on the boundary of R that pass through the semicircle. By Lemma 4.5, these two vertical lines do not make a crossing, and there must be at least one more vertical line on the boundary of R. If there are at least two more vertical lines, then R will clearly have at least five edges (four from the four vertical lines and the edge a), and after trivalizing the crossings, R has at least six edges.

R a
If there is only one more vertical line on the boundary of R, then since every line is moving upward, the crossings of two lines on the boundary of R will make another edge when we trivalize the crossings, due to Lemma 4.6.
R a Now we consider the case that there are at least two semicircles whose subarcs are in a. Assume 1 (resp. 2 ) is a vertical line on the boundary of R which is connected to a top vertex, and let m 1 * (resp. m 2 • ) be the semicircle that 1 (resp. 2 ) passes through. If the pair ( * , •) is (L, R), then Lemma 4.5 implies that 1 and 2 do not cross each other. Therefore, there must be another vertical line on the boundary of R, and by Lemma 4.6, there will be at least six edges on the boundary of R after trivalizing the crossings. When ( * , •) is (R, R) as depicted in (I) below, trivalizing the intersection point of m 1 R and 1 will produce one more edge on the boundary of R by Lemma 4.6. When ( * , •) is (R, L) as in (II), trivalizing the crossing of m 1 R and 1 and of m 2 L and 2 will produce two more edges on the boundary of R. Finally, when ( * , •) is (L, L) as in (III), trivalizing the crossing point of m 2 L and 2 will produce one more edge on the boundary of R.
• There are boundary edges of R from both W + and W − : There must be two noncrossing vertical lines on the boundary of R. Therefore, if at least two semicircles appear on the boundary on W + or W − , then R is not a quadrilateral. Hence, we only have to treat the case when just one semicircle from each of the webs W + and W − appears on the boundary: It is easy to check that there are at least two crossing points between vertical lines and semicircles where we can apply Lemma 4.6, so that at least two more edges will be added after trivalization.

3 2 1-avoiding permutations
In Section 6, we will use the path depth of Definition 3.6 to create a pair of standard tableaux from an A 2 -web, and this will enable us to show that the map Φ in Section 3 is a bijection. The algorithm that constructed the A 2 -web Φ(T) from a semistandard tableau T produced a 3 2 1-avoiding permutation via the RS correspondence in Step 9. In this section, we construct a pair of standard tableaux from a 3 2 1-avoiding permutation using the path depth of a permutation and show that this pair is exactly the same as the one coming from the RS correspondence. The 3 2 1-avoiding permutations in S and the Temperley-Lieb diagrams with 2 vertices are both counted by the Catalan number 1 +1 2 (see for example, [St,Chap. 6]). In Remark 5.17, we show how the considerations here give a direct bijection between the set of 3 2 1-avoiding permutations and the set of Temperley-Lieb diagrams. Bijections using the reduced expressions for Temperley-Lieb diagrams as words in the generators are known and can be found for example in [BJS].
For the remainder of the section, we assume that σ ∈ S is a 3 2 1-avoiding permutation.
(iii) If σ(s) = s, then σ(i) < s for all i < s and σ(j) > s for all j > s.
We associate to σ a diagram with vertices numbered 1, . . . , from left to right on the top and on the bottom boundary lines, and with vertex i on top connected to vertex σ(i) on the bottom by a vertical line. The vertical lines divide the region between the top and bottom boundaries into faces. Next we introduce an analog of the path depth given in Definition 3.6 for the diagram of σ.
Definition 5.2. (See [KK].) Let f ∞ be the unbounded face open to left of the diagram of σ. For any point x in the interior of a face of the diagram, the path depth of x, denoted d p (x, σ), is the minimal number of edges crossed by any path from x to f ∞ that does not intersect the top or bottom boundaries.
Note that when a path from x to f ∞ crosses horizontally at the intersection of two lines in the diagram, it is counted as a single edge crossing. All points in the interior of a face f have the same path depth, so we set d σ (f ) ∶= d p (x, σ) for any point x in f .
For a 3 2 1-avoiding permutation σ, we define the path depth difference δ σ (v) of a boundary vertex v to be where f l v is the face to the left of v and f r v is the face to the right of v. In (5.9) below, we will show that δ σ (v) is always either 0 and 1 for every boundary vertex v.
To distinguish the top and bottom vertices, we denote the ith vertex on the top (resp. bottom) boundary of the diagram of σ by t i (resp. b i ). Using the values δ σ (t i ) and δ σ (b i ), we create standard tableaux S + and S − of at most two rows by assigning the position of i as follows: Definition 5.5. For i = 1, . . . , , Now we assume σ corresponds to a pair of standard tableaux (R, Q) by the RS correspondence, where R is the recording tableau and Q is the insertion tableau. Note that the permutation σ in Example 5.4 corresponds to 1 3 5 6 7 8 9 12 2 4 10 11 , 1 2 3 5 8 9 10 11 4 6 7 12 by the RS correspondence.
The following is the main theorem of this section, which we prove after a sequence of results.
(ii) If s ∈ F ∪ R, then s is in the first row of the recording tableau R of σ.
Proof. Part (i) is a consequence of Lemma 5.1. For (ii), let s ∈ F ∪R and i < s. If i ∈ F ∪ R, then we have σ(i) < σ(s) by (i). If i ∈ L, then σ(i) < i < s < σ(s). Hence for any i < s, we have σ(i) < σ(s). So in the Robinson-Schensted procedure, we adjoin σ(s) to the end of the first row of the insertion tableau, and therefore, s is in the first row of recording tableau.
For an intersection of lines in the diagram of σ, the path depths of the faces around the crossing must be as in one of the following configurations: Note that the vertices a, b, c, d in these pictures represent either a vertex on a boundary or a crossing point of two vertical lines. If a is a vertex on the top boundary, then the second configuration is not possible, since the shortest path from a point in f r a to f ∞ must cross an edge to get to f l a as shown below. Likewise, if c is a bottom vertex, then the third configuration is impossible. (ii) If s ∈ L, then δ σ (b σ(s) ) = 1.
Proof. Only the first and third configurations in (5.9) can occur when a = s on the top boundary of the diagram of σ, so (i) is apparent. Similarly, if c = σ(s) for some s ∈ L, then only the first two configurations are possible and we have (ii). Part (iii) is clear.
We have seen in Lemma 5.8 that each s ∈ F ∪ R lies in the first row of the recording tableau R. To determine conditions for s ∈ L to lie in the first row of R will require some additional concepts.
Assume s ∈ L and start moving along the edge from vertex t s on top. Whenever we reach a crossing, we make one of the following allowable turns: .
Let ε(t s ) be the number of turns we made to arrive at a vertex in top or bottom starting from t s . The following lemma is clear.
Lemma 5.13. For s ∈ L, starting from vertex t s , we arrive at a vertex t r in the top if and only if ε(t s ) is odd, and in this case, r ∈ R. We arrive at a vertex b r in the bottom if and only if ε(t s ) is even, and in this case, σ −1 (r) ∈ L.
As we traverse an edge, there are faces f 1 and f 2 on the two sides of that edge. The absolute value of the difference d σ (f 1 ) − d σ (f 2 ) is either 0 or 1 by (5.9). When the edge is connected to a vertex v on either the top or bottom boundary, the path depth difference equals δ σ (v). The differences switch back and forth between 0 and 1 as we make a turn (see (5.9) and (5.11)). Therefore, starting from vertex t s , s ∈ L, if we make an odd number of turns and arrive at vertex t r , r ∈ R, then δ σ (t s ) and δ σ (t r ) are different. If instead we make an even number of turns and arrive at vertex b r , then σ −1 (r) ∈ L, and δ σ (t s ) = δ σ (b r ). Now from Lemma 5.10, we have the following corollary.
Corollary 5.14. For s ∈ L, when we start from the vertex t s , we end at a vertex on the top if and only if δ σ (t s ) = 0.
Let s ∈ L. Assume s is in the second row of the recording tableau R. Hence, σ(r) is bumped out of the first row of Q by σ(s) < σ(r) for some r < s while applying the Robinson-Schensted process. And by Lemma 5.1, r ∈ R. Note any σ(r) can be bumped out at most once. Thus, each s ∈ L in the second row of R is paired with a unique r ∈ R with r < s such that σ(r) > σ(s). We call such a pair (r, s) an RS pair.
Assume s ∈ L, and there is an RS pair (r, s). We will show that a Turn II is always followed by a Turn I during the trip starting from t s , and hence δ σ (t s ) = 0 by Corollary 5.14. The following illustrates the possibilities that occur when a Turn II occurs.
. We repeat this procedure until we arrive at a vertex on the top boundary in this case.
On the other hand, assume that s ∈ L and s is in the first row of the recording tableau R, i.e., there is no RS pair of s. We show that if a Turn I happens, then always a Turn II follows during the trip starting from t s , and hence δ σ (t s ) = 1 by Corollary 5.14. In order for a turn to occur, the line traveled is crossed by a line starting from a vertex t r with r ∈ R, r < s, and σ(r) > σ(s). Since s is not paired, r must be paired with another s ′ ∈ L with r < s ′ < s. If there is no s ′′ ∈ L such that s ′ < s ′′ < s, then we make a Turn II when the line from t s ′ crosses the line from t r .
If there is s ′′ ∈ L such that s ′ < s ′′ < s, then we make a Turn II at the crossing of the line from t s ′′ with the line from t r . If s ′′ is paired with a r ′ ∈ R, then r ′ > r since s ′ < s ′′ is paired with r.
Then, the line from t r ′ must meet with the line from t s , and we get a contradiction, since we made a turn at the crossing of the line from t r and the line from t s . Hence, s ′′ is not part of an RS pair, and we make a turn at the crossing of the line from t r and the line from t s ′′ . Now we are ready to prove the main theorem in this section.
Remark 5.17. Starting a trip from t s , s ∈ L, we only need Turn I and Turn II. However, beginning the trip from any vertex on the top (or bottom), also requires using the following turns.

Φ is bijective
In Section 3, we constructed a map Φ from the set of semistandard tableaux of shape (3 n ) and type {1 2 , . . . , k 2 , k + 1, . . . , 3n − k} to the set of nonelliptic A 2 -webs with a boundary of k pluses on the top and a boundary of 3n − 2k minuses on the bottom. In this section, we show that Φ is a bijection by using Khovanov-Kuperberg's definition (Definition 3.6) of path depth.
We connect the rightmost vertex on the top boundary of an A 2 -web to the rightmost vertex on the bottom boundary to form one boundary line, and consider the unbounded region of the web that opens to left as f ∞ . Then, we assign a path depth as in Definition 3.6 from each internal face of the web to f ∞ . We will use this web path depth to construct two standard tableaux from the web, providing the inverse of Φ. This is analogous to what we did in Section 5, where we used the path depth of a 3 2 1-avoiding permutation to construct two standard tableaux that were exactly the same tableaux produced from the inverse of the RS correspondence by Theorem 5.6.
Recall from (5.3) that δ σ (v) is the path depth difference for a boundary vertex v of a 3 2 1-avoiding permutation σ, and δ σ (v) = 0 or 1 (see (5.9)). In an analogous manner, we define δ(v) for a boundary vertex of a nonelliptic A 2 -web. The only difference is that δ(v) may have values 0, 1 and −1. (We will see below that δ(v) has only these values.) Using the values δ(t i ) and δ(b i ), we create two standard tableaux S + and S − of at most three rows by inserting i as follows: Note that this is an extension of Definition 5.5. From [K] and [PPR], we know that the set of semistandard tableaux of shape (3 n ) and type {1 2 , . . . , k 2 , k + 1, . . . , 3n−k} and set of nonelliptic A 2 -webs with k pluses on the top boundary and 3n − 2k minuses on the bottom boundary have the same cardinalities. Hence, to show that Φ is bijective, it is enough to prove that Φ is injective, which amounts to showing that we can recover T from Φ (T). Observe that if we can recover T + and T − , then getting T is straightforward by applying ϕ −1 (for ϕ as given in Theorem 3.1), adjusting entries, rotating tableaux and joining them together. So, we will only show that we can determine T + and T − from Φ(T) using the path depth differences δ(v).
We start by noting that path depth differences δ(v) of boundary vertices v on Φ(T) are same as those on Φ * (T) given in Step 10 of Section. The diagram Φ * (T) is formed by the diagrams of the two webs W + and W − and the diagram of a 3 2 1-avoiding permutation σ on the isolated vertices.
Let v be an isolated vertex on the top boundary of Φ * (T) and consider its path depth difference δ σ (v) as a vertex in the diagram of the permutation σ as in Section 5. (An isolated vertex on the bottom boundary can be treated by a similar argument.) Corollary 4.3 implies that only the following two configurations can occur when an m-configuration is added to the diagram of σ. The value of the difference does not change by the addition of the m-configuration; hence δ(v) = δ σ (v) for isolated vertices. This implies that T + ◇ and T − ◇ can be recovered by Theorem 5.6 from the path depth δ(v) of the isolated vertices: (Path depths are indicated as a, a + 1, or a + 2.) Now assume that we have an m-configuration in W + (or W − ). Adding a vertical line connecting an isolated vertex on the top boundary with an isolated vertex on bottom boundary to the m-configuration results in no change to δ(v) for a vertex v in the m-configuration, since the shortest path from f r v and f l v to f ∞ either will cross the vertical line if v is to the right of the line or will not cross the vertical line if v is to the left of the line. Hence, the path depth difference of a vertex in W + (resp. W − ) is the same as it is in Φ * (T). Thus, by Tymoczko's result (see Proposition 3.7), the path depths in W + and the circle depths in M + are the same (resp. of W − and of M − are the same). Then we can recover T + ◻ from M + (T − ◻ from M − ) by δ(t i ) = 1, 0, −1 (or δ(b i ) = 1, 0, −1) if and only if i in the first, second or third row of T + ◻ (or T − ◻ ), respectively. Once T + ◻ and T + ◇ are determined, then T + can be obtained by putting i in row r of T + if and only if i is in row r of T + ◻ or T + ◇ . Similarly, we can recover T − from T − ◻ and T − ◇ . In summary, we uniquely determined T from Φ(T) using δ(v), and hence Φ is injective (and bijective, too).

Connections with Westbury's flow diagrams
The algorithm in Section 3 produces an A 2 -web from a pair (T + , T − ) of standard tableaux obtained from a semistandard tableau T. Westbury [We] has given an alternative to A r−1 -webs connected with sl r using flow diagrams in triangular shapes. In this final section, we describe how to obtain an A 2 flow diagram from such a pair (T + , T − ) of standard tableaux. The results described here for A 2 can be extended to A r−1 for arbitrary r, and more details on this will appear elsewhere. Our aim here is to describe the relationship between the results of the previous sections to the flow diagram approach. First, we briefly review Westbury's result. To a ∈ {1, . . . , r}, we associate two equilateral triangles whose sides are one unit in length: For compatibility with the conventions in previous sections, our arrows are the reverse of what is in [We], so they go from − to + rather than from + to −. The edge labels 0 and r are omitted in the diagrams, and the triangles associated to 1, −1, r, −r are Reversing the orientation of an edge changes the sign of the label: Also for A r−1 , an edge labeled with −q, (1 ≤ q ≤ r − 1) is identified with an edge labeled with r − q. For example, in the A 2 case we have We associate to a word w of n symbols from {±1, . . . , ±r} an equilateral triangle of length n. Along the top boundary of this triangle, we place triangles of unit length as in (7.1), so that the numbers on the top of these triangles, when read from left to right, give the word w. Then, we fill in the rest of the triangle with rhombi as described above, so that the labels on the edges match on the boundaries of the rhombi. The triangular diagram obtained in this way is the flow diagram determined by w (see [We] for more details). The following is an example of A 2 flow diagram associated to the word w =1 2 23 1. (Note we useā instead of −a when writing a word to simplify the notation.) We say a word w (or its associated flow diagram) is admissible if the associated flow diagram of w has no contact with the boundaries of the large triangle other than with the top boundary of triangle. (The diagram above is not admissible.) Let V + = V be the natural r-dimensional sl r -module and V − = V * be the dual module. A tensor product of copies of V + and V − corresponds to a string s = s 1 ⋯s n of symbols + and − and is denoted V s = V s 1 ⊗ ⋯ ⊗ V sn . Each word w = w 1 ⋯w n in {±1, . . . , ±r} of length n determines a sign string s(w) = s 1 ⋯s n given by s i = + if w i > 0 and s i = − if w i < 0. For a given sign string s of length n, we let B(s) be the set of admissible words w in {±1, . . . , ±r} of length n whose sign string s(w) = s. Then the following analog of Theorem 2.1 holds in this setting: Theorem 7.3 ( [We,Cor. 4.6]). Let s be a sign string and B(s) be the set of admissible words in {±1, . . . , ±r} whose sign string is s. Then, there is a bijection between B(s) and a basis for the space Inv(V s ) of sl r -invariants in V s .
Any interior face of a flow diagram is bounded by at least six edges, since the following rhombus configuration is not allowable: . Therefore, the nonelliptic A 2 -webs discussed earlier in this paper are indeed A 2 flow diagrams. Thus, in the A 2 case, what we want is a bijection (in fact an injection) mapping the pair (T + , T − ) in Section 3 to an admissible flow diagram. To achieve this, we apply the following algorithm, which we illustrate with the running example from Section 3, where T + = 1 2 5 6 3 4 7 has shape λ = (4, 2, 1) and T − = 1 2 3 5 9 4 6 7 8 10 has shape µ = (5, 3, 2).
• Break T + into one-column tableaux: Let T(a, b) be the entry in position (a, b) of T + .
Now assemble associated entries of T + to form one-column tableaux. There will be λ 3 tableaux of shape (1 3 ), λ 2 − λ 3 tableaux of shape (1 2 ), and λ 1 − λ 2 tableaux of shape (1). For T + as above, we obtain T + 3,1 = 1 4 7 , T + 2,1 = 2 3 , T + 1,1 = 5 , T + 1,2 = 6 . The index in T + ,i indicates that the shape of the tableau is (1 ). To determine the second index, we compare the bottom entries in the tableaux of shape (1 ) and number the tableaux so the one with the smallest last row entry is T + ,1 , the next one is T + ,2 , and so forth until we reach the one with the largest last row entry. Applying a similar process to the pair T − 1,1 = 1 , T + 1,1 = 5 , we get the word and to the pair T − 1,2 = 9 , T + 1,2 = 6 , the word The result of superimposing all the flow diagrams is the following flow dia-gram: Note by our choice of index i for the tableaux T − ,i and T + ,i above, any two edges that cross have different labels. By replacing the crossings with rhombi as in (7.2), which is equivalent to trivalizing the crossings that was used earlier, we have the final flow diagram associated to (T + , T − ), which is admissible. Reading the labels off the top boundary, we can recover (T + , T − ) from the flow diagram. Hence, the map sending the pair (T + , T − ) to the flow diagram is an injection, and indeed a bijection.