Process Algebra (2IF45)
Probabilistic Process Algebra
Suzana Andova
Outline of the lecture
•
•
•
•
1
Why probabilistic extension
Introduction to probabilistic choice operator
Probabilistic strong bisimulation
Defining Probabilistic Basic Process Algebra
Process Algebra (2IF45)
Example of flipping a coin: can we do differently?
Process: Flipping a coin until tail comes out, then stop.
S = flip.(.head.S + .tail.1)
− ‘+’ represents that we do not know which way the choice is made
− We hope (and pray) that “Eventually tail comes out!”
− Praying = fairness assumption
− Sometimes this is considered as “overspecification” of the choice
2
Process Algebra (2IF45)
Example of flipping a coin: can we do differently?
Process: Flipping a coin until tail comes out, then stop.
S = flip.(.head.S +1/2 .tail.1)
− ‘+’ represents that we do not know which way the choice is made but we
do know or we can estimate to fair coin
− We hope (and pray) that “Eventually tail comes out!” Certainly eventually
tail comes out
− Praying = fairness assumption
− Sometimes this is considered as “overspecification” of the choice
− Now the choice is specified as it is in the real system (or much closer)
3
Process Algebra (2IF45)
Example of flipping a coin: can we do differently?
Process: Flipping a coin until tail comes out, then stop.
S = flip.(x.head.S +1/2 x.tail.1)
− ‘+’ represents that we do not know which way the choice is made but we
do know or we can estimate to fair coin
− We hope (and pray) that “Eventually tail comes out!” Certainly eventually
tail comes out
− Praying = fairness assumption
− Sometimes this is considered as “overspecification” of the choice
− Now the choice is specified as it is in the real system (or much closer)
4
Process Algebra (2IF45)
What is probability?
• Probabilistic description of frequency of outcomes in a repeated
experiment (e.g. throwing a die)
• Outcome of one experiment is an event (e.g. tail coming up is an
event), they form sample space (state space)
• Probability describes the frequency an event occurs
• Markov process: every next experiment doesn’t depend on the
previous outcome (for instance throwing a die)
• vs. Non-Markov processes: temperature in Eindhoven today depends
on the temperature yesterday
• Discrete vs. continuous (time) random process
• (Non-)Deterministic universe vs. randomness
5
Process Algebra (2IF45)
What is probability?
• Probabilistic description of frequency of outcomes in a repeated
experiment (e.g. throwing a die)
• Outcome of one experiment is an event (e.g. tail coming up is an
event), they form sample space (state space)
• Probability describes the frequency an event occurs
• Markov process: every next experiment doesn’t depend on the
previous outcome (for instance throwing a die)
• vs. Non-Markov processes: temperature in Eindhoven today depends
on the temperature yesterday
• Discrete vs. continuous (time) random process
• (Non-)Deterministic universe vs. randomness
6
Process Algebra (2IF45)
Non-determinism and randomness
• Probabilistic algorithms are more efficient than (non)deterministic
algorithms
• Some problems can be only solved by probabilistic algorithms and it is
proven that no (non)deterministic solution exists
• “It is shown that distributed systems of probabilistic processors are
essentially more powerful that distributed systems of deterministic
processors” in A symmetric and fully distributed solution to the Dining
Philosophers problem, D. Lehmann and M. Rabin, 1981
• Impossibility of Distributed Consensus with One Fault Process
(consensus problem in asynchronous system) M. Fisher, N. Lynch, M.
Peterson, 1985
• On randomization in sequential and distributed algorithms, R.Guptan,
S.Bhaskar, S.A.Smolka, 1994
7
Process Algebra (2IF45)
Discrete Markov chains:
(very) simple random processes
5/6
1/6
1
1/6
1/6
1/6
1/6
1/6
1
1/6
1
1
1
1
1
1/2
1/2
1/3
1/2
1
1
1
8
Process Algebra (2IF45)
1/6
1
Markov chains + reactive systems =
fully probabilistic systems
5/6,
NotSix
1/6, six
½,head
1, done
9
1,done
Process Algebra (2IF45)
½,tail
1,done
Markov chains + non-determinism =
Probabilistic LTSs
die
coin
5/6
head
NotSix
1/6
½
six
tail
1
done
10
Process Algebra (2IF45)
½
Probabilistic Labelled Transition Systems - PLTS
11
Process Algebra (2IF45)
Probabilistic LTS
Basic ingredients of a PLTS:
•
states (two types of states)
•
non-detereministic states
set N
•
probabilistic states
set P
•
transitions (two types of transitions)
a
s
t and t P
•
action transitions labelled with actions
•
probabilistic transitions labelled with probabilities s
t and t N
•
For a probabilistic state s,
die
coin
=1
st
5/6
head
NotSix
½
1/6
six
tail
1
12
Process Algebra (2IF45)
done
½
Probabilistic LTS
Basic ingredients of a PLTS:
•
states (two types of states)
•
non-detereministic states
set N
•
probabilistic states
set P
•
transitions (two types of transitions)
a
s
t and t P
•
action transitions labelled with actions
•
probabilistic transitions labelled with probabilities s
t and t N
•
For a probabilistic state s,
die
coin
=1
st
5/6
head
NotSix
1/6
six
13
Process Algebra (2IF45)
½
tail
done
½
Probabilistic LTS
For a probabilistic state sP and a set of states C S we define
the total probability of s to reach C as
Prob(s,C) =
s t,
tC
14
Note:Only in one step!
Process Algebra (2IF45)
Probabilistic LTS
sel_d
Prob(s,C) =
sel_c
1
s t,
tC
5/6
9
10
2
1/6
½
not_six
3
six
½
6
5
t
h
1
pass
4
1
1
11
1
8
h
7
Examples:
Prob(9, {3,4}) = 1/6
Prob(9, {1}) = 0
Prob(10,{5,6}) = 1
15
Process Algebra (2IF45)
Probabilistic LTS
1
1/3
2
a
b
4
5
1
1
16
10
c
2/3
3
7
1 1/3
c
8
2/3
1
13
12
11
c
Prob(1, C1) = 1/3
Prob(1, C2) = 2/3
Prob(1,C3) =
Prob(1,C4) = 0
a
b
b
6
9
c c
C1 = {2}, C2={3},
C3 = {9, 13},
C4 = {10,11,12},
c
c
Prob(5,C4) = 1
Prob(6,C4) = 1
Prob(7,C4) = 1/3
Prob(5,C3) = 0
Prob(6,C3) = 0
Prob(7,C3) = 2/3
Prob(4,C3) = 1
Prob(8,C3) = 1
Prob(4,C4) = 0
Prob(8,C4) = 0
Process Algebra (2IF45)
E1 = {9,10,11,12,13},
E2={2,3}
Prob(1, E2) = 1
Prob(1,E1) =
Prob(1,E2) = 0
Prob(5,E1) = 1
Prob(6,E1) = 1
Prob(7,E1) =
1/3 +2/3 = 1
Prob(4,E1) = 1
Prob(8,E1) = 1
Prob(4,E2) =
…=Prob(8,E2)=
0
Probabilistic LTS
1
1/3
2
a
b
4
5
1
9
10
c
2/3
Prob(1, E2) = 1
Prob(1,E1) =
Prob(1,E2) = 0
3
a
b
b
6
1
c c
E1 = {9,10,11,12,13},
E2={2,3}
7
1 1/3
2/3
1
13
12
11
c
8
c
c
c
c
90
c
24
a
b
2
5
a
b
3
6
38
b
3
7
10 0
c
11 0
c
12 0
c
13 0
Process Algebra (2IF45)
17
Prob(5,E1) = 1
Prob(6,E1) = 1
Prob(7,E1) =
1/3 +2/3 = 1
Prob(4,E1) = 1
Prob(8,E1) = 1
Prob(4,E2) =
…=Prob(8,E2)=
0
Bisimulation on LTSs
An equivalence relation R on the set of state S = N P of an PLTS is probabilistic
strong bisimulation iff the following conditions hold:
0. R N x N P x P
a
1. for all states s, t N, whenever (s, t) R and s s’ for some a A and s’ S,
a t’ and (s’, t’) R;
then there is a state t’ S such that t
2. for all states s, t P, Prob(s, C) = Prob(t, C) for all C S/R
Two PLTSs s and t are probabilistic strong bisimilar, s p t, iff there is a probabilistic
strong bisimulation R such that (s, t) R
18
Process Algebra (2IF45)
Example of bisimilar PLTS
1
1/3
2
a
b
4
5
1
1
19
10
c
1
3
7
1 1/3
8
2/3
c
b
1
1
1
13
12
11
c
a
a
b
b
6
9
c c
2/3
c
c
Process Algebra (2IF45)
c
Probabilistic Basic Process Algebra PBPA(A)
Language: PBPA(A)
Signature: 0, (a._ )aA, +, ⊕, where (0,1)
Language terms T(PBPA(A))
Deduction rules for PBPA(A):
a x
a.x
a x’
x
a x’
x+y
1
ya
y’
x+ya
y’
x
(x + y)
y
(x + y)
Axioms of PBPA(A):
(A1) x+ y = y+x
(A2) (x+y) + z = x+ (y + z)
(A3) x + x = x
(A4) x+ 0 = x
⑥
Strong Probabilistic
Bisimilarity on PLTSs
21
Equality of terms
Process Algebra (2IF45)
SOS rules for PBPA(A)
a.0
1
a.0?
a
0?
22
Process Algebra (2IF45)
SOS rules for PBPA(A)
1
a.0
a.0
a
0
23
Process Algebra (2IF45)
SOS rules for PBPA(A): action prefix
a.0
1
a.0
a
0
Deduction rules
a.x a.x
1
a.x x
a
24
Process Algebra (2IF45)
SOS rules for PBPA(A): probabilistic choice
1
a
25
a.0
1/2
1
b.0
=
b
Process Algebra (2IF45)
1/2 1/2
a
b
a.0 1/2 b.0
SOS rules for PBPA(A): probabilistic choice
a.0
1
1/2
1
b.0
=
b
a
Deduction rules
a.x a.x
1
x x’
x y
x’
a.x x
a
26
Process Algebra (2IF45)
a.0 1/2 b.0
1/2 1/2
a
b
y y’
(1-)
x y y’
SOS rules for PBPA(A): non-deterministic choice
1/2 1/2
a
27
b
+
1/3 2/3
c
d
1/6
=
a
10 January 2008
c
1/3
a
1/6
d
b
1/3
c b
d
SOS rules for PBPA(A): non-deterministic choice
1/2 1/2
a
+
b
c
Deduction rules
a.x a.x
1
a.x x
a
28
1/3 2/3
1/6
=
d
a
x x’
x y
x’
x x’, y y’
x +y x’ + y’
c
1/3
a
1/3
1/6
d
c b
b
y y’
(1-)
x y y’
d
SOS rules for PBA(A): action transitions
• Deduction rules for action transitions
a.x x
a
29
a
x
x’
a
x+y
x’
Process Algebra (2IF45)
a
y
y’
a
x+y
y’
PBPA(A) Probabilistic Basic Process Algebra
Language: PBPA(A)
Signature: 0, (a._ )aA, +, ⊕, where (0,1)
Language terms T(PBPA(A))
Deduction rules for PBPA(A):
a x
a.x
a x’
x
a x’
x
+
y
DONE!
7 SOS rules
ya
y’
4 for
transitions
1 probabilistic
x+ya
y’
3 for action transitions
x
(x + y)
y
(x + y)
Axioms of PBPA(A):
(A1) x+ y = y+x
(A2) (x+y) + z = x+ (y + z)
(A3) x + x = x
(A4) x+ 0 = x
⑥
Strong Probabilistic
Bisimilarity on PLTSs
30
Equality of terms
Process Algebra (2IF45)
Axioms of PBPA(A)
PBPA(A)
Signature: 0,
a._ ,
_+_ ,
(A1) x+ y = y+x
(A2) (x+y) + z = x+ (y + z)
(A3) x + x = x
but (AA3) a.x+a.x = a.x
(A4) x+ 0 = x
31
Process Algebra (2IF45)
Axioms of PBPA(A)
PBPA(A)
Signature: 0,
a._ ,
_+_ ,
(PA1) x y = y 1- x
(PA2) x (y z) = (x y) z
where = /( + - ) and = + -
(PA3) x x = x
(PA4) (x y) + z = (x + z) (y + z)
32
Process Algebra (2IF45)
PBPA(A) Probabilistic Basic Process Algebra
Language: PBPA(A)
Signature: 0, (a._ )aA, +, ⊕, where (0,1)
Language terms T(PBPA(A))
Deduction rules for PBPA(A):
a x
a.x
Axioms of PBPA(A):
a x’
x
a x’
x
+
y
DONE!
(A1) x+ y = y+x
(A2) (x+y) + z = x+ (y + z)
(AA3) a.x+a.x = a.x
(A4) x+ 0 = x
(PA1) x y = y 1- x
7 SOS rules
ya
y’
4 for
transitions
1 probabilistic
x+ya
y’
3 for action transitions
x
(x + y)
y
(x + y)
⑥
(PA2) x (y z) = (x y) z
where = /( + - ) and = + -
(PA3) x x = x
(PA4) (x y) + z = (x + z) (y + z)
Strong Probabilistic
Bisimilarity on PLTSs
33
Equality of terms
Process Algebra (2IF45)
Conclusion of the lecture
We have defined:
• Probabilistic strong bisimulation
• Probabilistic choice operator
• Operational semantics and SOS rules
• Axiomatization for PBPA(A) wrt strong probabilistic
bisimulation
34
Process Algebra (2IF45)
Extending the language with parallel
composition – Probabilistic TCP(A, )
• Specify processes that can execute certain actions from a
given set A
• The language of the Probabilistic Theory of
Communicating Processes, namely, the operators in the
signature
•
•
•
•
•
0 deadlock constant (inaction)
1 successful termination
a._ action prefix for a in A
+ non-deterministic choice
probabilistic choice for (0,1)
• communication function (_,_)
• parallel composition _ || _
• communication composition _ | _
35
Process Algebra (2IF45)
SOS semantics of PTCP(A, )
1/6
1/3 2/3
||
b
a
1/2 1/2
c
=
a
d
1
c
e
1/3
c
11
c
a b
1/6
1/3
b
d d
b
1
a
11
b a
c d
where a and c communicate in e,
and no other communication is defined (in this examples)
Deduction rules
x x’, y y’
x || y
x’|| y’
36
x
x’, y y’
x|y
x’ | y’
10 January 2008
x x’
H(x) H(x’)
1
d
SOS semantics of PTCP(A, )
• Deduction rules for action transitions and termination
a
x
x’
a
x || y
x’ || y
a
y
y’
a
x || y
x || y’
a
b
x
x’ y
y’, (a,b) = c
c
x || y
x’ || y’
x y
x || y
a
b
x
x’ y
y’, (a,b) = c
c
x|y
x’ || y’
x x’ , aH
a
H(x) H(x’)
a
37
x y
x | y
Axioms (not seen yet) of TCP(A, )
x|| y = x ╙ y + y ╙ x + x | y, only if x=x+x and y=y+y
x || (y z) = (x || y) (x || z)
(x y) || z = (x || z) (y || z)
x | (y z) = (x | y) (x | z)
(x y) | z = (x | z) (y | z)
H(x y) = H(x) H(y)
╙ (y z) = (x ╙ y) (x ╙ z)
(x y) ╙ z = (x ╙ z) (y ╙ z)
x
38
Process Algebra (2IF45)
Exercises
1. Consider process terms p = a.0 + a.0, q = a.0 1/3 b.0, r = c.(d.0 1/2 b.0).
Draw the PLTSs of p, q and r using the SOS semantic rules. Use the rules
compute the PLTS of H(p || q || r) if (b,c) = e and H={b,c}
Using the axioms derive a PBPA(A) process term t such that
PTCP(A, )├ H(p || q || r) = t, if (b,c) = e and H={b,c}.
Draw the PLTS of t and establish a probabilistic bisimulation relation between
PLTS of t and PLTS of H(p || q || r).
39
Process Algebra (2IF45)
© Copyright 2025 Paperzz