Complementing Büchi Automata

Size: px
Start display at page:

Download "Complementing Büchi Automata"

Transcription

1 Complementing Bühi Automt Guillume Sdegh Tehnil Report n o 090, My 009 revision 07 Model heking is field of forml verifition whih ims to utomtilly hek the ehvior of system with the help of logi formulæ. SPOT is model heking lirry whih relies on one pproh: the utomt-theoreti pproh. In this tehnique, oth system nd formul re expressed with ω-utomt, whih re utomt on infinite words. SPOT provides severl lgorithms to do opertions with these utomt. However, n lgorithm is missing: the omplementtion of Bühi utomt. Beuse of its high omplexity this lgorithm is rrely used in prtie, ut it does not lk theoretil interests sine SPOT uses prtiulr vrint of ω-utomt. We present n implementtion of this lgorithm in SPOT. Le model heking est un domine de l vérifition formelle, qui permet de vérifier le omportement d un système à trvers des formules logiques. SPOT est une iliothèque de model heking qui repose sur une des tehniques du domine : l pprohe utomte. Dns ette pprohe du model heking, le système et les formules sont représentés sous forme d utomtes eptnt des mots de longueur infinie, et plus prtiulièrement des utomtes de Bühi. SPOT propose de nomreux lgorithmes ux utilisteurs de l iliothèque pour mnipuler e type d utomtes, en vue d pplitions u model heking. Pourtnt, un lgorithme est mnqunt : elui de l omplémenttion d utomtes de Bühi (qui produit un utomte reonnissnt l négtion du lngge initilement reonnu). Cet lgorithme est peu utilisé dns l prtique à use de s forte omplexité, mis il ne mnque ps d intérêt du point de vue théorique. Nous présenterons une implémenttion d un tel lgorithme dns SPOT. Keywords Bühi utomt, omplementtion, determiniztion, Sfr onstrution, Streett to Bühi trnsformtion. Lortoire de Reherhe et Développement de l Epit -6, rue Voltire F-976 Le Kremlin-Biêtre edex Frne Tél Fx sdegh@lrde.epit.fr

2 Copying this doument Copyright 009 LRDE. Permission is grnted to opy, distriute nd/or modify this doument under the terms of the GNU Free Doumenttion Liense, Version. or ny lter version pulished y the Free Softwre Foundtion; with the Invrint Setions eing just Copying this doument, no Front- Cover Texts, nd no Bk-Cover Texts. A opy of the liense is provided in the file COPYING.DOC.

3 Contents Introdution 5 Automt on infinite words 7. Definitions ω-utomt Mode of trnsition-funtion Aeptnes onditions Leling Opertions on ω-utomt Determiniztion Complementtion Complementing Bühi utomt 6. Determiniztion of Bühi utomt The lssil powerset onstrution Sfr s onstrution Exmple Deterministi Streett to nondeterministi Bühi utomt Constrution of the trnsformtion Exmple Implementtion in SPOT 6. Detils on the implementtion Implementtion of Sfr s onstrution Implementtion of the Streett-to-Bühi trnsformtion Testing the implementtion Benhmrk Perspetives 0. Working with Trnsition-sed Generlized Bühi utomt Streett to Generlized Bühi utomt Sfr optimiztions Conlusion

4 CONTENTS A Exmple A. Sfr onstrution A. Trnsformtion of deterministi Streett utomton into non-deterministi Bühi A. Benhmrks Referenes 6

5 Introdution Model heking is field of forml verifition whih ims to utomtilly hek the ehvior of system with the help of logi formulæ. The gol of this verifition is to onfirm whether system stisfies set of properties. SPOT (Duret-Lutz nd Poitrenud, 00) is model heking lirry tht relies on one pproh: the utomt-theoreti pproh. In this tehnique, oth system nd formul re expressed with ω-utomt, whih re utomt on infinite words. The utomton tht represents the system to verify hs for lnguge L (A M ), the set of ll possile exeutions of the system. Properties to verify re expressed with the negted formul utomton, whose lnguge, L (A ϕ ) is the set of ll exeutions tht would invlidte the formul. Thus, the intersetion of these two utomt will produe n utomton whose lnguge is the set of ll possile exeutions of the system tht would invlidte the formul. With this lst utomton, proedure lled emptiness hek heks whether the reognized lnguge is empty. When this lnguge is empty, the properties stisfy the system. However, if this lnguge epts non-empty word, then there exists run in the system tht invlidtes the logi formul. SPOT provides set of lgorithms to work with kind of ω-utomt lled Trnsition-sed Generlized Bühi Automton (TGBA). Most of the ommon opertions on ω-utomt used in model heking lredy exist in the lirry, ut the omplementtion, whih is ommon proedure with utomt on finite words is missing. Complementing n utomton mens onstruting nother utomton tht would reognized the omplemented lnguge of the initil one. Even though this opertion would e relly useful in model heking sine formulæ re negted to represent unexpeted ehviors, in prtie this opertion is unrelisti. This is due to the lk of effiient lgorithms, sine even est ones hve n exponentil omplexity. Therefore, model heking voids omplementtion y different wys. For exmple, to void to omplement the utomton of logi formul, lgorithms tht trdue formulæ into utomt use the negtion of the logi formul efore the trnsltion. However, some systems to express properties like the expressions ω-regulr nnot e negted esily. For those kind of systems, hving omplementtion on utomt is useful. Another purpose of implementing this lgorithm is lso to enrih our lirry with nother opertion. Sine SPOT is lirry tht provides lgorithm for its users, nyone ould e interesting in this opertion. Moreover, sine SPOT uses Trnsition-sed Generlized Bühi utomt s kind of ω-utomt, it ould lso e n interesting theoretil sujet to show how this kind of utomt n improve the omplexity of the lgorithms tht we will present lter.

6 CONTENTS 6 Outline: Chpter will give some kground on ω-utomt, with definitions nd n overview of the opertions tht will interest us. In Chpter we will disuss how to omplement Trnsition-sed Generlized Bühi utomton y desriing the two min lgorithms we used. Chpter will present how these lgorithms re implemented in SPOT, nd will disuss some enhmrks. Chpter will present future works to omplish on the omplementtion, nd we will onlude in the lst hpter.

7 Chpter Automt on infinite words While lssil finite utomt reognize words of finite length, ω-utomt reognize words of infinite length ut with finite numer of sttes.. Definitions.. ω-utomt Figure. presents the grphil representtion of ω-utomt. Trnsitions Initil stte Stte in the eptne ondition Sttes Figure.: An ω-utomton Definition... An ω-utomton is quintuple A = (Q, Σ, δ, q 0, F ) with: Q finite set of sttes. Σ the lphet. δ : Q Σ Q the trnsition funtion. q 0 Q the initil stte. F the eptne ondition, whih is formul on sttes. The differene with utomt on finite words lies in these eptne onditions.

8 . Definitions 8 Definition... A sequene of sttes π = π 0, π, π,... Q ω is lled run over n infinite word σ Σ ω, if π 0 = σ 0 nd for every i suh s σ i is the ith letter of σ, π i+ δ(π i, σ i ). An epting run is run tht stisfies the eptne ondition. Exmple. A run of the utomton in Figure. ould e π =,,,... with the stte meet infinitely often. Definition... The infinity set of run π is the set of sttes tht ours infinitely mny time in π nd is denoted inf(π). Exmple. With the previous exmple, inf(π) = { }, sine the stte ours infinitely often in the run. Definition... The lnguge of A is the set of ll the inputs with n epting run of A, nd is denoted L (A) Exmple. The lnguge of the utomton in Figure. with n eptne ondition tht requires to visit infinitely often to e epting would e: word with the letter finitely often nd then the letter infinitely often ( Bhi ω ). Remrk..5. The numer of suessors of stte q Q for the lel σ Σ is denoted δ(q, σ). The properties on ω-utomt n e divided in three riteri used to denote the different kinds of utomt. Their mode of trnsition-funtion, tht defines the semnti of run of n utomton. Their type of eptne ondition, tht defines whether run of the utomton is epting. Their leling, on sttes for most model hekers nd lgorithms, or on trnsitions for few ones like SPOT. These three riteri re detiled in the next setions... Mode of trnsition-funtion The mode of trnsition-funtion defines how run of n utomton ours. We usully distinguish: deterministi utomt, non-deterministi utomt nd universl utomt. An utomton is lled deterministi when eh trnsition funtion δ(q, σ) hs extly one suessor. More formlly, we n sy: iff σ Σ A, q Q A, δ(q, σ), then A is deterministi. Exmple. Figure. represents deterministi utomton sine eh stte hs extly one suessor for eh letter σ. An utomton where trnsition funtion δ(q, σ) my hve more thn one suessor is lled: non-deterministi, when the semnti is to hoose non-deterministilly one stte s suessor when trnsition funtion returns more thn one suessor. Exmple. Interpreted s non-deterministi ω-utomton, run of the word over the utomton in Figure. will reh sttes, OR,.

9 9 Automt on infinite words universl, when the semnti is to visit ll the suessors when trnsition funtion returns more thn one suessor. Exmple. Interpreted s universl ω-utomton, run of the word over the utomton in Figure. will reh sttes, AND,. (),, () Figure.: Deterministi, Non-deterministi nd Universl utomt... Aeptnes onditions The eptne ondition is formul on sttes tht defines the semnti of n epting run. We will present some eptne onditions tht will e useful for the omplementtion. Bühi eptne ondition Bühi (96) ws the first to introdue ω-utomt with his eptne ondition. The Bühi eptne ondition is the most dpted to model heking sine it supports ll the opertions presented in Setion.: Opertions on ω-utomt. With his definition, the eptne ondition F is set of sttes, nd run must visit infinitely often some sttes from F to e epting. More formlly, run π of Bühi utomton with F Q s eptne ondition is epting, iff inf(π) F. Exmple. Figure. presents Bühi utomton with its sttes in the eptne ondition F mrked with. A run of this utomton is epting if it visits infinitely often sttes OR. Figure.: A Bühi utomton. However, this eptne ondition hs some drwks sine deterministi Bühi utomt re less expressive thn non-deterministi ones (see Susetion.. for the proof nd Susetion.. for n exmple). Moreover, with other eptne onditions like Generlized Bühi

10 . Definitions 0 eptne ondition, we n hve utomt tht reognize the sme lnguge with smller numer of sttes nd trnsitions. Figure.7 presents severl utomt tht reognize the sme lnguge ut with different eptne onditions. There is dul eptne ondition to Bühi utomt whih is lled o-bühi eptne ondition. A run π of o-bühi utomton with F s eptne ondition is epting, iff inf(π) F = with F Q. This dul eptne ondition is interesting sine the sme deterministi utomton interpreted either with the Bühi eptne ondition or the o-bühi eptne ondition will reognize two omplementry lnguges. However, this property only works with deterministi utomt. Generlized Bühi eptne ondition Generlized Bühi utomt re vrint of Bühi utomt tht is more suint, sine it llows to hve utomt tht reognize the sme lnguge thn Bühi utomt ut with smller numer of sttes nd trnsitions. The Generlized Bühi eptne ondition hs more thn one set of eptne onditions. A run is epting if it psses through t lest one stte of eh set infinitely often. Figure. illustrtes this eptne ondition. More formlly, the definition is i inf(π) F i with F = {F, F,, F n } nd F i Q. Exmple. Figure. presents generlized Bühi utomton with n epting run if run visits infinitely often oth eptne onditions (sttes denoted with nd ). Figure.: A generlized Bühi utomton. Muller eptne ondition Beuse non-deterministi Bühi utomt (generlized or not) nd deterministi Bühi utomt re not equivlent, Muller (96) proposed nother eptne ondition for deterministi ω-utomt. The eptne ondition he suggests is to speify expliitly ll the good infinity sets. A run is epting if the epting set is inluded into the infinity set of visited sttes. The forml definition for this eptne ondition is: inf(π) F, with F Q, the set of set of epting sttes. Muller eptne ondition is generliztion of ll eptne qonditions listed here. However, to work with ω-utomt tht hve the sme expressiveness for deterministi utomt nd non-deterministi utomt we prefer Rin nd Streett eptne onditions, euse in prtie, storing ll the eptne onditions is not interesting.

11 Automt on infinite words Rin eptne ondition The Rin (969) ondition onsists of pirs (L, U) of susets of Q. A run is epting if there exists pir (L i, U i ) F suh tht run visits infinitely often L i nd only finitely often U i. More formlly this definition is: i : inf(π) L i inf(π) U i = with F Q Q. Exmple. Figure.5 presents Rin utomton with two pirs of eptne onditions: {(, ), (, )}. A run of this utomton is epting if it visits infinitely often nd finitely often (pir, ) OR if it visits infinitely often nd finitely often (pir, ). Figure.5: A Rin utomton Streett eptne ondition Streett (98) suggested dul eptne ondition of Rin s. So this ondition onsists in pirs (L i, U i ) of susets of Q. A run is epting if there exists n i suh tht if it visits infinitely often L i, then U i is lso infinitely often visited. More formlly this definition is: i : inf(π) L i inf(π) U i with F Q Q, or, to expliit the dulity, i : inf(π) L i = inf(π) U i. An interesting property is due to the dulity of Streett nd Rin eptne onditions tht produe n equivlene etween Deterministi Streett nd the negtion of Deterministi Rin. We usully denote DS DR. Exmple. With Figure.5 tht represents Rin utomton, its interprettion s Streett utomton will hve epting runs if, when it visits infinitely often, then is lso visited infinitely often (pir, ) OR when it visits infinitely often, then is lso visited infinitely often (pir, ). Swithing etween lsses With ll these eptne onditions we n hve utomt with the sme expressiveness. Deterministi (Generlized) Bühi utomt is n exeption sine they re less expressive. Therefore there exists some proedures (Löding, 998) to trnsform n utomton from one lss to nother. However, most of these trnsformtions re exponentil. Sfr (989) gives figure to illustrte the omplexity of these trnsformtions. This illustrtion is presented in Figure.6. Summry on eptne onditions All this eptnes onditions n e summrized in Tle..

12 . Definitions poly exp poly NS NM exp exp exp NB poly NR exp exp exp exp exp exp DS DR exp exp DR exp exp DM exp exp Legend exp N: Non-deterministi B: Bühi D: Deterministi M: Muller R: Rin S: Streett exp: exponentil omplexity poly: polynomil omplexity Figure.6: The omplexity of trnsformtion etween the different lsses of ω-utomt. Nme Domin Semntis Bühi F Q inf(π) F Co-Bühi F Q inf(π) F = Generlized Bühi F Q i : inf(π) F i Muller F Q inf(π) F Rin F Q Q i : inf(π) L i inf(π) U i = Streett F Q Q i : inf(π) L i = inf(π) U i Tle.: Common eptne onditions on ω-utomt

13 Automt on infinite words In order to omplement Bühi utomt, we will swith to Rin eptne ondition, then to Streett eptne ondition nd finlly return on Bühi eptne ondition. This proess will e presented in Chpter... Leling In the previous exmple, eptne onditions were leled on sttes. However, leling on trnsitions n produe utomt with smller numer of sttes nd trnsitions. Figure.7 presents three utomt tht reognize the sme lnguge. With leling on trnsitions the utomton hs one stte nd three trnsitions ut three sttes nd seven trnsitions with leling on sttes. () A Trnsition-sed Generlized Bühi Automton q 0 q q () The equivlent Generlized Bühi Automton () The equivlent Bühi Automton Figure.7: Trnsition-sed Generlized Bühi utomt, Generlized Bühi nd Bühi utomt. The model heking lirry SPOT is designed to work with non-deterministi Trnsitionsed Generlized Bühi Automt (TGBA), nd implements severl lgorithms tht work for this kind of ω-utomt. However, sine the lgorithms we hve implemented re working on sttes, we will use sttes leled utomt up to the finl utomton tht will e leled on trnsitions. Swithing etween stte-sed nd trnsition-sed Bühi utomt is presented in (Duret- Lutz, 007, setion..5). From stte-sed Bühi utomton with n sttes the trnsformtion lgorithm results trnsition-sed Bühi utomton with lso n sttes. However, for

14 . Opertions on ω-utomt trnsition-sed Bühi utomton with n sttes, the resulting stte-sed Bühi utomton will hve t most n sttes.. Opertions on ω-utomt Some opertion on ω-utomt re ommon, suh s The produt or intersetion of two ω-utomt A nd A, tht produes n utomton tht reognizes L (A ) L (A ). The opertion is useful in model heking to produe n utomton from the system utomton nd the formul utomton tht will reognize runs of the system tht invlidte the formul. For two utomt with n nd n sttes, the produt utomton will hve O(n n ) sttes. The sum, or union of two ω-utomt A nd A, tht produes n utomton tht reognizes L (A ) L (A ). This opertion is quite esy to implement for non-deterministi utomt sine it only requires to dd n initil stte to join initil sttes of A nd A. For two utomt with n nd n sttes, the sum utomton will hve O(n + n ) sttes. The emptiness hek, tht is ommon for Bühi utomt nd heks whether n ω-utomton reognizes non-empty word... Determiniztion The determiniztion opertion onsists in the trnsformtion of non-deterministi ω-utomton into deterministi one. However, ny non-deterministi Bühi utomton nnot e determinized into n utomton with Bühi eptne onditions. Proof. Given non-deterministi Bühi utomton A tht reognizes n ω-word ( + ) ω. This nottion mens tht must e reognized only finitely often ut infinitely often. This utomton is represented y Figure.8. q 0 q, Figure.8: A Bühi utomton to determinize. Now suppose tht we hve deterministi Bühi utomton B = ({, }, Q, δ, {q 0 }, F ) whih reognizes the sme lnguge s A. Then: u 0 = ω, so u 0 L (A) nd there exists finite prefix v 0 of u 0 tht rings B to F. u = v o ω, so u L (A) nd there exists finite prefix v 0 v of u tht rings B to F..

15 5 Automt on infinite words u n = v n ω, so u n L (A) nd there exists finite prefix v 0 v v n of u n tht rings B to F. Sine the numer of sttes Q is finite, there exists i nd j, 0 i < j suh s words v 0 v v i nd v 0 v v j ring to the sme stte. Then m = v 0 v v i ( v j ) ω is epted y B. But sine m hs n infinity of, it nnot e reognized y A. This theorem implies tht to determinize Bühi utomton, the Bühi lss nnot e used. The first onstrution for determinizing is due to Muller (96) whih ppers to e fulty. MNughton (966) gve theorem to prove tht ny non-deterministi Bühi utomton n e onverted into Deterministi Muller utomton. To prove his theorem, MNughton proposed onstrution with lrge low-up in O(n), douly exponentil in the size of the originl Bühi utomton. Sfr s onstrution (Sfr, 988, 989) produes Muller or Rin utomton from nondeterministi Bühi utomton. For Bühi utomton with n sttes, it retes deterministi utomton with O(n log n) sttes, whih is optiml for Rin utomt... Complementtion A stte-of-the-rt on the omplementtion of Bühi utomt n e found in Vrdi (007). The omplementtion for deterministi ω-utomt is n esy opertion sine it only requires to swith to the dul eptne ondition (Bühi/Co-Bühi, Rin/Streett), ut for nondeterministi ones this opertion is more omplited. Bühi (96) introdued omplementtion onstrution tht trnsforms Bühi utomton with n sttes into Bühi utomton with O(n) sttes. Sistl et l. (985) suggested n improved version of this onstrution with O(n) sttes. Finlly, Sfr (988) proposed onstrution y determinizing the utomton tht produes n Bühi utomton with O(n log n) sttes. From the theoretil point of view, this onstrution mthes the lower ound desried y Mihel (988) nd is therefore optiml. However, onstnts tht re hidden y the O() nottion n e improved sine Sfr s upper ound is n n while Mihel s is n!. Kupfermn nd Vrdi (997) used omplementtion sed on universl Co-Bühi utomt, tht re dul on the eptne ondition nd the trnsition mode to non-deterministi Bühi utomt. They derese the upper ound up to (6n) n. The urrent est proedure (Yn, 008) lso use these universl Co-Bühi utomt, nd hs for upper ound (0.97n) n.

16 Chpter Complementing Bühi utomt We will present the Sfr (988) omplementtion. The first step for the omplementtion is to determinize the initil utomton. Sine nondeterministi Bühi utomton nnot e determinized into Bühi utomton, we need to swith to nother lss. Sfr s onstrution (Sfr, 988) onverts non-deterministi Bühi into deterministi Rin utomton. In the previous hpter, we hve presented tht DS DR. Therefore, interpreting the produed Rin utomton s Streett utomton will reognized the negtion of the initil lnguge. Then, we need to trnsform this Streett utomton into non-deterministi Bühi utomton, using trnsformtion presented in Löding (998). This workflow is illustrted in Figure.. A Nondeterministi Bühi Automt Determiniztion Sfr (988) (Setion.) Deterministi Rin Automt Chnging Interprettion (Ovious) A Nondeterministi Bühi Automt Trnsformtion Löding (998) (Setion.) Deterministi Streett Automt Figure.: Steps of the omplementtion.

17 7 Complementing Bühi utomt. Determiniztion of Bühi utomt.. The lssil powerset onstrution For finite utomton, the lssil opertion for determiniztion is the powerset onstrution (Rin nd Sott, 959). Given n utomton A with Q sttes, this onstrution uses susets of Q s sttes of the deterministi utomton. An exmple to prove tht this onstrution does not work with Bühi utomt is to onsider the utomton A = ({q 0, q }, {, }, δ, ) of Figure.8, tht reognizes lnguge with only finitely nd infinitely. The powerset onstrution is presented in Figure.. We notie tht the reted utomton (utomton.e) does not reognize the sme lnguge s the originl sine n e rehed infinitely often. This result is ovious sine it ws lredy demonstrted in Susetion.. tht this utomton nnot e determinized with Bühi eptne onditions... Sfr s onstrution The wekness of the powerset onstrution is tht it onstruts too mny epting runs. Sfr s ide is to modify the lssil powerset onstrution to trk epting runs of the originl Bühi utomton. Sfr s onstrution use multiple powerset onstrutions in prllel in tree struture lled Sfr trees. The sttes of the deterministi utomton re not simply sets of sttes ut some Sfr trees. A Sfr tree onsists of nodes with A nme to refer to them nd keep trk of their existene over multiples trees. This nme must e unique in the tree nd must e in the set {,..., n} with n the numer of sttes of the originl utomton. A lel, whih is set of sttes of the originl utomt. A mrk, whih is Boolen tht will e introdued lter. A Sfr tree is illustrted in Figure.. Sfr trees hve n ordered reltion sine when node is inserted into the tree, it is onsidered s the youngest. Moreover, some onditions must e stisfied.. The lel of node is strit superset of the lels of its hildren.. Silings nodes hve lels tht re disjoint. As onsequenes of these onditions, tree hs t most n nodes, with n the numer of sttes of the utomton to determinize. We n lso dedue tht the height of Sfr tree is t most n (due to the first ondition), nd tht the numer of hildren of node is most n (due to the seond ondition). The si ide is to dd new hild for every node tht ontins n epting stte in its lel. The lel of this hild will e the set of epting lels in its prent. This ide is illustrted in Figure..

18 . Determiniztion of Bühi utomt 8 q 0 q q 0 q,, {q 0 } {q 0 } () The eginning of the onstrution. () A in q 0 rehes the stte q 0. q 0 q q 0 q, {q 0 } {q 0, q }, {q 0 } {q 0, q } () A in q 0 rehes sttes q 0 nd q. (d) A in {q 0, q } rehes sttes q 0 nd q. q 0 q, {q 0 } {q 0, q } (e) A in {q 0, q } rehes the stte q 0. This is the finl utomton Figure.: The lssil powerset onstrution: step-y-step.

19 9 Complementing Bühi utomt The tree The lel, set of sttes The nme {q 0, q, q } {q, q } This node is mrked Two nodes Figure.: A Sfr tree. {q 0, q } {q } {q 0, q } Figure.: Crete new hild: q is n epting stte in the originl utomton. {q 0} {q 0} Figure.5: Remove empty

20 . Determiniztion of Bühi utomt 0 When node is empty, it mens tht the run trked y this node is finite, so it n e removed sine missing nodes will denote finite runs. This is illustrted in Figure.5. When node hs extly the sme lel s its hildren, then they ll trk the sme run. This mens tht the run trked y this node is infinite. Children n e removed, nd the prent is mrked with flg to reord this deletion. This is illustrted in Figure.6. {q 0} {q 0} {q 0} Figure.6: Vertil merge Constrution of the Sfr trees From the Bühi utomton B = (Q, Σ, δ, q 0, F ) we rete the deterministi Rin utomton R = (Q, Σ, δ, q 0, {(L, U ),..., (L n, U n )}). The initil stte q 0 is Sfr tree with only one node not mrked, with q 0 s lel nd s nme. The trnsition funtion δ (T, ) for Sfr tree T nd Σ is omputed s follows: () Remove mrks All the mrks in the Sfr tree T re removed. () Brnh epting For every node in the Sfr tree T, if lel hs some epting sttes then new hild of this node is inserted s youngest. This node hs unique nme in the tree, no mrk nd the set of epting nodes of its prent for lel. () Powerset For every node n of T, its lel is repled with q lel of n δ(q, ). () Horizontl merge For every two siling nodes of T tht shre the sme stte q Q in their lel, the q in the lel of the youngest node is removed, nd from ll its hildren. (5) Remove empty Every empty node is removed. (6) Vertil merge For every node whose lel is equl to the union of the lels of its hildren, its hildren re removed nd the node is mrked. The set of sttes Q is ll the Sfr trees rehle from the initil Sfr tree. The Rin eptne ondition is the set of pirs F = {(L, U ),, (L n, U n )} where L i onsists of ll Sfr trees with the node nmed i mrked. (infinite run) U i onsists of ll Sfr trees without the node nmed i. (finite run).. Exmple To show how this determiniztion works, we n give n exmple. Figure.. is prt of the determiniztion of the utomton in Figure.7, tht shows eh step of the proedure. The full determiniztion of this utomton is in exmple in the ppendix A..

21 Complementing Bühi utomt, q 0 q q Figure.7: The Bühi utomton to determinize. Deterministi Streett to nondeterministi Bühi utomt One the originl Bühi utomton is determinized s Rin utomton, interpreting this Rin utomton s Streett one will reognize the negtion of the originl lnguge. Then, the next step is to trnsform the deterministi Streett utomton into non-deterministi Bühi (Figure.8). We will present n lgorithm tht omes from Löding (998). The min ide is to rete n utomton with three pools of sttes. The first one represents finite runs, the seond pool is visited when the run does not need to visit some preise sttes to e epting, nd the lst one is stging re for runs tht must visit some sttes to e epting. The first set does not trk the eptne onditions sine it represents finite runs, ut the two others pools keep trk of the onditions... Constrution of the trnsformtion Let S = (Q, Σ, δ, q 0, {(L, U ),..., (L r, U r )}) e deterministi Streett utomton to trnsform into n equivlent non-deterministi Bühi utomton B = (Q, Σ, δ, q 0, F ) The pirs of eptne onditions of the Streett utomton re trked into two sets: I nd J. Every time I J, for every visited L i the orresponding U i is lso visited. Then we reset I = J =, whih represents our seond pool of sttes tht must e infinitely visited to e epting. The utomton B is defined s follows: Q = Q ( Q {,...,r} {,...,r}) For Σ, q Q, I {,..., r}, J {,..., r}, I = I {i q L i } nd J = J {j q U j } δ (q, ) = ) {(p,, ) p δ(q, )} δ(q, { δ ((q, I, J), ) = {(p, I, J ) p δ(q, )} if I J {(p,, ) p δ(q, )} if I J All sttes with I nd J empty re epting. For Street utomton with n sttes nd r eptne onditions, this onstrution retes Bühi utomton with n ( n n + ) sttes.

22 . Deterministi Streett to nondeterministi Bühi utomt. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q0, q, q} {q} {q} {q0, q} {q} {q} {q} {q0, q, q} {q0, q, q} {q} {q} () The suessor funtion is lled on the tree denoted () The originl tree hd no mrked nodes.. Remove mrks,,. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q} {q} {q} {q} {q0, q, q} {q0, q, q} {q} {q0, q, q} {q0, q, q} {q} {q} {q, q} {q, q} {q, q} {q} {q} {q, q} () q nd q re epting sttes. Therefore, eh originl node hs new hild. (d) We n pply the trnsition funtion on the tree reted on the previous figure with the entire lphet. Figure.8: Some steps of the determiniztion of the utomton of Figure.7

23 Complementing Bühi utomt. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q},, {q} {q0, q} {q} {q} {q} {q0, q, q} {q} {q0, q, q} {q0, q, q} {q, q} {q} {q} {q0, q, q} {q, q} {q} {q} {q, q} {q, q} (e) Horizontl merge: two siling nodes hve q, q for lel. (f) Empty nodes re removed.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q} {q} {q} {q} {q0, q, q} {q} {q0, q, q} {q0, q, q} {q} {q0, q, q} {q, q} {q, q} (g) Vertil merge: the prent nd hildren hve the sme set of nodes s lel. Children removed nd the prent is mrked. (h) Some suessors lredy exist.

24 . Deterministi Streett to nondeterministi Bühi utomt A Nondeterministi Bühi Automt Determiniztion Sfr (988) Deterministi Rin Automt Chnging Interprettion A Nondeterministi Bühi Automt Trnsformtion Löding (998) Deterministi Streett Automt Figure.8: Reminder: steps of the omplementtion... Exmple To illustrte this lgorithm, Figure.0 presents the non-deterministi Bühi utomton reted from the deterministi Streett utomton of Figure.9. Setion A. detils more preisely the steps of this trnsformtion. q q 0 q Figure.9: A Streett utomton S with one pir of eptne ondition denoted y (, run visits infinitely often q, it must lso visit infinitely often q to e epting. ). If

25 5 Complementing Bühi utomt q q,, q 0 q 0,, q q,, q, { }, q 0, { }, q, { }, Figure.0: The finl Bühi utomton with its epting sttes denoted y.

26 Chpter Implementtion in SPOT Beuse SPOT is lirry tht works with Trnsition-sed Generlized Bühi utomt, nd the lgorithms presented in the previous setion re for Bühi utomton, first step of degenerliztion is required. This opertion is presented in (Duret-Lutz, 007, setions.. nd..5) nd illustrted in Figures.7 nd.7.. Detils on the implementtion The omplementtion is implemented through proxy lss lled tg_omplement, tht inherits from the virtul lss tg whih is ommon to ll the implementtions of Trnsitionsed Generlized Bühi utomt. All the implementtion is done in single file: sr/tg/tgomplement., nd the heder file (sr/tg/tgomplement.hh) exports the only puli lss of the implementtion: tg_omplement. The file tgomplement. ontins severl internl lsses for the omplementtion. Those lsses re divided in two prts: for Sfr s onstrution nd for the Streett-to-Bühi trnsformtion... Implementtion of Sfr s onstrution Sfr s onstrution is implemented in three lsses: sfr_tree represents nodes of the tree. Root nodes impliitly represent whole trees. All the nodes trnsformtions on trees to ompute suessors re implemented in this lss. The root node is lso responsile to return the Rin s eptne onditions tht ontin the tree. To represent those eptne onditions we use two oost::dynmi_itset for the sets L nd U. If the tree is in one eptne ondition L i, then the ith it of the L-itset will e set to true. The oost::dynmi_itset hs the dvntge to esily support it-to-it opertions like union or intersetion, whih re useful during the Streett to Bühi trnsformtion. A std::vetor<ool> does not support these opertions, nd std::itset hs stti size, tht we do not know t ompiltion-time sine it depends on the numer of pirs of eptne onditions of the utomton.

27 7 Implementtion in SPOT sfr_tree_utomton represents n utomton with sfr_tree s stte. This struture hs methods to return the initil stte nd to rowse the utomton. sfr_determiniztion hs the min loop of the lgorithm, ut lso uxiliry methods. The min loop onstruts sfr_tree_utomton y dupliting sfr_trees nd lling suessors opertion on those trees. The uxiliry methods ompute for eh tree whih suset of the lphet must e used to ompute suessors. This suset is the onjuntion of ll the tomi properties tht re rehle in the originl utomton from sttes in the lels of the tree... Implementtion of the Streett-to-Bühi trnsformtion The Streett-to-Bühi trnsformtion is diretly implemented into the lss tg_omplement. At the onstrution of n instne of this lss, sfr_tree_utomton is omputed nd the Rin utomton is sved s ttriute of the lss. Then, when the initil stte or the suessors of stte need to e returned, the trnsformtion is omputed on-the-fly. Doing this trnsformtion on-the-fly is kind of optimiztion tht void to rete the whole utomton when it is unneessry. During the opertions like the synhronized produt or the emptiness hek, we do not lwys need to rowse ll the sttes of the utomton the find whether the system stisfies properties. A ommon exmple is during the emptiness hek when lgorithm find non-empty epting word. The lgorithm stops rowsing the sttes, so it ws useless to ompute whose sttes... Testing the implementtion To test whether our implementtion works, simple wy is to use lgorithms tht lredy exist in SPOT. From logi formul ϕ, we produe the utomt A ϕ nd A ϕ with the help of n lgorithm tht trdues formul into n utomton (Couvreur, 999). Then we ompute A ϕ nd A ϕ with our omplementtion. These two utomt should omplementry. To mke sure they re, we ompute the synhronized produt etween those two utomt. The synhronized produt produes n utomton tht reognizes L ( A ϕ ) L ( A ϕ ). If this utomton does not reognize the empty lnguge, then the omplementtion hs issues. This kind of tests is lredy done y LBTT (Turiinen, 000; Turiinen nd Heljnko, 000), test suite for logis to utomt trnsltors, tht is lredy used in SPOT.. Benhmrk To enhmrk our omplementtion, we will use our omplementtion lgorithm on utomt generted from temporl-logi formulæ. The set of logi formulæ in Tle A. (p.5) omes from the SPOT s test suite, tht gthers formulæ tht omes from the literture (Dwyer et l., 998; Etessmi nd Holzmnn, 000; Somenzi nd Bloem, 000). We ompre sttes nd trnsitions of four utomt: A ϕ, B Aϕ, B Aϕ nd A ϕ. Like for testing, the two utomt A ϕ nd A ϕ re produed y the trnsltion lgorithm of Couvreur (999) tht trdues formulæ into Trnsition-sed Generlized Bühi utomt. B Aϕ is degenerliztion of A ϕ into trditionl Bühi utomt, nd B Aϕ is the omplementtion of this utomton tht uses our implementtion. The two utomt B Aϕ nd A ϕ reognize the sme lnguge.

28 . Benhmrk 8 Sfr s omplementtion is expeted to produe O(n log n) sttes for n initil utomton A ϕ with n sttes. This high omplexity mkes the omplementtion unusle with more thn 0 input sttes, however, we n notie tht just % of the formulæ from the set produe initil utomt with more thn 0 sttes, nd when its ours, omplemented utomt hve n eptle size. However, in some se the omplementtion did not finish fter mny weeks of omputtion. Figure. shows on the sme set of formulæ how ineffiient is our omplementtion ompring to the originl method, ut the omplementtion n e used on more thn three qurters of the test forumulæ. We onsider n utomton n e used up to 000 sttes sine opertions suh s the synhronized produt nd the emptiness hek re pplied on the utomton. With these enhmrks we notie tht our omplementtion is not effiient on formulæ, ut my e used when it does not exists lterntive tehniques.

29 9 Implementtion in SPOT Too mny sttes () Numer of sttes of A ϕ on the test suite (our omplementtion). () Numer of sttes of A ϕ on the test suite. Figure.: Benhmrks with the sme set of formulæ on A ϕ nd A ϕ

30 Chpter Perspetives We hve presented nd implemented the omplementtion of Bühi utomt using Sfr s onstrution. A mjor drwk of this implementtion inside SPOT is tht this lgorithm works with Stte-sed non-generlized Bühi utomt wheres SPOT works with Trnsition-sed Generlized Bühi utomt.. Working with Trnsition-sed Generlized Bühi utomt To work with Trnsition-sed Generlized Bühi utomt insted of trditionl Bühi utomt we need to modify Sfr s onstrution nd to hve Streett utomt to Trnsitionsed Generlized Bühi utomt proedure. But sine Sfr s onstrution is not the est omplementtion proedure, nd some onstrution were pulished to del with generlized eptne onstrutions (?), we will fous on this onstrution. The pproh of this onstrution is quite different from Sfr s onstrution, euse it voids to determinize the Bühi utomton, nd prefers using nother kind of intermedite utomton: universl generlized Co-Bühi utomt, tht re dul to non-deterministi generlized Bühi utomt... Streett to Generlized Bühi utomt The trnsformtion of Streett eptne onditions presented in Susetion.. works for trditionl Bühi utomt. We n modify this lgorithm to produe Generlized Bühi utomt. The ide of this modifition is to stop trking the set U of eptne onditions in sttes, ut to use generlized onditions on sttes to mrk when pir hs its two sets L i nd U i mthing the Streett eptne ondition. Let S = (Q, Σ, δ, q 0, {(L, U ),..., (L r, U r )}) e Streett utomton to trnsform into n equivlent Generlized Bühi utomt B = (Q, Σ, δ, q 0, {B,..., B r }). This onstrution is defined s follows: Q = Q ( Q {,...,r}) For Σ, q Q, I {,..., r} nd I = I {i q L i } \ {j q U j }) δ (q, ) = δ(q, ) {(p, ) p δ(q, )} δ ((q, I), ) = {(p, I ) p δ(q, )}

31 Perspetives The generlized Bühi eptne onditions {B,..., B r } is defined y: q Q, Σ, j {,..., r} : B j = δ((q, x), ). x {,,r}\j. Sfr optimiztions Our implementtion of Sfr s onstrution is the originl presented in Sfr (988). However, there exists some optimiztion methods (Klein nd Bier, 006) to derese the omplexity (even if the omplexity with the O() nottion stys the sme). We ould implement these optimiztions inside SPOT.

32 Conlusion This report hs presented tehnique to omplement Bühi utomt using Sfr s onstrution for the determiniztion, nd Streett-to-Bühi trnsformtion. This tehnique hs een implemented in our model heking lirry SPOT, to enrih its olletion of lgorithms. Due to the high omplexity of the lgorithms presented, in prtie this omplementtion will hve limited pplition. One pplition is to hek whether lterntive methods like omputing the negtion of formul produe equivlent utomt. Moreover, if we express properties in lnguge tht does not support the negtion, this omplementtion would e lso useful. All the lgorithms re presented for stte-sed Bühi utomt, sine they re designed for this kind of utomt. However SPOT uses Trnsition-sed Generlized Bühi utomt, then trnsformtion from Trnsition-sed Generlized Bühi Automton to Bühi utomt is required in our urrent implementtion. We wnt to diretly work with Trnsition-sed Generlized Bühi utomton to mke enefit of their ompt representtion. Thus, our future work will e to implement new omplementtion proedure, tht supports generlized eptne onditions.

33 Appendix A Exmple A. Sfr onstrution To illustrte the Sfr s onstrution, we will determinize the Bühi utomton of Figure A.., q 0 q q Figure A.: The Bühi utomton to determinize

34 A. Sfr onstrution. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q 0 }. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q 0 } {q 0 } () The onstrution strts with n initil stte. () The initil stte ws not mrked.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} () Suessors re omputed s with the powerset onstrution. (d) The onstrution must ontinue on the suessors.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q0, q} {q0, q} {q0, q} {q} (e) The node ws not mrked. (f) q is epting, therefore new hild with q s lel is inserted.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q} {q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q} {q} {q0, q, q} {q0, q, q} {q} {q} (g) The powerset onstrution with the whole lphet is pplied on the tree previously reted. (h) Empty nodes re removed.

35 5 Exmple. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q} {q0, q} {q} {q0, q, q} {q0, q, q} {q} {q} (i) A tree hs q in its root nd its hild. The root is mrked nd the hild removed. (j) The onstrution ontinue with BFS.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q},, {q0, q, q} {q0, q, q} {q} {q} (k) The node is omputed... (l)... nd hs true self loop.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q0, q} {q} {q0, q, q} {q} {q0, q, q} {q} {q} {q} {q} (m) The node is unmrked. (n) q is n epting stte, therefore hild is inserted.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q} {q0, q} {q} {q} {q} {q0, q, q} {q} {q} {q} {q0, q, q} {q} {q} {q} (o) Suessors re omputed with the powerset onstrution on lel s nodes. (p) Empty node re removed.

36 A. Sfr onstrution 6. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q} {q} {q} {q0, q, q} {q0, q, q} {q} {q} {q} (q) Vertil nodes re merged. (r) The BFS ontinue.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q} {q} {q} {q0, q, q} {q} {q0, q, q} {q} {q0, q, q} {q0, q, q} {q} {q, q} {q} {q} (s) The tree hs ny mrked node. (t) Eh node hs new hild.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q} {q} {q} {q0, q, q} {q0, q, q} {q} {q} {q0, q, q} {q} {q0, q, q} {q} {q, q} {q, q} {q} {q, q} {q} {q, q} {q, q} (u) The powerset onstrution is pplied. (v) Two siling nodes shred the sme lel. Sttes of the youngest node re removed.

37 7 Exmple. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q},, {q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q, q} {q} {q0, q, q} {q} {q0, q, q} {q} {q, q} {q} {q0, q, q} {q} {q, q} {q, q} () Empty nodes re removed. () Vertil merge is done.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q},, {q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q0, q, q} {q} {q0, q, q} {q} {q} {q0, q, q} {q0, q, q} {q, q} {q, q} () The BFS ontinue. (d) The node is unmrked.. Remove mrks,,. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q} {q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q, q} {q0, q, q} {q} {q} {q} {q0, q, q} {q} {q} {q} {q0, q, q} {q0, q, q} {q, q} {q, q} (e) q is n epting stte. (f) The powerset onstrution.

38 A. Sfr onstrution 8. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q, q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q0, q, q} {q} {q} {q} {q0, q, q} {q} {q} {q0, q, q} {q0, q, q} {q, q} {q, q} (g) Empty nodes re removed. (h) Vertil merge is done.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q0, q} {q} {q} {q, q} {q0, q, q} {q0, q, q} {q} {q} {q0, q, q} {q0, q, q} {q, q} {q0, q, q} {q, q} {q, q} (i) The BFS ontinue. (j) Nodes re unmrked.. Remove mrks,,. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q0, q, q} {q} {q} {q, q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q} {q0, q, q} {q} {q} {q} {q} {q0, q, q} {q} {q, q} {q0, q, q} {q0, q, q} {q, q} {q, q} {q, q} {q0, q, q} {q, q} {q, q} {q, q} {q, q} (k) Eh node hs new hild. (l) Suessors re omputed.

39 9 Exmple. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q0, q} {q} {q} {q, q} {q0, q, q} {q} {q} {q0, q, q} {q} {q} {q} {q} {q} {q0, q, q} {q, q} {q} {q0, q, q} {q0, q, q} {q, q} {q0, q, q} {q, q} {q, q} {q, q} {q, q} (m) Horizontl merge. (n) Empty nodes re removed.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q, q} {q0, q} {q} {q} {q, q} {q0, q, q} {q0, q, q} {q} {q} {q0, q, q} {q} {q0, q, q} {q, q} {q0, q, q} {q, q} {q, q} (o) Vertil merge. (p) The BFS ontinue with only one tree in the queue... Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q0, q, q} {q},, {q} {q} {q, q} {q, q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q} {q0, q, q} {q},, {q} {q} {q, q} {q, q} {q, q} {q0, q, q} {q0, q, q} {q, q} {q, q} (q) The node is unmrked. (r) A new hild is inserted.

40 A. Sfr onstrution 0. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q}. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q0, q, q} {q} {q} {q} {q, q} {q, q} {q0, q, q} {q} {q} {q} {q, q} {q, q} {q0, q, q} {q0, q, q} {q, q} {q, q} (s) Suessors re omputed. (t) Empty nodes re removed.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,,. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge {q0, q},, {q} {q} {q, q} {q0, q} {q} {q} {q, q} {q} {q0, q, q} {q0, q, q} {q, q} {q} {q} {q0, q, q} {q0, q, q} {q, q} {q, q} (u) Vertil merge. (v) The utomton hs ll its sttes nd trnsitions.. Remove mrks. Brnh eptings. Suessors. Horizontl merge 6. Vertil merge,, {q0, q} {q} {q} {q, q} {q0, q, q} {q} {q0, q, q} {q, q} (w) Rin s eptne onditions re dded.

41 Exmple A. Trnsformtion of deterministi Streett utomton into non-deterministi Bühi Figure A.- gives more detils on the exmple of trnsformtion of deterministi Streett utomton into non-deterministi Bühi presented t Susetion... q q q0 q0 q q () The Streett utomton () Aeptne onditions re removed. q0 q q0,, q,, q0 q q0,, q,, q q,, q q,, q, { }, q0, { }, () Eh stte hs its suessors duplited with sets I nd J empty (d) The trnsition funtion is pplied on the sttes with I nd J empty. Beuse q L, suessors of (q,, ) hve the eptne ondition in their set I

42 A. Trnsformtion of deterministi Streett utomton into non-deterministi Bühi q q,, q q,, q0 q0,, q0 q0,, q q,, q q,, q, { }, q, { }, q0, { }, q0, { }, q, { }, q, { }, (e) The trnsition funtion is pplied on the sttes with I tht ontins the eptne ondition. (f) Beuse q U nd q L i hs een visited during the run, suessors reh to the epting pool with I nd J empty. q q,, q0 q0,, q q,, q, { }, q0, { }, q, { }, (g) All sttes with I nd J empty re in the Bühi eptne ondition set. Figure A.-: Steps of the trnsformtion of deterministi Streett utomton into nondeterministi Bühi utomton

43 Exmple A. Benhmrks Tle A. presents the results of our enhmrks. Those results re disussed in Setion..

44 A. Benhmrks Formulæ Originl Aϕ Bühi BAϕ Complementtion BAϕ Originl A ϕ St Tr St Tr St Tr St Tr (( U( Up0)) ( V p0)) (( Up0) ( V ( V p0))) 9 5 G p0 7 6 Gp0 7 6 V (( Up0) ( Up)) (((( V ( Up0)) ( V ( Up))) ( V ( Up))) ( V ( Up))) ( V ( Up)) V (p (Xp0 X p0)) ((p0u(pup)) (pu(pup0))) (pu(p0up)) 6 p0up 9 p0v (p0 p) 0 (p0up0) (pup0) 9 p0u(p ( V p)) 7 50 U(p0 X( V p)) 5 5 G(p G p0) 5 6 Fp0 7 G(p Gp0) 5 6 V ( p0 ( Up)) 6 56 V ( p0 (pup)) G((p p) ( pu(p0 p))) G(p0 Fp) 6 56 ( V ( Up0)) ( U( V p)) p0u(p X(pUp)) U(p0 X(pUp)) pu((p0 p) G p) p0u(p G p0) p0u(pup) p0v ( pv p) G(((p p) Fp) ( p0up)) G(((p p) Fp) (p0up)) G(((p p) Fp) ( p0u(p p))) G((p p) ( p0u(p G p0))) G((p p) ( pu((p0 p) G p))) G((p p) (p0u(p Gp0))) G((p p) ( p0u((p p) G p0))) G(p G(p0 Fp)) G((((p p) Fp) (p0 ( pu(p p))))up) G(p G(p0 (p XFp))) G(p G(p0 ((p p5) X( p5up)))) ( V p0)up U(p0 X(p X( Up))) ( Up0) ( U p0) Fp ( p0up) Fp (p0up) Fp ( p0u(p p)) (Xp0Up) X( p0v ( p0 p)) ( V (p X( V p0))) ( V (p X( V p0))) (Fp (p0 ( pu(p p))))up ( U( V p0)) ( V ( Up)) V ( p0 (pu(( V p) ( V p)))) ( Up0)U( V p) G(p0 F(p XFp))

45 5 Exmple G(p0 F((p p5) X( p5up))) (( V ( Up0)) ( U( V p))) (( V ( Up)) ( U( V p0))) (Xp0UXp) X( p0v p) U(p0 X( U(p X( U(p X( Up)))))) Fp0 ( p0u((p p0) X( p0up))) ( U( V p0)) ( U( V p)) G p ( pu((p Fp0) ( p0u((p p0) X( p0up))))) F(p XFp) ( pup0) G p F(p Fp0) Fp ( p0u(p ((p p0) X( p0up)))) G((p p) ((p0 ( pu(p p)))u(p G(p0 ( pu(p p)))))) Fp ( ((p p) X( pu(p p)))u(p p0)) ( V ( p0 ( Up))) ((Xp0Up) X( p0v ( p0 p))) G p F(p ( p0u(p G p0))) G((p Fp) ( ((p p) X( pu(p p)))u(p p0))) p0u((p0u(( p0u((p0u(g p0 Gp0)) G p0)) G p0)) G p0) G((p Fp) ( p0u(p ((p p0) X( p0up))))) G(p (Fp0 ( p0u(p ((p p0) X( p0up)))))) G(((p Fp) (p0 ( pu((p p) X( pup)))))up) G(((p Fp) (p0 ( pu(((p p) p5) X(( p p5)up)))))up) G((p XFp) XF(p Fp0)) p0u(p X(p ( U(p X( U(p X( U(p5 X( Up6))))))))) G p ( pu(p (F(p XFp) ( pup0)))) ( V ( p0 ( Up))) ((Xp0UXp) X( p0v p)) (Fp (p0 ( pu((p p) X( pup)))))up (Fp (p0 ( pu(((p p) p5) X(( p p5)up)))))up ((( V (p ( V ( Up0)))) ( V (p ( V ( U p0))))) ( V p)) ( V p) G((p Fp) (( p0 p)u(p ((p0 p)u(p (( p0 p)u(p ((p p)u(p ( p0up)))))))))) G(p G((p XFp) X( pu(p Fp0)))) Fp (( p0 p)u(p ((p0 p)u(p (( p0 p)u(p ((p0 p)u(p ( p0up))))))))) G(p (( p0 p)u(p ((p0 p)u(p (( p0 p)u(p ((p0 p)u((p ( p0u(p G p0))) Gp0))))))))) G(((p Fp) ((p X( pup)) X( pu(p Fp0))))Up) Fp ( pu(p ( p0u((p0u(( p0u((p0u(g p0 Gp0)) G p0)) G p0)) G p0)))) (Fp ((p X( pup)) X( pu(p Fp0))))Up ((( V (p ( U( V p0)))) ( V (p ( U( V p0))))) ( V p)) ( V p) ((( U( p ( V ( U p0)))) ( U( p ( V ( Up0))))) ( Up)) ( Up) ((( U( p ( U( V p0)))) ( U( p ( U( V p0))))) ( Up)) ( Up) G(p ( ((p p) X( pu(p p)))u((p p0) G (p XFp)))) unfinished 8 7 G((p ((p X( pup)) X( pu(p Fp0))))U(p G((p X( pup)) 97 6 unfinished 9 X( pu(p Fp0))))) G((p (p0 ( pu((p p) X( pup)))))u(p G(p0 (p XFp)))) unfinished 8 G((p (p0 ( pu(((p p) p5) X(( p p5)up)))))u(p G(p0 ((p p5) X( p5up))))) unfinished 56 Tle A.: Benhmrks etween BA φ, BA φ nd A φ with φ Liner-time Temporl-Logi formul, on the numer of sttes nd trnsition of the utomt. Formulæ re sorted ording to the initil numer of sttes nd trnsitions.

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

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

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic Automata vs Deterministic Automata Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n

More information

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their

More information

Regular languages refresher

Regular languages refresher Regulr lnguges refresher 1 Regulr lnguges refresher Forml lnguges Alphet = finite set of letters Word = sequene of letter Lnguge = set of words Regulr lnguges defined equivlently y Regulr expressions Finite-stte

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

Finite State Automata and Determinisation

Finite State Automata and Determinisation Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions

More information

= state, a = reading and q j

= state, a = reading and q j 4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those

More information

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering Petri Nets Ree Alreht Seminr: Automt Theory Chir of Softwre Engeneering Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution:

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

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

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

Test Generation from Timed Input Output Automata

Test Generation from Timed Input Output Automata Chpter 8 Test Genertion from Timed Input Output Automt The purpose of this hpter is to introdue tehniques for the genertion of test dt from models of softwre sed on vrints of timed utomt. The tests generted

More information

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

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

Graph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France)

Graph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France) Grph Sttes EPIT 2005 Mehdi Mhll (Clgry, Cnd) Simon Perdrix (Grenole, Frne) simon.perdrix@img.fr Grph Stte: Introdution A grph-sed representtion of the entnglement of some (lrge) quntum stte. Verties: quits

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

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

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Siene Deprtment Compiler Design Spring 7 Lexil Anlysis Smple Exerises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sienes Institute 47 Admirlty Wy, Suite

More information

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

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

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

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

@#? Text Search ] { "!" Nondeterministic Finite Automata. Transformation NFA to DFA and Simulation of NFA. Text Search Using Automata

@#? Text Search ] { ! Nondeterministic Finite Automata. Transformation NFA to DFA and Simulation of NFA. Text Search Using Automata g Text Serh @#? ~ Mrko Berezovský Rdek Mřík PAL 0 Nondeterministi Finite Automt n Trnsformtion NFA to DFA nd Simultion of NFA f Text Serh Using Automt A B R Power of Nondeterministi Approh u j Regulr Expression

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

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

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

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

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata Desriptionl Complexity of Non-Unry Self-Verifying Symmetri Differene Automt Lurette Mris 1,2 nd Lynette vn Zijl 1 1 Deprtment of Computer Siene, Stellenosh University, South Afri 2 Merk Institute, CSIR,

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

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

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18 Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov,

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

Hybrid Systems Modeling, Analysis and Control

Hybrid Systems Modeling, Analysis and Control Hyrid Systems Modeling, Anlysis nd Control Rdu Grosu Vienn University of Tehnology Leture 5 Finite Automt s Liner Systems Oservility, Rehility nd More Miniml DFA re Not Miniml NFA (Arnold, Diky nd Nivt

More information

Alpha Algorithm: A Process Discovery Algorithm

Alpha Algorithm: A Process Discovery Algorithm Proess Mining: Dt Siene in Ation Alph Algorithm: A Proess Disovery Algorithm prof.dr.ir. Wil vn der Alst www.proessmining.org Proess disovery = Ply-In Ply-In event log proess model Ply-Out Reply proess

More information

Bisimulation, Games & Hennessy Milner logic

Bisimulation, Games & Hennessy Milner logic Bisimultion, Gmes & Hennessy Milner logi Leture 1 of Modelli Mtemtii dei Proessi Conorrenti Pweł Soboiński Univeristy of Southmpton, UK Bisimultion, Gmes & Hennessy Milner logi p.1/32 Clssil lnguge theory

More information

THEORY OF FORMAL LANGUAGES EXERCISE BOOK. A Suite of Exercises with Solutions DRAFT COPY

THEORY OF FORMAL LANGUAGES EXERCISE BOOK. A Suite of Exercises with Solutions DRAFT COPY THEORY OF FORMAL LANGUAGES EXERCISE BOOK A Suite of Exerises with Solutions DRAFT COPY Lu Breveglieri ollortors Gimpolo Agost Alessndro Brenghi Ann Beletsk Stefno Crespi Reghizzi Bernrdo Dl Seno Vinenzo

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

Behavior Composition in the Presence of Failure

Behavior Composition in the Presence of Failure Behvior Composition in the Presene of Filure Sestin Srdin RMIT University, Melourne, Austrli Fio Ptrizi & Giuseppe De Giomo Spienz Univ. Rom, Itly KR 08, Sept. 2008, Sydney Austrli Introdution There re

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

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh Computtionl Biology Leture 8: Genome rerrngements, finding miml mthes Sd Mneimneh We hve seen how to rerrnge genome to otin nother one sed on reversls nd the knowledge of the preserved loks or genes. Now

More information

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

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

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4. Mth 5 Tutoril Week 1 - Jnury 1 1 Nme Setion Tutoril Worksheet 1. Find ll solutions to the liner system by following the given steps x + y + z = x + y + z = 4. y + z = Step 1. Write down the rgumented mtrix

More information

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

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b CS 294-2 9/11/04 Quntum Ciruit Model, Solovy-Kitev Theorem, BQP Fll 2004 Leture 4 1 Quntum Ciruit Model 1.1 Clssil Ciruits - Universl Gte Sets A lssil iruit implements multi-output oolen funtion f : {0,1}

More information

Compression of Palindromes and Regularity.

Compression of Palindromes and Regularity. Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht

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

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

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

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

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

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

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

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

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable INTEGRATION NOTE: These notes re supposed to supplement Chpter 4 of the online textbook. 1 Integrls of Complex Vlued funtions of REAL vrible If I is n intervl in R (for exmple I = [, b] or I = (, b)) nd

More information

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

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

More information

Engr354: Digital Logic Circuits

Engr354: Digital Logic Circuits Engr354: Digitl Logi Ciruits Chpter 4: Logi Optimiztion Curtis Nelson Logi Optimiztion In hpter 4 you will lern out: Synthesis of logi funtions; Anlysis of logi iruits; Tehniques for deriving minimum-ost

More information

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

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

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

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

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points: Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer

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

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

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

8 THREE PHASE A.C. CIRCUITS

8 THREE PHASE A.C. CIRCUITS 8 THREE PHSE.. IRUITS The signls in hpter 7 were sinusoidl lternting voltges nd urrents of the so-lled single se type. n emf of suh type n e esily generted y rotting single loop of ondutor (or single winding),

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

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

Automatic Synthesis of New Behaviors from a Library of Available Behaviors Automti Synthesis of New Behviors from Lirry of Aville Behviors Giuseppe De Giomo Università di Rom L Spienz, Rom, Itly degiomo@dis.unirom1.it Sestin Srdin RMIT University, Melourne, Austrli ssrdin@s.rmit.edu.u

More information

Introduction to Olympiad Inequalities

Introduction to Olympiad Inequalities Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

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

State Complexity of Union and Intersection of Binary Suffix-Free Languages

State Complexity of Union and Intersection of Binary Suffix-Free Languages Stte Complexity of Union nd Intersetion of Binry Suffix-Free Lnguges Glin Jirásková nd Pvol Olejár Slovk Ademy of Sienes nd Šfárik University, Košie 0000 1111 0000 1111 Glin Jirásková nd Pvol Olejár Binry

More information

6.5 Improper integrals

6.5 Improper integrals Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

More information

From LTL to Symbolically Represented Deterministic Automata

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

More information

Abstraction of Nondeterministic Automata Rong Su

Abstraction of Nondeterministic Automata Rong Su Astrtion of Nondeterministi Automt Rong Su My 6, 2010 TU/e Mehnil Engineering, Systems Engineering Group 1 Outline Motivtion Automton Astrtion Relevnt Properties Conlusions My 6, 2010 TU/e Mehnil Engineering,

More information

Formal Methods for XML: Algorithms & Complexity

Formal Methods for XML: Algorithms & Complexity Forml Methods for XML: Algorithms & Complexity S. Mrgherit di Pul August 2004 Thoms Shwentik Shwentik XML: Algorithms & Complexity Introdution 1 XML Exmple Doument Composer Nme Clude Debussy /Nme Vit Born

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

Unit 4. Combinational Circuits

Unit 4. Combinational Circuits Unit 4. Comintionl Ciruits Digitl Eletroni Ciruits (Ciruitos Eletrónios Digitles) E.T.S.I. Informáti Universidd de Sevill 5/10/2012 Jorge Jun 2010, 2011, 2012 You re free to opy, distriute

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

Bottom-Up Parsing. Canonical Collection of LR(0) items. Part II

Bottom-Up Parsing. Canonical Collection of LR(0) items. Part II 2 ottom-up Prsing Prt II 1 Cnonil Colletion of LR(0) items CC_LR(0)_I items(g :ugmented_grmmr){ C = {CLOURE({ })} ; repet{ foreh(i C) foreh(grmmr symol X) if(goto(i,x) && GOTO(I,X) C) C = C {GOTO(I,X)};

More information

Thoery of Automata CS402

Thoery of Automata CS402 Thoery of Automt C402 Theory of Automt Tle of contents: Lecture N0. 1... 4 ummry... 4 Wht does utomt men?... 4 Introduction to lnguges... 4 Alphets... 4 trings... 4 Defining Lnguges... 5 Lecture N0. 2...

More information

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

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

More information

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

Alpha Algorithm: Limitations

Alpha Algorithm: Limitations Proess Mining: Dt Siene in Ation Alph Algorithm: Limittions prof.dr.ir. Wil vn der Alst www.proessmining.org Let L e n event log over T. α(l) is defined s follows. 1. T L = { t T σ L t σ}, 2. T I = { t

More information

Proving the Pythagorean Theorem

Proving the Pythagorean Theorem Proving the Pythgoren Theorem W. Bline Dowler June 30, 2010 Astrt Most people re fmilir with the formul 2 + 2 = 2. However, in most ses, this ws presented in lssroom s n solute with no ttempt t proof or

More information

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

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

More information

A Disambiguation Algorithm for Finite Automata and Functional Transducers

A Disambiguation Algorithm for Finite Automata and Functional Transducers A Dismigution Algorithm for Finite Automt n Funtionl Trnsuers Mehryr Mohri Cournt Institute of Mthemtil Sienes n Google Reserh 51 Merer Street, New York, NY 1001, USA Astrt. We present new ismigution lgorithm

More information

CONTROLLABILITY and observability are the central

CONTROLLABILITY and observability are the central 1 Complexity of Infiml Oservle Superlnguges Tomáš Msopust Astrt The infiml prefix-losed, ontrollle nd oservle superlnguge plys n essentil role in the reltionship etween ontrollility, oservility nd o-oservility

More information

CSE 401 Compilers. Today s Agenda

CSE 401 Compilers. Today s Agenda CSE 401 Compilers Leture 3: Regulr Expressions & Snning, on?nued Mihel Ringenurg Tody s Agend Lst?me we reviewed lnguges nd grmmrs, nd riefly strted disussing regulr expressions. Tody I ll restrt the regulr

More information

Discrete Structures Lecture 11

Discrete Structures Lecture 11 Introdution Good morning. In this setion we study funtions. A funtion is mpping from one set to nother set or, perhps, from one set to itself. We study the properties of funtions. A mpping my not e funtion.

More information

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem. 27 Lesson 2: The Pythgoren Theorem nd Similr Tringles A Brief Review of the Pythgoren Theorem. Rell tht n ngle whih mesures 90º is lled right ngle. If one of the ngles of tringle is right ngle, then we

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

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

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

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

More information

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings... Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive

More information

Transition systems (motivation)

Transition systems (motivation) Trnsition systems (motivtion) Course Modelling of Conurrent Systems ( Modellierung neenläufiger Systeme ) Winter Semester 2009/0 University of Duisurg-Essen Brr König Tehing ssistnt: Christoph Blume In

More information

Formal Methods in Software Engineering

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

More information