System Validation (IN4387) November 2, 2012, 14:00-17:00

Similar documents
Bisimulation, Games & Hennessy Milner logic

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.

CS 573 Automata Theory and Formal Languages

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Section 1.3 Triangles

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Chapter 4 State-Space Planning

Nondeterministic Finite Automata

Homework 3 Solutions

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

Behavior Composition in the Presence of Failure

Coalgebra, Lecture 15: Equations for Deterministic Automata

, g. Exercise 1. Generator polynomials of a convolutional code, given in binary form, are g. Solution 1.

NON-DETERMINISTIC FSA

Finite Automata-cont d

Transition systems (motivation)

Solutions to Assignment 1

Polynomials. Polynomials. Curriculum Ready ACMNA:

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

QUADRATIC EQUATION. Contents

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

Convert the NFA into DFA

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

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

Regular languages refresher

Chapter 2 Finite Automata

Lecture 6: Coding theory

Algebra 2 Semester 1 Practice Final

Non Right Angled Triangles

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Lecture 3: Equivalence Relations

Exercises with (Some) Solutions

Regular expressions, Finite Automata, transition graphs are all the same!!

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Minimal DFA. minimal DFA for L starting from any other

Algorithm Design and Analysis

Formal Languages and Automata

PAIR OF LINEAR EQUATIONS IN TWO VARIABLES

Implication Graphs and Logic Testing

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

Nondeterminism and Nodeterministic Automata

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

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

Bases for Vector Spaces

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Probability. b a b. a b 32.

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

1 This diagram represents the energy change that occurs when a d electron in a transition metal ion is excited by visible light.

A Study on the Properties of Rational Triangles

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

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.

Automata and Regular Languages

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

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.

QUADRATIC EQUATION EXERCISE - 01 CHECK YOUR GRASP

Math 4310 Solutions to homework 1 Due 9/1/16

Discrete Structures Lecture 11

Unit 4. Combinational Circuits

Algorithm Design and Analysis

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

THE PYTHAGOREAN THEOREM

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

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

CS 330 Formal Methods and Models

Alpha Algorithm: Limitations

= state, a = reading and q j

Finite State Automata and Determinisation

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

p-adic Egyptian Fractions

Functions. mjarrar Watch this lecture and download the slides

UNIT 31 Angles and Symmetry: Data Sheets

AP CALCULUS Test #6: Unit #6 Basic Integration and Applications

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

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

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

Exercise sheet 6: Solutions

Exercise 3 Logic Control

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

CHENG Chun Chor Litwin The Hong Kong Institute of Education

1 Nondeterministic Finite Automata

SWEN 224 Formal Foundations of Programming WITH ANSWERS

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

Linear Algebra Introduction

CS 491G Combinatorial Optimization Lecture Notes

Part I: Study the theorem statement.

Chapter Gauss Quadrature Rule of Integration

MAT 403 NOTES 4. f + f =

KENDRIYA VIDYALAYA IIT KANPUR HOME ASSIGNMENTS FOR SUMMER VACATIONS CLASS - XII MATHEMATICS (Relations and Functions & Binary Operations)

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

12.4 Similarity in Right Triangles

Geometry of the Circle - Chords and Angles. Geometry of the Circle. Chord and Angles. Curriculum Ready ACMMG: 272.

CS241 Week 6 Tutorial Solutions

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

Thermodynamics. Question 1. Question 2. Question 3 3/10/2010. Practice Questions PV TR PV T R

Transcription:

System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise 1 (20 points) In eh of the following item determine whether the speified notion of equivlene holds etween the two given leled trnsition systems. For eh nd every item provide omplete line of resoning why ertin equivlene does or does not hold: 1. Strong isimilrity: 2. Brnhing isimilrity: 3. Strong isimilrity: 4. Brnhing isimilrity: d d e f f e 1

2 Answer 1 1. No. They re not isimilr. Assume tht they were imisimilr, then there would exist isimultion reltion whih reltes the initil sttes. Then, the first trnsition on the left-hnd-side LTS n only e mimiked y the only initil trnsition on the righ-hnd side. Hene, the trget of the two trnsition hve to e relted in the sme reltion. However, this nnot e the se sine the stte in the left-hnd-side n do trnsition, while the right-hnd-side one nnot mimi it. Note tht strong isimilrity does not ignore trnsitions. 2. Yes, they re. A rnhing isimultion reltion relting the initil sttes is given elow: 3. No, they re not isimilr. Assume tht they were isimilr, then there would exist isimultion reltion whih reltes the initil sttes. The loop in the initil stte of the right-hnd-side (rhs) LTS should e mimiked y n trnsition in the left-hnd-side (lhs) one. Assume tht the ltter trnsition is the strt of tre of size n (for some ritrry n); then it follows tht the initil stte of the rhs LTS should e isimilr to the seond stte of this tre. The initil stte of the rhs LTS n do n -loop, nd this n only e mimiked y the seond stte in the tre of size n y performing n trnsition into the third stte in the tre. Hene, the initil stte of the rhs LTS should e relted to the third stte in the tre. Repeting this exerise on the seond to the n-th stte in the tre, will led to the onlusion tht the lst stte in the tre of size n, should e isimilr to the initil stte of the rhs LTS, whih is lerly not true, euse the lst stte of the tre dedloks, while the initil stte of the rhs LTS n still perform trnsitions. 4. No, they re not isimilr. Assume tht they were isimilr, then there would exist isimultion reltion whih reltes the initil sttes. The initil stte of the lhs LTS n mke n trnsition to the left. This n e mimiked y the initil stte of the rhs LTS: Either the initil stte of the rhs LTS mkes the trnsition to the left, then the sttes to the left of the initil sttes in the lhs nd rhs LTSs should e relted. Consider for exmple the ltter stte in the lhs LTS; it n perform trnsition; this n e mimiked in the orresponding stte in the rhs LTS y performing the only enled trnsition. Hene, the trgets of the two trnsitions should e relted y the sme isimultion reltion. However, the ltter sttes nnot e isimilr euse the lhs stte n perform n e trnsition, whih nnot e mimiked y the rhs stte nd likewise, the rhs n perform n f trnsition, whih nnot e mimiked y the lhs stte. Or the initil stte of the rhs LTS mkes the trnsition to the right, then the stte to the left of the initil stte of the lhs LTS should e relted to the stte to the right of the initil stte of the rhs LTS. This nnot e true however, sine the former stte n perform trnsition, whih nnot e mimiked y the ltter stte (nd likewise, the ltter stte performs d trnsition, whih nnot e performed y the former stte).

3 Exerise 2 (20 points) Consider the following two modl formule: nd [request] true response true [request](µx. true true [response]x) 1. Explin in words wht eh of the two formule mens. (10 points) 2. Give leled trnsition system in whih one of the two formule holds nd the other one doe not hold. (It does not mtter whih one you hoose to hold.) (10 points) Answer 2 1. The first formul sttes tht fter eh request, there is t lest one pth leding to response. (There my e other pths not leding to response.) The seond formul sttes tht fter eh request, eh pth will eventully reh response tion. (No pth n void doing response.) 2. The following LTS stisfies the first formul ut not the seond, sine it n void the response y tking the trnsition infinitely mny times. It lso does not stisfy the seond formul, euse it hs pth (strting with ) whih n void the response ltogether. request response

4 Exerise 3 (20 points) Define sort (dt type) ToDoList, where eh element of this sort is either the empty list, or non-empty list of prioritized tsks. A prioritized tsk is pir (i, t) where i is positive nturl numer determining the priority nd t is n element of sort T sk, whih ontins onstnt (onstrutor) not sk nd is not speified ny further. Give the forml definition of T odolist nd its onstrutors. (5 points) Define funtion (mp) todonow, whih tks T odolist s its prmeter, nd returns the tsk with the highest priority in the list, if it is non-empty, or not sk, otherwise. If needed, you my define nd use other uxiliry funtions used in the definition of todonow. (15 points) Answer 3 sort Tsk ; sort todolist = List(Nt#Tsk); ons notsk: Tsk; mp minpr: todolist Nt; todonow: todolist todolist; vr i, j: Nt; t : Tsk; l : todolist; eqn minpr([])= 0; (1) minpr((i,t) l ) = min(i, minpr(l)); todonow((i,t) l ) = if (minpr(l) >= i, t, todonow(l)) ; todonow( [] ) = notsk ;

5 Exerise 4 (20 points) Prove the following equtions using the xioms provided in the ppendix. Mention the nme of the xiom used for eh nd every step. 1. ((1) (2)) \ ((2) (3)) = (1) (2) (5 points), 2. ( + ) δ = δ + δ (5 points), nd 3. ( d) (Hint x y if nd only if x + y = y) (10 points). Answer 4 1. 2. ((1) (2)) \ ((2) (3)) = (MD3) (((1) (2)) \ (2)) \ (3) = (MD5) ((1) ((2) \ (2))) \ (3) = (MA3) ((1) (((2) ) \ (2))) \ (3) = (MA3) ((1) ((2) ( \ (2)))) \ (3) = (MD1) ((1) ((2) )) \ (3) = (MA3) ((1) (2)) \ (3) = (MD5) (1) ((2) \ (3)) = (MA3) (1) (((2) ) \ (3)) = (MD5) (1) ((2)) ( \ (3))) = (MD1) (1) ((2)) ) = (MA3) (1) (2) ( + ) δ = (M) (( + ) T δ) + (δ T ( + ) ) + (( + ) δ) = (A4) (( + ) T δ) + (δ T ( + ) ) + (( + ) δ) = (LM4) ( T δ) + ( T δ) + (δ T ( + ) ) + (( + ) δ) = (LM2) 2 ( δ) + ( δ) + (δ T ( + ) ) + (( + ) δ) = (LM2) ( δ) + ( δ) + δ + (( + ) δ) = (LM2) ( δ) + ( δ) + (( + ) δ) = (LM2) 2 ( δ) + ( δ) + (( + ) δ) = (LM2) 2 ( δ) + ( δ) + ( ) δ + ( ) δ = (LM2) 2 ( δ) + ( δ) + ( δ) + ( δ) = (LM2) 2 ( δ) + ( δ) + δ + δ = (LM2) 2 ( δ) + ( δ) + δ + δ = (LM2) 2 ( δ) + ( δ) = (M) 2 ( T δ + δ T + δ) + ( T δ + δ T + δ) = (M) 2 ( δ + δ T + δ) + ( δ + δ T + δ) = (LM1) 2 ( δ + δ T + δ) + ( δ + δ T + δ) = (LM2) 2 ( δ + δ + δ) + ( δ + δ + δ) = (A6) 2 ( δ + δ) + ( δ + δ) = (S4) 2 ( δ + δ) + ( δ + δ) = (A6) 2 ( δ) + ( δ) = (A6) 2 3. ( d), whih mens tht we hve to prove = + ( d). We do this y indution (se nlysis) on the oolen vrile d:

6 Either d = true, then we hve: Either d = flse, then we hve: + ( d) = d = true + ( true) = logi + = (A3) + = (A3) + ( flse) = d = flse + ( flse) = logi + f lse = (ond2) + δ = (A3)

7 Exerise 5 (20 points) Speify the following system of two prllel proesses: The first proess represents temperture sensor, whih n issue two types of tions: snd temp(n) nd snd d efet. The sensor n send ny nturl numer etween 0 nd 200 s the prmeter of snd temp nd my non-deterministilly hoose to send the snd def et signl, fter whih it dedloks. The seond proess represents thermostt, whih reeives temperture from the sensor nd if the reeived vlue is in the rnge 0 nd 50 it issues tion on to the outside world; if the vlue is etween 50 nd 100 it sends tion off to the outside world; if the reeived vlue is outside these rnges it ignores the vlue, ut keeps on listening to the sensor t ny se. Upon synhronizing with snd defet, the thermostt will issue n lrm tion nd terminte. The tion nmes tht re not speified in the ove-given desription n e hosen freely. Answer 5 t snd temp, rv temp, syn temp : Nt; snd defet, rv defet, syn defet,, on, off ; pro Sensor = snd defet delt + sum n : Nt. (n 200) snd temp(n) Sensor ; Thermostt = rv defet lrm + sum n : Nt. rv temp(n). (n 50) on. Thermostt ( (n 100) off. Thermostt Thermostt ) ; init llow ( { syn temp, syn defet, on, off, lrm }, ( omm { snd temp rv temp syn temp, snd defet rv defet syn defet }, Sensor Thermostt )) ;

8 MA1 MA2 MA3 α β = β α (α β) γ = α (β γ) α = α MD1 \ α = MD2 α \ = α MD3 α \ (β γ) = (α \ β) \ γ MD4 ((d) α) \ (d) = α MD5 ((d) α) \ (e) = (d) (α \ (e)) if or d e MS1 α = true MS2 = flse MS3 (d) α (d) β = α β MS4 (d) α (e) β = (d) (α \ (e)) β if or d e MAN1 MAN2 MAN3 = (d) = α β = α β Tle 1: Axioms for multi-tions Note tht (d) nd (e) rnge over (prmeterized) tions, α nd β rnge over (multi)tions nd x, y nd z rnge over proesses.

9 A1 A2 A3 A4 A5 A6 A7 Cond1 Cond2 SUM1 SUM3 SUM4 SUM5 x + y = y + x x + (y + z) = (x + y) + z x + x = x (x + y) z = x z + y z (x y) z = x (y z) x + δ = x δ x = δ true x y = x flse x y = y d:d x = x d:d X(d) = X(e) + d:d X(d) d:d (X(d) + Y (d)) = d:d X(d) + d:d Y (d) ( d:d X(d)) y = d:d X(d) y Tle 2: Axioms for the si opertors M x y = x T y + y T x + x y LM1 α T x = α x LM2 δ T x = δ LM3 α x T y = α (x y) LM4 (x + y) T z = x T z + y T z LM5 ( d:d X(d)) T y = d:d X(d) T y S1 x y = y x S2 (x y) z = x (y z) S3 x = x S4 α δ = δ S5 (α x) β = α β x S6 (α x) (β y) = α β (x y) S7 (x + y) z = x z + y z S8 ( d:d X(d)) y = d:d X(d) y TC1 (x T y) T z = x T (y z) TC2 x T δ = x δ TC3 (x y) T z = x (y T z) Tle 3: Axioms for the prllel omposition opertors