Exercises with (Some) Solutions

Similar documents
Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Coalgebra, Lecture 15: Equations for Deterministic Automata

1 Nondeterministic Finite Automata

More on automata. Michael George. March 24 April 7, 2014

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Lecture 3: Equivalence Relations

Convert the NFA into DFA

Designing finite automata II

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

p-adic Egyptian Fractions

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

set is not closed under matrix [ multiplication, ] and does not form a group.

Lecture 09: Myhill-Nerode Theorem

Quadratic Forms. Quadratic Forms

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

2.4 Linear Inequalities and Interval Notation

Summer School Verification Technology, Systems & Applications

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

MTH 505: Number Theory Spring 2017

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Minimal DFA. minimal DFA for L starting from any other

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Homework Solution - Set 5 Due: Friday 10/03/08

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

(e) if x = y + z and a divides any two of the integers x, y, or z, then a divides the remaining integer

Parse trees, ambiguity, and Chomsky normal form

Review of Gaussian Quadrature method

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

A study of Pythagoras Theorem

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Lecture 2: January 27

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

1 From NFA to regular expression

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

20 MATHEMATICS POLYNOMIALS

Finite Automata-cont d

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

CM10196 Topic 4: Functions and Relations

Harvard University Computer Science 121 Midterm October 23, 2012

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Homework 3 Solutions

Handout: Natural deduction for first order logic

3 Regular expressions

1B40 Practical Skills

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

Improper Integrals, and Differential Equations

The Regulated and Riemann Integrals

Review: set theoretic definition of the numbers. Natural numbers:

Bases for Vector Spaces

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Lecture 3: Curves in Calculus. Table of contents

Beginning Darboux Integration, Math 317, Intro to Analysis II

Physics 116C Solution of inhomogeneous ordinary differential equations using Green s functions

Nondeterminism and Nodeterministic Automata

CS 275 Automata and Formal Language Theory

Bisimulation, Games & Hennessy Milner logic

Things to Memorize: A Partial List. January 27, 2017

Bridging the gap: GCSE AS Level

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

Lecture 9: LTL and Büchi Automata

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Formal languages, automata, and theory of computation

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Worked out examples Finite Automata

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

Linear Systems with Constant Coefficients

Lecture 08: Feb. 08, 2019

CS 330 Formal Methods and Models

September 13 Homework Solutions

Lecture 1. Functional series. Pointwise and uniform convergence.

Boolean Algebra. Boolean Algebra

Second Lecture: Basics of model-checking for finite and timed systems

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Designing Information Devices and Systems I Spring 2018 Homework 7

The Dirichlet Problem in a Two Dimensional Rectangle. Section 13.5

Chapter 2 Finite Automata

Mathematics Number: Logarithms

QUADRATIC RESIDUES MATH 372. FALL INSTRUCTOR: PROFESSOR AITKEN

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Name Ima Sample ASU ID

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Finite state automata

State Minimization for DFAs

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

CSE396 Prelim I Answer Key Spring 2017

Polynomials and Division Theory

Hennessy-Milner Logic 1.

Improper Integrals. Introduction. Type 1: Improper Integrals on Infinite Intervals. When we defined the definite integral.

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Chapter 14. Matrix Representations of Linear Transformations

Section 4: Integration ECO4112F 2011

Transcription:

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