Girish Mahajan (Editor)

Trace monoid

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In computer science, a trace is a set of strings, wherein certain letters in the string are allowed to commute, but others are not. It generalizes the concept of a string, by not forcing the letters to always be in a fixed order, but allowing certain reshufflings to take place. Traces were introduced by Cartier and 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.

Contents

The trace monoid or free partially commutative monoid is a monoid of traces. In a nutshell, it is constructed as follows: 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 up the free monoid (the set of all strings of finite length) into a set of equivalence classes; the result is still a monoid; it is a quotient monoid and is called the trace monoid. The trace monoid is universal, in that all homomorphic monoids are in fact isomorphic.

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 graphs; thus allowing algebraic techniques to be applied to graphs, 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 Σ denote the free monoid, that is, the set of all strings written in the alphabet Σ . Here, the asterisk denotes, as usual, the Kleene star. An independency relation I on Σ then induces a binary relation on Σ , where u v if and only if there exist x , y Σ , and a pair ( a , b ) I such that u = x a b y and v = x b a y . Here, u , v , x and y are understood to be strings (elements of Σ ), while a and b are letters (elements of Σ ).

The trace is defined as the symmetric, reflexive and transitive closure of . The trace is thus an equivalence relation on Σ , and is denoted by D . The subscript D on the equivalence simply denotes that the equivalence is obtained from the independency I induced by the dependency D. Clearly, different dependencies will give different equivalence relations.

The transitive closure simply implies that u v if and only if there exists a sequence of strings ( w 0 , w 1 , , w n ) such that u w 0 and v w n and w i w i + 1 for all 0 i < n .

The trace monoid, commonly denoted as M ( D ) , is defined as the quotient monoid

M ( D ) = Σ / D .

The homomorphism

ϕ D : Σ M ( 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.

Examples

Consider the alphabet Σ = { a , b , c } . A possible dependency relation is

D = { a , b } × { a , b } { a , c } × { a , c } = { a , b } 2 { a , c } 2 = { ( a , b ) , ( b , a ) , ( a , c ) , ( c , a ) , ( a , a ) , ( b , b ) , ( c , c ) }

The corresponding independency is

I D = { ( b , c ) , ( c , b ) }

Therefore, the letters b , c commute. Thus, for example, a trace equivalence class for the string a b a b a b b c a would be

[ a b a b a b b c a ] D = { a b a b a b b c a , a b a b a b c b a , a b a b a c b b a }

The equivalence class [ a b a b a b b c a ] D is an element of the trace monoid.

Properties

The cancellation property states that equivalence is maintained under right cancellation. That is, if w v , then ( w ÷ a ) ( v ÷ a ) . Here, the notation w ÷ 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 v if and only if x w y x v y for strings x and y. Thus, the trace monoid is a syntactic monoid.
  • Independence: if u a v b and a b , then a is independent of b. That is, ( a , b ) I D . Furthermore, there exists a string w such that u = w b and v = w a .
  • Projection rule: equivalence is maintained under string projection, so that if w v , then π Σ ( w ) π Σ ( v ) .
  • A strong form of Levi's lemma holds for traces. Specifically, if u v x y 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 ) I D for all letters w 2 Σ and w 3 Σ such that w 2 occurs in z 2 and w 3 occurs in z 3 , and

    u z 1 z 2 , v z 3 z 4 , x z 1 z 3 , y z 2 z 4 .

    Universal property

    A dependency morphism (with respect to a dependency D) is a morphism

    ψ : Σ M

    to some monoid M, such that the "usual" trace properties hold, namely:

    1. ψ ( w ) = ψ ( ε ) implies that w = ε 2. ( a , b ) I D implies that ψ ( a b ) = ψ ( b a ) 3. ψ ( u a ) = ψ ( v ) implies that ψ ( u ) = ψ ( v ÷ a ) 4. ψ ( u a ) = ψ ( v b ) and a b imply that ( a , b ) I D

    Dependency morphisms are universal, in the sense that for a given, fixed dependency D, if ψ : Σ M is a dependency morphism to a monoid M, then M is isomorphic to the trace monoid M ( 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 normal form, due to Anatolij V. Anisimov and Donald Knuth, 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.

    Trace languages

    Just as a formal language can be regarded as a subset of Σ the set of all possible strings, so then a trace language is defined as subset of M ( D ) all possible traces.

    A language L Σ is a trace language, or is said to be consistent with dependency D if

    L = [ L ] D

    where

    [ L ] D = { [ w ] D | w L }

    is the trace closure of a set of strings, and

    T = { w | [ w ] D T }

    is the set of strings in a set of traces.

    References

    Trace monoid Wikipedia