Cause-Effect Structures Behaving like Reaction Systems Ludwik Czaja1,2 1 Vistula University, Warsaw, Poland 2 Institute of Informatics, The University of Warsaw, Poland Abstract Cause-effect (c-e) structures, a net-like algebraic formalism for describing and analysing systems, pri- marily parallel, may be adapted to work as Reaction Systems. This is acquired by a simple modification of the c-e structures’ semantics Keywords cause-effect structure, reaction system, quasi semiring 1. Summary of elementary cause-effect structures Cause-effect structures (c-e) are objects of an algebraic calculus called a quasi-semiring1 , for describing and analysing systems built up as nets. Among a number of similarities to Petri nets, the noticeable is graphic presentation of systems’ dynamics. The complete presentation of c-e structures is in [Cza 2019]. Definition 1.1 (set F [X], quasi-semiring of formal polynomials) Let X be a non-empty enumerable set. Its elements, called nodes, are counterparts of places in Petri nets. πœƒ ∈ / X is a symbol called neutral. It plays role of neutral element for operations on terms, called formal polynomials over X. The names of nodes, symbol πœƒ, operators +, βˆ™, called addition and multiplication, and parentheses are symbols out of which formal polynomials are formed. A node’s name and πœƒ is a formal polynomial; if 𝐾 and 𝐿 are formal polynomials, then (𝐾 + 𝐿) and (𝐾 βˆ™ 𝐿) are too. Their set is denoted by F [X]. Assume stronger binding of βˆ™ than +, which allows for dropping some parentheses. Addition and multiplication of formal polynomials is defined as follows: 𝐾 βŠ• 𝐿 = (𝐾 + 𝐿), 𝐾 βŠ™ 𝐿 = (𝐾 βˆ™ 𝐿). To simplify notation, let us use + and βˆ™ instead of βŠ• and βŠ™. It is required that the system ⟨F [X], +, βˆ™, πœƒβŸ© obeys the following equality axioms for all 𝐾, 𝐿, 𝑀 ∈ F [X], π‘₯ ∈ X: (+) πœƒ+𝐾 =𝐾 +πœƒ =𝐾 (βˆ™) πœƒβˆ™πΎ =𝐾 βˆ™πœƒ =𝐾 29th International Workshop on Concurrency, Specification and Programming (CS&P’21) " lczaja@mimuw.edu.pl (L. Czaja)  0000-0003-4675-816X (L. Czaja) Β© 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR CEUR Workshop Proceedings (CEUR-WS.org) Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 1 This calculus differs from the standard semiring by restricted distributivity law: π‘Ž Β· (𝑏 + 𝑐) = π‘Ž Β· 𝑏 + π‘Ž Β· 𝑐 satisfied provided that 𝑏 ΜΈ= πœƒ if and only if 𝑐 ΜΈ= πœƒ where πœƒ is a neutral element for both operations (simultaneity and nondeterministic choice). Hence the preposition "quasi". Note that due to the conditional distributivity, the calculus neither reduces to the single element πœƒ, nor makes both operations coincide. (++) 𝐾 + 𝐾 = 𝐾 (βˆ™βˆ™) π‘₯ βˆ™ π‘₯ = π‘₯ (+++) 𝐾 + 𝐿 = 𝐿 + 𝐾 (βˆ™ βˆ™ βˆ™) 𝐾 βˆ™ 𝐿 = 𝐿 βˆ™ 𝐾 (++++) 𝐾 + (𝐿 + 𝑀 ) = (𝐾 + 𝐿) + 𝑀 (βˆ™ βˆ™ βˆ™βˆ™) 𝐾 βˆ™ (𝐿 βˆ™ 𝑀 ) = (𝐾 βˆ™ 𝐿) βˆ™ 𝑀 (+βˆ™) If 𝐿 ΜΈ= πœƒ ⇔ 𝑀 ΜΈ= πœƒ then 𝐾 βˆ™ (𝐿 + 𝑀 ) = 𝐾 βˆ™ 𝐿 + 𝐾 βˆ™ 𝑀 Algebraic system which obeys these axioms will be referred to as a quasi-semiring of formal polynomials. β–‘ Definition 1.2 (cause-effect structure, carrier, set CE[X]) A cause-effect structure (c-e structure) over X is a pair π‘ˆ = ⟨𝐢, 𝐸⟩ of total functions: 𝐢: X β†’ F [X] (cause function; nodes occuring in 𝐢(π‘₯) are causes of π‘₯) 𝐸: X β†’ F [X] (effect function; nodes occuring in 𝐸(π‘₯) are effects of π‘₯) such that π‘₯ occurs in the formal polynomial 𝐢(𝑦) iff 𝑦 occurs in 𝐸(π‘₯). Carrier of π‘ˆ is the set π‘π‘Žπ‘Ÿ(π‘ˆ ) = {π‘₯ ∈ X : 𝐢(π‘₯) ΜΈ= πœƒ ∨ 𝐸(π‘₯) ΜΈ= πœƒ}. π‘ˆ is of finite carrier iff |π‘π‘Žπ‘Ÿ(π‘ˆ )| < ∞ (|...| denotes cardinality). The set of all c-e structures over X is denoted by CE[X]. Since X is fixed, we write just CE. β–‘ 𝐢 and 𝐸 are total, thus each c-e structure comprises all nodes from X, also the isolated ones - those from outside of its carrier. In presenting c-e structures graphically, only their carriers are drawn. A representation of a c-e structure π‘ˆ = ⟨𝐢, 𝐸⟩ as a set of annotated nodes is 𝐢(π‘₯) {π‘₯𝐸(π‘₯) : π‘₯ ∈ π‘π‘Žπ‘Ÿ(π‘ˆ )}. π‘ˆ is also presented as a directed graph with π‘π‘Žπ‘Ÿ(π‘ˆ ) as set of vertices 𝐢(π‘₯) labelled with objects of the form π‘₯𝐸(π‘₯) (π‘₯ ∈ π‘π‘Žπ‘Ÿ(π‘ˆ )); there is an edge from π‘₯ to 𝑦 iff 𝑦 occurs in the polynomial 𝐸(π‘₯). Fig. 1 (a) and (b) depict two graphical presentations of the same c-e structure with carrier {π‘Ž, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔, β„Ž}; in (a) the encircled nodes comprise groups making products in formal polynomials in (b), where the sums of the products create families of the groups. This c-e structure is the set {π‘Žπœƒπ‘’ , π‘πœƒπ‘’ , π‘πœƒπ‘’ , π‘‘πœƒπ‘’ , π‘’π‘Ž+𝑏·𝑐+𝑐·𝑑 𝑓 ·𝑔+β„Ž , π‘“πœƒπ‘’ , π‘”πœƒπ‘’ , β„Žπ‘’πœƒ }. Sometimes the empty subscript/superscript πœƒ by node names is omitted. Figure 1: (a) Predecessors and successors of the node 𝑒, grouped into families: {{π‘Ž}, {𝑏, 𝑐}, {𝑐, 𝑑}} and {{𝑓, 𝑔}, {β„Ž}}. (b) Notation by means of polynomials; the arrows are redun- dant: used only for graphic presentation of c-e structures. Definition 1.3 (addition and multiplication, monomial c-e structure) For c-e structures π‘ˆ = βŸ¨πΆπ‘ˆ , πΈπ‘ˆ ⟩, 𝑉 = βŸ¨πΆπ‘‰ , 𝐸𝑉 ⟩ define: π‘ˆ + 𝑉 = βŸ¨πΆπ‘ˆ +𝑉 , πΈπ‘ˆ +𝑉 ⟩ = βŸ¨πΆπ‘ˆ + 𝐢𝑉 , πΈπ‘ˆ + 𝐸𝑉 ⟩ where (πΆπ‘ˆ + 𝐢𝑉 )(π‘₯) = πΆπ‘ˆ (π‘₯) + 𝐢𝑉 (π‘₯) and similarly for 𝐸 π‘ˆ βˆ™ 𝑉 = (πΆπ‘ˆ βˆ™π‘‰ , πΈπ‘ˆ βˆ™π‘‰ ) = (πΆπ‘ˆ βˆ™ 𝐢𝑉 , πΈπ‘ˆ βˆ™ 𝐸𝑉 ) where (πΆπ‘ˆ βˆ™ 𝐢𝑉 )(π‘₯) = πΆπ‘ˆ (π‘₯) βˆ™ 𝐢𝑉 (π‘₯) and similarly for 𝐸 (The same symbols "+" and "βˆ™" are used for operations on c-e structures and formal polynomials). π‘ˆ is a monomial c-e structure iff each polynomial πΆπ‘ˆ (π‘₯) and πΈπ‘ˆ (π‘₯) is a monomial, i.e. does not comprise non-reducible (relative to equations in Definition 1.1) operation β€œ+β€œ. β–‘ Apart from the representation of c-e structures as a set 𝐢(π‘₯) {π‘₯𝐸(π‘₯) : π‘₯ ∈ π‘π‘Žπ‘Ÿ(π‘ˆ )}, their linear notation is used as the so-called "arrow-expressions": {π‘₯πœƒπ‘¦ , π‘¦πœƒπ‘₯ } is an arrow, denoted as π‘₯ β†’ 𝑦 and, consequently, {π‘₯πœƒπ‘¦ , π‘¦πœƒπ‘₯ } βˆ™ {π‘¦π‘§πœƒ , π‘§πœƒπ‘¦ }βˆ™{π‘§π‘’πœƒ , π‘’π‘§πœƒ }..... = {π‘₯πœƒπ‘¦ , 𝑦𝑧π‘₯ , 𝑧𝑒𝑦 , 𝑒𝑧.... .....} is a chain, denoted as π‘₯ β†’ 𝑦 β†’ 𝑧 β†’ 𝑒.... . Bidirectional arrow π‘₯ ↔ 𝑦 denotes π‘₯ β†’ 𝑦 β†’ π‘₯ (equivalent to 𝑦 β†’ π‘₯ β†’ 𝑦), that is, the close cycle {π‘₯𝑦𝑦 , 𝑦π‘₯π‘₯ }. Chains and arrows in particular, may be combined into β€œarrow expressions” representing some c-e structures. For instance c-e structure {π‘Žπœƒπ‘₯+𝑦 , π‘πœƒπ‘₯βˆ™π‘¦ , π‘₯π‘Žβˆ™π‘ πœƒ , π‘¦πœƒ } may be written as π‘Žβˆ™π‘ (π‘Ž β†’ π‘₯ + π‘Ž β†’ 𝑦) βˆ™ (𝑏 β†’ π‘₯) βˆ™ (𝑏 β†’ 𝑦). The set CE with addition, multiplication and a distinguished element denoted also by πœƒ and understood as the empty c-e structure (πœƒ, πœƒ), where πœƒ is a constant function πœƒ(π‘₯) = πœƒ for all π‘₯ ∈ X, makes an algebraic system similar to that in Definition 1.1, the quasi-semiring of c-e structures. Therefore the Proposition 1.1: Proposition 1.1 The system ⟨CE[X], +, βˆ™, πœƒβŸ© obeys the following equations for all π‘ˆ, 𝑉, π‘Š ∈ CE[X], π‘₯, 𝑦 ∈ X: (+) πœƒ+π‘ˆ =π‘ˆ +πœƒ =π‘ˆ (βˆ™) πœƒβˆ™π‘ˆ =π‘ˆ βˆ™πœƒ =π‘ˆ (++) π‘ˆ +π‘ˆ =π‘ˆ (βˆ™βˆ™) (π‘₯ β†’ 𝑦) βˆ™ (π‘₯ β†’ 𝑦) = π‘₯ β†’ 𝑦 (+++) π‘ˆ + 𝑉 = π‘ˆ + 𝑉 (βˆ™ βˆ™ βˆ™) π‘ˆ βˆ™ 𝑉 = 𝑉 βˆ™ π‘ˆ (++++) π‘ˆ + (𝑉 + π‘Š ) = (π‘ˆ + 𝑉 ) + π‘Š (βˆ™ βˆ™ βˆ™βˆ™) π‘ˆ βˆ™ (𝑉 βˆ™ π‘Š ) = (π‘ˆ βˆ™ 𝑉 ) βˆ™ π‘Š (+βˆ™) If 𝐢𝑉 (π‘₯) ΜΈ= πœƒ ⇔ πΆπ‘Š (π‘₯) ΜΈ= πœƒ and 𝐸𝑉 (π‘₯) ΜΈ= πœƒ ⇔ πΈπ‘Š (π‘₯) ΜΈ= πœƒ then π‘ˆ βˆ™ (𝑉 + π‘Š ) = π‘ˆ βˆ™ 𝑉 + π‘ˆ βˆ™ π‘Š β–‘ Definition 1.4 (partial order ≀; substructure, set SUB[𝑉 ], firing component, set FC, pre-set and post-set) For π‘ˆ, 𝑉 ∈ CE let π‘ˆ ≀ 𝑉 ⇔ 𝑉 = π‘ˆ + 𝑉 ; ≀ is a partial order in CE. If π‘ˆ ≀ 𝑉 then π‘ˆ is a substructure of 𝑉 ; SUB[𝑉 ]= {π‘ˆ : π‘ˆ ≀ 𝑉 } is the set of all substructures of 𝑉 . For 𝐴 βŠ†CE: 𝑉 ∈ 𝐴 is minimal (wrt ≀) in 𝐴 iff βˆ€π‘Š ∈ 𝐴: (π‘Š ≀ 𝑉 β‡’ π‘Š = 𝑉 ). A minimal in CEβˆ–{πœƒ} c-e structure 𝑄 = βŸ¨πΆπ‘„ , 𝐸𝑄 ⟩ is a firing component iff 𝑄 is a monomial c-e structure and 𝐢𝑄 (π‘₯) = πœƒ ⇔ 𝐸𝑄 (π‘₯) ΜΈ= πœƒ for any π‘₯ ∈ π‘π‘Žπ‘Ÿ(𝑄). The set of all firing components is denoted by FC, thus the set of all firing components of π‘ˆ ∈CE is FC[π‘ˆ ] = SUB[π‘ˆ ] ∩ FC. Let for 𝑄 ∈ FC and 𝐺 βŠ† FC: βˆ™ 𝑄 = {π‘₯ ∈ π‘π‘Žπ‘Ÿ(𝑄) : 𝐢 𝑄 (π‘₯) = πœƒ} (pre-set or causes of 𝑄) π‘„βˆ™ = {π‘₯ ∈ π‘π‘Žπ‘Ÿ(𝑄) : 𝐸𝑄 (π‘₯) = πœƒ} (post-set or effects of 𝑄) βˆ™ π‘„βˆ™ = βˆ™ 𝑄 βˆͺ π‘„βˆ™ βˆ™πΊ = (pre-set or causes of 𝐺) ⋃︀ βˆ™ 𝑄 π‘„βˆˆπΊ πΊβˆ™ = π‘„βˆ™ (post-set or effects of 𝐺) ⋃︀ π‘„βˆˆπΊ βˆ™ πΊβˆ™ = βˆ™ 𝐺 βˆͺ πΊβˆ™ β–‘ Thus, the firing component is a connected graph, due to the required minimality. Elements of the pre-set are its causes and elements of the post-set are its effects. Definition 1.5 (salvo - pairwise detached firing components; family FCS) Firing components 𝑄 and 𝑃 are detached if and only if βˆ™ π‘„βˆ™ ∩ βˆ™ 𝑃 βˆ™ = βˆ…. Any set 𝐺 βŠ†FC of pairwise detached firing components is called their salvo. The family of salvos is denoted by FCS. So, if 𝐺 βŠ†FC[π‘ˆ ] then FCS[π‘ˆ ] βŠ† 2FC[π‘ˆ ] for a c-e structure π‘ˆ , denotes a collection of salvos in π‘ˆ . The intention is that firing components in a salvo are capable of acting ("firing") simultaneously. This notion will be used in definition of parallel semantics of c-e structures.β–‘ Definition 1.6 (state of elementary c-e structures) A state is a subset of the set of nodes: 𝑠 βŠ† X. The set of all states: S = 2X . A node π‘₯ is active in the state 𝑠 iff π‘₯ ∈ 𝑠 and passive otherwise. As in case of Petri nets, we say ”π‘₯ holds a token” when π‘₯ is active. Obviously, the state might be defined equivalently as a two-valued function 𝑠: X β†’{0, 1}. β–‘ Definition 1.7 (sequential and parallel semantics of elementary c-e structures) Sequential. For 𝑄 ∈FC[π‘ˆ ] , 𝑠 ∈ S, let [[𝑄]] βŠ† S Γ— S be a binary relation defined as: (𝑠, 𝑑) ∈ [[𝑄]] iff βˆ™ 𝑄 βŠ† 𝑠 ∧ π‘„βˆ™ ∩ 𝑠 = βˆ… ∧ 𝑑⋃︀= (π‘ βˆ–βˆ™ 𝑄) βˆͺ π‘„βˆ™ (𝑄 transforms state 𝑠 into 𝑑). Semantics [[π‘ˆ ]] of π‘ˆ ∈CE is: [[π‘ˆ ]] = [[𝑄]]. [[π‘ˆ ]]* is its reflexive and transitive π‘„βˆˆFC [π‘ˆ ] closure, that is (𝑠, 𝑑) ∈ [[π‘ˆ ]]* if and only if 𝑠 = 𝑑 or there exists a sequence of states 𝑠0 , 𝑠1 , ..., 𝑠𝑛 with 𝑠 = 𝑠0 , 𝑑 = 𝑠𝑛 and (𝑠𝑗 , 𝑠𝑗+1 ) ∈ [[π‘ˆ ]] for 𝑗 = 0, 1, ..., 𝑛 βˆ’ 1. State 𝑑 is reachable from 𝑠 in semantics [[ ]] and the sequence 𝑠0 , 𝑠1 , ..., 𝑠𝑛 is a computation performed by π‘ˆ . Parallel. For a salvo 𝐺 ∈FCS[π‘ˆ ], 𝐺 ΜΈ= βˆ…, relations [[𝐺]] and [[π‘ˆ ]]π‘π‘Žπ‘Ÿ are defined in the same way as [[𝑄]] and [[π‘ˆ ]] in the sequential case but with 𝑄 replaced with 𝐺 and FC[π‘ˆ ] replaced with FCS[π‘ˆ ]. Closure [[π‘ˆ ]]*π‘π‘Žπ‘Ÿ , reachability and computation are defined as in the sequential case. β–‘ Note that [[π‘ˆ ]] = βˆ… iff FC[π‘ˆ ] = βˆ…. Behaviour of elementary c-e structures may be thought of as a token game: if each node in a firing component’s pre-set holds a token and none in its post-set does, then remove tokens from the pre-set and put them in the post-set. This is illustrated in Fig. 2. Properties inferred from above definitions are proved in [Cza 2019]. Figure 2: Example of activity (successive transformations) of elementary c-e structure. Its linear nota- tion as an "arrow expression" is the following: (π‘Ž β†’ 𝑏) + (𝑏 β†’ 𝑐) βˆ™ (𝑏 β†’ 𝑑) + (𝑏 β†’ 𝑒) + (𝑐 β†’ 𝑒) + (𝑐 β†’ 𝑑) + (𝑒 β†’ 𝑑) + (𝑒 β†’ π‘Ž). 2. Summary of extended cause-effect structures The structure of extended c-e structures, their firing component in particular, is the same as in Definitions 1.1 - 1.4. The extensions consist in redefining the state, treating the pre and post sets of firing components as multisets, and redefining semantics. It is assumed that with a given c-e structure π‘ˆ ∈CE[X] (i.e. already constructed by operations introduced in Definition 1.3) and the set of its firing components FC[π‘ˆ ] = SUB[π‘ˆ ]∩FC, some additional information is associated. The following extensions of elementary c-e structures with this information will be obtained: multi-valued nodes, capacity of nodes and coefficients of monomials in polynomials annotating nodes (counterparts of weight of arrows in Petri nets), in particular a coefficient πœ” which represents inhibiting. To this end, a notation for multisets is convenient: let N be the set of natural numbers including 0 and Nπœ” = N βˆͺ {πœ”}, where the value πœ” means infinity, that is πœ” > 𝑛 for each 𝑛 ∈ N. A multiset over a base set 𝑋 is a (total) function 𝑓 : 𝑋 β†’ Nπœ” . If the set {π‘₯: 𝑓 (π‘₯) ΜΈ= 0} is finite then the linear-form notation is adopted for multisets , e.g. 𝑋 π‘Ž 𝑏 𝑐 𝑑 𝑒 is denoted by 2 βŠ— π‘Ž + 3 βŠ— 𝑐 + 𝑑 + πœ” βŠ— 𝑒. A multiset is zero 𝑓 (𝑋) 2 0 3 1 πœ” O, when O(π‘₯) = 0 for all π‘₯. Addition, subtraction and multiplication on multisets is defined: (𝑓 +𝑔)(π‘₯) = 𝑓 (π‘₯)+𝑔(π‘₯), (𝑓 βˆ’π‘”)(π‘₯) = 𝑓 (π‘₯)βˆ’π‘”(π‘₯) for 𝑓 (π‘₯) β‰₯ 𝑔(π‘₯), (𝑓 ·𝑔)(π‘₯) = 𝑓 (π‘₯)·𝑔(π‘₯), comparison of multisets: 𝑓 ≀ 𝑔 iff 𝑓 (π‘₯) ≀ 𝑔(π‘₯) for all π‘₯. Assume the customary arithmetic of πœ”: πœ” + 𝑛 = πœ”, πœ” βˆ’ 𝑛 = πœ”, πœ” + πœ” = πœ” and additionally 0 βˆ’ πœ” = 0. Definition 2.1 (state of extended c-e structures) A state of extended c-e structure π‘ˆ is a total function 𝑠 : π‘π‘Žπ‘Ÿ(π‘ˆ ) β†’ N, thus a multiset over π‘π‘Žπ‘Ÿ(π‘ˆ ). The set of all states of π‘ˆ is denoted by S. β–‘ Definition 2.2. (weights of monomials and capacity of nodes) For a c-e structure π‘ˆ = ⟨𝐢, 𝐸⟩ and its firing component 𝑄 ∈FC[π‘ˆ ], let with the pre-set βˆ™ 𝑄 and post-set π‘„βˆ™ of 𝑄, some multisets βˆ™ 𝑄: βˆ™ 𝑄 β†’ Nπœ” and π‘„βˆ™ : π‘„βˆ™ β†’ Nπœ” be given as additional information. The value βˆ™ 𝑄(π‘₯) is a weight (or multiplicity) of monomial 𝐸𝑄 (π‘₯) and the value π‘„βˆ™ (π‘₯) - a weight (or multiplicity) of monomial 𝐢𝑄 (π‘₯). For 𝐸𝑄 (π‘₯) = πœƒ or 𝐢𝑄 (π‘₯) = πœƒ assume respectively βˆ™ 𝑄(π‘₯) = 0 or π‘„βˆ™ (π‘₯) = 0 and additionally let βˆ™ 𝑄(π‘₯) = 0 for π‘₯ ∈ / βˆ™π‘„ and 𝑄 (π‘₯) = 0 for π‘₯ ∈ βˆ™ / 𝑄 . Let π‘π‘Žπ‘(π‘ˆ ) be a total function π‘π‘Žπ‘(π‘ˆ ) : π‘π‘Žπ‘Ÿ(π‘ˆ ) β†’ Nπœ” βˆ–{0}, βˆ™ assigning a capacity to nodes in the set π‘π‘Žπ‘Ÿ(π‘ˆ ). A c-e structure endowed with such information is a c-e structure-with-weighted monomials and capacity of nodes. Note that this definition extends directly from the firing components onto their salvos. Indeed, For any non-empty salvo 𝐺 ∈FCS[π‘ˆ ] and any π‘₯ ∈ βˆ™ πΊβˆ™ there exists exactly one firing component 𝑄 ∈ 𝐺, with π‘₯ ∈ βˆ™ π‘„βˆ™ (because firing components in 𝐺 are pairwise detached). Thus one may define βˆ™ 𝐺 = βˆ™ 𝑄 and πΊβˆ™ = π‘„βˆ™ . It should also be noticed that weights of cause or effect monomials in identical firing components appearing in different c-e structures, may be different. β–‘ An effect monomial 𝐸𝑄 (π‘Ž) of a node π‘Ž ∈ βˆ™ 𝑄, with weight βˆ™ 𝑄(π‘Ž), is denoted by βˆ™ 𝑄(π‘Ž)βŠ—πΈπ‘„ (π‘Ž). Similarly for a cause monomial 𝐢𝑄 (π‘₯) of a node π‘₯ ∈ π‘„βˆ™ with weight π‘„βˆ™ (π‘₯): π‘„βˆ™ (π‘₯) βŠ— 𝐢𝑄 (π‘₯). The coefficient representing weights will be abandoned if they are 1. Definition 2.3 (inhibitors) For a firing component 𝑄 ∈FC[π‘ˆ ], let π‘–π‘›β„Ž[𝑄] = {π‘₯ ∈ βˆ™ 𝑄 : βˆ™ 𝑄(π‘₯) = πœ”}, thus a set of nodes in the pre-set of 𝑄, whose effect monomials 𝐸𝑄 (π‘₯) are of weight πœ”. The nodes in π‘–π‘›β„Ž[𝑄] will play role of inhibiting nodes of firing component 𝑄. In accordance with the note in Definition 1.5 (pairwise detached firing components in salvos), the concept of inhibiting nodes extends directly onto the salvos: π‘–π‘›β„Ž[𝐺] = {π‘₯ ∈ βˆ™ 𝐺 : βˆ™ 𝐺(π‘₯) = πœ”} where 𝐺 ∈FCS[π‘ˆ ]. The inhibiting nodes will be called inhibitors. β–‘ Definition 2.4. (enabled firing components and enabled salvos) For a firing component 𝑄 ∈FC[π‘ˆ ] and state 𝑠 let us define the formula: π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝑄](𝑠) if and only if: βˆ€π‘₯ ∈ π‘–π‘›β„Ž[𝑄] : 𝑠(π‘₯) = 0∧ βˆ€π‘₯ ∈ βˆ™ π‘„βˆ–π‘–π‘›β„Ž[𝑄] : 𝑠(π‘₯) > 0 ∧ βˆ™ 𝑄(π‘₯) ≀ 𝑠(π‘₯) ≀ π‘π‘Žπ‘(π‘ˆ )(π‘₯)∧ βˆ€π‘₯ ∈ π‘„βˆ™ : π‘„βˆ™ (π‘₯) + 𝑠(π‘₯) ≀ π‘π‘Žπ‘(π‘ˆ )(π‘₯) So, 𝑄 is enabled in the state 𝑠 iff none of inhibiting nodes π‘₯ ∈ βˆ™ 𝑄 contains a token and each remaining node in βˆ™ 𝑄 contains, with no fewer tokens than is the weight of its effect monomial 𝐸𝑄 (π‘₯) and no more than capacity of each π‘₯ ∈ βˆ™ 𝑄. Moreover, none of π‘₯ ∈ π‘„βˆ™ holds more tokens than their number when increased by the weight of the cause monomial 𝐢𝑄 (π‘₯), exceeds capacity of π‘₯. Evidently, for a salvo 𝐺 ∈FCS[π‘ˆ ], the formula π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝐺](𝑠) is defined as above by replacing 𝑄 with 𝐺 and FC[π‘ˆ ] with FCS[π‘ˆ ]. β–‘ Definition 2.5. (Sequential and parallel semantics of extended c-e structures) Sequential. For 𝑄 ∈FC[π‘ˆ ] , let [[𝑄]] βŠ† S Γ— S be a binary relation defined as: (𝑠, 𝑑) ∈ [[𝑄]] iff π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝑄](𝑠) ∧ 𝑑 = (𝑠 βˆ’ βˆ™ 𝑄) ⋃︀ + 𝑄 ≀ π‘π‘Žπ‘(π‘ˆ ) (𝑄 transforms βˆ™ state 𝑠 into 𝑑). Semantics [[π‘ˆ ]] of π‘ˆ ∈CE is [[π‘ˆ ]] = [[𝑄]]. Closure [[π‘ˆ ]] and reachability and * π‘„βˆˆFC[π‘ˆ ] computation are defined as in Definition 1.7. Parallel. For a salvo 𝐺 ∈FCS[π‘ˆ ], 𝐺 ΜΈ= βˆ…, the relations [[𝐺]] and [[π‘ˆ ]]π‘π‘Žπ‘Ÿ are defined in the same way as [[𝑄]] and [[π‘ˆ ]] in the sequential case, but with 𝑄 replaced with 𝐺 and FC[π‘ˆ ] replaced with FCS[π‘ˆ ]. Closure [[π‘ˆ ]]*π‘π‘Žπ‘Ÿ , reachability and computation are defined as in the sequential case. β–‘ An example of using inhibitor is in Fig. 3. The weight of one effect (i.e. subscript) monomial πœ” βŠ— 𝑧 of the node 𝑇 is πœ”, thus traversing arrow from 𝑇 to 𝑧 would require infinite number of tokens at 𝑇 , which is impossible. Thus, 𝑇 is the inhibiting node in firing component 𝑄0 and ordinary - in firing component 𝑄1 . In accordance with aforesaid notation of multisets, the weighted monomials are denoted by 𝑀 βŠ— 𝑀 , where 𝑀 is the weight of 𝑀 - an unweighted monomial. The weight is skipped if 𝑀 = 1. The corresponding arrows are dashed in the figures if 𝑀 = πœ”. In all graphic presentations of c-e structures, nodes of unbounded capacity πœ”, for storing data (sets of tokens), will be drawn as bigger circles with double edge. Remaining nodes, the "control", are of capacity 1 and drawn as smaller circles. Figure 3: Construction of c-e structure 𝑄0 + 𝑄1 implementing "test zero". A token at the node 𝑖 starts testing contents of 𝑇 ; on termination, the token appears at 𝑧 (zero) if 𝑇 is empty and at 𝑛 (not zero) otherwise. The tested node 𝑇 plays two roles: inhibiting in 𝑄0 and ordinary in 𝑄1 . Capacity of 𝑇 is infinite, whereas of remaining nodes is 1. The empty subscript/superscript πœƒ is skipped. In the Petri net counterpart, the inhibiting arrow enters the left transition. 3. Basic notions of reaction systems This outline of reaction systems [Ehr 2007], [Ehr 2017] is limited to the primary definitions, not their extensions, generalizations and properties established in this theory. The outline serves only as a reference base for the next section concerned with a translation of reaction systems into a version of cause-effect structures. That is why the original (in the literature) denotation of certain constituents of reaction systems, has been somewhat changed, in order to avoid naming collision with the cause-effect structures. But the new presentation is completely equivalent to original and only tailored to the purpose of the next section. The reaction systems will be referred to as RE. The reaction systems as well as cause-effect structures, though devised to describe interactions or cooperation in a network of active objects, both are certain models of computing - in the broadest meaning of this word. Reaction systems are very inspiring new model of computing, if "computing" is to encompass interaction, not only "number crunching". That is why a certain attempt to translate the reaction systems into c-e structures is undertaken, though for a price of modifying semantics of the latter, but retaining their structure. There have been also other endeavours to relate reaction systems with some formal models, for instance [Kle 2011], [Dut 2018], [Bar 2018], [Gor 2018]. Definition 3.1 (reaction system) A reaction system 𝐴 is created of two sets: 𝐴 = (B, R) where B is a set called a background (intended to comprise the so-called entities), R is a set of reactions, each reaction π‘Ÿ ∈ R created of three sets π‘Ÿ = (π‘…π‘Ÿ , πΌπ‘Ÿ , π‘ƒπ‘Ÿ ) where π‘…π‘Ÿ βŠ† B is a set of reactants, πΌπ‘Ÿ βŠ† B is a set of inhibitors with π‘…π‘Ÿ ∩ πΌπ‘Ÿ = βˆ… and π‘ƒπ‘Ÿ βŠ† B is a set of products. The initial state of the system 𝐴 is a set S0 βŠ† B. β–‘ In the literature, all the sets in Definition 3.1 are required to be finite. Though the concept of "entity" has not been formally adopted in the definitions, for the purpose of this section it will be understood as an object associated in a given state with an element of the background, likewise a "token", an abstract object, of intuitive, informal status in the c-e structures or Petri nets. Hence, the set phrase "entity present in..." in writings on the reaction systems. Since the notion of "state" of reaction systems is analogous to that in elementary Petri nets (and elementary c-e structures), meaning of the word "entity" may be thought of as an element of state. Definition 3.2 (state and enabled reactions) A state S of reaction system 𝐴 is a subset of its background: S βŠ† B. The intention is that S be the set of those background’s members, which comprise entities. A reaction π‘Ÿ = (π‘…π‘Ÿ , πΌπ‘Ÿ , π‘ƒπ‘Ÿ ) is enabled in a state S iff π‘…π‘Ÿ βŠ† S and πΌπ‘Ÿ ∩ S = βˆ…. β–‘ Definition 3.3 (semantics of reaction systems - change of state) The result of a reaction π‘Ÿ in a state S is the set π‘ƒπ‘Ÿ if π‘Ÿ is enabled at S and the empty set βˆ… otherwise. This result is denoted by π‘Ÿπ‘’π‘ π‘Ÿ (S). The result of the reaction system 𝐴 in a state S is the union of all its reactions in this state: ⋃︀ π‘Ÿπ‘’π‘ π΄ (S) = π‘Ÿπ‘’π‘ π‘Ÿ (S) π‘ŸβˆˆR β–‘ Note that on completion (if it exists) of reaction system work, the entities in the difference of sets Sβˆ–π‘Ÿπ‘’π‘ π΄ (S) disappear. Note also two features differing the reaction systems from cause-effect structures (or Petri nets): the lack of conflicts and possible absorption of reactants by products. These features will be taken into account in definition of semantics of reaction c-e structures in the next section. Example 3.1 (test zero) The "test zero" task (Fig. 3) may be realized in the reaction system 𝐴 = (B, R) with B ={𝑖, 𝑧, 𝑛, 𝑇 }, R ={π‘Ÿ1, π‘Ÿ2} where π‘Ÿ1 = ({𝑖}, {𝑇 }, {𝑧}), π‘Ÿ2 = ({𝑖, 𝑇 }, βˆ…, {𝑛}). Result of this system’s work depends on the initial state S0 (i.e. what the environment supplies): if S0 = {𝑖, 𝑇 } then the result is {𝑛} ("not zero" - presence of entity at 𝑇 ), if S0 = {𝑖} then the result is {𝑧} ("zero" - absence of entity at 𝑇 ). Reactant 𝑖 initiates work of the system, while 𝑇 is tested for presence/absence of entity. Evolution of the system 𝐴 = ({𝑖, 𝑧, 𝑛, 𝑇 }, {π‘Ÿ1, π‘Ÿ2}) with initial state {𝑖, 𝑇 } is the following: π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝑖, 𝑇 }) = βˆ… (because {𝑖} βŠ† {𝑖, 𝑇 } and {𝑇 } ∩ {𝑖, 𝑇 } = ΜΈ βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝑖, 𝑇 }) = {𝑛} (because {𝑖, 𝑇 } βŠ† {𝑖, 𝑇 } and βˆ… ∩ {𝑖, 𝑇 } = βˆ…) thus π‘Ÿπ‘’π‘ π΄ ({𝑖, 𝑇 }) = π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝑖, 𝑇 }) βˆͺ π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝑖, 𝑇 }) = {𝑛} ("not zero") Evolution of the system 𝐴 with initial state {𝑖} is the following: π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝑖}) = {𝑧} (because {𝑖} βŠ† {𝑖} and {𝑇 } ∩ {𝑖} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝑖}) = βˆ… (because {𝑖, 𝑇 } ⊈ {𝑖} and βˆ… ∩ {𝑖} = βˆ…) thus π‘Ÿπ‘’π‘ π΄ ({𝑖}) = π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝑖}) βˆͺ π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝑖}) = {𝑧} ("zero") More complex example of evolution of a reaction system, that is its consecutive state changes, is in section 4. 4. Cause-effect structures working similarly to reaction systems The objective is to build a system structurally identical with c-e structures but working like reaction systems. Let us call them "reaction c-e structures" and denote by RECE. The evident counterparts of some objects in reaction c-e structures and reaction systems are the following: nodes←→elements of background, firing components←→reactions, causes in a firing component←→reactants in a reaction, effects in a firing component←→products in a reaction, inhibitors in a firing component←→inhibitors in a reaction, tokens←→entities. The state of reaction c-e structures is a restriction of the state introduced in Definition 2.1 with added "πœ”" to the range (codomain). Definition 4.1 (state) A state of reaction c-e structure π‘ˆ is a total function 𝑠 : π‘π‘Žπ‘Ÿ(π‘ˆ ) β†’ {0,1,πœ”}. The set of all states of π‘ˆ is denoted by S. In the following, symbols 0 and 1 will be treated as logical values of false and true respectively and operations of propositional calculus on them will be applied. Moreover, operations ∨, ∧ on πœ”, are defined as: 0 ∨ πœ” = πœ” ∨ 0 = πœ”, 0 ∧ πœ” = πœ” ∧ 0 = 0, 1 ∨ πœ” = πœ” ∨ 1 = πœ”, 1 ∧ πœ” = πœ” ∧ 1 = 1, πœ” ∨ πœ” = πœ” ∧ πœ” = πœ”, Β¬πœ” = 0. As formerly, πœ” will be used for inhibiting actions. Interpretation of 0 and 1 as false and true is justified by absorption property of entities in reaction systems and will be made formal in Definition 4.6. β–‘ The lack of conflicts requires introducing for reaction c-e structures concept called here "volley", to differ it from "salvo" for c-e structures introduced in Definition 1.5. Definition 4.2 (weights of monomials and inconsistent firing components) Given a c-e structure π‘ˆ = ⟨𝐢, 𝐸⟩ and its firing component 𝑄 ∈FC[π‘ˆ ], let along with the pre-set βˆ™ 𝑄 and post-set π‘„βˆ™ of 𝑄, some functions βˆ™ 𝑄: βˆ™ 𝑄 β†’ {0,1,πœ”} and π‘„βˆ™ : π‘„βˆ™ β†’ {0,1,πœ”} be given as additional information. The value βˆ™ 𝑄(π‘₯) is called a weight of monomial 𝐸 (π‘₯) and the value π‘„βˆ™ (π‘₯) - a weight of monomial 𝑄 𝐢𝑄 (π‘₯). For 𝐸𝑄 (π‘₯) = πœƒ or 𝐢𝑄 (π‘₯) = πœƒ assume respectively βˆ™ 𝑄(π‘₯) = 0 or π‘„βˆ™ (π‘₯) = 0. Additionally, βˆ™ 𝑄(π‘₯) = 0 for π‘₯ ∈ / βˆ™ 𝑄 and π‘„βˆ™ (π‘₯) = 0 for π‘₯ ∈ / π‘„βˆ™ . As formerly, πœ” is interpreted as a "disable signal" and used for defining inhibiting nodes. Firing components 𝑄 and 𝑃 are inconsistent if for a certain π‘₯ ∈ βˆ™ π‘„βˆ™ ∩ βˆ™ 𝑃 βˆ™ , weights βˆ™ 𝑄(π‘₯) and βˆ™ 𝑃 (π‘₯) or π‘„βˆ™ (π‘₯) and 𝑃 βˆ™ (π‘₯) are different: βˆ™ 𝑄(π‘₯) ΜΈ= βˆ™ 𝑃 (π‘₯) or π‘„βˆ™ (π‘₯) ΜΈ= 𝑃 βˆ™ (π‘₯). Note that detached 𝑄 and 𝑃 (Definition 1.5) are not inconsistent. β–‘ Remark. Inconsistency of firing components must be avoided so that to obtain free of conflicts behaviour of the reaction c-e structures. The inconsistency is exemplified by the following c-e structure: π‘ˆ = {π‘₯0βŠ—π‘¦+𝑧 , 𝑦 π‘₯ , 𝑧 π‘₯ } containing two firing components: 𝑄 = {π‘₯0βŠ—π‘¦ , 𝑦 π‘₯ }, 𝑃 = {π‘₯𝑧 𝑧 π‘₯ }, thus βˆ™ 𝑄(π‘₯) = 0, βˆ™ 𝑃 (π‘₯) = 1. In the initial state 𝑠 with 𝑠(π‘₯) = 1, 𝑠(𝑦) = 𝑠(𝑧) = 0 the parallel execution of the set of firing components 𝐺 = {𝑄, 𝑃 } yields undetermined state of node π‘₯: it might be either 1 or 0. π‘ˆ is a direct translation of the reaction system ({π‘₯, 𝑦, 𝑧}, {𝑄, 𝑃 }, {π‘₯}) with 𝑄 = ({π‘₯}, βˆ…, {π‘₯, 𝑦}), 𝑃 = ({π‘₯}, βˆ…, {𝑧}), which performs state transformation {π‘₯} β†’ {π‘₯, 𝑦, 𝑧}. The same transformation of state is performed by the reaction c-e structure 𝑉 = {π‘₯0βŠ—π‘¦+0βŠ—π‘§ , 𝑦 π‘₯ , 𝑧 π‘₯ }, leading to 𝑑(π‘₯) = 𝑑(𝑦) = 𝑑(𝑧) = 1. Definition 4.3 (volley - simultaneous firing, family FCV, extension of weight functions) Any set 𝐺 βŠ†FC without inconsistent firing components is called their volley. The family of volleys is denoted by FCV. So, if 𝐺 βŠ†FC[π‘ˆ ] then FCV [π‘ˆ ] βŠ† 2FC[π‘ˆ ] for a c-e structure π‘ˆ , denotes a collection of volleys in π‘ˆ . The pre-set βˆ™ 𝐺 and post-set πΊβˆ™ of a volley 𝐺 are defined as in Definition 1.4. Extension of the weight functions βˆ™ 𝑄 and π‘„βˆ™ onto the volley 𝐺 are defined as follows: βˆ™ 𝑄(π‘₯) for arbitrary 𝑄 if it belongs to 𝐺 {οΈ‚ βˆ™ 𝐺(π‘₯) = 0 else π‘„βˆ™ (π‘₯) for arbitrary 𝑄 if it belongs to 𝐺 {οΈ‚ πΊβˆ™ (π‘₯) = 0 else This is a correct definition, since for any firing components 𝑄 and 𝑃 in 𝐺: βˆ™ 𝑄(π‘₯) = βˆ™ 𝑃 (π‘₯) if π‘₯ ∈ βˆ™ 𝐺 and π‘„βˆ™ (π‘₯) = 𝑃 βˆ™ (π‘₯) if π‘₯ ∈ πΊβˆ™ . Functions βˆ™ 𝐺 and πΊβˆ™ will be used in definition of reaction c-e structures semantics. β–‘ Definition 4.4 (inhibitors) As in Definition 2.3, for a firing component 𝑄 ∈FC[π‘ˆ ], the set π‘–π‘›β„Ž[𝑄] = {π‘₯ ∈ βˆ™ 𝑄 : βˆ™ 𝑄(π‘₯) = πœ”} comprises all nodes in the pre-set of 𝑄, whose effect monomials 𝐸𝑄 (π‘₯) are of weight πœ”. This also extends onto the volleys: π‘–π‘›β„Ž[𝐺] = {π‘₯ ∈ βˆ™ 𝐺 : βˆ™ 𝐺(π‘₯) = πœ”} where 𝐺 ∈FCV [π‘ˆ ]. β–‘ Definition 4.5 (enabled firing components and enabled volleys) For a firing component 𝑄 ∈ FC[π‘ˆ ] and state 𝑠 let the formula π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝑄](s) be defined as: βˆ€π‘₯ ∈ π‘–π‘›β„Ž[𝑄] : 𝑠(π‘₯) = 0 ∧ βˆ€π‘₯ ∈ βˆ™ π‘„βˆ–π‘–π‘›β„Ž[𝑄] : 𝑠(π‘₯) = 1 For a volley 𝐺 ∈FCV [π‘ˆ ], the formula π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝐺](𝑠) is defined as above by replacing 𝑄 with 𝐺 and FC[π‘ˆ ] with FCV [π‘ˆ ]. In the "token game" metaphor, 𝑄 (or 𝐺) is enabled in the state 𝑠 iff none of inhibiting nodes π‘₯ ∈ βˆ™ 𝑄 (or π‘₯ ∈ βˆ™ 𝐺) contains a token and each remaining node contains. As formerly, the inhibiting nodes will be called inhibitors. β–‘ Definition 4.6 (semantics [[ ]] of reaction c-e structures) For a volley 𝐺 ∈FCV [π‘ˆ ], 𝐺 ΜΈ= βˆ… let [[𝐺]] βŠ† S Γ— S be a binary relation defined as: (𝑠, 𝑑) ∈ [[𝐺]] iff π‘’π‘›π‘Žπ‘π‘™π‘’π‘‘[𝐺](𝑠) ∧ βˆ€π‘₯ ∈ π‘π‘Žπ‘Ÿ(π‘ˆ ) : 𝑑(π‘₯) = (𝑠(π‘₯) ∧ Β¬βˆ™ 𝐺(π‘₯))β‹ƒοΈ€βˆ¨ πΊβˆ™ (π‘₯) (say: 𝐺 transforms state 𝑠 into 𝑑). Semantics [[π‘ˆ ]] of π‘ˆ ∈RECE is [[𝐺]], for any 𝐺∈FCV [π‘ˆ ] maximal volley 𝐺, i.e. if 𝐺 βŠ† 𝐺′ ∈FCV [π‘ˆ ] and (𝑠, 𝑑) ∈ [[𝐺′ ]] then 𝐺 = 𝐺′ . Closure [[π‘ˆ ]]* and reachability and computation are defined as in Definition 1.7. β–‘ In Definition 4.6, if π‘₯ ∈ βˆ™ 𝐺 then βˆ™ 𝐺(π‘₯) ΜΈ= πœ”, because the volley 𝐺 is enabled in the state 𝑠 thus βˆ™ 𝐺(π‘₯) is 0 or 1. If π‘₯ ∈ / βˆ™ πΊβˆ™ then βˆ™ 𝐺(π‘₯) = 0 and πΊβˆ™ (π‘₯) = 0 hence Β¬βˆ™ 𝐺(π‘₯) = 1, thus 𝑑(π‘₯) = 𝑠(π‘₯) (strictly, "=" means equivalence). Evidently, formula (𝑠(π‘₯) ∧ Β¬βˆ™ 𝐺(π‘₯)) ∨ πΊβˆ™ (π‘₯) is equivalent to (𝑠(π‘₯) β‡’ βˆ™ 𝐺(π‘₯)) β‡’ πΊβˆ™ (π‘₯). Note also that description of semantics by means of this propositional formula is justified by the property of reaction systems: presence of token ("entity") at a node absorbs another token arriving in this node. Another property of reaction systems, the lack of conflicts between different reactions, takes place in reaction c-e structures due to the lack of inconsistent firing components in 𝐺 ∈FCV [π‘ˆ ]. Example 4.1 (reaction c-e structure assembling a chemical molecule) A description of creating some chemical molecules presents the reaction system 𝐴 = ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ, 𝑍}, {π‘Ÿ1, π‘Ÿ2, π‘Ÿ3, π‘Ÿ4, π‘Ÿ5, π‘Ÿ6}), starting with initial state {𝐢, 𝐻, 𝑂} and with reactions defined as follows: π‘Ÿ1 = ({𝐢, 𝐻}, βˆ…, {π‘ˆ }) π‘ˆ contains molecule 𝐢𝐻 (methylidyne) π‘Ÿ2 = ({π‘ˆ, 𝐢, 𝐻}, βˆ…, {𝑉 }) 𝑉 contains molecule 𝐢2 𝐻2 (acetylene) π‘Ÿ3 = ({𝑉, 𝐻}, βˆ…, {π‘Š }) π‘Š contains molecule 𝐢2 𝐻3 (ethylenyl) π‘Ÿ4 = ({π‘Š, 𝐻}, βˆ…, {𝑋}) 𝑋 contains molecule 𝐢2 𝐻4 (ethylene) π‘Ÿ5 = ({𝑋, 𝐻, 𝑂}, βˆ…, {π‘Œ }) π‘Œ contains molecule 𝐢2 𝐻5 𝑂 (ethoxide) π‘Ÿ6 = ({π‘Œ, 𝐻}, βˆ…, {𝑍}) 𝑍 contains molecule 𝐢2 𝐻5 𝑂𝐻 (ethanol) A diagram of the final result, that is the ethanol molecule, is in Fig. 4 and a certain translation of this reaction system into a reaction c-e structure is depicted in Fig. 5. Successive steps of the reaction system evolution are the following: π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂}) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂} and βˆ… ∩ {𝐢, 𝐻, 𝑂} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂}) = π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂}) = π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, 𝑂}) = π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂}) = π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂}) = βˆ… thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂}) = {π‘ˆ } π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂, π‘ˆ }) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂, π‘ˆ }) = {𝑉 } (since {𝐢, 𝐻, π‘ˆ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂, π‘ˆ }) = π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, π‘ˆ }) = π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂, π‘ˆ }) = π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂, π‘ˆ }) = βˆ… thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂, π‘ˆ }) = {π‘ˆ, 𝑉 } π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = {𝑉 } (since {𝐢, 𝐻, π‘ˆ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = {π‘Š } (since {𝐻, 𝑉 } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = βˆ… thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉 }) = {π‘ˆ, 𝑉, π‘Š } π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } and βˆ…βˆ©{𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = {𝑉 } (since {𝐢, 𝐻, π‘ˆ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = {π‘Š } (since {𝐻, 𝑉 } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } and βˆ…βˆ©{𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = {𝑋} (since {𝐻, π‘Š } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } and βˆ…βˆ©{𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = βˆ… thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š }) = {π‘ˆ, 𝑉, π‘Š, 𝑋} π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {𝑉 } (since {𝐢, 𝐻, π‘ˆ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {π‘Š } (since {𝐻, 𝑉 } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {𝑋} (since {𝐻, π‘Š } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {π‘Œ } (since {𝐻, 𝑂, 𝑋} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋} = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = βˆ…) thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋}) = {π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } π‘Ÿπ‘’π‘ π‘Ÿ1 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {π‘ˆ } (since {𝐢, 𝐻} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ2 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {𝑉 } (since {𝐢, 𝐻, π‘ˆ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ3 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {π‘Š } (since {𝐻, 𝑉 } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ4 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {𝑋} (since {𝐻, π‘Š } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ5 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {π‘Œ } (since {𝐻, 𝑂, 𝑋} βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) π‘Ÿπ‘’π‘ π‘Ÿ6 ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {𝑍} (since {𝐻, π‘Œ } βŠ† {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } and βˆ… ∩ {𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ } = βˆ…) thus π‘Ÿπ‘’π‘ π΄ ({𝐢, 𝐻, 𝑂, π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ }) = {π‘ˆ, 𝑉, π‘Š, 𝑋, π‘Œ, 𝑍} Figure 4: Diagram of ethanol. C, H, O - symbols of Carbon, Hydrogen and Oxygen atoms. Figure 5: A c-e structure with initial state 𝑠(𝐢) = 𝑠(𝐻) = 𝑠(𝑂) = 1 (and empty remaining nodes) imitating behaviour of reaction system 𝐴 specified in Example 4.1. Regarding it as a translation of 𝐴, note that nodes 𝑐1, 𝑐2, β„Ž1, β„Ž2, β„Ž3, β„Ž4, β„Ž5, β„Ž6 are some "artifacts" of this fairly liberal translation and have no counterparts in 𝐴. Intuitively, they might be seen as holding single atoms of elements 𝐢 and 𝐻. References [Bar 2018] Barbutti R., Bove P., Gori R., Levi F., Milazzo P., Simulating Gene Regulatory Networks using Reaction Systems, Proceedings of Concurrency, Specification and Programming 2018, pp. 119-132 [Cza 2019] Czaja L. Cause-Effect Structures. An Algebra of Nets with Examples of Application, Lecture Notes in Networks and Systems 45, Springer 2019 [Dut 2018] Dutta S., Jankowski A., Rozenberg G., Skowron A., Linking Reaction Systems with Rough Sets. Fundamenta Informaticae 165(3-4): 283-302 (2019) [Ehr 2007] Ehrenfeucht A., Rozenberg G.: Reaction systems. Fundamenta Informaticae 75 (2007), pp. 263-280 [Ehr 2017] Ehrenfeucht A, Petre I., Rozenberg G., Reaction Systems: A Model of Computation Inspired by the Functioning of the Living Cell, in: The Role of Theory in Computer Science, Essays Dedicated to Janusz Brzozowski, edited by Stavros Konstantinidis, Nelma Moreira, RogΓ©rio Reis and Jeffrey Shallit, World Scientific 2017, pp.1-32 [Gor 2018] Gori R., Gruska D., Milazzo P., Hidden States in Reaction Systems, Proceedings of Concurrency, Specification and Programming 2018, pp. 133-144 [Kle 2011] Kleijn J., Kountny M., Rozenberg G., Modelling Reaction Systems with Petri Nets, in: Proc. of the International Workshop on Biological Processes & Petri Nets (BioPPN 2011), pp. 36–52