# When are two simulations not a bisimulation?

Given a labelled transition system $(S,\Lambda,\to)$, where $S$ is a set of states, $\Lambda$ is a set of labels, and $\to\subseteq S\times\Lambda\times S$ is a ternary relation. As usual, write $p \stackrel\alpha\rightarrow q$ for $(p,\alpha,q)\in\to$. The labelled transition $p\stackrel\alpha\to q$ denotes that the system in state $p$ changes state to $q$ with label $\alpha$, meaning that $\alpha$ is some observable action that causes the state change.

Now a relation $R \subseteq S \times S$ is a called a simulation iff $$\forall (p,q)\in R, \text{ if } p \stackrel\alpha\rightarrow p' \text{ then } \exists q', \; q \stackrel\alpha\rightarrow q' \text{ and } (p',q')\in R.$$

One LTS is said to simulate another if there exists a simulation relation between them.

Similarly, a relation $R \subseteq S \times S$ is a bisimulation iff $\forall (p,q)\in R,$ $$\begin{array}{l} \text{ if } p \stackrel\alpha\rightarrow p' \text{ then } \exists q', \; q \stackrel\alpha\rightarrow q' \text{ and } (p',q')\in R \text{ and } \\ \text{ if } q \stackrel\alpha\rightarrow q' \text{ then } \exists p', \; p \stackrel\alpha\rightarrow p' \text{ and } (p',q')\in R. \end{array}$$

Two LTSs are said to be bisimilar iff there exists a bisimulation between their state spaces.

Clearly these two notions are quite related, but they are not the same.

Under what conditions is it the case that an LTS simulates another and vice versa, but that the two LTSs are not bisimilar?

Because a CCS process is worth a thousand pixels – and it is easy to see the underlying LTS – here are two processes that simulates each other but are not bisimilar:

$$P = ab + a$$ $$Q = ab$$

$\mathcal{R_1}=\{(ab+a, ab), (b, b), (0,b), (0, 0)\}$ is a simulation.

$\mathcal{R_2}=\{(ab, ab+a), (b, b), (0,0)\}$ is a simulation.

$P\ \mathcal R_1\ Q$ and $Q\ \mathcal R_2\ P$ but $P$ and $Q$ are not bisimilar. Why not? Because $P\stackrel{a}→0$ and the only $Q'$ such that $Q\stackrel{a}→Q'$ is $b$ ... and $0$ is not bisimilar to $b$.

Why can they simulate each other, then? Because $P$ simulates $Q$ since it can do everything $Q$ does. And $Q$ simulates $P$ because even if $P$ can go in one $a$-step to a program that does nothing, $Q$ can still do that $a$-step, and that's all it takes to simulate something. The key difference with the bisimulation is really that, as Charles said, you have to relate the same processes with both simulations. (i.e. $\mathcal R$ such that both $\mathcal R$ and $\mathcal R^{-1}$ are simulations)

Even if there's a simulation in each direction, the simulations back and forth may not relate the same sets of states. Sometimes you have a simulation $R_1$ in one direction, and a simulation $R_2$ in the other direction, and two states $p_1$ and $q$ which are related by $R_1$ but not by $R_2$ nor by any other simulation in the same direction.

The canonical example is two systems which have the same traces, yet make choices differently. Consider two drinks machines: the first machine (the evil one) takes a coin (c) and non-deterministically decides whether to deliver a cup of tea (t). The second machine (the good one) takes a coin (c) and delivers a cup of tea (t). The good machine simulates the evil machine: take $R_1 = \{(s,s'), (p,p'), (q,q'), (r,p')\}$. All states' outgoing transitions are covered, including $r$ (which has no outgoing transition, so it's trivial). Notice how the good machine forgets the difference between $r$ and $p$.

The evil machine simulates the good machine: take $R_2 = \{(s',s),(p',p),(q',q)\}$. The state $r$ happens not to be used by this simulation. In fact, it is not possible for a simulation to use $r$, since $s'$ must map onto a state from which a trace of length $2$ is possible, so it has to be $s$; $p'$ has to map to a successor of $s'$ with the label $c$, so it's $p$ or $r$, but that state also has to have a possible trace of length $1$, so it has to be $p$; and by the same reasoning $q'$ must map to $q$, leaving no possibility of mapping any state to $r$.

A simuation in one direction must send $r$ somewhere. A simulation in the other direction must avoid $r$. Therefore there is no relation that is a simulation in both directions: the systems are not bisimilar.

The difference between the two machines is that the good machine is deterministic and (assuming liveness) always delivers tea if you insert a coin, whereas the evil machine may on a whim take the coin but become stuck, unable to deliver tea.

This kind of difference comes up often in the study of concurrent systems. jmad's answer shows a CCS process with this LTS.

For more information about bisimulations, I recommend Davide Sangiorgi's notes On the origins of bisimulation and coinduction. (This is exercise 1 p. 29, and the notes use the same example.)

• The fact that two one-way simulations don't equal bisimilarity suggests to me that simulation is not the right idea of approximation in the presence of nondeterminism. Are there any other ideas that have been considered? – Uday Reddy Apr 23 '12 at 20:51

Gilles' answer is very good and formal, and indeed, if $LTS_1$ is simulated by $LTS_2$ with a relation $R$, and $LTS_2$ is simulated by $LTS_1$ with the inverse of $R$, then $R$ is a bisimulation.

However, if the two relations are not the inverse of one another, then you might not be able to build a bisimulation. For instance, a simple example comes from the fact that the empty relation is simulation for any LTS. So, we can have $LTS_1$ is simulated by $LTS_2$ with a relation $R$, and $LTS_2$ is simulated by $LTS_1$ with the empty relation, and yet $R$ is not necessarily a bisimulation (although note that the empty relation is also a bisimulation for any LTS).

• I guess what I'm trying to say is that actually, it's always the case that two LTSs are bisimilar, so the actual question is rather whether a particular relation is a (bi)simulation. – Charles Mar 20 '12 at 18:47