An Automata Toolbox. Mikołaj Bojańczyk and Wojciech Czerwiński

Size: px
Start display at page:

Download "An Automata Toolbox. Mikołaj Bojańczyk and Wojciech Czerwiński"

Transcription

1 An Automt Toolbox Mikołj Bojńczyk nd Wojciech Czerwiński

2

3 Prefce T hese re lecture notes for course on dvnced utomt theory, tht we gve t the University of Wrsw in the yers The mteril ws chosen to highlight interesting constructions; with smller emphsis on the theoreticl nd bibliogrphicl context. The first prt of the book the lectures is written by the first uthor, nd the second prt the exercise solutions is written written by the second uthor. Nevertheless, we consulted ech other extensively in the process of both teching nd writing. Mikołj Bojńczyk nd Wojciech Czerwiński

4

5 Contents 1 Deterministion of w-utomt Automt models for w-words Pruning the grph of runs to tree Finding n ccepting pth in tree grph 15 2 Infinite durtion gmes Gmes Memoryless determincy of prity gmes 29 3 Prity gmes in qusipolynomil time Reduction to rechbility gmes A smll rechbility utomton for loop prity 40

6 4 Distnce utomt 51 5 Mondic second-order logic Mondic second-order logic Finite trees Infinite trees 64 6 Treewidth Treewidth nd how to compute it Courcelle s Theorem 82 7 Tree-wlking utomt Tree-wlking utomt cnnot be determinised Proof of the rottion lemm Weighted utomt over field Minimistion of weighted utomt Algorithms for equivlence nd minimistion Undecidble emptiness 133

7 9 Vector ddition systems Polynomil grmmrs Appliction to equivlence of register utomt Prsing in mtrix multipliction time Two-wy trnsducers Sequentil functions Rtionl functions Deterministic two-wy trnsducers Streming string trnsducers Equivlence fter rtionl preprocessing Lookhed removl Lerning utomt 213 II Exercise solutions 217

8

9

10

11 1 Deterministion of w-utomt In this chpter, we discuss utomt for w-words, i.e. infinite words of the form We write S w for the set of w words over lphbet S. The topic of this chpter is McNughton s Theorem, which shows tht utomt over w-words cn be determinised. A more in depth ccount of utomt (nd logic) for w words cn be found in [55]. 1.1 Automt models for w-words A nondeterministic Büchi utomton is type of utomton for w-words. Its syntx is typiclly defined to be the sme s tht of n nondeterministic finite utomton: set of sttes, n input lphbet, initil nd ccepting subsets of sttes, nd set of trnsitions. For our presenttion it is more convenient to use ccepting trnsitions, i.e. the ccepting set is set of trnsitions, not set of sttes. An infinite word is ccepted by the utomton if there exists run which begins in one of the initil sttes, nd visits some ccepting trnsition infinitely often. Exmple 1. Consider the set of words over lphbet {, b} where the letter ppers finitely often. This lnguge is recognised by nondeterministic Büchi

12 4 DETERMINISATION OF w -AUTOMATA utomton like this (we dopt the convention tht ccepting trnsitions re red edges):,b b b This chpter is bout determinising Büchi utomt. One simple ide would be to use the stndrd powerset construction, nd ccept n input word if infinitely often one sees subset (i.e. stte of the powerset utomton) which contins t lest one ccepting trnsition. This ide does not work, s witnessed by the following picture describing run of the utomton from Exmple 1: the utomton the runs of the utomton over (bb) ω b b b b b b b b b,b b... n ccepting trnsition is seen infinitely often In fct, Büchi utomt cnnot be determinised using ny construction. Fct 1.1. Nondeterministic Büchi utomt recognise strictly more lnguges thn deterministic Büchi utomt. Proof. Tke the utomton from Exmple 1. Suppose tht there is deterministic Büchi utomton tht is equivlent, i.e. recognises the sme lnguge. Let us view the set of ll possible inputs s n infinite tree, where the

13 AUTOMATA MODELS FOR w -WORDS 5 vertices re prefixes {, b}. Since the utomton is deterministic, to ech edge of this tree one cn uniquely ssign trnsition of the utomton. Every vertex v 2{, b} of this tree hs n ccepting trnsition in its subtree, becuse the word vb w should hve n ccepting run. Therefore, we cn find n infinite pth in this tree which hs infinitely often nd uses ccepting trnsitions infinitely often. The bove fct shows tht if we wnt to determines utomt for w-words, we need something more powerful thn the Büchi condition. One solution is clled the Muller condition, nd is described below. Lter we will see nother, equivlent, solution, which is clled the prity condition. Muller utomt. The syntx of Muller utomton is the sme s for Büchi utomton, except tht the ccepting set is different. Suppose tht D is the set of trnsitions. Insted of being set F D of trnsitions, the ccepting set in Muller utomton is fmily F PD of sets of trnsitions. A run is defined to be ccepting if the set of trnsitions visited infinitely often belongs to the fmily F. Exmple 2. Consider this utomton b b Suppose tht we set F to be ll subsets which contin only trnsitions tht enter the blue stte, s in the following picture.

14 6 DETERMINISATION OF w -AUTOMATA { },, set of trnsitions is visulised s the prt of the utomton tht only uses trnsitions from tht set it is impossible to see this prticulr set of trnsitions (nd no others) infinitely often In this cse, the utomton will ccept words which contin infinitely mny s nd finitely mny b s. If we set F to be ll subsets which contin t lest one trnsition tht enters the blue stte, then the utomton will ccept words which contin infinitely mny s. Deterministic Muller utomt re clerly closed under complement it suffices to replce the ccepting fmily by PD F. This lecture is devoted to proving the following deterministion result. Theorem 1.2 (McNughton s Theorem). For every nondeterministic Büchi utomton there exists n equivlent (ccepting the sme w-words) deterministic Muller utomton. The converse of the theorem, nmely tht deterministic Muller (even nondeterministic) utomt cn be trnsformed into equivlent nondeterministic Büchi utomt is more strightforwrd, see Exercise 4. It follows tht from the bove discussion tht nondeterministic Büchi utomt nondeterministic Muller utomt deterministic Muller utomt hve the sme expressive power, but deterministic Büchi utomt re weker. Theorem 1.2 ws first proved by McNughton in [37]. The proof here is similr

15 AUTOMATA MODELS FOR w -WORDS 7 to one by Muller nd Schupp [40]. An lterntive proof method is the Sfr Construction, see e.g. [55]. The proof strtegy is s follows. We first define fmily of lnguges, clled universl Büchi lnguges, nd show tht the McNughton s theorem boils down to recognising these lnguges with deterministic Muller utomt. Then we do tht. The universl Büchi lnguge. For n 2 N, define width n dg to be directed cyclic grph where the nodes re pirs {1,..., n} {1, 2,...} nd every edge is of the form (q, i)! (p, i + 1) for some p, q 2{1,..., n} nd i 2{1, 2,...}. Furthermore, every edge is either red or blck, with red mening ccepting. We ssume tht there re no prllel edges. Here is picture of width 3 dg:... In the pictures, we dopt the convention tht the i-th column stnds for the set of vertices {1,..., n} {i}. The top left corner of the picture, nmely the vertex (1, 1) is clled the initil vertex. The essence of McNughton s theorem is showing tht for every n, there is deterministic Muller utomton which inputs width n dg nd sys if it contins pth tht begins in the initil vertex nd visits infinitely mny red (ccepting) edges. In order to write such n utomton, we need to encode s width n dg s n w-word over some finite lphbet. This is done using n lphbet, which we denote by [n], where the letters look like this:

16 8 DETERMINISATION OF w -AUTOMATA Formlly speking, [n] is the set of functions {1,..., n} {1,..., n}!{no edge, non-ccepting edge, ccepting edge}. Define the universl n stte Büchi lnguge to be the set of words w 2 [n] w which, when treted s width n dg, contin pth tht strts in the initil vertex nd visits ccepting edges infinitely often. The key to McNughton s theorem is the following proposition. Proposition 1.3. For every n 2 N there is deterministic Muller utomton recognising the universl n stte Büchi lnguge. Before proving the proposition, let us show how it implies McNughton s theorem. To mke this nd other proofs more trnsprent, it will be convenient to use trnsducers. Define sequentil trnsducer to be deterministic finite utomton, without ccepting sttes, where ech trnsition is dditionlly lbelled by word over from some output lphbet. In this section, we only cre bout the specil cse when the output words hve exctly one letter; this is sometimes clled letter-to-letter trnsducer. The nme trnsducer refers to n utomton which outputs more thn just yes/no; lter in this book we will see other (nd more powerful) types of trnsducers, with nmes like rtionl trnsducer or regulr trnsducer. If the input lphbet is S nd the output lphbet is G, then sequentil trnsducer defines function f : S w! G w. Exmple 3. Here is picture of sequentil trnsducer which inputs word over {, b} nd replces letters on even-numbered positions by.

17 / AUTOMATA MODELS FOR w -WORDS 9 trnsition /b mens tht letter is input, nd letter b is output / b/b / b/ Lemm 1.4. Lnguges recognised by deterministic Muller utomt re closed under inverse imges of sequentil letter-to-letter trnsducers, i.e. if A in the digrm below is deterministic Muller utomton f is sequentil trnsducer, there is deterministic Muller utomton B which mkes the following digrm commute: S w f G w B $ A {yes, no} Proof. The sttes of utomton B re the product of the sttes for f nd A. (The ssumption tht the trnsducer is letter-to-letter is not necessry, but the construction becomes more complicted.) Let us continue with the proof of McNughton s theorem. We clim tht every lnguge recognised by nondeterministic Büchi utomton reduces to universl Büchi lnguge vi some trnsducer. Let A be nondeterministic Büchi utomton with input lphbet S. We ssume without loss of generlity tht the sttes re numbers {1,..., n} nd the initil stte is 1. By simply copying the trnsitions of the utomton, one obtins sequentil trnsducer f : S w! [n] w

18 10 DETERMINISATION OF w -AUTOMATA such tht word w 2 A w is ccepted by A if nd only if f (w) contins pth from the initil vertex with infinitely mny ccepting edges. Here is picture: b c b c c b f... The sequentil trnsducer does even need sttes, i.e. one stte is enough: / c/ b/ By composing the trnsducer with the utomton from Proposition 1.3, we get deterministic Muller utomton equivlent to A. It now remins to show the proposition, i.e. tht the n stte universl Büchi lnguge cn be recognised by Muller utomton. The proof hs two steps. The first step is stted in Lemm 1.5 nd sys tht deterministic trnsducer cn replce n rbitrry dg by n equivlent tree. Here we use the nme tree for width n dg where, every non-isolted node other thn (1,1) hs exctly one incoming edge. Here is picture of such tree, with the isolted nodes not drwn:...

19 PRUNING THE GRAPH OF RUNS TO A TREE 11 Lemm 1.5. There is sequentil trnsducer f : [n] w! [n] w which outputs only trees nd is invrint with respect to the universl Büchi lnguge, i.e. if the input contins pth with infinitely mny ccepting edges, then so does the output nd vice vers. The second step is showing tht deterministic Muller utomton cn test if tree contins n ccepting pth. Lemm 1.6. There exists deterministic Muller utomton with input lphbet [n] such tht for every w 2 [n] w tht is tree, the utomton ccepts w if nd only if w contins pth from the root with infinitely mny ccepting edges. Combining the two lemms, we get Proposition 1.3, nd thus finish the proof of McNughton s theorem. Lemm 1.5 is proved in Section 1.2 nd Lemm 1.6 is proved in Section Pruning the grph of runs to tree We begin by proving Lemm 1.5, which sys tht sequentil trnsducer cn convert width n dg into tree, while preserving the existence of pth from the initil vertex with infinitely mny ccepting edges. The trnsducer is simply going to remove edges. Profiles. For pth p in width n-dg, define its profile to be the word of sme length over the lphbet ccepting nd non-ccepting which is obtined by replcing ech edge with its pproprite type. We consider order profiles lexicogrphiclly, with ccepting is smller thn non-ccepting. < <

20 12 DETERMINISATION OF w -AUTOMATA A finite pth p in width n dg is clled profile optiml if it hs lexicogrphiclly lest profile mong pths in w tht hve the sme source nd trget. Lemm 1.7. There is sequentil trnsducer f : [n] w! [n] w such tht if the input is w, then f (w) is tree with the sme rechble (from tie initil vertex) vertices s in w, nd such tht every finite pth in f (w) tht begins in the root is n optiml pth in w. Proof. We use the following congruence property of optiml pths: if p nd s re optiml pths such tht the trget of p is equl to the source of s, then lso their composition ps is optiml. A corollry is tht if we choose for every vertex in the input grph w n outgoing edge tht prticiptes in some optiml pth, then the putting ll of these edges together will yield tree s in the sttement of the clim. To produce such edges, fter reding the first n letters, the utomton keeps in its memory the lexicogrphic ordering on the profiles of optiml pths led from the root to nodes t depth n. Here is picture of the construction: input output The stte of the trnducer is this informtion: The rechble vertices re nd the lest profiles for reching them re ordered s 1 = 2 < 3

21 PRUNING THE GRAPH OF RUNS TO A TREE 13 Lemm 1.8. Let f be the sequentil trnsducer from Lemm 1.7. If the input to f contins pth with infinitely mny ccepting edges, then so does the output. Proof. Assume tht the input w to f contins pth with infinitely mny ccepting edges. Define sequence p 0, p 1,... of finite pths in f (w) s follows by induction. In the definition, we preserve the invrint tht ech pth in the sequence p 0, p 1,... cn be extended to n n ccepting pth in the grph w. We begin with p 0 being the edgeless pth tht begins nd ends in the root of the tree f (w). This pth p 0 stisfies the invrint, by the ssumption tht the input w contins pth with infinitely mny ccepting edges. Suppose tht p n hs been defined. By the invrint, we cn extend p n to n infinite pth in the grph w, nd therefore we cn extend p n to finite pth in w tht contins t lest one more ccepting edge. Define p n+1 to be the unique pth in the tree f (w) which hs the sme source nd trget s the new pth tht extends p n with t t let one ccepting edge.... edges in the tree f(w) edges in w the pth πn its extension with more ccepting edges the pth πn+1 Define P n to be the profile of the pth p n. We clim tht the sequence of profile P 0, P 1, P 2,... hs well defined limit

22 14 DETERMINISATION OF w -AUTOMATA lim P n = P 2{ccepting, non-ccepting} w. n! More precisely, we clim tht for every position i, the i-th letter of the profiles P 1, P 2,... eventully stbilises. The limit P is defined to be the sequence of these stble vlues. The limit exists becuse for every i, if we look t the prefixes of P 0, P 1,... of length i, then they get lexicogrphiclly smller nd smller; nd therefore they must eventully stbilise, s in the following picture: P0 P1 P2 P3 P4 P5 P6 Clim 1.9. The limit P contins the letter ccepting infinitely often. Proof. Towrd contrdiction, suppose tht P hs the letter ccepting finitely often, i.e. there is some i such tht fter i, only the letter non-ccepting ppers in P. Choose n so tht p n, p n+1,... hve profile consistent with P on the first i letters. By construction, the profile P n+1 hs n ccepting letter on some position fter i, nd this property remins true for ll subsequent profiles

23 FINDING AN ACCEPTING PATH IN A TREE GRAPH 15 P n+2, P n+3... nd therefore is lso true in the limit, contrdicting our ssumption tht P hs only non-ccepting letters fter position i. Consider the set of finite pths in the tree f (w) which hve profile tht is prefix of P. This set of pths forms tree (becuse it is prefix-closed). This tree hs bounded degree (ssuming the prent of pth is obtined by removing the lst edge) nd it contin pths of rbitrry finite length (suitble prefixes of the pths p 1, p 2,...). The Köning lemm sys tht every finitely brnching tree with rbitrrily long pths contins n infinite pth. Applying the König lemm to the pths in f (w) with profile P, we get n infinite pth with profile P. By Clim 1.9 this pth hs infinitely mny ccepting edges. 1.3 Finding n ccepting pth in tree grph We now show Lemm 1.6, which sys tht deterministic Muller utomton cn check if width n tree contins pth with infinitely mny ccepting edges. Consider tree t 2 [n] w, nd let d 2 N be some depth. Define node to be importnt for depth d if it is either: the root, node t depth d, or node which is closest common ncestor of two nodes t depth d. This definition is illustrted below (with solid lines representing ccepting edges, nd dotted lines representing non-ccepting edges): depth d importnt node for depth d importnt node for depth d pth connecting importnt nodes for depth d

24 16 DETERMINISATION OF w -AUTOMATA Definition of the Muller utomton. We now describe the Muller utomton for Lemm 1.6. After reding the first d letters of n input tree (i.e. fter reding the input tree up to depth d), the utomton keeps in its stte tree, where the nodes correspond to nodes of the input tree tht re importnt for depth d, nd the edges corresponds to pths in the input tree tht connect these nodes. This tree stored by the utomton is tree with t most n leves, nd therefore it hs less thn 2n edges. The utomton lso keeps trck of colouring of the edges, with ech edge being mrked s ccepting or not, where ccepting mens tht the corresponding pth in the input tree contins t lest one ccepting edge. Finlly, the utomton remembers for ech edge n identifiers from the set {1,..., 2n 1}, with the identifier policy being described below. A typicl memory stte looks like this: identifier of the edge non-ccepting edge ccepting edge importnt node The big blck dots correspond to importnt nodes for the current depth, red edges re ccepting, blck edges re non-ccepting, while the numbers re the identifiers. All identifiers re distinct, i.e. different edges get different identifiers. It might be the cse (which is not true for the picture bove), tht the identifiers used t given moment hve gps, e.g. identifier 4 is used but not 3. The initil stte of the utomton is tree which hs one node, which is the root nd lef t the sme time, nd no edges. We now explin how the stte is updted. Suppose the utomton reds new letter, which looks something like this:

25 FINDING AN ACCEPTING PATH IN A TREE GRAPH 17 To define the new stte, perform the following steps. 1. Append the new letter to the tree in the stte of the utomton. In the exmple of the tree nd letter illustrted bove, the result looks like this: Eliminte pths tht do die out before reching the new mximl depth. In the bove picture, this mens eliminting the pth with identifier 4: Eliminte unry nodes, thus joining severl edges into single edge. This mens tht pth which only psses through nodes of degree one gets collpsed to single edge, the identifier for such pth is inherited from the first edge on the pth. In the bove picture, this mens eliminting the unry nodes tht re the trgets of edges with identifiers 1 nd 5: Finlly, if there re edges tht do not hve identifiers, these edges get ssigned rbitrry identifiers tht re not currently used. In the bove picture, there re two such edges, nd the finl result looks like this:

26 18 DETERMINISATION OF w -AUTOMATA This completes the definition of the stte updte function. We now define the cceptnce condition. The cceptnce condition. When executing trnsition, the utomton described bove goes from one tree with edges lbelled by identifiers to nother tree with edges lbelled by identifiers. For ech identifier, trnsition cn hve three possible effects, described below: 1. Delete. An edge cn be deleted in step 2 or in step 3 (by being merged with n edge closer to the root). The identifier of such n edge is sid to be deleted in the trnsition. Since we reuse identifiers, n identifier cn still be present fter trnsition tht deletes it, becuse it hs been dded gin in step 4, e.g. this hppens to identifier 4 in the bove exmple. 2. Refresh. In step 3, whole pth e 1 e 2 e n cn be folded into its first edge e 1. If the prt e 2 e n contins t lest one ccepting edge, then we sy tht the identifier of edge e 1 is refreshed. 3. Nothing. An identifier might be neither deleted nor refreshed, e.g. this is the cse for identifier 2 in the exmple. The following lemm describes the key property of the bove dt structure. Lemm For every tree in [n] w, the following re equivlent: () the tree contins pth from the root with infinitely mny ccepting edges; (b) some identifier is deleted finitely often but refreshed infinitely often. Before proving the bove fct, we show how it completes the proof of Lemm 1.6. We clim tht condition () cn be expressed s Muller condition

27 FINDING AN ACCEPTING PATH IN A TREE GRAPH 19 on trnsitions. The ccepting fmily of subsets of trnsitions is [ F i i where i rnges over possible identifiers, nd the fmily F i contins set X of trnsitions if some trnsition in X refreshes identifier i; nd none of the trnsitions in X delete identifier i. Identifier i is deleted finitely often but refreshed infinitely often if nd only if the set of trnsitions seen infinitely often belongs to F i, nd therefore, thnks to the fct bove, the utomton defined bove recognises the lnguge in the sttement of Lemm 1.6. Proof of Lemm The impliction from (b) to () is strightforwrd. An identifier in the stte of the utomton corresponds to finite pth in the input tree. If the identifier is not deleted, then this pth stys the sme or grows to the right (i.e. something is ppended to the pth). When the identifier is refreshed, the pth grows by t lest one ccepting stte. Therefore, if the identifier is deleted finitely often nd refreshed infinitely often, there is some pth tht keeps on growing with more nd more ccepting sttes, nd its limit is pth with infinitely mny ccepting edges. Let us now focus on the impliction from () to (b). Suppose tht the tree t contins some infinite pth p tht begins in the root nd hs infinitely mny ccepting edges. Cll n identifier ctive in step d if the pth described by this identifier in the d-th stte of the run corresponds to infix of the pth p. Let I be the set of identifiers tht re ctive in ll but finitely mny steps, nd which re deleted finitely often. This set is nonempty, e.g. the first edge of the pth p lwys hs the sme identifier. In prticulr, there is some step d, such tht identifiers from I re not deleted fter step n. Let i 2 I be the identifier tht is lst on the pth p, i.e. ll other identifiers in I describe finite pths tht re erlier on p. It is not difficult to see tht the identifier i must be refreshed infinitely often by prefixes of the pth p.

28 20 DETERMINISATION OF w -AUTOMATA Problem 1. Are the following lnguges regulr: 1. prefix of v belongs infinitely often to the fixed regulr lnguge of finite words L S ; 2. word v contins infinitely mny infixes of the form b p, where p is prime; 3. word v contins infinitely mny infixes of the form b p, where p is even. Problem 2. Let UP be the set of ultimtely periodic words, i.e. UP = {uv w : u, v 2 S }. Let L be regulr lnguge of infinite words. Show tht if L \ UP = then L =. Problem 3. Let K nd L be regulr lnguges of infinite words. Show tht if L \ UP = K \ UP then K = L. Problem 4. Are the following lnguges regulr: 1. word v contins rbitrry long infixes in the fixed regulr lnguge of finite words L; 2. prefix of v belongs infinitely often to the fixed lnguge of finite words L S (not necessrily regulr). Problem 5. Show tht lnguge of words there exists letter b cnnot be ccepted by nondeterministic utomton with Büchi cceptnce condition, where ll the sttes re ccepting (but possibly trnsitions over some letters missing in some sttes). Problem 6. Show tht lnguge finitely mny occurrences of letter cnnot be ccepted by deterministic utomton with Büchi cceptnce condition. Problem 7. Show tht every lnguge ccepted by some nondeterministic utomton with Muller cceptnce condition is lso ccepted by some nondeterministic utomton with Büchi cceptnce condition.

29 FINDING AN ACCEPTING PATH IN A TREE GRAPH 21 Problem 8. Assume tht we hve chnged the cceptnce condition into such which investigtes which sets of trnsitions re visited infinitely often. Does it ffect the expressivity of utomt? How it is for Büchi cceptnce condition? And how for Muller cceptnce condition? Problem 9. Show tht nonemptiness is decidble for utomt with Muller cceptnce condition. Problem 10. Let us define metric on infinite words: d(u, v) = 1 2diff(u,v), where diff(u, v) is the smllest index on which u nd v differ. Lnguge L jest open (in this metric) if for every w 2 L there exist some open bll centered in w which is included in L (so the stndrd definition). Prove tht the following conditions re equivlent for regulr lnguge L: 1. lnguge L is open; 2. lnguge L is of the form KS w for some K S ; 3. lnguge L is of the form KS w for some regulr K S. Problem 11. Consider trnsducer, which defines function f : S w! G w nd metrics on S w nd G w 1 defined s d(u, v) =. Show tht such n f is 2 diff (u,v) continuous. Problem 12. We will look for cndidte for Myhill-Nerode reltion for infinite words, i.e. n equivlence reltion L such tht L hs finite index iff L is regulr. Check whether this fct is true for the following reltions 1. L S S such tht u L v iff for ll w 2 S w it holds uw 2 L, vw 2 L; 2. L S w S w such tht u L v iff for ll w 2 S it holds wu 2 L, wv 2 L; 3. L S S such tht u L v iff for ll w 2 S w nd s, t 2 S it holds uw 2 L, vw 2 L nd s(ut) w 2 L, s(vt) w 2 L.

30

31 2 Infinite durtion gmes In this chpter, we prove the Büchi-Lndweber Theorem [15, Theorem 1], see lso [55, Theorem 6.5], which shows how to solve gmes with w-regulr winning conditions. These re gmes where two plyers move token round grph, yielding n infinite pth, nd the winner is decided bsed on some property of this pth tht is recognised by n utomton on w-words. The Büchi-Lndweber Theorem gives n lgorithm for deciding the winner in such gmes, thus nswering question posed in [18] nd sometimes clled Church s Problem. 2.1 Gmes In this chpter, we consider gmes plyed by two plyers (clled 0 nd 1), which re zero-sum, perfect informtion, nd most importntly, of potentilly infinite durtion. Definition 2.1 (Gme). A gme consists of directed grph, not necessrily finite, whose vertices re clled positions; distinguished initil position; prtition of the positions into positions controlled by plyer 0 nd positions controlled by plyer 1;

32 24 INFINITE DURATION GAMES lbelling of edges by finite lphbet S, nd winning condition, which is function from S w to the set of plyers {0, 1}. Intuitively speking, the winning condition inputs sequence of lbels produced in n infinite ply, nd sys which plyer wins. The definition is written in wy which highlights the symmetry between the two plyers; this symmetry will ply n importnt role in the nlysis. Here is picture. initil position 0 position controlled by plyer position controlled by plyer 1 b 1 b 1 b 0 ded end Winning condition for infinite plys: plyer 0 wins if lbel ppers infinitely often, otherwise 1 wins The gme is plyed s follows. The gme begins in the initil position. The plyer who controls the initil position chooses n outgoing edge, leding to new position. The plyer who controls the new position chooses n outgoing edge, leding to new position, nd so on. If the ply reches position with no outgoing edges (clled ded end), then the plyer who controls the ded end loses immeditely. Otherwise, the ply continues forever, nd yields n infinite pth nd the winner is given by pplying the the winning condition to the sequence of edge lbels seen in the ply. To formlise the notions in the bove prgrph, one uses the concept of strtegy. A strtegy for plyer i 2{0, 1} is function which inputs history of the ply so fr ( pth, possibly with repetitions, from the initil position to some position controlled by plyer i), nd outputs the new position (consistent with the edge reltion in the grph). Given strtegies for both plyers, cll these s 0 nd s 1, unique ply ( pth in the grph from the initil position) is

33 GAMES 25 obtined, which is either finite pth ending in ded end, or n infinite pth. This ply is clled winning for plyer i if it is finite nd ends in ded end controlled by the opposing plyer; or if it is infinite nd winning for plyer i ccording to the winning condition. A strtegy for plyer i is defined to be winning if for every every strtegy of the opponent, the resulting ply is winning for plyer i. Exmple 4. In the gme from the picture bove, plyer 0 hs winning strtegy, which is to lwys select the ft rrows in the following picture. 0 0 moves chosen by plyer 0 b 1 b 1 b 0 Determincy. A gme is clled determined if one of the plyers hs winning strtegy. Clerly it cnnot be the cse tht both plyers hve winning strtegies. One could be tempted to think tht, becuse of the perfect informtion, one of the plyers must hve winning strtegy. However, becuse of the infinite durtion, one cn use the xiom of choice to come up with strnge gmes where neither of the plyers hs winning strtegy. The gol of this chpter is to show theorem by Büchi nd Lndweber: if the winning condition of the gme is recognised by n utomton, then the gme is determined, nd furthermore the winning plyer hs finite memory winning strtegy, in the following sense. Definition 2.2 (Finite memory strtegy). Consider gme where the positions re V. Let i be one of the plyers. A strtegy for plyer i with memory M is given by:

34 26 INFINITE DURATION GAMES deterministic utomton with sttes M nd input lphbet V; nd for every position v controlled by i, function f v from M to the neighbours of v. The two ingredients bove define strtegy for plyer i in the following wy: the next move chosen by plyer i in position v is obtined by pplying the function f v to the stte of the utomton fter reding the history of the ply, including v. We will pply the bove definition to gmes with possibly infinitely mny positions, but we only cre bout finite memory sets M. An importnt specil cse is when the set M hs only one element, in which cse the strtegy is clled memoryless. For memoryless strtegy, the new position chosen by the plyer only depends on the current position, nd not on the history of the gme before tht. The strtegy in Exmple 4 is memoryless. Theorem 2.3 (Büchi-Lndweber Theorem). Let S be finite nd let Win : S w!{0, 1} be w-regulr, i.e. the inverse imge of 0 (nd therefore lso of 1) is recognised by deterministic Muller utomton. Then there exists finite set M such tht for every gme with winning condition Win, one of the plyers hs winning strtegy tht uses memory M. The proof of the bove theorem hs two prts. The first prt is to identify specil cse of gmes with w-regulr winning conditions, clled prity conditions, which mp sequence of numbers to the prity 2{0, 1} of the smllest number seen infinitely often. Definition 2.4 (Prity condition). A prity condition is ny function of the form 8 < w 2 I w 0 if the smllest number ppering infinitely often in w is even 7! : 1 otherwise for some finite set I N. Aprity gme is gme where the winning condition is prity condition.

35 GAMES 27 Prity gmes re importnt becuse not only cn they be won using finite memory strtegies, but even memoryless strtegies re enough. Theorem 2.5 (Memoryless determincy of prity gmes). For every prity gme, one of the plyers hs memoryless winning strtegy. In fct, for edge lbelled gmes (which is our choice) the prity condition is the only condition tht dmits memoryless winning strtegies regrdless of the grph structure of the gme, mong conditions tht re prefix independent, see [20, Theorem 4]. The bove theorem is proved in Section 2.2. The second step of the Büchi-Lndweber theorem is reduction to prity gmes. This essentilly boils down to trnsforming deterministic Muller utomt into clled deterministic prity utomt, which re defined s follows: prity utomton hs rnking function from sttes to numbers, nd run is considered ccepting if the smllest rnk ppering infinitely often is even. This is specil cse of the Muller condition, but it turns out to be expressively complete in the following sense: Lemm 2.6. For every deterministic Muller utomton, there is n equivlent deterministic prity utomton. Proof. The lemm cn be proved in two wys. One wy is to show tht, by tking more cre in the deterministion construction in McNughton s Theorem, we cn ctully produce prity utomton. Another wy is to use dt structure clled the lter ppernce record [31]. The construction is presented in the following clim. Clim 2.7. For every finite lphbet S, there exists deterministic utomton with input lphbet S, totlly ordered stte spce Q, nd function g : Q! P(S) with the following property. For every input word, the set of letters ppering infinitely often in the input is obtined by pplying g to the biggest stte tht ppers infinitely often in the run.

36 28 INFINITE DURATION GAMES Proof. The stte spce Q consists of dt structures tht look like this: c d b More precisely, stte is (possibly empty) sequence of distinct letters from S, with distinguished blue suffix. The initil stte is the empty sequence. After reding the first letter, the stte of the utomton is When tht utomton reds n input letter, it moves the input letter to the end of the sequence (if it ws not previously in the sequence, then it is dded), nd mrks s blue ll those positions in the sequence which were chnged, s in the following picture: previous stte c d b input letter c new stte d b c Consider run of this utomton over some infinite input w 2 S w. Tke some blue suffix of mximl size tht ppers infinitely often in the run. Then the letters in this suffix re exctly those tht pper in w infinitely often. Therefore, to get the sttement of the clim, we order Q first by the number of blue positions, nd in cse of the sme number of blue positions, we use some rbitrry totl ordering. The function g returns the set of blue positions. This completes the proof of the clim. The conversion of Muller to prity is strightforwrd corollry of the bove lemm: one pplies the bove lemm to the stte spce of the Muller utomton, nd defines the rnks ccording to the Muller condition.

37 MEMORYLESS DETERMINACY OF PARITY GAMES 29 Let us now finish the proof of the Büchi-Lndweber theorem. Consider gme with n w-regulr winning condition. By Lemm 2.6, there is deterministic prity utomton which ccepts exctly those sequences of edge lbels where plyer 0 wins. Consider new gme, cll it the product gme, where the positions re pirs (position of the originl gme, stte of the deterministic prity utomton). Edges in the product gme re of the form (v, q) b! (w, p) such tht v! w is n edge of the originl gme (the lbel of the edge is on top of the rrow), the deterministic prity utomton goes from stte q to stte p when reding lbel, nd b is the number ssigned to stte q by the prity condition. It is not difficult to see tht the following conditions re equivlent for every position v of the originl gme nd every plyer i 2{0, 1}: 1. plyer i wins from position v in the originl gme; 2. plyer i wins from position (v, q) in the product gme, where q is the initil stte of the deterministic prity utomton recognising L. The impliction from 1 to 2 crucilly uses determinism of the utomton nd would fil if nondeterministic utomton were used (under n pproprite definition of product gme). Since the product gme is prity gme, Theorem 2.5 sys tht for every position v, condition 2 must hold for one of the plyers; furthermore, positionl strtegy in the product gme corresponds to finite memory strtegy in the originl gme, where the memory is the sttes of the deterministic prity utomton. This completes the proof of the Büchi-Lndweber Theorem. It remins to show memoryless determincy of prity gmes, which is done below. 2.2 Memoryless determincy of prity gmes In this section, we prove Theorem 2.5 on memoryless determincy of prity gmes. The proof we use is bsed in [60] nd [55]. Recll tht in prity gme,

38 30 INFINITE DURATION GAMES the positions re ssigned numbers (clled rnks from now on) from finite set of nturl numbers, nd the gol of plyer i is to ensure tht for infinite plys, the miniml number ppering infinitely often hs prity i. Our gol is to show tht one of the plyers hs winning strtegy, nd furthermore this strtegy is memoryless. The proof of the theorem is by induction on the number rnks used in the gme. We choose the induction bse to be the cse when there re no rnks t ll, nd hence the theorem is vcuously true. For the induction step, we use the notion of ttrctors, which is defined below. Attrctors. Consider set of edges X in prity gme (ctully the winning condition nd lbelling of edges re irrelevnt for the definition). For plyer i 2{0, 1}, we define below the i-ttrctor of X, which intuitively represents positions where plyer i cn force visit to n edge from X. The ttrctor is pproximted using ordinl numbers. (For reder unfmilir with ordinl numbers, just think of nturl numbers, which re enough to tret the cse of gmes with finitely mny positions.) Define X 0 to be empty. For n ordinl number > 0, define X to be ll positions which stisfy one of the conditions (A), (B) or (C) depicted below: (C) is owned by opponent of plyer i nd every outgoing edge is in X or goes to position stisfying (A) opponent of plyer i (A) belongs to for some X plyer i (B) is owned by plyer i nd some outgoing edge is in X or goes to position stisfying (A)

39 MEMORYLESS DETERMINACY OF PARITY GAMES 31 The set X grows s the ordinl number grows, nd therefore t some point it stbilises. If the gme hs finitely mny positions or, more generlly, finite outdegree then it stbilises fter finite number of steps nd ordinls re not needed. This stble set is clled the i-ttrctor of X. Over positions in the i-ttrctor, plyer i hs memoryless strtegy which gurntees tht fter finite number of steps, the gme will use n edge from X, or end up in ded end owned by the opponent of plyer i. This strtegy, clled the ttrctor strtegy, is to choose the neighbour tht belongs to X with the smllest possible index. Induction step. Consider prity gme. By symmetry, we ssume tht the miniml rnk used in the gme is n even number. By shifting the rnks, we ssume tht the miniml rnk is 0. For i 2{0, 1} define W i to be the set of positions v such tht if the initil position is replced by v, then plyer i hs memoryless winning strtegy. Define U to be the vertices tht re in neither W 0 nor in W 1. Our gol is to prove tht W is empty. Here is the picture: W 0 plyer 0 wins with memoryless strtegy W 1 plyer 1 wins with memoryless strtegy By definition, for every position in w 2 W i, plyer i hs memoryless winning strtegy tht wins when strting in position w. In principle, the memoryless strtegy might depend on the choice of w, but the following lemm shows tht this is not the cse.

40 32 INFINITE DURATION GAMES Lemm 2.8. Let i 2{0, 1} be one of the plyers. There is memoryless strtegy s i for plyer i, such tht if the gme strts in W i, then plyer i wins by plying s i. Proof. By definition, for every position w 2 W i there is memoryless winning strtegy, which we cll the strtegy of w. We wnt to consolidte these strtegies into single one tht does not depend on w. Choose some well-ordering of the vertices from W i, i.e. totl ordering which is well-founded. Such well-ordering exists by the xiom of choice. For position w 2 W i, define its compnion to be the lest position v such tht the strtegy of v wins when strting in w. The compnion is well defined becuse we tke the lest element, under well-founded ordering, of some set tht is nonempty (becuse it contins w). Define consolidted strtegy s follows: when in position w, ply ccording to the strtegy of the compnion of w. The key observtion is tht for every ply using this consolidted strtegy, the sequence of compnions is non-decresing in the well-ordering, nd therefore it must stbilise t some compnion v; nd therefore the ply must be winning for plyer i, since from some point on it is consistent with the strtegy of v. Define the gme restricted to U to be the sme s the originl gme, except tht we only keep positions from U. Some positions tht were not ded ends in the originl gme might become ded ends in the gme restricted to U, becuse outgoing edges to position outside U re removed in the restriction process. Define A to be the 0-ttrctor, inside the gme limited to U, of the rnk 0 edges in U (i.e. both endpoints re in U). Here is picture of the gme restricted to U:

41 MEMORYLESS DETERMINACY OF PARITY GAMES 33 A plyer 0 cn ttrct towrd rnk 0 rnk 0 rnk 0 rnk 0 rnk 0 Consider position in A tht is controlled by plyer 1. In the originl gme, ll outgoing edges from the position go to A [ W 0 ; becuse if there would be n edge to W 1 then the position would lso be in W 1. It follows tht: (1) In the originl gme, if the ply begins in position from A nd plyer 0 plys the ttrctor strtegy on the set A, then the ply is bound to either use n edge inside U tht hs miniml rnk 0, or in the set W 0. Consider the following gme H: we restrict the originl gme to positions from U A, nd remove ll edges which hve miniml rnk 0 (these edges necessrily originte in positions controlled by plyer 1, since otherwise they would be in A). Since this gme does not use rnk 0, the induction ssumption cn be pplied to get prtition of U A into two sets of positions U 0 nd U 1, such tht on ech U i plyer U i hs memoryless winning strtegy in the gme H:

42 34 INFINITE DURATION GAMES U U 0 1 Here is how the sets U 0, U 1 cn be interpreted in terms of the bigger originl gme. (2) In the originl gme, for every i 2{0, 1}, if the ply begins in position from U i nd plyer i uses the memoryless winning strtegy corresponding to U i, then either () the ply eventully visits position from A [ W 0 [ W 1 or n edge with rnk 0; or (b) plyer i wins. Here is picture of the originl gme with ll sets: U U 0 1 W plyer 0 wins with memoryless strtegy W 0 1 rnk 0 plyer 0 cn ttrct towrd rnk 0 rnk 0 A rnk 0 rnk 0 plyer 1 wins with memoryless strtegy Lemm 2.9. U 1 is empty. Proof. Consider this memoryless strtegy for plyer 1 in the originl gme:

43 MEMORYLESS DETERMINACY OF PARITY GAMES 35 in U 1 use the winning memoryless strtegy inherited from the gme restricted to U A; in W 1 use the winning memoryless strtegy from Lemm 2.8; in other positions do whtever. We clim tht the bove memoryless strtegy is winning for ll positions from U 1, nd therefore U 1 must be empty by ssumption on W 1 being ll positions where plyer 1 cn win in memoryless wy. Suppose plyer 1 plys the bove strtegy, nd the ply begins in U 1. If the ply uses only edges tht re in the gme H, then plyer 1 wins by ssumption on the strtegy. The ply cnnot use n edge of rnk 0 tht hs both endpoints in U, becuse these were removed in the gme H. The ply cnnot enter the sets W 0 or A, becuse this would hve to be choice of plyer 0, nd positions with such choice lredy belong to W 0 or A. Therefore, if the ply leves U A, then it enters W 1, where plyer 1 wins s well. In the originl gme, consider the following memoryless strtegy for plyer 0: in U 0 use the winning memoryless strtegy from the gme H; in W 0 use the winning memoryless strtegy from Lemm 2.8; in A use the ttrctor strtegy to rech rnk 0 edge inside U; on other positions, i.e. on W 1, do whtever. We clim tht the bove strtegy wins on ll positions except for W 1, nd therefore the theorem is proved. We first observe tht the ply cn never enter W 1, becuse this would hve to be choice of plyer 1, nd such choices re only possible in W 1. If the ply enters W 0, then plyer 0 wins by ssumption on W 0. Other plys will rech positions of rnk 0 infinitely often, or will sty in U 0 from some point on. In the first cse, plyer 0 will win by the ssumption on 0 being the miniml rnk. In the second cse, plyer 0 will win by the ssumption on U 0 being winning for the gme restricted to U A.

44 36 INFINITE DURATION GAMES This completes the proof of memoryless determincy for prity gmes, nd lso of the Büchi-Lndweber Theorem. Problem 13. We sy tht gme is finite if its gme tree is finite. Prove tht every finite gme is determined. Problem 14. Show tht finite rechbility gme cn be solved in polynomil time. Problem 15. We will now show n exmple of gme, which is not determined. We will construct this exmple by sequence of few exercises. First consider following riddle. There re infinitely mny plyers (countble mny), every one hs hut: either white or blck. Everybody sees the color of everybody else hut, but not of his own. Everybody should sy wht is the color of his hut, such tht only finitely mny plyers will mke mistke. They cn fix strtegy before, but they cnnot tell nything to ech other fter they will see the huts. Wht is the winning strtegy? Problem 16. Define function xor : {0, 1} w!{0, 1}, clled n infinite xor, such tht chnging one bit or n rgument chnges the result. Problem 17. Consider the following two plyer gme. There is rectngulr chocolte in shpe of n k grid. The right upper corner piece is rotten. Plyers move in n lternting mnner, the first one moves first. Any plyer in his move hve to pick on still existing piece nd et with piece together with everything which is towrds the left nd bottom from the picked piece (the picked piece is right upper corner of the currently eten prt). The one who hs to et rotten piece loses. Determine who hs winning strtegy. Problem 18. Define non determined gme.

45 3 Prity gmes in qusipolynomil time In this chpter, we show the following result. Theorem 3.1. Prity gmes with n positions nd d rnks cn be solved in time n O(log d). The time in the bove theorem is specil cse of qusipolynomil time mentioned in the title of the chpter. Whether or not prity gmes cn be solved in time which is polynomil in both n nd d is n importnt open problem. The presenttion here is bsed on the originl pper [16], with some new terminology (notbly, the use of seprtion). Define rechbility gme to be gme where the objective of plyer 0 is to visit n edge from designted subset. (We ssume tht the designted subset contins ll edges pointing to ded ends of plyer 1, so tht winning by reching ded end is subsumed by reching designted edges.) Rechbility gmes cn be solved in time liner in the number of edges, s is shown in Exercise 19. Our proof strtegy for Theorem 3.1 is to reduce prity gmes to rechbility gmes of pproprite size. 3.1 Reduction to rechbility gmes The syntx of rechbility utomton is exctly the sme s the syntx of n nf. The semntics, however, is different: the utomton inputs n infinite

46 38 PARITY GAMES IN QUASIPOLYNOMIAL TIME word, nd ccepts if finl stte cn be reched (in other words, there is prefix which is ccepted by the utomton when viewed s n nf). For exmple, the following rechbility utomton,b ccepts ll w-words over lphbet {, b} which contin two consecutive s. A rechbility utomton is clled deterministic if its trnsition reltion is function. Consider n infinite word over n lphbet {1,..., n} {1,..., d}. We view this word s n infinite pth in gme, where the positions re {1,..., n} nd ech edge is lbelled by rnk from {1,..., d}. Ech letter describes position nd the rnk of n outgoing edge. An infix of such pth is clled n even loop if it begins nd ends in the sme vertex from {1,..., n} nd the mximl rnk in the infix is even. Likewise we define odd loops. Here is picture: letter {1,...,n} odd loop, mx is 5 odd loop, mx is {1,...,d} The following lemm shows tht to quickly solve prity gmes, it suffices to find smll deterministic rechbility utomton which seprtes the properties ll loops re even nd ll loops re odd.

47 REDUCTION TO REACHABILITY GAMES 39 Lemm 3.2. Let n, d 2{1, 2,...}. Assume tht one cn compute deterministic rechbility utomton D with input lphbet {1,..., n} {1,..., d} tht ccepts every w-word where ll loops re even, nd rejects every w-word where ll loops re odd, s in the following picture: ({1,...,n} {1,...,d}) ω ll loops re even ll loops re odd words ccepted by the rechbility utomton Then prity gme G with n positions nd d rnks cn be solved in time O((number of edges in G) (number of sttes in D))+time to compute D Proof. Let G be prity gme with vertices {1,..., n} nd edges lbelled by prity rnks {1,..., d}. Let D be n utomton s in the ssumption of the lemm. Consider product gme G D, s defined on pge 29, i.e. the positions re pirs (position of v, stte of A) nd the structure of the gme is inherited from G with only the sttes being updted ccording to the prity rnks on eges. Plyer 0 wins the product gme G D if ded end of plyer 1 is reched, or if the ply is infinite nd ccepted by D (in the ltter cse, by the ssumption tht D is rechbility utomton, this is done by reching n ccepting stte of D t some point during the ply). Clim 3.3. If plyer i 2{0, 1} wins G, then plyer i lso wins G D.

48 40 PARITY GAMES IN QUASIPOLYNOMIAL TIME Proof. By symmetry, tke i = 0. Let s 0 be winning strtegy for plyer i in the gme G. By memoryless determincy of prity gmes, we ssume tht s 0 is memoryless. Let G 0 be the grph obtined from the grph underlying the gme G by fixing the memoryless strtegy s 0, i.e. by removing every edge tht origintes in position owned by plyer 0 nd is not used by the strtegy s 0. Pths in the grph G 0 correspond to plys in the gme G tht re consistent with strtegy s 0. Becuse s 0 ws winning in the gme G, ll infinite pths in G stisfy the prity condition. In prticulr, every loop in G 0 tht is ccessible from the initil vertex hs even mximum. This mens tht every infinite pth in G 0 is ccepted by the utomton D. Therefore, the sme strtegy s 0 lso wins in the gme G D. Becuse D is rechbility utomton, the product gme G D cn be solved in time proportionl to the number of its edges, which is consistent with the bound in the lemm. 3.2 A smll rechbility utomton for loop prity By Lemm 3.2, to prove Theorem 3.1, it suffices to find deterministic utomton which seprtes ll loops even from ll loops odd, nd which hs qusipolynomil stte spce (nd time to compute the utomton). As wrm-up, we present simpler construction which hs n d/2 sttes. Fct 3.4. Let n, d 2{1, 2,...}. There is deterministic rechbility utomton with n d/2 sttes which stisfies the properties in Lemm 3.2. Proof. Consider finite word over the lphbet {1,..., n} {1,..., d}. For rnk 2{1,..., d}, position in the word is clled -visible if its letter hs rnk exctly, nd ll lter positions hve rnks pple, s in the following picture

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

19 Optimal behavior: Game theory

19 Optimal behavior: Game theory Intro. to Artificil Intelligence: Dle Schuurmns, Relu Ptrscu 1 19 Optiml behvior: Gme theory Adversril stte dynmics hve to ccount for worst cse Compute policy π : S A tht mximizes minimum rewrd Let S (,

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

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

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

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

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

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

Theoretical foundations of Gaussian quadrature

Theoretical foundations of Gaussian quadrature Theoreticl foundtions of Gussin qudrture 1 Inner product vector spce Definition 1. A vector spce (or liner spce) is set V = {u, v, w,...} in which the following two opertions re defined: (A) Addition of

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

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

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

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

Riemann is the Mann! (But Lebesgue may besgue to differ.) Riemnn is the Mnn! (But Lebesgue my besgue to differ.) Leo Livshits My 2, 2008 1 For finite intervls in R We hve seen in clss tht every continuous function f : [, b] R hs the property tht for every ɛ >

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

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

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

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

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

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

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

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

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

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

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

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

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

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

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

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

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties; Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

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

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

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

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

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

1 Sets Functions and Relations Mathematical Induction Equivalence of Sets and Countability The Real Numbers...

1 Sets Functions and Relations Mathematical Induction Equivalence of Sets and Countability The Real Numbers... Contents 1 Sets 1 1.1 Functions nd Reltions....................... 3 1.2 Mthemticl Induction....................... 5 1.3 Equivlence of Sets nd Countbility................ 6 1.4 The Rel Numbers..........................

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

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

Chapter 14. Matrix Representations of Linear Transformations

Chapter 14. Matrix Representations of Linear Transformations Chpter 4 Mtrix Representtions of Liner Trnsformtions When considering the Het Stte Evolution, we found tht we could describe this process using multipliction by mtrix. This ws nice becuse computers cn

More information

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

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004 Advnced Clculus: MATH 410 Notes on Integrls nd Integrbility Professor Dvid Levermore 17 October 2004 1. Definite Integrls In this section we revisit the definite integrl tht you were introduced to when

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

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

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

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

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

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

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

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

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies Stte spce systems nlysis (continued) Stbility A. Definitions A system is sid to be Asymptoticlly Stble (AS) when it stisfies ut () = 0, t > 0 lim xt () 0. t A system is AS if nd only if the impulse response

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 2013 Outline 1 Riemnn Sums 2 Riemnn Integrls 3 Properties

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

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

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

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

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

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS. THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 203 Outline Riemnn Sums Riemnn Integrls Properties Abstrct

More information

Chapter 0. What is the Lebesgue integral about?

Chapter 0. What is the Lebesgue integral about? Chpter 0. Wht is the Lebesgue integrl bout? The pln is to hve tutoril sheet ech week, most often on Fridy, (to be done during the clss) where you will try to get used to the ides introduced in the previous

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

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

USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year

USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year 1/1/21. Fill in the circles in the picture t right with the digits 1-8, one digit in ech circle with no digit repeted, so tht no two circles tht re connected by line segment contin consecutive digits.

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

20 MATHEMATICS POLYNOMIALS

20 MATHEMATICS POLYNOMIALS 0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of

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

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 Online Learning and Regret Minimization

1 Online Learning and Regret Minimization 2.997 Decision-Mking in Lrge-Scle Systems My 10 MIT, Spring 2004 Hndout #29 Lecture Note 24 1 Online Lerning nd Regret Minimiztion In this lecture, we consider the problem of sequentil decision mking in

More information

Main topics for the First Midterm

Main topics for the First Midterm Min topics for the First Midterm The Midterm will cover Section 1.8, Chpters 2-3, Sections 4.1-4.8, nd Sections 5.1-5.3 (essentilly ll of the mteril covered in clss). Be sure to know the results of the

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

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

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

Lecture 3. Limits of Functions and Continuity

Lecture 3. Limits of Functions and Continuity Lecture 3 Limits of Functions nd Continuity Audrey Terrs April 26, 21 1 Limits of Functions Notes I m skipping the lst section of Chpter 6 of Lng; the section bout open nd closed sets We cn probbly live

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

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

Integral points on the rational curve

Integral points on the rational curve Integrl points on the rtionl curve y x bx c x ;, b, c integers. Konstntine Zeltor Mthemtics University of Wisconsin - Mrinette 750 W. Byshore Street Mrinette, WI 5443-453 Also: Konstntine Zeltor P.O. Box

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

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

Math 4310 Solutions to homework 1 Due 9/1/16 Mth 4310 Solutions to homework 1 Due 9/1/16 1. Use the Eucliden lgorithm to find the following gretest common divisors. () gcd(252, 180) = 36 (b) gcd(513, 187) = 1 (c) gcd(7684, 4148) = 68 252 = 180 1

More information

Infinite Geometric Series

Infinite Geometric Series Infinite Geometric Series Finite Geometric Series ( finite SUM) Let 0 < r < 1, nd let n be positive integer. Consider the finite sum It turns out there is simple lgebric expression tht is equivlent to

More information

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.) MORE FUNCTION GRAPHING; OPTIMIZATION FRI, OCT 25, 203 (Lst edited October 28, 203 t :09pm.) Exercise. Let n be n rbitrry positive integer. Give n exmple of function with exctly n verticl symptotes. Give

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

A Complexity Measure on Büchi Automata

A Complexity Measure on Büchi Automata A Complexity Mesure on Büchi Automt Dn Fismn University of Pennsylvni fismn@ses.upenn.edu Abstrct. We define complexity mesure on non-deterministic Büchi utomt, bsed on the notion of the width of the skeleton

More information

Improper Integrals, and Differential Equations

Improper Integrals, and Differential Equations Improper Integrls, nd Differentil Equtions October 22, 204 5.3 Improper Integrls Previously, we discussed how integrls correspond to res. More specificlly, we sid tht for function f(x), the region creted

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

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

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

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014 SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 014 Mrk Scheme: Ech prt of Question 1 is worth four mrks which re wrded solely for the correct nswer.

More information

KNOWLEDGE-BASED AGENTS INFERENCE

KNOWLEDGE-BASED AGENTS INFERENCE AGENTS THAT REASON LOGICALLY KNOWLEDGE-BASED AGENTS Two components: knowledge bse, nd n inference engine. Declrtive pproch to building n gent. We tell it wht it needs to know, nd It cn sk itself wht to

More information