GO-V.ORG
As seen in

Free monoid

In abstract algebra, the free monoid on a set is the monoid whose elements are all the finite sequences (or strings) of zero or more elements from that set, with string concatenation as the monoid operation and with the unique sequence of zero elements, often called the empty string and denoted by ε or λ, as the identity element. The free monoid on a set A is usually denoted A ∗ . The free semigroup on A is the subsemigroup of A ∗ containing all elements except the empty string. It is usually denoted A + . More generally, an abstract monoid (or semigroup) S is described as free if it is isomorphic to the free monoid (or semigroup) on some set. As the name implies, free monoids and... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

In abstract algebra, the free monoid on a set is the monoid whose elements are all the finite sequences (or strings) of zero or more elements from that set, with string concatenation as the monoid operation and with the unique sequence of zero elements, often called the empty string and denoted by ε or λ, as the identity element. The free monoid on a set A is usually denoted A ∗ . The free semigroup on A is the subsemigroup of A ∗ containing all elements except the empty string. It is usually denoted A + . More generally, an abstract monoid (or semigroup) S is described as free if it is isomorphic to the free monoid (or semigroup) on some set. As the name implies, free monoids and semigroups are those objects which satisfy the usual universal property defining free objects, in the respective categories of monoids and semigroups. It follows that every monoid (or semigroup) arises as a homomorphic image of a free monoid (or semigroup). The study of semigroups as images of free semigroups is called combinatorial semigroup theory. Free monoids (and monoids in general) are associative, by definition; that is, they are written without any parenthesis to show grouping or order of operation. The non-associative equivalent is the free magma. ===Tuples=== The free monoid over the set N 0 of natural numbers is (T, ,::), where T denotes the set of tuples of natural numbers, denotes the unique 0-tuple, and :: denotes tuple concatenation. The monoids (N 0 ,+) and (T, ,::) are not isomorphic, since + happens to be commutative, while :: is not. For example, assuming an alphabet A = {a, b, c}, its Kleene star A ∗ contains all concatenations of a, b, and c: {ε, a, ab, ba, caa, , ...}. If A is any set, the word length function on A ∗ is the unique monoid homomorphism from A ∗ to (N 0 ,+) that maps each element of A to 1. A free monoid is thus a graded monoid. (A graded monoid M is a monoid that can be written as M=M_0\oplus M_1\oplus M_2 \cdots . Each M_n is a grade; the grading here is just the length of the string. That is, M_n contains those strings of length n. The \oplus symbol here can be taken to mean "set union"; it is used instead of the symbol \cup because, in general, set unions might not be monoids, and so a distinct symbol is used. By convention, gradations are always written with the \oplus symbol.) There are deep connections between the theory of semigroups and that of automata. For example, every formal language has a syntactic monoid that recognizes that language. For the case of a regular language, that monoid is isomorphic to the transition monoid associated to the semiautomaton of some deterministic finite automaton that recognizes that language. The regular languages over an alphabet A are the closure of the finite subsets of A*, the free monoid over A, under union, product, and generation of submonoid. For the case of concurrent computation, that is, systems with locks, mutexes or thread joins, the computation can be described with history monoids and trace monoids. Roughly speaking, elements of the monoid can commute, (e.g. different threads can execute in any order), but only up to a lock or mutex, which prevent further commutation (e.g. serialize thread access to some object). ==Conjugate words== We define a pair of words in A ∗ of the form uv and vu as conjugate: the conjugates of a word are thus its circular shifts. Two words are conjugate in this sense if they are conjugate in the sense of group theory as elements of the free group generated by A. ===Equidivisibility=== A free monoid is equidivisible: if the equation mn = pq holds, then there exists an s such that either m = ps, sn = q (example see image) or ms = p, n = sq. This result is also known as Levi's lemma. A monoid is free if and only if it is graded (in the strong sense that only the identity has gradation 0) and equidivisible. ===Codes=== A set of free generators for a free monoid P is referred to as a basis for P: a set of words C is a code if C* is a free monoid and C is a basis. A set X of words in A ∗ is a prefix, or has the prefix property, if it does not contain a proper (string) prefix of any of its elements . Every prefix in A + is a code, indeed a prefix code. A submonoid N of A ∗ is right unitary if x, xy in N implies y in N. A submonoid is generated by a prefix if and only if it is right unitary. ==Factorization== A factorization of a free monoid is a sequence of subsets of words with the property that every word in the free monoid can be written as a concatenation of elements drawn from the subsets. The Chen–Fox–Lyndon theorem states that the Lyndon words furnish a factorization. More generally, Hall words provide a factorization; the Lyndon words are a special case of the Hall words. ==Free hull== The intersection of free submonoids of a free monoid A ∗ is again free. If S is a subset of a free monoid A* then the intersection of all free submonoids of A* containing S is well-defined, since A* itself is free, and contains S; it is a free monoid and called the free hull of S. A basis for this intersection is a code. The defect theorem states that if X is finite and C is the basis of the free hull of X, then either X is a code and C = X, or |C| ≤ |X| − 1 . ==Morphisms== A monoid morphism f from a free monoid B ∗ to a monoid M is a map such that f(xy) = f(x)⋅f(y) for words x,y and f(ε) = ι, where ε and ι denote the identity elements of B ∗ and M, respectively. The morphism f is determined by its values on the letters of B and conversely any map from B to M extends to a morphism. A morphism is non-erasing or continuous if no letter of B maps to ι and trivial if every letter of B maps to ι. A morphism f from a free monoid B ∗ to a free monoid A ∗ is total if every letter of A occurs in some word in the image of f; cyclic or periodic if the image of f is contained in {w} ∗ for some word w of A ∗ . A morphism f is k-uniform if the length |f(a)| is constant and equal to k for all a in A. A 1-uniform morphism is strictly alphabetic or a coding. A morphism f from a free monoid B ∗ to a free monoid A ∗ is simplifiable if there is an alphabet C of cardinality less than that of B such the morphism f factors through C ∗ , that is, it is the composition of a morphism from B ∗ to C ∗ and a morphism from that to A ∗ ; otherwise f is elementary. The morphism f is called a code if the image of the alphabet B under f is a code. Every elementary morphism is a code. ===Test sets=== For L a subset of B ∗ , a finite subset T of L is a test set for L if morphisms f and g on B ∗ agree on L if and only if they agree on T. The Ehrenfeucht conjecture is that any subset L has a test set: it has been proved independently by Albert and Lawrence; McNaughton; and Guba. The proofs rely on Hilbert's basis theorem. ===Map and fold=== The computational embodiment of a monoid morphism is a map followed by a fold. In this setting, the free monoid on a set A corresponds to lists of elements from A with concatenation as the binary operation. A monoid homomorphism from the free monoid to any other monoid (M,•) is a function f such that f(x 1 ...x n ) = f(x 1 ) • ... • f(x n ) f() = e where e is the identity on M. Computationally, every such homomorphism corresponds to a map operation applying f to all the elements of a list, followed by a fold operation which combines the results using the binary operator •. This computational paradigm (which can be generalized to non-associative binary operators) has inspired the MapReduce software framework. ==Endomorphisms== An endomorphism of A ∗ is a morphism from A ∗ to itself. The identity map I is an endomorphism of A ∗ , and the endomorphisms form a monoid under composition of functions. An endomorphism f is prolongable if there is a letter a such that f(a) = as for a non-empty string s. ===String projection=== The operation of string projection is an endomorphism. That is, given a letter a ∈ Σ and a string s ∈ Σ ∗ , the string projection p a (s) removes every occurrence of a from s; it is formally defined by p_a(s) = \begin{cases} \varepsilon & \text{if } s=\varepsilon, \text{ the empty string} \\ p_a(t) & \text{if } s=ta \\ p_a(t)b & \text{if } s=tb \text{ and } b\ne a. \end{cases} Note that string projection is well-defined even if the rank of the monoid is infinite, as the above recursive definition works for all strings of finite length. String projection is a morphism in the category of free monoids, so that p_a\left(\Sigma^*\right)= \left(\Sigma-a\right)^* where p_a\left(\Sigma^*\right) is understood to be the free monoid of all finite strings that don't contain the letter a. Projection commutes with the operation of string concatenation, so that p_a(st)=p_a(s)p_a(t) for all strings s and t. There are many right inverses to string projection, and thus it is a split epimorphism. The identity morphism is p_\varepsilon, defined as p_\varepsilon(s)=s for all strings s, and p_\varepsilon(\varepsilon)=\varepsilon . String projection is commutative, as clearly p_a(p_b(s))=p_b(p_a(s)). For free monoids of finite rank, this follows from the fact that free monoids of the same rank are isomorphic, as projection reduces the rank of the monoid by one. String projection is idempotent, as p_a(p_a(s))=p_a(s) for all strings s. Thus, projection is an idempotent, commutative operation, and so it forms a bounded semilattice or a commutative band. ==The free commutative monoid== Given a set A, the free commutative monoid on A is the set of all finite multisets with elements drawn from A, with the monoid operation being multiset sum and the monoid unit being the empty multiset. For example, if A = {a, b, c}, elements of the free commutative monoid on A are of the form {ε, a, ab, a 2 b, ab 3 c 4 , ...}. The fundamental theorem of arithmetic states that the monoid of positive integers under multiplication is a free commutative monoid on an infinite set of generators, the prime numbers. The free commutative semigroup is the subset of the free commutative monoid that contains all multisets with elements drawn from A except the empty multiset. The free partially commutative monoid, or trace monoid, is a generalization that encompasses both the free and free commutative monoids as instances. This generalization finds applications in combinatorics and in the study of parallelism in computer science. ==See also== String operations ==Notes== ==References==

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Free monoid". 1782161898. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1360675307

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·