Learning probabilistic finite automata
|
|
- Nathaniel Bruce McCoy
- 5 years ago
- Views:
Transcription
1 Lerning probbilistic finite utomt Colin de l Higuer University of Nntes Zdr, August 00
2 Acknowledgements Lurent Miclet, Jose Oncin, Tim Otes, Rfel Crrsco, Pco Cscubert, Rémi Eyrud, Philippe Ezequel, Henning Fernu, Thierry Murgue, Frnck Thollrd, Enrique Vidl, Frédéric Tntini,... List is necessrily incomplete. Excuses to those tht hve been forgotten Chpters 5 nd 6 Zdr, August 00
3 Outline. PFA. Distnces between distributions 3. FFA 4. Bsic elements for lerning PFA 5. ALERGIA 6. MDI nd DSAI 7. Open questions Zdr, August 00 3
4 PFA Probbilistic finite (stte) utomt Zdr, August 00 4
5 Prcticl motivtions (Computtionl biology, speech recognition, web services, utomtic trnsltion, imge processing ) A lot of positive dt Not necessrily ny negtive dt No idel trget Noise Zdr, August 00 5
6 The grmmr induction problem, revisited The dt consists of positive strings, «generted» following n unknown distribution The gol is now to find (lern) this distribution Or the grmmr/utomton tht is used to generte the strings Zdr, August 00 6
7 Success of the probbilistic models n-grms Hidden Mrkov Models Probbilistic grmmrs Zdr, August 00 7
8 4 b 3 b 3 4 b 3 DPFA: Deterministic Probbilistic Finite Automton Zdr, August 00 8
9 b 3 4 b 3 4 b 3 Pr A (bb)= 3 4 Zdr, August =
10 b b 0.3 b 0.65 Zdr, August 00 0
11 4 b b b 3 PFA: Probbilistic Finite (stte) Automton Zdr, August 00
12 ε 4 b ε 3 ε 3 4 b 3 ε-pfa: Probbilistic Finite (stte) Automton with ε-trnsitions Zdr, August 00
13 How useful re these utomt? They cn define distribution over Σ * They do not tell us if string belongs to lnguge They re good cndidtes for grmmr induction There is (ws?) not tht much written theory Zdr, August 00 3
14 Bsic references The HMM literture Azri Pz 973: Introduction to probbilistic utomt Chpter 5 of my book Probbilistic Finite-Stte Mchines, Vidl, Thollrd, cdlh, Cscubert & Crrsco Grmmticl Inference ppers Zdr, August 00 4
15 Automt, definitions Let D be distribution over Σ * 0 Pr D (w) w Σ* Pr D (w)= Zdr, August 00 5
16 A Probbilistic Finite (stte) Automton is <Q, Σ, I P, F P, δ P > Q set of sttes I P : Q [0;] F P : Q [0;] δ P : Q Σ Q [0;] Zdr, August 00 6
17 Wht does PFA do? It defines the probbility of ech string w s the sum (over ll pths reding w) of the products of the probbilities Pr A (w)= π i pths(w) Pr(π i ) π i =q i 0 i q i i in q in Pr(π i )=I P (q i 0 ) F P (q in ) ij δ P (q ij-, ij,q ij ) Note tht if λ-trnsitions re llowed the sum my be infinite Zdr, August 00 7
18 b 0.4 b b Pr(b) = 0.7*0.4*0.* +0.7*0.4*0.45*0. = =0.053 Zdr, August 00 8
19 non deterministic PFA: mny initil sttes/only one initil stte n λ-pfa: PFA with λ-trnsitions nd perhps mny initil sttes DPFA: deterministic PFA Zdr, August 00 9
20 Consistency A PFA is consistent if Pr A (Σ * )= x Σ * 0 Pr A (x) Zdr, August 00 0
21 Consistency theorem A is consistent if every stte is useful (ccessible nd coccessible) nd q Q F P (q) + q Q, Σ δ P (q,,q )= Zdr, August 00
22 Equivlence between models Equivlence between PFA nd HMM But the HMM usully define distributions over ech Σ n Zdr, August 00
23 A footbll HMM win drw lose win drw lose win drw lose Zdr, August 00 3
24 Equivlence between PFA with λ-trnsitions nd PFA without λ-trnsitions cdlh 003, Hnneforth & cdlh 009 Mny initil sttes cn be trnsformed into one initil stte with λ-trnsitions; λ-trnsitions cn be removed in polynomil time; Strtegy: number the sttes eliminte first λ-loops, then the trnsitions with highest rnking rrivl stte Zdr, August 00 4
25 PFA re strictly more powerful thn DPFA Folk theorem (nd) You cn t even tell in dvnce if you re in good cse or not (see: Denis & Esposito 004) Zdr, August 00 5
26 Exmple 3 3 This distribution cnnot be modelled by DPFA Zdr, August 00 6
27 Wht does DPFA over Σ ={} look like? And with this rchitecture you cnnot generte the previous one Zdr, August 00 7
28 Prsing issues Computtion of the probbility of string or of set of strings Deterministic cse Simple: pply definitions Techniclly, rther sum up logs: this is esier, sfer nd cheper Zdr, August 00 8
29 b b 0.3 b 0.65 Pr(b) = 0.7*0.9*0.35*0 = 0 Pr(bb) = 0.7*0.9*0.65*0.3 = 0.85 Zdr, August 00 9
30 Non-deterministic cse b 0.4 b b Pr(b) = 0.7*0.4*0.* +0.7*0.4*0.45*0. = =0.053 Zdr, August 00 30
31 In the literture The computtion of the probbility of string is by dynmic progrmming : O(n m) lgorithms: Bckwrd nd Forwrd If we wnt the most probble derivtion to define the probbility of string, then we cn use the Viterbi lgorithm Zdr, August 00 3
32 Forwrd lgorithm A[i,j]=Pr(q i.. j ) (The probbility of being in stte q i fter hving red.. j ) A[i,0]=I P (q i ) A[i,j+]= k Q A[k,j]. δ P (q k, j+,q i ) Pr(.. n )= k Q A[k,n]. F P (q k ) Zdr, August 00 3
33 Distnces Wht for? Estimte the qulity of lnguge model Hve n indictor of the convergence of lerning lgorithms Construct kernels Zdr, August 00 33
34 . Entropy How mny bits do we need to correct our model? Two distributions over Σ * : D et D Kullbck Leibler divergence (or reltive entropy) between D nd D : w Σ* Pr D (w) log Pr D (w)-log Pr D (w) Zdr, August 00 34
35 . Perplexity The ide is to llow the computtion of the divergence, but reltively to test set (S) An pproximtion (sic) is perplexity: inverse of the geometric men of the probbilities of the elements of the test set Zdr, August 00 35
36 w S Pr D (w) -/ S = S w S Pr D (w) Problem if some probbility is null... Zdr, August 00 36
37 Why multiply () We re trying to compute the probbility of independently drwing the different strings in set S Zdr, August 00 37
38 Why multiply? () Suppose we hve two predictors for coin toss Predictor : heds 60%, tils 40% Predictor : heds 00% The tests re H: 6, T: 4 Arithmetic men P: 36%+6%=0,5 P: 0,6 Predictor is the better predictor ;-) Zdr, August 00 38
39 .3 Distnce d d (D, D )= w Σ * (Pr D (w)-pr D (w)) Cn be computed in polynomil time if D nd D re given by PFA (Crrsco & cdlh 00) This lso mens tht equivlence of PFA is in P Zdr, August 00 39
40 3 FFA Frequency Finite (stte) Automt Zdr, August 00 40
41 A lerning smple is multiset Strings pper with frequency (or multiplicity) S={λ (3), (4), b (), bb (), bb (3), bb ()} Zdr, August 00 4
42 DFFA A deterministic frequency finite utomton is DFA with frequency function returning positive integer for every stte nd every trnsition, nd for entering the initil stte such tht the sum of wht enters is equl to wht exits nd the sum of wht hlts is equl to wht strts Zdr, August 00 4
43 Exmple : : 6 3 b : 5 b: 3 : 5 b: 4 Zdr, August 00 43
44 From DFFA to DPFA Frequencies become reltive frequencies by dividing by sum of exiting frequencies : /6 : /7 6/6 3/3 /6 /7 b: 5/3 b: 3/6 : 5/3 b: 4/7 Zdr, August 00 44
45 From DFA nd smple to DFFA S = {λ,, b, bbb, bbbb, bbbb} : : 6 3 b: 5 b: 3 : 5 b: 4 Zdr, August 00 45
46 Note Another smple my led to the sme DFFA Doing the sme with NFA is much hrder problem Typiclly wht lgorithm Bum-Welch (EM) hs been invented for Zdr, August 00 46
47 The frequency prefix tree cceptor The dt is multi-set The FTA is the smllest tree-like FFA consistent with the dt Cn be trnsformed into PFA if needed Zdr, August 00 47
48 From the smple to the FTA FTA(S) 4 3 :7 b:4 :4 4 :6 : b: b: : b: : b:4 3 : : : S={λ (3), (4), b (), bb (), bb (3), bb ()} Zdr, August 00 48
49 Red, Blue nd White sttes -Red sttes re confirmed sttes -Blue sttes re the (non Red) successors of the Red sttes -White sttes re the others b b b b Sme s with DFA nd wht RPNI does Zdr, August 00 49
50 Merge nd fold :6 Suppose we decide to merge with stte λ b :0 0 b:6 :6 6 b:4 :4 :4 4 b:4 b:9 9 Zdr, August 00 50
51 Merge nd fold b:4 :6 First disconnect nd reconnect to λ b :0 0 b:6 :6 6 :4 :4 4 b:4 b:9 9 Zdr, August 00 5
52 Merge nd fold b:4 Then fold : :0 0 b:6 b:4 :6 :4 b:9 6 9 :4 4 Zdr, August 00 5
53 Merge nd fold b:4 fter folding : :0 0 b:30 :0 0 :4 4 b:9 9 Zdr, August 00 53
54 Stte merging lgorithm A=FTA(S); Blue ={δ(q I,): Σ }; Red ={q I } While Blue do choose q from Blue such tht Freq(q) t 0 if p Red: d(a p,a q ) is smll then A = merge_nd_fold(a,p,q) else Red = Red {q} Blue = {δ(q,): q Red} {Red} Zdr, August 00 54
55 The rel question How do we decide if d(a p,a q ) is smll? Use distnce Be ble to compute this distnce If possible updte the computtion esily Hve properties relted to this distnce Zdr, August 00 55
56 Deciding if two distributions re similr If the two distributions re known, equlity cn be tested Distnce (L norm) between distributions cn be exctly computed But wht if the two distributions re unknown? Zdr, August 00 56
57 Tking decisions :6 Suppose we wnt to merge with stte λ b :0 0 b:6 :6 6 b:4 :4 :4 4 b:4 b:9 9 Zdr, August 00 57
58 Tking decisions 60 :6 :0 b:4 0 b:6 Yes if the two distributions induced re similr :6 :4 6 :4 4 b:4 b:9 9 :4 :4 4 b:4 b:9 9 Zdr, August 00 58
59 5 Alergi Zdr, August 00 59
60 Alergi s test D D if x Pr D (x) Pr D (x) Esier to test: Pr (λ)=pr (λ) D D Σ Pr (Σ*)=Pr (Σ*) D D And do this recursively! Of course, do it on frequencies Zdr, August 00 60
61 Zdr, August 00 6 Hoeffding bounds n f n f n f γ α γ ln. + < n n γ indictes if the reltive frequencies nd re sufficiently close n f
62 A run of Alergi Our lerning multismple S={λ(490), (8), b(70), (3), b(4), b(38), bb(4), (8), b(0), b(0), bb(4), b(9), bb(4), bb(3), bbb(6), (), b(), b(3), bb(), b(), bb(), bb(), bbb(), b(), bb(), bb(), bbb(), bb(), bbb(), bbb(), (), b(), b(), b(), bb(), bb(), bb(), bbb()} Zdr, August 00 6
63 Prmeter α is rbitrrily set to We choose 30 s vlue for threshold t 0. Note tht for the blue stte who hve frequency less thn the threshold, specil merging opertion tkes plce Zdr, August 00 63
64 :57 8 b : : 64 : 57 b : : 5 b : 8 b : 65 : b : 9 : 3 b : 6 :5 b : : 4 b : 3 : 5 b : 3 : b : : 4 b : : b : : b : : b : : Zdr, August b b b
65 Cn we merge λ nd? Compre λ nd, Σ* nd Σ*, bσ* nd bσ* 490/000 with 8/57, 57/000 with 64/57, 53/000 with 65/57,.... All tests return true Zdr, August 00 65
66 Merge : 57 8 b: : 64 : 57 b: : 5 b: 8 b: 65 : b: 9 : 3 b: 6 : 5 b: : 4 b : 3 : 5 b : 3 : b : : 4 b : : b : : b : : b : : Zdr, August b b b
67 And fold : b: 340 : 77 5 b: : 6 b: 9 : 0 b: : b: : b: : b: : Zdr, August 00 67
68 Next merge? λ with b? : b: : 77 b: : 6 b: 9 : 0 b: : b: : b: : b: : Zdr, August 00 68
69 Cn we merge λ nd b? Compre λ nd b, Σ* nd bσ*, bσ* nd bbσ* 660/34 nd 5/340 re different (giving γ= 0.6) On the other hnd n + n. ln α = 0. Zdr, August 00 69
70 Promotion : b: : 77 b: : 6 b: 9 :0 b: : b : : b : : b : : Zdr, August 00 70
71 Merge : 34 : b: b: : 6 b: 9 : 0 b: : b : : b : : b : : Zdr, August 00 7
72 And fold :34 : b: b: 49 : 9 7 : b: b: 9 8 : Zdr, August 00 7
73 Merge :34 : 95 b: b: : 7 : b: b: 9 8 : Zdr, August 00 73
74 And fold : 354 : 96 b: b: 49 As PFA :.354 :.096 b: b:.049 Zdr, August 00 74
75 Conclusion nd logic Alergi builds DFFA in polynomil time Alergi cn identify DPFA in the limit with probbility No good definition of Alergi s properties Zdr, August 00 75
76 6 DSAI nd MDI Why not chnge the criterion? Zdr, August 00 76
77 Criterion for DSAI Using distinguishble string Use norm L Two distributions re different if there is string with very different probbility Such string is clled μ-distinguishble Question becomes: Is there string x such tht Pr A,q (x)-pr A,q (x) >μ Zdr, August 00 77
78 (much more to DSAI) D. Ron, Y. Singer, nd N. Tishby. On the lernbility nd usge of cyclic probbilistic finite utomt. In Proceedings of Colt 995, pges 3 40, 995. PAC lernbility results, in the cse where trgets re cyclic grphs Zdr, August 00 78
79 Criterion for MDI MDL inspired heuristic Criterion is: does the reduction of the size of the utomton compenste for the increse in preplexity? F. Thollrd, P. Dupont, nd C. de l Higuer. Probbilistic Df inference using Kullbck-Leibler divergence nd minimlity. In Proceedings of the 7th Interntionl Conference on Mchine Lerning, pges Morgn Kufmnn, Sn Frncisco, CA, 000 Zdr, August 00 79
80 7 Conclusion nd open questions Zdr, August 00 80
81 A good cndidte to lern NFA is DEES Never hs been chllenge, so stte of the rt is still uncler Lots of room for improvement towrds probbilistic trnsducers nd probbilistic context-free grmmrs Zdr, August 00 8
82 Appendix Stern Brocot trees Identifiction of probbilities If we were ble to discover the structure, how do we identify the probbilities? Zdr, August 00 8
83 By estimtion: the edge is used 50 times out of 3000 pssges through the stte : Zdr, August 00 83
84 Stern-Brocot trees: (Stern 858, Brocot 860) Cn be constructed from two simple djcent frctions by the «men» opertion c +c m b d = b+d Zdr, August 00 84
85 Zdr, August 00 85
86 Ide: Insted of returning c(x)/n, serch the Stern-Brocot tree to find good simple pproximtion of this vlue. Zdr, August 00 86
87 Iterted Logrithm: With probbility, for co-finite number of vlues of n we hve: c(x) - < λ log log n n b n λ> Zdr, August 00 87
Gold s algorithm. Acknowledgements. Why would this be true? Gold's Algorithm. 1 Key ideas. Strings as states
Acknowledgements Gold s lgorithm Lurent Miclet, Jose Oncin nd Tim Otes for previous versions of these slides. Rfel Crrsco, Pco Cscuert, Rémi Eyrud, Philippe Ezequel, Henning Fernu, Thierry Murgue, Frnck
More informationNon-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 informationLearning Moore Machines from Input-Output Traces
Lerning Moore Mchines from Input-Output Trces Georgios Gintmidis 1 nd Stvros Tripkis 1,2 1 Alto University, Finlnd 2 UC Berkeley, USA Motivtion: lerning models from blck boxes Inputs? Lerner Forml Model
More informationNondeterminism 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 informationAUTOMATA 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 informationNon 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 informationChapter 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 informationCS375: 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 informationDesigning 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 informationFinite 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 informationFirst 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 informationCS 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 informationAnatomy 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 informationTheory 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 informationMinimal 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 information12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014
CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple
More information1. 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 informationDeterministic 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 information12.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 informationCMSC 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 information1.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 informationNon-Deterministic Finite Automata
Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices
More informationChapter 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 informationTheory 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 informationNon-deterministic Finite Automata
Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent
More informationConvert 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 informationTypes 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 informationTypes 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 informationCMSC 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 informationNon Deterministic Automata. Formal Languages and Automata - Yonsei CS 1
Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges
More informationFormal 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 informationCS: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 informationReinforcement Learning
Reinforcement Lerning Tom Mitchell, Mchine Lerning, chpter 13 Outline Introduction Comprison with inductive lerning Mrkov Decision Processes: the model Optiml policy: The tsk Q Lerning: Q function Algorithm
More informationFirst Midterm Examination
24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet
More informationCS415 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 informationCMPSCI 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 informationCSCI 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 informationFinite 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 informationNon-deterministic Finite Automata
Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion
More informationInductive and statistical learning of formal grammars
Inductive nd sttisticl lerning of forml grmmrs Pierre Dupont Grmmr Induction Mchine Lerning Gol: to give the lerning ility to mchine Design progrms the performnce of which improves over time pdupont@info.ucl.c.e
More informationAssignment 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 informationMore 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 information1 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 informationNew Expansion and Infinite Series
Interntionl Mthemticl Forum, Vol. 9, 204, no. 22, 06-073 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/0.2988/imf.204.4502 New Expnsion nd Infinite Series Diyun Zhng College of Computer Nnjing University
More informationNondeterminism. 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 informationLexical Analysis Finite Automate
Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition
More informationSUMMER KNOWHOW STUDY AND LEARNING CENTRE
SUMMER KNOWHOW STUDY AND LEARNING CENTRE Indices & Logrithms 2 Contents Indices.2 Frctionl Indices.4 Logrithms 6 Exponentil equtions. Simplifying Surds 13 Opertions on Surds..16 Scientific Nottion..18
More informationProperties 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 informationSpeech 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 informationAutomata 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 informationChapter 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 informationPart 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages
Automt & lnguges A primer on the Theory of Computtion Lurent Vnbever www.vnbever.eu Prt 5 out of 5 ETH Zürich (D-ITET) October, 19 2017 Lst week ws ll bout Context-Free Lnguges Context-Free Lnguges superset
More informationReinforcement learning II
CS 1675 Introduction to Mchine Lerning Lecture 26 Reinforcement lerning II Milos Huskrecht milos@cs.pitt.edu 5329 Sennott Squre Reinforcement lerning Bsics: Input x Lerner Output Reinforcement r Critic
More informationNFA 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 informationCS 330 Formal Methods and Models
CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q
More informationWorked out examples Finite Automata
Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will
More information5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata
CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton
More informationNFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:
CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce
More informationThis 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 informationCS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS
CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)
More informationCS103B 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 informationRegular 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 informationAutomata 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 informationFinite 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 informationSpeech 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 informationa,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1
CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother
More informationFinite 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 informationCISC 4090 Theory of Computation
9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions
More informationLECTURE NOTE #12 PROF. ALAN YUILLE
LECTURE NOTE #12 PROF. ALAN YUILLE 1. Clustering, K-mens, nd EM Tsk: set of unlbeled dt D = {x 1,..., x n } Decompose into clsses w 1,..., w M where M is unknown. Lern clss models p(x w)) Discovery of
More informationContext-Free Grammars and Languages
Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;
More informationFABER Formal Languages, Automata and Models of Computation
DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte
More informationTalen 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 informationSolution for Assignment 1 : Intro to Probability and Statistics, PAC learning
Solution for Assignment 1 : Intro to Probbility nd Sttistics, PAC lerning 10-701/15-781: Mchine Lerning (Fll 004) Due: Sept. 30th 004, Thursdy, Strt of clss Question 1. Bsic Probbility ( 18 pts) 1.1 (
More informationGoals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite
Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite
More informationA likelihood-ratio test for identifying probabilistic deterministic real-time automata from positive data
A likelihood-rtio test for identifying proilistic deterministic rel-time utomt from positive dt Sicco Verwer 1, Mthijs de Weerdt 2, nd Cees Witteveen 2 1 Eindhoven University of Technology 2 Delft University
More informationThe University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS
The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook
More informationFundamentals of Computer Science
Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,
More informationIntermediate 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 informationCSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes
CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is
More informationCS375: Logic and Theory of Computing
CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks
More informationCS 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 informationLecture 6 Regular Grammars
Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible
More informationModel 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 informationTuring Machines Part One
Turing Mchines Prt One Wht problems cn we solve with computer? Regulr Lnguges CFLs Lnguges recognizble by ny fesible computing mchine All Lnguges Tht sme drwing, to scle. All Lnguges The Problem Finite
More informationGrammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages
5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive
More informationBayesian Networks: Approximate Inference
pproches to inference yesin Networks: pproximte Inference xct inference Vrillimintion Join tree lgorithm pproximte inference Simplify the structure of the network to mkxct inferencfficient (vritionl methods,
More information5. (±±) Λ = 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 informationFormal Language and Automata Theory (CS21004)
Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge
More information1.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 information2D1431 Machine Learning Lab 3: Reinforcement Learning
2D1431 Mchine Lerning Lb 3: Reinforcement Lerning Frnk Hoffmnn modified by Örjn Ekeberg December 7, 2004 1 Introduction In this lb you will lern bout dynmic progrmming nd reinforcement lerning. It is ssumed
More informationState 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 informationRecursively Enumerable and Recursive. Languages
Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings
More informationAdministrivia CSE 190: Reinforcement Learning: An Introduction
Administrivi CSE 190: Reinforcement Lerning: An Introduction Any emil sent to me bout the course should hve CSE 190 in the subject line! Chpter 4: Dynmic Progrmming Acknowledgment: A good number of these
More informationClosure 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 informationWhere did dynamic programming come from?
Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf
More informationOn 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 informationCS 188: Artificial Intelligence Fall Announcements
CS 188: Artificil Intelligence Fll 2009 Lecture 20: Prticle Filtering 11/5/2009 Dn Klein UC Berkeley Announcements Written 3 out: due 10/12 Project 4 out: due 10/19 Written 4 proly xed, Project 5 moving
More informationPolynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230
Polynomil Approimtions for the Nturl Logrithm nd Arctngent Functions Mth 23 You recll from first semester clculus how one cn use the derivtive to find n eqution for the tngent line to function t given
More information19 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 informationNFAs continued, Closure Properties of Regular Languages
Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,
More information