In
theoretical computer science
Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory.
It is difficult to circumsc ...
a bisimulation is a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
between state
transition systems, associating systems that behave in the same way in that one system simulates the other and vice versa.
Intuitively two systems are bisimilar if they, assuming we view them as playing a ''game'' according to some rules, match each other's moves. In this sense, each of the systems cannot be distinguished from the other by an observer.
Formal definition
Given a
labelled state transition system (
,
, →),
where
is a set of states,
is a set of labels and → is a set of labelled transitions (i.e., a subset of
),
a bisimulation is a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
,
such that both
and its
converse are
simulation
A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of models; the model represents the key characteristics or behaviors of the selected system or process, whereas the ...
s. From this follows that the symmetric closure of a bisimulation is a bisimulation, and that each symmetric simulation is a bisimulation. Thus some authors define bisimulation as a symmetric simulation.
Equivalently,
is a bisimulation if and only if for every pair of states
in
and all labels ''α'' in
:
* if
, then there is
such that
;
* if
, then there is
such that
.
Given two states
and
in
,
is bisimilar to
, written
, if and only if there is a bisimulation
such that
. This means that the bisimilarity relation
is the union of all bisimulations:
precisely when
for some bisimulation
.
The set of bisimulations is closed under union;
[Meaning the union of two bisimulations is a bisimulation.] therefore, the bisimilarity relation is itself a bisimulation. Since it is the union of all bisimulations, it is the unique largest bisimulation. Bisimulations are also closed under reflexive, symmetric, and transitive closure; therefore, the largest bisimulation must be reflexive, symmetric, and transitive. From this follows that the largest bisimulation — bisimilarity — is an
equivalence relation
In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation.
Each equivalence relatio ...
.
----
Alternative definitions
Relational definition
Bisimulation can be defined in terms of
composition of relations as follows.
Given a
labelled state transition system , a ''bisimulation''
relation is a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
over
(i.e.,
⊆
×
) such that
::
:and
::
From the monotonicity and continuity of relation composition, it follows immediately that the set of bisimulations is closed under unions (joins in the poset of relations), and a simple algebraic calculation shows that the relation of bisimilarity—the join of all bisimulations—is an equivalence relation. This definition, and the associated treatment of bisimilarity, can be interpreted in any involutive
quantale.
Fixpoint definition
Bisimilarity can also be defined in
order-theoretical fashion, in terms of
fixpoint theory, more precisely as the greatest fixed point of a certain function defined below.
Given a
labelled state transition system (
, Λ, →), define
to be a function from binary relations over
to binary relations over
, as follows:
Let
be any binary relation over
.
is defined to be the set of all pairs
in
×
such that:
:
and
:
Bisimilarity is then defined to be the
greatest fixed point of
.
Ehrenfeucht–Fraïssé game definition
Bisimulation can also be thought of in terms of a game between two players: attacker and defender.
"Attacker" goes first and may choose any valid transition,
, from
. I.e.:
or
The "Defender" must then attempt to match that transition,
from either
or
depending on the attacker's move.
I.e., they must find an
such that:
or
Attacker and defender continue to take alternating turns until:
* The defender is unable to find any valid transitions to match the attacker's move. In this case the attacker wins.
* The game reaches states
that are both 'dead' (i.e., there are no transitions from either state) In this case the defender wins
* The game goes on forever, in which case the defender wins.
* The game reaches states
, which have already been visited. This is equivalent to an infinite play and counts as a win for the defender.
By the above definition the system is a bisimulation if and only if there exists a winning strategy for the defender.
Coalgebraic definition
A bisimulation for state transition systems is a special case of
coalgebraic bisimulation for the type of covariant powerset
functor
In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, an ...
.
Note that every state transition system
is
bijectively a function
from
to the
powerset
In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is p ...
of
indexed by
written as
, defined by
::
Let
be
-th
projection mapping
to
and
respectively for
; and
the forward image of
defined by dropping the third component
::
where
is a subset of
. Similarly for
.
Using the above notations, a relation
is a bisimulation on a transition system
if and only if there exists a transition system
on the relation
such that the
diagram
A diagram is a symbolic representation of information using visualization techniques. Diagrams have been used since prehistoric times on walls of caves, but became more prevalent during the Enlightenment. Sometimes, the technique uses a three ...
commutes, i.e. for
, the equations
::
hold
where
is the functional representation of
.
Variants of bisimulation
In special contexts the notion of bisimulation is sometimes refined by adding additional requirements or constraints. An example is that of
stutter bisimulation In theoretical computer science, a stutter bisimulation''Principles of Model Checking'', by Christel Baier and Joost-Pieter Katoen, The MIT Press, Cambridge, Massachusetts. is defined in a coinductive manner, as is ''bisimulation''.
Let TS=(S,Act,� ...
, in which one transition of one system may be matched with multiple transitions of the other, provided that the intermediate states are equivalent to the starting state ("stutters").
A different variant applies if the state transition system includes a notion of ''silent'' (or ''internal'') action, often denoted with
, i.e. actions that are not visible by external observers, then bisimulation can be relaxed to be ''weak bisimulation'', in which if two states
and
are bisimilar and there is some number of internal actions leading from
to some state
then there must exist state
such that there is some number (possibly zero) of internal actions leading from
to
. A relation
on processes is a weak bisimulation if the following holds (with
, and
being an observable and mute transition respectively):
This is closely related to bisimulation
up to a relation.
Typically, if the
state transition system gives the
operational semantics
Operational semantics is a category of formal programming language semantics in which certain desired properties of a program, such as correctness, safety or security, are verified by constructing proofs from logical statements about its execut ...
of a
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
, then the precise definition of bisimulation will be specific to the restrictions of the programming language. Therefore, in general, there may be more than one kind of bisimulation, (bisimilarity resp.) relationship depending on the context.
Bisimulation and modal logic
Since
Kripke models are a special case of (labelled) state transition systems, bisimulation is also a topic in
modal logic. In fact, modal logic is the fragment of
first-order logic
First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quanti ...
invariant under bisimulation (
van Benthem's theorem).
Algorithm
Checking that two finite transition systems are bisimilar can be done in
polynomial time
In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
. The fastest algorithms are
quasilinear time using
partition refinement through a reduction to the coarsest partition problem.
See also
*
Simulation preorder
*
Congruence relation
*
Probabilistic bisimulation In theoretical computer science, probabilistic bisimulation is an extension of the concept of bisimulation for fully probabilistic transition systems first described by K.G. Larsen and A. Skou.
A discrete probabilistic transition system is a trip ...
References
Further reading
*
*
* Davide Sangiorgi. (2011). ''Introduction to Bisimulation and Coinduction''. Cambridge University Press.
External links
Software tools
*
CADPtools to minimize and compare finite-state systems according to various bisimulations*
mCRL2: tools to minimize and compare finite-state systems according to various bisimulations
The Bisimulation Game Game
{{Authority control
Theoretical computer science
Formal methods
Logic in computer science
Transition systems