HOME

TheInfoList



OR:

In mathematics and
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includi ...
, a history monoid is a way of representing the histories of concurrently running computer processes as a collection of strings, each string representing the individual history of a process. The history
monoid In abstract algebra, a branch of mathematics, 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 0. Monoid ...
provides a set of synchronization primitives (such as
locks Lock(s) may refer to: Common meanings *Lock and key, a mechanical device used to secure items of importance *Lock (water navigation), a device for boats to transit between different levels of water, as in a canal Arts and entertainment * ''Lock ...
,
mutex In computer science, a lock or mutex (from mutual exclusion) is a synchronization primitive: a mechanism that enforces limits on access to a resource when there are many threads of execution. A lock is designed to enforce a mutual exclusion concur ...
es or thread joins) for providing rendezvous points between a set of independently executing processes or threads. History monoids occur in the theory of concurrent computation, and provide a low-level mathematical foundation for
process calculi In computer science, the process calculi (or process algebras) are a diverse family of related approaches for formally modelling concurrent systems. Process calculi provide a tool for the high-level description of interactions, communications, and ...
, such as CSP the language of
communicating sequential processes In computer science, communicating sequential processes (CSP) is a formal language for describing patterns of interaction in concurrent systems. It is a member of the family of mathematical theories of concurrency known as process algebras, or ...
, or CCS, the calculus of communicating systems. History monoids were first presented by M.W. Shields.M.W. Shields "Concurrent Machines", ''Computer Journal'', (1985) 28 pp. 449–465. History monoids are isomorphic to
trace monoid 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 certa ...
s (free partially
commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
monoids) and to the
monoid In abstract algebra, a branch of mathematics, 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 0. 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 t ...
s. As such, they are
free object In mathematics, the idea of a free object is one of the basic concepts of abstract algebra. Informally, a free object over a set ''A'' can be thought of as being a "generic" algebraic structure over ''A'': the only equations that hold between eleme ...
s and are
universal Universal is the adjective for universe. Universal may also refer to: Companies * NBCUniversal, a media and entertainment company ** Universal Animation Studios, an American Animation studio, and a subsidiary of NBCUniversal ** Universal TV, a ...
. The history monoid is a type of semi-abelian categorical product in the
category Category, plural categories, may refer to: Philosophy and general uses *Categorization, categories in cognitive science, information science and generally * Category of being * ''Categories'' (Aristotle) * Category (Kant) * Categories (Peirce) ...
of monoids.


Product monoids and projection

Let :A=(\Sigma_1,\Sigma_2,\ldots,\Sigma_n) denote an ''n''-tuple of (not necessarily pairwise disjoint)
alphabets An alphabet is a standardized set of basic written graphemes (called letters) that represent the phonemes of certain spoken languages. Not all writing systems represent language in this way; in a syllabary, each character represents a syllab ...
\Sigma_k. Let P(A) denote all possible combinations of one finite-length string from each alphabet: :P(A)=\Sigma_1^* \times \Sigma_2^* \times \cdots \times \Sigma_n^* (In more formal language, P(A) is the Cartesian product of 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 ele ...
s of the \Sigma_k. The superscript star is the
Kleene star In mathematical logic and computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation, either on sets of strings or on sets of symbols or characters. In mathematics, it is more commonly known as the free monoid ...
.) Composition in the product monoid is component-wise, so that, for :\mathbf=(u_1,u_2,\ldots,u_n) \, and :\mathbf=(v_1,v_2,\ldots,v_n) \, then :\mathbf=(u_1v_1,u_2v_2,\ldots,u_nv_n) \, for all \mathbf, \mathbf in P(A). Define the union alphabet to be :\Sigma=\Sigma_1 \cup \Sigma_2 \cup \cdots \cup \Sigma_n. \, (The union here is the set union, not the
disjoint union In mathematics, a disjoint union (or discriminated union) of a family of sets (A_i : i\in I) is a set A, often denoted by \bigsqcup_ A_i, with an injection of each A_i into A, such that the images of these injections form a partition of A ( ...
.) Given any string w\in \Sigma^*, we can pick out just the letters in some \Sigma_k^* using the corresponding
string projection In computer science, in the area of formal language theory, frequent use is made of a variety of string functions; however, the notation used is different from that used for computer programming, and some commonly used functions in the theoretical r ...
\pi_k:\Sigma^*\to\Sigma_k^*. A distribution \pi:\Sigma^*\to P(A) is the mapping that operates on w\in \Sigma^* with all of the \pi_k, separating it into components in each free monoid: :\pi(w)\mapsto (\pi_1(w), \pi_2(w), \ldots , \pi_n(w)). \,


Histories

For every a\in\Sigma, the tuple \pi(a) is called the elementary history of ''a''. It serves as an indicator function for the inclusion of a letter ''a'' in an alphabet \Sigma_k. That is, :\pi(a)=(a_1,a_2,\ldots,a_n) where :a_k=\begin a \mbox a\in \Sigma_k \\ \varepsilon \mbox . \end Here, \varepsilon denotes the
empty string In formal language theory, the empty string, or empty word, is the unique string of length zero. Formal theory Formally, a string is a finite, ordered sequence of characters such as letters, digits or spaces. The empty string is the special cas ...
. The history monoid H(A) is the submonoid of the product monoid P(A) generated by the elementary histories: H(A) = \^* (where the superscript star is the Kleene star applied with a component-wise definition of composition as given above). The elements of H(A) are called global histories, and the projections of a global history are called individual histories.


Connection to computer science

The use of the word ''history'' in this context, and the connection to concurrent computing, can be understood as follows. An individual history is a record of the sequence of states of a process (or thread or machine); the alphabet \Sigma_k is the set of states of the process. A letter that occurs in two or more alphabets serves as a synchronization primitive between the various individual histories. That is, if such a letter occurs in one individual history, it must also occur in another history, and serves to "tie" or "rendezvous" them together. Consider, for example, \Sigma_1=\ and \Sigma_2=\. The union alphabet is of course \Sigma=\. The elementary histories are (a,a), (b,\varepsilon), (c,\varepsilon), (\varepsilon,d) and (\varepsilon,e). In this example, an individual history of the first process might be bcbcc while the individual history of the second machine might be ddded. Both of these individual histories are represented by the global history bcbdddcced, since the projection of this string onto the individual alphabets yields the individual histories. In the global history, the letters b and c can be considered to commute with the letters d and e, in that these can be rearranged without changing the individual histories. Such commutation is simply a statement that the first and second processes are running concurrently, and are unordered with respect to each other; they have not (yet) exchanged any messages or performed any synchronization. The letter a serves as a synchronization primitive, as its occurrence marks a spot in both the global and individual histories, that cannot be commuted across. Thus, while the letters b and c can be re-ordered past d and e, they cannot be reordered past a. Thus, the global history bcdabe and the global history bdcaeb both have as individual histories bcab and dae, indicating that the execution of d may happen before or after c. However, the letter a is synchronizing, so that e is guaranteed to happen after c, even though e is in a different
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
than c.


Properties

A history monoid is isomorphic to a
trace monoid 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 certa ...
, and as such, is a type of semi-abelian categorical product in the
category Category, plural categories, may refer to: Philosophy and general uses *Categorization, categories in cognitive science, information science and generally * Category of being * ''Categories'' (Aristotle) * Category (Kant) * Categories (Peirce) ...
of monoids. In particular, the history monoid H(\Sigma_1,\Sigma_2,\ldots,\Sigma_n) is isomorphic to the trace monoid \mathbb(D) with the
dependency relation In computer science, in particular in concurrency (computer science), concurrency theory, a dependency relation is a binary relation on a finite domain \Sigma, symmetric relation, symmetric, and reflexive relation, reflexive; i.e. a finite toleran ...
given by :D=\left(\Sigma_1\times\Sigma_1\right)\cup \left(\Sigma_2\times\Sigma_2\right)\cup \cdots \cup \left(\Sigma_n\times\Sigma_n\right). In simple terms, this is just the formal statement of the informal discussion given above: the letters in an alphabet \Sigma_k can be commutatively re-ordered past the letters in an alphabet \Sigma_j, unless they are letters that occur in both alphabets. Thus, traces are exactly global histories, and vice versa. Conversely, given any trace monoid \mathbb(D), one can construct an isomorphic history monoid by taking a sequence of alphabets \Sigma_ = \ where (a, b) ranges over all pairs in D.


Notes


References

* Antoni Mazurkiewicz, "Introduction to Trace Theory", pp 3–41, in ''The Book of Traces'', V. Diekert, G. Rozenberg, eds. (1995) World Scientific, Singapore {{ISBN, 981-02-2058-8 * Volker Diekert, Yves Métivier,
Partial Commutation and Traces
, In G. Rozenberg and A. Salomaa, editors, ''Handbook of Formal Languages'', Vol. 3, Beyond Words, pages 457–534. Springer-Verlag, Berlin, 1997. Concurrency (computer science) Semigroup theory Formal languages Free algebraic structures