Next Article in Journal
Multi-AGV Flexible Manufacturing Cell Scheduling Considering Charging
Previous Article in Journal
Resource Allocation in V2X Communications Based on Multi-Agent Reinforcement Learning with Attention Mechanism
Previous Article in Special Issue
U(h)-Free Modules over the Lie Algebras of Differential Operators
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Algebraic Characterization of Prefix-Strict Languages

1
School of Economics and Finance, Xi’an International Studies University, Xi’an 710128, China
2
School of Mathematics and Statistics, Huizhou University, Huizhou 516007, China
3
School of Science, Air Force Engineering University, Xi’an 710051, China
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(19), 3416; https://doi.org/10.3390/math10193416
Submission received: 10 August 2022 / Revised: 8 September 2022 / Accepted: 16 September 2022 / Published: 20 September 2022
(This article belongs to the Special Issue Rota-Baxter Algebra and Related Topics)

Abstract

:
Let Σ + be the set of all finite words over a finite alphabet Σ . A word u is called a strict prefix of a word v, if u is a prefix of v and there is no other way to show that u is a subword of v. A language L Σ + is said to be prefix-strict, if for any u , v L , u is a subword of v always implies that u is a strict prefix of v. Denote the class of all prefix-strict languages in Σ + by P ( Σ + ) . This paper characterizes P ( Σ + ) as a universe of a model of the free object for the ai-semiring variety satisfying the additional identities x + y x x and x + y x z x . Furthermore, the analogous results for so-called suffix-strict languages and infix-strict languages are introduced.

1. Introduction

In algebraic theory of formal languages, there are two common methods to cluster languages. One is constructing algebra structure for a given class of languages, the other is collecting languages that satisfy a property with respect to a binary relation over the free monoid Σ * (generated by a finite alphabet Σ ). This paper aims at constructing an algebra structure for a class of languages that is defined by a partial order. Furthermore, we characterize the algebra structure as a model of a free object for a variety.
It is noted that algebraic and combinatorial properties of languages and words play a role in both clustering methods mentioned above. This is the case for the regular languages which can be defined by regular expressions. Let Reg ( Σ * ) denote the class of regular languages over Σ and let ∪, ∘ and * denote the well-known regular operations, i.e., set union, catenation and Kleene closure, respectively. It can be obtained from the combinatorial properties of regular languages that Reg ( Σ * ) is closed under all these operations. Hence, ( Reg ( Σ * ) , , , * ) forms an algebra structure [1], which contains all the regular expressions as its elements. This algebra has been widely applied in theoretical computer and information science. Another example is the semiring of finite languages. Let F ( Σ + ) denote the class of all finite languages over Σ . It easy to see that F ( Σ + ) is closed under the operations ∪ and ∘, and so ( F ( Σ + ) , , ) forms an algebra structure. However, language classes are not always closed under regular operations.
On the other hand, a partial order seems a more convenient tool for defining a language. Generally, for a given partial order ≤ over Σ * , three types of language might be proposed. A language L Σ * is said to be convex with respect to ≤, if for any u , w L with u w , the inequalities u v and v w always imply that v L , where v Σ * . Further, L is said to be closed with respect to ≤, if u L and v u imply that v L . Furthermore, L is said to be free with respect to ≤, if it is an independent set with respect to ≤.
Many convex and free languages with respect to various binary relations were introduced by G. Thierrin, M. Ito and their co-researchers, and further studied by T. Ang and J. Brzozowski. They established the algebraic properties, combinatorial structures and decision algorithms of these three types of languages with respect to prefix relation, suffix relation, outfix relation, infix relation, factor relation, subword relation and so on. We refer the reader to [2,3,4,5] for details. In particular, a hypercode is a free language with respect to the embedding order (also known as a subword relation) also studied by L. Haines in [6]. Here, an embedding order, denoted by H , is a partial order over Σ * defined by: for any u , v Σ * , u H v if and only if u = x 1 x 2 x n and v = y 0 x 1 y 1 x n y n , where n is a positive integer and x i , y i Σ * , i = 0 , 1 , , n . A language L is a hypercode means that for any u , v L , ( u , v ) H .
Since the definition of embedding order explicates directly the combination characterization of words involved in it, the combinatorial properties of hypercodes are almost certain to relate to them. L. Haines proved that every hypercode was finite. H. Shyr and G. Thierrin [3] proved that the class of all hypercodes over Σ , denoted by H ( Σ + ) , was closed under the regular operation ∘. Further, Z. Wang et al. defined in [7] a binary operation + H in H ( Σ + ) by picking out the minimal elements (in the sense of H ) from the union A B of A , B H ( Σ + ) . It was shown that H ( Σ + ) was closed under + H and hence ( H ( Σ + ) , + H , ) formed an algebra structure.
Moreover, to construct an algebra structure for a language class also makes some sense in the effort to find a model of a free object for a variety. The well-known examples are structures of free semigroups and free commutative (noncommutative) algebras. The operation rules in these structures reflect the combinatorial properties among words and commutative (noncommutative) polynomials, which represent, respectively, the combinatorial properties of elements in a semigroup and commutative (noncommutative) algebra. When it comes to an algebra structure of a class of languages, if its operation rules reflect (or are defined by) the combinatorial characterizations of languages, then this structure has a probability to be a model of a free object for a variety, just as a free semigroup does.
By an additively idempotent semiring (ai-semiring for short) we mean a semiring whose additive reduct is a semilattice, i.e., a commutative idempotent semigroup. The variety of all ai-semirings is denoted by AI . M. Kuřil and L. Polák initiated the studies in the field of constructing a model of a free object for an ai-semiring variety by an algebra structure of a class of languages. In [8], they proved that the structure ( F ( Σ + ) , , ) was freely generated by Σ in the variety AI . We refer the reader to [9] for more detail on subvarieties of semilattice ordered algebras.
In addition, the algebra ( H ( Σ + ) , + H , ) was also characterized as a model of a free object for an ai-semiring variety satisfying the additional identities x + x y x and x + y x x (see [7] for details). Undoubtedly, these two identities (named absorption laws) reflect some special combinatorial properties of hypercodes, which are derived from the embedding order.
Further, more ai-semiring varieties with absorption laws as additional identities were studied in [10]. The authors established combinatorial properties of three classes of languages containing hypercodes and constructed algebra structures for these classes, respectively. All these three structures were proved to be models of free objects for ai-semiring varieties satisfying x + x y x , x + y x x and x z + x y z x z , respectively. For literature on studying ai-semiring varieties by establishing combinatorial properties of words, we refer the reader to [11,12,13,14,15,16,17].
Following the study in [10], this paper focuses on ai-semiring varieties with absorption laws as additional identities. We define a class of so-called prefix-strict languages, denoted by P ( Σ + ) , and recall some notions in Section 2 as preliminary. In Section 3, we study a subset of the embedding order, which might be proved a partial order, say P . It is shown that the class of free languages with respect to P coincides with the class P ( Σ + ) . Further, we establish in Section 4 some combinatorial properties for languages in P ( Σ + ) , which are used to verify the operation properties of the algebra structure construct for P ( Σ + ) . In Section 5, the class P ( Σ + ) is characterized as a universe of an ai-semiring, which is freely generated by Σ in the variety with additional identities x + y x x and x + y x z x . Moreover, some parallel concepts and results are introduced in this paper, simultaneously.

2. Preliminaries

Let Σ be a nonempty finite alphabet and Σ * the set of all finite words. Denote the empty word by ε and let Σ + = Σ * \ { ε } . Given two words u , v Σ * , we say u is a prefix (suffix) of v, if there exists x Σ * such that v = u x ( v = x u ). Furthermore, u is an infix of v, if v = x u y for some x , y Σ * . Clearly, a prefix or a suffix is also an infix.
Let u , v Σ + . u is called a subword of v, if u H v . Further, if u H v and u v , then u is a proper subword of v. Furthermore, u is said to be a factor of v, if there exist x , y Σ * such that v = x u y . Thus, a prefix (suffix) or an infix of a word v must be its subword and factor as well.
Suppose that u is a subword of v. The following example shows that u, as a string of letters, may be embedded letter by letter into a word for obtaining v in different ways.
Example 1.
Let u = a b and v = a b a b a b be two words in { a , b } * . It is easy to see that a b is a prefix (suffix) and an infix of v. Now, if we consider v = a b a b a b as a y 1 b y 2 , where y 1 = b a and y 2 = a b , then we get another case to show that u is a subword of v.
We concern ourselves with the case that being a prefix (infix) is the unique way to show that u is a subword v. Formally, we have the following definition.
Definition 1.
Let u , v Σ + . For any x 1 , x 2 , , x n Σ + and any y 0 , y 1 , , y n Σ * , if u = x 1 x 2 x n , together with v = y 0 x 1 y 1 x 2 y 2 x n y n , always implies that y 0 y 1 y n 1 = ε ( y 1 y 2 y n = ε , y 1 y n 1 = ε , respectively), then u is called a strict prefix (strict suffix, strict infix, respectively) of v. In particular, if u Σ and there is only one occurrence of u in the word v, then u is also a strict infix of v.
By this definition, we know that the word u = a b in Example 1 is neither a strict prefix (strict suffix) nor a strict infix of v. Furthermore, it is easy to see that a strict prefix (strict suffix) must be a strict infix. The following two propositions give necessary and sufficient conditions for a prefix and infix to be strict, respectively.
Proposition 1.
Let u = x σ and v = x σ z be two words in Σ + , where σ Σ and x , z Σ * . Then, u is a strict prefix of v if and only if there is no occurrence of σ in the word z.
Proof. 
From the assumptions u = x σ and v = x σ z , we know that u is a prefix of v.
Suppose that u is a strict prefix of v. Assume that σ is a factor of z. Then, z = a σ b for some a , b Σ * . Thus, the equality v = x σ z = x σ a σ b holds. If we write y 0 x y 1 σ b as x σ a σ b , where y 0 = ε and y 1 = σ a , then y 0 y 1 ε , a contradiction. Therefore, σ is not a factor of z, as required.
Conversely, suppose that there is no occurrence of σ in the word z. Note that u is a subword of v, since u is a prefix of v. Given x 1 , x 2 , , x n Σ * and y 0 , y 1 , , y n Σ * , if both u = x σ = x 1 x 2 x n and v = x σ z = y 0 x 1 y 1 x n y n hold, then there exists x n Σ * such that
u = x σ = x 1 x 2 x n σ and v = x σ z = y 0 x 1 y 1 x n σ y n ,
since σ is the right-most letter of u. This means that x = x 1 x 2 x n . In the following, we show that σ is not a factor of y n . In fact, if assume that if σ is a factor of y n , then there exists y n Σ * such that y n = y n σ z . Hence, we have that v = x σ z = y 0 x 1 y 1 x n σ y n σ z . It follows that x = y 0 x 1 y 1 x n σ y n . Therefore, x 1 x 2 x n = y 0 x 1 y 1 x n σ y n and so | x 1 x 2 x n | = | y 0 x 1 y 1 x n σ y n | . Since σ ε , we also have | x 1 x 2 x n |   <   | y 0 x 1 y 1 x n σ y n | , a contradiction.
Now, we know that there is no occurrence of σ in the y n . Then, we have that y n = z and so x 1 x 2 x n = x = y 0 x 1 y 1 x n . This implies that y 0 y 1 y n 1 = ε . Therefore, u is a strict prefix of v, as required. □
In an analogue fashion, we can verify the following proposition and we omit the proof.
Proposition 2.
Let u = θ x σ and v = y θ x σ z be two words in Σ + , where θ , σ Σ , x , y , z Σ * . Then, u is a strict infix of v if and only if there is no occurrence of θ in y and there is no occurrence of σ in z.
Definition 2.
A language L Σ + is said to be prefix-strict (suffix-strict, infix-strict, respectively) if and only if for any u , v L , u H v implies that u is a strict prefix (strict suffix, strict infix, respectively) of v. The class of all prefix-strict, suffix-strict and infix-strict languages in Σ + are denoted by P ( Σ + ) , S ( Σ + ) and I ( Σ + ) , respectively.
Let w = σ 1 σ 2 σ n be a word with σ i Σ , i = 1 , 2 , , n . Then, n is called the length of w and is denoted by | w | . Suppose that L is prefix-strict and that u , v L with | u | | v | . Then, we know from Definition 2 that either u is a strict prefix of v or ( u , v ) H . Hence, we have that a free language with respect to H must be a strict prefix. This means that H ( Σ + ) P ( Σ + ) . Similarly, we can get that H ( Σ + ) S ( Σ + ) and H ( Σ + ) I ( Σ + ) .
Example 2.
Let Σ = { a , b , c } . Suppose that A = { a , a b } , B = { b , a c } . Then, C = { a c , a b c } . It is easy to see that A is prefix-strict and infix-strict but is not suffix-strict. B is prefix-strict (suffix-strict) and infix-strict, since B H ( Σ + ) . C is neither prefix-strict (suffix-stric) nor infix-strict, since a b is neither a strict prefix (strict suffix) nor a strict infix of a b c , even if it is a subword.
Now, recall the three subsets of the embedding order introduced in [10]. For any u , v Σ + , u R ( u L ) if and only if there exist some x 1 , x 2 , , x n Σ + and y 1 , y 2 , , y n Σ * such that u = x 1 x 2 x n and v = y 1 x 1 y 2 x 2 y n x n ( v = x 1 y 1 x 2 y 2 x n y n ). In addition, u O v if and only if there exist some x 0 , x 1 , x 2 , , x n Σ + and y 1 , y 2 , , y n Σ * such that u = x 0 x 1 x n and v = x 0 y 1 x 1 y 2 x n 1 y n x n .
All these binary relations prove to be partial orders over Σ + . They show different manners to embed some string of words y 1 , y 2 , , y n into the word u for obtaining v. Denote the class of all free languages with respect to L , R and O by L ( Σ + ) , R ( Σ + ) and O ( Σ + ) , respectively. It is true that H ( Σ + ) X ( Σ + ) , for all X { L , R , O } .
In the following, we recall the formal definitions of notions mentioned in the introduction section.
By a semiring, we mean an algebra ( S , + , · ) such that:
  • The additive reduct ( S , + ) is a commutative semigroup;
  • The multiplicative reduct ( S , · ) is a semigroup;
  • ( S , + , · ) satisfies the identities x ( y + z ) x y + x z and ( y + z ) x y x + z x .
A semiring ( S , + , · ) is called an ai-semiring, if it satisfies the identity x + x x . An algebra ( S , + , · ) is called a ( 2 , 2 ) -type algebra if there are two binary operations involved in this algebra. In this manner, the additive reduct ( S , + ) of ( S , + , · ) is a ( 2 ) -type algebra. For the formal definition of a type of an algebra and more examples, we refer the reader to Definition 1.2 in [18].
By a variety, we mean a class of algebras of the same type that is closed under subalgebras, homomorphic images and direct products. It is well known (Birkhoff’s theorem) that a class of algebras of the same type is a variety if and only if it is an equational class, i.e., a class of algebras that satisfies all the members in a given set of identities.
An ai-semiring identity over Σ is an expression of the form u v , where u , v F ( Σ + ) . For the free object ( F ( Σ + ) , , ) in AI , we write + as ∪ and write
u 1 + u 2 + + u k v 1 + v 2 + + v l
as the ai-semiring identity { u i | 1 k } { v i | 1 l } , for convenience. We give an example in the following to show that a variety is an equational class.
Example 3.
Given a set of identities
E = { ( x + y ) + x x + ( y + z ) , x + y y + x , ( x y ) z x ( y z ) , x ( y + z ) x y + x z , ( y + z ) x y x + z x , x + x x } .
Since all ai-semirings satisfy the identities in E, the variety AI is an equational class.
Furthermore, we denote an ai-semiring variety satisfying the additional identities u i v i , by [ u 1 v 1 , u 2 v 2 , , u n v n ] , where i = 1 , 2 , , n and n is a positive integer. Then, [ u 1 v 1 , u 2 v 2 , , u n v n ] is an equational class defined by the set E { u 1 v 1 , u 2 v 2 , , u n v n } , where E is the set of identities given by Example 2.
Let V be an algebra variety of type F and let U ( Σ ) be an algebra of type F which is generated by Σ . If for every K V and for every map
α : Σ K ,
there is a unique homomorphism
β : U ( Σ ) K ,
which extends α (i.e., α ( Σ ) = β ( Σ ) for σ Σ ), then U ( Σ ) is said to be a free object in V generated by Σ (or U ( Σ ) is freely generated by Σ in V ). For more details on free algebra, we refer the reader to [18].
In this paper, we take the following steps to show an algebra structure to be a model of a free object for an ai-semiring variety. Firstly, we verify that this algebra structure is a member of the given variety. Secondly, we prove that it is a free object in the variety.
In the sequel, u , v and w are words in Σ + , unless otherwise specified.

3. Partial Orders

In this section, we shall characterize the class P ( Σ + ) as a independent set of a certain partial order, namely, to show that languages in P ( Σ + ) are free with respect to a partial order. Similar results for S ( Σ + ) and I ( Σ + ) are obtained. Furthermore, we study the inclusion relations among those classes of languages we mentioned in the last section.
Definition 3.
Let P be a binary relation over Σ + . For any u , v Σ + , u P v if and only if there exist x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * such that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y n 1 x n y n and such that the implication y 0 y 1 y n 1 = ε y n = ε holds as well.
It is easy to see that P H . The following example shows that the implication in the definition of P may not always hold for every finite sequence y 0 , y 1 , , y n to state u H v , even if u P v .
Example 4.
Let Σ = { x 1 , x 2 , y } . Suppose that u = x 1 x 2 , v = x 1 y x 2 and w = x 1 x 2 y . By the definition of P , we have that u P v but u P w . Further, assume that w = x 1 x 2 x 2 . Then, u P w , since we can set w = y 0 x 1 y 1 x 2 y 2 , where y 0 = y 2 = ε and y 1 = x 2 . From this, we deduce that the implication holds. However, if we write y 0 x 1 y 1 x 2 y 2 as w , where y 0 = y 1 = ε and y 2 = x 2 , then the implication y 0 y 1 = ε y 2 = ε is not true.
Similar to the definition of P , we have:
Definition 4.
Let S be a binary relation over Σ + . For any u , v Σ + , u S v if and only if there exist x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * such that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y n 1 x n y n and such that the implication y 1 y 2 y n = ε y 0 = ε holds as well.
Let u be a proper subword of v. In the following, we present a necessary and sufficient condition for u P v to hold.
Assume that u P v and u v . Then, there must exist x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * such that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y n 1 x n y n and scuh that y 0 y 1 , y n 1 ε . In fact, if y 0 y 1 , y n 1 = ε , we know from the implication in Definition 1 that y n = ε . This yields u = v , a contradiction.
Conversely, assume that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y n 1 x n y n for some x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * , where y 0 y 1 , y n 1 ε . In this case, the implication in Definition 1 holds. We thus have that u is a proper subword of v, since y 0 y 1 , y n 1 ε .
Summarizing the above discussion with a similar condition for u S v to hold, we give the following remark to interpret the relations P and S in detail.
Remark 1.
Let u be a proper subword of v. Then, u P v ( u S v ) if and only if u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 x n y n for some x 1 , x 2 , , x n Σ + and y 0 , y 1 , y n Σ * , where y 0 y 1 , y n 1 ε ( y 1 y 2 , y n ε ).
Let u be a proper subword of v. Suppose now that u is a strict prefix of v. Then, for any x 1 , x 2 , , x n Σ + and y 0 , y 1 , y n Σ * , u = x 1 x 2 x n together with v = y 0 x 1 y 1 x 2 x n y n implies that y 0 y 1 , y n 1 = ε . This means that ( u , v ) P .
For any two words u and v, the following proposition gives the necessary and sufficient condition for u P v to hold, which may be used handily.
Proposition 3.
Let u = x σ and v = y σ z be two words in Σ * , where σ Σ , x , y , z Σ * and there is no occurrence of σ in the word z. Then, u P v if and only if either x is a proper subword of y or u = v .
Proof. 
Suppose that u P v and so x σ H y σ z . Since there is no occurrence of σ in the word z, we get that x H y . If x is not a proper subword of y, then x = y . This deduce that v = x σ z and that x σ H x σ z . By Proposition 1, we get that x σ is a strict prefix of x σ z . Thus, we know from the discussion in Remark 1 that x σ = x σ z and hence u = v .
Conversely, is it a trivial that u = v implies u P v . Suppose now that x is a proper subword of y. Then, there exist some x 1 , x 2 , , x n Σ + and y 0 , y 1 , y n Σ * such that u = x 1 x 2 x n σ and v = y 0 x 1 y 1 x 2 x n y n σ z , where y 0 y 1 y n ε . By Remark 1, u P v , as required. □
In the following, we shall prove that P and S are partial orders. By Definition 4, P and S are reflexive. Furthermore, it is a routine matter to verify that they are antisymmetric. Then, we have proved part of the following theorem.
Theorem 1.
Both P and S are partial orders.
Proof. 
We only need to prove that P and S are transitive.
Assume that u P v and v P w . If u = v or v = w , it is easy to see that u P w . Otherwise, u is a proper subword of v and v is a proper subword of w. Thus, u is a proper subword of w. Suppose now that u = x σ and v = y σ z , where σ Σ , x , y , z Σ * and there is no occurrence of σ in the word z. By Proposition 3, x is a proper subword of y. Furthermore, there must exist b , c Σ * such that w = b σ c (since σ is a factor of v an so a factor of w), where there is no occurrence of σ in c. Associate this fact with the truth y σ z H b σ c , we can verify y H b as a matter of routine. Hence, we get that x is a proper subword of b. Therefore, we know from Proposition 3 that u P w and so P is transitive, as required.
A similar result is also true for S and we omit the proof. □
Definition 5.
Let I be a binary relation over Σ + . For any u , v Σ + , u I v if and only if there exist x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * such that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y n 1 x n y n and that the implication y 1 y 2 y n 1 = ε y 0 y n = ε holds as well. In particular, if | u | = 1 , then u I v if only if u = v .
The following example shows that the implication in Definition 5 may not always hold for every finite sequence y 0 , y 1 , , y n to state u H v , even if u I v .
Example 5.
Let Σ = { x 1 , x 2 , a , b , c } . Suppose that u = x 1 x 2 , v = a x 1 b x 2 c and w = a x 1 x 2 b . By the definition of I , we have that u I v but u I w . Further, assume that w = x 1 x 1 x 2 x 2 . Then, u I w , since we can set w = y 0 x 1 y 1 x 2 y 2 , where y 0 = ε , y 1 = x 1 and y 2 = x 2 . Thus, we deduce that the implication holds. However, if we write y 0 x 1 y 1 x 2 y 2 as w , where y 0 = x 1 , y 1 = ε and y 2 = x 2 , then the implication y 1 = ε y 0 y 2 = ε is not true.
Similar to Remark 1, the following remark give a further specification for Definition 5.
Remark 2.
Let u (with | u | 2 ) be a proper subword of v. Then, u I v if and only if u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 x n y n for some x 1 , x 2 , , x n Σ + and y 0 , y 1 , y n Σ * , where y 1 y 2 y n 1 ε .
Let u be a proper subword of v. Suppose now that u is a strict infix of v. Then, for any x 1 , x 2 , , x n Σ + and y 0 , y 1 , y n Σ * , u = x 1 x 2 x n together with v = y 0 x 1 y 1 x 2 x n y n implies that y 1 y 2 , y n 1 = ε . This means that ( u , v ) L .
From Remarks 1 and 2, we have I P and I S .
We give a necessary and sufficient condition for u I v to hold. Since the proof process is similar to Proposition 3, we omit the proof.
Proposition 4.
Let u = θ a σ and v = x θ y σ z , where θ , σ Σ , a , x , y , z Σ * and there is no occurrence of θ and σ in the words x and z, respectively. Then, u I v if and only if either a is a proper subword of y or u = v .
Using this proposition, we can prove the following theorem.
Theorem 2.
I is a partial order.
Proof. 
It is a routine matter to verify that I is reflexive and antisymmetric. Now, we show that it is also transitive.
Assume that u I v and v I w . If u = v or v = w , it is easy to see that u I w . Otherwise, u is a proper subword of v and v is a proper subword of w. Thus, u is a proper subword of w.
Suppose now that u = θ a σ and v = x θ y σ z , where θ , σ Σ , a , x , y , z Σ * and there are no occurrences of θ and σ in the words x and z, respectively. By Proposition 4, a is a proper subword of y. Furthermore, there must exist b , c , d Σ * such that w = b θ c σ d (since both θ and σ are factors of v and so are factors of w), where there are no occurrences of θ and σ in the words b and d, respectively. Associate this fact with the truth x θ y σ z H b θ c σ d , we deduce that y H c . Hence, we get that a is a proper subword of c. Therefore, we know from Proposition 4 that u P w and so I is transitive. Then, we obtain that I is a partial order, as required. □
Recall that the classes P ( Σ + ) , S ( Σ + ) and I ( Σ + ) are collections of all prefix-strict, suffix-strict and infix-strict languages in Σ + , respectively. In the following, we show that for any X { P , S , I } , X ( Σ + ) is exactly the collection of all free languages with respect to the partial order X .
Proposition 5.
P ( Σ + ) and S ( Σ + ) are the classes of all free languages with respect to P and S , respectively.
Proof. 
Let L Σ + be a prefix-strict language and u , v be distinct words in L. On one hand, if u and v are incomparable under the relation H , they are also incomparable under P . On the other hand, we suppose that u is a proper subword of v. Then, u is a strict prefix of v. By Remark 1, ( u , v ) P and hence L is a free language with respect to P .
Conversely, let L be a free language with respect to P and u , v L . Suppose that u H v . For any x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * , if u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y 2 x n y n , then it is true that y 0 y 1 y n 1 = ε (in fact, if y 0 y 1 y n 1 ε , we get that u P v , contradict to the assumption) and it follows that u is a strict prefix of v. Therefore, L is prefix-strict.
We can prove that S ( Σ + ) is the class of all free languages with respect to S in a similar way. Therefore, the proof is omitted. □
Proposition 6.
I ( Σ + ) is the class of all free languages with respect to I ,
Proof. 
Let L Σ + be an infix-strict language and u , v be distinct words in L. If ( u , v ) H , then ( u , v ) I . Otherwise, assume that u is a proper subword of v. Then, u is a strict infix of v. By Remark 2, ( u , v ) I . Therefore, L is a free language with respect to I .
Conversely, let L be a free language with respect to I and u , v be two distinct words in L. For any x 1 , x 2 , , x n Σ + and any y 0 , y 1 , , y n Σ * , if u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y 2 x n y n , then it is true that y 1 y 2 y n 1 = ε and it follows that u is a strict infix of v. Therefore, L is infix-strict. □
Recall that a binary relation ρ on Σ + is said to be strict ([4]) if for all u , v Σ + ,
(1)
u ρ u ;
(2)
u ρ v | u | | v | ;
(3)
u ρ v , | u | = | v | u = v .
It is can be easily verified that for any X { L , R , O , H , P , S , I } , X is strict. Based on the following lemma, we can figure out the inclusion relation about all these strict relations.
Lemma 1
([4]). Let ρ 1 , ρ 2 be two strict binary relations on Σ + and I ρ 1 and I ρ 2 be the classes of all independent sets with respect to ρ 1 and ρ 2 , respectively. Then, ρ 1 ρ 2 if and only if I ρ 1 I ρ 2 .
Since I X H for any X { P , S } , we know form Lemma 1 that
H ( Σ + ) X ( Σ + ) I ( Σ + ) .
Furthermore, it is routine to verify that R P , L S and O I . We then have that
P ( Σ + ) R ( Σ + ) , S ( Σ + ) L ( Σ + ) and I ( Σ + ) O ( Σ + ) .
In addition, it is shown in [10] that
H ( Σ + ) Y ( Σ + ) O ( Σ + ) ,
where Y { L , R } . We illustrate all above inclusion relations by Figure 1.
Since it was proved in [10] that every language in O ( Σ + ) is finite, we get that any language in P ( Σ + ) S ( Σ + ) B ( Σ + ) is also finite.

4. Combinatorial Properties

In this section, we study the combinatorial properties of languages we defined in the last section. Let A , B be languages of Σ * . We write A B to mean
{ a b a A , b B } .
Shyr and Thierrin [3] proved that the class of H ( Σ + ) was closed under the operation ∘ and Ito et al. [2] showed a similar result for the class of outfix-free languages. However, for two prefix-strict (suffix-strict, infix-strict, respectively) languages A and B, A B does not need to be prefix-strict (suffix-strict, infix-strict, respectively), as the following example shows.
Example 6.
Let Σ = { a , b , c } . Suppose that A = { a , a b } , B = { c } . Then, A B = { a c , a b c } . It is easy to see that A and B are prefix-strict, but A B is not prefix-strict, since a c P a b c .
Next, we give a necessary and sufficient condition for X ( Σ + ) to be closed under the operation ∘, where X { P , S , I } .
Proposition 7.
Let A , B P ( Σ + ) . Then, A B P ( Σ + ) if and only if A H ( Σ + ) .
Proof. 
Let A , B P ( Σ + ) . Then, for any a , a A with | a | < | a | , we have that either ( a , a ) H or a is a strict prefix of a .
Assume that A B P ( Σ + ) . Then, it is a truth that a is not a strict prefix of a . In fact, if a = a c for some c Σ + , then for any b B , we have that a b , a c b A B . Since a b P a c b , we get A B P ( Σ + ) , a contradiction. This shows that ( a , a ) H and hence A H ( Σ + ) .
Conversely, assume that A H ( Σ + ) and B P ( Σ + ) . Given u , v A B . Suppose that u is a subword of v. Then, u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y 2 y n 1 x n y n for some x 1 , x 2 , , x n Σ + and y 0 , y 1 , y 2 , , y n Σ * . Now, we prove that u is a strict prefix of v.
Let i and j be two integers such that x 1 x 2 x i A , x i + 1 x i + 2 x n B and
y 0 x 1 y 1 y j 1 x j A , y j x j + 1 x n y n B
( or y 0 x 1 y 1 y j 1 x j y j A , x j + 1 y j + 1 x n y n B ) .
It is true that i j . In fact, if i > j , then we have from the fact x j + 1 ε that
x i + 1 x i + 2 x n P y j x j + 1 y i x i + 1 x n y n or
x i + 1 x i + 2 x n P x j + 1 y i x i + 1 x n y n .
Both of these two cases contradict to B P ( Σ + ) . Furthermore, we have j i . In fact, if j > i , then we have that
x 1 x 2 x i H y 0 x 1 y 1 x i y i + 1 y j 1 x j
or x 1 x 2 x i H y 0 x 1 y 1 x i y i + 1 y j 1 x j y j ,
which contradicts A H ( Σ + ) . Hence, we have i = j . It follows that y 0 y 1 y i 1 = ε (or y 0 y 1 y i = ε ) and that y i y i + 1 y n 1 = ε (or y i + 1 y n 1 = ε ). This implies that u is a strict prefix of v. Therefore, A B P ( Σ + ) . □
By a similar method, one can verify the following proposition.
Proposition 8.
Let A , B S ( Σ + ) . Then, A B S ( Σ + ) if and only if B H ( Σ + ) .
Proposition 9.
Let A , B I ( Σ + ) . Then, A B I ( Σ + ) if and only if A S ( Σ + ) and B P ( Σ + ) .
Proof. 
Let A , B I ( Σ + ) . Suppose that A B I ( Σ + ) . If we assume that there exist u , v A such that u S v , then there exist x 1 , x 2 , , x n Σ + and y 0 , y 1 , , y n Σ * such that u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 x n y n with y 1 y 2 y n ε . It follows that
x 1 x 2 x n b I y 0 x 1 y 1 x 2 y n 1 x n y n b
for any b B , which is a contradiction with A B I ( Σ + ) . Hence, we deduce that A S ( Σ + ) . In a similar way, we can prove that A P ( Σ + ) .
Conversely, assume that A S ( Σ + ) and B P ( Σ + ) . Given u , v A B . Suppose that u is a subword of v. Then, u = x 1 x 2 x n and v = y 0 x 1 y 1 x 2 y 2 y n 1 x n y n for some x 1 , x 2 , , x n Σ + and y 0 , y 1 , y 2 , , y n Σ * . Now, we prove that u is a strict infix of v.
Let i and j be two integers such that x 1 x 2 x i A , x i + 1 x i + 2 x n B and
y 0 x 1 y 1 y j 1 x j A , y j x j + 1 x n y n B
( or y 0 x 1 y 1 y j 1 x j y j A , x j + 1 y j + 1 x n y n B ) .
It is true that i j . In fact, if i > j , then we have from the fact x j + 1 ε that
x i + 1 x i + 2 x n P y j x j + 1 y i x i + 1 x n y n or
x i + 1 x i + 2 x n P x j + 1 y i x i + 1 x n y n .
Both of these two cases contradict B P ( Σ + ) . Furthermore, we have j i . In fact, if j > i , then we have that
x 1 x 2 x i S y 0 x 1 y 1 x i y i + 1 y j 1 x j
or x 1 x 2 x i S y 0 x 1 y 1 x i y i + 1 y j 1 x j y j ,
which contradicts to A S ( Σ + ) . Hence, we have i = j . If follows that x 1 x 2 x i and y 0 x 1 y 1 y i 1 x i (or y 0 x 1 y 1 y i 1 x i y i ) are elements in A. This implies that y 0 y 1 y i 1 = ε (or y 0 y 1 y i = ε ). Furthermore, from the fact that x i + 1 x i + 2 x n and y i x i + 1 y i + 1 x n y n (or x i + 1 y i + 1 x n y n ) are elements in B, we have that y i y i + 1 y n 1 = ε (or y i + 1 y n 1 = ε ). Hence, u is a strict infix of v. Therefore, A B I ( Σ + ) . □
Let A F ( Σ + ) . For any X { P , S , I } . We denote the set
{ a A ( b A ) b X a b = a }
by A X , which is a free language with respect to X . Thus, A X X ( Σ + ) . It is easy to see that A X ( Σ + ) if and only if A X = A . Then, we have ( A X ) X = A X . Further, we have:
Lemma 2.
Both ( A I ) X = A X and ( A X ) H = A H hold for any A F ( Σ + ) and X { P , S , I , H } .
Proof. 
We only prove the equality ( A I ) P = A P . The other one can be proved in analogous fashion.
Suppose that a A P . Then, a is a minimal element in A with respect to P . Since A P A I A , a is also a minimal element in A I with respect to P . That is to say, a ( A I ) P and so A P ( A I ) P .
On the other hand, suppose that a ( A I ) P . We now show that a is a minimal element in A with respect to P . Let b P a for some b A . If b A I , then b = a , since a a minimal element in A I with respect to P ; otherwise, b A \ A I . Then, there exists c A I such that c I b and so c P b , since I P . We thus have c P b P a . This implies that c = a and so b = a . Therefore, a A P and hence ( A I ) P A P , as required. □
We conclude this section with the following results.
Proposition 10.
Let A , B F ( Σ + ) . Then
(1) 
( A B ) I = A S B P ;
(2) 
( A B ) P = A H B P ;
(3) 
( A B ) S = A S B H .
Proof. 
( 1 ) Since A S S ( Σ + ) and B P P ( Σ + ) , we know from Proposition 9 that A S B P I ( Σ + ) . It follows that ( A S B P ) I = A S B P . Notice that A S A and B P B . Then, A S B P A B . We thus have ( A S B P ) I ( A B ) I and so A S B P ( A B ) I
On the other hand, let a A \ A S . Then, a S a for some a A S . Thus, a b I a b for any b B . It follows that a b ( A B ) \ ( A B ) I . This shows that
a b ( A B ) \ ( A S B ) a b ( A B ) \ ( A B ) I .
Hence, we have that ( A B ) I A S B . Further, if b B \ B P then b P b for some b B P . We thus have a b I a b for any a A S and so a b ( A B ) I . This shows that
a b ( A S B ) \ ( A S B P ) a b ( A S B ) \ ( A B ) I ,
which means that ( A B ) I A S B P . Then, we obtain that ( A B ) I = A S B P , as required.
In an analogous fashion, we can prove ( 2 ) and ( 3 ) by using Propositions 7 and 8, respectively. So we omit the proof. □

5. Algebraic Characterizations

In this section, for any X { S , P , I } , we construct an algebra structure for the class X ( Σ + ) , by defining two binary operations. The operation properties of these algebra structures are dominated by the combinatorial properties of languages discussed in the last section. Further, we prove that these algebra structures are ai-semirings by showing each of them is isomorphic to a quotient algebra of F ( Σ + ) over an ai-semiring congruence. Furthermore, we show that the algebra X ( Σ + ) is free generated by Σ in a subvariety of AI . This gives an algebraic characterization for the class X ( Σ + ) .
Let X { S , P , I } . Define two operations on X ( Σ + ) as follows:
( A , B X ( Σ + ) ) A + X B = ( A B ) X , A × X B = ( A B ) X .
In this section, we show that ( X ( Σ + ) , + X , × X ) is free generated by Σ in some ai-semiring variety.

5.1. Congruences

For every X { S , P , I } , we define a binary relation X on F ( Σ + ) by
A X B A X = B X .
Lemma 3.
For any A , B F ( Σ + ) and any X { S , P , I } , we have that
( A X B ) X = ( A B ) X = ( A B X ) X , ( A X B ) X = ( A B ) X = ( A B X ) X .
Proof. 
For any A , B F ( Σ + ) , in order to pick out all the minimal elements with respect to X from A B , we firstly pick out the minimal elements from A and B, respectively. Thus, it is true that ( A B ) X A X B X . Next, we pick out the minimal elements from A X B X , then we get all the minimal elements in A B . Hence, ( A B ) X = ( A X B X ) X . Therefore, we have that
( A X B ) X = ( ( A X ) X B X ) X = ( A X B X ) X , ( A B X ) X = ( A X ( B X ) X ) X = ( A X B X ) X .
These show that ( A X B ) X = ( A B ) X = ( A B X ) X .
To prove the remaining equalities, there are three cases to consider:
(1)
X = I . By Proposition 10 ( 1 ) and Lemma 2, we have that
( A I B ) I = ( A I ) S B P = A S B P = ( A B ) I , ( A B I ) I = A S ( B I ) P = A S B P = ( A B ) I .
(2)
X = P . By Proposition 10 ( 2 ) and Lemma 2, we have that
( A P B ) P = ( A P ) H B P = A H B P = ( A B ) P , ( A B P ) P = A H ( B P ) P = A H B P = ( A B ) P .
(3)
X = S . By Proposition 10 ( 3 ) and Lemma 2, we have that
( A S B ) S = ( A S ) S B H = A S B H = ( A B ) S , ( A B S ) S = A S ( B S ) H = A S B H = ( A B ) S .
Therefore, ( A X B ) X = ( A B ) X = ( A B X ) X for every X { S , P , I } , as required. □
Proposition 11.
For any X { S , P , I } , X is a congruence on the free ai-semirng ( F ( Σ + ) , , ) .
Proof. 
Let A , B , C F ( Σ + ) and A X B . Then, A X = B X and consequently by Lemma 3,
( A C ) X = ( A X C ) X = ( B X C ) X = ( B C ) X , ( A C ) X = ( A X C ) X = ( B X C ) X = ( B C ) X .
Thus, A C X B C and A C X B C . From this and its dual it follows that X is a congruence on the ai-semiring F ( Σ + ) . □
Let X { S , P , I } . We know from Proposition 11 that the quotient algebra F ( Σ + ) / X is an ai-semiring. Furthermore, it is easy to see that F ( Σ + ) / X is isomorphic to the algebra X ( Σ + ) and hence I ( Σ + ) , S ( Σ + ) and P ( Σ + ) are ai-semirings.

5.2. Models for Free Objects in Three Subvarieties of AI

In the sequel, we denote the following ai-semiring varieties
[ x z + x y z x z , x z + x y z w x z , x z + w x y z x z , x z + w 1 x y z w 2 x z ] , [ x + y x x , x + y x z x ] , and [ x + x y x x , + y x z x ]
by AI I , AI P and AI S , respectively. We show that X ( Σ + ) is a member of AI X , for all X { S , P , I } , by verifying the algebra X ( Σ + ) satisfies the corresponding identities.
It is a routine matter to verify that for any A 1 , A 2 , B 1 , B 2 , B 3 I ( Σ + ) , the following equalities are true.
A 1 × I A 2 + I A 1 × I B 1 × I A 2 = A 1 × I A 2 ; A 1 × I A 2 + I A 1 × I B 1 × I A 2 × I B 2 = A 1 × I A 2 ; A 1 × I A 2 + I B 1 × I A 1 × I B 2 × I A 2 = A 1 × I A 2 ; A 1 × I A 2 + I B 1 × I A 1 × I B 2 × I A 2 × I B 3 = A 1 × I A 2 .
This means that the ai-semiring I ( Σ + ) AI I . Furthermore, it can be verified that for any A , B , C P ( Σ + ) ,
A + P B × P A = A ; A + P B × P A × P C = A ,
and for any A , B , C S ( Σ + ) ,
A + S A × P B = A ; A + S B × S A × S C = A .
Then, P ( Σ + ) and S ( Σ + ) belong to the subvarieties AI P and AI S , respectively.
It easy to see that AI P and AI S are subvarieties of [ x + y x x ] and [ x + x y x ] , respectively. By Lemma 16 in [10], we immediately have the following lemma.
Lemma 4.
For any integer n 1 , AI P and AI S satisfy
x 1 x 2 x n + y 1 x 1 y 2 x 2 y n x n x 1 x 2 x n a n d x 1 x 2 x n + x 1 y 1 x 2 y 2 x n y n x 1 x 2 x n ,
respectively.
Further, if we premultiply (postmultiply) both sides by x (z) to the identity z + y z z ( x + x y x ) and apply the distribution law, we know that both AI P and AI S satisfy the identity x z + x y z x z . Hence, by Lemma 15 in [10], we have:
Lemma 5.
For any X { P , S , I } and any integer n 2 , AI X satisfies the identity
x 1 x 2 x n + x 1 y 1 x 2 y n 1 x n x 1 x 2 x n .
The following two lemmas show more identities hold in AI P , AI S and AI I .
Lemma 6.
For any integer n 1 , AI P and AI S satisfy the identity
x 1 x 2 x n + y 0 x 1 y 1 x n y n x 1 x 2 x n .
Proof. 
It is clear that both AI P and AI S satisfy the identity x 1 + y 0 x 1 y 1 x 1 . From Lemma 4, we know that these two subvarieties satisfy
x 1 x 2 x n + x 1 y 1 x 2 y n 1 x n x 1 x 2 x n
for any n 2 . If we premultiply both sides by y 0 and postmultiply both sides by y n and apply the distribution law as well, we obtain
y 0 x 1 x 2 x n y n + y 0 x 1 y 1 x 2 y n 1 x n y n y 0 x 1 x 2 x n y n .
Now, adding x 1 x 2 x n to the both side of this identity, we have that
x 1 x 2 x n + y 0 x 1 x 2 x n y n + y 0 x 1 y 1 x 2 y n 1 x n y n x 1 x 2 x n + y 0 x 1 x 2 x n y n .
Notice that x 1 x 2 x n + y 0 x 1 x 2 x n y n x 1 x 2 x n , since AI P and AI S satisfy the identity x + y x z x . We hence have that
x 1 x 2 x n + y 0 x 1 y 1 x n y n x 1 x 2 x n ,
as required. □
Lemma 7.
For any integer n 2 , AI I satisfies the following identities.
x 1 x 2 x n + y 0 x 1 y 1 x 2 y n 1 x n x 1 x 2 x n ,
x 1 x 2 x n + x 1 y 1 x 2 y 2 x n y n x 1 x 2 x n ,
x 1 x 2 x n + y 0 x 1 y 1 x 2 y 2 x n y n x 1 x 2 x n .
Proof. 
Firstly, we prove identity ( 1 ) is true for any n 2 . Since AI I satisfies the identity x z + w x y z x z , the identity ( 1 ) is true when n = 2 . Assume that AI I satisfies
x 1 x 2 x k + y 0 x 1 y 1 x 2 y k 1 x k x 1 x 2 x k ,
where k 2 is an integer. We postmultiply both sides by y k x k + 1 and apply the distribution law. A routine calculation gives
x 1 x 2 x k y k x k + 1 + y 0 x 1 y 2 x 2 y k 1 x k y k x k + 1 x 1 x 2 x k y k x k + 1 .
If we add x 1 x 2 x k x k + 1 to both sides of above equality, we get
x 1 x 2 x k x k + 1 + x 1 x 2 x k y k x k + 1 + y 0 x 1 y 1 x 2 y k 1 x k y k x k + 1 x 1 x 2 x k x k + 1 + x 1 x 2 x k y k x k + 1 .
Since AI I satisfies x z + x y z x z , we obtain
x 1 x 2 x k x k + 1 + y 0 x 1 y 1 x 2 y k 1 x k y k x k + 1 x 1 x 2 x k x k + 1 .
This means that AI I satisfies ( 1 ) when n = k + 1 , and hence it satisfies ( 1 ) for all integer n 2 , as required.
In an analogous fashion, we can prove that AI I satisfies ( 2 ) for all n 2 , so we omit the details.
Lastly, we prove that identity ( 3 ) is true for any n 2 . Since AI I satisfies the identity x z + w 1 x y z w 2 x z , ( 3 ) is true when n = 2 . Assume that AI I satisfies
x 1 x 2 x k + y 0 x 1 y 1 x 2 y k 1 x k x 1 x 2 x k ,
where k 2 is an integer. We postmultiply both sides by y k x k + 1 y k + 1 and apply the distribution law. Then, we get
x 1 x 2 x k y k x k + 1 y k + 1 + y 0 x 1 y 2 x 2 y k 1 x k y k x k + 1 y k + 1 x 1 x 2 x k y k x k + 1 y k + 1 .
If we add x 1 x 2 x k x k + 1 to both sides of above equality, we get
x 1 x 2 x k x k + 1 + x 1 x 2 x k y k x k + 1 y k + 1 + y 0 x 1 y 1 x 2 y k x k + 1 y k + 1 x 1 x 2 x k x k + 1 + x 1 x 2 x k y k x k + 1 y k + 1 .
Since AI I satisfies x z + x y z w x z , we obtain
x 1 x 2 x k x k + 1 + y 0 x 1 y 1 x 2 y k x k + 1 y k + 1 x 1 x 2 x k x k + 1 .
This means that AI I satisfies ( 3 ) when n = k + 1 , and hence it satisfies ( 3 ) for all integer n 2 , as required. □
For a nonempty finite set Σ and σ Σ , we have { σ } X ( Σ + ) . Then the mapping ι X : Σ X ( Σ + ) , σ { σ } is one-to-one. We set out to prove that the algebra X ( Σ + ) is freely generated by Σ in AI X for every X { P , S , I } .
Let K AI X and ψ X : Σ K a mapping. Suppose that θ X : Σ + K is the multiplicative homomorphism which extends ψ X . From Lemmas 3–6, we immediately have the following lemma.
Lemma 8.
For any A F ( Σ + ) and any X { P , S , I } ,
w A θ X ( w ) = w A X θ X ( w ) .
Now we can formulate and prove the main result of this paper.
Theorem 3.
Let Σ be a nonempty set. Then, for any X { P , S , I } , the algebra X ( Σ + ) is freely generated by Σ in AI X .
Proof. 
Let ( K , + , · ) AI X and ψ X : Σ S a mapping. Suppose that θ X : Σ + K is the multiplicative homomorphism which extends ψ X . Define the mapping
φ X : X ( Σ + ) K , A w A θ X ( w ) .
For every σ Σ , we then have
φ X ( ι X ( σ ) ) = φ ( { σ } ) = θ X ( σ ) = ψ X ( σ ) .
Therefore,
Mathematics 10 03416 i001
is a commutative diagram. We need to prove that φ X is an ai-semigring homomorphism.
Let A , B X ( Σ + ) . Then, by Lemma 8,
φ X ( A ) + φ X ( B ) = w A θ X ( w ) + w B θ X ( w ) = w A B θ X ( w ) = w ( A B ) X θ X ( w ) = w A + X B θ X ( w ) = φ X ( A + X B ) ,
φ X ( A ) φ X ( B ) = ( w A θ X ( w ) ) ( w B θ X ( w ) ) = u A , v B θ X ( u ) θ X ( v ) = u A , v B θ X ( u v ) = w A B θ X ( w ) = w ( A B ) X θ X ( w ) = φ X ( A B ) X = φ X ( A × X B ) .
Therefore, φ X is a homomorphism for any X { P , S , I } . □

6. Discussion

In this paper, we introduced three classes of formal languages over a finite alphabet, and we described them as independent sets with respect to partial orders contained in the embedding order. Then, we discussed the combinatorial properties of words involved in these partial orders. Furthermore, we established combinatorial properties of languages of interest, in the sense of set catenation and partial order. In addition, we constructed algebra structures for these three classes of languages, by defining two binary operations on each class. At last, we characterized these algebra structures as free objects of ai-semiring varieties.
We developed in this paper a method to decompose (or compose) free languages with respect to a particular partial order, which is useful for clustering languages in the sense of algebra structure. However, we are not sure whether this method can be extended to a more general case. Furthermore, it is still unknown how to cluster languages with an algebra structure, which is a free object in the variety [ x + y x z x ] .

Author Contributions

Conceptualization, J.T. and H.X.; Formal analysis, J.T. and Y.C.; Funding acquisition, J.T.; Investigation, J.T. and H.X.; Resources, Y.C.; Writing—original draft, J.T. All authors have read and agreed to the published version of the manuscript.

Funding

The first author is supported by the National Natural Science Foundation of China (61402364). The second author is supported by National Natural Science Foundation of China (11801239).

Data Availability Statement

Not applicable.

Acknowledgments

The authors write this paper to commemorate their respected Guo Yuqi. The authors would like to express their gratitude to the anonymous referee for very helpful suggestions and comments which led to the improvement of our original manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Berstel, J.; Perrin, D.; Reutenauer, C. Codes and Automata; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
  2. Ito, M.; Jürgensen, H.; Shyr, H.J. Outfix and infix codes and related classes of languages. J. Comput. Syst. Sci. 1991, 43, 484–508. [Google Scholar] [CrossRef]
  3. Shyr, H.J.; Thierrin, G. Hypercodes. Inf. Control 1974, 2, 45–54. [Google Scholar] [CrossRef]
  4. Shyr, H.J.; Thierrin, G. Codes and binary relations. In Seminaire d’Algebre Paul Dubreil, Pairis 1975–1976; Springer: Berlin/Heidelberg, 1977; Volume 586, pp. 180–188. [Google Scholar]
  5. Thierrin, G. Convex languages. In Automata, Languages, and Programming; Nivat, M., Ed.; IRIA: Rocquencourt, The Netherlands, 1973; pp. 481–492. [Google Scholar]
  6. Haines, L.H. On free monoids partially ordered by embedding. J. Comb. Theory 1969, 6, 94–98. [Google Scholar] [CrossRef]
  7. Wang, Z.; Liang, F.; He, Y.; Yang, D. Semiring structers of some classes of hypercodes. J. Autom. Lang. Comb. 2009, 14, 259–272. [Google Scholar]
  8. Kuřil, M.; Polák, L. On varieties of semilattice-ordered semigroups. Semigroup Forum 2010, 71, 27–48. [Google Scholar] [CrossRef]
  9. Pilitowska, A.; Zamojska-Dzienio, A. The lattice of subvarieties of semilattice ordered algebras. Order 2014, 31, 217–238. [Google Scholar] [CrossRef]
  10. Tian, J.; Shao, Y.; Zhao, X.Z. Out subword-free languages and its subclasses. Int. J. Found. Comput. Sci. 2016, 27, 305–326. [Google Scholar] [CrossRef]
  11. Gajdoř, P.; Kuřil, M. On free semilattice-ordered semigroups satisfying xnx. Semigroup Forum 2010, 80, 92–104. [Google Scholar] [CrossRef]
  12. Ghosh, S.; Pastijn, F.; Zhao, X.Z. Varieties generated by ordered bands I. Order 2005, 22, 109–128. [Google Scholar] [CrossRef]
  13. Pastijn, F. Varieties generated by ordered bands II. Order 2005, 22, 129–143. [Google Scholar] [CrossRef]
  14. Ren, M.M.; Zhao, X.Z. On free Burnside ai-semirings. Semigroup Forum 2015, 90, 174–183. [Google Scholar] [CrossRef]
  15. Ren, M.M.; Zhao, X.Z. The variety of semilattice-ordered semigroups satisfying x3x and xyyx. Period. Math. Hung. 2016, 72, 158–170. [Google Scholar] [CrossRef]
  16. Ren, M.M.; Zhao, X.Z.; Wang, A.F. On the varieties of ai-semirings satisfying x3x. Algebra Universalis 2017, 77, 395–408. [Google Scholar] [CrossRef]
  17. Zhao, X.Z. Idempotent semirings with a commutative additive reduct. Semigroup Forum 2002, 64, 289–296. [Google Scholar] [CrossRef]
  18. Burris, S.; Sankappanavar, H.P. A Course in Universal Algebra; Springer: New York, NY, USA; Heidelberg/Berlin, Germany, 1981. [Google Scholar]
Figure 1. Inclusion relations among subsets of O ( Σ + ) .
Figure 1. Inclusion relations among subsets of O ( Σ + ) .
Mathematics 10 03416 g001
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Tian, J.; Chen, Y.; Xu, H. An Algebraic Characterization of Prefix-Strict Languages. Mathematics 2022, 10, 3416. https://doi.org/10.3390/math10193416

AMA Style

Tian J, Chen Y, Xu H. An Algebraic Characterization of Prefix-Strict Languages. Mathematics. 2022; 10(19):3416. https://doi.org/10.3390/math10193416

Chicago/Turabian Style

Tian, Jing, Yizhi Chen, and Hui Xu. 2022. "An Algebraic Characterization of Prefix-Strict Languages" Mathematics 10, no. 19: 3416. https://doi.org/10.3390/math10193416

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop