Conjugacy in Patience Sorting monoids
aa r X i v : . [ m a t h . C O ] M a r CONJUGACY IN PATIENCE SORTING MONOIDS
ALAN J. CAIN, ANT ´ONIO MALHEIRO, AND F ´ABIO M. SILVA
Abstract.
The cyclic shift graph of a monoid is the graph whosevertices are the elements of the monoid and whose edges connectelements that are cyclic shift related. The Patience Sorting algo-rithm admits two generalizations to words, from which two kindsof monoids arise, the rps monoid and the lps (also known as Bell)monoid. Like other monoids arising from combinatorial objectssuch as the plactic and the sylvester, the connected components ofthe cyclic shift graph of the rps monoid consists of elements thathave the same number of each of its composing symbols. In thispaper, with the aid of the computational tool SageMath, we studythe diameter of the connected components from the cyclic shiftgraph of the rps monoid.Within the theory of monoids, the cyclic shift relation, amongother relations, generalizes the relation of conjugacy for groups.We examine several of these relations for both the rps and the lpsmonoids. Introduction
Patience Sorting has its origins in the works of Mallows [Mal62,Mal63] and can be regarded as an insertion algorithm on standardwords over a totally ordered alphabet A n = { < < · · · < n } , that is,words over A n containing exactly one occurrence of each of the symbolsfrom A n . As noticed by Burstein and Lankham [BL07], this algorithmcan be viewed as a non-recursive version of Schensted’s insertion al-gorithm. This perspective suggests that a construction similar to theplactic monoid must also hold for this case. The plactic monoid canbe constructed as the quotient of the free monoid over A (the infinitetotally ordered alphabet of natural numbers), A ∗ , by the congruence Key words and phrases.
Patience Sorting algorithm; cyclic shifts; graph;conjugacy.The first author was supported by an Investigador FCT fellowship(IF/01622/2013/CP1161/CT0001).For the first two authors, this work was partially supported by the Funda¸c˜aopara a Ciˆencia e a Tecnologia (Portuguese Foundation for Science and Technology)through the project UID/MAT/00297/2013 (Centro de Matem´atica e Aplica¸c˜oes),and the project PTDC/MHC-FIL/2583/2014.The third author was supported by an FCT Lismath fellowship(PD/BD/52644/2014) and partially supported by the FCT project CEMAT-Ciˆencias UID/Multi/04621/2013. which relates words of A ∗ inserting to the same (semistandard) Youngtableaux under Schensted’s insertion algorithm.According to Aldous and Diaconis [AD99] we can consider two gen-eralizations of Patience Sorting to words, which we will call the rightPatience Sorting insertion and the left Patience Sorting insertion (rPSand lPS insertion, respectively, for short). Considering the alphabet A , these generalizations lead to two distinct monoids, the rPS monoid,denoted by rps, and the lPS monoid (also known in the literature asthe Bell monoid [Rey07]), denoted by lps, which are, respectively, themonoids given by the quotient of A ∗ by the congruence which relateswords having the same insertion under the rPS and lPS insertion.In a monoid M , two elements u and v , are said to be related bya cyclic shift, denoted u ∼ p v , if there exists x, y ∈ M such that u = xy and v = yx . In their seminal work concerning the placticmonoid [LS81], Lascoux and Sch¨utzenberger proved that any two ele-ments in the plactic monoid, plac, having the same evaluation (that is,elements that contain the same number of each generating symbol) canbe obtained one from the other by applying a finite sequence of cyclicshift relations. The same characterization is known to hold for otherplactic-like monoids, such as the hypoplactic monoid [CM17], the Chi-nese monoid [CEK + . Note that all these monoids are multihomogeneous, thatis, they are defined by presentations where the two side of each defin-ing relation contains the same number of each generator. Thus, theevaluation of an element of the monoid corresponds to the evaluationof some (and hence any) word that represents it.The previous results can be rewritten in another form by consideringwhat we will call as cyclic shift graph of a monoid M , denoted K( M ),which is the undirected graph whose vertices are the elements of M andwhose edges connect elements that differ by a cyclic shift. So, if M =plac or M = rps, or their finite analogues, then the results mentionedin the previous paragraph can be restated as saying that the connectedcomponents of K( M ) consist of the elements of M which have thesame evaluation. Thus, it follows that the connected components ofK( M ) are finite. With the aid of the computational tool SageMath westudied the diameter of the connected components of the cyclic shiftgraph K(rps). In SageMath we wrote a program based on the rPSinsertion algorithm, which given a word of A ∗ , outputs the connectedcomponent of K(rps) containing the element of rps that corresponds tothe evaluation of the inserted word .Aiming to parallel the result obtained by Choffrut and Merca¸s [CM13],and refined by Cain and Malheiro [CM17], concerning the maximal di-ameter of connected components of the cyclic shift graph of the plactic ONJUGACY IN PATIENCE SORTING MONOIDS 3 monoid of finite rank, we used the tools available in the SageMath li-brary to construct tables containing the number of vertices and thediameter of connected components from K(rps n ). The experimentalresults obtained from these calculations lead us to establish some con-jectures regarding diameters of specific connected components. In Sec-tion 3, we show that some of these conjectures are in fact true. Inparticular we prove that the maximum diameter of a connected com-ponents of K(rps n ), for n ≥
3, lies between n − n −
4. Wealso draw some conclusions for the diameter of K(rps n ) for particularelements of rps n .The cyclic shift relation previously defined generalizes the usual con-jugacy relation for groups. That is, when considering groups, thecyclic shift relation is just the usual conjugacy relation. Since formonoids this relation is, in general, not transitive, it is natural to con-sider the transitive closure of ∼ p , which we will henceforth denote by ∼ ∗ p . (Note that ∼ ∗ p -classes correspond to connected components of thecyclic shift graph.) We consider two other notions of conjugacy (see[AKM14, AKKM17] for other conjugacy notions, their properties, andrelations among them). The relation ∼ l on M , proposed by Lallementin [Lal79], which can be defined as follows: given u, v ∈ Mu ∼ l v ⇔ ∃ g ∈ M ug = gv. (There is a dual notion ∼ r relating elements for which gu = vg , in-stead.) As this relation is reflexive and transitive but, in general,not symmetric, in [Ott84], Otto considered the equivalence relation ∼ o given by the intersection of ∼ l and ∼ r .All the mentioned relations are equal in the group case, and inany monoid, ∼ p ⊆ ∼ ∗ p ⊆ ∼ o ⊆ ∼ l (cf. [AKM14]). Denoting by ∼ ev the binary relation that pairs elements with the same evaluation,it is easy to see that for multihomogeneous monoids ∼ l ⊆ ∼ ev (cf.[CM15, Lemma 3.2]), and thus for all the above multihomogeneousmonoids (plactic, hypoplactic, chinese, sylvester, taiga and rPS) wehave ∼ ∗ p = ∼ o = ∼ l = ∼ ev . This property, is not a general property ofmultihomogeneous monoids, as it is known that in the stalactic monoidconnected components of the cyclic shift graph are properly containedin ∼ ev [CM17, Proposition 7.2]. In this paper we show that a similarsituation occurs for lPS monoids of rank greater than 1, since we willprove that ∼ l ( ∼ ev in these cases.2. Preliminaries and notation
In this section we introduce the fundamental notions that we willuse along the paper. For more details regarding these concepts checkfor instance [CMS17], [Lot02], and [How95].
ALAN J. CAIN, ANT ´ONIO MALHEIRO, AND F ´ABIO M. SILVA
Words and presentations.
In this paper, we denote by A theinfinite totally ordered alphabet { < < . . . } , that is, the set ofnatural numbers with the usual order viewed as an alphabet. For any n ∈ N , the resriction of A to the first n natural numbers is denoted by A n .In general, if Σ is an alphabet, then Σ + denotes the free semigroup over Σ, that is, the set of non-empty words over Σ, and if ε denotesthe empty word, then the free monoid over Σ is Σ ∗ = Σ + ∪ { ε } .Next, we define several concepts that are directly related with thenotion of word. Let w ∈ A ∗ . Then: • a word u ∈ A ∗ , is said to be a factor of w if there exist words v , v ∈ A ∗ , such that w = v uv ; • for any symbol a in A , the number of occurrences of a in w , isdenoted by | w | a ; • the content of w , is the set cont( w ) = (cid:8) a ∈ A : | w | a ≥ (cid:9) ; • the evaluation of w , denoted by ev( w ), is the sequence of non-negative integers whose a -th term is | w | a , for any a ∈ A ; • the word is said to be standard if each symbol from A n , for agiven n , occurs exactly once.A monoid presentation is a pair (Σ , R ), where Σ is an alphabet and R ⊆ Σ ∗ × Σ ∗ . We say that a monoid M is defined by a presentation (Σ , R ) if M ≃ Σ ∗ / R , where R is the smallest congruence containing R (see [How95, Proposition 1.5.9] for a combinatorial description of thesmallest congruence containing a relation).A presentation is multihomogeneous if, for every relation ( w, w ′ ) ∈ R ,we have ev( w ) = ev( w ′ ), in other words, if w and w ′ contain the samenumber of each of its composing symbols. Then, a monoid is multi-homogeneous if there exists a multihomogeneous presentation definingthe monoid.2.2. PS tableaux and insertion. In this subsection we recall thebasic concepts regarding patience sorting tableaux , and the insertionon such tableaux .A composition diagram is a finite collection of boxes arranged inbottom-justified columns, where no order on the length of the columnsis imposed. Let Σ be a totally ordered alphabet. Then, an lPS (resp.rPS) tableau over Σ is a composition diagram with entries from Σ, sothat the sequence of entries of the boxes in each column is strictly (resp.,weakly) decreasing from top to bottom, and the sequence of entries ofthe boxes in the bottom row is weakly (resp., strictly) increasing from
ONJUGACY IN PATIENCE SORTING MONOIDS 5 left to right. So, if(1) R = 44 5 31 1 2 and S = 54 41 31 2 , then R is an lPS tableau , and S is an rPS tableau both over A n , for n ≥
5. Henceforth, we shall often refer to an lPS tableau or to an rPStableau simply as a PS tableau, not distinguishing the cases wheneverthey can be dealt in a similar way.The left and right Patience Sorting monoids can be given as thequotient of the free monoid A ∗ over the congruence which relates wordsthat yield the same PS tableau under a certain algorithm [CMS17, § lps (), P rps () instead of, respectively, R ℓ (), R r () used in [CMS17].) Algorithm 2.1 (PS insertion of a word) . Input:
A word w over a totally ordered alphabet Σ. Output:
An lPS tableau P lps ( w ) (resp., rPS tableau P rps ( w )). Method: (1) If w = ε , output an empty tableau ∅ . Otherwise:(2) w = w · · · w n , with w , . . . , w n ∈ Σ. SettingP lps ( w ) = w = P rps ( w ) , then, for each remaining symbol w j with 1 < j ≤ n , denoting by r ≤ · · · ≤ r k (resp., r < · · · < r k ) the symbols in the bottomrow of the tableau P lps ( w · · · w j − ) (resp., P rps ( w · · · w j − )),proceed as follows: • if r k ≤ w j (resp., r k < w j ), insert w j in a new column tothe right of r k in P lps ( w · · · w j − ) (resp., P rps ( w · · · w j − )); • otherwise, if m = min (cid:8) i ∈ { , . . . , k } : w j < r i (cid:9) , (resp. m =min (cid:8) i ∈ { , . . . , k } : w j ≤ r i (cid:9) ) construct a new empty boxon top of the column of P lps ( w · · · w j − ) (resp. P rps ( w · · · w j − ))containing r m . Then bump all the symbols of the columncontaining r m to the box above and insert w j in the boxwhich has been cleared and previously contained the sym-bol r m .Output the resulting tableau .Observe that the insertion of a given word w = w · · · w n underAlgorithm 2.1 is obtained through the insertion of each of its symbols,from left to right in the previously obtained tableaux (starting with theempty tableaux ∅ ). For instance, if R is the tableau from Example 1, ALAN J. CAIN, ANT ´ONIO MALHEIRO, AND F ´ABIO M. SILVA and u = 4511432 ∈ A ∗ , then P lps ( u ) = R (see Figure 1). The readercan check that P rps ( u ) = S . ∅ ←− ←− ←−
41 5 ←− ←− ←− ←−
44 5 31 1 2 = P lps ( u ) . Figure 1. lPS insertion of the word w = 4511432,where the symbol below the arrow indicates the symbolthat is going to be inserted on each step.2.3. The Patience Sorting monoids.
For each x ∈ { l , r } , we definea binary relation ≡ xps in A ∗ in the following way: given u, v ∈ A ∗ , u ≡ xps v iff P xps ( u ) = P xps ( v ) . This relation is a congruence [CMS17, Proposition 3.21], and the quo-tient of A ∗ by ≡ lps is the so-called lPS monoid, denoted lps, and thequotient of A ∗ by ≡ rps is the rPS monoid which is denoted by rps. Therank- n analogues of these monoids, denoted by lps n and rps n , are ob-tained by restricting the alphabet and the relation to the set A ∗ n . Notethat each equivalence class of these monoids is represented by a uniquetableau, and hence we will identify elements of the monoid with theirtableaux representation.Words yielding the same PS tableau (and hence in the same ≡ xps -class) have necessarily the same content, and even the same evaluation.Thus, we can refer to the content and evaluation of an element of themonoid, and similarly to the content and evaluation of a tableau. Also,we shall refer to an element of xps n (or to its tableau representative)as standard if one (and hence any) of its words in the ≡ xps -class hasone occurrence of each of the symbols from A n .As shown in [CMS17, § § A ∗ , R lps ) and ( A ∗ , R rps ), where R lps = { ( yux, yxu ) : m ∈ N , x, y, u , . . . , u m ∈ A ,u = u m · · · u , x < y ≤ u < · · · < u m } and R rps = { ( yux, yxu ) : m ∈ N , x, y, u , . . . , u m ∈ A ,u = u m · · · u , x ≤ y < u ≤ · · · ≤ u m } . Hence, the left and right Patience Sorting monoids, and their finiterank analogues, are multihomogeneous monoids.
ONJUGACY IN PATIENCE SORTING MONOIDS 7
We have seen how to obtain a PS tableau from a word in A ∗ . Now,we explain how to pass from PS tableaux to words representing suchdiagrams. Given x ∈ { l , r } and an x PS tableau P , the column readingof P is the word obtained from reading the entries of the x PS tableau P , column by column, from the leftmost to the rightmost, starting onthe top of each column and ending on its bottom. For example, thecolumn reading of the lPS tableau R in Example 1 is 41 51 432, whilethe column reading of the rPS tableau S is 411 5432.3. Combinatorics of cyclic shifts
As noted in the introduction, the cyclic shift graph of a monoid M ,K( M ), is the undirected graph with vertex set M , whose edges connectvertices that differ by a single cyclic shift. Since, rps is a multihomoge-neous monoid, we have ∼ ∗ p ⊆ ∼ ev , and thus each connected componentof K(rps) cannot contain elements with different evaluations and there-fore they have finitely many vertices.Our goal in this subsection is to study the diameter of the connectedcomponents from K(rps n ), which as we will show are bounded by avalue that depends on the rank n . Note that in [CM17, Example 3.1],the authors provide a finitely presented multihomogeneous monoid forwhich the connected components of the cyclic shift graph have un-bounded diameter. Therefore, these are not particular cases of a moregeneral result that holds for all multihomogeneous monoids.The experimental results within this subsection were obtained withthe aid of SageMath [The17]. This computational tool allowed us towrite a program for which: given an element of rps n , provides theconnected component from the cyclic shift graph of rps n containingthat element.The program starts by creating a vertex for each word from A ∗ n thathas the same evaluation as the given element from rps n . Afterwards,it adds edges between the words that are cyclic shift related. Finally,by merging the vertices whose x PS insertion is the same into a singlevertex, it constructs the connected component of the cyclic shift graphof rps n , K(rps n ), containing the given element from rps n .For instance in Figure 2 we show the connected component of thecyclic shift graph of rps containing the element P rps (1234) that can beseen to have diameter 4.The results of computer experimentation on the diameter of con-nected compontents is shown in Tables 1 and 2. In Table 1 we presentthe diameter and number of vertices in the connected component of thecyclic shift graph of standard elements of lengths 1 up to 9, whereas inTable 2 the same information is presented but for some (non-standard)words of given fixed evaluations.The results in Table 1 suggest the following: ALAN J. CAIN, ANT ´ONIO MALHEIRO, AND F ´ABIO M. SILVA
Figure 2.
The connected component of the standardelement P rps (1234) of rps , omitting the loops at eachvertex for clarity of the picture. Table 1.
Examples of diameter and number of verticesin the connected component of the cyclic shift graphK(rps) for given evaluations of standard elements.Length ofstandardword Number ofvertices inconnectedcomponent Diameter ofconnectedcomponent Diameter asa function ofword length1 1 0 n −
12 2 1 n −
13 5 2 2 n −
44 15 4 2 n −
45 52 6 2 n −
46 203 8 2 n −
47 877 10 2 n −
48 4140 12 2 n −
49 21147 14 2 n − ONJUGACY IN PATIENCE SORTING MONOIDS 9
Conjecture 3.1.
The diameter of a connected component of K(rps)containing a standard element of length n ≥ n − Conjecture 3.2.
The diameter of a connected component of K(rps)containing an element with n ≥ n − n − Table 2.
Examples of diameter and number of verticesin the connected component of the cyclic shift graphK(rps) for given evaluations of non-standard elements.Evaluation Number ofvertices inconnectedcomponent Diameter ofconnectedcomponent Diameter asa function ofevaluationlength(5) 1 0 n − n − n − n − n − n − n = 2 n − n = 2 n − n − n − n + 1 = 2 n − n + 1 = 2 n − n = 2 n − n + 2 = 2 n − n + 2 = 2 n − n + 1 = 2 n − n + 3 = 2 n − n + 3 = 2 n − n + 2 = 2 n − n + 4 = 2 n − Lemma 3.3.
All elements of rps containing two symbols, with the sameevaluation, form a connected component of
K(rps) . Furthermore, thecomponent has diameter .Proof. As already noticed each connected component of K(rps) can-not contain elements with different evaluations. Let u and v be twoelements of rps with the same evaluation such that (cid:12)(cid:12) cont( w ) (cid:12)(cid:12) = 2.Suppose without loss of generality that cont( w ) = { , } . Then, theseelements are of the form P rps (2 i j k ), for some i, k ∈ N and i + k, j ∈ N .So, u = P rps (2 i j k ) and v = P rps (2 l n m ) with j = n and i + k = l + m .Therefore, v = P rps (2 l j m ) and we consider the following cases:If i ≥ l , then k + i − l = m . Setting x = P rps (2 i − l ) and y =P rps (2 l j k ), we have u = P rps (2 i − l l j k ) = P rps (2 i − l )P rps (2 l j k ) = xy and v = P rps (2 l j k i − l ) = P rps (2 l j k )P rps (2 i − l ) = yx. Otherwise, if i < l , then m + l − i = k . Setting x = P rps (2 i j m ) and y = P rps (2 l − i ), we get u = P rps (2 i j m l − i ) = P rps (2 i j m )P rps (2 l − i ) = xy and v = P rps (2 l − i i j m ) = P rps (2 l − i )P rps (2 i j m ) = yx. In both cases, u ∼ p v . Therefore, the diameter of the connected compo-nent from K(rps) containing such elements is 1. The result follows. (cid:3) In the following lemma we provide an upper bound for the diameterof the connected components from K(rps) of elements whose content isgreater or equal to 3, thus answering the upper bound part of Conjec-ture 3.2.By observing several connected components obtained with the pro-gram constructed with SageMath, we concluded that for any element w ∈ rps, with cont( w ) = { , . . . , n } and n ≥
3, the elementP rps (cid:16) ( n − | w | n − ( n − | w | n − · · · | w | | w | | w | n | w | n (cid:17) plays a key role in the connected component of K(rps) which contains w . For instance, in Figure 2, we see that the elementP rps (3214) = 321 4is in the center of the connected component. Using this insight we wereable to prove the following result: Lemma 3.4.
All elements of rps containing n ≥ symbols, with thesame evaluation, form a connected component of K(rps) . Furthermore,the component has diameter at most n − . ONJUGACY IN PATIENCE SORTING MONOIDS 11
Proof.
Let w be an element of rps with (cid:12)(cid:12) cont( w ) (cid:12)(cid:12) = n ≥
3. Supposewithout loss of generality that cont( w ) = { , . . . , n } . Since each con-nected component of K(rps n ) cannot contain elements with differentevaluations, to prove this result, it suffices to check that from w , byapplying at most n − w ′ = P rps (cid:16) ( n − | w | n − ( n − | w | n − · · · | w | | w | n | w | n (cid:17) of rps.We will construct a path in K(rps n ) from w to w ′ of length at most n −
2. We aim to find a sequence w , w , . . . , w n − of elements of rps n such that w = w , w ′ = w n − , and w i ∼ p w i +1 , for i = 0 , . . . , n − w . If w has only one column, then w has column reading n | w | n ( n − | w | n − ( n − | w | n − · · · | w | | w | andapplying one cyclic shift we get the intended result. Suppose w has atleast two columns. Let k (necessarily k ≥
2) be the bottom symbol ofthe second column of w . Observe that any symbol j less than k mustlie in the first column of w . Set w = w = · · · = w k − . We calculate theelement w k from w in the following way. Consider the column reading ukv , of w , for u, v ∈ A ∗ n , where u is the prefix just up to before thefirst occurrence of a symbol k occurring in the second column. Fix w k = P rps ( kv )P rps ( u ). Note that w = P rps ( u )P rps ( kv ) and so w ∼ p w k .Then, the first column of w k has column reading k | w | k . . . | w | | w | ,because all symbols in v are greater or equal to k , and symbols in u thatare strictly less than k appear in decreasing order. For i ∈ { k, . . . , n − } , let w i = P rps ( u ) P rps (cid:0) ( i + 1) v (cid:1) where u is the prefix of the columnreading of w i up to just before the first occurrence of a symbol i + 1 (inthe second column) and let w i +1 = P rps (cid:0) ( i + 1) v (cid:1) P rps ( u ). Using thisprocess we ensure that the first column of w i +1 is preciselyP rps (cid:16) ( i + 1) | w | i +1 i | w | i · · · | w | | w | (cid:17) . The result follows by induction. (cid:3)
Regarding the lower bound of Conjecture 3.2, we are only able toestablish it for standard elements of K(rps). To prove such a result, wewill use the notion of cocharge sequence for standard words over A andfollow an approach similar to the one used in the case of the placticmonoid in [CM17]. Note that it will be sufficient to prove the resultfor standard words over the alphabet A n .For any standard word w over A n , the cocharge labels from the sym-bols of w are calculated as follows: • draw a circle, place a point ∗ somewhere on its circumference,and, starting from ∗ , write w anticlockwise around the circle; • let the cocharge label of the symbol 1 be 0; • iteratively, suppose the cocharge label of the symbol a from w is k , then proceed clockwise from the symbol a to the symbol a + 1 and: – if the symbol a + 1 of w is reached without passing thepoint ∗ , then the cocharge label of a + 1 is k ; – otherwise, if the symbol a + 1 is reached after passing thepoint ∗ , then the cocharge label of a + 1 is k + 1.The cocharge sequence of a standard word w , cochseq( w ), is the se-quence of the cocharge labels from the symbols of w , whose a -th termis the cocharge label from the symbol a of w . So, it follows from thedefinition that if w is a standard word over A n , then cochseq( w ) is asequence of length n .For example, the labelling of the standard word w = 4572631 over A , proceeds in the following way w L a b e l l i n g ∗
45 7 2 6 31
22 23 01 1 and thus cochseq( w ) = (0 , , , , , , Lemma 3.5.
For standard words u, v over A n , if u ≡ rps v , then cochseq( u ) = cochseq( v ) .Proof. It is enough to show that any two standard words over A n suchthat one is obtained from the other by applying a relation from R rps n have the same cocharge sequence.So, there is a factor yu i · · · u x of one of the standard words, with x, y, u , . . . , u i ∈ A n and x < y < u < · · · < u i , that is changed to thefactor yxu i · · · u of the other. Given any symbol a ∈ A n \ { } , whenapplying such relation, the relative position between the symbols a and a − a − a in one of the standard words, then a − a in the other. Thus, equal symbols of these standard wordshave the same cocharge label and therefore the cocharge sequence ofthese words is the same. (cid:3) Given a standard element u of rps n on n generators, let cochseq( u )be cochseq( w ) for any word w ∈ A ∗ n such that P rps ( w ) = u . Using theprevious lemma we conclude that cochseq( u ) is well-defined. ONJUGACY IN PATIENCE SORTING MONOIDS 13
Lemma 3.6.
The diameter of a connected component of
K(rps n ) , with n ≥ , containing a standard element is at least n − .Proof. The case n = 2 follows from Lemma 3.3. Suppose n ≥ u = P rps (1 · · · · n ) and v = P rps (cid:0) n ( n − · · · (cid:1) of rps n are in the same connected component of K(rps) by Lemma 3.4.Now, notice that cochseq( u ) = (0 , , . . . ,
0) and that cochseq( v ) =(0 , , . . . , n − n − u and v are at distance of at least n − (cid:3) For instance, in Figure 2, the distance between the elementsP rps (1234) = 1 2 3 4 and P rps (4321) = 4321in that connected component is precisely 3, which is in accordance withthe previous result.Since for standard words the cyclic shif graphs K(lps) and K(rps)coincide, the previous result also give us a lower bound for connectedcomponents of standard words of K(lps).Combining Lemmata 3.3, 3.4 and 3.6 we get
Theorem 3.7. (1) Connected components of
K(rps) coincide with ∼ ev -classes of rps .(2) The maximum diameter of a connected component of K(rps n ) is n − , for n = 1 , , and lies between n − and n − , for n ≥ . Other observations from computer experimental results lead us toconclude that the number of vertices in a given connected componentis equal to the number of vertices in the connected component thathas one more symbol 1. This makes sense since the elements of thenew connected component will be the elements of the former with anadditional symbol 1 in the bottom of the first column.Also, it seems that in a standard component, the addition of a newsymbol 1 leads to a connected component whose diameter can possiblydecrease by 2 when compared with the original. In fact, we were ableto establish the following result:
Lemma 3.8.
Let w be an element of rps , with n ≥ symbols, such thatthe minimum symbol of w has at least two occurences, and the secondsmallest symbol only occurs once. Then the diameter of the connectedcomponent of K(rps) containing w is at most n − . Proof.
Without lost of generality, suppose that cont( w ) = { , . . . , n } ,with n ≥
4. The proof strategy is similar to the proof of Lemma 3.4.We aim to construct a path in K(rps) from w to w ′ = P rps (cid:16) | w | ( n − | w | n − ( n − | w | n − · · · | w | n | w | n (cid:17) by applying at most n − w of rps, under the given assumptions, we will distin-guish particular readings of its tableau representation. For simplicity,we call these readings delayed column readings . Note that the symbol1 occurs more than once, and that all symbols 1 appear on the bottomof the first column of such tableaux. If we proceed as in the columnreading, but we read the symbol on the bottom of the first column(necessarily a symbol 1) latter on, we obtain a delayed column reading.Following Algorithm 2.1, it is clear that all these words correspondingto delayed column readings also insert to the same element. For exam-ple, the element S of (1) has column reading 411 5432 and has delayedcolumn readings, 4151432, 4154132, 4154312, and 4154321.If the tableau representation of w has only one column, then it hasthe form P rps (cid:16) n | w | n ( n − | w | n − ( n − | w | n − · · · | w | | w | (cid:17) which is cyclic shift related toP rps (cid:16) ( n − | w | n − ( n − | w | n − · · · | w | | w | n | w | n (cid:17) which in turn has delayed column reading( n − | w | n − ( n − | w | n − · · · | w | | w | − n | w | n . By applying a cyclic shift we get the intended form since w ′ = P rps (cid:16) n − | w | n − ( n − | w | n − · · · | w | | w | − n | w | n (cid:17) . Otherwise, suppose first that the bottom symbol of the second col-umn is 2. Note that the symbol 3 can appear in the first three columnsof w , and if it appears in the third column, then its bottom symbol isa 3. Consider the delayed column reading of w , u v , where u is theprefix up to before the first occurence of a symbol 3 in the rightmost col-umn where a symbol 3 appears (necessarily on the first three columns).So, either u or v has the unique symbol 2, and if u or v has the symbol2 then all symbols 3 appear to its left. Let w = P rps (13 v )P rps ( u ), andso w ∼ p w , since w = P rps ( u )P rps (13 v ). The first column of w hascolumn reading 1 | w | and the second column 3 | w | k > w , u kv , where u is the prefixup to before the first occurence of a symbol k in the second column.Note that all symbols in v are greater or equal to k , and symbols in u that are strictly less than k appear in decreasing order (from left to ONJUGACY IN PATIENCE SORTING MONOIDS 15 right). Let w k = P rps (1 kv )P rps ( u ), and so w ∼ p w k . The first columnof w k has column reading 1 | w | and the second column k | w | k · · · | w | n ) from w k to w ′ of length at most n −
4, by considering a sequence w k , . . . , w n − of elements of rps n , with k ≥
3, such that w ′ = w n − , and w i ∼ p w i +1 , for i = k, . . . , n − i ∈ { k, . . . , n − } , let w i = P rps ( u ) P rps (cid:0) i + 1) v (cid:1) where u isthe prefix of the delayed column reading u i + 1) v of w i up to justbefore the first occurrence of a symbol i + 1 (on the third column)and let w i +1 = P rps (cid:0) i + 1) v (cid:1) P rps ( u ). Note that all symbols in v aregreater or equal to i + 1, and all symbols in u that are strictly less than i + 1 appear in decreasing order (from left to right). Thus the two firstcolumns of w i +1 have column readings 1 | w | and ( i +1) | w | i +1 i | w | i . . . | w | (cid:3) Conjugacy in the lPS and rPS monoids
Restating the results of Section 3 in terms of the conjugacy relation ∼ p we have shown that in rps n we have ∼ p = ∼ ev , for n ∈ { , } ; andthat ∼ p ( ∼ ∗ p = ∼ ev , for n >
2. Thus, ∼ ∗ p = ∼ ev in the (infinite rank)right Patience Sorting monoid. In all cases, we deduce that any of theconjugacy relations ∼ ∗ p , ∼ o , and ∼ l coincides with ∼ ev .The rPS case proves to be distinct from the lPS case. In lps , it isimmediate that ∼ p = ∼ ev , but for n ≥
2, we will see that ∼ p ( ∼ ∗ p and ∼ l ( ∼ ev , in lps n , and thus in lps. Whether the inclusion ∼ ∗ p ⊆ ∼ l is strict or, in fact an equality, is left as an open question. Proposition 4.1.
For any n ≥ , in lps n we have ∼ p ( ∼ ∗ p .Proof. From Lemma 3.6, we deduce that ∼ p ( ∼ ∗ p , for lps n with n ≥ case, consider the elements P lps (21121) and P lps (21112)of lps . We have thatP lps (21121) = P lps (211)P lps (21) ∼ p P lps (21)P lps (211) = P lps (21211)= P lps (22111) = P lps (2)P lps (2111) ∼ p P lps (2111)P lps (2)= P lps (21112) , and so P lps (21121) ∼ ∗ p P lps (21112) in lps . It is easy to check thatP lps (21121) ≁ p P lps (21112) in lps . Indeed, notice that the uniquewords u and v of A ∗ such that P lps ( u ) = P lps (21121) and P lps ( v ) =P lps (21112) are precisely, 21121 and 21112, respectively. Moreover, ifP lps (21121) = P lps ( st ), for words s, t ∈ A ∗ , then P lps ( ts ) = P lps (21112).Resuming, we have a pair of elements of lps which belong to ∼ ∗ p butnot to ∼ p . (cid:3) In order to prove that ∼ l ( ∼ ev , in lps n , we first prove two auxiliaryresults. Lemma 4.2.
For any k, n ∈ N and u, v ∈ lps k , if n ≥ k , then: u ∼ l v in lps n ⇔ u ∼ l v in lps k . Proof.
Let u, v ∈ lps k and n ≥ k . Suppose that u ∼ l v in lps n . Notethat u and v have the same evaluation. There exists g ∈ lps n such that ug = gv . If g is the identity then the result holds trivially. Assumethat the tableau representation of g has j columns.Since ug = gv , then u g = uug = ugv = gvv = gv . Using the samereasoning, it follows that for any i ≥ u i g = gv i . Note that if a isthe minimum symbol occuring in u , then u i has bottom row beginning(from left to right) with (at least) i symbols a .Suppose g has a symbol greater than k . As cont( u ) ⊆ A k , thesymbols from g that are greater or equal than k have to be inserted inthe tableau representation of u j to the right of the first j columns. Now,in the tableau representation of gv i , the symbols from g are insertedinto the first j columns. This is a contradiction, since u i g = gv i . Soall symbols from g are less or equal than k , that is, g ∈ lps k .The converse direction of the lemma is obvious from the definitionof ∼ l . (cid:3) Let C = (cid:8) P lps (1) , P lps (21) (cid:9) . As proved in [CMS17, Proposition 4.1],the submonoid of lps generated by C , denoted h C i , is free. Ob-serve that the elements of h C i are precisely the elements of lps whosetableau representation has bottom row filled with symbols 1. Lemma 4.3.
For any u, v ∈ h C i and n ≥ , u ∼ l v in lps n ⇔ u ∼ l v in h C i . Proof.
Let u, v ∈ h C i , n ≥ u ∼ l v in lps n . Supposethat u ∈ h P lps (21) i . Since u ∼ ev v , then also v ∈ h P lps (21) i , and thus u = v . Therefore the result holds.Suppose now that u / ∈ h P lps (21) i . Then at least one of the columnsof the tableau representation of u has height one and is filled withthe symbol 1. Note that the tableau representation of v has the samenumber of columns of heigth two, and the same number of columns ofheigth one (and each such box is filled with the symbol 1).Let g ∈ lps n be such that ug = gv . By the previous lemma we canassume g ∈ lps . If g is the identity then the result holds trivially.Suppose that the tableau representation of g has at least one columnwith height one filled with the symbol 2. Attending to Algorithm 2.1and since the bottom row of u is filled with the symbol 1, ug is repre-sented by a tableau that is composed by the columns of u followed bythe columns of g .Now, the tableau representation of gv has at least one less column.Indeed, consider the column reading of the tableau representation of v , which is a word from { , } ∗ , where at least one single symbol 1 isused, that is, it does not belong to { } ∗ . Applying Algorithm 2.1 we ONJUGACY IN PATIENCE SORTING MONOIDS 17 will first insert symbols from g , and get the tableau representation of g , followed by the insertion of the column reading from v . Now, eachtime a word 21 is inserted we obtain a new column, but the first time asingle symbol 1 is inserted it will take place in the leftmost column ofheight one filled with the symbol 2, becoming a column of heigth twoand column reading 21. Thus, the tableau representation of gv cannothave the same number of columns as the tableau representation of ug .This is a contradiction. Therefore, the tableau representation of g hasbottom row filled with the symbol 1, and hence g ∈ h C i .Since the converse direction is immediate, the result follows. (cid:3) Proposition 4.4.
For the lPS monoid of rank n , with n ≥ , we have ∼ l ( ∼ ev . Proof.
In the free monoid of rank 2 the relation ∼ ∗ p is equal to ∼ l [LS67,Theorem 3], and it is properly contained in ∼ ev (For example, in A ∗ ,there are words with the same evaluation 2121 and 2112, for which2121 ≁ l η : A ∗ → lps n given by 1 P lps (1) and2 P lps (21). This map yields an isomorphism between A ∗ and thefree submonoid of lps n , h C i . Using the example of the first paragraphand the isomorphism, we conclude that the elements P lps (211211) andP lps (211121) of h C i that have the same evaluation, satisfy P lps (211211) ≁ l P lps (211121) in h C i . By Lemma 4.3 we get P lps (211211) ≁ l P lps (211121)in lps n . The result follows. (cid:3) Regarding the relation between ∼ ∗ p and ∼ l in the lPS monoids ofrank greater or equal than 3 we leave the following: Open Problem 4.5.
In any multihomogeneous monoid the inclusion ∼ ∗ p ⊆ ∼ l holds. For the lPS monoid of rank n , lps n , with n ≥
3, is theinclusion strict, or does the equality hold?Considering this problem we were able to prove the following result:
Proposition 4.6.
Let u, v be elements of lps n with exactly two symbols(with possible multiple occurrences) and n ≥ . In lps n , the followingholds u ∼ ∗ p v ⇔ u ∼ l v. Proof.
Without lost of generality, assume that u, v ∈ lps and that u ∼ l v in lps n . Hence u ∼ ev v and thus for a ∈ A , the number ofsymbols a in u and v is the same.As u, v ∈ lps , u = P lps ( u ′ u ′′ ) and v = P lps ( v ′ v ′′ ) where P lps ( u ′ ) , P lps ( v ′ ) ∈h C i , and P lps ( u ′′ ) , P lps ( v ′′ ) ∈ h P lps (2) i . Note that u ∼ p P lps ( u ′′ u ′ ) and v ∼ p P lps ( v ′′ v ′ ) in lps n .We consider two cases. If | u ′ u ′′ | ≥ | u ′ u ′′ | , then P lps ( u ′′ u ′ ) = P lps (cid:0) (21) i j (cid:1) and P lps ( v ′′ v ′ ) = P lps (cid:0) (21) k l (cid:1) for some i, j, k, l ∈ N . As | u ′′ u ′ | a = | v ′′ v ′ | a for all a ∈ A , we deduce that i = k and i + j = k + l , andthus it follows that j = l . So, we conclude that P lps ( u ′′ u ′ ) = P lps ( v ′′ v ′ ).Therefore u ∼ p P lps ( u ′′ u ′ ) = P lps ( v ′′ v ′ ) ∼ p v and thus u ∼ ∗ p v in lps n .Now suppose that | u ′ u ′′ | > | u ′ u ′′ | . In this case P lps ( u ′′ u ′ ) , P lps ( v ′′ v ′ ) ∈h C i . As in lps n P lps ( u ′′ u ′ ) ∼ p u , u ∼ l v , P lps ( v ′′ v ′ ) ∼ p v and ∼ p ⊆ ∼ l ,it follows that P lps ( u ′′ u ′ ) ∼ l P lps ( v ′′ v ′ ) in lps n , by the transitivity of ∼ l . Hence, by Lemma 4.3, P lps ( u ′′ u ′ ) ∼ l P lps ( v ′′ v ′ ) in the free monoid h C i . In a free monoid we have ∼ ∗ p = ∼ l [LS67, Theorem 3]. ThereforeP lps ( u ′′ u ′ ) ∼ ∗ p P lps ( v ′′ v ′ ) in h C i . So, P lps ( u ′′ u ′ ) ∼ ∗ p P lps ( v ′′ v ′ ) in lps n .Combining this with fact that u ∼ p P lps ( u ′′ u ′ ) and P lps ( v ′′ v ′ ) ∼ p v inlps n , it follows that u ∼ ∗ p v in lps n .In both cases u ∼ ∗ p v in lps n and the result follows. (cid:3) References [AD99] David Aldous and Persi Diaconis. Longest increasing subsequences:from patience sorting to the Baik-Deift-Johansson theorem.
Bull.Amer. Math. Soc. (N.S.) , 36(4):413–432, 1999.[AKKM17] Jo˜ao Ara´ujo, Michael Kinyon, Janusz Konieczny, and Ant´onio Mal-heiro. Four notions of conjugacy for abstract semigroups.
Proceed-ings of the Royal Society of Edinburgh: Section A Mathematics ,147(6):1169–1214, 2017.[AKM14] Jo˜ao Ara´ujo, Janusz Konieczny, and Ant´onio Malheiro. Conjugation insemigroups.
Journal of Algebra , 403:93 – 134, 2014.[BL07] Alexander Burstein and Isaiah Lankham. Combinatorics of patiencesorting piles.
S´em. Lothar. Combin. , 54A:Art. B54Ab, 19, 2005/07.[CEK +
01] Julien Cassaigne, Marc Espie, Daniel Krob, Jean-Christophe Novelli,and Florent Hivert. The Chinese monoid.
Internat. J. Algebra Comput. ,11(3):301–334, 2001.[CM13] Christian Choffrut and Robert Merca¸s. The lexicographic cross-sectionof the plactic monoid is regular. In Juhani Karhum¨aki, Arto Lepist¨o,and Luca Zamboni, editors,
Combinatorics on Words: 9th Interna-tional Conference, WORDS 2013, Turku, Finland, September 16-20.Proceedings , pages 83–94, Berlin, Heidelberg, 2013. Springer Berlin Hei-delberg.[CM15] Alan James Cain and Ant´onio Malheiro. Deciding conjugacy insylvester monoids and other homogeneous monoids.
Internat. J. Al-gebra Comput. , 25(5), 8 2015.[CM17] Alan J. Cain and Ant´onio Malheiro. Combinatorics of cyclic shifts inplactic, hypoplactic, sylvester, baxter, and related monoids, 2017.[CMS17] Alan J. Cain, Ant´onio Malheiro, and F´abio M. Silva. The monoids ofthe patience sorting algorithm, 2017.[HNT03] Florent Hivert, Jean-Christophe Novelli, and Jean-Yves Thibon. Ananalogue of the plactic monoid for binary search trees. In
Proceedingsof WORDS’03 , volume 27 of
TUCS Gen. Publ. , pages 27–35. TurkuCent. Comput. Sci., Turku, 2003.[HNT05] F. Hivert, J.-C. Novelli, and J.-Y. Thibon. The algebra of binary searchtrees.
Theoret. Comput. Sci. , 339(1):129–165, 2005.[How95] J.M. Howie.
Fundamentals of Semigroup Theory . LMS monographs.Clarendon Press, 1995.
ONJUGACY IN PATIENCE SORTING MONOIDS 19 [Lal79] G´erard Lallement.
Semigroups and combinatorial applications . JohnWiley & Sons, New York-Chichester-Brisbane, 1979. Pure and AppliedMathematics, A Wiley-Interscience Publication.[Lot02] M. Lothaire.
Algebraic combinatorics on words , volume 90 of
Encyclo-pedia of Mathematics and its Applications . Cambridge University Press,Cambridge, 2002.[LS67] Andr´e Lentin and Marcel-Paul Sch¨utzenberger. A combinatorial prob-lem in the theory of free monoids.
Proc. University of North Carolina ,pages 128–144, 1967.[LS81] Alain Lascoux and Marcel-P. Sch¨utzenberger. Le mono¨ıde plaxique.In
Noncommutative structures in algebra and geometric combinatorics(Naples, 1978) , volume 109 of
Quad. “Ricerca Sci.” , pages 129–156.CNR, Rome, 1981.[Mal62] C. L. Mallows. Patience sorting.
SIAM Review , 4(2):148–149, apr 1962.[Mal63] C. L. Mallows. Patience sorting.
SIAM Review , 5(4):375–376, oct 1963.[Ott84] Friedrich Otto. Conjugacy in monoids with a special Church-Rosserpresentation is decidable.
Semigroup Forum , 29(1-2):223–240, 1984.[Rey07] M. Rey.
Algebraic constructions on set partitions . Formal Power Seriesand Algebraic CombinatoricsNankai University, Tianjin, China , 2007.[The17] The Sage Developers.
SageMath, the Sage Mathematics Software Sys-tem (Version 7.0) , 2017. . Centro de Matem´atica e Aplicac¸˜oes, Faculdade de Ciˆencias e Tec-nologia, Universidade Nova de Lisboa, 2829-516 Caparica, Portugal
E-mail address : [email protected] Centro de Matem´atica e Aplicac¸˜oes and Departamento de Matem´atica,Faculdade de Ciˆencias e Tecnologia, Universidade Nova de Lisboa,2829-516 Caparica, Portugal
E-mail address : [email protected] Departamento de Matem´atica and CEMAT-CI ˆENCIAS, Faculdade deCiˆencias, Universidade de Lisboa, Lisboa 1749-016, Portugal.
E-mail address ::