Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points 33 1
1 Strong Bisimultion nd HML Exercise 1.1 Consider the following LTS: 1. Tell whether or not s1 is strongly isimilr to t1. Justify your nswer formlly. 2. Determine ll the sttes of the LTS tht stisfy the following formuls: []hitt []hcitt hihitt hcihi[c]ff [][]hcitt Exercise 1.2 Consider the following lelled trnsition system. so s1 / s2 Compute for which sets of sttes [[X]] {s, s1, s2 } the following formule re true. X = hitt []X X = hitt ([]X hitt) Exercise 1.3 Consider the following LTS: 2
1. Tell whether or not s 1 is strongly isimilr to t 1. Justify your nswer formlly. 2. Determine ll the sttes of the LTS tht stisfy the following formuls: [] tt ( tt c tt) [][c]ff Exercise 1.4 Consider the following LTS: 1. Tell whether or not s 1 is strongly isimilr to u 1. Justify your nswer formlly. 2. Determine ll the sttes of the LTS tht stisfy the following formuls: ϕ 1 = [] c tt ϕ 2 = c tt ϕ 3 = [] [c]ff ϕ 4 = [c]ff Exercise 1.5 Consider the following lelled trnsition system. s t t 3 t 4 s 1 s 2 t 1 s 3 s 4 t 2 Show tht s t y finding strong isimultion R contining the pir (s, t). 3
Exercise 1.6 Consider the CCS processes P nd Q defined y: P P 1 def =.P 1 def =.P + c.p nd Q Q 1 Q 2 Q 3 def =.Q 1 def =.Q 2 + c.q def =.Q 3 def =.Q + c.q 2. Show tht P Q holds y finding n pproprite strong isimultion. Exercise 1.7 Consider the following lelled trnsition system. s t u v s 1 t 1 u 1 u 2 v 1 v 2 s 2 t 2 u 3 v 3 Decide whether s? t, s? u, nd s? v. Support your clims y giving universl winning strtegy either for the ttcker (in the negtive cse) or the defender (in the positive cse). In the positive cse you cn lso define strong isimultion relting the pir in question. Exercise 1.8 Prove tht for ny CCS processes P nd Q the following lws hold: P Nil P P + Nil P Exercise 1.9 rgue tht ny two strongly isimilr processes hve the sme sets of trces, i.e., tht s t implies Trces(s) = Trces(t). Hint: you cn find useful the gme chrcteriztion of strong isimilrity. 4
Exercise 1.10 Is it true tht ny reltion R tht is strong isimultion must e reflexive, trnsitive nd symmetric? If yes then prove it, if not then give counter exmples, i.e. define n LTS nd inry reltion on sttes which is not reflexive ut it is strong isimultion define n LTS nd inry reltion on sttes which is not symmetric ut it is strong isimultion define n LTS nd inry reltion on sttes which is not trnsitive ut it is strong isimultion. Exercise 1.11 Find (one) lelled trnsition system with n initil stte s such tht it stisfies (t the sme time) the following properties: s = ( c tt c tt) s = ([]ff []ff [c]ff) s = [] ([c]ff tt) Exercise 1.12 ssume n ritrry CCS defining eqution K def = P where K is process constnt nd P is CCS expression. Prove tht K P. (Hint: y using SOS rules for CCS, exmine the possile trnsitions from K nd P.) Exercise 1.13 Decide whether the following clims re true or flse. Support your clims either y using isimultion gmes or directly the definition of strong/wek isimilrity..τ.nil? τ..nil τ.. +.B? τ.(. +.B) τ.nil + (.Nil.Nil) {, }? τ.nil.(τ.nil +.B)?.Nil +..B The sme processes ut wek isimilrity insted of the strong one..τ.nil? τ..nil τ.. +.B? τ.(. +.B) τ.nil + (.Nil.Nil) {, }? τ.nil.(τ.nil +.B)?.Nil +..B Hint: drw first the LTS generted y the CCS processes. Home exercise: try to verify your clims y using the tool CWB. 5
Exercise 1.14 Prove tht for ny CCS process P the following lw (clled idempotency) holds. P + P P By using the fct tht conclude tht lso P + P P. Exercise 1.15 Consider the tiny communiction protocol from Lecture 4. Drw the lelled trnsition system generted y the processes Spec nd Impl. Prove (y hnd) tht Spec Impl. Hint: define wek isimultion reltion contining (Spec, Impl). Exercise 1.16 Consider the following LTSs: Consider lso the following HML formuls: φ def = [](< > tt < c > tt) ψ def = [](< > tt < c > tt) ϕ def =< > []ff 1. Clculte [ φ ], [ ψ ] nd [ ϕ ] in the LTSs (1), (2), (3) nd (4). 2. Determine if p1 = φ, p1 = ψ, p1 = ϕ, q4 = φ, q4 = ψ, q4 = ϕ. 6
Exercise 1.17 Consider the following lelled trnsition system. s s 1 s 2 s 3 s 4 1. Decide whether the stte s stisfies the following formule of Hennessy-Milner logic: s? = tt s? = tt s? = []ff s? = []ff s? = [] tt s? = tt s? = [] [][]ff s? = ( tt tt ) s? = [] ( tt tt ) s? = ( [][]ff tt ) s? = ( []( tt []ff) ff ) 2. Compute the following sets ccording to the denottionl semntics for Hennessy-Milner logic. [[][]ff ] =? [ ( tt tt ) ] =? [[][][]ff ] =? [[] ( tt tt ) ] =? 7
Exercise 1.18 Consider the following lelled trnsition system. s t v s 1 t 1 v 1 v 2 s 2 t 2 v 3 It it true tht s t, s v nd t v. Find distinguishing formul of Hennessy-Milner logic for the pirs s nd t s nd v t nd v. Exercise 1.19 For ech of the following CCS expressions decide whether they re strongly isimilr nd if no, find distinguishing formul in Hennessy-Milner logic...nil +.Nil nd.(.nil +.Nil).(.c.Nil +.d.nil) nd..c.nil +..d.nil.nil.nil nd..nil +..Nil (.Nil.Nil) + c..nil nd.nil (.Nil + c.nil) Home exercise: verify your clims in CWB (use the strongeq nd checkprop commnds) nd check whether you found the shortest distinguishing formul (use the dfstrong commnd). Exercise 1.20 Prove tht for every Hennessy-Milner formul F nd every stte p Proc: p = F if nd only if p [F ]. Hint: use structurl induction on the structure of the formul F. 8
Exercise 1.21 Consider the following lelled trnsition system. s s 1 c s 3 s 2 Using the gme chrcteriztion for recursive Hennessy-Milner formule decide whether the following clims re true or flse nd discuss wht properties the formule descrie: s? = X where X min = c tt ct X s? = X where X min = c tt [ct]x s? = X where X mx = X s? = X where X mx = tt []X []X Exercise 1.22 Consider the following LTS: 1. (2 points) Tell whether or not s is strongly isimilr to t. Justify your nswer formlly. 2. (2 points) Tell whether or not t stisfies the formul [c] c tt. Justify your nswer formlly. 3. (3 points) Determine ll the sttes of the LTS tht stisfy the following formuls: [][c]ff [c]ff [c]tt 9
Solutions Solution of Exercise 1.1 We show tht s 1 t 1 using the gme chrcteriztion of isimilrity. In prticulr we show tht the ttcker hs the universl winning strtegy tht follows: 1. The configurtion of the gme is (s 1, t 1 ). The ttcker selects s 1 nd mkes the move: s 1 s 4. The Defender cn only reply mking the move t 1 t 2. 2. The configurtion of the gme is (s 4, t 2 ). The ttcker selects t 2 nd mkes the move: t 2 t 1. The Defender is stuck: there exists no stte s such tht s 4 s. We clculte the semntics of the three formuls in the given LTS. [] tt [] c tt = [] tt [] c tt = [ ]( tt) [ ]( c tt) = [ ]({s 2, s 3, t 2 }) [ ]({s 2, s 4, t 2, t 3 }) = {s 2, s 3, s 4, s 5, s 6, t 1, t 2, t 3, t 4 } {s 2, s 3, s 4, s 5, s 6, t 1, t 2, t 3, t 4 } = {s 2, s 3, s 4, s 5, s 6, t 1, t 2, t 3, t 4 } tt c [c]ff = tt c [c]ff = ( tt) c ( [c]ff) = ({s 2, s 3, t 2 }) c ( ([c]ff)) = {s 1, t 1 } c ( ({s 1, s 3, s 5, s 6, t 1, t 4 }) = {s 1, t 1 } c ({s 2, t 2 }) = {s 1, t 1 } {} = {s 1, t 1 } [][] c tt = [ ]([] c tt) = [ ]([ ]( c tt)) = [ ]([ ]({s 2, s 4, t 2, t 3 })) = [ ]({s 1, s 3, s 4, s 5, s 6, t 1, t 3, t 4 }) = {s 2, s 3, s 4, s 5, s 6, t 2, t 3, t 4 } Solution of Exercise 1.2 Consider the following lelled trnsition system. s s 1 s 2 Compute for which sets of sttes [X ] {s, s 1, s 2 } the following formule re true. X = tt []X The eqution holds for the following sets of sttes: {s 2, s}, {s 2, s 1, s}. X = tt ([]X tt) 10
The eqution holds only for the set {s 2 }. 11
Solution of Exercise 1.3 12
Solution of Exercise 1.4 13
Solution of Exercise 1.5 If we cn show tht R = {(s, t), (s 1, t 1 ), (s 3, t 2 ), (s 4, t 2 ), (s 2, t 3 ), (s 4, t 4 )} is strong isimultion, then s t. Indeed R is strong isimultion since: Consider (s, t) R. Trnsitions from s: If s s 1, mtch y doing t t 1, nd (s 1, t 1 ) R. If s s 2, mtch y doing t t 3, nd (s 2, t 3 ) R. These re ll trnsitions from s. Trnsitions from t: If t t 1, mtch y doing s s 1, nd (s 1, t 1 ) R. If t t 3, mtch y doing s s 2, nd (s 2, t 3 ) R. These re ll trnsitions from t. Consider (s 1, t 1 ) R. Trnsitions from s 1 : If s 1 s 3, mtch y doing t 1 t 2 nd (s 3, t 2 ) R. If s 1 s 4, mtch y doing t 1 t 2 nd (s 4, t 2 ) R. Trnsitions from t 1 : If t 1 t 2, mtch y doing s 1 s 3 nd (s 3, t 2 ) R. If t 1 t 2, mtch y doing s 1 s 4 nd (s 4, t 2 ) R. Consider (s 3, t 2 ) R. Trnsitions from s 3 : If s 3 s, mtch y doing t 2 t nd (s, t) R. Trnsitions from t 2 : If t 2 t, mtch y doing s 3 s nd (s, t) R. Consider (s 4, t 2 ) R. Trnsitions from s 4 : If s 4 s, mtch y doing t 2 t nd (s, t) R. Trnsitions from t 2 : If t 2 t, mtch y doing s 4 s nd (s, t) R. Consider (s 2, t 3 ) R. Trnsitions from s 2 : If s 2 s 4, mtch y doing t 3 t 4 nd (s 4, t 4 ) R. Trnsitions from t 3 : If t 3 t 4, mtch y doing s 2 s 4 nd (s 4, t 4 ) R. Consider (s 4, t 4 ) R. Trnsitions from s 4 : If s 4 s, mtch y t 4 t nd (s, t) R. Trnsitions from t 4 : If t 4 t, mtch y s 4 s nd (s, t) R. 14
Solution of Exercise 1.6 Let R = {(P, Q), (P 1, Q 1 ), (P, Q 2 ), (P 1, Q 3 )}. We only outline the proof; it follows long the lines s the proof in Exercise??. You should complete the detils. From (P, Q) R either P or Q cn do n trnsition. In either cse the response is to mtch y mking n trnsition from the remining stte, so we end up in (P 1, Q 1 ) R. From (P 1, Q 1 ) R we end up in either (P, Q) R or (P, Q 2 ) R. From (P, Q 2 ) R we cn only end up in (P 1, Q 3 ) R. From (P 1, Q 3 ) R we end up in either (P, Q) R or (P, Q 2 ) R. Solution of Exercise 1.7 In this exercise you re sked to trin yourself in the use of the gme chrcteriztion for strong isimultion. We therefore give universl winning strtegy for the ttcker or the defender in order to prove strong nonisimilrity or isimilrity. Let denote the ttcker nd D the defender. Clim: s t. The universl winning strtegy for is s follows. In configurtion (s, t), chooses s nd mkes the move s s 1. D s only possile response is to choose t nd mke the move t configurtion is now (s 1, t 1 ) In configurtion (s 1, t 1 ), chooses s 1 nd mkes the move s 1 s 2. t 1. The current Now the winning strtegy depends on D s next move nd is s follows. D cn only choose the stte t 1, ut hs two possile moves. Suppose D chooses t 1 t 1. Then the current configurtion ecomes (s 2, t 1 ). Now choose s 2 nd mkes the move s 2 s. Then D looses since there re no -trnsitions from t 1. If D uses the other possile move, nmely t 1 t 2, the current configurtion ecomes (s 2, t 2 ). But then chooses s 2 nd mkes the move s 2 s 2. gin D looses since there re no -trnsitions from t 2. Remrk: there is nother winning strtegy for the ttcker which is esier to descrie; try to find it. Clim: s u: The universl winning strtegy for D is s follows. Strting in (s, u), hs two possile moves. Either () s s 1 or () u u 1. If chooses (), then D tkes the move u (s 1, u 1 ). If chooses (), then D tkes the move s ecomes (s 1, u 1 ). u 1, nd the current configurtion ecomes s 1, nd the current configurtion gin In configurtion (s 1, u 1 ), cn choose either () s 1 s 2, or () u 1 u 3. If chooses (), then D tkes the move u 1 u 3, nd the current configurtion ecomes (s 2, u 3 ). If chooses (), then D tkes the move s 1 ecomes (s 2, u 3 ). 15 s 2, nd the current configurtion gin
In configurtion (s 2, u 3 ), cn choose either () s 2 s 2 or () s 2 u 2. or (d) u 3 If chooses (), then D tkes the move u 3 (s 2, u 2 ). If chooses (), then D tkes the move u 3 (s, u) which is exctly the strt configurtion. If chooses (c), then D tkes the move s 2 (s, u) which is the strt configurtion. s or (c) u 3 u u 2 nd the current configurtion ecomes u nd the current configurtion ecomes s nd the current configurtion ecomes If chooses (d), then D tkes the move s 2 s 2 nd the current configurtion ecomes (s 2, u 2 ) s when the ttcker plyed (). Hence from now we only need to consider gmes form the stte (s 2, u 2 ). Now we cn rgue tht D hs winning strtegy. From (s 2, u 2 ), D s response to ny move from will e to tke the sme trnsition. This mens tht the next configurtion is either (s 2, u 2 ) or (s, u). The gme will e infinite, nd hence D is the winner. Clim: s v: The universl winning strtegy for is s follows. In configurtion (s, v), mkes the move s s 1. Now D must mke the move v v 1 nd the current configurtion ecomes (s 1, v 1 ). In configurtion (s 1, v 1 ), chooses v 1 v 2. D must mke the move s 1 s 2. The current configurtion is (s 2, v 2 ). Now wins since from (s 2, v 2 ) s he cn choose to mke the move s 2 re no -trnsitions from v 2, D looses. s 2. Since there Solution of Exercise 1.8 The generl ide in this exercise is tht in order to prove tht P Q you define some inry reltion R such tht (P, Q) R, nd then proceed to prove tht R is indeed strong isimultion. Define R = {(P Nil, P ) P is CCS process}. We show tht R is strong isimultion. α Suppose for some α ct tht P Nil P Nil. We now hve to find some process P such tht P α P nd (P Nil, P ) R. Now use the trnsition reltion. The only rule tht could hve een used is the COM1-rule. α P P α P Nil P Nil Now set P = P. Then we re finished since we now know tht P of R, (P Nil, P ) = (P Nil, P ) R. Symmetriclly we must prove tht when P α P, then some P exists so tht P Nil nd ( P, P ) R. But this is esy. By using the COM1-rule we hve. α P nd y the definition α P α P P α P Nil P Nil. So we simply let P = P Nil. nd gin y definition of R, we hve tht ( P, P ) = (P Nil, P ) R. This proves tht R, is isimultion. nd since (P Nil, P ) R, this mens tht P Nil P. 16
This time we show tht P + Nil P y giving universl winning strtegy for the defender. Rememer tht the gme is plyed on the LTS, so we will just denote the sttes of the LTS y the CCS-expression. If the ttcker chooses P + Nil, then the only possile moves re those of P since Nil hs no trnsitions. So if P P, the ttcker cn mke the move P + Nil P. But then the defender cn mke the move P P. The current configurtion is now (P, P ). From now on the defenders strtegy is do to the sme s the ttcker. Either the gme is infinite, in which cse the defender wins. Or the gme is finite. But then the defender wins, since the ttcker cnnot mke ny move ecuse oth processes re stuck. Similrly if the ttcker plys P P. Then the defender moves P + Nil P, nd the configurtion gin ecomes (P, P ). We show now tht R = {(P Q, Q P ) P, QreCCS expressions} is strong isimultion. We only give n outline of the proof, the method is the sme s in the first ullet. Suppose P Q P Q. If COM3-rule ws pplied, we cn rgue s follows: P P Q Q P Q τ P Q But then since = we cn use the sme rule to derive: Q Q P P. Q P τ Q P nd y the definition of R, we know tht (P Q, Q P ) R. If COM1 or COM2 rule ws used, we do the following nlysis. Suppose the COM1-rule ws the one used. Then we know tht P P P Q P Q. gin one cn now pply the COM2-rule nd derive P Q P P, Q P nd (P Q, Q P ) R. In order to finish the proof we need to rgue for the symmmetric cse (i.e. when the rule COM2 ws used from P Q). The rgument for this cse is similr s efore. The cse when Q P Q P is completely symmetric. Solution of Exercise 1.9 ssume tht s t. We will show oth trce inclusions s follows. Trces(s) Trces(t): Let w = 1 2... n e trce from Trces(s). The ttcker will ply the sequence w in n-rounds of the strong isimultion gme, lwys from the left processes s. s s t, the defender hs to e le to nswer to such n ttck nd hence he hs to e le to do the sme sequence w from the right process t. This mens tht w Trces(t). Trces(t) Trces(s): The rgument is completely symmetric, the ttcker plys the whole sequence from the right process t nd the defender hs to e le to mtch it in the left process. 17
This implies tht Trces(s) = Trces(t). Solution of Exercise 1.10 The nswer is no for ll the cses nd the reltion R of strong isimultion from Exercise?? cn serve s counter exmple for reflexivity nd symmetry. Solution of Exercise 1.11 One possile solution is s follows. s s 1 c s 2 s 4 Solution of Exercise 1.12 Let K def = P. We define R = {(K, P )} {(P, P ) P is CCS process}. We will rgue tht R is strong isimultion. We nlyze only the pir (K, P ) from R s ny pir of the form (P, P ) cn e sfely dded to R (why?). Let K P. We must find P such tht P P nd (P, P ) R. The trnsition K P must hve een derived using the CON-rule with the premise P P. Then we cn just let P = P s we know tht P P, nd (P, P ) R. Let P P. Then using the SOS rule CON we know tht lso K P nd gin (P, P ) R. Solution of Exercise 1.13 Decide whether the following clims re true or flse. Support your clims either y using isimultion gmes or directly the definition of strong/wek isimilrity..τ.nil τ..nil The ttcker plys the ction in the left process nd the defender does not hve ny -move ville in the right process nd looses. τ.. +.B τ.(. +.B) The ttcker plys the ction from the left process, there is no ction ville in the right process in the first round. The ttcker clerly wins. τ.nil + (.Nil.Nil) {, } τ.nil 18
R = {(τ.nil + (.Nil.Nil) {, }, τ.nil), (Nil, Nil), ((Nil Nil) {, }, Nil)} is strong isimultion..(τ.nil +.B).Nil +..B In the first round the ttcker plys from the left the ction nd in the second round he plys gin from left the ction τ. The defender looses s he cn never ply the sme sequence of followed y τ from the right process. The sme processes ut wek isimilrity insted of the strong one..τ.nil τ..nil R = {(.τ.nil, τ..nil), (τ.nil, Nil), (Nil, Nil), (.τ.nil,.nil)} is wek isimultion. τ.. +.B τ.(. +.B) The ttcker plys the ction τ from the left nd reches the process.. The defender cn either nswer y (i) doing nothing on the right nd stying in the process τ.(. +.B) or (ii) y plying the ction τ nd reching. +.B. In cse (i) the ttcker will ply in second round on the right the ction τ, the defender cn only sty in. nd in the next round the ttcker wins y mking the -move on the right. In cse (ii) the ttcker wins lredy in the second round y plying from the right process. τ.nil + (.Nil.Nil) {, } τ.nil These two processes re even strongly isimilr so they must e lso wekly isimilr..(τ.nil +.B).Nil +..B The ttcker plys.nil +..B.B on the right, the defender cn nswer either y.(τ.nil +.B) = τ.nil +.B or y.(τ.nil +.B) = Nil. In the first cse the ttcker plys τ.nil +.B τ Nil nd the defender cn only do nothing nd will loose in the next round. In the second cse, the ttcker plys the ction from the left nd the defender looses. Home exercise: try to verify your clims y using the tool CWB. Solution of Exercise 1.14 We now rgue tht P + P P using the gme chrcteriztion. We strt from the configurtion (P + P, P ). Suppose the ttcker chooses P + P P. Then we know (from the SOS trnsition rules) tht this trnsition cn only hve een derived if P P. So, of course, the defender replies y doing P P. The current configurtion ecomes (P, P ) from which the defender lwys hs winning strtegy y simply doing exctly the sme s the ttcker. Conversely, if the ttcker from (P + P, P ) chooses P P then the defender responds y plying P + P P nd the current configurtion ecomes gin (P, P ). 19
Solution of Exercise 1.15 20
Solution of Exercise 1.16 21
22
23
24
Solution of Exercise 1.17 Consider the following lelled trnsition system. s s 1 s 2 s 3 s 4 1. Decide whether the stte s stisfies the following formule of Hennessy-Milner logic: s = tt s = tt s = []ff s = []ff s = [] tt s = tt s = [] [][]ff s = ( tt tt ) s = [] ( tt tt ) s = ( [][]ff tt ) s = ( []( tt []ff) ff ) 2. Compute the following sets ccording to the denottionl semntics for Hennessy-Milner logic. [[][]ff ] = [ ][[]ff ] = [ ][ ][ff ] = [ ][ ] = [ ]{P P.P P P } = [ ]{s, s 3, s 2, s 4 } = { P P.P P P {s, s 3, s 2, s 4 } } = {s 1, s 2, s 3, s 4 } [ ( tt tt ) ] = [ tt tt] = ( [ tt] [ tt] ) = ( Proc Proc) = ( {s, s 1, s 2, s 3, s 4 } {s 1 } ) = {s 1 } = {s} 25
[[][][]ff ] = [ ][ ][ ] = [ ][ ]{s, s 2, s 3, s 4 } = [ ]{s 1, s 2, s 3, s 4 } = {s, s 1, s 2 } [[] ( tt tt ) ] = [ ][ tt tt] = [ ] ( Proc Proc ) = [ ]{s, s 1, s 2, s 3, s 4 } = {s, s 1, s 2, s 3, s 4 } Solution of Exercise 1.18 Distingushing HML-formule re s follows. Let F 1 = [] tt. Then s = F 1, ut t = F 1. Let F 2 = [] tt. Then s = F 2 ut v = F 3. Let F 3 = ( tt tt ). Then t = F 3 ut v = F 3. Solution of Exercise 1.19 For ech of the following CCS expressions decide whether they re strongly isimilr nd if not, find distinguishing formul in Hennessy-Milner logic...nil +.Nil nd.(.nil +.Nil) They re not isimilr. Let F 1 = [] tt. Then..Nil+.Nil = F 1 ut.(.nil+.nil) = F 1..(.c.Nil +.d.nil) nd..c.nil +..d.nil They re not isimilr. Let F 2 = [] ( c tt d tt ). Then.(.c.Nil +.d.nil) = F 2 ut..c.nil +..d.nil = F 2..Nil.Nil nd..nil +..Nil They re isimilr. (.Nil.Nil) + c..nil nd.nil (.Nil + c.nil) They re not isimilr. Let F 3 = [] c tt. Then (.Nil.Nil)+c..Nil = F 3 ut.nil (.Nil+ c.nil) = F 3. Home exercise: verify your clims in CWB (use the strongeq nd checkprop commnds) nd check whether you found the shortest distinguishing formul (use the dfstrong commnd). 26
Solution of Exercise 1.21 Consider the following lelled trnsition system. s s 1 c s 3 s 2 Using the gme chrcteriztion for recursive Hennessy-Milner formule decide whether the following clims re true or flse nd discuss wht properties the formule descrie: s = X where X min = c tt ct X universl winning strtegy for the defender strting from (s, X) is s follows: (s, X) (s, c tt ct X) (s 1, c tt ct X) (s 2, c tt ct X) (s 3, c tt ct X) D D (s, ct X) (s 1, X) D D (s 1, ct X) (s 2, X) D D (s 2, ct X) (s 3, X) D D (s 3, c tt) (s, tt), where (s, tt) y definition is winning configurtion for the defender. s = X where X min = c tt [ct]x universl winning strtegy for the ttcker is s follows: (s, X) (s, c tt [ct]x) Then if the defender plys c tt, he loses since there re no c-trnsitions from s, thus the defender must D ply (s, c tt [ct]x) (s, [ct]x). Then the ttcker plys (s, [ct]x) (s 1, X). nd we hve (s 1, X) (s 1, c tt [ct]x). Now for similr resons s ove the defender D must choose to ply (s 1, c tt [ct]x) (s 1, [ct]x). The ttcker plys (s 1, [ct]x) (s 1, X) which is configurtion we hve seen erlier. Thus either the ply is infinite, in which cse the ttcker wins since X is defined s the lest fixed-point. Or the ply is finite, in which cse the ttcker lso wins. s = X where X mx = X universl winning strtegy for the defender is: (s, X) (s, X) D D (s 1, X) (s 1, X) (s 1, X). Thus the ply is infinite, nd since X is defined s the gretest fixed-point, the defender wins. s = X where X mx = tt []X []X Universl winning strtegy for the defender: We hve (s, X) (s, tt []X []X). Now if the ttcker plys (s, tt []X []X) (s, tt) he loses since the defender cn then ply D (s, tt) (s 1, tt). Furthermore if the ttcker plys (s, tt []X []X) (s, []X), then he lso loses since he is stuck in the configurtion (s, []X). The third option for the ttcker is to choose (s, tt []X []X) (s, []X) (s 1, X). Expnding X we get (s 1, X) (s 1, tt []X []X). From here if the ttcker plys D (s 1, tt []X []X) (s 1, tt) he loses since the defender cn ply (s 1, tt) (s 1, tt). 27
If the ttcker plys (s 1, tt []X []X) (s 1, []X), then the only possile next move is (s 1, []X) (s 1, X) which is previously encountered configurtion. The lst option for the ttcker is to ply (s 1, tt []X []X) (s 1, []X) (s 2, X). Expnding the encoding we get (s 2, X) (s 2, tt []X []X). gin if the ttcker plys D (s 2, tt []X []X) (s 2, tt) he loses y the defenders move (s 2, tt) (s 3, tt). If the ttcker plys (s 2, tt []X []X) (s 2, []X) he loses since he is stuck. Finlly he cn ply (s 2, tt []X []X) (s 2, []X) (s 3, X). Expnding X we otin (s 3, X) (s 3, tt []X []X). Now plying (s 3, tt []X D []X) (s 3, tt) he loses y the defenders move (s 3, tt) (s 3, tt). If the ttcker plys (s 3, tt []X []X) (s 3, []X) he is stuck. Finlly the ttcker cn ply (s 3, tt []X []X) (s 3, []X) (s 3, X) which is previously encountered configurtion. Thus either the ttcker loses in finite ply, or the ply is infinite in which cse the defender wins since X is defined s the gretest fixed-point. 28
Solution of Exercise 1.22 29
30
2 Wek Bisimultion Exercise 2.1 Consider the following lelled trnsition system. s τ s 1 τ s 2 t τ t 1 τ τ τ τ s 3 s 4 s 5 t 2 t 3 Show tht s t y finding wek isimultion R contining the pir (s, t). Exercise 2.2 In the wek isimultion gme the ttcker is llowed to use moves for the ttcks nd the defender cn use = in response. rgue tht if we modify the gme rules so tht the ttcker cn lso use the long moves = then this does not provide ny dditionl power for the ttcker. Conclude tht oth versions of the gme provide the sme nswer out isimilrity/nonisimilrity of two processes. 31
Solutions Solution of Exercise 2.1 Let R = {(s, t), (s 1, t), (s 2, t), (s 3, t 2 ), (s 4, t 3 ), (s 5, t 1 )}. Now one cn rgue tht R is wek isimultion s follows. Trnsitions from the pir (s, t): if s τ s 3 then t t = t nd (s 1, t) R. If t t 2 then s = s 3 nd (s 3, t 2 ) R. If t τ (s 4, t 3 ) R. If t t 1 then s = τ s 5 nd (s 5, t 1 ) R. = t 2 nd (s 3, t 2 ) R. If s t 3 then s The trnsitions from the remining pirs cn e checked in similr wy. τ s 1 then = s 4 nd Solution of Exercise 2.2 Oserve tht ech long ttck cn e simulted (in more rounds) y doing in series ll single steps tht re contined in the long move, so the defender in fct hs n nswer even to the long move y comining the nswers to the series 32
3 Complete Lttices nd Fix Points Exercise 3.1 Drw grphicl representtion of the complete lttice (2 {,,c}, ) nd compute supremum nd infimum of the following sets: {{}, {}} =? {{}, {}} =? {{}, {, }, {, c}} =? {{}, {, }, {, c}} =? {{}, {}, {c}} =? {{}, {}, {c}} =? {{}, {, }, {}, } =? {{}, {, }, {}, } =? Exercise 3.2 Prove tht for ny prtilly ordered set (D, ) nd ny X D, if supremum of X ( X) nd infimum of X ( X) exist then they re uniquely defined. (Hint: use the definition of supremum nd infimum nd ntisymmetry of.) Exercise 3.3 Let (D, ) e complete lttice. Wht re nd equl to? Exercise 3.4 Consider the complete lttice (2 {,,c}, ). Define function f : 2 {,,c} 2 {,,c} such tht f is monotonic. Compute the gretest fixed point y using directly the Trski s fixed point theorem. Compute the lest fixed point y using the Trski s fixed point theorem for finite lttices (i.e. y strting from nd y pplying repetedly the function f until the fixed point is reched). 33
Solutions Solution of Exercise 3.1 Drw grphicl representtion of the complete lttice (2 {,,c}, ) nd compute supremum nd infimum of the sets elow. The complete lttice: {,, c} {, } {, c} {, c} {} {} {c} {{}, {}} = {{}, {}} = {, } {{}, {, }, {, c}} = {} {{}, {, }, {, c}} = {,, c} {{}, {}, {c}} = {{}, {}, {c}} = {,, c} {{}, {, }, {}, } = {{}, {, }, {}, } = {, } Solution of Exercise 3.2 Prove tht for ny prtilly ordered set (D, ) nd ny X D, if supremum of X ( X) nd infimum of X ( X) exist then they re uniquely defined. (Hint: use the definition of supremum nd infimum nd ntisymmetry of.) We prove the clim for the supremum (lest upper ound) of X. The rguments for the infimum re symmetric. Let d 1, d 2 D e two supremums of given set X. This mens tht X d 1 nd X d 2 s oth d 1 nd d 2 re upper ounds of X. Now ecuse d 1 is the lest upper ound nd d 2 is n upper ound we get d 1 d 2. Similrly, d 2 is the lest upper ound nd d 1 is n upper ound so d 2 d 1. However, from ntisymmetry nd d 1 d 2 nd d 2 d 1 we get tht d 1 = d 2. 34
S f(s) {} {} {} {} {} {c} {} {,, c} {, } {, } {, } {, c} {, } {, c} {, } Tle 1: Definition of monotonic function f in Exercise??. Solution of Exercise 3.3 Let (D, ) e complete lttice. Wht re nd equl to? = = D. = = D. Solution of Exercise 3.4 Consider the complete lttice (2 {,,c}, ). Define function f : 2 {,,c} 2 {,,c} such tht f is monotonic. For exmple we define f s in Tle 1 (note tht there re mny possiilites). The function f is monotonic which we cn verify y cse inspection. Compute the gretest fixed point y using directly the Trski s fixed point theorem. ccording to Trski s fixed point theorem the lrgest fixed point z mx is given y z mx =, where = { x 2 {,,c} x f(x) }. In our cse, y the definition of f we get = {, {}, {, } }. The supremum of in 2 {,,c} is {, } so y Trski s fixed point theorem, the lrgest fixed point of f is {, }. Compute the lest fixed point y using the Trski s fixed point theorem for finite lttices (i.e. y strting from nd y pplying repetedly the function f until the fixed point is reched). First note tht = 2 {,,c} =. We now repetedly pply f until it stilizes f( ) f(f( )) = f({}) = {} = {} nd hence the lest fixed point of f is {}. 35