Theta palindromes in theta conjugates
aa r X i v : . [ c s . F L ] A ug THETA PALINDROMES IN THETA CONJUGATES
KALPANA MAHALINGAM, PALAK PANDOH, ANURAN MAITY
Abstract.
A DNA string is a Watson-Crick (WK) palindrome when the complement of its reverse is equalto itself. The Watson-Crick mapping θ is an involution that is also an antimorphism. θ -conjugates of a wordis a generalisation of conjugates of a word that incorporates the notion of WK-involution θ . In this paper, westudy the distribution of palindromes and Watson-Crick palindromes, also known as θ -palindromes amongboth the set of conjugates and θ -conjugates of a word w . We also consider some general properties of theset C θ ( w ), i.e., the set of θ -conjugates of a word w , and characterize words w such that | C θ ( w ) | = | w | + 1,i.e., with the maximum number of elements in C θ ( w ). We also find the structure of words that have at leastone (WK)-palindrome in C θ ( w ). Introduction
The study of sequences have applications in numerous fields such as biology, computer science, math-ematics, and physics. DNA molecules, which carry the genetic information in almost all organisms, playan important role in molecular biology (see [3, 5, 6, 13]). DNA computing experiments use information-encoding strings that possess Watson-Crick complementarity property between DNA single-strands whichallows information-encoding strands to potentially interact. Formally, the Watson-Crick complementarityproperty on strings over Σ is an involution θ with the additional property that θ ( uv ) = θ ( v ) θ ( u ) for allstrings u, v ∈ Σ ∗ where θ is an involution, i.e., θ equals the identity.The notion of θ -palindrome was defined in [9] to study palindromes from the perspective of DNA com-puting. It was defined independently in [4], where closure operators for θ -palindromes were considered. Theclassical results on conjugacy and commutativity of words are present in [14]. In [2], the authors study theproperties of θ -primitive words. They prove the existence of a unique θ -primitive root of a given word, andprovided some constraints under which two distinct words share their θ -primitive root. The combinatorialproperties of strings in connection to partial words were investigated in [1]. The notions of conjugacy andcommutativity was generalized to incorporate the notion of Watson-Crick complementarity of DNA single-strands in [9]. The authors define and study properties of Watson-Crick conjugate and commutative words,as well as Watson-Crick palindromes. They provide a complete characterization of the set of all words thatare not Watson-Crick palindromes. Some properties that link the Watson-Crick palindromes to classical Key words and phrases.
Theoretical DNA computing, DNA encodings, Combinatorics of words, Palindromes, Watson–Crickpalindromes, Conjugacy. otions such as that of primitive words are established in [10]. The authors show that the set of Watson-Crick-palindromic words that cannot be written as the product of two non-empty Watson-Crick-palindromesequals the set of primitive Watson-Crick-palindromes.In this paper, we extend the notion of palindromes in conjugacy class of a word to Watson-Crick palin-dromes and Watson-Crick conjugates of a word. The number of palindromes in the conjugacy class of aword is studied in [7]. We investigate the set of θ -conjugates of a word. We study the number of Watson-Crick palindromes in a conjugacy class. We then consider the number of palindromes and Watson-Crickpalindromes in the Watson-Crick conjugacy set of a given word.The paper is organised as follows. In Section 3, we study the properties of the set of θ -conjugates of aword. We first show that for a given word w , the maximum number of elements in the θ -conjugacy of a wordis | w | + 1, and we also characterize the words that attain this maximum number. In Section 4, we study thedistribution of θ -palindromes in the conjugacy class of a word. We show that the conjugacy class of a wordcan contain at most two distinct palindromes. In Section 5, we study the number of palindromes in the setof θ -conjugates of the word. We find the structure of the words which have at least one palindrome amongits θ -conjugates. Lastly, in Section 5, we analyse the number of θ -palindromes in the set of θ -conjugates of aword. We find the structure of the words which have at least one θ -palindrome among its θ -conjugates. Weend the paper with some concluding remarks.2. Basic definitions and notations
An alphabet Σ is a finite non-empty set of symbols. A word over Σ is defined to be a finite sequenceof symbols from Σ. Σ ∗ denotes the set of all words over Σ including the empty word λ and Σ + = Σ ∗ \ λ .The length of a word w ∈ Σ ∗ is the number of symbols in a word and is denoted by | w | . The reversal of w = a a · · · a n is defined to be a string w R = a n · · · a a where a i ∈ Σ. Alph ( w ) denotes the set of allsub-words of w of length 1. A word w is said to be a palindrome if w = w R .A word w ∈ Σ + is called primitive if w = u i implies w = u and i = 1. Let Q denote the set of all primitivewords. For every word w ∈ Σ + , there exists a unique word ρ ( w ) ∈ Σ + , called the primitive root of w , suchthat ρ ( w ) ∈ Q and w = ρ ( w ) n for some n ≥
1. A function θ : Σ ∗ → Σ ∗ is said to be an antimorphism if θ ( uv ) = θ ( v ) θ ( u ). The function θ is called an involution if θ is an identity on Σ ∗ .A word u ∈ Σ ∗ is said to be a factor of w if w = xuy where x, y ∈ Σ ∗ . If x = λ , then u is a prefix of w and if y = λ , then u is a suffix of w . A word u ∈ Σ ∗ is a conjugate of w ∈ Σ ∗ if there exists v ∈ Σ ∗ suchthat uv = vw . The set of all conjugates of w , denoted as C ( w ), is the conjugacy class of w . A word u is a θ -conjugate of another word w if uv = θ ( v ) w for some v ∈ Σ ∗ . The set of all θ -conjugates of w is denotedby C θ ( w ). For an antimorphic involution θ , a finite word w is called a θ -palindrome if w = θ ( w ). ConsiderΣ = { a, b } and an antimorphic involution θ such that θ ( a ) = b and θ ( b ) = a . Then, the word abab is a θ -palindrome but not a palindrome. For all other concepts in formal language theory and combinatorics onwords, the reader is referred to [8, 11]. hroughout the paper, we take θ to be an antimorphic involution over Σ.3. Conjugacy and theta-Conjugacy of a word.
In this section, we study the conjugacy class and the θ -conjugacy set C θ ( w ) for a word w . We show somegeneral properties of the set C θ ( w ). We also characterize words for which | C θ ( w ) | = | w | + 1 which is themaximum number of of θ -conjugates that a word of length | w | can have.We recall the following result from [9] for θ -conjugates of a word. Proposition 3.1.
Let u be a θ -conjugate of w . Then, for an antimorphic involution θ , there exists x, y ∈ Σ ∗ such that either u = xy and w = yθ ( x ) or w = θ ( u ) . Thus, we can deduce that for a word w , C θ ( w ) = { θ ( v ) u : w = uv, u, v ∈ Σ ∗ } Also, Proposition 3.1 implies that the maximum number of elements in C θ ( w ) is | w | + 1. It is also clear thatif w is a θ -palindrome, then the maximum number of elements in C θ ( w ) is | w | . We illustrate the concept of θ -conjugacy of a word with the help of an example and show that the number of elements in the θ -conjugacyof a word w may or may not reach the maximum. Example 3.2.
Consider Σ = { a, b, c } and θ such that θ ( a ) = b , θ ( b ) = a, θ ( c ) = c .(1) If w = aac , then C θ ( w ) = { aac, caa, cba, cbb } and | C θ ( w ) | = 4 = | w | + 1. Note that aac is a primitiveword that is neither a palindrome nor a θ -palindrome.(2) If w = abb , then C θ ( w ) = { abb, aab, aaa } and | C θ ( w ) | = 3 < | w | + 1 = 4. Note that abb is a primitiveword that is neither a palindrome nor a θ -palindrome.(3) If w = bccb , then C θ ( w ) = { bccb, abcc, acbc, accb, acca } and | C θ ( w ) | = 5 = | w | + 1. Note that bccb isa palindrome.(4) If w = aba , then C θ ( w ) = { aba, bab, baa } and | C θ ( w ) | = 3 < | w | + 1. Note that w is a palindrome.(5) If w = ab , then C θ ( ab ) = { ab, aa } and | C θ ( w ) | = 2 = | w | . Note that w is a θ -palindrome.(6) If w = abcab , then C θ ( w ) = { abcab, aabca, ababc, abcaa } and | C θ ( w ) | = 4 < | w | . Note that w is a θ -palindrome.(7) If w = aaa , then C θ ( w ) = { aaa, baa, bba, bbb } and | C θ ( w ) | = | w | + 1 = 4. Note that w is not aprimitive word but | C θ ( w ) | = | w | + 1.It is well known that the maximum number of elements in a conjugacy class of a word w is | w | and it isattained if w is primitive. This is not true in general for θ -conjugacy of w . It is clear from Example 3.2 thatthere are primitive words with the maximum number of elements in the set C θ ( w ) to be less than | w | , equalto | w | and equal to | w | + 1. It is also clear from Example 3.2 that the maximum number of elements in theset C θ ( w ), i.e., | w | + 1, can be attained by both primitive as well as a non-primitive word. e now characterize words w with exactly | w | + 1 elements in C θ ( w ). We first recall some general resultsfrom [12]. Lemma 3.3.
Let u, v, w ∈ Σ + . • If uv = vu then, u and v are powers of a common primitive word. • If uv = vw then, for k ≥ , x ∈ Σ + and y ∈ Σ ∗ , u = xy , v = ( xy ) k x , w = yx . We have the following result.
Proposition 3.4.
Let w ∈ Σ ∗ . Then, | C θ ( w ) | = | w | + 1 iff w is not of the form ( αβ ) i +1 αv where α, v ∈ Σ ∗ , β ∈ Σ + , i ≥ and α, β are θ -palindromes.Proof. Let w ∈ Σ ∗ . We prove that | C θ ( w ) | < | w | + 1 iff w = ( αβ ) i +1 αv where α, v ∈ Σ ∗ , β ∈ Σ + , i ≥ α, β are θ -palindromes.Let | C θ ( w ) | < | w | + 1, then at least two θ -conjugates of w are equal. Let θ ( v ) u and θ ( y ) x be the two θ -conjugates of w that are equal where u, v, x, y ∈ Σ ∗ for w = uv = xy . Without loss of generality, let usassume that | u | > | x | . Then, | v | < | y | , u = xy and y = y v for some y ∈ Σ + . Now, θ ( v ) u = θ ( y ) x = ⇒ θ ( v ) xy = θ ( y v ) x = ⇒ θ ( v ) xy = θ ( v ) θ ( y ) x = ⇒ xy = θ ( y ) x. Then by Lemma 3.3, θ ( y ) = αβ , x = ( αβ ) i α where β ∈ Σ + , α ∈ Σ ∗ , i ≥ α and β are θ -palindromes. Hence, w = uv = xy = ( αβ ) i +1 αv and α, β are θ -palindromes.Conversely, let w = ( αβ ) i +1 αv where α, v ∈ Σ ∗ , β ∈ Σ + , i ≥ α, β are θ -palindromes. Now, w ′ = θ ( v )( αβ ) i +1 α ∈ C θ ( w ) and w ′′ = θ ( βαv )( αβ ) i α ∈ C θ ( w ). Consider w ′′ = θ ( v ) θ ( βα )( αβ ) i α = θ ( v ) αβ ( αβ ) i α = θ ( v )( αβ ) i +1 α = w ′ . Therefore, | C θ ( w ) | < | w | + 1. (cid:3) The conjugacy operation on words is an equivalence relation. However, the θ -conjugacy on words is notan equivalence relation. Note that from Example 3.2, it is clear that aaa is a θ -conjugate of abb , but abb is not a θ -conjugate of aaa . Thus, θ -conjugacy on words is not a symmetric relation, and hence, not anequivalence relation.We recall the following from [14]. Lemma 3.5.
Let u = z i for a primitive word z over Σ . Then, the conjugacy class of u contains exactly | z | words. We show that Lemma 3.5 do not hold for θ -conjugacy. Infact we show that for any word z , the numberof θ -conjugates in z i may not be equal to that of the number of θ -conjugates in the word z . We illustratewith the help of an example. xample 3.6. Let Σ = { a, b, c } , and θ such that θ ( a ) = b, θ ( b ) = a, θ ( c ) = c . Then,(1) C θ ( ac ) = { ac, ca, cb } ;(2) C θ (( ac ) ) = { acac, caca, cbac, cbca, cbcb } ;(3) C θ (( ac ) ) = { acacac, cacaca, cbacac, cbcaca, cbcbac, cbcbca, cbcbcb } . We show that the number of θ -conjugates of a word z i are greater than the number of θ -conjugates of aword z j for i > j and z ∈ Σ ∗ and | C θ ( z ) | 6 = 1. We have the following result. Lemma 3.7.
Let z ∈ Σ ∗ . If | C θ ( z ) | 6 = 1 , then | C θ ( z ) | < | C θ ( z ) | .Proof. Let z ∈ Σ ∗ such that | C θ ( z ) | 6 = 1. Let w = θ ( v ) u ∈ C θ ( z ) such that z = uv . Now z = zz = uz ′ v where z ′ = vu . Then, w = θ ( v ) uz ′ ∈ C θ ( z ). So for each element w in C θ ( z ), there exist an element w in C θ ( z ) such that w is a prefix of w . Let z = u v . Then w ′ = θ ( v ) u ∈ C θ ( z ). So there exist an element w ′ = θ ( v ) u z ′′ in C θ ( z ) where z ′′ = v u . Now if w = w ′ then w = w ′ . Hence, | C θ ( z ) | ≤ | C θ ( z ) | .Now θ ( uv ) ∈ C θ ( z ). Note that the words α = θ ( vuv ) u and α = θ ( uv ) uv ∈ C θ ( z ) have θ ( uv ) as theirprefix. If α = α , we get θ ( v ) u = uv such that z = uv for all u, v ∈ Σ ∗ . Thus, we get θ ( v ) u = uv for all u, v ∈ Σ ∗ , so C θ ( z ) = { uv } , i.e., | C θ ( z ) | = 1 which is a contradiction. Therefore, there exist at least twodistinct elements α and α in C θ ( z ) whose prefix is θ ( uv ). Thus | C θ ( z ) | < | C θ ( z ) | . (cid:3) We deduce an immediate result.
Corollary 3.8.
Let z ∈ Σ ∗ . If | C θ ( z ) | 6 = 1 , then | C θ ( z i ) | < | C θ ( z i +1 ) | for i ≥ . We recall the following from [10].
Proposition 3.9. If uv = θ ( v ) u and θ is an antimorphic involution, then u = x ( yx ) i , v = yx where i ≥ and u, x, y are θ -palindromes, where x ∈ Σ ∗ , y ∈ Σ + . Lemma 3.10.
Let z ∈ Σ ∗ then | C θ ( z ) | = 1 iff z = a n such that θ ( a ) = a for a ∈ Σ .Proof. Let | C θ ( z ) | = 1, then z is a θ -palindrome. So, z is of the form uvθ ( u ) where v is a θ -palindrome.Let u = au ′ where a ∈ Σ. As | C θ ( z ) | = 1, we have, z = au ′ vθ ( u ′ ) θ ( a ) = aau ′ vθ ( u ′ ). Then, u ′ vθ ( u ′ ) θ ( a ) = au ′ vθ ( u ′ ). Take u ′ vθ ( u ′ ) = u , then u θ ( a ) = au . By Proposition 3.9, we have θ ( u ) = x ( yx ) i and θ ( a ) = yx where x ∈ Σ ∗ , y ∈ Σ + . Then x = λ and as y is a θ -palindrome, u = a i and θ ( a ) = a . Hence, z = a i +1 .Converse is straightforward. (cid:3) Hence, we deduce the following by Corollary 3.8 and Lemma 3.10.
Theorem 3.11.
Let z ∈ Σ ∗ such that z = a n for a ∈ Σ such that θ ( a ) = a , then | C θ ( z i ) | < | C θ ( z i +1 ) | for i ≥ . . Theta palindromes in the conjugacy class of a word
The distribution of palindromes in the conjugacy class of a word was studied in [7]. The authors provedthat there are at most two distinct palindromes in the conjugacy class of a given word. In this section, weshow an analogous result pertaining to the distribution of θ -palindromes and prove that the conjugacy classof any given word also contains at most two θ -palindromes. We also provide the structure of such words.We begin by recalling the following from [7]. Lemma 4.1.
If the conjugacy class of a word contains two distinct palindromes, say uv and vu , then thereexists a word x and a number i such that xx R is primitive, uv = ( xx R ) i , and vu = ( x R x ) i . In this section, we study the distribution of θ -palindromes in the conjugacy class of a word.We first observe the following. Proposition 4.2. If w n is a θ -palindrome, then w n is a θ -palindrome for n , n ≥ . We recall the following from [7].
Lemma 4.3. If u = u R and uu R = z i for a primitive word z then, i is odd and z = xx R for some x . We deduce the following.
Lemma 4.4.
Suppose u = θ ( u ) and uθ ( u ) = z i for a primitive word z . Then, i is odd and z = xθ ( x ) forsome x .Proof. If i is even, then uθ ( u ) = ( z i ) . Hence, u = θ ( u ), contradicting the conditions of the lemma. So i isodd and then | z | is even. Let z = xx ′ , where | x | = | x ′ | . We see that x is a prefix of u and x ′ is a suffix of θ ( u ). Hence, x ′ = θ ( x ), as required. (cid:3) Lemma 4.5.
If the conjugacy class of a word contains two distinct θ -palindromes, say uv and vu , thenthere exists a word x and a number i such that xθ ( x ) is primitive, uv = ( xθ ( x )) i , and vu = ( θ ( x ) x ) i .Proof. We use induction on n = | uv | . For n = 2, if there are two distinct θ -palindromes, then they mustbe of the form xθ ( x ) and θ ( x ) x where x ∈ Σ and x = θ ( x ), i.e., xθ ( x ) is primitive. For the inductivestep, assume | u | ≥ | v | without loss of generality. If | u | = | v | , then v = θ ( u ). By Lemma 4.4, we get uv = ( xθ ( x )) i , vu = ( θ ( x ) x ) i for a primitive word xθ ( x ) and i ≥ | u | > | v | . Then v is a prefix and suffix of θ ( u ). θ ( u ) = vw = w v for w , w ∈ Σ ∗ . This implies byLemma 3.3, we obtain v = ( st ) i s , and hence, θ ( u ) = ( st ) ( i +1) s , for s = λ , and i ≥
0. Looking at the centralfactor of the palindromes uv = ( θ ( s ) θ ( t )) ( i +1) θ ( s )( st ) i svu = ( st ) i s ( θ ( s ) θ ( t )) ( i +1) θ ( s ) , e see that st and ts are also θ -palindromes. If t = λ , then s is a θ -palindrome, implying uv = vu , which isa contradiction as uv and vu are distinct. If st = ts , then by Lemma 3.3, both s and t are powers of someprimitive word z and by Proposition 4.2, s, t , and z are θ -palindromes, which again implie uv = vu which isa contradiction. Thus, st = ts with | st | < n and by inductive hypothesis we get st = ( xθ ( x )) j , ts = ( θ ( x ) x ) j for some primitive word xθ ( x ). Then, we have(1) v = ( xθ ( x )) ji s = s ( θ ( x ) x ) ji Note that, if s = ( xθ ( x )) k x where x = x x , then Eq 1 becomes( x x θ ( x x )) j ( i +1) ( xθ ( x )) k x = ( xθ ( x )) k x ( θ ( x x ) x x ) j ( i +1) Then by the comparing suffix, x θ ( x ) x = θ ( x ) x x which is a contradiction, since all conjugates of xθ ( x )are distinct by Lemma 3.5. The argument for the case when s = ( xθ ( x )) k xθ ( x ) is similar. If s = x ( θ ( x ) k ,then Eq 1 becomes ( xθ ( x )) ji ( xθ ( x )) k = ( xθ ( x )) k ( θ ( x ) x ) ji and by comparing the suffix, we get xθ ( x ) = θ ( x ) x which is a contradiction as xθ ( x ) is primitive. Thus, s = ( xθ ( x )) k x for some k, ≤ k < j . Then we can easily compute t, θ ( s ), and θ ( t ) by using s (we know thevalue of st ) to get uv = ( xθ ( x )) j ( i +1) , vu = ( θ ( x ) x ) j ( i +1) . Hence, the proof. (cid:3) We give examples of words that have zero, one and two θ -palindromes each in their conjugacy class. Example 4.6.
Let Σ = { a, b, c } , and θ such that θ ( a ) = b, θ ( b ) = a and θ ( c ) = c . Then(1) The word aaa has zero θ -palindromes in its conjugacy class.(2) The word cabab has exactly one θ -palindrome abcab in its conjugacy class.(3) The word abab has two exactly two θ -palindromes abab and baba in its conjugacy class.We know from Example 4.6 that there exists words that contain exactly, zero, one or two θ -palindromesin their conjugacy class. However, in the following result, we show that a conjugacy class of any wordcontains at most two distinct θ -palindromes and we also find the structure of words that contain exactly two θ -palindromes in their conjugacy class. Theorem 4.7.
The conjugacy class of a word contains at most two θ -palindromes. It has exactly two θ -palindromes iff it contains a word of the form ( αθ ( α )) l , where αθ ( α ) is primitive and l ≥ . Note thatsuch a word has even length.Proof. It is clear from Example 1 that a word can have upto 2 θ -palindromes. WLOG, we may assume that w is primitive. Suppose there are two θ -palindromic conjugates of a word w , then by Lemma 4.5, they areof the form uv = xθ ( x ) and vu = θ ( x ) x where xθ ( x ) is primitive. We show that the conjugacy class of w contains no other θ -palindromes. onsider the conjugacy class of w = xθ ( x ). Let u and u be such that u u = xθ ( x ) and u u is a θ -palindrome. If | u | 6 = | u | , say, | u | < | u | , then we apply the same argument in Lemma 4.5 and obtain u u = ( yθ ( y )) k for some y and k . But this is impossible, because u u = xθ ( x ) is primitive. Hence, u = u , and u u = θ ( x ) x . Thus, the conjugacy class contains exactly two θ -palindromes and the wordsare of the structure described in Lemma 4.5. (cid:3) Palindromes in the set of all Theta-conjugates of a word
The concept of θ -conjugacy of a word was introduced in [9] to incorporate the notion of Watson-Crickinvolution map to the conjugacy relation. In this section, we count the number of distinct palindromes in C θ ( w ), w ∈ Σ ∗ . We find the structure of words which have at least one palindrome in the set of their θ -conjugates. We also show that if a word is a palindrome, then there can be at most two palindromesamong its θ -conjugates.It is clear from Example 3.2, that the words acc , abb and aaa have zero, one and two palindromes,respectively, in their respective conjugacy classes. We now find the structure of words with at least onepalindrome among their θ conjugates. Theorem 5.1.
Given w ∈ Σ ∗ , C θ ( w ) contains at least one palindrome iff w = uθ ( x R ) x or w = yvθ ( y R ) where u, v, x, y ∈ Σ ∗ and u, v are palindromes.Proof. We first show the converse. Let w = uθ ( x R ) x , for a palindrome u such that u, x ∈ Σ ∗ . Then, θ ( x ) uθ ( x R ) ∈ C θ ( w ) is a palindrome. Similarly, for w = yvθ ( y R ) where v, y ∈ Σ ∗ and v is a palindrome, y R θ ( v ) y ∈ C θ ( w ) is a palindrome. Therefore, when w = uθ ( x R ) x or w = yvθ ( y R ) for palindromes u and v , C θ ( w ) contains at least one palindrome. Now, let there exist at least one palindrome in C θ ( w ). Let w = uv where u, v ∈ Σ ∗ such that θ ( v ) u is a palindrome in C θ ( w ). Then, we have the following cases:(1) Let | u | < | v | and let v = v v such that | v | = | u | . Now, θ ( v ) u = θ ( v ) θ ( v ) u . Since, θ ( v ) u is apalindrome and | v | = | u | , we get θ ( v ) = u R and θ ( v ) is a palindrome. Then, w = uv = uv v = uv θ ( u R ) . Since θ ( v ) is a palindrome, v is a palindrome.(2) If | u | = | v | then, θ ( v ) = u R , i.e., v = θ ( u R ), and hence, w = uv = uθ ( u R ).(3) Let | u | > | v | and let u = u u such that | u | = | v | . Since, θ ( v ) u = θ ( v ) u u = u R θ ( v R ) we obtain, u = θ ( v R ) and u a palindrome. Then, w = uv = u u v = u θ ( v R ) v .Hence, in all cases either w = uθ ( x R ) x or w = yvθ ( y R ) where u, v, x, y ∈ Σ ∗ and u, v are palindromes. (cid:3) It is evident from the definition of θ -conjugacy of a word that, C θ ( w ) contains both w and θ ( w ). Hence,if w is a palindrome, then C θ ( w ) contains at least two palindromes w and θ ( w ). In the following, we showthat for a palindrome w , w and θ ( w ) are the only palindromes in the set of all θ -conjugates of w . heorem 5.2. For a palindrome w , the number of palindromes in C θ ( w ) is atmost two and is exactly twoif w = θ ( w ) .Proof. Let w be a palindrome. Then θ ( w ) is also a palindrome. Suppose there exists a w ′ = θ ( v ) u ∈ C θ ( w )where w = uv such that w ′ is a palindrome, then θ ( v ) u = u R θ ( v R ). We have the following cases.Case I: If | v | > | u | , then there exists a v ′ ∈ Σ + such that θ ( v ′ ) u = θ ( v R ). We then have, θ ( u ) v ′ = v R i.e., v = v ′ R θ ( u R ). Now, w = uv = uv ′ R θ ( u R ). As w is a palindrome, u R = θ ( u R ), i.e., u = θ ( u ). Then, w ′ = θ ( v ) u = θ ( v ) θ ( u ) = θ ( uv ) = θ ( w ).Case II: If | v | = | u | , then θ ( v ) = u R and since w is a palindrome, we have, v = u R which implies v = θ ( v )and u = θ ( u ). Thus, w = uu R and w ′ = θ ( v ) u = θ ( u R ) uθ ( u R ) θ ( u ) = θ ( w ).Case III: If | u | > | v | , then v R is a prefix of u and θ ( v R ) is a suffix of u since both w and w ′ are palindromes. If | u | ≤ | v | and since v R is a prefix of u and θ ( v R ) is a suffix of u , then u = v R v R θ ( v R ) with v = v v such that | v | = 2 | v | − | u | and v R = θ ( v R ). Thus, θ ( u ) = u , and hence, θ ( w ) = θ ( v ) θ ( u ) = w ′ . If | u | > | v | , then u = v R αθ ( v R ) for some α ∈ Σ + . Since w = uv , w ′ = θ ( v ) u and θ ( w ) are palindromes,we get(2) w = uv = v R αθ ( v R ) v = v R u R = v R θ ( v ) α R v ;(3) θ ( w ) = θ ( v ) θ ( u ) = θ ( v ) v R θ ( α ) θ ( v R ) = θ ( u R ) θ ( v R ) = θ ( v ) θ ( α R ) vθ ( v R ) . Equations 2 and 3 gives, αθ ( v R ) = θ ( v ) α R and v R θ ( α ) = θ ( α R ) v , respectively. Since w ′ is apalindrome, v R α = α R v and θ ( w ′ ) is a palindrome. Now θ ( w ′ ) = θ ( u ) v = v R θ ( α ) θ ( v R ) v = θ ( α R ) vθ ( v R ) v = ( θ ( w ′ )) R = v R θ ( v ) θ ( α R ) v. Then, we get, θ ( α R ) vθ ( v R ) = v R θ ( v ) θ ( α R ) . Then by Lemma 3.3, v R θ ( v ) = xy , θ ( α R ) = ( xy ) i x and vθ ( v R ) = yx where i ≥ y ∈ Σ ∗ and x ∈ Σ + . Now v R θ ( v ) = θ ( vθ ( v R )), i.e., θ ( yx ) = xy . So x and y are θ palindromes and hence, θ ( w ′ ) = v R θ ( α ) θ ( v R ) v = θ ( α R ) vθ ( v R ) v = θ ( α R ) yxv = ( xy ) i xyxv = x ( yx ) i +1 v. Then using Equation 2, we get, w = uv = v R αθ ( v R ) v = v R θ ( v ) α R v = xyx ( yx ) i v = x ( yx ) i +1 v = θ ( w ′ ) . So, θ ( w ) = w ′ .Hence, in all the cases, we are done. (cid:3) Consider the word w = uuθ ( u ) where u is a palindrome but not a θ -palindrome. Then, uuu, uθ ( u ) u ∈ C θ ( w ) are palindromes. Moreover the word w = u i θ ( u ) i , where u is a palindrome but not a θ -palindrome,has at least two palindromes. It is evident that there exists a non-palindrome w such that C θ ( w ) containsmore than one palindrome. . Theta palindromes in the Theta-conjugacy set of a word
In this section, for a given word w , we study the number of θ -palindromes in the set C θ ( w ) , w ∈ Σ ∗ . Wefind the structure of words which have at least one θ -palindrome in the set of their θ -conjugates. We alsoshow that if a word is a θ -palindrome, then there can be at most one θ -palindrome among its θ -conjugates.We first give examples of words that have zero and one θ -palindrome in their C θ ( w ) . Example 6.1.
Let Σ = { a, b } , and consider θ such that θ ( a ) = b and θ ( b ) = a . Then(1) C θ ( aaa ) = { aaa, baa, bba, bbb } . Thus, it has zero θ -palindromes .(2) C θ ( abab ) = { abab, aaba, abaa } . The word abab has exactly one θ -palindrome abab .We now find the structure of words with at least one palindrome among their θ conjugates. Theorem 6.2.
Given w ∈ Σ ∗ , C θ ( w ) contains at least one θ -palindrome iff w = uxu or w = xuu where u, x, ∈ Σ ∗ and x is a θ -palindrome.Proof. Let there exist at least one θ -palindrome in C θ ( w ) and let w = uv where u, v ∈ Σ ∗ such that θ ( v ) u is a θ -palindrome in C θ ( w ). Then, we have the following cases:(1) Let | u | < | v | . Let v = v v such that | v | = | u | . Now, θ ( v ) u = θ ( v ) θ ( v ) u . Since θ ( v ) u is a θ -palindrome and | v | = | u | , we get v = u and v is a θ -palindrome. Then, w = uv = uv v = uv u and v is a θ -palindrome.(2) Let | u | = | v | . Since θ ( v ) u is a θ -palindrome and | u | = | v | , v = u . Then, w = uv = uu. (3) Let | u | > | v | . Let u = u u such that | u | = | v | . Now, θ ( v ) u = θ ( v ) u u . Since θ ( v ) u is a θ -palindrome and | u | = | v | , u = v and u is a θ -palindrome. Then, w = uv = u u v = u vv where u is a θ -palindrome.Hence, in all the cases either w = uxu or w = xuu where u, x, ∈ Σ ∗ and x is a θ -palindrome.Conversely, let x ∈ Σ ∗ be a θ -palindrome. If w = uxu for some u ∈ Σ ∗ then, θ ( xu ) u ∈ C θ ( w ) is a θ -palindrome. Similarly, for w = xxu where u ∈ Σ ∗ , θ ( u ) xu ∈ C θ ( w ) is a θ -palindrome. Therefore, when w = uxu or w = xuu where u, x ∈ Σ ∗ and x is θ -palindrome, C θ ( w ) contains at least one θ -palindrome. (cid:3) Consider w = uv such that w is not a θ -palindrome, but C θ ( w ) has a θ -palindrome say θ ( v ) u . Since,the θ conjugacy relation is not an equivalence relation, we cannot predict the number of θ -palindromes in C θ ( uv ) using the fact the θ ( v ) u is a θ -palindrome. But, for a θ -palindrome w , we find (Theorem 6.3) theexact number of θ -palindromes in the set C θ ( w ). Theorem 6.3.
The set C θ ( w ) for a θ -palindrome w has exactly one θ -palindrome which is w itself.Proof. We prove the statement by induction on the length of w . For a word of length 1, the case istrivial. For a θ -palindrome of length 2, say a a , for a i ∈ Σ, C θ ( a a ) is { a a , θ ( a ) a } . Assume that a a and θ ( a ) a are distinct θ -palindromes, then θ ( a ) a = θ ( a ) a and a a = θ ( a ) θ ( a ). This implies = θ ( a ) = θ ( a ) = a which is a contradiction. Hence, a a = θ ( a ) a and there is only one θ -palindromein C θ ( a a ). We assume that for a word α of length less than | w | , if there is a θ -palindrome β in the C θ ( α ),then α = β . Let w be a θ -palindrome. Suppose there exist a w ′ = θ ( v ) u ∈ C θ ( w ) where w = uv such that w ′ is a θ -palindrome, then θ ( v ) u = θ ( u ) v . We have the following cases.Case I: If | u | < | v | , then as θ ( u ) is a suffix of v and u is the suffix of v , this implies that u is a θ -palindrome.Thus, w = uv = θ ( v ) θ ( u ) = θ ( v ) u = w ′ .Case II: If | u | = | v | , then u = θ ( v ) = θ ( u ) = v , we have, w = uv = θ ( v ) u = w ′ .Case III: If | u | > | v | , then θ ( v ) is a prefix of u and v is a suffix of u since both are θ -palindromes. If | u | ≤ | v | and since θ ( v ) is a prefix of u and v is a suffix of u , then u = θ ( v ) v v with v = v v such that | v | = 2 | v | − | u | and v is a θ -palindrome. Then θ ( u ) = u , and hence, θ ( w ) = θ ( v ) u = w ′ . If | u | > | v | , then u = θ ( v ) u v where u ∈ Σ + . As w is a θ -palindrome, uv = θ ( v ) θ ( u ), this implies θ ( v ) u vv = θ ( v ) θ ( v ) θ ( u ) v . We have, u v = θ ( v ) θ ( u ). Also, as w ′ is a θ -palindrome, θ ( v ) u = θ ( u ) v ,this implies θ ( v ) θ ( v ) u v = θ ( v ) θ ( u ) vv . We have, θ ( v ) u = θ ( u ) v . Now, u v = θ ( v ) θ ( u ) and θ ( v ) u = θ ( u ) v . Then, by induction hypothesis, as u v and θ ( v ) u are both θ -conjugates of u v and are both θ -palindromes, we have u v = θ ( v ) u , thus, w = uv = θ ( v ) u vv = θ ( v ) θ ( v ) u v = θ ( v ) u = w ′ . In all the cases, we are done. (cid:3)
Consider the word w = uxxuxx where x, u are distinct θ -palindromes. Then, θ ( x ) uxxux, θ ( uxx ) uxx ∈ C θ ( w ). Moreover, the word w ′ = ( u i x i ) i has at least two θ -palindromes in the set C θ ( w ′ ). It is evidentthat there exists words w such that C θ ( w ) contains more than one θ palindrome.7. Conclusions
We have studied the distribution of palindromes and θ -palindromes among the conjugates and θ -conjugatesof a word. We have characterized the words which have the maximum number of θ -conjugates. We have foundstructures of words which have at least one palindrome and θ -palindrome in the set of their θ -conjugates.We have enumerated palindromes and θ -palindromes in the set C θ ( w ) where w is a palindrome and a θ -palindrome, respectively. The maximum number of palindromes and θ -palindromes in the set of θ -conjugatesof a word is still unknown in general. After checking several examples, we believe that the maximum numberof palindromes and θ -palindromes in the set C θ ( w ) for a word w is two. We have also given examples of thewords that achieve the above bound. One of our immediate future work is to prove this bound. References [1] F. Blanchet-Sadri and D. Luhmann. Conjugacy on partial words.
Theoretical Computer Science , 289(1):297 – 312, 2002.[2] E. Czeizler, L. Kari, and S. Seki. On a special class of primitive words.
Theoretical Computer Science , 411(3):617 – 630,2010.[3] M. Daley and I. McQuillan. On computational properties of template-guided DNA recombination. In
DNA , 2005.
4] A. de Luca and A. D. Luca. Pseudopalindrome closure operators in free monoids.
Theoretical Computer Science , 362(1):282–300, 2006.[5] M. Domaratzki. Hairpin structures defined by dna trajectories.
Theory of Computing Systems , 44:432–454, 2007.[6] M. H. Garzon, V. T. Phan, S. Roy, and A. Neel. In search of optimal codes for DNA computing. In
DNA , 2006.[7] C. Guo, J. Shallit, and A. M. Shur. On the Combinatorics of Palindromes and Antipalindromes. arXiv e-prints , pagearXiv:1503.09112, Mar. 2015.[8] J. E. Hopcroft and J. D. Ullman.
Formal Languages and their relation to automata . Addison-Wesley Longman Inc., 1969.[9] L. Kari and K. Mahalingam. Watson–crick conjugate and commutative words. In
Garzon M, Yan H (eds) Preproceedingsof the DNA computing 13. , pages 75–87. Springer, Berlin, 2007.[10] L. Kari and K. Mahalingam. Watson-Crick palindromes in DNA computing.
Natural Computing , 9(2):297–316, 2010.[11] M. Lothaire.
Combinatorics on words . Cambridge University Press, 1997.[12] R. C. Lyndon and M. P. Sch¨utzenberger. The equation a M = b N c P in a free group. Michigan Math. J. , 9:289–298, 1962.[13] A. Marathe, A. Condon, and R. M. Corn. On combinatorial dna word design. In
DNA Based Computers , 1999.[14] H. Shyr.
Free Monoids and Languages.
Hon Min Book Company, 2001.
Department of Mathematics,, Indian Institute of Technology Madras, Chennai, 600036, India
E-mail address : [email protected],[email protected], [email protected]@iitm.ac.in,[email protected], [email protected]