Trace Monoid
   HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, a trace is an
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements ...
of
string String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...
s, wherein certain letters in the string are allowed to commute, but others are not. Traces generalize the concept of strings by relaxing the requirement for all the letters to have a definite order, instead allowing for indefinite orderings in which certain reshufflings could take place. In an opposite way, traces generalize the concept of sets with multiplicities by allowing for specifying some incomplete ordering of the letters rather than requiring complete equivalence under all reorderings. The trace monoid or free partially commutative monoid is a
monoid In abstract algebra, a monoid is a set equipped with an associative binary operation and an identity element. For example, the nonnegative integers with addition form a monoid, the identity element being . Monoids are semigroups with identity ...
of traces. Traces were introduced by Pierre Cartier and Dominique Foata in 1969 to give a combinatorial proof of MacMahon's master theorem. Traces are used in theories of concurrent computation, where commuting letters stand for portions of a job that can execute independently of one another, while non-commuting letters stand for locks, synchronization points or thread joins.Sándor & Crstici (2004) p.161 The trace monoid is constructed from the
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 ...
(the set of all strings of finite length) as follows. First, sets of commuting letters are given by an independency relation. These induce an equivalence relation of equivalent strings; the elements of the equivalence classes are the traces. The equivalence relation then partitions the elements of the free monoid into a set of equivalence classes; the result is still a monoid; it is a quotient monoid now called the ''trace monoid''. The trace monoid is universal, in that all dependency-homomorphic (see below) monoids are in fact
isomorphic In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
. Trace monoids are commonly used to model concurrent computation, forming the foundation for process calculi. They are the object of study in trace theory. The utility of trace monoids comes from the fact that they are isomorphic to the monoid of
dependency graph In mathematics, computer science and digital electronics, a dependency graph is a directed graph representing dependencies of several objects towards each other. It is possible to derive an evaluation order or the absence of an evaluation order th ...
s; thus allowing algebraic techniques to be applied to
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discret ...
s, and vice versa. They are also isomorphic to history monoids, which model the history of computation of individual processes in the context of all scheduled processes on one or more computers.


Trace

Let \Sigma^* denote the free monoid on a set of generators \Sigma, that is, the set of all strings written in the alphabet \Sigma. The asterisk is a standard notation for the
Kleene star In mathematical logic and theoretical computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation on a Set (mathematics), set to generate a set of all finite-length strings that are composed of zero or more repe ...
. An independency relation I on the alphabet \Sigma then induces a symmetric binary relation \sim on the set of strings \Sigma^*: two strings u,v are related, u\sim v,
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
there exist x,y\in \Sigma^*, and a pair (a,b)\in I such that u=xaby and v=xbay. Here, u,v,x and y are understood to be strings (elements of \Sigma^*), while a and b are letters (elements of \Sigma). The trace is defined as the
reflexive transitive closure In mathematics, a subset of a given set is closed under an operation on the larger set if performing that operation on members of the subset always produces a member of that subset. For example, the natural numbers are closed under addition, but ...
of \sim. The trace is thus an
equivalence relation In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric, and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. A simpler example is equ ...
on \Sigma^* and is denoted by \equiv_D, where D is the dependency relation corresponding to I . D = (\Sigma \times \Sigma) \setminus I and I = (\Sigma \times \Sigma) \setminus D . Different independencies or dependencies will give different equivalence relations. The
transitive closure In mathematics, the transitive closure of a homogeneous binary relation on a set (mathematics), set is the smallest Relation (mathematics), relation on that contains and is Transitive relation, transitive. For finite sets, "smallest" can be ...
implies that u\equiv_D v if and only if there exists a sequence of strings (w_0,w_1,\cdots,w_n) such that u\sim w_0, v\sim w_n, and w_i\sim w_ for all 0\le i < n. The trace is stable under the monoid operation on \Sigma^*, i.e.,
concatenation In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalizations of concatenati ...
, and \equiv_D is therefore a
congruence relation In abstract algebra, a congruence relation (or simply congruence) is an equivalence relation on an algebraic structure (such as a group (mathematics), group, ring (mathematics), ring, or vector space) that is compatible with the structure in the ...
on \Sigma^*. The trace monoid, commonly denoted as \mathbb (D), is defined as the quotient monoid :\mathbb (D) = \Sigma^* / \equiv_D. The homomorphism :\phi_D:\Sigma^*\to \mathbb (D) is commonly referred to as the natural homomorphism or canonical homomorphism. That the terms ''natural'' or ''canonical'' are deserved follows from the fact that this morphism embodies a universal property, as discussed in a later section. One will also find the trace monoid denoted as M(\Sigma,I) where I is the independency relation. One can also find the commutation relation used instead of the independency relation; it differs from the independency relation by also including all the diagonal elements of \Sigma \times \Sigma since letters "commute with themselves" in a free monoid of strings of those letters.


Examples

Consider the alphabet \Sigma=\. A possible dependency relation is :\begin D &=& \\times\ \quad \cup \quad \\times\ \\ &=& \^2 \cup \^2 \\ &=& \. \end The corresponding independency is :I_D=\. Therefore, the letters b,c commute. Thus, for example, a trace equivalence class for the string abababbca would be : bababbcaD = \ and the equivalence class bababbcaD would be an element of the trace monoid.


Properties

The cancellation property states that equivalence is maintained under right cancellation. That is, if w\equiv v, then (w\div a)\equiv (v\div a). Here, the notation w\div a denotes right cancellation, the removal of the first occurrence of the letter ''a'' from the string ''w'', starting from the right-hand side. Equivalence is also maintained by left-cancellation. Several corollaries follow: * Embedding: w \equiv v if and only if xwy\equiv xvy for strings ''x'' and ''y''. Thus, the trace monoid is a
syntactic monoid In mathematics and computer science, the syntactic monoid M(L) of a formal language L is the minimal monoid that recognizes the language L. By the Myhill–Nerode theorem, the syntactic monoid is unique up to unique isomorphism. Syntactic quot ...
. * Independence: if ua\equiv vb and a\ne b, then ''a'' is independent of ''b''. That is, (a,b)\in I_D. Furthermore, there exists a string ''w'' such that u\equiv wb and v\equiv wa. * Projection rule: equivalence is maintained under string projection, so that if w\equiv v, then \pi_\Sigma(w)\equiv \pi_\Sigma(v). A strong form of Levi's lemma holds for traces. Specifically, if uv\equiv xy for strings ''u'', ''v'', ''x'', ''y'', then there exist strings z_1, z_2, z_3 and z_4 such that (w_2, w_3)\in I_D for all letters w_2\in\Sigma and w_3\in\Sigma such that w_2 occurs in z_2 and w_3 occurs in z_3, and :u\equiv z_1z_2,\qquad v\equiv z_3z_4, :x\equiv z_1z_3,\qquad y\equiv z_2z_4.


Universal property

A dependency morphism (with respect to a dependency ''D'') is a morphism :\psi:\Sigma^*\to M to some monoid ''M'', such that the "usual" trace properties hold, namely: :1. \psi(w)=\psi(\varepsilon) implies that w=\varepsilon :2. (a,b)\in I_D implies that \psi(ab)=\psi(ba) :3. \psi(ua)=\psi(v) implies that \psi(u)=\psi(v\div a) :4. \psi(ua)=\psi(vb) and a\ne b imply that (a,b)\in I_D Dependency morphisms are universal, in the sense that for a given, fixed dependency ''D'', if \psi:\Sigma^*\to M is a dependency morphism to a monoid ''M'', then ''M'' is
isomorphic In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
to the trace monoid \mathbb(D). In particular, the natural homomorphism is a dependency morphism.


Normal forms

There are two well-known normal forms for words in trace monoids. One is the ''
lexicographic Lexicography is the study of lexicons and the art of compiling dictionaries. It is divided into two separate academic disciplines: * Practical lexicography is the art or craft of compiling, writing and editing dictionaries. * Theoretical lex ...
'' normal form, due to Anatolij V. Anisimov and
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist and mathematician. He is a professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of comp ...
, and the other is the ''Foata'' normal form due to Pierre Cartier and Dominique Foata who studied the trace monoid for its combinatorics in the 1960s.Section 2.3, Diekert and Métivier 1997. Unicode's Normalization Form Canonical Decomposition (NFD) is an example of a lexicographic normal form - the ordering is to sort consecutive characters with non-zero canonical combining class by that class.


Trace languages

Just as a formal language can be regarded as a subset of \Sigma^*, the set of all possible strings, so a trace language is defined as a subset of \mathbb(D) all possible traces. Alternatively, but equivalently, a language L\subseteq\Sigma^* is a trace language, or is said to be consistent with dependency ''D'' if :L = D where : D = \bigcup_ D is the trace closure of a set of strings.


See also

*
Trace cache In computer architecture, a trace cache or execution trace cache is a specialized instruction cache which stores the dynamic stream of instructions known as trace. It helps in increasing the instruction fetch bandwidth and decreasing power cons ...


Notes


References

General references * * * Antoni Mazurkiewicz, "Introduction to Trace Theory", pp 3–41, in ''The Book of Traces'', V. Diekert, G. Rozenberg, eds. (1995) World Scientific, Singapore * Volker Diekert, ''Combinatorics on traces'', LNCS 454, Springer, 1990, , pp. 9–29 * {{citation , last1=Sándor , first1=Jozsef , last2=Crstici , first2=Borislav , title=Handbook of number theory II , location=Dordrecht , publisher=Kluwer Academic , year=2004 , isbn=1-4020-2546-7 , pages=32–36 , zbl=1079.11001 Seminal publications * Pierre Cartier and Dominique Foata, ''Problèmes combinatoires de commutation et réarrangements'', Lecture Notes in Mathematics 85, Springer-Verlag, Berlin, 1969
Free 2006 reprint
with new appendixes * Antoni Mazurkiewicz, ''Concurrent program schemes and their interpretations'', DAIMI Report PB 78, Aarhus University, 1977 Semigroup theory Formal languages Free algebraic structures Combinatorics Trace theory