Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

Slides:



Advertisements
Similar presentations
Introduction to Probability
Advertisements

Process Algebra Book: Chapter 8. The Main Issue Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the.
Lecture 4A: Probability Theory Review Advanced Artificial Intelligence.
Process Algebra (2IF45) Some Extensions of Basic Process Algebra Dr. Suzana Andova.
Process Algebra (2IF45) Recursion in Process Algebra Suzana Andova
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
Distributed Markov Chains P S Thiagarajan School of Computing, National University of Singapore Joint work with Madhavan Mukund, Sumit K Jha and Ratul.
Chapter 2 Concepts of Prob. Theory
Process Algebra (2IF45) Abstraction and Recursions in Process Algebra Suzana Andova.
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.
Process Algebra (2IF45) Dr. Suzana Andova. 1 Process Algebra (2IF45) Practical issues Lecturer - Suzana Andova - Group: Software Engineering and Technology.
PROBABILITY INTRODUCTION The theory of probability consist of Statistical approach Classical approach Statistical approach It is also known as repeated.
Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition Dr. Suzana Andova.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
An Introduction to Markov Decision Processes Sarah Hickmott
1 Discrete Structures & Algorithms Discrete Probability.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Branching Bisimulation Congruence for Probabilistic Transition Systems
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Great Theoretical Ideas in Computer Science.
Process Algebra (2IF45) Basic Process Algebra (Soundness proof) Dr. Suzana Andova.
Probability and Statistics Dr. Saeid Moloudzadeh Axioms of Probability/ Basic Theorems 1 Contents Descriptive Statistics Axioms of Probability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
ELEC 303 – Random Signals Lecture 1 - General info, Sets and Probabilistic Models Farinaz Koushanfar ECE Dept., Rice University Aug 25, 2009.
Probability Rules!. ● Probability relates short-term results to long-term results ● An example  A short term result – what is the chance of getting a.
Simple Mathematical Facts for Lecture 1. Conditional Probabilities Given an event has occurred, the conditional probability that another event occurs.
Process Algebra (2IF45) Probabilistic Branching Bisimulation: Exercises Dr. Suzana Andova.
Probabilistic Methods in Concurrency Lecture 4 Problems in distributed systems for which only randomized solutions exist Catuscia Palamidessi
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Probability Distributions. Essential Question: What is a probability distribution and how is it displayed?
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
Reactive systems – general
Section 4-5 Probability SPI 53B: compute the probability of a simple compound event Objectives: Find theoretical and experimental probability Collect and.
NLP. Introduction to NLP Very important for language processing Example in speech recognition: –“recognize speech” vs “wreck a nice beach” Example in.
Formal Methods for Software Engineering Part II: Modelling & Analysis of System Behaviour.
Y9 Booster Lesson 11. Objectives – what you should be able to do by the end of the lesson Systematically record all the outcomes of an experiment Understand.
5.1 Randomness  The Language of Probability  Thinking about Randomness  The Uses of Probability 1.
확률및공학통계 (Probability and Engineering Statistics) 이시웅.
Statistics Lecture 4. Last class: measures of spread and box-plots Have completed Chapter 1 Today - Chapter 2.
MPRI 3 Dec 2007Catuscia Palamidessi 1 Why Probability and Nondeterminism? Concurrency Theory Nondeterminism –Scheduling within parallel composition –Unknown.
Conditional Probability Mass Function. Introduction P[A|B] is the probability of an event A, giving that we know that some other event B has occurred.
Probability (outcome k) = Relative Frequency of k
Basic Concepts of Probability
Discrete Random Variables. Introduction In previous lectures we established a foundation of the probability theory; we applied the probability theory.
Process Algebra (2IF45) Basic Process Algebra (Completeness proof) Dr. Suzana Andova.
MATH 256 Probability and Random Processes Yrd. Doç. Dr. Didem Kivanc Tureli 14/10/2011Lecture 3 OKAN UNIVERSITY.
Probability Chapter 3. § 3.1 Basic Concepts of Probability.
Classical Control in Quantum Programs Dominique Unruh IAKS, Universität Karlsruhe Founded by the European Project ProSecCo IST
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
9/14/1999 JHU CS /Jan Hajic 1 Introduction to Natural Language Processing Probability AI-Lab
Chapter 2: Probability. Section 2.1: Basic Ideas Definition: An experiment is a process that results in an outcome that cannot be predicted in advance.
Process Algebra (2IF45) Analysing Probabilistic systems Dr. Suzana Andova.
Introduction to Algorithms Probability Review – Appendix C CIS 670.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
Section Constructing Models of Random Behavior Objectives: 1.Build probability models by observing data 2.Build probability models by constructing.
Basic Probability. Introduction Our formal study of probability will base on Set theory Axiomatic approach (base for all our further studies of probability)
Random Variables Lecture Lecturer : FATEN AL-HUSSAIN.
Probability. Today we will look at… 1.Quick Recap from last week 2.Terminology relating to events and outcomes 3.Use of sample spaces when dealing with.
Sec. 4-5: Applying Ratios to Probability
Introduction to Discrete Mathematics
Process Algebra (2IF45) Extending Process Algebra: Abstraction
Process Algebra (2IF45) Expressiveness of BPArec
PROBABILITY The probability of an event is a value that describes the chance or likelihood that the event will happen or that the event will end with.
Advanced Artificial Intelligence
Chapter 4 Section 1 Probability Theory.
A random experiment gives rise to possible outcomes, but any particular outcome is uncertain – “random”. For example, tossing a coin… we know H or T will.
Presentation transcript:

Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova

1 Outline of the lecture Why probabilistic extension Introduction to probabilistic choice operator Probabilistic strong bisimulation Defining Probabilistic Basic Process Algebra Process Algebra (2IF45)

2 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 Example of flipping a coin: can we do differently?

3 Process Algebra (2IF45) 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) Example of flipping a coin: can we do differently?

4 Process Algebra (2IF45) 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) Example of flipping a coin: can we do differently? x How to define?

5 What is probability? Process Algebra (2IF45) 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 What is probability? Process Algebra (2IF45) 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

7 Process Algebra (2IF45) 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 Non-determinism and randomness

8 Discrete Markov chains: (very) simple random processes Process Algebra (2IF45) 1/6 1 1/ /3 1/6 1 1/2 5/6 1/

9 Markov chains + reactive systems = fully probabilistic systems Process Algebra (2IF45) 5/6, NotSix 1/6, six ½, head 1, done ½, tail 1,done

10 Process Algebra (2IF45) Markov chains + non-determinism = Probabilistic LTSs NotSix 1/6 six tail ½ done die coin ½ head 5/6 1

11 Probabilistic Labelled Transition Systems - PLTS Process Algebra (2IF45)

12 Probabilistic LTS Process Algebra (2IF45) Basic ingredients of a PLTS: states (two types of states) non-detereministic states set N probabilistic states set P transitions (two types of transitions) action transitions labelled with actions and t  P probabilistic transitions labelled with probabilities and t  N For a probabilistic state s,   = 1  s  ts  t  s  ts  t a s  ts  t NotSix 1/6 six tail ½ done die coin ½ head 5/6 1

13 Probabilistic LTS Process Algebra (2IF45) Basic ingredients of a PLTS: states (two types of states) non-detereministic states set N probabilistic states set P transitions (two types of transitions) action transitions labelled with actions and t  P probabilistic transitions labelled with probabilities and t  N For a probabilistic state s,   = 1  s  ts  t  s  ts  t a s  ts  t NotSix 1/6 six tail ½ done die coin ½ head 5/6

14 Probabilistic LTS Process Algebra (2IF45) For a probabilistic state s  P and a set of states C  S we define the total probability of s to reach C as Prob(s,C) =    s  t, t  C Note:Only in one step!

15 Probabilistic LTS Process Algebra (2IF45) Examples: Prob(9, {3,4}) = 1/6 Prob(9, {1}) = 0 Prob(10,{5,6}) = 1 Prob(s,C) =    s  t, t  C 9 4 5/6 1/ ½ pass 11 ½ h 1 sel_d sel_c six not_six h t 1 1 1

16 Probabilistic LTS Process Algebra (2IF45) C1 = {2}, C2={3}, C3 = {9, 13}, C4 = {10,11,12}, Prob(1, C1) = 1/3 Prob(1, C2) = 2/3 Prob(1,C3) = Prob(1,C4) = 0 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 1 2/3 b /3 a 9 c 1 10 c c b /3 12 c c a c b 1 c 2/3 4 1 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

17 Probabilistic LTS Process Algebra (2IF45) 1 2/3 b /3 a 9 c 1 10 c c b /3 12 c c a c b 1 c 2/3 4 1 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 a 2  42  4 a 3  83  8 b 2  5 b 3  6 b 3  7 c 9  0 c 10  0 c 11  0 c 12  0 c 13  0

18 Process Algebra (2IF45) 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 1.for all states s, t  N, whenever (s, t)  R and s  s’ for some a  A and s’  S, then there is a state t’  S such that t  t’ and (s’, t’)  R; 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 a a

19 Example of bisimilar PLTS Process Algebra (2IF45) 1 2/3 b /3 a 9 c 1 10 c c b /3 12 c c a c b 1 c 2/3 4 1 b 1 a 1 c 1

20 Composing PLTSs: Towards defining the language of probabilistic systems

21 Process Algebra (2IF45) Probabilistic Basic Process Algebra PBPA(A) Language: PBPA(A) Signature: 0, (a._ ) a  A, +, ⊕ , where   (0,1) Language terms T(PBPA(A)) Axioms of PBPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x Deduction rules for PBPA(A): x  x’ x + y  x’ a a  11  x  (x + y)   a.x  x  a  y  y’ x + y  y’ a a y  (x + y)  ⑥ Strong Probabilistic Bisimilarity on PLTSs Equality of terms

22 SOS rules for PBPA(A) Process Algebra (2IF45) 1 a a.0 a.0? 0?

23 SOS rules for PBPA(A) Process Algebra (2IF45) 1 a a.0 0

24 SOS rules for PBPA(A): action prefix Process Algebra (2IF45) 1 a a.0 0 Deduction rules a.x  a.x 1 a.x  x a

25 SOS rules for PBPA(A): probabilistic choice Process Algebra (2IF45) 1 a b 1 1/2 a b  1/2 = a.0b.0 a.0  1/2 b.0

26 Process Algebra (2IF45) SOS rules for PBPA(A): probabilistic choice Deduction rules x  x’ x   y  x’ a.x  a.x  1 y  y’ x   y  y’ (1-  )    a.x  x a 1 a b 1 1/2 a b  1/2 = a.0b.0 a.0  1/2 b.0

27 10 January /2 a b + = 1/3 c d 2/3 1/3 ab 1/6 a 1/3 d c c d b SOS rules for PBPA(A): non-deterministic choice

28 1/2 a b + = 1/3 c d 2/3 1/3 ab 1/6 a 1/3 d c c d b SOS rules for PBPA(A): non-deterministic choice Deduction rules x  x’ x   y  x’ a.x  a.x  1 y  y’ x   y  y’ (1-  )  x  x’, y  y’ x +y  x’ + y’      a.x  x a

29 SOS rules for PBA(A): action transitions Process Algebra (2IF45) Deduction rules for action transitions x  x’ x + y  x’ a.x  x a a a y  y’ x + y  y’ a a

30 Process Algebra (2IF45) PBPA(A) Probabilistic Basic Process Algebra Language: PBPA(A) Signature: 0, (a._ ) a  A, +, ⊕ , where   (0,1) Language terms T(PBPA(A)) Axioms of PBPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x Deduction rules for PBPA(A): x  x’ x + y  x’ a a  11  x  (x + y)   a.x  x  a  y  y’ x + y  y’ a a y  (x + y)  ⑥ Strong Probabilistic Bisimilarity on PLTSs Equality of terms DONE! 7 SOS rules 4 for probabilistic transitions 3 for action transitions

31 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

32 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)

33 Process Algebra (2IF45) PBPA(A) Probabilistic Basic Process Algebra Language: PBPA(A) Signature: 0, (a._ ) a  A, +, ⊕ , where   (0,1) Language terms T(PBPA(A)) Axioms of PBPA(A): (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 (PA2) x   (y   z) = (x   y)  z where  =  /(  +  -  ) and =  +  -  (PA3) x   x = x (PA4) (x   y) + z = (x + z)   (y + z) Deduction rules for PBPA(A): x  x’ x + y  x’ a a  11  x  (x + y)   a.x  x  a  y  y’ x + y  y’ a a y  (x + y)  ⑥ Strong Probabilistic Bisimilarity on PLTSs Equality of terms DONE! 7 SOS rules 4 for probabilistic transitions 3 for action transitions

34 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 Process Algebra (2IF45)

35 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 _ | _

36 10 January 2008 SOS semantics of PTCP(A,  ) where a and c communicate in e, and no other communication is defined (in this examples) 1/3 a b 2/3 1/2 c d ||= 1/3 c b 1/6 a a c d bd e 1 a a ddb Deduction rules  x  x’  H (x)   H (x’)   x  x’, y  y’ x || y  x’|| y’   x  x’, y  y’ x | y  x’ | y’    c 11 bc 111 1

37 Deduction rules for action transitions and termination x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  x  x’ y  y’,  (a,b) = c x || y  x’ || y’ a c b x  x’ y  y’,  (a,b) = c x | y  x’ || y’ a c b x  x’, a  H  H (x)   H (x’) a a SOS semantics of PTCP(A,  )

38 Process Algebra (2IF45) 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) x ╙ (y   z) = (x ╙ y)   (x ╙ z) (x   y) ╙ z = (x ╙ z)   (y ╙ z)

39 Exercises Process Algebra (2IF45) 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).