International Colloquium on Graph and Model
Transformation On the occasion of the 65th birthday of
Hartmut Ehrig
(GraMoT 2010)
A Note on Causalities in Reaction Systems
Robert Brijder, Andrzej Ehrenfeucht, and Grzegorz Rozenberg
9 pages
Guest Editors: Claudia Ermel, Hartmut Ehrig, Fernando Orejas, Gabriele Taentzer Managing Editors: Tiziana Margaria, Julia Padberg, Gabriele Taentzer
A Note on Causalities in Reaction Systems
Robert Brijder∗1, Andrzej Ehrenfeucht2, and Grzegorz Rozenberg1 2
1Leiden Institute of Advanced Computer Science, Leiden Center for Natural Computing,
Leiden University, The Netherlands
2Department of Computer Science, University of Colorado at Boulder, USA
Abstract:Reaction systems are a formal model of interactions between biochemical reactions. In this note we initiate an investigation of causalities in reaction systems which reflect the way that elements (entities) of a reaction system influence each other.
Keywords: natural computing; biochemical interactions; reaction systems; causal relationships
1
Introduction
Reaction systems are a formal model of interactions between biochemical reactions which is based on the idea that the underlying mechanisms of these interactions as well as the working of an individual reaction are: facilitation and inhibition.
Therefore a reaction is defined as a triplet of finite nonempty setsa= (R,I,P), whereRis the set of reactants needed forato take place,I is the set of inhibitors each of which forbidsato take place, andPis the set of products produced byawhen it takes place. The setR∪Iforms the resources ofa— these are all entities that directly influenceaeither as reactants or as inhibitors. Reactions (of a given biochemical system) influence each other through their products — they may contain entities which are reactants for some reactions (therefore facilitating these reactions) and they may contain entities which are inhibitors for some reactions (therefore inhibiting these reactions).
A reaction systemA = (S,A)consists of a finite set of reactionsAand a finite background set of entities used in reactions ofAand entities needed to analyze the functioning ofA.
Research concerning reaction systems is quite broad. For example, it covers fundamental issues such as the notion of time in reaction systems ([ER09]), it is concerned with the dynamic processes in reaction systems and the way these processes guide the formations of compounds ([ER07a]), and it investigates the mathematical nature of functions (from states to states, and hence from finite sets into finite sets) definable by reaction systems ([EMR10]). In this note we initiate research on causalities in reaction systems, i.e., the ways that entities of a reaction system influence each other. We discuss here both static/structural causalities (i.e., embedded directly in the definition/specification of a reaction system) as well as dynamic causalities (i.e., the relationships formed through the dynamic runs of a reaction system).
2
Preliminaries
In order to fix notation and terminology, we recall in this section some basic notions concerning sets and graphs.
As usual, Z+ is the set of positive integers, and we let ω be the cardinality of Z+. The symmetric difference of setsZ1 andZ2, defined by(Z1\Z2)∪(Z2\Z1), is denoted byZ1⊕Z2. For a nonemptyU⊆Z+, the minimal integer ofUis denoted by min(U).
Letτ=W0, . . . ,Wnbe a sequence of sets. For a setS, we say thatτ is anS-sequenceifWi⊆S
for alli∈ {0, . . . ,n}. We denote the length ofτ by |τ|(note that|τ|=n+1). For a setQ, the Q-projection ofτis theQ-sequence of sets projQ(τ) =W0∩Q, . . . ,Wn∩Q.
Adirected graph(digraph) is an ordered pairG= (V,E), whereV is a finite set ofvertices, andE ⊆V×V is the set of edges. Note that we allow loops(x,x)∈E. Forx∈V, y∈V is an outgoing (incoming, resp.) vertex of xif (x,y)∈E ((y,x)∈E, resp.). The set of outgoing (incoming, resp.) vertices ofxis denoted by outG(x)(incG(x), resp.). Theout-degree (in-degree, resp.) of x, denoted by odG(x) (idG(x), resp.), is the number of outgoing (incoming, resp.) vertices ofx, i.e., it equals|outG(x)|(|incG(x)|, resp.).
3
Reactions and Reaction Systems
In this and in the following section we recall the basic notions related to reaction systems (see, e.g., [ER07b]).
Definition 1 Areactionis a tripleta= (R,I,P), whereR,I,Pare finite nonempty sets such that R∩I=∅.
The setsR,I,Pare also denoted byRa,Ia,Pa,and called thereactant set of a, theinhibitor set
of a, and theproduct set of a, respectively. Also,Ma=Ra∪Ia is the set ofresources of a. IfS
is a set such thatR,I,P⊆S, thenais areaction in S, and rac(S)denotes the set of all reactions inS.
Definition 2 LetT be a finite set.
1. Letabe a reaction. Thenaisenabled by T, denoted bya en T, ifRa⊆T andIa∩T=∅. The result of a on T, denoted by resa(T), is defined by: resa(T) =Pa if a en T, and
resa(T) =∅otherwise.
2. LetAbe a finite set of reactions. Theresult of A on T, denoted by resA(T), is defined by: resA(T) =S
a∈Aresa(T).
The intuition behind the finite setT above is that it represents a state of a biochemical system (hence it is the set of biochemical entities present in this state). A reaction ais enabled inT (it will take place inT) ifallof its reactants are present inT whilenoneof its inhibitors are in T. This is the reason that we assume in Definition1 that, for each reactiona, Ra∩Ia=∅, as otherwiseais never enabled. Whenatakes place it produces entities fromPa. The effect of a set
Athat are enabled onT.
Example 1 LetS={s1,s2,s3,s4}, a1= ({s2},{s1,s4},{s2}), and a2 = ({s2,s3},{s1},{s3}). Then a1,a2∈rac(S) and, e.g., Ma1 ={s1,s2,s4} and Pa1 ={s2}. We have for A={a1,a2}, resA({s2,s3}) ={s2,s3}.
We are ready now to recall the notion of a reaction system.
Definition 3 Areaction system, rs for short, is an ordered pairA = (S,A)such thatSis a finite set, andA⊆rac(S).
The setSis called thebackground set of A, its elements are calledentities, andAis called theset of reactions of A — note that sinceSis finite, so isA.
The dynamic behavior of a rs is formalized through the notion of an interactive process.
Definition 4 LetA = (S,A)be a rs. An(n-step) interactive processinA is a pairπ= (γ,δ)of
finite equal lengthS-sequencesγ=C0, . . . ,Cnandδ =D0, . . . ,Dnfor somen≥1, whereD0=∅ andDi=resA(Di−1∪Ci−1)for alli∈ {1, . . . ,n}.
The sequenceγ is thecontext sequence of π, denoted by con(π), and the sequenceδ is the
result sequence of π, denoted by res(π). Then the sequence τ =W0,W1, . . . ,Wn defined by
Wi=Ci∪Di for alli∈ {0, . . . ,n}is the state sequence of π, denoted by st(π), withW0=C0 called theinitial state of π(and ofτ), denoted by init(π), andWncalled thefinal state of π(and
ofτ), denoted by fst(π).
IfCi⊆Di for alli∈ {1, . . . ,n}, then we say thatπ andτ arecontext-independent. Note that
a context-independent state sequence depends only on the initial state (W0=C0) and its length (n+1). The set of all state sequences ofA (i.e., all state sequences of all interactive processes inA) is denoted by ST S(A), and the set of all context-independent state sequences ofA is denoted byCIST S(A).
Note that ifWi,Wi+1are two consecutive states in the state sequence of an interactive process
π, then each entity inWi+1is either produced by reactions fromAenabled onWior it is provided
by the corresponding context (Ci+1). Hence each entity in Wi+1 is created through the state transitions fromWi toWi+1. There is no permanency in reaction systems — each entity in a current state is there because it is sustained either by a reaction fromAor by the context. This is a major difference with models of concurrent systems in computer science (such as Petri nets — see, e.g., [RE98]), where elements from the current state that are not involved in the local transformations performed by the system on this state just persist (go over to the successor state).
Example2 LetA = (S,A)be a rs withS={x,y,z1,z2}and
A = {({x},{y},{z1})
({z1},{z2},{x,z2})
({z2},{z1},{x,y})}.
Figure 1: The influence graph from Example3.
τ=W0,W1,W2,W3,W4whereW1={z1},W2={x,z2},W3={x,y,z1}, andW4={x,z2}. We will use thisA now as the running example of this paper.
4
Resource Dependence and Product Influence
There are two basic ways that the entities of a reaction system can influence each other. If a reactionaproduces an entityx(i.e.,x∈Pa), then, for any entityy∈Ma, we say thatxis resource
dependent on y, and that y product-influencesx. These dependencies are formally defined as follows.
Definition 5 LetA = (S,A)be a rs.
• Letx∈S.
1. Theresource dependence set of x, denoted by MDx, is defined by S
{Ma|a∈A,x∈
Pa}.
2. Theproduct influence set of x, denoted by PIx, is defined by S
{Pa|a∈A,x∈Ma}.
• Letq∈Z+.
1. A is ars with q-bounded resource dependence, abbreviated byq-MD rs, if|MDx| ≤q
for eachx∈S.
2. A is ars with q-bounded product influence, abbreviated byq-PI rs, if|PIx| ≤qfor
eachx∈S.
We introduce now the notion of theinfluence graphof a rs, which is a very convenient technical tool to investigate resource dependencies and product influences in reaction systems.
Definition 6 LetA = (S,A)be a rs. Theinfluence graph ofA, denoted by infA, is the digraph
(S,E), where forx,y∈S,(x,y)∈E if and only ifx∈Maandy∈Pafor somea∈A.
The usefulness of the influence graph ofA in investigating resource dependencies and product influences in A stems from the fact that these parameters are directly expressible in infA as standard graph-theoretical notions. Thus it is obvious that the following holds.
Lemma 1 LetA = (S,A) be a rs. For each x∈S, MDx=incinfA(x) andPIx=outinfA(x). Moreover, for q∈Z+,A is a q-MD rs if and only ifid
infA(x)≤q for all x∈S, andA is a q-PI rs if and only ifodinfA(x)≤q for all x∈S.
Example4 From the influence graph ofA in Figure1we find that|PIz1|=|PIz2|=3,|PIx|=
|PIy|=1, and|MDs|=2for alls∈ {x,y,z1,z2}. HenceA is a3-PI rs and a2-MD rs.
We demonstrate now how to use the influence graph to obtain properties of resource depen-dencies and product influences.
Definition 7 LetA = (S,A)be a rs.
• Theaverage resource dependence ofA, denoted by avMD(A), is defined as∑x∈S
|MDx|
|S| .
• Theaverage product influence ofA, denoted by avPI(A), is defined as∑x∈S
|PIx|
|S| .
Theorem 1 For every rsA,avMD(A) =avPI(A).
Proof. For every digraphG= (V,E),|E|=∑x∈VidG(x) =∑x∈VodG(x), as each edge incoming
to some vertexxis outgoing from some vertexy. Hence, by Lemma1,∑x∈S|MDx|=∑x∈S|PIx|,
and the theorem holds.
Note that, in general: (i)knowing that rsA = (S,A)is aq-MD rs does not yield a bound on max{PIx|x∈S}, and symmetrically(ii)knowing thatA is aq-PI rs does not yield a bound on
max{MDx|x∈S}. However, knowing thatqbounds the size of resource dependence (product
influence, resp.) of A, by Theorem 1 we know that the average product influence (average resource dependence, resp.) ofA is also bound byq(because the average does not exceed the maximum).
5
Causal Distances
In Section4 we investigatedstaticcausalities in reaction systems, i.e., causalities “directly de-ducible” from the influence graph. In this section we investigate the way that entities influence each other within thedynamicsof a reaction system, i.e., within interactive processes.
We begin with a useful technical result concerning symmetric differences of states of a rs. Considering symmetric differences allows us to single out the entities by which two states differ (and then to consider consequences of these differences).
Proof. Lety2∈resA(W)⊕resA(W0). Then there is a reactionaofA with y2∈Pa such that
either (1)ais enabled byW andais not enabled byW0, or (2)ais enabled byW0 andais not enabled byW. Without loss of generality we assume case (1). Asa is enabled byW and not enabled byW0, eitherRa∩(W\W0)6=∅orIa∩(W0\W)6=∅. Hence there is ay1∈W⊕W0 withy1∈Ra∪Ia=Ma. Consequently,y2∈PIy1, and therefore(y1,y2)is an edge of infA.
The following lemma follows now from Lemma2by induction onn.
Lemma 3 LetA be a rs. Letτ,τ0∈CIST S(A)such thatτ=W0,W1, . . . ,Wm,τ0=W00,W10, . . . ,Wm0
for some m≥1, and W0⊕W00={x}. Then, for each n∈ {1, . . . ,m}, if y∈Wn⊕Wn0, then there is
a path from x to y ininfA of length n.
If we consider nowq-PI reaction systems, then we obtain a bound on the cardinality ofWn⊕
Wn0.
Lemma 4 Let A be a q-PI rs for some q ≥1. Let τ,τ0 ∈CIST S(A) be such that τ =
W0,W1, . . . ,Wm, τ0=W00,W10, . . . ,Wm0 for some m≥1, and |W0⊕W00|=1. Then, for each n∈ {1, . . . ,m},|Wn⊕Wn0| ≤qn.
Proof. By Lemma3, for eachy∈Wn⊕Wn0, there is a path fromxtoyof lengthn. AsA is aq-PI
rs, by Lemma1there are at mostqnpaths fromxof lengthn, and so the result follows.
Example5 We continue the running example. Recall that A is a3-PI reaction system. The context-independent state sequence τ0 with the initial state W00 ={x,z1} and length 5 is τ0 =
W00,W10,W20,W30,W40 whereW10={x,z1,z2},W20 ={z1},W30={x,z2}, andW40 ={x,y,z1}. If we compare τ0 with the context-independent state sequence τ with the initial state W0={x} in Example2, thenW0⊕W00={z1},W1⊕W10={x,z2},W2⊕W20={x,z1,z2},W3⊕W30=W4⊕W40= {y,z1,z2}. Hence, the upper bound of Lemma4indeed holds forτ andτ0as|W0⊕W00|=1, and |W1⊕W10|=2≤3,|W2⊕W20|=3≤9, etc.
Definition 8 LetA = (S,A)be a rs, andx,y∈S.
• Letτ,τ0∈CIST S(A)whereτ=W0,W1, . . . ,Wm,τ0=W00,W10, . . . ,Wm0, andW0⊕W00={x}. Let moreoverZx,y(τ,τ0) ={n∈ {0, . . . ,m} |y∈Wn⊕Wn0}. Then thecausal distance from
x to y inτ,τ0 is defined by:
δx,y(τ,τ0) =
(
minZx,y(τ,τ0) Zx,y(τ,τ0)6=∅
ω otherwise
.
• Thecausal distance from x to yis defined by:
cdx,y=min{δx,y(τ,τ0)|τ,τ0∈CIST S(A),|τ|=|τ0|, and init(τ)⊕init(τ0) ={x}}.
If the initial states of two state sequences τ and τ0 (of equal length) differ by x only, then
of two corresponding statesWnandWn0, then this appearance is caused byx. Ifnis the minimal
such index (forτ andτ0), then it is the distance of causal influence ofxonywithin the pairτ,τ0.
If on the other handynever appears in the symmetric difference of two corresponding states of
τ andτ0, thenxdoes not influenceywithin the pairτ,τ0 and so the distance of causal influence
ofxony is “infinite” (it is equal toω). Obviously, the causal distance betweenx andy in the
total dynamics ofA is defined as the minimal distance over all pairs of state sequencesτ,τ0 as above. If this distance isn, for somen∈Z+, then in some situations (pairsτ,τ0)xcan causally
influenceyover the distance equaln.
Example6 We continue the running example. Recall the context-independent state sequencesτ
andτ0from Example5withinit(τ)⊕init(τ0) ={z1}. We have then (see Example5):δz1,z1(τ,τ 0) =
0, δz1,x(τ,τ 0) =
δz1,z2(τ,τ
0) =1, and
δz1,y(τ,τ
0) = 3. Note that we may thus have “gaps”: there is no v∈S with δz1,v(τ,τ
0) =2, but, we have seen that
δz1,y(τ,τ
0) =3. Also note that cdz1,z2 =1as the causal distance between different entities is (by definition) at least1, and we haveδz1,z2(τ,τ
0) =1.
Using Lemma 3, the causal distance from x toy in state sequencesτ,τ0 has the following
implication in terms of paths in infA.
Lemma 5 LetA = (S,A)be a rs and let x∈S. Letτ,τ0∈CIST S(A)such that|τ|=|τ0|, and init(τ)⊕init(τ0) ={x}. Ifδx,y(τ,τ0) =d, then there is a path from x to y ininfA of length d.
Using Lemma4, we can now bound the number of entities that have a causal distancedfrom a given entityx.
Theorem 2 LetA = (S,A) be a rs and let x∈S. IfA is a q-PI rs for q≥1, then for every d∈Z+,|{y∈S|cdx,y=d}| ≤qd.
As a corollary we prove that if, for aq-PI rsA = (S,A), there is a common (finite) bound on causal distances fromxtoyfor allx,y∈S, then this common bound can be used to bound|S|.
Corollary 1 LetA = (S,A)be a q-PI rs for some q≥1. Let x∈S, and let n0≥0be such that cdx,y≤n0for all y∈S. Then|S| ≤∑nd=0 0qd.
Proof. Let x∈S. Then by Lemma 5, for every d∈Z+, |{y∈S |cdx,y =d}| ≤qd. Hence |{y∈S|cdx,y≤n0}| ≤∑nd=0 0qd. Since cdx,y≤n0 for ally∈S,|S|=|{y∈S|cdx,y≤n0}|, and so|S| ≤∑n0
d=0q
d.
6
Predictability
LetA = (S,A)be a rs. Assume that we are interested in a specificx∈S, and we would like to know (to be able to predict) whether or not, for a specificn∈Z+,xwill be present in the final
state of an-step processπ. Sinceπis uniquely determined by con(π)(andA), knowing con(π)
allows us to answer this query. However, since we are interested in a specificxand a specific n, perhaps to answer this query it suffices to knowonly a part of (each set of) con(π). More
specifically, perhaps (for givenxandn) there is a subsetQ⊆Swhich is the key to answering this query, meaning that if, for any twon-step interactive processes, theQ-projections of the context sequences of these processes are equal, then eitherx is in both final states (of these processes) or in none of them. ThenQis a subset ofSwhich is a cause forxto beuniformlyeither present or absent in the final state of any n-step interactive process. Such predicting subsets of S are investigated in this section.
Definition 9 LetA = (S,A)be a rs. Forx∈S,n≥1, andQ⊆S, we say thatQ n-predicts x, if for arbitraryn-step interactive processesπ1andπ2the following holds:
if projQ(con(π1)) =projQ(con(π2)), thenx∈fst(π1)if and only ifx∈fst(π2).
Note that for allx∈Sand alln≥1,S n-predictsx.
Let, forx∈Sandn≥1,Px,n={Q⊆S|Q n-predictsx}. SinceS∈Px,n,Px,nis nonempty,
and so it containsminimal elements(w.r.t. inclusion).
Theorem 3 LetA = (S,A)be a rs, x∈S and n≥1. ThenPx,ncontains exactly one minimal
element.
Proof. Assume to the contrary thatPx,n contains two different minimal setsQ1 and Q2. Let Z=Q1∩Q2. AsZ is strictly included inQ1(andQ2), andQ1 andQ2are minimal,Z does not n-predictx. Let thus π0 andπ00be arbitrary n-step interactive processes such that projZ(γ0) =
projZ(γ00)withγ0=con(π0),γ00=con(π00), andx∈fst(π0), whilex6∈fst(π00).
Letγ0=C00, . . . ,Cn0 andγ00=C000, . . . ,C 00
n. Consider now theS-sequenceγ=C0, . . . ,Cn, where
Ci= (Q1∩C0i)∪(Q2∩Ci00)fori∈ {0, . . . ,n}.
We haveQ1∩Ci= (Q1∩Ci0)∪(Q1∩Q2∩Ci00). Also, we haveQ1∩Q2∩C00i =Z∩Ci00. Moreover,
Z∩Ci00=Z∩Ci0, because projZ(γ00) =projZ(γ0). Since alsoZ⊆Q1, we obtainQ1∩Ci=Q1∩C0i.
Consequently, projQ1(γ) =projQ1(γ0).
Analogously one proves that projQ2(γ) =projQ2(γ 00).
Letπ be the interactive process corresponding toγ. SinceQ1n-predictsxandx∈fst(π0), we
havex∈fst(π). Similarly, sinceQ2 n-predictsxandx6∈fst(π00),x6∈fst(π)— a contradiction. ThereforePx,ncontains exactly one minimal element.
We denote the (unique) minimal element ofPx,nforx∈Sandn≥1, by prdA(x,n), and refer
to it asthe n-predictor of x (inA).
Note that in a context-independent n-step interactive process π= (γ,δ), as far as the state
sequence st(π)is concerned, we can assume thatγ=C0, . . . ,Cnis such thatC1=∅, . . . ,Cn=∅ (because all the contributions ofC1, . . . ,Cn to st(π) are already included in D1, . . . ,Dn where
state of an arbitrarycontext-independent n-step interactive processπ, it suffices to know which
entities of prdA(x,n)are included in the initial state ofπ — all other entities of the initial state
are irrelevant as far as this query is concerned! Our next result bounds the size ofn-predictors.
Theorem 4 LetA = (S,A)be a q-MD rs for q≥1. For each x∈S and each n≥1,|prdA(x,n)| ≤
∑nk=0qk.
Proof. Eachy∈prdA(x,n)product-influencesxin at mostnsteps. By the definition of influence graph, for each entityythat product-influencesxink-step (for somek), there is a path of length kfromytox. SinceA is aq-MD rs, by Lemma1there are at most∑nk=0qkpathsto xin infA of
length at mostn. Therefore|prdA(x,n)| ≤∑nk=0qk.
Example 7 Recall thatA in the running example is a2-MD rs (see Example4). Hence we have, e.g.,|prdA(z1,1)| ≤3.
Acknowledgements
The authors are indebted to Mike Main and the anonymous referees for useful comments.
Bibliography
[EMR10] A. Ehrenfeucht, M. G. Main, G. Rozenberg. Combinatorics of Life and Death for Reaction Systems. International Journal of Foundations of Computer Science 21(3):345–356, 2010.
doi:10.1142/S0129054110007295
[ER07a] A. Ehrenfeucht, G. Rozenberg. Events and modules in reaction systems.Theoretical Computer Science376(1-2):3–16, 2007.
doi:10.1016/j.tcs.2007.01.008
[ER07b] A. Ehrenfeucht, G. Rozenberg. Reaction Systems.Fundamenta Informaticae 75(1-4):263–280, 2007.
[ER09] A. Ehrenfeucht, G. Rozenberg. Introducing time in reaction systems. Theoretical Computer Science410(4-5):310–322, 2009.
doi:10.1016/j.tcs.2008.09.043
[RE98] G. Rozenberg, J. Engelfriet. Elementary Net Systems. In Reisig and Rozenberg (eds.), Lectures on Petri Nets I: Basic Models. Lecture Notes in Computer Science 1491, pp. 12–121. Springer, 1998.