Commutation Classes of the Reduced Words for the Longest Element of ${\mathfrak S}_n$

 Using the standard Coxeter presentation for the symmetric group $\mathfrak{S}_{n}$, two reduced expressions for the same group element $\textsf{w}$ are said to be commutationally equivalent if one expression can be obtained from the other one  by applying a finite sequence of commutations. The commutation classes can be seen as the vertices of a graph $\widehat{G}(\textsf{w})$, where two classes are connected by an edge if elements of those classes differ by a long braid relation. We compute the radius and diameter of the graph $\widehat{G}(\textsf{w}_{\bf 0})$,  for the longest element  $\textsf{w}_{\bf 0}$ in the symmetric group $\mathfrak{S}_{n}$, and show that it is not a planar graph for $n\geq 6$. We also describe a family of commutation classes which contains all atoms, that is classes with one single element, and a subfamily of commutation classes whose elements are in bijection with standard Young tableaux of certain moon-polyomino shapes.

The symmetric group S n+1 is generated by the simple reflections {s 1 , s 2 , . . . , s n }, where s i is the transposition (i i+1). These reflections satisfy the Coxeter relations: for all i, s i s j = s j s i , for |i − j| > 1, and (1) s i s i+1 s i = s i+1 s i s i+1 , for all i n − 1. ( The relations (1) are known as commutations or short braid relations, and the relations (2) are called long braid relations. Since {s 1 , s 2 , . . . , s n } generates S n+1 , any permutation w ∈ S n+1 can be written as a product of adjacent transpositions w = s i 1 s i 2 · · · s i . Consider w ∈ S n+1 written as a product w = s i 1 s i 2 · · · s i where i j ∈ [n] and is minimal. The length of w is (w) := and the product s i 1 s i 2 · · · s i (w) is a reduced decomposition for w. The string of subscripts w = i 1 i 2 · · · i is a reduced word for w. The content of w is the sequence cont(w) = (c 1 , . . . , c n ), where each c i is the number of occurrences of the letter i in w. A consecutive substring of w is called a factor, and a word obtained by deleting some of the letters of w is a subword of w. If I ⊆ [n], then w |I is the subword of w formed by the letters in I.
We will use sans-serif typeface for permutations, in order to distinguish them from reduced words. Reduced decompositions and reduced words are in bijection with each other, and the terms "commutation" and "long braid relation" have natural interpretations in the context of reduced words. The set of all reduced words of w is denoted by R(w).
As an immediate consequence of (3), we have (w) = (w −1 ) for any permutation w ∈ S n+1 . The symmetric group S n+1 has a unique longest element w 0 ∈ S n+1 with length (w 0 ) = n+1 2 . In one-line notation, w 0 is the permutation (n + 1)n · · · 321. The word w 0 := 1(21)(321) · · · (n · · · 21) is a reduced word for w 0 . When the order of the symmetric group is not clear from the context, we will often use the notation w n 0 for w 0 ∈ S n+1 to emphasize the underlying set {1, . . . , n} of w 0 .
We define a relation ∼ on the set R(w 0 ) of all reduced words for w 0 by setting s ∼ t if and only if s and t differ by a sequence of commutations. This is an equivalence relation and the classes it defines are the commutation classes of w 0 , denoted by C(w 0 ). The commutation class of a word w ∈ R(w 0 ) is denoted by [w]. Although two words in the same commutative class have the same content, this property is not sufficient to characterize the class. The next lemma gives a characterization of the words in a commutative class (see [2]).

Lemma 1.
Let v and w be words over the alphabet [n]. Then, w ∼ v if and only if for each integer i ∈ [n − 1], we have w |{i,i+1} = v |{i,i+1} .
Proof. If w ∼ v, then w can be obtained from v by a sequence of commutative relations that do not change the relative positions of the letters i and i + 1, and so we must have w |{i,i+1} = v |{i,i+1} for all i ∈ [n − 1]. Reciprocally, if w |{i,i+1} = v |{i,i+1} for all i ∈ [n − 1], then the relative positions of the letters i and i + 1 is the same for both words v and w, for all i ∈ [n − 1], and thus v and w can differ only by the positions of non consecutive integers i and j with |i − j| > 1, that can be transposed using commutation relations. It follows that w ∼ v.
We write v ∼ The graph G(w 0 ) can be seen as a quotient graph of G(w 0 ), the graph whose vertex set is the set R(w 0 ) of all reduced words of w 0 , and where two reduced words are connected by an edge if they are related by a single short or long braid relation [9,10].
The . The radius and diameter of G(w 0 ) are the minimum and maximum eccentricities, respectively. Figure 1 depicts the graph G(w 0 ) for S 4 , which has radius and diameter equal to 4. We will prove that for n 2, both the radius and diameter of G(w n 0 ) are given by the binomial n+1 3 . Some of the only work on this topic was obtained by S. Elnitsky [7], who proved that G(w 0 ) is a connected and bipartite graph, by establishing a bijection between reduced words and rhombic tilings of a certain polygon [6,13]. In this paper we study various properties of G(w 0 ), namely we compute its radius and diameter, and show that it is not planar for n > 5. We note that the diameter of the graph G(w 0 ) was obtained by V. Reiner and Y. Roichman in [9]. We also describe a family of commutation classes which contains all atoms, that is classes with one single word, and a subfamily of commutation classes whose elements are in bijection with standard Young tableaux of certain moon-polyomino shapes.
The remainder of this paper is organized as follows. In Section 2, we compute the radius and diameter of G(w n 0 ) using two statistics on reduced words, and prove that this graph is not planar for n > 4. After some preliminary discussions, in Section 3 we describe the set of two side ordered words, a certain family of reduced words which contains as particular cases all atoms and alternating words, which are those reduced words w for which each subword w |{a,b} is of the form (a b) k or (a b) k a for some integer k, whenever |a − b| = 1. The characterization of the atoms in G(w n 0 ) is achieved in Subsection 3.1, and in Subsection 3.2 the notion of an alternating words is introduced and its commutation classes are characterized. Finally, in Subsection 3.3 we give an interpretation of the commutation classes of alternating words as standard fillings of certain moon-polyomino Young tableaux. We prove that the cardinality of each commutation class of an alternating word is larger than the cardinality of any class connected to it by a single edge, and present a conjecture with the identification of the commutation classes with maximum cardinality amongst all classes in R(w n 0 ). [
The complement and reverse operations define involutive maps R(w 0 ) → R(w 0 ) that commute with each other, (w • ) R = w R • , and cont(w) = cont(w R ).
Definition 4. Given a reduced word w = i 1 i 2 · · · i ∈ R(w 0 ), let S(w) be the sum of all letters of w, that is where cont(w) = (c 1 , . . . , c n ).
the electronic journal of combinatorics 27(2) (2020), #P2.21 The number S(w) is invariant for any word in the equivalence class of [w], and thus defines a map C(w 0 ) → N. For instance, we have j(n − j + 1) = n(n + 1)(n + 2) 6 and The next lemma follows directly from the definition of a long braid relation.
Proof. We prove the contrapositive assertion. Let v ∈ R(w 0 ), and assume that for any . Then, by Lemma 5, S(u) = S(v) + 1. This implies that a factor i(i − 1)i cannot appear in any word of the class [v], for any i = 2, . . . , n.
Since between two letters n in a reduced word for w 0 there must be a letter n − 1, then a word in the class [v] can only have one letter n.
Between two consecutive letters n − 1 in a reduced word for w 0 , there must be a letter n or a letter n − 2. Since we have established that a word in the class [v] cannot have a factor i(i − 1)i, for any i, it follows that there must exist a word in [v] having the factor (n − 1)n(n − 1) or (n − 1)n(n − 2)(n − 1). In any case, in between two consecutive letters n − 1 it has to appear the letter n. This implies that any word in [v] has at most two letters n − 1.
Repeating this argument, we conclude that any word in [v] has at most i letters n−i+1, for i = 1, . . . , n, and that between two consecutive letters i, there is exactly one letter i+1, for all i. On the other hand, being reduced, the length of the words in [v] is n+1 2 . Thus, any word in [v] has exactly i letters n−i+1, and v |{i−1,i} = (i−1 i) n−i+1 (i−1) = (w 0 ) |{i−1,i} for i = 1, . . . , n. By Lemma 1, it follows that v ∼ w 0 .
The previous result shows that S(w 0 ) is the minimum value for the map S, and that S(w) = S(w 0 ) if and only if w ∈ [w 0 ]. Moreover, an analogous argument shows that S(w • 0 ) is the maximum value for the map S and It also follows from Proposition 6 that for any commutation class [w], distinct from [w 0 ], there is a path from [w] to a class with a smaller S-value, which means that there is a path joining [w] and [w 0 ]. Thus, we recover the following result from S. Elnitsky [7], which is also a consequence of Matsumoto's Theorem [8]. This result also follows from the fact that G(w) is connected for any w ∈ S n+1 [9]. Additionally, by Lemma 5 it follows that G(w 0 ) is a bipartite graph, with the partition of C(w 0 ) given by the parity of the S-values of its vertices. This result also holds for the graph G(w), for any w ∈ S n+1 (see [3]).
The map S may also be used to compute the diameter of G(w 0 ).
, and moreover S(w) = S(w • 0 ) − 1 by Lemma 5. Repeating this process S(w • 0 ) − S(w 0 ) times, we arrive at the class [w 0 ], proving that Similarly, we can see that for any class To prove that the diameter is n+1 3 , it remains to show that this number is the maximal distance between any two classes in the graph. Consider two commutation classes [w] and [w ]. Since using the triangle inequality, we conclude that proving that the distance between any two commutation classes [w] and [w ] is at most S(w • 0 ) − S(w 0 ). It follows that the maximum eccentricity of a commutation class in the graph G(w 0 ) is S(w • 0 ) − S(w 0 ). We will now prove that the eccentricity of any commutation class is, in fact, n+1 3 and therefore prove that the radius of R(w 0 ) is equal to the diameter. To this end, we will define an auxiliary function T . A generator s i acts on a permutation x 1 x 2 · · · x n+1 of [n+1] by transposing the integers x i and x i+1 . In particular, a reduced word w = i 1 i 2 · · · i for w 0 transforms the identity 12 · · · (n + 1), which has no inversions, into w 0 = (n + 1) · · · 21, where each pair of integers (i, j) with 1 i < j n + 1 is an inversion, by the successive action of the generators s i 1 , s i 2 , . . . , s i . Let T n be the set of all triples (a, b, c) ∈ [n + 1] 3 such that a < b < c. For any w ∈ R(w 0 ) and any (a, b, c) ∈ T n define T (w, abc) = 1 if, by the action of the generators of w on the identity, the inversion of the pair (a, b) occurs before the inversion of (b, c); and define T (w, abc) = −1 otherwise. The number T (w, abc) can be easily read off of the line diagram of a permutation. The line diagram of w = s i 1 s i 2 · · · s i is the array [n + 1] × [ ] in the Cartesian coordinates, which describes the trajectories of the numbers 1, 2, . . . , n + 1 as they are arranged into the permutation w by the successive simple transpositions s i j . Note that since w is a reduced word for w 0 , any two integers a < b in [n + 1] will invert positions in the line diagram of w, thus showing that T is well defined. Figure 2 shows the line diagram of the word w = 212321 ∈ G(w 4 0 ), and it follows that T (w, 123) = −1 and T (w, abc) = 1 for all remaining triples (a, b, c), with a < b < c. Proof. The operator T is invariant for words in the same commutation class, since any possible change of order of the generators is done between generators acting on disjoint pairs of numbers. Reciprocally, suppose T (w, abc) = T (w , abc) and let i be the leftmost letter of w such that w = w 1 iw 2 and w = w 1 jw 2 with i = j. Then, w = w 1 u i v, where w 1 u has no letter i. If w 1 u has a letter i − 1, then the first occurrence of i − 1 inverts the order of the integers in a pair (a, b) with a < b = i. On the other hand, the generator i in the word w, inverts the order of the integers in a pair (b, c) where b = i < c = i + 1. Thus, T (w, abc) = −1 and T (w , abc) = 1. It follows that w 1 u cannot have the letter i − 1, and similar reasoning shows that it cannot have i + 1. By commutation relations we can write w ∼ w , where w = w 1 iw 2 . Repeating this argument for the successive words obtained from w until the resulting word is w, we conclude that w ∼ w .
In view of the result above, we will write T ([w], abc) to represent the common number , then T (w, abc) = T (w , abc) for all triples in T n , except for one.
Proof. Without loss of generality, let w = u i(i + 1)i v ∈ R(w 0 ) and w = u (i + 1)i(i + 1) v, where u and v are, respectively, the initial and final factors of w and w . If a, b, c are such that u(a) = i, u(b) = i + 1 and u(c) = i + 2, where u is the permutation corresponding to u, then a < b < c since otherwise w would not be reduced. Moreover, the permutation corresponding to the left factor u i(i + 1)i is equal to the one corresponding to u (i + 1)i(i + 1). The transposition corresponding to the generator i, applied to the permutation u, inverts the integers a and b, while the transposition corresponding to the i + 1 applied to u inverts the integers b and c. Therefore, T (w, abc) = −T (w , abc). Finally, since the permutation corresponding to i(i + 1)i = (i + 1)i(i + 1) only acts over a, b and c, for any other triple x < y < z, we have T (w, xyz) = T (w , xyz).
Proposition 12. For any w ∈ R(w 0 ) and any triple (a, b, c) ∈ T n , we have Proof. (a) The line diagram of w • corresponds to the horizontal reflection of the line diagram of w. Since the word w • consists in replacing each generator i, in the word w, by the generator n + 1 − i, the inversion of the integers a and b is achieved by the action of w in the same order that the inversion of the integers n + 2 − a and n + 2 − b is achieved by w • . And so, if the action of w inverts the integers a and b before it inverts b and c, then the action of w • , inverts the integers n + 2 − a and n + 2 − b before it inverts n + 2 − b and n + 2 − c. Thus the result follows.
(b) Note that the line diagram of w R corresponds to the 180 degrees rotation of the line diagram of w, and the image of a by w 0 is n + 2 − a. Reading the word w backwards, any inversion of the integers a and b corresponds to a inversion of the integers n + 2 − a and n+2−b in the reverse order. Thus, if a and b are inverted before b and c by the action of w, then n + 2 − b and n + 2 − c are inverted before n + 2 − b and n + 2 − a are inverted by the action of w R . It follows that (c) Follows from the previous two cases, noticing that the line diagram of w •R corresponds to the vertical reflection of the line diagram of w.
Proof. By Theorem 9, the distance between any two words is at most n+1 3 . By Proposition 12, for any triple (a, b, c), T ([w], abc) = −T [w •R ], abc and, by Lemma 11, this means that there are necessary at least |T n | long relations in a path linking [w] and w •R .
, which concludes the proof.
the electronic journal of combinatorics 27(2) (2020), #P2.21 The following result is a consequence of the previous corollary and Theorem 9.
Theorem 14. The eccentricity of any class [w] is n+1 3 , and therefore the radius of G(w 0 ) is n+1 3 .
As can be seen in Figures 1 and 3, the graphs G(w n 0 ) for n 4 are planar graphs. In Figure 3, the vertices O and J correspond to the commutation classes of w 0 and w •R 0 , and the vertices in each dashed circle have the same S-value, with one unit of increment (resp., decrement) for each circle starting from S(w 0 ) = 20 (resp., S(w •R 0 ) = 30) in the center. Moreover, the vertices on the two external circles have the same S-value. For instance, the S-value of vertices A 1 and A 2 is 21, and the S-values of B 1 and B 2 is 22. The vertices E 1 and E 2 , in the two external circles, have the same S-value equal to 25, and the S-value of vertex F is 26.
We prove next that for n > 4 the graph G(w 0 ) is not planar, using Wagner's Theorem [5]. An edge contraction of an edge e = {u, v} in a graph is the graph obtained by combining the vertices u and v into a single vertex, which is adjacent to every vertex that was adjacent to u and v in the original graph. A graph minor of a graph is a new graph obtained by deleting vertices, deleting edges, and/or contracting edges of the original graph. Wagner's Theorem states that a graph is planar if and only if it does not contain K 5 or K 3,3 as a graph minor.
Lemma 15. Given a fixed integer n 2, the graph The subgraph of G(w n 0 ) formed by the classes of the words w · w − n , with w ∈ R(w n−1 0 ), is isomorphic to G(w n−1 0 ).
For example, the graph G(w 3 0 ) can be seen as the subgraph of G(w Theorem 16. For n > 4 the graph G(w n 0 ) is not planar.
Proof. Using Lemma 15, it is enough to prove that G(w 5 0 ) is not planar. We will do so by proving that it has K 3,3 as minor.
The minor of G(w 5 0 ) having as vertices the sets:

Commutation Classes
In this section, we define a family of reduced words for w 0 generated by a concatenation of monotone words of lengths n, . . . , 2, 1, and indexed by binary vectors of length n − 1. This family contains, as a particular case, the reduced word w 0 = 1(21)(321) · · · (n · · · 21).
To simplify notation, whenever 1 a < b n define the words The words t + a,b and t − a,b are reduced because they have no repeated letters. Definition 17. Given a binary vector where each w b n− +1 is a monotone subword of length n − + 1 defined recursively as follows (we set w 1 = w bn 1 , with b n = +): n− is obtained by removing the rightmost letter from w b n− −1 , and sorting the remaining letters by increasing or decreasing order according to the sign b +1 . Also, note that in Definition 17, the sign b n is irrelevant for the construction w 1 = w bn 1 , that is, the letter w bn 1 is completely determined by the previous subword w b n−1 2 .
Example 18. Consider the binary vector b = (+, +, −, +, −) of length 5. We then construct the subwords Thus, the word indexed by b is w b = 123456 · 12345 · 4321 · 234 · 32 · 3. n− in decreasing order of their lengths. They will serve as a basis for the construction of a larger class of commutation classes in G(w 0 ).
Proposition 19. Any ordered word w ∈ O(n) is a reduced word for w 0 .
Proof. Let w b ∈ O(n), with b a binary vector of length n − 1. Then, the length of w b is the sum of the lengths of the monotone subwords w b n− +1 , for = 1, 2 . . . , n. That is (n − + 1) = (n + 1)n 2 = (w 0 ).
Let us now prove that the permutation associated with w b is the longest permutation w 0 ∈ S n+1 . Assume that b 1 = −. The permutation associated with w − n = n · · · 21 has one-line notation 23 · · · (n + 1)1. On the other hand, the permutation associated with w b 2 n−1 · · · w b n−1 2 w 1 leaves the letter 1 fixed, and only acts on the set {2, . . . , n + 1}. By induction, the permutation associated with w b 2 n−1 · · · w b n−1 2 w + 1 is the longest permutation on the set {2, . . . , n + 1}, and it follows that the permutation associated with w b is the longest permutation of S n+1 .
The proof is similar if b 1 = +. Therefore w b is a reduced word for w 0 .
Proposition 20. The set O(n) contains 2 n−1 distinct words, each belonging to a different commutation class.
Proof. By construction, there are a total of 2 n−1 words w b , with b a binary vector of length n − 1, and they are all distinct. We prove by induction on n 2 that any two of these words are in distinct commutation classes. When n = 2 there are only two words w (+) = 12 · 1 and w (−) = 21 · 2, which clearly are not in the same commutation class. Suppose now n > 2, and consider words w b and w b with b 1 = + and b 1 = −. Then, T (w b , xyz) = 1 for any integers y < z with x = 1, while T (w b , xyz) = −1 for any integers x < y and z = n + 1. Thus, T (w b , 1y(n + 1)) = T (w b , 1y(n + 1)), for any 2 y n, showing, by Lemma 10, that the commutation classes of w b and w b are distinct. Consider next the case b 1 = b 1 . Then, we can write . . , b n−1 ) and d = (b 2 , . . . , b n−1 ). By the inductive step, we find that the words u d and u d are in distinct commutation classes, showing that w b and w b are in distinct commutation classes.
We can use short and long braid relations in an ordered word w b to "move" a factor w b n− +1 within the other factors of w b , according to the rules of the following lemma. These rules will be used to construct two classes of words: atoms, that is reduced words with no short braid relations, and alternating words, which can be interpreted as fillings of certain moon-polyomino shapes.
Lemma 21. Given positive integers a < k b, consider the increasing word w + = a(a + 1) · · · (b − 1)b and the decreasing word w − = b(b − 1) · · · (a + 1)a. Then, For instance, the following list of reduced words for w 0 shows how we can use short and long braid relations to "move" the factor w + 3 = 234 of w b in Example 18, to the leftmost position: 123456 · 12345 · 4321 · 234 · 32 · 3 = w b 123456 · 12345 · 123 · 4321 · 32 · 3 123456 · 234 · 12345 · 4321 · 32 · 3 345 · 123456 · 12345 · 4321 · 32 · 3 (4) Given an ordered word w b , and a partition I ∪ J of [n − 1], we construct the two side ordered word w b I as the concatenation where each letter of w Note that each word in T SO(n) is a reduced word for w 0 , since it is obtained from some ordered word in O(n), which by Proposition 19 is reduced, by applying short and long braid relations.
Proof. To construct a two side ordered word, there are two possibilities for the sign b 1 of w b 1 n , and two possibilities for whether w 1 belongs to the set I or not. For all other factors there are four possible choices, two for the signal and two for whether it belongs to I or not. This amounts to 4 n−1 possibilities. Note however, that if b 1 and b 2 have distinct signs, then w b 1 n w b 2 n−1 = w b 1 n−1 w b 2 n . Thus, there are a total of 4 n−1 − 4 n−2 = 3 × 4 n−2 distinct two side ordered words in T SO(n).

Atoms
Definition 24. A reduced word w ∈ R(w 0 ) whose commutation class contains only itself is called an atom of G(w 0 ).
Clearly, a reduced word w ∈ R(w 0 ) is an atom if and only if each factor ij of length 2 of w is formed by consecutive letters, i.e. |i − j| = 1. We will show that there are exactly four atoms in G(w 0 ), for n 3, namely the words w b , w −b , w b R and w −b R , with b = (+, −, +, −, . . .).
Proof. Let k be the length of a word u in the conditions of the lemma. We start by noticing that if k = n, then the increasing word u = 12 · · · n is reduced, since by (3) the corresponding permutation (n + 1)12 · · · n has length n. Assuming now that k > n, the word u is a concatenation of increasing factors with decreasing factors. Since u 1 = 1 and u k = n, u must have a factor of the form for some integers a < b, which by Lemma 25 is not reduced. It follows that u is not reduced.
By Proposition 19, w b and w −b are reduced words for w 0 , and each factor of length 2 is formed by consecutive letters. It follows that w b and w −b are atoms of G(w 0 ). Similarly, each factor of length 2 of the reduced words (w b ) R and (w −b ) R , is formed by consecutive letters, showing that they are also atoms of G(w 0 ). For n 3, these four atoms are all distinct.
We will prove next that these four words are the only atoms in G(w 0 ). Let w ∈ R(w 0 ) be an atom. Since the sets of letters appearing in any two reduced words for w ∈ S n+1 are the same (see [4]), a reduced word for w 0 must have the letters 1 and n. By Lemma 26, w must have as a factor t + 1,n = 12 · · · n or t − 1,n = n · · · 21, since any factor of length 2 of w consists of consecutive letters. Suppose the first case happens (the other is analogous).
If w has two 1s and two ns, then one n must be on the left side of the factor t + 1,n , since otherwise we would have a factor of length greater than n starting with 1 and ending with n, which by Lemma 26 is not reduced. Again by Lemma 26, this means that w must have the factor t − 2,n · t + 1,n . But then, if 1 is either on the left side or on the right side of t − 2,n · t + 1,n , then w has a factor of length greater than n starting with 1 and ending with n, or vice-versa, which by Lemma 26 is not reduced. Thus, w has at least two 1s and one n, or one 1 and at least two ns. Notice that one of these cases must occur, since otherwise we would have w = w · (12 · · · n) · w , with w and w words over the alphabet {2, . . . , n − 1}. In this case, the permutation associated with w fixes 1 and n+1, and then the permutation associated with w ·(12 · · · n) sends 1 to n + 1 and n + 1 to n. Therefore, w cannot be a word for w 0 since it does not send n + 1 to 1, contradicting the definition of w. Then, w must have a factor t + 1,n · t − 1,n−1 · t + 2,k or t − 1,k · t + 2,n · t − 1,n−1 , for some k < n. Assume the former case (the other is analogous). Then, this must be the leftmost factor of w, since otherwise w would have the factor 2 · t + 1,n · t − 1,n−1 · 2, which by Lemma 25 is not reduced.
Since k < n, the next factor in w must be a decreasing sequence t − i,k−1 for some integer i. For the same reason as before i is must be bigger than 1, otherwise w would have the factor t − 1,k · t + 2,k · t − 1,k−1 , which is not reduced. Consequently, the new factor should be shorter (in length) than the previous one. Repeating the same reasoning, w is formed by a sequence of factors in decreasing order of lengths, alternating between increasing and decreasing factors. So it has, at most, n factors and, to be reduced, these lengths add up to (n+1)n 2 . Therefore, these lengths must be, respectively, n, (n − 1), . . . , 1. Therefore, w is the atom w b that we have constructed above. The different choices we can made in the proof gives the other three atoms.
Using Lemma 21, it is easy to see that ( 1] , showing that the four atoms w b , w −b , (w b ) R and (w −b ) R are words in T SO(n).

Alternating classes
Definition 28. A word w over the alphabet {a, b} is alternating if it is of the form (ab) k or (ab) k a for some integer k 0. A word w over the alphabet [n] is alternating if each subword w |{i,i+1} of w, formed only by the letters i and i + 1, is alternating, for i = 1, 2, . . . , n − 1.
It follows that the difference between the number of letters i and i+1 in an alternating word w is at most one. Moreover, between two consecutive letters i in w there is exactly one letter i − 1 and exactly one letter i + 1. Denote by AR(w 0 ) the set of all alternating reduced words in R(w 0 ). We will characterize all commutation classes in AR(w 0 ).
Proof. Suppose the letter i occurs in w to the left of the first letter i − 1 (the other case is analogous), that is w |{i−1,i} = (i (i−1)) k or w |{i−1,i} = (i (i−1)) k i, for some integer k. Then, by the successive action of the generators of w on the identity permutation, the first inversion (a, b) with a < b and i ∈ {a, b}, on the succession of permutations from the identity to w 0 , occurs with a pair (i, y) with i < y. Thus, the integer i, after this inversion, is in position i + 1, and only the generators i and i + 1 can affect it. Since w is an alternating word, there is a letter i + 1 before the next letter i in w, which means that the next inversion containing the integer i is again with an integer y such that i < y . This process is repeated until each pair of integers (i, t), with i < t, is an inversion. It follows that T (w, xiy) = −1.
We now define a subset V of T SO(n), whose elements are alternating words. Moreover, we will prove that the minimum element, in lexicographic order, of any alternating class is an element of the set V .
Definition 30. Let V be the set of words where − in w − I stands for the binary vector (−) n−1 of length n − 1, and I ∪ J is any partition of [n − 1].
Lemma 31. The set V is a subset of AR(w 0 ) with cardinality 2 n−1 . Moreover, the commutation classes of any two distinct words of V are distinct.
Proof. By construction, each word w − I , with I ⊆ [n − 1], is the minimum element, in lexicographic order, of its class, since they are formed by the concatenation of strictly decreasing subwords, with the rightmost letter of a subword strictly smaller than the leftmost letter of the subword sitting on its right. Therefore, each word in V is in a different commutation class, and the number of words in V is the number of subsets of [n − 1].
Example 32. For n + 1 = 6, the set V is formed by the 2 4 words below: Notice that the word w 0 = w − [n−1] ∈ V . As a particular case of Proposition 29, we get the following result.
, for all integer x < i < y.
We will show next that each alternating reduced word in AR(w 0 ) is in a class of an element of V .
Proof. By Lemma 10, the commutation class of w ∈ R(w 0 ) is characterized by the values of T (w, abc), for all triples a < b < c. Proposition 29 shows that it is enough to know the values of T (w, k(k + 1)(k + 2)), for k = 1, . . . , n − 1. Thus, there are at most 2 n−1 commutation classes in AR(w 0 ). Lemma 31 shows that there are exactly 2 n−1 such classes.

Complete moon-polyominoes
Next we give an interpretation of alternating words as standard fillings of certain moonpolyomino Young tableaux.
A diagram δ is a finite subset of the two-dimensional integer lattice Z 2 , which we identify with a set of cells in the plane, using the English convention for the coordinates of each cell, i.e. matrix-like coordinates. The number |δ| of cells in the diagram is the size of δ. A column of δ is the set of cells along a vertical line, and a row is the set of cells along a horizontal line. A diagonal D k of a diagram δ, with k ∈ Z, is the set A diagram δ is convex if for any two cells in a either column or row, the elements of Z 2 in between are also cells of the diagram. It is intersection-free if any two columns are comparable, i.e. the set of row coordinates of cells in one column is contained in the set of row coordinates of cells in the other. For example, the first diagram in Figure 5 is convex but not intersection-free, the second is neither convex nor intersection-free, while the third is a convex intersection-free diagram. Definition 35. A moon-polyomino is a convex intersection-free diagram. A moonpolyomino with exactly n columns is said to be an n-diagonal moon-polyomino if it has a column of length i, for all i ∈ [n], and exactly n diagonals.
For instance, the third diagram in Figure 5 is a moon-polyomino but not a 5-diagonal moon-polyomino. Note that since an n-diagonal moon-polyomino is convex and intersection-free, all columns on the right side of the column of length n are arranged in decreasing order of their lengths, from left to right. Moreover, the top box of each one of these columns are in the same diagonal. We call this set of columns, including the column of length n, the right side of the moon-polyomino. Similarly, all columns on the left side of the column of length n are arranged in increasing order of their lengths, from left to right, and the bottom box of each one of these columns are in the same diagonal. We call these set of columns, excluding the column of length n, the left side of the moon-polyomino. Analogously we define the up side and down side of a moon-polyomino as the subdiagram formed by all rows including and below the row of length n, and as the diagram formed by all rows above the row of length n, respectively.
The shape of an n-diagonal moon-polyomino is completely determined by the sequence of its column lengths, and thus it is identified by that sequence. For example, the shape of the last 5-diagonal moon-polyomino in Figure 6 is (1,5,4,3,2).
Proof. An n-diagonal moon-polyomino is completely characterized by choosing on which side of the moon-polyomino the column of length i will be, for each i ∈ [n − 1]. Figure 6 shows the 2 4 5-diagonal moon-polyominoes. A tableau P of shape δ is an assignment of integers to the cells of δ. If the entries of the cells of P are the integers in [|δ|] = {1, 2, . . . , |δ|}, used exactly once, the tableau is called

standard.
A Young tableau is a tableau in which the entries are increasing down columns, and across rows, from left to right. A standard Young tableau (SYT) is a Young tableau which is also a standard tableau. Figure 7 shows a SYT of the 5-diagonal moon-polyomino of shape (1,3,5,4,2). Stanley [12] proved that the cardinality of R(w 0 ) is given by the number of all SYT with partition shape (n, n − 1, . . . , 1). The number of SYT of shape δ is invariant under reflection in a diagonal line (i, j) → (j, i) or (i, j) → (−j, −i), and reflection in the origin (i, j) → (−i, −j), that is rotation by 180 • [1], which is the composition of the other two reflections.
Let w = w 1 · · · w ∈ AR(w 0 ) be an alternating word with content c(w) = (c 1 , . . . , c n ). We assign to w a tableau P (w) that we will show is a SYT of n-diagonal moon-polyomino shape. This tableau is constructed by the overlapping of n diagonals D i−1 , where each diagonal D i−1 contains the positions of the letters i in w. The first box of D i is placed over or in front of the first box of D i−1 , according to whether the first occurrence of the letter i + 1 in w is before or after the first occurrence of the letter i.
The following algorithm encodes this procedure, by constructing a sequence of tableaux ∅ = P 0 (w), P 1 (w), . . . , P n (w) = P (w), where P i (w) is obtained from P i−1 (w) by overlapping it with the diagonal D i . .
Lemma 38. If w is an alternating word, then P (w) is a Young tableau.
Proof. The alternating property of the subword w |{i,i+1} , for i ∈ [n−1], shows that any two consecutive diagonals of P (w) satisfy the tableau condition, that is the entries increase along rows from left to right, and along columns, from top to bottom. It follows that P (w) is a Young tableau.
Proof. The word w − I can be written as a product of factors w − I = w − i 1 · · · w − i k ·w − n ·w − j · · · w − j 1 . By construction, each of these factors corresponds to a column of P (w − I ), with the number of boxes equal to the length of the corresponding factor. Since all factors w − iq end with the letter 1, then all the columns 1, 2, · · · , k + 1 end in the diagonal D 0 associated with the letter 1, and similarly, since all factor w − jp start with the letter n, then the last + 1 columns start in the same diagonal D n−1 .
Since the indices in I appear in w − I in increasing order, the set of row coordinates of column q is contained in the set of row coordinates of column q + 1, for q = 1, . . . , k, and the same happens with the last + 1 columns. This shows that the shape of P (w − I ) is the n-diagonal moon-polyomino (i 1 , . . . , i k , n, j , . . . , j 1 ).
Denote by s(V ) the set of shapes of the tableaux P (v), with v ∈ V , and let P V be the set of all Young tableaux with shapes in s(V ).
Theorem 40. The map P : AR(w 0 ) → P V , that sends w into P (w), is a bijection. Moreover, w ∼ v if and only if P (v) and P (w) have the same shape.
Proof. Lemma 38 shows that P is well defined. By Algorithm 1, the shape of the tableau P (w), with w ∈ AR(w 0 ), is completely characterized by the subwords w |{i,i+1} for i ∈ [n − 1]. It follows by Lemma 1 that given w, v ∈ AR(w 0 ), we have w ∼ v if and only if P (v) and P (w) have the same shape.
Note also that the map P is invertible. If Q ∈ P V , has the shape of P (w − I ), we can construct a word w over the alphabet {1, 2, . . . , n} by setting the letter i in position k whenever the tableau Q has the integer k in a box of the D i−1 diagonal, for all i ∈ [n]. Since any two consecutive diagonals of Q satisfy the Young tableau condition, it follows that each subword w |{i,i+1} is alternating and satisfy w |{i,i+1} = w − I |{i,i+1} for all i ∈ [n − 1]. By Lemma 1, we have w ∼ w − I , and thus w ∈ AR(w 0 ), with P (w) = Q. This proves that P is a bijection and that w ∼ v if and only if P (v) and P (w) have the same shape. .
Note that the filling of P w − {2,3} is obtained by writing the integers from 1 to 15 down columns, starting from the leftmost one. The tableaux of the words in V are obtained in the same manner.
Corollary 42. The map s : V → s(V ) is a bijection that sends each word v ∈ V to the shape of P (v).
Note that (w − n ) •R = w n and for i = n, w − i and .
Note that P (w 0 ) is a shifted standard Young tableau, i.e. a standard Young tableau of shifted shape given by the strict partition (n, n − 1, . . . , 1). The bijection P extends the bijection between reduced words in the class of w 0 and standard Young tableau of shifted shape given by (n, n − 1, . . . , 1) constructed in [10]. A formula for the number of these standard Young tableau of shifted shape can be found in [11].
Proof. It is proven in [10] that the number of reduced words in the commutation class of w 0 = w − [n−1] is given by (6). This is also the number of elements in the commutation class of the word w − ∅ , since w •R 0 = w − ∅ and •R establishes a bijection between the commutation classes [w − In the next result, we prove that the cardinality of the commutation class of an alternating word v ∈ V is a local maximum; that is, the cardinality of [v] is the largest among all classes connected to it by a single long relation.
Proposition 47. The class [v] is a local maximum, for any alternating reduced word v ∈ V .
Proof. Let I = {i 1 , . . . , i k } and w − I ∈ V , with {j 1 , . . . , j } = [n − 1] \ I and j 1 < · · · < j . A reduced word w / ∈ [w − I ] is connected to some word v ∈ [w − I ] only by a long relation 121 ∼ L 212 or n(n − 1)n ∼ L (n − 1)n(n − 1), since between two consecutive letters i of w − I , with i = 1, n − 1, there is always a letter i − 1 or a letter i + 1, by the definition of an alternating word. A long relation 121 ∼ L 212 is obtained by using short relations in w − I between the letters 1 and 21 of two subwords w − iq and w − i q+1 , respectively (assuming w − i q+1 = w − n if q = k), in order to form a factor 121. Similarly, a long relation n(n − 1)n ∼ L (n − 1)n(n − 1) is obtained by using short relations in w − I between the letters n(n − 1) and n of two subwords w − j p+1 and w − jp , respectively (assuming w − j p+1 = w − n if p = ), in order to form a factor n(n − 1)n.
Let v = t 1 tt 2 ∼ w − I be a word in the commutation class of w − I with a factor t = 121, and let w = t 1 tt 2 ∼ L v, with t = 212. Any sequence of short relation on the factor t 1 or t 2 of w can be replicated in v. Moreover, a sequence of short relations which uses one letter 2 in t can be replicated with the corresponding letter 1 of t. This defines an injection f from the set [w] into [v]. Note also that the sequence of short relations in v that sends the letter 1 of t to the opposite side of the closest letter 3 is not in f ( For instance, when n = 6 we have w − I = 1 · 321 · 54321 · 654321 · 6543 · 65 and w − J = 21 · 4321 · 654321 · 65432 · 654 · 6. Moreover, when restricted to the alternating classes in AR(w 0 ), we conjecture that the classes w 0 = w − [n−1] and w − ∅ are the ones having fewest elements, so that |[w 0 ]| |[w]| |w − I | for any w ∈ AR(w 0 ).