The Intersection of 3 -Maximal Submonids
aa r X i v : . [ c s . F L ] A ug THE INTERSECTION OF -MAXIMAL SUBMONIDS GIUSEPPA CASTIGLIONE AND ˇSTˇEP ´AN HOLUB
Abstract.
Very little is known about the structure of the intersection of two k -generated monoids of words, even for k = 3. Here we investigate the case of k -maximal monoids, that is, monoids whose basis of cardinality k cannot be non-trivially decomposed into at most k words. We characterize the intersectionin the case of two 3-maximal monoids. Introduction
In this paper, we investigate the intersection of three-generated monoids of wordsin a special case when these monoids are 3-maximal. A monoid of words is k -maximal if its generating set cannot be non-trivially decomposed into at most k (shorter) words. Obviously, the intersection of two finitely generated monoids ofwords is regular. However, already in the case of free monoids generated by twowords, the structure of the intersection can be quite complex as we recall in Theorem7, see [9, 7]. While monoids of three words have been classified (see [5] for asurvey), there is no classification of their intersection. It is useful to note, and weshall use this fact in the paper, that the general question about the structure ofthe intersection of two k -generated monoids is in fact a question about maximalsolvable systems of equations over 2 k unknowns, where the left hand sides and righthand sides are formed from disjoint sets of k unknowns respectively. This indicateswhy the question is so difficult for k = 3, where we have to deal with six unknowns.It turns out, however, that when the condition of being k -maximal is added, theproblem simplifies considerably. In [3], a kind of defect theorem is shown for 2-maximal monoids, see Theorem 9 below. In case of 3-maximal monoids, studied inthis paper, we encounter a situation which rather resembles the general case of twotwo-generated monoids. In fact, there is a close similarity to the related problemof binary equality sets. In [4], it was shown that the binary equality set is eithergenerated by at most two words, or it is of the form ( uw ∗ v ) ∗ . While it was latershown in [6] that the latter possibility never takes place for binary equality words,we show in this paper that the set of possibilities given in the previous sentenceis the exact description of intersection of two 3-maximal monoids. This settingtherefore fits, from the point of its complexity, somewhere between binary equalitywords, and the intersection of free two-generated monoids.2. Preliminaries
Let Σ ∗ (Σ + = Σ ∗ \ { ε } resp.) be the free monoid ( free semigroup resp.) freelygenerated by a countable set Σ which will be fixed throughout the paper. As usually,we shall call the set Σ an alphabet , and understand elements of Σ ∗ (resp. Σ + ) asfinite words (finite nonempty words resp.) over Σ with the monoid operation ofconcatenation. Note however, that Σ, understood as the set of generators satisfyingΣ ⊆ Σ ∗ , is the set of words of length one, rather than a set of letters.We say that a word u is a prefix (res. proper prefix ) of w and we write u ≤ w (resp. u < w ), if w = uz for some z ∈ Σ ∗ (resp. z ∈ Σ + ). We say that u is a Key words and phrases. suffix of w if w = zu for some z ∈ Σ ∗ . Two words v and w are prefix comparable iff either v ≤ w or w ≤ v . A word w is primitive if w = v n implies n = 1 and w = v , otherwise it is called a power . If we consider pairs of words, we say that( u, v ) ∈ Σ ∗ × Σ ∗ is a prefix (resp. proper prefix) ) of ( r, s ) ∈ Σ ∗ × Σ ∗ , and we write( u, v ) ≤ ( r, s ) (resp. ( u, v ) < ( r, s )), if u ≤ r and v ≤ s (resp. u < r and v < s ).Given u, v ∈ Σ ∗ , by u ∧ v we denote the longest common prefix of u and v . Let u ∈ Σ ∗ , by first ( u ) we denote the first letter of u .Given a subset X of Σ ∗ , by X ∗ we denote the submonoid of Σ ∗ generated by X .Conversely, given a submonoid M of Σ ∗ , there exists a unique minimal (w.r.t. theset inclusion) generating set B ( M ) of M , called the basis of M , namely(1) B ( M ) = ( M \ { ε } ) \ ( M \ { ε } ) . That is, the basis of M is the set of all nonempty words of M that cannot be writtenas a concatenation of two nonempty words of M . For an arbitrary set X ⊆ Σ ∗ ,we shall write B ( X ) instead of B ( X ∗ ). The cardinality of B ( X ) is the rank of X ,denoted r ( X ).A submonoid M of Σ ∗ with the basis B is said to be free if any word of M canbe uniquely expressed as a product of elements of B . The basis of a free monoid iscalled a code .It is well-known (see [14]) that for any set X ⊆ Σ ∗ there exists the smallest freesubmonoid h X i f of Σ ∗ containing X . It is called the free hull of X . The basis of h X i f is called the free basis of X , denoted by B f ( X ). The cardinality of B f ( X ) iscalled the free rank of X and denoted by r f ( X ).For w ∈ h X i f , let first X ( w ) = b where w = b b · · · b n , b i ∈ B f ( X ), be theunique factorization of w into elements of B f ( X ). The words b , b b , . . . , b b · · · b n are called X -prefixes of w . We write u < Z w if u is a X -prefix of w . Moreover,given u, w ∈ h X i f , by u ∧ X w we denote the longest common X -prefix of u and w . Example 1.
Let X = { abcac, bab, ab, cacabcacb, ca } . The free basis is B = { ab, b, ca, cac } ,hence r f ( X ) = 4. For u = ab · ca · ca · b · cac · b and w = ab · cac · ca · ca · ab ∈ X ∗ ,we have first X ( u ) = ab , u ∧ w = abcac and u ∧ X w = ab .We have the following well-known lemma. Lemma 2.
Let X a finite set of Σ ∗ and B its free basis. Then for each y ∈ B there exists u ∈ X such that first X ( u ) = y . In order to see the importance of the above lemma, let us define the free graph ofa finite set X ⊂ Σ + as the undirected graph G ( X ) = ( X, E X ) without loops where E X = { [ u, w ] ∈ X × X | u = w and first X ( u ) = first X ( w ) } .Let c ( X ) be the number of connected components of G ( X ). By Lemma 2, wenow have that r f ( X ) = c ( X ) , which immediately implies the Defect Theorem claiming that r f ( X ) < | X | if X isnot a code (cf. [11] and [2]). Example 3.
Consider X of the Example 1. The free graph G ( X ) has a unique edge[ abcc, ab ] connecting the only two words starting with ab ∈ B . Note that there is noedge between ca and cacabcacb , since first X ( ca ) = ca = cac = first X ( cacabcacb ).The free graph is a frequently used tool in the paper because it allows us toeasily establish the free rank of a set by considering the properties of the edges ofthe associated free graph. HE INTERSECTION OF 3-MAXIMAL SUBMONIDS 3 k -maximal Monoids In this section we study k -maximal submonioids introduced in [3]. With M k wedenote the family of submonoids M of Σ ∗ of rank at most k . Definition 4. (cf. [3] ) A submonoid M ∈ M k is k -maximal if for every M ′ ∈ M k , M ⊆ M ′ implies M = M ′ .In other words, the elements of the basis of M cannot be nontrivially factoredinto at most k words. Example 5.
For every word v ∈ Σ + , the submonoid { v } ∗ (denoted simply by v ∗ )is 1-maximal if and only if v is a primitive word.The submonoid { a, cbd, dbd } ∗ is 3-maximal, whereas { a, cbd, dcbd } ∗ is not 3-maximal since it is contained in { a, cb, d } ∗ . Let | X | = | alph ( X ) | = k , where alph ( X ) is the subset of letters of Σ occurringin the words of X . Then X ∗ is k -maximal if and only if X ∗ = alph ( X ) ∗ . Also,a k -maximal submonoid is obviously generated by primitive words. On the otherhand, a finite set of k primitive words does not necessarily generate a k -maximalsubmonoid of Σ ∗ as we can see in Example 5.In [3], it is proved that the basis of a k -maximal submonoid of Σ ∗ is a bifix code,in particular its free rank is k . We repeat the proof here. Proposition 6.
Let X be the basis of a k -maximal submonoid. Then, X is a bifixcode.Proof. If uv, u ∈ X then X ∗ ⊆ Y ∗ where Y is obtained from X by replacing uv with v . Hence X ∗ is not k -maximal, since v / ∈ X . Similarly for suffixes. (cid:3) The inverse is not true, see again Example 5 where { a, cbd, dcbd } is a bifix code.Submonoids generated by two words, i.e., elements of M , have been extensivelystudied in the literature (cf. [10, 9, 12, 1]) and play an important role in manyfundamental aspects of combinatorics on words. It is known (see [9] and [7]) that if X and U have free rank 2, then the intersection X ∗ ∩ U ∗ is a free monoid generatedeither by at most two words or by an infinite set of words. More formally, we havethe following theorem. Theorem 7.
Let X = { x, y } and U = { u, v } be two sets of Σ ∗ with free rank 2,then X ∗ ∩ U ∗ is one of the forms • X ∗ ∩ U ∗ = { γ, β } ∗ , for some γ, β ∈ Σ ∗ ; • X ∗ ∩ U ∗ = ( β + β ( γ (1 + δ + · · · + δ t )) ∗ τ ) ∗ , for some β , β, γ, δ, τ ∈ Σ ∗ andsome t ∈ N. Example 8.
Let X = { abca, bc } and U = { a, bcabc } . One can verify that X ∗ ∩ U ∗ = { abcabc, bcabca } ∗ . Let X = { aab, aba } and U = { a, baaba } , then X ∗ ∩ U ∗ =( a ( abaaba ) ∗ baaba ) ∗ . Note that the submonoids here considered are not 2-maximal.Indeed, X ∗ , U ∗ ⊆ { a, bc } ∗ and X ∗ , U ∗ ⊆ { a, b } ∗ .To our knowledge nothing is proved in general for the intersection of two monoidsof free rank 3. In [8], some properties of codes with three elements are studied.Let us turn our attention to the intersection of k -maximal submonoids. Forthe intersection of 1-maximals, that is, for the submonoids in M , we have thefollowing important property: If x ∗ and u ∗ are 1-maximal submonoids (i.e., x and u are primitive words) then x ∗ ∩ u ∗ = { ε } . A generalization of this result, given in[3], to the case of 2-maximal submonoids is the following.
GIUSEPPA CASTIGLIONE AND ˇSTˇEP ´AN HOLUB
Theorem 9.
Let X = { x, y } and U = { u, v } , with X = U , be such that X ∗ and U ∗ are -maximal submonoids of Σ ∗ . If X ∗ ∩ U ∗ = { ε } , then there exists a uniqueprimitive word z ∈ Σ + such that X ∗ ∩ U ∗ = z ∗ . Example 10.
Let X ∗ = { abcab, cb } and U ∗ = { abc, bcb } ∗ be two 2-maximal sub-monoids of Σ ∗ , then their intersection is { abcabcbcb } ∗ .The following example shows that Theorem 9 can not be generalized to any k > Example 11.
For k = 4 let X = { a, b, cd, ce } and U = { ac, bc, da, ea } . It is easyto see that X ∗ and U ∗ are 4-maximal and X ∗ ∩ U ∗ = { acda, acea, bcda, bcea } ∗ .For k = 5 the intersection can be generated by 6 elements, see for example X = { a, b, cd, ce, cf } and U = { ac, bc, da, ea, f a } are two 5-maximal submonoids and X ∗ ∩ U ∗ = { acda, acea, acf a, bcda, bcea, bcf a } ∗ . Similar examples are easily foundfor k > The Intersection of Two -maximal Submonoids In what follows, X = { x, y, z } and U = { u, v, w } will be two distinct three-element subsets of Σ + such that X ∗ and U ∗ are 3-maximal. Let also Z = X ∪ U .We have the following lemma. Lemma 12.
The free rank of Z , that is, the number of connected components of G ( Z ) , is more than three. Formally, < r f ( Z ) = c ( Z ) .Proof. If r f ( Z ) ≤ U ∗ ⊆ Z ∗ and X ∗ ⊆ Z ∗ imply that X ∗ and U ∗ are not 3-maximal unless X ∗ = U ∗ = Z ∗ which is excluded by the hypothesisthat X and U are distinct. (cid:3) When we search for the elements of X ∗ ∩ U ∗ we are searching for those wordsthat can be decomposed both into words x , y and z , and into words u , v , w .Consider, as an example, the sets X = { abbc, da, db } and U = { abbca, b, cdad } .Then abbcabbcdadb is such a word as can be seen from its factorizations abbc · abbc · da · db = abbca · b · b · cdad · b .Double factorizations of this kind are best dealt with using two ternary mor-phisms as follows. We set A = { a , b , c } and define morphisms g, h : A ∗ → Σ ∗ by g ( a ) = x h ( a ) = ug ( b ) = y h ( b ) = vg ( c ) = z h ( c ) = w. For better readability, we use the boldface style for elements of A ∗ . The exampleabove is then captured by the equality g ( aabc ) = h ( abbcb ) = abbcabbcdadb . Thatis, the word abbcabbcdadb has the structure aabc if considered in X ∗ and abbcb ifconsidered in U ∗ .We say that a morphism g : A ∗ → Σ ∗ is marked if for each pair of letters a = a ∈ A we have first ( g ( a )) = first ( g ( a )) . Furthermore, if X is a finite set ofΣ ∗ and B its free basis we say that the morphism g is X -marked if for each pair ofletters a = a ∈ A we have first X ( g ( a )) = first X ( g ( a )) . Let g, h : A ∗ → Σ ∗ be two morphisms. The coincidence set of g and h is the setdefined as follows C ( g, h ) = { ( r , s ) ∈ A + × A + | g ( r ) = h ( s ) } . HE INTERSECTION OF 3-MAXIMAL SUBMONIDS 5
The pairs of the coincidence set are called solutions . A solution is minimal if itcannot be written as the concatenation of other solutions. That is, if ( u , v ) < ( r , s ),then ( u , v ) is not a solution. Clearly, C ( g, h ) is freely generated by the set ofminimal solutions.The property of k -maximality guarantees (by Proposition 6) the following lem-mas that are responsible for a relatively simple structure of the intersection. Inparticular, complications related to the second case of Theorem 7 are avoided. Lemma 13. h ( u ) ≤ h ( u ′ ) iff u ≤ u ′ .Proof. If u < u ′ trivially h ( u ) ≤ h ( u ′ ). Viceversa, let h ( u ) ≤ h ( u ′ ), if there exist a = a ′ ∈ A such that u = pau and u ′ = pa ′ u ′ . Then h ( au ) < h ( a ′ u ′ ) whichimplies that h ( a ) and h ( a ′ ) are prefix comparable, a contradiction with Proposition6. (cid:3) Lemma 14.
Let ( r , s ) and ( r ′ , s ′ ) be two distinct minimal solutions. Then r and r ′ are not prefix comparable, and s and s ′ are not prefix comparable.Proof. Assume that r and r ′ are prefix comparable, and assume, without loss ofgenerality, that r ′ = rq , with q ∈ A + . Then g ( r ′ ) = g ( r ) g ( q ) = h ( s ) g ( q ) = h ( s ′ )and h ( s ) < h ( s ′ ). It follows by Lemma 13 that s < s ′ , hence ( r ′ , s ′ ) is not minimal.Similarly, we prove that s and s ′ are not prefix comparable. (cid:3) a b c d c d a ba b c d c d a b a c ba c c a abc dab dcab cb cd Figure 1.
A representation of the solution ( acca , acb ) and thefree graph of morphisms of Example 15.. Example 15.
Let g ( a ) = ab h ( a ) = abcg ( b ) = cb h ( b ) = dabg ( c ) = cd h ( c ) = dc. The pair ( acca , acb ) is a solution. Indeed g ( acca ) = abcdcdab = h ( acb ). SeeFigure 1 for a representation of the solution and the free graph. The free basis of Z is B = { ab, c, cb, d } and we highlight the decomposition into the free basis of Z by different colors. The edges of G Z are E z = { [ g ( a ) , h ( a )] , [ h ( b ) , h ( c )] } . Onecan verify that the set of minimal solutions is { ( ac i b , ac i +1 a ) | i ≥ } and theintersecton is therefore ( abc ( dc ) ∗ dab ) ∗ .This way, the problem of finding the intersection X ∗ ∩ U ∗ is reduced to theproblem of finding minimal elements of the coincidence set of morphisms g and h .Indeed, when we find a minimal solution ( r , s ), with r , s ∈ A ∗ , then g ( r ) (which isequal to h ( s )) is an element of the minimal generating set of the intersection X ∗ ∩ U ∗ .As we have seen in Example 15, the intersection of two 3-maximal submonoids canbe infinitely generated. We shall see that in the case of a finite number of generators,the cardinality is at most two. A trivial example of a two generated intersection is { a, b, c } ∗ ∩ { a, b, d } ∗ = { a, b } ∗ . A less trivial example is the following. GIUSEPPA CASTIGLIONE AND ˇSTˇEP ´AN HOLUB
Example 16.
Let g ( a ) = ab h ( a ) = abbcg ( b ) = bcdd h ( b ) = abcbg ( c ) = cbdd h ( c ) = ddab . There are only two minimal solutions, namely ( aba , ac ) and ( aca , bc ), hence thesubmonoid intersection is finitely generated by { abbcddab, abcbddab } . The free basisof Z is B = { ab, ac, bd, cd, da } , see Figure 2 for a representations of the two solutionsand the free graph. a b b c d d a ba b b c d d a b a ca b a a b c b d d a ba b c b d d a b b ca c a ab bcdd cbddabbc abcb ddab Figure 2.
A representation of the solutions ( aba , ac ) and( aca , bc ) and the free graph of morphisms of Example 16.In what follows, we equivalently refer to X (resp. U ) and g ( A ) (resp. h ( A )).Since g ( a ), g ( b ), g ( c ) ∈ h Z i f and h ( a ), h ( b ), h ( c ) ∈ h Z i f by definition, we havethat w ∈ h Z i f for any element w of the intersection.As mentioned before, we often use the free graph of G Z as the source of informa-tion about the free basis of Z . The set V Z of nodes is the union of the images g ( A )and h ( A ). In figures, we graphically arrange nodes in V Z in two rows containingelements from g ( A ) and h ( A ) respectively. We know that the number of connectedcomponents is the free rank of Z , which is at least four. Moreover, we naturallydistinguish two different kinds of edges. The edges that involve nodes in the sameset, either g ( A ) or h ( A ), are horizontal edges , and the edges that involve one nodeof g ( A ) and one of h ( A ) are vertical edges .The following two observations are immediate: • A morphism g is Z -marked iff there are no horizontal edges in the corre-sponding row. Indeed, by definition, [ g ( a ) , g ( a )] ∈ E Z iff first Z ( g ( a )) = first Z ( g ( a )). Analogously for the morphism h . • A solution creates a vertical edge. Indeed, if ( r , s ) ∈ C ( g, h ) we have first Z ( g ( r )) = first Z ( h ( s )) and [ g ( r ) , g ( s )] ∈ E Z , where r = first ( r )and s = first ( s ).This implies the following property of our morphisms. Lemma 17. If C ( g, h ) = ∅ then either g or h is Z-marked. Moreover, if h is notmarked then there exist exactly two letters a , a ∈ A such that first Z ( h ( a )) = first Z ( h ( a )) . Figure 3.
Free graphs with a nonempty coincidence set and twohorizontal edges.
HE INTERSECTION OF 3-MAXIMAL SUBMONIDS 7
Proof.
Since the set of solutions is nonempty, there is at least one vertical edge inthe free graph of Z . Since the free rank of Z is at least four, the free graph cannotcontain two horizontal edges (see Figure 3). The claim follows. (cid:3) Examples 15 and 16 shows two cases in which the morphism g is Z -marked and h is not. The following example shows two Z -marked morphisms g and h whichhave two minimal solutions. a a b ca a b c aa b d a bd a b c bc aa bc dabaabc ab d Figure 4.
A representation of the solutions ( ab , a ) , ( c , cb ) andthe free graph of two Z -marked morphisms from Example 18. Example 18.
Let g ( a ) = aa h ( a ) = aabcg ( b ) = bc h ( b ) = abg ( c ) = dab h ( c ) = d . The free basis of Z is B = { aa, ab, bc, d } , g and h are both Z -marked, and theonly two minimal solutions are ( ab , a ) , ( c , cb ). In such a case each minimal solutionintroduces a vertical edge, which yields four connected components (cf. Figure 4).By symmetry, we shall suppose in what follows that g is Z -marked, first Z ( h ( a )) = first Z ( h ( c )) and first Z ( h ( b )) = first Z ( h ( c )).Now we introduce the key ingredient of the proof of our theorem, namely thedefinition of the critical overflow which was first introduced in [4] (see also [13, pp.347–351]). We say that the word o ∈ Σ ∗ is a critical overflow if g ( u ) = h ( v ) o ,for some u , v ∈ A ∗ , and there are pairs ( u , u ), ( v , v ) in A ∗ × A ∗ such that first ( u ) = first ( u ), first ( v ) = first ( v ) and both g ( uu ) = h ( vv ) and g ( uu ) = h ( vv ). Moreover, we say that o is a critical overflow on ( u , v ).Informally, if o is a critical overflow on a pair ( u , v ), then ( u , v ) is a prefix of atleast two distinct minimal solutions ( uu , vv ) and ( uu , vv ). It represents the sit-uation when the continuation of ( u , v ) is not given uniquely during the constructionof the minimal solution neither for u nor for v . a b ca b c b a bb a bd c bc d c b Figure 5.
A critical overflow of morphisms of Example 19.
Example 19.
Let g ( a ) = abc, g ( b ) = bab and g ( c ) = dcb , h ( a ) = ab, h ( b ) = cb and h ( c ) = cd. Then c is a critical overflow on ( u , v ) = ( a , a ) and two minimalsolutions are ( ab , aba ) and ( ac , acb ). See Figure 5 for a representation. GIUSEPPA CASTIGLIONE AND ˇSTˇEP ´AN HOLUB
Remark 20.
Since g and h are morphism and h Z i f is free, it follows that thecritical overflows belongs to h Z i f .The previous remark is a basic trivial property of free monoids and its free basisbut it is fundamental for the proof of the following results that characterize thecritical overflows in our setting and the corresponding properties of the free graph. Remark 21.
For sake of completeness, we should also consider the case when o isnonempty and g ( u ) o = h ( v ) in the definition of the critical overflow. Note however,that such a situation is excluded by the hypothesis that g is marked. Proposition 22. If ( r , s ) and ( r ′ , s ′ ) are two distinct minimal solutions then thereis a critical overflow o on ( u , v ) , with u = r ∧ r ′ and v = s ∧ s ′ . Therefore, h isZ-marked iff o is an empty overflow.Proof. By lemma 14, the components of the two minimal solutions are not prefixcomparable respectively. Therefore r = uu , r ′ = uu , s = vv and s ′ = vv where u = r ∧ r ′ , v = s ∧ s ′ , and all u , u , v , v are nonempty. Let a = first ( u ), a ′ = first ( u ), b = first ( v ) and b ′ = first ( v ) where a = a ′ and b = b ′ . The case u = ε and v = ε is excluded by the assumption that g is marked. We have thefollowing cases: • If u = v = ε , then the empty word is a critical overflow on ( ε, ε ). Since G Z has two vertical edges [ g ( a ) , h ( b )] and [ g ( a ′ ) , h ( b ′ )], it cannot have anhorizontal edge, hence h is Z-marked. • If u = ε and v = ε , then g ( u ) is a nonempty critical overflow on ( u , ε ). Wehave h ( b ) = h ( b ′ ), but first Z ( h ( b )) = first Z ( h ( b ′ )) i.e., h is not Z -marked. • Finally, if both u = ε and v = ε , then we have h ( v ) < g ( u ) because g is marked and moreover there is a nonempty critical overflow o with g ( u ) = h ( v ) o . By Remark 20 we have that first Z ( o ) = f irst Z ( h ( b )) = f irst Z ( h ( b ′ )), hence h is not Z-marked. (cid:3) Figure 6.
Free graphs in the three cases of critical overflows.
Remark 23.
We can reformulate the three cases of critical overflows of the previousproof in terms of properties of G Z as follows. Let ( r , s ) and ( r ′ , s ′ ) be two distinctminimal solutions and u = r ∧ r ′ , v = s ∧ s ′ . Let r = uu , r ′ = uu , s = vv and s ′ = vv , a = first ( r ), a ′ = first ( r ′ ), b = first ( s ) and b ′ = first ( s ′ ) where a = a ′ and b = b ′ . Then,(1) If u = v = ε , G Z has two vertical edges [ g ( a ) , h ( b )] and [ g ( a ′ ) , h ( b ′ )] (seethe first case in Figure 6). Note that Example 18 with Figure 4 show sucha situation.(2) If u = ε and v = ε , G Z has two vertical edges [ g ( first ( u )) , h ( b )] and[ g ( first ( u )) , h ( b ′ )] and an horizontal edge [ h ( b ) , h ( b ′ )] creating a connectedcomponent of three nodes (see the second case in Figure 6). Example 16with Figure 2 verify such a case.(3) Finally, if both u = ε and v = ε , G Z has a vertical edge [ g ( first ( u )) , h ( first ( v ))]and a horizontal edge [ h ( b ) , h ( b ′ )] (see the first case in Figure 6). Note thatExample 15 and Figure 1 show such a situation.Note that in any of this cases G Z cannot have further edges. HE INTERSECTION OF 3-MAXIMAL SUBMONIDS 9
Lemma 24.
Let o be a critical nonempty overflow such that g ( u ) = h ( v ) o with u , v ∈ A ∗ . Let u , u , v , v ∈ A + be such that g ( uu ) = h ( vv ) and g ( uu ) = h ( vv ) and a = first ( u ) = first ( u ) = a ′ , b = first ( v ) = first ( v ) = b ′ . Then o = h ( b ) ∧ Z h ( b ′ ) . Proof.
Note that o is prefix comparable with both h ( b ) and h ( b ′ ). If h ( b ) ≤ o or h ( b ′ ) ≤ o , then also h ( b ) and h ( b ′ ) are prefix comparable, contradictingProposition 6. Moreover o ≤ h ( b ) ∧ Z h ( b ′ ), by Remark 20.Let o < h ( b ) ∧ Z h ( b ′ ) and let o = ( h ( b ) ∧ Z h ( b ′ )) o ′ . Then first Z ( g ( a )) = first Z ( g ( a ′ )) = first Z ( o ′ ), a contradiction with g being Z-marked. Then o = h ( b ) ∧ Z h ( b ′ ). (cid:3) By Lemma 17 and Lemma 24 we have the uniqueness of the critical overflow.We can now prove the main result of the paper.
Theorem 25.
Let X = { x, y, z } ∗ , U = { u, v, w } ∗ be different -maximal sub-monoids of Σ ∗ . Then X ∗ ∩ U ∗ = { α, β } ∗ , for some α, β ∈ Σ ∗ or X ∗ ∩ U ∗ = { αγ ∗ β } ∗ , for some α, β, γ ∈ Σ + . Proof.
Let ( r , s ), ( r , s ) and ( r , s ) be three minimal solutions. If two of them,say ( r , s ) and ( r , s ) are such that r ∧ r = ε then, by Remark 23 case 1, G Z has two vertical edges and cannot have others edges. Hence, if r ∧ r = ε and r ∧ r = ε then, by Remark 23 case 1, G Z must have another vertical edge hencewe have a contradiction. If r ∧ r = ε and r ∧ r = ε (resp. r ∧ r = ε and r ∧ r = ε ), then, by Remark 23 case 3, there is a nonempty critical overflow i.e. h is not Z-marked and an horizontal edge exists, again a contradiction.It follows that r ∧ r ∧ r = ε . Let u = r ∧ r and v = s ∧ s and u ′ = r ∧ r and v ′ = s ∧ s . By Proposition 22, we have(2) g ( u ) = h ( v ) o and g ( u ′ ) = h ( v ′ ) o. where o is the (unique) critical overflow. h ( s ) h ( v ) h ( v ) g ( r ) g ( u ) g ( u ) h ( s ) h ( v ′ ) h ( v ′ ) g ( r ) g ( u ′ ) g ( u ′ ) h ( s ) h ( v ) h ( v ) g ( r ) g ( u ) g ( u ) h ( s ) h ( v ′ ) h ( v ′ ) g ( r ) g ( u ′ ) g ( u ′ ) (a) (b) Figure 7.
The representation of three minimal solutions.Moreover, by Lemma 14 there exist u = u = ε, v = v = ε with a = first ( u ) = first ( u ) = a , b = first ( v ) = first ( v ) = b
20 GIUSEPPA CASTIGLIONE AND ˇSTˇEP ´AN HOLUB such that ( r , s ) = ( uu , vv ) , ( r , s ) = ( uu , vv )(cf. Figure 7(a)), and there exist u ′ = u ′ = ε , v ′ = v ′ = ε with a ′ = first ( u ′ ) = first ( u ′ ) = a ′ , b ′ = first ( v ′ ) = first ( v ′ ) = b ′ such that ( r , s ) = ( u ′ u ′ , v ′ v ′ ) , ( r , s ) = ( u ′ u ′ , v ′ v ′ )(cf. Figure 7(b)).First, we prove that u = u ′ . Indeed, if u = u ′ then, by (2), we have v = v ′ , with b = b = b ′ . By Lemma 24, we have o = h ( b ) ∧ Z h ( b ) = h ( b ) ∧ Z h ( b ′ ), i.e.,we have three different elements of h ( A ) having a nonempty common prefix. Then G Z has two distinct horizontal edges, a contradiction.Suppose (without loss of generality) that u < u ′ . From (2) and Lemma 13, itfollows that v < v ′ . Let u ′ = up , and v ′ = vq . Then p , q = ε and og ( p ) = h ( q ) o .Canceling, if necessary, superfluous factors ( w , w ′ ) satisfying og ( w ) = h ( w ′ ) o ,one can choose ( r , s ), ( r , s ) and ( r , s ) with the following properties:(1) ( u , v ) is such that for any ( u , v ) < ( u , v ), g ( u ) = h ( v ) o .(2) ( u ′ , v ′ ) is such that for any ( u , v ) < ( u , v ) < ( up , vq ), g ( u ) = h ( v ) o .(3) ( u , v ) is such that for any ( u , v ) < ( u , v ) < ( uu , vv ), g ( u ) = h ( v ) o .We prove that the set { ( up i u , vq i v ) | i ≥ } is the set of all the minimal solu-tions, i.e., we prove that a pair ( r , s ) is a minimal solution iff ( r , s ) = ( up i u , vq i v )for a certain i ≥ r , s ) = ( uu , vv ) and ( r , s ) = ( upu , vqv ) we have that r ∧ uu = ε and r ∧ upu = ε . Indeed we saw that for any three minimal solutions the firstcomponents must have a nonempty common prefix. oh ( v ) h ( v ) g ( u ) g ( u ) o h ( v ) g ( u ) h ( q ) g ( p ) h ( v ) g ( u ) o h ( v ) g ( u ) h ( q ) g ( p ) h ( q ) g ( p ) h ( v ) g ( u ) Figure 8.
Three minimal solutions ( up i u , vq i v ), with i = 0 , , r ∧ uu = u < u , then, by Proposition 22 and Lemma 24, we have g ( u ) = h ( v ) o ,where v = s ∧ vv . By (2), we have v < v which is a contradiction with theassumption 1.If r ∧ upu = up , with p < p , let v = s ∧ vqv , then by Proposition 22and Lemma 24, we have g ( u ) = h ( v ) o . By (2) v = vq , with q < q , againstassumption 2.If there exists k ∈ { , } such that u = r ∧ up k u = up k t , with t < u , then,by Proposition 22 and Lemma 24, we have g ( u ) = h ( v ) o where v = vq k w with w < v from (2). Since g ( up k t ) = h ( vq k w ) o it follows that g ( ut ) = h ( vw ) o against assumption 3.We can conclude that ( r , s ) = ( upt , vqw ), where t , w = ε , and ( ut , vw ) is aminimal solution. By induction, it follows that ( t , w ) = ( p i u , q i v ), for some i > HE INTERSECTION OF 3-MAXIMAL SUBMONIDS 11
Finally, ( up i u , vq i v ), is minimal for each i ≥
0. Indeed, if for some i there ex-ists a minimal solution ( r , s ) < ( up i u , vq i v ), as we have seen, ( r , s ) = ( up j u , vq j v )for some j ≥
0. It follows that either u < p or p < u . In the first case we havethe contradicion uu < upu , i.e. r and r are prefix comparable, in the secondcase we contradict u = r ∧ r . The thesis follows with α = g ( u ) , γ = g ( p ) and β = g ( u ). (cid:3) Conclusions
The hypothesis of k -maximality considerably simplifies the structure of the in-tersection of monoids and gives an interesting connection with the generation ofbinary equality set, in the case k = 3. Our proof also shows the importance of thefree graph in this context. Together with combinatorial properties of k -maximalmonoids investigated in [3], this is promising for further investigation of cases witharbitrary k . References [1] Evelyne Barbin-Le Rest and Michel Le Rest. Sur la combinatoire des codes `a deux mots.
Theor. Comput. Sci. , 41:61–80, 1985.[2] J. Berstel, D. Perrin, J.F. Perrot, and A. Restivo. Sur le th´eor`eme du d´efaut.
Journal ofAlgebra , 60(1):169–180, sep 1979.[3] Giuseppa Castiglione, Gabriele Fici, and Antonio Restivo. On sets of words of rank two. InRobert Mercas and Daniel Reidenbach, editors,
Lecture Notes in Computer Science , volume11682 of
Lecture Notes in Computer Science , pages 46–59. Springer International Publishing,2019.[4] A. Ehrenfeucht, J. Karhumki, and G. Rozenberg. On binary equality sets and a solution tothe test set conjecture in the binary case.
Journal of Algebra , 85(1):76–85, nov 1983.[5] Tero Harju and Dirk Nowotka. On the independence of equations in three variables.
Theoret-ical Computer Science , 307(1):139–172, sep 2003.[6] ˇStˇep´an Holub. Binary equality sets are generated by two words.
Journal of Algebra , 259(1):1–42, jan 2003.[7] ˇStˇep´an Holub. Binary intersection revisited. In Robert Mercas and Daniel Reidenbach, editors,
Combinatorics on Words - 12th International Conference, WORDS 2019, Loughborough, UK,September 9-13, 2019, Proceedings , volume 11682 of
Lecture Notes in Computer Science ,pages 217–225. Springer, 2019.[8] Juhani Karhum¨aki. On three-element codes.
Theor. Comput. Sci. , 40:3–11, 1985.[9] Juhani Karhumki. A note on intersections of free submonoids of a free monoid.
SemigroupForum , 29(1):183–205, dec 1984.[10] A. Lentin and M. Sch¨utzenberger. A combinatorial problem in the theory of free monoids.
Proc. University of North Carolina , pages 128–144, 1967.[11] M. Lothaire.
Combinatorics on Words . Addison-Wesley, 1983.[12] Jean N´eraud. Deciding whether a finite set of words has rank at most two.
Theor. Comput.Sci. , 112(2):311–337, 1993.[13] Grzegorz Rozenberg and Arto Salomaa, editors.
Handbook of Formal Languages, Vol. 1:Word, Language, Grammar . Springer-Verlag, Berlin, Heidelberg, 1997.[14] Bret Tilson. The intersection of free submonoids of a free monoid is free.
Semigroup Forum ,4(1):345–350, dec 1972.
Dipartimento di Matematica e Informatica, Universit`a di Palermo, Italy
E-mail address : [email protected] Department of Algebra, Faculty of Mathematics and Physics, Charles University,Prague, Czech Republic
E-mail address ::