Automata, Games, and Verification

Size: px
Start display at page:

Download "Automata, Games, and Verification"

Transcription

1 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 errors. The current version of this document is vilble t: Plese report ny bugs, comments nd ides for improvement to

2

3 Contents 1 Introduction Model Checking Synthesis The Logic-Automt Connection Büchi Automt Preliminries Automt over Infinite Words The Büchi Acceptnce Condition Büchi s Chrcteriztion Theorem Kleene s Theorem ω-regulr Lnguges Closure Properties of the Büchi-Recognizble Lnguges Büchi s Chrcteriztion Theorem Deterministic Büchi Automt 15 5 Complementtion of Büchi Automt 19 6 McNughton s Theorem The Muller Acceptnce Condition From Nondeterministic to Semi-Deterministic Automt From Semi-Deterministic Büchi to Deterministic Muller Sfr s Construction Logics over Infinite Sequences Liner-time Temporl Logic (LTL) Quntified Propositionl Temporl Logic (QPTL) Mondic Second-Order Logic of One Successor (S1S) Wek Mondic Second-Order Logic of One Successor (WS1S) Alternting Büchi Automt Alternting Automt From LTL to Alternting Automt Trnslting Alternting to Nondeterministic Automt Infinite Gmes Bsic Definitions Rechbility Gmes Büchi Gmes Prity Gmes Rbin s Theorem Tree Automt Complementtion of Prity Tree Automt Mondic Second-Order Logic of Two Successors (S2S) Computtion Tree Logic CTL Alternting Tree Automt From CTL to Alternting Tree Automt

4 12 Summry Automt Chrcteriztion Theorems Trnslting Brnching Modes Trnslting Acceptnce Conditions Automt nd Gmes Determincy Logics Model Checking nd Synthesis

5 1 Introduction The theory of utomt over infinite objects provides succinct, expressive nd forml frmework for resoning bout rective systems, such s communiction protocols nd control systems. Rective systems re chrcterized by their nonterminting behviour nd persistent interction with their environment. In this course we study the min ingredients of this elegnt theory, nd its ppliction to utomtic verifiction (model checking) nd progrm synthesis. 1.1 Model Checking In model checking, we check utomticlly nd exhustively whether given system model meets its specifiction. Typicl exmples for specifictions re the ccessibility nd mutul exclusion properties of certin criticl regions. Automt over infinite objects re used both to represent the system nd to represent the specifiction. The verifiction problem cn be solved by constructing the intersection of the system utomton with n utomton for the negtion of the specifiction, nd then checking whether the lnguge of the resulting utomton is empty. Exmple 1.1. Mutul execution with progrm turn locl t: boolen where initilly t = 0 loop forever do loop forever do P 0 :: 00 : wit t = 0; 01 : criticl; P 1 :: 00 : wit t = 1; 01 : criticl; 10 : t := 1; 10 : t := 0; Progrm turn is (very) simple solution to the mutul exclusion problem: it ensures tht, t ny given point of time, t most one process is in the criticl region. The following is representtion of the behvior of turn s n utomton: s 0 s 1 s 2 s s s s 4 The lphbet of the utomton consists of bitvectors of length 5, where the first two bits represent the loction of process P 0, the next two bits the loction of process P 1, nd the finl bit the vlue of t. The utomton is sfety utomton (more bout this lter), it ccepts ll infinite repetitions of the sequence In order to verify tht turn stisfies the mutul exclusion property (P 0 nd P 1 re never in loction 01 t the sme time), we build n utomton tht represents the negtion (eventully P 0 nd P 1 re simultneously in loction 01): 01010, t 0 t 1 1

6 This utomton is Büchi utomton with ccepting stte t 1. A word is ccepted if t 1 is visited infinitely often (more bout this lter). It is esy to see tht for every word ccepted by the system utomton, the property utomton stys in t 0 forever nd therefore does not ccept the word. This mens tht there does not exist n infinite sequence of bitvectors tht is both generted by the progrm nd ccepted by the utomton representing the negtion of the specifiction. In other words, turn is correct. 1.2 Synthesis In synthesis, we check utomticlly if there exists progrm tht stisfies given specifiction. If the nswer is yes, we lso construct such progrm. The synthesis problem cn be solved by determining the winner of two-plyer gme between system plyer nd n environment plyer. The system plyer wins ply if the specifiction is stisfied. A winning strtegy for the system plyer cn be trnslted into progrm tht is gurnteed to stisfy the specifiction. Exmple 1.2. Mutul execution by rbitrtion P 0 :: locl t 0, t 1 : boolen where initilly t 0 = t 1 = 0 loop [ forever do ] loop [ forever do 0 : wit t0 = 1 P 1 :: 0 : wit t1 = 1 1 : criticl; 1 : criticl; ] Arbiter::? In this exmple, the implementtion of the rbiter process is left open. We wish to find n implementtion tht gurntees certin desirble properties such s mutul exclusion. We build gme ren where, in ech round, first the system plyer fixes the output t 1 nd t 2 of the rbiter process nd then the environment plyer mkes move in processes P 0 or P 1, resolving ny nondeterminism, such s whether P 0 or P 1 enters the criticl section if both re in loction 0 nd both t 0 nd t 1 hve been set to 1 by the rbiter We depict sttes in which the system plyer gets to chose the next move with circles, nd sttes in which the environment plyer gets to chose the next move with rectngles. The 2

7 sttes of the system plyer consist here of ll possible combintions of loctions of processes P 0 nd P 1, i.e., bitvectors of length 2, where the first bit indictes the loction of P 0, nd the second bit indictes the loction of P 1. The sttes of the environment plyer re bitvectors of length 4, where the dditionl third nd forth bit represent the vlues of t 0 nd t 1, respectively, tht were chosen by the system plyer in the previous move. Suppose now tht our specifiction consists gin of the mutul exclusion property, i.e., we wish to ensure tht stte 11 is never visited. Our gme is now sfety gme, which consists of gme ren nd set of sfe sttes (more bout this lter). Here, the sfe sttes re ll sttes except 11. The system plyer wins ll plys in which the gme stys in the sfe sttes forever. Note tht the system plyer hs very simple strtegy to win ny gme tht strts in stte 00: simply choose the move to stte 0000, i.e., block both processes. This rbiter is indeed correct, t lest with respect to the mutul exclusion property! More comprehensive specifictions led to more interesting winning strtegies nd more useful synthesized progrms. We might, for exmple, require tht every process visits its criticl section infinitely often, i.e., the ply must visit sttes 10 or 11 infinitely often, nd lso sttes 01 or 11 infinitely often. A winning strtegy for the system plyer might then, for exmple, lternte between 0010 nd 0001 in subsequent visits to 00, nd choose 1000 from 10, nd 0100 from 01, in order to void visits to The Logic-Automt Connection In pplictions like verifiction nd synthesis, the utomt- nd gme-theoretic mchinery is usully hidden behind logicl formultion of the problem. For exmple, we might express the mutul exclusion property s formul of liner-time temporl logic (LTL) such s (t 1 (P 0 ) t 1 (P 1 )). The verifiction or synthesis lgorithm then relies on trnsltion of the formul into n equivlent utomton, nd, for synthesis, on further trnsltion into gme. The following picture shows some useful logics together with their corresponding utomt: LTL S1S word utomt CTL CTL* S2S tree utomt Liner-time temporl logic (LTL) describes sets of infinite words. Exmple: t 1 (P 0 ), mening tht P 0 is infinitely often t loction 1. Computtion-tree logic (CTL / CTL*) describes sets of infinite trees. Exmple: EF t 1 (P 0 ) EF t 1 (P 1 ), mening tht there exists computtion pth in which P 0 reches loction 1, nd there is (possibly different) computtion pth in which P 1 reches loction 1. Mondic second-order logic with one successor (S1S) is logic over infinite words. Its expressiveness exceeds tht of LTL. Exmple: x. x P S(x) P, mening tht (given) set of nturl numbers P is either empty or consists of ll positions strting from some position of the word. Mondic second-order logic with two successors (S2S) is logic over binry trees. Its expressiveness exceeds tht of CTL* (on binry trees). Exmple: x. x P S 1 (x) P S 2 (x) P, mening tht (given) set of nodes P contins from ech node n P n entire pth strting in n. 3

8 Besides verifiction nd synthesis, n immedite nd very importnt ppliction of the connection between logic nd utomt is to decide the stisfibility problem of the vrious logics. Exmple 1.3. Suppose we wish to know if there exist two nturl numbers x nd y such tht x = y + 1 nd y = x + 1. This is expressed s the S1S formul x = S(y) y = S(x). We trnslte ech conjunct into n utomton: {y} {x} s 0 s 1 s 2 {x} {y} s 0 s 1 s 2 Here the lphbet consists of subsets of {x, y}. A vrible ppers t exctly one position in word, nmely t the position tht corresponds to its vlue. It is esy to see tht there does not exist word tht is ccepted by both utomt. Hence, our formul is unstisfible. 4

9 2 Büchi Automt We now introduce our first type of utomt over infinite words. Büchi utomt re nmed fter Julius Richrd Büchi, Swiss logicin nd mthemticin ( 1924, 1984). Büchi utomt were invented during the 1960s for the purpose of developing decision procedure for S1S. Even though Büchi utomt re firly simple vrition of stndrd finite utomt, they lredy suffice to chrcterize the entire clss of ω-regulr lnguges. 2.1 Preliminries We begin with some bsic nottions. We use the symbol N to denote the set {0, 1, 2, 3,...} of nturl numbers nd N + to denote the set {1, 2, 3,...} of positive nturl numbers. For n, m N with n m we use [n, m] to denote the set {n, n + 1,..., m} nd [n] for the specil cse of [0, n 1]. An lphbet is nonempty, finite set of symbols, usully denoted by Σ. The elements of n lphbet re clled letters. Let n lphbet Σ be given, then the conctention w = w(0)w(1)...w(n 1) of finitely mny letters of Σ is clled finite word over Σ, where n defines the length of w lso denoted by w. The only word of length 0 is the empty word denoted by ɛ. The set of ll finite words over Σ is denoted by Σ. For Σ \ {ɛ} we use the shortcut Σ +. Given some word w, we hve tht for ech n [ w ] the n-th letter of w is denoted by w(n). The conctention of infinitely mny letters defines n infinite word which hs infinite length. The set of ll infinite words is denoted by Σ ω. If Σ is n lphbet, then ech subset of Σ is lnguge over finite words. Ech subset of Σ ω is lnguge over infinite words, lso referred to s n ω-lnguge. 2.2 Automt over Infinite Words The opertionl behvior of n utomton over infinite words is very similr to tht of stndrd utomton over finite words; strting with n initil stte, the utomton constructs run by reding one letter of the input lphbet t time nd trnsitioning to successor stte permitted by its trnsitions. Most components of n utomton over infinite words re thus fmilir from the stndrd utomt over finite words: n lphbet Σ, finite set Q of sttes, set of initil sttes I, set of trnsitions T. Automt over infinite words differ from utomt over finite words, nd different types of utomt over infinite words differ mong ech other in the cceptnce condition, which is responsible for determining whether n infinite run of the utomton is ccepting or not. We leve this component generic in our generl definition of utomt over infinite words, nd lter give first concrete definition for the cse of Büchi utomt. Definition 2.1. An utomton over infinite words is tuple A = (Σ, Q, I, T, Acc), where Σ is finite lphbet, Q is finite set of sttes, I Q is subset of initil sttes, T Q Σ Q is set of trnsitions, nd Acc Q ω is the ccepting condition. In the following, we refer to n utomton over infinite words (whenever cler from context) simply s n utomton. Now we define how n utomton uses n infinite word s input. 5

10 Note tht we do not refer to cceptnce in this definition. Definition 2.2. A run of n utomton A on n infinite input word α is n infinite sequence of sttes r = r(0)r(1)r(2)... such tht the following hold: r(0) I for ll i N, (r(i), α(i), r(i + 1)) T Exmple 2.1. The following is grphicl representtion of n utomton over the lphbet Σ = {, b} nd with set of sttes Q = {A, B, C, D}, initil set of sttes I = {A}, nd set of trnsitions T = {(A,, B), (B,, C), (C, b, D), (D, b, A)}: A B b D b C On the infinite input word bbbb..., the (only) run of the utomton is ABCDABCDABCD.... An utomton is deterministic if I 1 nd {(q, σ, q ) T q Q} 1 for every q Q nd σ Σ, otherwise the utomton is nondeterministic. The utomton is complete if {(q, σ, q ) T q Q} 1 for every q Q nd σ Σ. For deterministic nd complete utomt, the trnsitions re usully given s function δ : Q Σ Q. The utomton in the exmple is deterministic but not complete. Definition 2.3. An utomton A ccepts n infinite word α if: there is run r of A on α, nd r is ccepting: r Acc. The lnguge recognized by A is defined s follows: L(A) = {α Σ ω A ccepts α} We sy tht two utomt re equivlent if they hve the sme lnguge. 2.3 The Büchi Acceptnce Condition The Büchi cceptnce condition is given s set of ccepting sttes F. A run of Büchi utomton is ccepting if some stte from this set occurs infinitely often. Formlly, for n infinite word α over Σ we use Inf(α) = {σ Σ m N. n N. n m nd α(n) = σ} to denote the set of ll letters of Σ tht occur infinitely often in α, clled the infinity set of α. Definition 2.4. The Büchi condition büchi(f ) on set of sttes F Q is the set büchi(f ) = {α Q ω Inf(α) F }. An utomton A = (Σ, Q, I, T, Acc) with Acc = büchi(f ) is clled Büchi utomton. The set F is clled the set of ccepting sttes. 6

11 Exmple 2.2. Let A be the utomton from Exmple 2.1 with Büchi cceptnce condition büchi({d}). The lnguge of the utomton consists of single word: L(A) = {bbbbbb...} As first observtion bout Büchi utomt, we estblish tht for every Büchi utomton A one cn construct n equivlent complete Büchi utomton A : Construction 2.1. For Büchi utomton A = (Σ, Q, I, T, büchi(f )), we define the complete Büchi utomton A = (Σ, Q, I, T, büchi(f )) using: Q = Q {q f } where q f is fresh stte I = I T = T {(q, σ, q f ) q. (q, σ, q ) T } {(q f, σ, q f ) σ Σ} F = F We prove the correctness of the construction by the following theorem. Theorem 2.1. For every Büchi utomton A, there is complete Büchi utomton A such tht L(A) = L(A ). Proof. The runs of A re superset of those of A, becuse we hve not removed ny trnsitions during the construction of A. Furthermore, on ny infinite input word the ccepting runs of A nd A re the sme, becuse ny run tht reches the new stte q f stys in q f forever, nd, since q f F, such run is not ccepting. Exmple 2.3. Completing the utomton from the previous exmple we obtin the following Büchi utomton (the ccepting stte D is shown with double lines): A B b b b D b C f, b A complete deterministic utomton my be viewed s totl function from Σ ω to Q ω. A complete (possibly nondeterministic) utomton produces t lest one run for every input word. 7

12 8

13 3 Büchi s Chrcteriztion Theorem Our next gol is to chrcterize the lnguges tht cn be recognized by Büchi utomt. For lnguges over finite words, Kleene s theorem sttes tht the set of lnguges over finite words tht cn be defined by regulr expressions is exctly the set of lnguges tht cn be recognized by utomt over finite words. We quickly review this result, then define ω-regulr expressions, nd finlly prove the corresponding theorem for ω-regulr lnguges: Büchi s chrcteriztion theorem. 3.1 Kleene s Theorem We give quick recp of regulr lnguges nd Kleene s theorem. This is not ment s full introduction to finite utomt theory; if you wnt to brush up some more on this, we recommend the textbook Introduction to Automt Theory, Lnguges, nd Computtion by Hopcroft, Motwni, nd Ullmn. Regulr expressions consist of constnts nd opertor symbols tht denote lnguges of finite words nd opertions over these lnguges, respectively. Definition 3.1. Regulr expressions re defined s follows: The constnts ε nd re regulr expressions. L(ε) = {ε}, L( ) =. If Σ is symbol, then is regulr expression. L() = {}. If E nd F re regulr expressions, then E + F is regulr expression: L(E + F ) = L(E) L(F ). If E nd F re regulr expressions, then E F is regulr expression: L(E F ) = {uv u L(E), v L(F )}. If E is regulr expression, then E is regulr expression. L(E ) = {u 1 u 2... u n n N, u i L(E) for ll 0 i n}. A lnguge over finite words is regulr if it is definble by regulr expression. Alterntively, regulr lnguges cn be defined s the lnguges recognized by utomt over finite words. Definition 3.2. An utomton on finite words A is tuple (Σ, Q, I, T, F ), where Σ is n input lphbet, Q is nonempty finite set of sttes, I Q is set of initil sttes, Q Σ Q is set of trnsitions, nd F Q re set of finl sttes. An utomton A ccepts finite word w Σ if there is finite sequence of sttes q(0)q(1)... q( w ) such tht q(0) I nd (q(i), w(i), q(i + 1)) for ll i < w nd with q( w ) F. The set of ll words ccepted by A is clled the lnguge of A, denoted by L(A). The equivlence of regulr expressions nd finite utomt is known s Kleene s theorem. Theorem 3.1 (Kleene s Theorem). A lnguge is regulr iff it is recognized by some finite word utomton. 9

14 3.2 ω-regulr Lnguges ω-regulr expressions denote lnguges over infinite words. In ddition to lnguge union on lnguges over infinite words, we hve two opertions tht convert lnguges over finite words into lnguges over infinite words: the infinite conctention R ω of words of regulr lnguge R nd the conctention R U of regulr lnguge R nd n ω-regulr lnguge U. Definition 3.3. The ω-regulr expressions re defined s follows. If E is regulr expression where ε L(E), then E ω is n ω-regulr expression. L(E ω ) = L(E) ω where L ω = {w 0 w 1... w i L, w i > 0 for ll i N} for L Σ. If E is regulr expression nd W is n ω-regulr expression, then E W is n ω-regulr expression. L(E W ) = L(E) L(W ) where L 1 L 2 = {wα w L 1, α L 2 } for L 1 Σ, L 2 Σ ω. If W 1 nd W 2 re ω-regulr expressions, then W 1 + W 2 is n ω-regulr expression. L(W 1 + W 2 ) = L(W 1 ) L(W 2 ). A lnguge over infinite words is ω-regulr if it is definble by n ω-regulr expression. 3.3 Closure Properties of the Büchi-Recognizble Lnguges Büchi s chrcteriztion theorem sttes tht the ω-regulr lnguges re exctly the lnguges recognized by Büchi utomt. In the following we will refer to the lnguges recognized by Büchi utomt simply s Büchi-recognizble lnguges. To prepre for the proof of Büchi s theorem, we estblish severl closure properties of the Büchi-recognizble lnguges. First off, the Büchi-recognizble lnguges re closed under lnguge union, s demonstrted by the following simple construction. Construction 3.1. Let L 1 nd L 2 be ω-lnguges recognized by the Büchi utomt A 1 = (Σ, Q 1, I 1, T 1, büchi(f 1 )) nd A 2 = (Σ, Q 2, I 2, T 2, büchi(f 2 )), respectively. We construct A = (Σ, Q, I, T, büchi(f )) with L(A ) = L 1 L 2 s follows: Q = Q 1 Q 2 (w.l.o.g. we ssume Q 1 Q 2 = ) I = I 1 I 2 T = T 1 T 2 F = F 1 F 2 The correctness of this construction is proven by the following theorem. Theorem 3.2. If L 1 nd L 2 re Büchi-recognizble, then so is L 1 L 2. Proof. We prove tht the Büchi utomton A built by Construction 3.1 from the Büchi utomt A 1 nd A 2 indeed recognizes the union of the lnguges of the two utomt. L(A ) L(A 1 ) L(A 2 ): For α L(A ), we hve n ccepting run r = r(0)r(1)r(2)... of A on α. If r(0) I 1, then r is n ccepting run of A 1, otherwise r(0) I 2 nd r is n ccepting run of A 2. L(A ) L(A 1 ) L(A 2 ): For i {1, 2} nd α L(A i ), there is n ccepting run r of A i. The run r is lso n ccepting run of A. 10

15 As we will see lter, the Büchi-recognizble lnguges re closed under complement. Together with the closure under union, the closure under complement implies the closure under intersection (becuse the intersection of two sets is the complement of the union of the complements of the two sets). Since the proof of the closure under complement is more complicted, we postpone this for now, however, nd insted give direct construction for the closure under intersection. Construction 3.2. Let L 1 nd L 2 be ω-lnguges recognized by the Büchi utomt A 1 = (Σ, Q 1, I 1, T 1, büchi(f 1 )) nd A 2 = (Σ, Q 2, I 2, T 2, büchi(f 2 )), respectively. We construct A = (Σ, Q, I, T, büchi(f )) with L(A ) = L 1 L 2 s follows: Q = Q 1 Q 2 {1, 2} I = I 1 I 2 {1} T = {((q 1, q 2, i), σ, (q 1, q 2, j)) (q 1, σ, q 1) T 1, (q 2, σ, q 2) T 2, i, j {1, 2}, q i / F i i = j q i F i i j} F = {(q 1, q 2, 2) q 1 Q 1, q 2 F 2 } The utomton for the intersection is essentilly the product of the two utomt. The sttes of the new utomton contin the sttes of the two utomt plus third component, which is used to combine the cceptnce conditions of the two utomt. The product utomton lterntes between witing for visit to the ccepting sttes of the first utomton (in which cse the third component is 1) nd witing for visit to the ccepting sttes of the second utomton (in which cse the third component is 2). The ccepting sttes of the product re those sttes where the third component is 2 nd where the second utomton visits n ccepting stte, i.e., where both utomt hve seen n ccepting stte since the lst visit to n ccepting stte of the product utomton. Theorem 3.3. If L 1 nd L 2 re Büchi-recognizble, then so is L 1 L 2. Proof. We prove tht the Büchi utomton A built by Construction 3.2 from the Büchi utomt A 1 nd A 2 indeed recognizes the intersection of the lnguges of the two utomt. r = (q 0 1, q 0 2, t 0 )(q 1 1, q 1 2, t 1 )... is run of A on n input word α iff r 1 = q 0 1q is run of A 1 on α nd r 2 = q 0 2q is run of A 2 on α. The run r is ccepting iff r 1 is ccepting nd r 2 is ccepting. Next, the conctention of regulr lnguge nd Büchi-recognizble lnguge is gin Büchi-recognizble. Construction 3.3. Let A 1 = (Σ, Q 1, I 1, T 1, F 1 ) be n utomton over finite words tht recognizes the lnguge L 1, nd let A 2 = (Σ, Q 2, I 2, T 2, büchi(f 2 )) be Büchi utomton over the sme lphbet tht recognizes L 2. We construct Büchi utomton A = (Σ, Q, I, T, büchi(f 2 )) with L(A ) = L 1 L 2 s follows: Q = Q 1 Q 2 (w.l.o.g. we ssume Q 1 Q 2 = ) { I I1 if I = 1 F 1 = I 1 I 2 otherwise T = T 1 T 2 {(q, σ, q ) (q, σ, f) T 1, f F 1, q I 2 } 11

16 The correctness of this construction is proven by the following theorem. Theorem 3.4. If L 1 is regulr lnguge nd L 2 is Büchi-recognizble, then L 1 L 2 is Büchi-recognizble. Proof. We prove tht the Büchi utomton A built in Construction 3.3 from the utomton on finite words A 1 nd the Büchi utomton A 2 indeed recognizes the conctention of the lnguges of the two utomt. L(A ) L(A 1 ) L(A 2 ): For α L(A ), let r = r(0)r(1)r(2)... be n ccepting run of A on α. If r(0) I 1, then there is n n N such tht (r(n), α(n), r(n + 1)) Q 1 Σ I 2 nd therefore, there is finl stte f F 1 such tht r(0)r(1)... r(n)f is n ccepting run of A 1 on α(0)α(1) α(n) nd r(n + 1)r(n + 2)... is n ccepting run of A 2 on α(n + 1)α(n + 2).... If r(0) I 2 then I 1 F 1 nd therefore, ɛ L(A 1 ), α L(A 2 ). L(A ) L(A 1 ) L(A 2 ): For w L(A 1 ), let r = r(0)r(1) r(n) be n ccepting run of A 1 on w. For α L(A 2 ), let s = s(0)s(1)... be n ccepting run of A 2 on α. Then, r(n) F 1 nd, by construction, r(0)r(1)... r(n 1)s(0)s(1)... is n ccepting run of A on wα. Finlly, we show tht the infinite conctention of words of regulr lnguge forms Büchi-recognizble lnguge. We construct Büchi utomton for this lnguge from n utomton over finite words in two steps. The first construction modifies given utomton over finite words into n equivlent utomton with single initil stte tht hs no incoming trnsitions. Construction 3.4. Let A = (Σ, Q, I, T, F ) be n utomton over finite words. We ssume tht ε / L(A). We construct n utomton A = (Σ, Q, I, T, F ) over finite words such tht L(A) = L(A ) nd A hs single initil stte tht hs no incoming trnsitions. Q = Q {q f } where q f is fresh stte I = {q f } T = T {(q f, σ, q ) (q, σ, q ) T for some q I} The second construction builds the Büchi utomton tht recognizes the infinite conctentions of words from the regulr lnguge by dding loop to the modified utomton. Construction 3.5. Let A be n utomton over finite words, for which we ssume tht ε / L(A). We construct Büchi utomton A = (Σ, Q, I, T, büchi(f )) such tht L(A ) = L(A) ω. Let A = (Σ, Q, I, T, F ) be the utomton of Construction 3.4. Then A is defined s follows: Q = Q I = I T = T {(q, σ, q f ) (q, σ, q ) T nd q F } F = I The correctness of this construction is proven by the following theorem. 12

17 Theorem 3.5. If L is regulr lnguge such tht ɛ L, then L ω is Büchi-recognizble. Proof. Construction 3.4 does not ffect the lnguge of A. We show tht the Büchi utomton A built in Construction 3.5 from the resulting utomton A on finite words indeed recognizes L(A ) ω. L(A ) L(A ) ω : Assume tht α L(A ) nd tht r(0)r(1)r(2)... is n ccepting run of A on α. Hence, we hve tht r(i) = q f F = I for infinitely mny indices i: i 0, i 1, i 2,.... This provides sequence of runs of A : run r(0)r(1)... r(i 0 1)q on w 0 = α(0)α(1)... α(i 0 1) for some q F run r(i 0 )r(i 0 + 1)... r(i 1 1)q on w 1 = α(i 0 )α(i 0 + 1)... α(i 1 1) for some q F nd so forth. We thus hve tht w k L(A ) for every k 0. Hence, α L(A ) ω. L(A ) L(A ) ω : Assume tht α = w 0 w 1 w 2... Σ ω such tht w k L(A ) for ll k 0. For ech k, we choose n ccepting run r k (0)r k (1)r k (2)... r k (n k ) of A on w k. Hence, r k (0) I nd r k (n k ) F for ll k > 1. Thus, r 0 (0)... r 0 (n 0 1)r 1 (0)... r 1 (n 1 1)r 2 (0)... r 2 (n 2 1)... is n ccepting run of A on α. Hence, α L(A ). 3.4 Büchi s Chrcteriztion Theorem We re now redy to prove Büchi s Chrcteriztion Theorem, result from Theorem 3.6 (Büchi s Chrcteriztion Theorem). An ω-lnguge is Büchi-recognizble iff it is ω-regulr. Proof. follows from the closure properties of the Büchi-recognizble lnguges estblished by Theorems 3.2, 3.4, nd 3.5. : Given Büchi utomton A, we consider for ech pir q, q Q the regulr lnguge W q,q = {w Σ finite-word utomton (Σ, Q, {q}, T, {q }) ccepts w }. We clim tht L(A) = q I,q F W q,q (W q,q \ {ɛ})ω. The clim is proven s follows. L(A) q I,q F W q,q (W q,q \ {ɛ})ω : Let α L(A). Then there is n ccepting run r of A on α, which begins t some q = r(0) I nd visits some q F infinitely often: r : q w0 q w 1 q w 2 q w 3..., where w i Σ for ll i 0, w i > 0 for ll i > 0 nd α = w 0 w 1 w The nottion q 0 qk+1 for some finite word w = w(0)w(1)... w(k) mens tht there exist sttes w q 1,... q k Q s.t. (q i, w(i), q i+1 ) T for ll 0 i k. Since w 0 W q,q nd w k W q,q for k > 0, we hve tht α W q,q W q,q ω for some q I, q F. L(A) q I,q F W q,q (W q,q \ {ɛ})ω : Let α = w 0 w 1 w 2... with w 0 W q,q nd w k W q,q for some q I, q F nd for ll k > 0. Then the run r : q w0 q w 1 q w 2 q w 3... exists nd is ccepting becuse q F. It follows tht α L(A). 13

18 14

19 4 Deterministic Büchi Automt One of the most importnt constructions in the theory of utomt over finite words is the Rbin-Scott powerset construction, which converts nondeterministic utomton over finite words into deterministic utomton tht recognizes the sme lnguge. The powerset construction estblishes tht while nondeterminism mkes utomt over finite words more concise (the powerset construction produces n exponentil number of sttes), nondeterminism does not mke utomt over finite words more expressive. The sitution is different for Büchi utomt: even though the lnguge L = ( + b) b ω is clerly Büchi-recognizble, there is, s the following theorem shows, no deterministic Büchi utomton tht recognizes L. Theorem 4.1. The lnguge L = ( + b) b ω Büchi utomton. is not recognizble by deterministic Proof. Assume, by wy of contrdiction, tht L is recognizble by the deterministic Büchi utomton A = (Σ, Q, I, T, büchi(f )). Since α 0 = b ω is in L, there is unique run r 0 = r 0 (0)r 0 (1)r 0 (2)... of A on α 0 with r 0 (n 0 ) F for some n 0 N. Similrly, α 1 = b n0 b ω in L nd there is unique run r 1 = r 0 (0)r 0 (1)r 0 (2)... r 0 (n 0 )r 1 (n 0 + 1)r 1 (n 0 + 2)... of A on α 1 with r 1 (n 1 ) F for some n 1 > n 0. Becuse A is deterministic, r 0 nd r 1 re identicl up to position n 0. By repeting this rgument infinitely often, we obtin word α = b n0 b n1 b n2... nd run r with infinitely mny visits to F. Hence, α is ccepted by A. However, α is not n element of L. This contrdicts L = L(A). Wht lnguges re recognizble by deterministic Büchi utomt? A strightforwrd chrcteriztion cn be given in terms of the limit opertor. Definition 4.1 (Limit). The limit W of lnguge W Σ over finite words is the following lnguge over infinite words: W = {α Σ ω there exist infinitely mny n N s.t. α[0, n] W }. Theorem 4.2. An ω-lnguge L Σ ω is recognizble by deterministic Büchi utomton iff there is regulr lnguge W Σ s.t. L = W. Proof. We clim tht the lnguges of deterministic Büchi utomton A B nd of deterministic utomton over finite words A F, where the utomt A B = (Σ, Q, I, T, büchi(f )) nd A F = (Σ, Q, I, T, F ), constructed from the sme components, re relted s follows: L(A B ) = L(A F ). Since every regulr lnguge is recognized by deterministic utomton over finite words, the theorem follows. To prove the clim, we consider n infinite word α Σ ω. 15

20 iff iff iff α L(A B ) for the unique run r of A B on α, Inf(r) F α[0, n] L(A F ) for infinitely mny n N α L(A F ) Next on our gend is the complementtion of lnguges. For regulr lnguges, this is very simple: one trnsltes given complete deterministic utomton A tht recognizes some lnguge L Σ into n utomton A tht recognizes the complement Σ \ L by complementing the set of finl sttes, i.e., F = F \ F. For deterministic Büchi utomt, the construction is slightly more complicted, becuse it introduces nondeterminism. Construction 4.1. Let A = (Σ, Q, I, T, büchi(f )) be complete deterministic Büchi utomton. We construct Büchi utomton A = (Σ, Q, I, T, büchi(f )) with L(A ) = Σ ω \ L(A) s follows: Q = (Q {0}) ((Q \ F ) {1}) I = I {0} T = {((q, 0), σ, (q, i)) (q, σ, q ) T, i {0, 1}, (q, i) Q } {((q, 1), σ, (q, 1)) (q, σ, q ) T, q Q \ F } F = (Q \ F ) {1} The construction uses two copies of the given utomton A, where ll ccepting sttes re eliminted from the second copy. The switch from the first copy (identified by the flg 0) to the second copy (identified by the flg 1) hppens nondeterministiclly. The utomton ccepts if the run ends up in the second copy, which mens tht, on the unique run of A on the input word, the ccepting sttes of A re only visited finitely often. Note tht the resulting utomton is nondeterministic. This is, in generl, unvoidble, becuse there re lnguges, such s L = (b ) ω where the lnguge itself is recognizble by deterministic Buchi utomton, while its complement Σ ω \L cn only be recognized by nondeterministic Büchi utomton. Theorem 4.3. For every deterministic Büchi utomton A, there exists Büchi utomton A such tht L(A ) = Σ ω \ L(A). Proof. Let A be constructed from the given deterministic Büchi utomton A (which we ssume, w.l.o.g., to be complete) by Construction 4.1. We prove tht L(A ) = Σ ω \ L(A). L(A ) Σ ω \ L(A): For every word α L(A ) we hve n ccepting run r : (q 0, 0)(q 1, 0)... (q j, 0)(q 0, 1)(q 1, 1)... on A. Hence, r : q 0 q 1 q 2... q j q 0q 1... is the unique run of A on α. Since q 0, q 1,... Q \ F, we hve tht Inf(r) Q \ F. Hence, r is not ccepting nd α Σ ω \ L(A). L(A ) Σ ω \ L(A): Let α / L(A) be some word tht is not in the lnguge of A. Since A is complete nd deterministic, there exists unique run r : q 0 q 1 q 2... of A on α nd 16

21 Inf(r) F =. Thus, there exists k N such tht q j / F for ll j > k. This gives us the run r : (q 0, 0)(q 1, 0)... (q k, 0)(q k+1, 1)(q k+2, 1)... of A on α with Inf(r ) ((Q \ F ) {1}) = F. α L(A ). Hence, r is ccepting nd therefore Exmple 4.1. We use Construction 4.1 to complement the deterministic Büchi utomton A with lnguge (b ) ω. The result is the nondeterministic Büchi utomton A with lnguge ( + b) b ω. b b p b b q p, 0 q, 0 b b q, 1 b Note tht, since not ll ω-regulr lnguges cn be recognized by deterministic Büchi utomt, Construction 4.1 does not provide us with complementtion construction for ll ω-regulr lnguges. Such generl construction will be the subject of the following section. 17

22 18

23 5 Complementtion of Büchi Automt Complementtion is n importnt opertion in verifiction. In prticulr we cn, s discussed in the introduction, reduce the question whether the lnguge of n utomton A 1, representing the system, is contined in the lnguge of n utomton A 2, representing the specifiction, to the lnguge emptiness problem of n utomton tht recognizes the intersection of the lnguge of A 1 with the complement of the lnguge of A 2. While the closure of the Büchi-recognizble lnguges under complementtion hs been known since the 1960s, improvements to the complementtion construction were mde until round The construction discussed in the following is due to Kupfermn nd Vrdi. In order to determine whether given word is in the complement of the lnguge of nondeterministic utomton, we must check whether ll runs of the utomton re rejecting. We begin by representing the set of ll runs s n infinite directed cyclic grph (DAG): Definition 5.1. Let A = (Σ, Q, I, T, büchi(f )) be nondeterministic Büchi utomton. The run DAG of A on word α Σ ω is the directed cyclic grph G = (V, E) where V = (Q i {i}) where Q 0 = I nd Q i+1 = {q } i 0 E = {((q, i), (q, i + 1)) i 0, (q, α(i), q ) T } q Q i, (q,α(i),q ) T A pth in run DAG is ccepting iff it visits F N infinitely often. The utomton ccepts word α Σ ω iff some pth in the run DAG on α is ccepting. Exmple 5.1. Consider the following nondeterministic Büchi utomton A. The lnguge of A consists of ll infinite words over {, b} with infinitely mny bs, i.e., ( b) ω :, b, b, b p q r b The run DAG of A on α = bb... is shown below. Note tht strting with level 1, every level of the grph includes the ccepting stte q, indicting tht for every number n 1, there exists run tht visits q in the nth position. However, since α is not in the lnguge of A, there is no run tht visits q infinitely often. b b p, 0 p, 1 p, 2 p, 3 p, 4 p, 5 p, 6 p, 7... q, 1 q, 2 q, 3 q, 4 q, 5 q, 6 q, 7... r, 3 r, 4 r, 5 r, 6 r,

24 To prove tht none of the pths in given run DAG is ccepting, we use n nnottion of the vertices of the run DAG with nturl numbers, clled rnking. The numbers ssigned by the rnking come from finite set, whose size is derived from the number of sttes of the utomton. We require tht vertices tht re lbeled with odd numbers do not contin ccepting sttes nd tht the rnk never increses long pths in the run DAG. If furthermore ll pths eventully sty in some odd rnk, then we cll the rnking odd. Definition 5.2. A rnking for run DAG G is function f : V {0,..., 2 Q } such tht for ll (q, i) V where f(q, i) is odd, we hve tht q / F, nd for ll ((q, i), (q, i )) E, we hve tht f(q, i ) f(q, i). A rnking is odd iff for ll pths (q 0, i 0 )(q 1, i 1 )(q 2, i 2 )... in G, there is position n N such tht f(q n, i n ) is odd nd, for ll j 0, f(q n+j, i n+j ) = f(q n, i n ). Exmple 5.2. Continuing our exmple, we nnotte the run DAG with n odd rnking. The rnks re displyed with the following colors: rnk 1 - rnk 2 - rnk 3 - rnk 4. b b p, 0 p, 1 p, 2 p, 3 p, 4 p, 5 p, 6 p, 7... q, 1 q, 2 q, 3 q, 4 q, 5 q, 6 q, 7... r, 3 r, 4 r, 5 r, 6 r, 7... Clerly, the existence of n odd rnking implies tht there is no ccepting run. Lemm 5.1. If there exists n odd rnking for the run DAG G of nondeterministic Büchi utomton A on word α Σ ω, then A does not ccept α. Proof. Consider tht by the definition of n odd rnking, every pth eventully gets trpped in some odd rnk, nd if f(q, i) is odd, then q / F. We conclude tht every pth of G visits F only finitely often. The more complicted rgument is to show tht if there is no ccepting run, then there exists n odd rnking. We begin by introducing some helpful terminology. Let G be subgrph of G. We cll vertex (q, i) sfe in G, if for ll vertices (q, i ) rechble from (q, i), we hve tht q / F, nd endngered in G, if only finitely mny vertices re rechble from (q, i). We now define sequence G 0 G 1 G 2... of subgrphs of G inductively s follows: G 0 = G 20

25 G 2j+1 = G 2j \ {(q, i) (q, i) is endngered in G 2i } G 2j+2 = G 2j+1 \ {(q, i) (q, i) is sfe in G 2i+1 } Exmple 5.3. Consider gin the run DAG from our previous exmples with the coloring from Exmple 5.2. G 0 is the entire grph. There re no endngered vertices in G 0, hence G 1 = G 0. The red vertices re sfe in G 1 ; hence, G 2 consists of ll vertices except the red vertices. In G 2, the green vertices re endngered; hence, G 3 consists of ll vertices except the red nd green vertices. In G 3, the blue vertices re sfe; leving only the non-colored vertices for G 4. G 4 is finite, hence ll remining vertices re endngered. G 5 nd ll further subgrphs thus re empty. In the exmple, G 5 nd ll further subgrphs re empty. In generl, if A hs n sttes, then G 2n+1 is empty. We estblish this fct with the inductive rgument of the following lemm: Lemm 5.2. If A does not ccept α, then the following holds: For every n 2 Q there exists n l n N such tht for ll i l n we hve t most Q n vertices of the form (_, i) in G 2n. Proof. We prove the lemm by induction on n N. The cse of n = 0 is strightforwrd, s every subgrph of G hs t most Q vertices of the from (_, i). So, let n be greter thn 0. First ssume tht G 2(n 1) is finite. Then every vertex in G 2(n 1) is endngered nd correspondingly, both G 2n 1 nd G n re empty. Next, ssume tht G 2(n 1) is infinite. Then there must exist sfe vertex (q, m) in G 2n 1, s otherwise, we cn construct pth within G contining infinitely mny visits to F. We choose l n = m nd clim tht for ll j l n, there re t most Q n mny vertices of the form (_, j) in G 2n. Our clim is proven s follows: Since (q, l n ) G 2n 1, we know tht it is not endngered in G 2(n 1). Hence, there re infinitely mny vertices rechble from (q, l n ) in G 2(n 1). It follows by König s Lemm, tht there exists n infinite pth p = (q, l n )(q 1, l n + 1)(q 0, l n + 2)... in G 2(n 1). Given tht the pth is infinite, clerly no vertex of p is endngered in G 2(n 1). Thus, p is lso pth of G 2n 1. Since (q, l n ) is sfe in G 2n 1, ll vertices on p re sfe in G 2n 1 s well. Hence, by the construction of G 2n, we cn conclude tht none of the vertices of p re in G 2n. Thus, for ll j l n, the number of vertices of the form (_, j) in G 2n is strictly smller thn in G 2(n 1), concluding the proof. With these preprtions, we re now redy to show tht the existence of n odd rnking is not only sufficient for the bsence of n ccepting run, but lso necessry. Lemm 5.3. If A does not ccept α, then there exists n odd rnking for the run DAG of A on α. Proof. We define the function f by f(q, i) = 2n if the vertex (q, i) is endngered in G 2n nd by f(q, i) = 2n + 1 if (q, i) is sfe in G 2n+1. We clim tht f is n odd rnking: By Lemm 5.2, G j is empty for j > 2 Q. Hence, f : V {0,..., 2 Q }. Furthermore: For ll successors (q, i ) of vertex (q, i) it holds tht f(q, i ) f(q, i): Let j = f(q, i). Then if j is even, the vertex (q, i) is endngered in G j. Hence, either (q, i ) is not in G j, nd therefore f(q, i ) j, or (q, i ) is in G j, nd thus endngered, 21

26 i.e., f(q, i ) = j. Anlogously, if j is odd, then the vertex (q, i) is sfe in G j such tht either (q, i ) is not in G j, nd therefore f(q, i) < j, or (q, i ) is in G j, nd thus sfe, i.e. f(q, i) = j. f is odd: For every pth (q 0, i 0 )(q 1, i 1 )(q 2,, i 2 )... in G there exists n n N such tht for ll j n we hve tht f(q j, i j ) = f(q n, i n ). Now, suppose tht k = f(q n, i n ) is even. Then, (q n, i n ) is endngered in G k. Furthermore, ll (q j, i j ) re in G k, since f(q j, i j ) = k for ll j N. However, this contrdicts tht (q n, i n ) is endngered in G k such tht k must be odd. In our complementtion construction, we build n utomton tht constructs the run DAG level by level nd nondeterministiclly guesses the odd rnking. A level rnking is function g : Q {0,..., 2 Q } { } such tht if g(q) is odd, then q / F. The specil element indictes tht the stte is not present in the level of the run DAG. Let R be the set of ll level rnkings. We sy tht level rnking g covers level rnking g if for ll q, q Q, where g(q) nd (q, σ, q ) T, it holds tht g (q ) g(q). Construction 5.1. For given Büchi utomton A = (Σ, Q, I, T, büchi(f )) we construct Büchi utomton A = (Σ, Q, I, T, büchi(f )) with L(A ) = Σ ω \ L(A) s follows. Q = R 2 Q I = {(g 0, ) g 0 R, g 0 (q) = iff q / I} T = {((g, ), σ, (g, P )) g covers g, P = {q Q g (q ) is even}} {((g, P ), σ, (g, P )) P, g covers g, F = R { } P = {q Q (q, σ, q ) T, q P, g (q ) is even}} Intuitively, the first component of ech stte identifies the level rnking, nd the second component trcks the sttes whose corresponding vertices in the run DAG hve even rnks. Pths tht trverse such vertices should eventully rech vertex with n odd rnk nd the cceptnce condition ensures tht ll pths visit vertex with odd rnk infinitely often. Theorem 5.1. For every Büchi utomton A there exists Büchi utomton A such tht L(A ) = Σ ω \ L(A). Proof. L(A ) Σ ω L(A): Let α L(A ) nd let r = (g 0, P 0 )(g 1, P 1 )... be n ccepting run of A on α. Further, let G = (V, E) be the run DAG of A on α. Then the function f : (q, i) g i (q) for q Q i nd i N is rnking for G, becuse if g i (s) is odd then s / F nd for every ((q, i), (q, i + 1)) E it holds tht g i+1 (q ) g i (q). We clim tht f is n odd rnking for G. By wy of contrdiction ssume tht it is not. Then there is pth (q 0, i 0 )(q 1, i 1 )(q 2, i 2 )... in G such tht for infinitely mny n N the rnk f(q n, i n ) is even. Hence, there exists n index m N, such tht f(q m, i m ) is even nd for ll j m we hve tht f(q j, i j ) = f(q n, i n ). Now, since r is ccepting, it follows tht P k = for infinitely mny k. Let k be the smllest such index greter or equl thn n. However, then lso P j for ll j > k, yielding the desired contrdiction. We conclude tht α / L(A), s there is n odd rnking. 22

27 Σ ω L(A) L(A ): Let α / L(A) nd let G = (V, E) be the run DAG of A on α. Then there exists n odd rnking f on G nd there is run r = (g 0, P 0 )(g 1, P 1 )... of A on α, where { f(q, i) if q Q i g i (q) = otherwise, P 0 =, nd { {q Q g i+1 (q) is even} if P i = P i+1 = {q Q q Q i P i. ((q, i), (q, i + 1)) E, g i+1 (q ) is even} otherwise. The run r is ccepting, s otherwise there would be n index n such tht P j for ll j n, yielding pth in G tht visits only finitely often n odd rnk. Hence, we conclude tht α L(A ). 23

28 24

29 6 McNughton s Theorem We lredy estblished tht while the lnguges tht cn be recognized with nondeterministic Büchi utomt re exctly the ω-regulr lnguges, the lnguges tht cn be recognized with deterministic Büchi utomt re strictly smller set. We now repir this deficiency with more expressive cceptnce condition, the Muller condition. McNughton s theorem sttes tht the set of lnguges recognizble by deterministic Muller utomt re gin exctly the ω-regulr lnguges. We will see lter tht it is very useful to hve deterministic utomton for given ω-lnguge, for exmple in synthesis, where we construct the gme between the system nd the environment from deterministic utomton tht recognizes the winning plys for the system plyer. Since the complementtion of deterministic Muller utomt is very simple opertion, McNughton s theorem lso provides n lterntive proof for the result of the previous section tht the ω-regulr lnguges re closed under complementtion. 6.1 The Muller Acceptnce Condition Definition 6.1. The Muller condition muller(f) on s set of sets of sttes F 2 Q is the set muller(f) = {α Q ω Inf(α) F} An utomton A = (Σ, Q, I, T, Acc) with Acc = muller(f) is clled Muller utomton. The set F is clled the set of ccepting subsets (or the tble) of A. Exmple 6.1. Consider the deterministic utomton over the lphbet Σ = {, b} shown below. For the tble F = {{q}} we obtin the Muller utomton A recognizing the lnguge L(A) = ( + b) b ω, for F = {{q}, {p, q}} we obtin the Muller utomton A recognizing L(A ) = ( b) ω. b p b q As first exercise, we trnslte Büchi utomt into Muller utomt: Construction 6.1. For (deterministic) Büchi utomton A = (Σ, Q, I, T, büchi(f )) we define the (deterministic) Muller utomton A = (Σ, Q, I, T, muller(f)) using F = {S Q S F } Since the construction does not modify the trnsitions, the Muller utomton is gin deterministic if the Büchi utomton is deterministic. It is strightforwrd to see tht the utomt recognize the sme lnguge. Theorem 6.1. For every (deterministic) Büchi utomton A, there is (deterministic) Muller utomton A such tht L(A) = L(A ). Proof. The utomton A of Construction 6.1 complies with our requirements, since büchi(f ) = {α Q ω Inf(α) F } = {α Q ω Inf(α) F} = muller(f) 25

30 A slightly more difficult construction is to trnslte the Muller utomton bck into Büchi utomton. Construction 6.2. Let A = (Σ, Q, I, T, muller({f 1,..., F n })) be Muller utomton nd < some rbitrry totl order on Q. We construct the Büchi utomton A = (Σ, Q, I, T, büchi(f )) with L(A ) = L(A) s follows: Q = Q n ({i} F i F i ) I = I i=1 T = T {(q, σ, (i, q, q )) 1 i n, (q, σ, q ) T, q F i } {((i, q, p), σ, (i, q, p )) 1 i n, (q, σ, q ) T, p if q p p = min(f i ) if q = p = mx(f i ) min(f i {r r p}) if q = p < mx(f i ), q, p, q F i } F = n ({i} {min(f i )} {min(f i )}) i=1 A run of the Büchi utomton first simply simultes (while in sttes Q) the Muller utomton nd then guesses the ccepting subset of the Muller utomton. The purpose of the order < on the sttes is tht we cn step through the sttes of the ccepting subset in order to mke sure tht ll sttes in the ccepting subset ctully occur infinitely often. In sttes {i} F i F i, the first component records the index i of the ccepting subset, the second component the currently visited stte of the Muller utomton, nd the third component the next stte (ccording to the order on the sttes) we need to see in order to mke progress towrds ccepting the input word. The Büchi utomton ccepts if we step through the sttes of the ccepting subset infinitely often. Recll tht we used similr trick in the construction of the Büchi utomton for the intersection of two Büchi-recognizble lnguges in Construction 3.2. Theorem 6.2. For every Muller utomton A there is Buchi utomton A such tht L(A) = L(A ). Proof. We show tht the Büchi utomton A of Construction 6.2 nd A re equivlent. L(A) L(A ): Let α L(A) nd r = q 0 q 1 q 2... be n ccepting run of A on α. As r is ccepting, we hve tht Inf(r) F, i.e., there is some 1 i n such tht Inf(r) = F i. Let m the first position such tht q j Inf(r) for ll j m nd consider some run r = q 0 q 1... q m 1 (i, q m, p 0 )(i, q m+1, p 1 )(i, q m+2, p 2 )... of A on α, which nondeterministiclly switches to (i, q m, p 0 ) t position m. For the ske of contrdiction ssume tht r is not ccepting. Then there is position k 0 such tht p j = p k for ll j k. Then lso q m+j p j for ll j k. However, this contrdicts tht p k F i. L(A ) L(A): Let α L(A ) nd r = q 0 q 1... q m 1 (i, q m, p 0 )(i, q m+1, p 1 )(i, q m+2, p 2 )... be some ccepting run of A on α, which hs to switch to some (i, q m, p 0 ) t some position m, s otherwise it would not be ccepting. By construction q j F i for ll j m nd for ech 26

31 p F i there re infinitely mny positions k such tht q k = p k = p. Thus, Inf(pr 2 (r)) = F i, yielding n ccepting run r = q 0 q 1 q 2... of A on α. We now show tht deterministic Muller utomt re closed, like nondeterministic Büchi utomt, under the Boolen opertions (complementtion, union, nd intersection). Construction 6.3. For deterministic Muller utomton A = (Σ, Q, I, T, muller(f)) we construct the deterministic Muller utomton A C = (Σ, Q, I, T, muller(2 Q F)) with L(A C ) = Σ ω L(A). We use the function pr n for n N to project to the (n 1)-th component of tuple of rbitrry length. If the tuple hs no such component, pr n is undefined. The first component is ccessed using pr 0, nd for sets we hve tht pr n (S) = s S pr n(s). Construction 6.4. For Muller utomt A 1 = (Σ, Q 1, I 1, T 1, muller(f 1 )) nd A 2 = (Σ, Q 2, I 2, T 2, muller(f 2 )) over the sme lphbet Σ, we construct the Muller utomton A = (Σ, Q 1 Q 2, I 1 I 2, T, muller(f )) with L(A ) = L(A 1 ) L(A 2 ) nd where A is deterministic if A 1 nd A 2 re deterministic, s follows: T = {((q 1, q 2 ), σ, (q 1, q 2)) (q 1, σ, q 1) T 1, (q 2, σ, q 2) T 2 } F = {P Q 1 Q 2 pr 0 (P ) F 1, pr 1 (P ) F 2 } Theorem 6.3. The lnguges recognizble by deterministic Muller utomt re closed under Boolen opertions (complementtion, union, intersection). Proof. Deterministic Muller utomt re closed under complementtion: For deterministic Muller utomton A, the utomton A of Construction 6.3 recognizes the complement lnguge, becuse ny set F / F hs to be in the complement, i.e., F 2 Q F. Deterministic Muller utomt re closed under intersection: For deterministic Muller utomt A 1 nd A 2, the utomton A of Construction 6.4 recognizes the intersection. Let r 1 = q 1 0q nd r 2 = q 2 0q be ccepting runs of A 1 nd A 2 on some α. Then r = (r 1 0, r 2 0)(r 1 1, r 2 1)... is n ccepting run of A on α nd vice vers. Deterministic Muller utomt re closed under union: They re closed under complement nd intersection, which suffices by De Morgn s lw. Theorem 6.4. A lnguge L is recognizble by deterministic Muller utomton if nd only if L is Boolen combintion of lnguges W where W Σ is regulr. Proof. : If W is regulr, then W is recognizble by deterministic Büchi utomton. Hence, W is recognizble by deterministic Muller utomton. Thus, the boolen combintion L is recognizble by deterministic Muller utomton. : A deterministic Muller utomton A ccepts some word α with unique run r if for some F F we hve tht Inf(r) = F. Thus, there is some F F such tht for ll q F we hve tht α W q nd for ll q / F we hve tht α / W q, where W q = L(A q ) for the finite-word utomton A q = (Σ, Q, I, T, {q}). Hence, α ( W q (Σ ω ) W q ). F F q F q / F 27

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

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

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

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs

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.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

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

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

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

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

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

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

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

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

CSCI FOUNDATIONS OF COMPUTER SCIENCE

CSCI FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not

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

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

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

CSC 473 Automata, Grammars & Languages 11/9/10

CSC 473 Automata, Grammars & Languages 11/9/10 CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

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

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

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

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

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

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

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

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

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

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

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

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

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

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

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

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

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

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

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

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

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

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

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.

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. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

This lecture covers Chapter 8 of HMU: Properties of CFLs This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B

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

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

7.2 The Definite Integral

7.2 The Definite Integral 7.2 The Definite Integrl the definite integrl In the previous section, it ws found tht if function f is continuous nd nonnegtive, then the re under the grph of f on [, b] is given by F (b) F (), where

More information

How Deterministic are Good-For-Games Automata?

How Deterministic are Good-For-Games Automata? How Deterministic re Good-For-Gmes Automt? Udi Boker 1, Orn Kupfermn 2, nd Mich l Skrzypczk 3 1 Interdisciplinry Center, Herzliy, Isrel 2 The Herew University, Isrel 3 University of Wrsw, Polnd Astrct

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

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model? CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction

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

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

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below. Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we

More information

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite

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

Bisimulation. R.J. van Glabbeek

Bisimulation. R.J. van Glabbeek Bisimultion R.J. vn Glbbeek NICTA, Sydney, Austrli. School of Computer Science nd Engineering, The University of New South Wles, Sydney, Austrli. Computer Science Deprtment, Stnford University, CA 94305-9045,

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.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

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

Finite Automata Part Three

Finite Automata Part Three Finite Automt Prt Three Hello Hello Wonderful Wonderful Condensed Condensed Slide Slide Reders! Reders! The The first first hlf hlf of of this this lecture lecture consists consists lmost lmost exclusively

More information

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes Jim Lmbers MAT 169 Fll Semester 2009-10 Lecture 4 Notes These notes correspond to Section 8.2 in the text. Series Wht is Series? An infinte series, usully referred to simply s series, is n sum of ll of

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

Handout: Natural deduction for first order logic

Handout: Natural deduction for first order logic MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

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

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA RIGHT LINEAR LANGUAGES. Right Liner Grmmr: Rules of the form: A α B, A α A,B V N, α V T + Left Liner Grmmr: Rules of the form: A Bα, A α A,B V N, α V T

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Hello Hello Condensed Condensed Slide Slide Reders! Reders! Tody s Tody s lecture lecture consists consists lmost lmost exclusively exclusively of of nimtions nimtions of of Turing

More information

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

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

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

CDM Automata on Infinite Words

CDM Automata on Infinite Words CDM Automt on Infinite Words 1 Infinite Words Klus Sutner Crnegie Mellon Universlity 60-omeg 2017/12/15 23:19 Deterministic Lnguges Muller nd Rin Automt Towrds Infinity 3 Infinite Words 4 As mtter of principle,

More information

Convex Sets and Functions

Convex Sets and Functions B Convex Sets nd Functions Definition B1 Let L, +, ) be rel liner spce nd let C be subset of L The set C is convex if, for ll x,y C nd ll [, 1], we hve 1 )x+y C In other words, every point on the line

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

DISCRETE MATHEMATICS HOMEWORK 3 SOLUTIONS

DISCRETE MATHEMATICS HOMEWORK 3 SOLUTIONS DISCRETE MATHEMATICS 21228 HOMEWORK 3 SOLUTIONS JC Due in clss Wednesdy September 17. You my collborte but must write up your solutions by yourself. Lte homework will not be ccepted. Homework must either

More information

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

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 UNIFORM CONVERGENCE Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 Suppose f n : Ω R or f n : Ω C is sequence of rel or complex functions, nd f n f s n in some sense. Furthermore,

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Lecture 1. Functional series. Pointwise and uniform convergence.

Lecture 1. Functional series. Pointwise and uniform convergence. 1 Introduction. Lecture 1. Functionl series. Pointwise nd uniform convergence. In this course we study mongst other things Fourier series. The Fourier series for periodic function f(x) with period 2π is

More information