Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Size: px
Start display at page:

Download "Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford"

Transcription

1 Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford

2 Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs e.g. n lrm is only ever triggered by n error bd prefixes represented by regulr lnguge property lwys refuted by finite trce/pth Liveness properties e.g. "for every request, n cknowledge eventully follows no finite prefix refutes the property ny finite prefix cn be extended to stisfying trce Firness ssumptions e.g. every process tht is enbled infinitely often is scheduled infinitely often Need properties of infinite pths 2

3 Overview ω-regulr expressions nd ω-regulr lnguges Nondeterministic Büchi utomt (NBA) Deterministic Büchi utomt (DBA) Deterministic Rbin utomt (DRA) Deterministic ω-utomt nd DTMCs 3

4 ω-regulr expressions Regulr expressions E over lphbet Σ re given by: E ::= ɛ α E + E E.E E* (where α Σ) An ω-regulr expression tkes the form: G = E 1.(F 1 ) ω + E 2.(F 2 ) ω + + E n.(f n ) ω where E i nd F i re regulr expressions with ɛ L(F i ) The lnguge L(G) Σ ω of n ω-regulr expression G is L(E 1 ).L(F 1 ) ω L(E 2 ).L(F 2 ) ω + + L(E n ).L(F n ) ω where L(E) is the lnguge of regulr expression E nd L(E) ω = { w ω w L(E) } Exmple: (α+β+γ)*(β+γ) ω for Σ = { α, β, γ } 4

5 ω-regulr lnguges/properties A lnguge L Σ ω over lphbet Σ is n ω-regulr lnguge if nd only if: L = L(G) for some ω-regulr expression G ω-regulr lnguges re: closed under intersection closed under complementtion P (2 AP ) ω is n ω-regulr property if P is n ω-regulr lnguge over 2 AP (where AP is the set of tomic propositions for some model) pth ω stisfies P if trce(ω) P NB: ny regulr sfety property is n ω-regulr property 5

6 Exmples A messge is sent successfully infinitely often (( succ)*.succ) ω Every time the process tries to send messge, it eventully succeeds in sending it (( try)* + try.( succ)*.succ) ω 1 {fil} 0.5 s {try} s 0 s s {succ} 1 6

7 Büchi utomt A nondeterministic Büchi utomton (NBA) is tuple A = (Q, Σ, δ, Q 0, F) where: Q is finite set of sttes Σ is n lphbet δ : Q Σ 2 Q is trnsition function Q 0 Q is set of initil sttes F Q is set of ccept sttes i.e. just like nondeterministic finite utomton (NFA) The difference is the ccepting condition 7

8 Lnguge of n NBA Consider Büchi utomton A = (Q, Σ, δ, Q 0, F) A run of A on n infinite word α 1 α 2 is: n infinite sequence of utomt sttes q 0 q 1 such tht: q 0 Q 0 nd q i+1 δ(q i, α i+1 ) for ll i 0 An ccepting run is run with q i F for infinitely mny i The lnguge L(A) of A is the set of ll infinite words on which there exists n ccepting run of A 8

9 Exmple Infinitely often q 0 q 1 9

10 Exmple As in the lst lecture, we use utomt to represent lnguges of the form L (2 AP ) ω So, if AP = {,b}, then: is ctully: q 0 q 1 q 0 q 1, {b} {}, {,b}, {b} {}, {,b} 10

11 Properties of Büchi utomt ω-regulr lnguges L(A) is n ω-regulr lnguge for ny NBA A ny ω-regulr lnguge cn be represented by n NBA ω-regulr expressions like for finite utomt, cn construct n NBA from n rbitrry ω-regulr expression E 1.(F 1 ) ω + + E n.(f n ) ω i.e. there re opertions on NBAs to: construct NBA ccepting L ω for regulr lnguge L construct NBA from NFA for (regulr) E nd NBA for (ω-regulr) F construct NBA ccepting union L(A 1 ) L(A 2 ) for NBA A 1 nd A 2 11

12 Büchi utomt nd LTL LTL formule ψ ::= true ψ ψ ψ X ψ ψ U ψ where AP is n tomic proposition Cn convert ny LTL formul ψ into n NBA A over 2 AP i.e. ω ψ trce(ω) L(A) for ny pth ω LTL-to-NBA trnsltion (see e.g. [VW94], [DGV99]) construct generlized NBA (multiple sets of ccept sttes) bsed on decomposition of LTL formul into subformule cn convert GNBA into n equivlent NBA vrious optimistions to the bsic techniques developed not covered here; see e.g. section 5.2 of [BK08] 12

13 Büchi utomt nd LTL GF ( infinitely often ) q 0 q 1 G( F b) ( b lwys eventully follows ) b q 0 q 1 b b b 13

14 Deterministic Büchi utomt Like for finite utomt A NBA is deterministic if: Q 0 =1 δ(q, α) 1 for ll q Q nd α Σ i.e. one initil stte nd no nondeterministic successors A deterministic Büchi utomton (DBA) is totl if: δ(q, α) = 1 for ll q Q nd α Σ i.e. unique successor sttes But, NBA cn not lwys be determinised i.e. NBA re strictly more expressive thn DBA 14

15 NBA nd DBA NBA nd DBA for the LTL formul G b GF NBA: b q 0 q 1 b b b DBA: b q 0 q 1 b b b 15

16 No DBA possible Consider the ω-regulr expression (α+β)*α ω over Σ={α,β} i.e. words contining only finitely mny instnces of β there is no deterministic Büchi utomt ccepting this In prticulr, tke α = {} nd β =, i.e. Σ=2 AP, AP={} (α+β)*α ω represents the LTL formul FG FG is represented by the following NBA: q 0 q 1 q 2 true But there is no DBA for FG true 16

17 Deterministic Rbin utomt A deterministic Rbin utomton (DRA) is tuple A = (Q, Σ, δ, q 0, Acc) where: Q is finite set of sttes Σ is n lphbet δ : Q Σ Q is trnsition function q 0 Q is n initil stte Acc 2 Q 2 Q is n cceptnce condition The cceptnce condition is set of pirs of stte sets Acc = { (L i, K i ) 1 i k } 17

18 Deterministic Rbin utomt A run of word on DRA is ccepting iff: for some pir (L i, K i ), the sttes in L i re visited finitely often nd (some of) the sttes in K i re visited infinitely often or in LTL: Hence: deterministic Büchi utomton is specil cse of deterministic Rbin utomton where Acc = { (, {F}) } 18

19 FG NBA for FG (no DBA exists) q 0 q 1 q 2 true true DRA for FG q 0 q 1 where cceptnce condition is Acc = { ({q 0 },{q 1 }) } 19

20 Exmple - DRA Another exmple of DRA (over lphbet 2 {,b} ) q 0 b q 1 b where cceptnce condition is Acc = { ({q 1 },{q 0 }) } In LTL: G( F( b)) FG 20

21 Properties of DRA Any ω-regulr lnguge cn represented by DRA (nd L(A) is n ω-regulr lnguge for ny DRA A) i.e. DRA nd NBA re eqully expressive (but NBA my be more compct) nd DRA re strictly more expressive thn DBA Any NBA cn be converted to n equivlent DRA [Sf88] size of the resulting DRA is 2 O(nlogn) 21

22 Deterministic ω-utomt nd DTMCs Let A be DBA or DRA over the lphbet 2 AP i.e. L(A) (2 AP ) ω identifies set of pths in DTMC Let Prob D (s, A) denote the corresponding probbility from stte s in discrete-time Mrkov chin D i.e. Prob D (s, A) = Pr D s { ω Pth(s) trce(ω) L(A) } Like for finite utomt (i.e. DFA), we cn evlute Prob D (s, A) by constructing product of D nd A which records the stte of both the DTMC nd the utomton 22

23 Product DTMC for DBA For DTMC D = (S, s init, P, L) nd (totl) DBA A = (Q, Σ, δ, q 0, F) The product DTMC D A is: the DTMC (S Q, (s init,q init ), P, L ) where: q init = δ(q 0,L(s init )) L (s,q) = { ccept } if q F nd L (s,q) = otherwise Since A is deterministic unique mppings between pths of D, A nd D A probbilities of pths re preserved 23

24 Product DTMC for DBA For DTMC D nd DBA A Prob D (s, A) = Prob D A ((s,q s ), GF ccept) where q s = δ(q 0,L(s)) Hence: Prob D (s, A) = Prob D A ((s,q s ), F T GFccept ) where T GFccept = union of D A BSCCs T with T St(ccept) Reduces to computing BSCCs nd rechbility probbilities 24

25 Compute Prob(s 0, GF ) Exmple property cn be represented s DBA {b} s 0 s 1 s 2 s 3 s 4 s 5 {} {} {} 1 q 0 q 1 Result: 1 25

26 Exmple 2 Compute Prob(s 0, G b GF ) property cn be represented s DBA s 0 s 1 s {b} {} 1 b q 0 q 1 b b s 3 s 4 s 5 {} 1 {} b Result:

27 Product DTMC for DRA For DTMC D = (S, s init, P, L) nd (totl) DRA A = (Q, Σ, δ, q 0, Acc) where Acc = { (L i, K i ) 1 i k } The product DTMC D A is: the DTMC (S Q, (s init,q init ), P, L ) where: q init = δ(q 0,L(s init )) l i L (s,q) if q L i nd k i L (s,q) if q K i (i.e. stte sets of cceptnce condition used s lbels) (sme product s for DBA, except for stte lbelling) 27

28 Product DTMC for DRA For DTMC D nd DRA A Prob D (s, A) = Prob D A ((s,q s ), 1 i k (FG l i GF k i ) where q s = δ(q 0,L(s)) Hence: Prob D (s, A) = Prob D A ((s,q s ), F T Acc ) where T Acc is the union of ll ccepting BSCCs in D A n ccepting BSCC T of D A is such tht, for some 1 i k: q l i for ll (s,q) T nd q k i for some (s,q) T i.e. T (S L i ) = nd T (S K i ) Reduces to computing BSCCs nd rechbility probbilities 28

29 Compute Prob(s 0, FG ) Exmple 3 property cn be represented s DRA {b} s 0 s 1 s s 3 s 4 s 5 {} {} {} 1 q 0 q 1 Acc = { ({q 0 },{q 1 }) } Result:

30 Exmple 4 Compute Prob(s 0, G(b F( b )) FG b) property cn be represented s DRA s 0 s 1 s {b} {} s 3 s 4 s 5 1 q 0 b b b q 1 Acc = { ({q 1 },{q 0 }) } b {} 1 {} Result: 1 30

31 Summing up ω-regulr expressions nd ω-regulr lnguges lnguges of infinite words: E 1.(F 1 ) ω + E 2.(F 2 ) ω + + E n.(f n ) ω Nondeterministic Büchi utomt (NBA) ccepting runs visit stte in F infinitely often cn represent ny ω-regulr lnguge by n NBA cn trnslte ny LTL formul into equivlent NBA Deterministic Büchi utomt (DBA) strictly less expressive thn NBA (e.g. no NBA for FG ) Deterministic Rbin utomt (DRA) generlised cceptnce condition: { (L i, K i ) 1 i k } s expressive s NBA; cn convert ny NBA to DRA Deterministic ω-utomt nd DTMCs product DTMC + BSCC computtion + rechbility 31

Introduction to ω-autamata

Introduction to ω-autamata Fridy 25 th Jnury, 2013 Outline From finite word utomt ω-regulr lnguge ω-utomt Nondeterministic Models Deterministic Models Two Lower Bounds Conclusion Discussion Synthesis Preliminry From finite word

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

More information

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

More information

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

More information

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1 Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges

More information

Formal Methods in Software Engineering

Formal Methods in Software Engineering Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

More information

Good-for-Games Automata versus Deterministic Automata.

Good-for-Games Automata versus Deterministic Automata. Good-for-Gmes Automt versus Deterministic Automt. Denis Kuperberg 1,2 Mich l Skrzypczk 1 1 University of Wrsw 2 IRIT/ONERA (Toulouse) Séminire MoVe 12/02/2015 LIF, Luminy Introduction Deterministic utomt

More information

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

4 Deterministic Büchi Automata

4 Deterministic Büchi Automata Bernd Finkeiner Dte: April 26, 2011 Automt, Gmes nd Verifiction: Lecture 3 4 Deterministic Büchi Automt Theorem 1 The lnguge ( + ) ω is not recognizle y deterministic Büchi utomton. Assume tht L is recognized

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

On Determinisation of History-Deterministic Automata.

On Determinisation of History-Deterministic Automata. On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

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

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

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

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

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

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

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

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Automata, Games, and Verification

Automata, Games, and Verification Automt, Gmes, nd Verifiction Prof. Bernd Finkbeiner, Ph.D. Srlnd University Summer Term 2015 Lecture Notes by Bernd Finkbeiner, Felix Klein, Tobis Slzmnn These lecture notes re working document nd my contin

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

Deterministic Finite-State Automata

Deterministic Finite-State Automata Deterministic Finite-Stte Automt Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 12 August 2013 Outline 1 Introduction 2 Exmple DFA 1 DFA for Odd number of

More information

From LTL to Symbolically Represented Deterministic Automata

From LTL to Symbolically Represented Deterministic Automata Motivtion nd Prolem Setting Determinizing Non-Confluent Automt Det. vi Automt Hierrchy From LTL to Symoliclly Represented Deterministic Automt Andres Morgenstern Klus Schneider Sven Lmerti Mnuel Gesell

More information

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

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

Formal Language and Automata Theory (CS21004)

Formal Language and Automata Theory (CS21004) Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge

More information

Myhill-Nerode Theorem

Myhill-Nerode Theorem Overview Myhill-Nerode Theorem Correspondence etween DA s nd MN reltions Cnonicl DA for L Computing cnonicl DFA Myhill-Nerode Theorem Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Lecture 6 Regular Grammars

Lecture 6 Regular Grammars Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

Learning Moore Machines from Input-Output Traces

Learning Moore Machines from Input-Output Traces Lerning Moore Mchines from Input-Output Trces Georgios Gintmidis 1 nd Stvros Tripkis 1,2 1 Alto University, Finlnd 2 UC Berkeley, USA Motivtion: lerning models from blck boxes Inputs? Lerner Forml Model

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Converting Regular Expressions to Discrete Finite Automata: A Tutorial Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

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.

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. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

More information

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

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

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

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Relating logic to formal languages

Relating logic to formal languages Relting logic to forml lnguges Kml Lody The Institute of Mthemticl Sciences, Chenni October 2018 Reding 1. Howrd Strubing: Forml lnguges, finite utomt nd circuit complexity, birkhäuser. 2. Wolfgng Thoms:

More information

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

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

Streamed Validation of XML Documents

Streamed Validation of XML Documents Preliminries DTD Document Type Definition References Jnury 29, 2009 Preliminries DTD Document Type Definition References Structure Preliminries Unrnked Trees Recognizble Lnguges DTD Document Type Definition

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

7 Automata and formal languages. 7.1 Formal languages

7 Automata and formal languages. 7.1 Formal languages 7 Automt nd forml lnguges This exposition ws developed by Clemens Gröpl nd Knut Reinert. It is bsed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's Journl of utomt, Lnguges n Combintorics u (v) w, x{y c OttovonGuerickeUniversitt Mgeburg Tight lower boun for the stte complexity of shue of regulr lnguges Cezr C^mpenu, Ki Slom Computing n Informtion

More information

A From LTL to Deterministic Automata A Safraless Compositional Approach

A From LTL to Deterministic Automata A Safraless Compositional Approach A From LTL to Deterministic Automt A Sfrless Compositionl Approch JAVIER ESPARZA, Fkultät für Informtik, Technische Universität München, Germny JAN KŘETÍNSKÝ, IST Austri SALOMON SICKERT, Fkultät für Informtik,

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

Categorical approaches to bisimilarity

Categorical approaches to bisimilarity Ctegoricl pproches to bisimilrity PPS seminr, IRIF, Pris 7 Jérémy Dubut Ntionl Institute of Informtics Jpnese-French Lbortory for Informtics April 2nd Jérémy Dubut (NII & JFLI) Ctegoricl pproches to bisimilrity

More information

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

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Nondeterministic Biautomata and Their Descriptional Complexity

Nondeterministic Biautomata and Their Descriptional Complexity Nondeterministic Biutomt nd Their Descriptionl Complexity Mrkus Holzer nd Sestin Jkoi Institut für Informtik Justus-Lieig-Universität Arndtstr. 2, 35392 Gießen, Germny 23. Theorietg Automten und Formle

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

More information

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets Concepts of Concurrent Computtion Spring 205 Lecture 9: Petri Nets Sebstin Nnz Chris Poskitt Chir of Softwre Engineering Petri nets Petri nets re mthemticl models for describing systems with concurrency

More information

1 Structural induction

1 Structural induction Discrete Structures Prelim 2 smple questions Solutions CS2800 Questions selected for Spring 2018 1 Structurl induction 1. We define set S of functions from Z to Z inductively s follows: Rule 1. For ny

More information

1 Structural induction, finite automata, regular expressions

1 Structural induction, finite automata, regular expressions Discrete Structures Prelim 2 smple uestions s CS2800 Questions selected for spring 2017 1 Structurl induction, finite utomt, regulr expressions 1. We define set S of functions from Z to Z inductively s

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

FABER Formal Languages, Automata and Models of Computation

FABER Formal Languages, Automata and Models of Computation DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte

More information

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

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Wht problems cn we solve with computer? Regulr Lnguges CFLs Lnguges recognizble by ny fesible computing mchine All Lnguges Tht sme drwing, to scle. All Lnguges The Problem Finite

More information

Probabilistic model checking with PRISM

Probabilistic model checking with PRISM Probabilistic model checking with PRISM Marta Kwiatkowska Department of Computer Science, University of Oxford IMT, Lucca, May 206 Lecture plan Course slides and lab session http://www.prismmodelchecker.org/courses/imt6/

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

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

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7 CS103 Hndout 32 Fll 2016 Novemer 11, 2016 Prolem Set 7 Wht cn you do with regulr expressions? Wht re the limits of regulr lnguges? On this prolem set, you'll find out! As lwys, plese feel free to drop

More information

Some Theory of Computation Exercises Week 1

Some Theory of Computation Exercises Week 1 Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

DFA Minimization and Applications

DFA Minimization and Applications DFA Minimiztion nd Applictions Mondy, Octoer 15, 2007 Reding: toughton 3.12 C235 Lnguges nd Automt Deprtment of Computer cience Wellesley College Gols for ody o Answer ny P3 questions you might hve. o

More information

LTL Translation Improvements in Spot

LTL Translation Improvements in Spot LTL Trnsltion Improvements in Spot Alexndre Duret-Lutz http://www.lrde.epit.fr/~dl/ VECoS'11 16 September 2011 Alexndre Duret-Lutz LTL Trnsltion Improvements 1 / 19 Context High-level

More information