ArticleslgStudy

mathematics

History monoid

History monoid is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand History monoid rather than just read about it. In short: In mathematics and computer science, 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 provides a set of synchronization primitives (such as locks, mutexes or thread joins) for providing rendezvous points between a set of independently executing processes or th…

Key takeaways

  • History monoid belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect History monoid to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of History monoid from memory before moving on to harder problems.

Reference excerpt

In mathematics and computer science, 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 provides a set of synchronization primitives (such as locks, mutexes 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, such as CSP the language of communicating sequential processes, or CCS, the calculus of communicating systems. History monoids were first presented by M.W. Shields. History monoids are isomorphic to trace monoids (free partially commutative monoids) and to the monoid of dependency graphs. As such, they are free objects and are universal. The history monoid is a type of semi-abelian categorical product in the category of monoids.

Product monoids and projection Let A=(Σ1,Σ2,…,Σn) denote an n-tuple of (not necessarily pairwise disjoint) alphabets Σk. Let P(A) denote all possible combinations of one finite-length string from each alphabet: P(A)=Σ1∗×Σ2∗×⋯×Σn∗ (In more formal language, P(A) is the Cartesian product of the free monoids of the Σk. The superscript star is the Kleene star.) Composition in the product monoid is component-wise, so that, for 𝐮=(u1,u2,…,un) and 𝐯=(v1,v2,…,vn) then 𝐮𝐯=(u1v1,u2v2,…,unvn) for all 𝐮,𝐯 in P(A). Define the union alphabet to be Σ=Σ1∪Σ2∪⋯∪Σn. (The union here is the set union, not the disjoint union.) Given any string w∈Σ∗, we can pick out just the letters in some Σk∗ using the corresponding string projection πk:Σ∗→Σk∗. A distribution π:Σ∗→P(A) is the mapping that operates on w∈Σ∗ with all of the πk, separating it into components in each free monoid: π(w)↦(π1(w),π2(w),…,πn(w)).

Histories For every a∈Σ, the tuple π(a) is called the elementary history of a. It serves as an indicator function for the inclusion of a letter a in an alphabet Σk. That is, π(a)=(a1,a2,…,an) where ak={a if a∈Σkε otherwise . Here, ε denotes the empty string. The history monoid H(A) is the submonoid of the product monoid P(A) generated by the elementary histories: H(A)={π(a)|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 Σ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, Σ1={a,b,c} and Σ2={a,d,e}. The union alphabet is of course Σ={a,b,c,d,e}. The elementary histories are (a,a), (b,ε), (c,ε), (ε,d) and (ε,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 than c.

Properties A history monoid is isomorphic to a trace monoid, and as such, is a type of semi-abelian categorical product in the category of monoids. In particular, the history monoid H(Σ1,Σ2,…,Σn) is isomorphic to the trace monoid 𝕄(D) with the dependency relation given by D=(Σ1×Σ1)∪(Σ2×Σ2)∪⋯∪(Σn×Σn). In simple terms, this is just the formal statement of the informal discussion given above: the letters in an alphabet Σk can be commutatively re-ordered past the letters in an alphabet Σj, unless they are letters that occur in both alphabets. Thus, traces are exactly global histories, and vice versa. Conversely, given any trace monoid 𝕄(D), one can construct an isomorphic history monoid by taking a sequence of alphabets Σa,b={a,b} 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.

Worked examples

Example 1 — a first encounter with History monoid

Start with the simplest possible case. Write down what History monoid claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to History monoid before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about History monoid ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of History monoid

In research
History monoid appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses History monoid in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
History monoid is common in secondary-school and first-year university syllabi. It links to neighbouring topics Concurrency (computer science), Formal languages, Free algebraic structures, so understanding it makes those chapters shorter.
In everyday life
Look for History monoid outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “History monoid” →

How to study History monoid in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what History monoid means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain History monoid out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is History monoid in simple terms?

In mathematics and computer science, 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 provides a set of synchronization primitives (such as…

Why does History monoid matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study History monoid?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on History monoid.

Tags

  • Concurrency (computer science)
  • Formal languages
  • Free algebraic structures
  • Semigroup theory

Keep exploring