{'fraction_non_alphanumeric': 0.03382603752131893, 'fraction_numerical': 0.006212945667181028, 'mean_word_length': 4.354859752120026, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Strong, Weak and Branching Bisimulation for Transition Systems and Markov Reward Chains: A Unifying Matrix Approach

We first study labeled transition systems with explicit successful termination. We establish the notions of strong, weak, and branching bisimulation in terms of boolean matrix theory, introducing thus a novel and powerful algebraic apparatus. Next we consider Markov reward chains which are standardly presented in real matrix theory. By interpreting the obtained matrix conditions for bisimulations in this setting, we automatically obtain the definitions of strong, weak, and branching bisimulation for Markov reward chains. The obtained strong and weak bisimulations are shown to coincide with some existing notions, while the obtained branching bisimulation is new, but its usefulness is questionable.


Introduction
(Labeled) transition systems are a well established formalism for modeling of the qualitative aspects of systems, focusing on the behavioral part. A transition system is a directed graph in which nodes represent states of the system, and labels on arrows represent the actions that the system can perform when going from one state to another. One state is considered to be the starting state. It is sometimes useful to distinguish deadlock behavior (inability to proceed) from successful termination, so we consider transition systems in which some states are explicitly marked as (successfully) terminating [13,1].
Reasoning about transition systems is usually done by relating them according to some behavioral equivalence. If two systems are to agree on every step they take, then they are equivalent modulo strong bisimulation equivalence [18,16]. When a system can perform internal (silent) steps, of which the impact is considered unobservable, strong bisimulation is less appropriate because it equates too few states. To solve this problem weaker equivalences have been introduced that abstract away from the internal steps but require that the other, i.e. visible, steps are strongly simulated. The two most commonly used equivalences of this type are weak bisimulation [16] and branching bisimulation [9,3] equivalence. The difference between the two is that the latter preserves the branching structure of a transition system better [9].
While transition systems are very useful for qualitative reasoning, (continuous-time) Markov chains have established themselves as powerful, yet fairly simple models for performance evaluation, i.e., for the modeling of quantitative behavior of systems. A Markov chain can be represented as a directed graph in which nodes represent states and labels on the outgoing arrows determine the stochastic behavior (an exponentially distributed delay) in the state. Some states are marked as starting and have initial probabilities associated with them. To increase modeling capability and obtain some very useful performance measures, such as throughput and utilization of a system, Markov chains are often equipped with rewards [11]. We only consider rewards associated to states, in which case they actually represent the rate with which a Markov chain gains a reward while residing in a state. A Markov chain with (state) rewards is called a Markov reward chain.
The idea of strong bisimulation exists in the Markov reward chain world as an aggregation method called ordinary lumping [12,17,4]. 1 This method is based on joining states that have the same reward and that transfer to lumping classes with equal probabilities at any given time. This ensures that the stochastic behavior of strongly bisimilar states is the same, and that bisimulation keeps (the reward based) performance properties. The notions of weak and branching bisimulation, however, have not yet been introduced to pure Markov chains (one exception is the weak bisimulation of [2] that actually coincides with ordinary lumping) but only to their extensions coming from stochastic process algebras [10]. All these extensions add action information to Markov chains, and, like in transition systems, take the special action τ for the internal step that can be abstracted from. The abstraction is not stochastically formalized, in the sense that it is not defined what performance properties are shared among weakly bisimilar chains. Moreover, when restricted to exponential transitions, the existing equivalences typically coincide with strong bisimulation.
In this paper we establish the notion of strong, weak, and branching bisimulation for Markov chains by setting the theory of transition systems and Markov chains on a common ground. The well developed matrix apparatus has shown to be a powerful method for presenting and reasoning about Markov chains, so we take matrix theory for the unifying framework. The three notions of bisimulation on transition systems are first formalized in (boolean) matrix terms, leading to a system of matrix equalities. These equalities can be directly interpreted in the (standard matrix) setting of Markov chains, automatically yielding definitions of strong, weak, and branching bisimulation there. The obtained notion of strong bisimulation is proven to indeed coincide with the standard definition of ordinary lumping. The obtained notion of weak bisimulation is shown to remarkably coincide with the notion of τ-lumping that we have recently developed as a helping tool in solving a different and independent problem [15,21]. To the best of our knowledge, the obtained definition of branching bisimulation does not correspond to any known Markovian equivalence from the literature.
With the decision to use matrix theory as a common setting, the gain is twofold. The matrix approach to transition systems sets the theory in a powerful algebraic setting that can be used as an alternative to or in combination with the standard process algebraic approach. This is specially useful because the notion of (bi)simulation has been, in some forms, extensively studied in graph, modal logic, and automata theory [20,8,5]. Matrices, moreover, increase clarity and compactness, simplify proofs, make known results from linear algebra directly applicable, have didactic advantage, etc.
The structure of this paper is as follows. In the next section we give some preliminaries for working with matrices. In Section 3 we define transition systems with explicit termination as systems of matrices. We also give matrix definitions of strong, weak, and branching bisimulation, and show that these notions indeed correspond to the standard ones. In Section 4 we first standardly present the theory of Markov reward chains using matrix theory. Then we interpret the definitions from Section 3 in this setting and discuss the resulting notions of bisimulation. The last section gives some conclusions and directions for future work.

Preliminaries
Let X be a set with addition, multiplication, the unit elements 0 and 1 for these operations, and with a preorder ≤. Then X n×m denotes the set of all n × m matrices with elements in X . We assume that matrix addition, matrix multiplication, multiplication by a scalar, and ≤, are all standardly defined in X n×m . The elementwise product of two matrices is defined as Elements of X 1×n and X n×1 are called (row and column) vectors. 1 n denotes the vector in X n×1 that consists of n 1's. 0 n×m denotes the n× m matrix consisting entirely of zeroes. I n denotes the n× n identity matrix. We omit the n and m when they are clear from the context. A matrix A of which every element is either 0 or 1, i.e. an element of {0, 1} n×m , is called a 0-1 matrix.
A 0-1 matrix V ∈ X n×N , n ≥ N in which every row contains exactly one 1 is called a collector. For the theory of bisimulation the central notion is of partitioning of states into equivalence classes. We can then think of a collector matrix as a matrix in which the rows represent states, the columns represent the equivalence classes, and the entries indicate which states belong to which classes. Note that V · 1 = 1. A matrix U ∈ X N×n such that U · 1 = 1 and UV = I N is a distributor for V .

Transition Systems in Matrix Terms
Let A be a set and let P(A) be the set of all subsets of A. Then P(A) = (P(A), +, ·,¯, 0, 1) is a boolean algebra with +, ·,¯, 0 and 1 representing union, intersection, complement, the empty set and the full set A respectively. We use +, ·, 0 and 1 instead of ∪, ∩, / 0 and A to emphasize the connections with standard matrix theory.
We now assume that A is a set of actions and fix it for the reminder of this section. A transition system is standardly defined as a quadruple (S, →, S 0 , ↓) where S is a finite set of states, → ⊆ S × A × S is the transition relation, s 0 ∈ S is the initial state and ↓⊆ S is the set of (successfully) terminating states.
In matrix terms we define a transition system as a triple of a 0-1 row vector that indicates which of the states is initial, a matrix whose elements are sets of actions that the system performs when transiting from one state to another, and a 0-1 vector that indicates which states are terminating. • σ ∈ {0, 1} 1×n is the initial vector with exactly one non-zero entry, • A ∈ P(A) n×n is the transition matrix, and The set of all transition systems of the dimension n is denoted T n A .
If S = {s 1 , . . . , s n }, our definition is obtained from the standard one by putting: That is, for each two states s i and s j , A[i, j] contains the set of actions that the system can perform by going from s i to s j . The i-th element of σ is 1 if the state s i is initial. The i-th element of ρ is either 0 or 1 depending if the state s i is terminating or not. It is clear that, given an ordered set S, we can obtain the standard definition from our definition easily.

Strong bisimulation
Strong bisimulation is an equivalence relation that partitions the set of states in such a way that the set of actions that can be executed to reach some class is the same for every two states in a class. In addition, the termination behavior of two related states must be the same. This allows us to built the quotient (i.e. the lumped) system in which states are the equivalence classes. In matrix terms bisimulation conditions and the lumped system are conveniently expressible in terms of a collector and a distributor matrix.

Definition 3.2 (Strong bisimulation-LTS)
where U is some distributor for V . In this case we also say that σ , A, ρ strongly lumps (by V ) to the transition system σ ,Â,ρ ∈ T N A defined by: Both the conditions for bisimulation and the definition of the lumped process do not depend on the particular choice of a distributor. Suppose that We now show that our definition of strong bisimulation agrees with the standard one. Define R = VV T and note that V T is a also distributor for V . Clearly R ≥ I. We first prove that the above conditions are equivalent to the conditions RA ≤ AR and Rρ ≤ ρ. We calculate RA = VV T A ≤ VV T AVV T = AVV T = AR and Rρ = VV T ρ ≤ ρ, and for the other direction, This clearly corresponds to the standard definition of strong bisimulation. Finally, note that (Rρ)[i] = 1 iff there is a j such that R[i, j] = 1 and ρ[ j] = 1. Thus, the condition Rρ ≤ ρ says that: This again matches with the standard definition.

Weak bisimulation
A silent step in a transition system is a step that is labeled by the internal action τ. Every matrix T ∈ P(A) n×n can be uniquely represented as T = A + {τ} · S where τ ∈ A, and A, S ∈ P(A) n×n are such that {τ} · A = 0 and S is a 0-1 matrix. To make this form of T more explicit we write σ , A, S, ρ instead of σ , T, ρ . Note that the strong bisimulation conditions from the previous section can be decomposed into separate conditions on A and S. In other words, the condition VU TV = TV is valid if and only if the inequalities VUAV = AV and VU SV = SV both hold. Weak bisimulation [16] ignores silent transitions in a very general way. It requests that a transition labeled with an action is simulated by a transition labeled with the same action but preceded and followed by a sequence of τ transitions. For this we introduce a matrix definition of reflexive-transitive closure. Given a 0-1 matrix R ∈ {0, 1} n×n , we call the matrix R * = ∑ ∞ n=0 R n the reflexive-transitive closure of R. where where Π = S * is the reflexive transitive closure of S and U is some distributor for V . We say that σ , A, S, ρ weakly lumps (by V ) to σ ,Â,Ŝ,ρ defined bŷ Contrary to strong bisimulation the definition of the lumped process now depends on the distributor used. Using any other distributor would, in general, give a different result for the lumped system (the irrelevance of distributors is only implied by the strong bisimulation condition, i.e. by VUAV = AV and VU ρ = ρ, which might not hold here).
Our definition of weak bisimulation corresponds to the standard one.  → s i n or that, in the standard notation, s i ⇒ s j . Now, as we did for strong bisimulation, we let R = VV T and express the bisimulation conditions using R. We have RS ≤ RΠ ≤ RΠR = VV T ΠV = ΠVV T = ΠR, RA ≤ RΠAΠR = VV T ΠAΠVV T = ΠAΠVV T = ΠAΠR, and Rρ ≤ RΠρ ≤ Πρ. The first inequality means that For the second inequality note that a ∈ (RA) This is the standard definition of weak bisimulation (with explicit termination).
Weak bisimulation can also be interpreted as a strong bisimulation on a system closed under the sequence of τ transitions, inducing the following diagram: The main purpose of the proof is to illustrate the power of matrices in this setting. We first prove two important properties of V T .

Using this theorem and the conditions of Definition 3.3 we calculate
which exactly states that the order of application of τclosure and lumping is irrelevant.

Branching bisimulation
Branching bisimulation [9] preserves the branching structure of a system more than weak bisimulation by requiring that after the initial sequence of τ steps the resulting state must again be bisimilar to the same state that the starting state is bisimilar to.
To show that our definition indeed induces the notion of branching bisimulation, we again let R = V T V . The conditions of Definition 3.5 are easily shown to be equivalent to the conditions RS ≤ R + Π (V ) SR, RA ≤ Π (V ) AR, and Rρ ≤ Π (V ) ρ, which are in turn easily shown to exactly match the standard conditions of branching bisimulation.
Similarly as we did for weak, we can interpret branching bisimulation as a strong bisimulation on a system closed under the sequence of τ-transitions that now connect states from the same class only (note that the closure then depends on the bisimulation). This induces the following diagram:

Markov Reward Chains
We now turn to Markov reward chains. We define the notions of strong, weak and branching bisimulation, by directly interpreting the conditions of the previous section in the real-number matrix setting. For each new notion we discus how it relates to some exiting reduction technique for Markov reward chains.
A Markov chain is a time-homogeneous finite-state stochastic process that satisfies the Markov property (future independent of the past). It is completely determined by a stochastic transition matrix (function) P(t), holding the probabilities of being in some states at time t > 0, if at a given state at time 0, and a stochastic row vector that gives the starting probabilities for each state.
The matrix P(t) can conveniently be expressed in terms of a time-independent generator matrix. A generator matrix is a square matrix of which the non-diagonal elements are non-negative and each diagonal element is the additive inverse of the sum of the non-diagonal elements of the same row. The elements of this matrix are exponential rates It is a standard Markov chain result that for every P(t) there exists a unique generator Q such that P(t) = e Qt (and then also Q = P ′ (0)).
A Markov reward chain is a Markov chain where reward is associated to every state, representing the rate at which gain is received while the process is in that state. We now give a formal definition.

Definition 4.1 (Markov reward chain)
A Markov reward chain is a triple (σ , Q, ρ) ∈ R 1×n × R n×n × R n×1 where σ is the initial probability vector, Q is a generator matrix called the rate matrix, and ρ is the reward vector.  Figure 2: A Markov reward chain and its matrix representation Figure 2 gives an example of a Markov reward chain. This chain starts from state s 1 with probability π and from state s 2 with probability 1 − π. In state s 1 it waits the amount of time determined by the minimum of two exponentially distributed delays, one parameterized with rate λ , the other with rate µ (note that this means that the process spends in state 1 exponentially distributed time with rate λ + µ). After delaying the process jumps to state s 2 or state s 3 depending on which of the two delays was shorter. In state s 2 the process just stays forever, i.e. it is absorbed there. From state s 3 it can jump back to state s 1 , after an exponential delay with rate ν. While residing in state s i , for i = 1, 3, the chain earns a reward with rate r i . If in Definition 3.2 of strong bisimulation for transition systems we replace the transition system with a Markov reward chain (σ , Q, ρ), we obtain the following definition of strong bisimulation for Markov reward chains. where U is some (any) distributor for V . In this case we also say that σ , Q, ρ strongly lumps to the Markov reward chain σ ,Q,ρ ∈ defined by: While the classical strong bisimulation requires that bisimilar states go to the same equivalence class by performing exactly the same actions, here these states must have equally distributed waiting times and equal joint probabilities when transiting to other classes. Moreover, they must also have the same reward. The definition reveals the already known fact that strong bisimulation corresponds to the notion of ordinary lumpability for Markov reward chains. The conditions from above exactly match the lumping conditions proposed in [17]. Standard lumping is known to preserve many useful performance properties. For example, the total reward rate at t, defined as R(t) = σ P(t)ρ, is easily shown to be the same for the original and the lumped chain.
We now define the notion of weak bisimulation for Markov reward chains. Similarly to transition systems we introduce internal steps in a Markov reward chain by assuming that Q is of the form Q s + τQ f , for some (fixed) parameter τ > 0 and two generator matrices Q s and Q f . To indicate this form of Q we write (σ , Q s , Q f , ρ) for such a Markov reward chain.
To be able to apply the classical definition of weak bisimulation to Markov reward chains we must first find a matrix Π that would correspond to the notion of reflexive-transitive closure. It is not hard to see that this Π must be the ergodic projection at zero of Q f , defined by Π = lim t→∞ e Q f t = ∑ ∞ n=0 Q n f t n n! (the strict formalization of this fact would need to be based on the theory of eigenvectors for boolean matrices). The matrix Π always exists, and is a stochastic matrix denoting the probabilities that the chain occupying some state is found in (other) some state in the long run. Now, as we did for strong bisimulation, putting (σ , Q s , Q f , ρ) instead of (σ , A, S, ρ) in Definition 3.3, we obtain the following definition of weak bisimulation for Markov reward chains. where Π is the ergodic projection of Q f , and U is some distributor for V .
We now explain what this weak bisimulation means stochastically. It is a known result from perturbation theory that P τ (t) = e Qt = e (Q s +τQ f )t (uniformly) converges to Πe ΠQ s Πt when τ → ∞, where Π is the ergodic projection at zero of Q f . The matrix Πe ΠQ s Πt is a non-standard transition matrix [6] being discontinuous at t = 0. It is, however, a transition matrix of a discontinuous Markov chain [7], a stochastic process that generalizes standard Markov chains by being allowed to perform infinitely many transitions in finite time. Strong bisimulation easily extends to discontinuous Markov reward chains by adding the condition VU ΠV = ΠV to Definition 4.2. Weak bisimulation can then be interpreted as a strong bisimulation on the discontinuous Markov reward chain that is obtained when τ → ∞. The idea of taking the limit is to treat the transitions from Q f as instantaneous whenever we abstract from them; if a transition takes time it must be considered observable. This exactly was our motivation in [15,21] where we defined the notion of τ-lumpability, and it explains why the conditions for weak bisimulation exactly match the conditions of τ-lumpability.
The concept of weak lumping, i.e. of reduction modulo weak bisimulation, can also be introduced here. However, while we were able to use V T for transition systems as a special distributor ensuring that the order of application of τ-closure and lumping is irrelevant, here a more complicated analysis is needed (in the real-number matrix theory, V T is not even a distributor!). One of the main results from [15,21] is the notion of a τ-distributor W that is used to define the lumped process as (σV,W Q s V,W Q f V,W ρ). This is a special distributor that gives a lumped chain of which the limit is the lumped version of the limit of the original chain. In other words, it ensures that the following diagram commutes: The precise definition of W is complicated and outside the scope of this paper; it can be found in [21] together with the proof of the above diagram. Note that although a τ-distributor W and the special distributor V T from the transition system setting appear to have no connections at all, they actually represent the same thing. In [21] we have shown that W is a distributor that satisfies ΠVW Π, and is such that the ergodic projection of W Q f V is W ΠV . Recall that these are exactly the properties of V T that we established in Theorem 3.4, interpreted in the boolean matrix setting.
Having defined the weakly lumped process, we can speak of properties that are preserved by lumping. It can, e.g., be shown that the expected reward at t is the same for the two chains in the limiting case of τ.
To define branching bisimulation for Markov reward chains we first note that Q f ⊓VV T is in general not a generator matrix; the diagonal of Q f is never affected by this operation. We will, however, conveniently assume that the obvious small adaptation has been made on the diagonal of Q f to turn Q f ⊓VV T into a generator, and we will denote the obtained matrix Q Putting (σ , Q s , Q f , ρ) instead of (σ , A, S, ρ) in Definition 3.5 and using the cancelation property valid in R n×n , we obtain the following definition of branching bisimulation for Markov reward chains. Note that there is actually no branching structure to be preserved in Markov reward chains as (almost) every τ, being instantaneous in the limit, would have priority over any regular (exponential) transition. This makes the usefulness of branching bisimulation in this setting questionable. Moreover, in contrast to transition systems theory, we have not been able to prove that the above definition ensures that every branching bisimulation is also a weak bisimulation, nor whether there exists a commuting diagram similar to the one for strong and weak lumping.

Conclusions and Future Work
We used matrix theory as a unified framework to present the theory of transition systems and Markov reward chains, and of their bisimulations. The notions of strong, weak, and branching bisimulation on transition systems were first coded in terms of matrix equalities. The compactness and the algebraic power of this representation is then illustrated in few important theorems. The same matrix equalities were next interpreted in the Markov reward chain setting, directly leading to the notions of strong, weak, and branching bisimulation there. The obtained notion of strong and weak bisimulation were shown to coincide with the existing notions of ordinary and τ-lumpability respectively. The obtained notion of branching bisimulation is new, but its properties are unknown and its usefulness is yet to be seen.
In [21,14] another form of aggregation in Markov reward chains is presented. In contrast to lumping this method always eliminates all internal steps by allowing states to be split into multiple classes. For future work we schedule to investigate whether this new reduction would lead to an interesting notion in the transition system setting. We also plan to see if the bisimulation-up-to technique [19] (formalized in matrix terms in [21]) is applicable to Markov chains.