Learning Regular Languages over Large Alphabets

Size: px
Start display at page:

Download "Learning Regular Languages over Large Alphabets"

Transcription

1 Irini-Eleftheri Mens VERIMAG, University of Grenoble-Alpes Lerning Regulr Lnguges over Lrge Alphbets 10 October 2017 Jury Members Oded Mler Directeur de thèse Lurent Fribourg Exminteur Dn Angluin Rpporteur Eric Gussier Exminteur Peter Hbermehl Rpporteur Frits Vndrger Exminteur

2 Blck Box Lerning Model Lnguge Identifiction System Identifiction Inductive Inference 1 / 31

3 A Short Prehistory nd History of Automton Lerning Edwrd F Moore. Gednken-experiments on sequentil mchines. Defines the problem s blck box model inference. E. Mrk Gold. Lnguge identifiction in the limit. E. Mrk Gold. System identifiction vi stte chrcteriztion. Lerning finite utomt is possible in finite time. He first uses the bsic ide tht underlies tble-bsed methods. E. Mrk Gold. Complexity of utomton identifiction from given dt. Finding the miniml utomton comptible with given smple is NP-hrd. Dn Angluin. Lerning regulr sets from queries nd counter-exmples. The L ctive lerning lgorithm with membership nd equivlence queries. Polynomil in the utomton size. Ronld L. Rivest nd Robert E. Schpire. Inference of finite utomt using homing sequences. An improved version of the L lgorithm using the brekpoint method to tret counter-exmples. 2 / 31

4 Mchine Lerning smll smple M = {(x, y) : x X, y Y} Lern Lerning Regulr Lnguges over lrge or infinite lphbets Σ n lphbet X = Σ set of words Y = {+, } Lern Model f : X Y f (x) = y, (x, y) M predict or identify f (x) for ll x X Model f is lnguge L Σ The model is n symbolic utomton 3 / 31

5 The smple M is known before the lerning procedure strts. The smple M is given. Types of Lerning Off-line vs Online Pssive vs Active The smple M is updted during lerning. The smple M is chosen by the lerning lgorithm. Lerning using Queries The lerning lgorithm cn ccess queries e.g., membership queries, equivlence queries, etc. w? L L(H) L w Σ MQ( ) Yes / No Hypothesis H True / EQ( ) Counter-exmple (cex) 4 / 31

6 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 5 / 31

7 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 5 / 31

8 Regulr Lnguges nd Automt b Σ = {, b} L Σ is lnguge Σ is n lphbet w = 1 n is word Σ is the set of ll words b b prefixes suffixes ε b b b bb... ε b b b bb b bb / 31

9 Regulr Lnguges nd Automt b Σ = {, b} L Σ is lnguge Equivlence reltion u L v iff u w L v w L Nerode s Theorem L is regulr lnguge iff L hs finitely mny equivlence clsses. Q = Σ / (sttes in the miniml representtion of L. b b prefixes suffixes ε b b b bb... ε b b b bb b bb ε b b bb b b 6 / 31

10 Regulr Lnguges nd Automt A sufficient smple tht chrcterizes the lnguge ε b ε b ε + b + + b b + + bb + b b b b b bb b b b b b bb b b 7 / 31

11 Regulr Lnguges nd Automt A sufficient smple tht chrcterizes the lnguge S R E ε b ε + b + + b b + + bb + b b b ε b bb b b S prefixes (sttes) R boundry (R = S Σ \ S) E suffixes (distinguishing strings) f : S R E {+, } clssif. function f s : E {+, } residul functions 7 / 31

12 Regulr Lnguges nd Automt A sufficient smple tht chrcterizes the lnguge S R E ε b ε + b + + b b + + bb + b b b b bb ε b b S prefixes (sttes) R boundry (R = S Σ \ S) E suffixes (distinguishing strings) f : S R E {+, } clssif. function f s : E {+, } residul functions A L = (Σ, Q, q 0, δ, F) - Q = S - q 0 = [ε] - δ([u], ) = [u ] - F = {[u] : (u ε) L} The miniml utomton for L 7 / 31

13 The L Algorithmic Scheme Active lerning using queries Lerner Initilize w? L Techer L Σ b ε b b Fill in Tble +/ MQ( ) b b b bb EQ( ) D. Angluin. Lerning regulr sets from queries nd counter-exmples, / 31

14 strt q0 0, 1 q3 3, 4 0 2, 3, 4 0 0, 2, 3, 4 0, q1 q5 0, 1, 2, 3, 4 3, 4 2 0, 1, 2, 3, 4 q4 1 q2 1, 2, 3, 4 q6 The L Algorithmic Scheme Active lerning using queries Lerner Initilize w? L Techer L Σ b b ε b b Fill in Tble MQ( ) b Mke Hypothesis H +/ L(H)? = L EQ( ) b bb D. Angluin. Lerning regulr sets from queries nd counter-exmples, / 31

15 strt q0 0, 1 q3 3, 4 0 2, 3, 4 0 0, 2, 3, 4 0, q1 q5 0, 1, 2, 3, 4 3, 4 2 0, 1, 2, 3, 4 q4 1 q2 1, 2, 3, 4 q6 The L Algorithmic Scheme Active lerning using queries Lerner Initilize w? L Techer L Σ b ε b b Fill in Tble Mke Hypothesis H +/ L(H)? = L MQ( ) EQ( ) b b b bb Tret cex counter-exmple (cex) True Return H D. Angluin. Lerning regulr sets from queries nd counter-exmples, / 31

16 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 8 / 31

17 Lnguges over Lrge Alphbets Input: x 3 x 2 x 1 x 0 x1 : x2 : x3 : x4 : f UNICODE N Boolen Vectors (B n ) Time Series R 9 / 31

18 Symbolic Automt x < 30 q 0 Σ R x x < 50 x q 2 q 1 x < 20 Σ [ 01 ] = {x Σ : x < 50} (w = , +) w = x < x q 4 33 q x < 50 3 x x < A = (Σ, Σ, ψ, Q, δ, q 0, F) - Q finite set of sttes, - q 0 initil stte, - F ccepting sttes, - Σ lrge concrete lphbet, - δ Q Σ Q - Σ finite lphbet (symbols) - ψ q : Σ Σ q, q Q - [[]] = { Σ ψ() = } A is complete nd deterministic if q Q {[[]] Σ q} forms prtition of Σ. 10 / 31

19 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 10 / 31

20 Lerning over Lrge Alphbets Why L cnnot be pplied? u The lerner sks MQ s for ll continutions of stte ( Σ, sk MQ(u )) Inefficient for lrge finite lphbets Not pplicble to infinite lphbets Σ 11 / 31

21 Lerning over Lrge Alphbets Why L cnnot be pplied? k u Σ The lerner sks MQ s for ll continutions of stte ( Σ, sk MQ(u )) Inefficient for lrge finite lphbets Not pplicble to infinite lphbets Our solution: Use finite smple of evidences to lern the trnsitions Evidences: µ() = { 1, 2 } 11 / 31

22 Lerning over Lrge Alphbets Why L cnnot be pplied? k u b Σ The lerner sks MQ s for ll continutions of stte ( Σ, sk MQ(u )) Inefficient for lrge finite lphbets Not pplicble to infinite lphbets Our solution: Use finite smple of evidences to lern the trnsitions Form evidence comptible prtitions Associte symbol to ech prtition block Evidences: µ() = { 1, 2 } 11 / 31

23 Lerning over Lrge Alphbets Why L cnnot be pplied? k ˆµ() u ˆµ(b) b Evidences: µ() = { 1, 2 } Representtive: ˆµ() = 1 Σ The lerner sks MQ s for ll continutions of stte ( Σ, sk MQ(u )) Inefficient for lrge finite lphbets Not pplicble to infinite lphbets Our solution: Use finite smple of evidences to lern the trnsitions Form evidence comptible prtitions Associte symbol to ech prtition block Ech symbol hs one representtive evidence 11 / 31

24 Lerning over Lrge Alphbets Why L cnnot be pplied? k ˆµ() u ˆµ(b) b Evidences: µ() = { 1, 2 } Representtive: ˆµ() = 1 Σ The lerner sks MQ s for ll continutions of stte ( Σ, sk MQ(u )) Inefficient for lrge finite lphbets Not pplicble to infinite lphbets Our solution: Use finite smple of evidences to lern the trnsitions Form evidence comptible prtitions Associte symbol to ech prtition block Ech symbol hs one representtive evidence The prefixes re symbolic 11 / 31

25 Symbolic Lerning Algorithm Lerner 12 / 31

26 Symbolic Lerning Algorithm Lerner Initilize ε 12 / 31

27 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly ε Repet for ech new stte q: Smple evidences 12 / 31

28 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly ε Repet for ech new stte q: Smple evidences Ask MQ s 12 / 31

29 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly ε Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions 12 / 31

30 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly Σ ε = { 1, 2 } ε Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions Define the symbolic lphbet Σ q 12 / 31

31 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly Σ ε = { 1, 2 } ε Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions Define the symbolic lphbet Σ q Select representtive ˆµ(), Σ q 12 / 31

32 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly Σ ε = { 1, 2 } ε Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions Define the symbolic lphbet Σ q Select representtive ˆµ(), Σ q 12 / 31

33 strt q0 0, 1 q3 3, 4 0 2, 3, 4 0 0, 2, 3, 4 0, q1 q5 0, 1, 2, 3, 4 3, 4 2 0, 1, 2, 3, 4 q4 1 q2 1, 2, 3, 4 q6 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly Mke Hypothesis H Σ ε = { 1, 2 } ε ε 1 2 Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions Define the symbolic lphbet Σ q Select representtive ˆµ(), Σ q 12 / 31

34 strt q0 0, 1 q3 3, 4 0 2, 3, 4 0 0, 2, 3, 4 0, q1 q5 0, 1, 2, 3, 4 3, 4 2 0, 1, 2, 3, 4 q4 1 q2 1, 2, 3, 4 q6 Symbolic Lerning Algorithm Lerner Initilize Fill in Tble prtilly Mke Hypothesis H Tret cex cex Σ ε = { 1, 2 } ε ε 1 2 Repet for ech new stte q: Smple evidences Ask MQ s Lern prtitions Define the symbolic lphbet Σ q Select representtive ˆµ(), Σ q 12 / 31

35 Evidence Comptibility Solve Incomptibility x [ 3 ] x x x x x x x x [ 4 ] [ 1 ] [ 2 ] Boundry Modifiction New Trnsition Evidence Comptibility A stte u is evidence comptible when f u = f u ˆµ() for every evidence [] Evidence incomptibility t stte u v : u ˆµ() + u 13 / 31

36 Counter-exmple Tretment (Symbolic Brekpoint) Let w = 1 i w = u i i v i be counter-exmple. f (ˆµ(s i 1 i) v i) f (ˆµ(s i) v i) f (ˆµ(s i 1) i v i) f (ˆµ(s i 1) ˆµ( i) v i) s i = δ(ε, u i i ) ˆµ(u i ) ε s i is new stte ˆµ(u i ) ε refine [ i ] ˆµ( i ) s s v i ˆµ(u i ) ε ˆµ( i ) s i ˆµ(u i ) ε v i s s ˆµ( i ) v i new v i v i ˆµ( i ) s i v i v i verticl expnsion v i horizontl expnsion 14 / 31

37 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3 } ε x 27 x < 27 Σ 1 ˆµ( 3 ) 15 / 31

38 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3 } ˆµ( 3 ) ε x 27 x < 27 Σ Ask Equivlence Query: counter-exmple: w = , 1 dd distinguishing string 11 discover new stte (verticl expnsion) 15 / 31

39 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3 } ˆµ( 3 ) x < 27 ε Σ x x 43 x < 43 2 Σ 2 = { 4, 5 } ˆµ( 4 ) ˆµ( 5 ) 15 / 31

40 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3, 6 } ˆµ( 3 ) ˆµ( 6 ) 2 Σ 2 = { 4, 5 } ˆµ( 4 ) ˆµ( 5 ) ε x 27 x < 27 Σ 1 2 Ask Equivlence Query: counter-exmple: w = , x 43 dd 73 s evidence of 1 x < 43 dd new trnsition (horizontl expnsion) 15 / 31

41 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3, 6 } ˆµ( 3 ) ˆµ( 6 ) 2 Σ 2 = { 4, 5 } ˆµ( 4 ) ˆµ( 5 ) x < 27 ε x < 63 x x 63 x 43 x < / 31

42 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3, 6 } ˆµ( 3 ) ˆµ( 6 ) 2 Σ 2 = { 4, 5 } ˆµ( 4 ) ˆµ( 5 ) ε x 27 x < 27 x < x 63 x 43 x < 43 Ask Equivlence Query: counter-exmple: w = 52 46, dd 46 s evidence of 2 refine existing trnsition (horizontl expnsion) 15 / 31

43 Exmple over the lphbet Σ = [1, 100) observtion tble semntics hypothesis utomton ε 11 ε ε Σ ε = { 1, 2 } ˆµ( 1 ) ˆµ( 2 ) 1 Σ 1 = { 3, 6 } ˆµ( 3 ) ˆµ( 6 ) 2 Σ 2 = { 4, 5 } ε x 27 x < 27 x < Ask Equivlence Query: True x 63 x 52 return current hypothesis x < 52 return hypothesis ˆµ( 4 ) ˆµ( 5 ) 15 / 31

44 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 15 / 31

45 Equivlence Queries nd Counter-Exmples Wht is the error? L L(H) All w L L(H) re counter-exmples A helpful techer cn compute L L(H) to find counter-exmples. When the techer provides miniml counter-exmples (i.e., miniml in lengthlexicogrphic order), then one evidence per prtition is used the boundries re exctly determined finl hypothesis contins no error The lgorithm termintes with correct conjecture fter sking t most O(mn 2 ) MQ s nd t most O(mn) EQ s, when Σ is totlly-ordered. 16 / 31

46 Equivlence Queries nd Counter-Exmples Wht is the error? L L(H) All w L L(H) re counter-exmples In the bsence of helpful techer nd the lerner cn use only MQ s EQ s re pproximted by testing: select set of words rndomly sk MQ s for them check if the result mtches with H return counter-exmple A hypothesis utomton H is Probbly Approximtely Correct (PAC) iff Pr(P(L L(H)) < ɛ) > 1 δ. Sufficient tests for hypothesis H i to be PAC: r i = 1 ɛ (ln 1 δ + (i + 1) ln 2). [Ang87] 17 / 31

47 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 17 / 31

48 Adpttion to the Boolen Alphbet Prtition of R (or N) into finite number of intervls Prtition of B n into finite number of cubes / 31

49 Adpttion to the Boolen Alphbet Representtions of the Boolen Cube ψ : B 4 { 1, 2, 3 } B n : 3 x 1 x x 1 x 3 x 1 x 2 x 3 x x 3 1, if x 3 ψ() = 2, if x 1 x 3 3, if x 1 x 3 Boolen Function x1x x 3 x Krnugh mp x x Binry Decision Tree 19 / 31

50 Adpttion to the Boolen Alphbet Lerning Prtitions Σ = B 4 Lerning Binry Decision Trees using the Greedy Splitting Algorithm CART u x1x x 3 x r r b g g 0 1 x 3 x x , if x 3 ψ() = 2, if x 1 x 3 3, if x 1 x 3 Best split: x 1 Use Informtion Gin (Entropy) Mesure to find Best Split x 1 x 3 x 1 x 3 Breimn et l. Clssifiction nd regression trees, / 31

51 Adpttion to the Boolen Alphbet Exmple over Σ = B 4 observtion tble semntics hypothesis utomton ε ε ε x 2 3 x 2 q 0 q 1 2 x 2 0 x / 31

52 Adpttion to the Boolen Alphbet Exmple over Σ = B 4 observtion tble semntics hypothesis utomton ε 0000 ε ε x 2 3 x 2 q 0 q 1 0 x 2 2 x 2 Ask Equivlence Query: counter-exmple: w = (1010) (0000), + w = 0 0, dd distinguishing string (0000) discover new stte evidence incomptibility 21 / 31

53 Adpttion to the Boolen Alphbet Exmple over Σ = B 4 observtion tble ε 0000 ε ε semntics hypothesis utomton 0 x 2 x 3 1 x 2 q 0 q 1 q 2 3 x 2 x 2 x x 2 x2 1 x 3 4 x 1 x 3 Ask Equivlence Query: 21 / 31

54 Adpttion to the Boolen Alphbet Exmple over Σ = B 4 observtion tble ε 0000 ε ε semntics hypothesis utomton 0 x 2 x 3 1 x 2 q 0 q 1 q 2 3 x 2 x 2 x x 2 x2 1 x 3 4 x 1 x 3 Ask Equivlence Query: True terminte: Return H 21 / 31

55 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 21 / 31

56 Empiricl Results Comprison to the best L lgorithm #MQs ( 10 3 ) #EQs #sttes lerned Symbolic Algorithm L Reduced lphbet size Σ Experiment: Trget utomton: - Σ N - 10 Σ Q = 15, - Σ q 5, q Q Structure is fixed PAC criterion for ɛ = δ = 0.05 MQ s = MQ s for lerning + MQ s for testing Rivest nd Schpire. Inference of finite utomt using homing sequences, / 31

57 Empiricl Results Comprison to the best L lgorithm #MQs ( 10 3 ) #EQs #sttes lerned Symbolic Algorithm L Reduced number of sttes in trget Experiment: Trget utomton: - Σ N - Σ = Q 45 - Σ q 5, q Q Rndom structure PAC criterion for ɛ = δ = 0.05 MQ s = MQ s for lerning + MQ s for testing Rivest nd Schpire. Inference of finite utomt using homing sequences, / 31

58 #MQs ( 10 3 ) MT ( 10 2 ) #EQs ( 10 ) Empiricl Results Applying the symbolic lgorithm over the Boolens Symbolic Algorithm ( n ) lphbet size sttes in trget Experiment: Trget utomton: Left: Q = Σ 2 15 Right: Σ = B 8 3 Q 50 BDTs depth 4, q Q PAC criterion for ɛ = δ = 0.05 MQ s = MQ s for lerning + MQ s for testing 24 / 31

59 Empiricl Results Vlid psswords over the ASCII chrcters Control Chrcters Numerls Lower-Cse Letters Punctution Symbols Upper-Cse Letters 25 / 31

60 Empiricl Results Vlid psswords over the ASCII chrcters The Symbolic Algorithm, L Reduced: [RS93] 100 Symbolic Algorithm L Reduced Symbolic Algorithm L Reduced #Sttes lerned #MQs ( 10 3 ) A B C D E pssword type 0 A B C D E pssword type A (pin) B (esy) C (medium) D (medium-strong) E (strong) Length: 4 to 8. Contins only numbers. Length: 4 to 8. It contins ny printble chrcter. Length: 6 to 14. Contins ny printble chrcter but punctution chrcters. Length: 6 to 14. Contins t lest 1 number nd 1 lower-cse letter. Punctution chrcters re llowed. Length: 6 to 14. Contins t lest 1 chrcter from ech group. 26 / 31

61 Empiricl Results Vlid psswords over the ASCII chrcters A (pin) B (esy) C (medium) D (medium-strong) E (strong) Length: 4 to 8. Contins only numbers. Length: 4 to 8. It contins ny printble chrcter. Length: 6 to 14. Contins ny printble chrcter but punctution chrcters. Length: 6 to 14. Contins t lest 1 number nd 1 lower-cse letter. Punctution chrcters re llowed. Length: 6 to 14. Contins t lest 1 chrcter from ech group. 26 / 31

62 Empiricl Results Vlid psswords over the ASCII chrcters Σ = {0, 1,..., 127} Σ = B 7 90 SL SLbool 120 SL SLbool 600 SL SLbool #MQs ( 10 3 ) #Sttes #Symbols A B C D E pssword type 0 A B C D E pssword type 0 A B C D E pssword type 27 / 31

63 Outline Preliminries Regulr Lnguges nd Automt The L Algorithmic Scheme Lrge Alphbets Motivtion Symbolic Representtion of Trnsitions - Symbolic Automt Lerning Symbolic Automt Why L cnnot be pplied? Our Solution The Algorithm Equivlence Queries nd Counter-Exmples Adpttion to the Boolen Alphbet Experimentl Results Conclusion 27 / 31

64 Relted Work Ides similr to ours hve been suggested nd explored in series of ppers, which lso dpt utomton lerning nd the L lgorithm to lrge lphbets. F Howr, B Steffen, nd M Merten (2011). Automt lerning with utomted lphbet bstrction refinement. M Isberner, F Howr, nd B Steffen (2013). Inferring utomt with stte-locl lphbet bstrctions. The hypothesis is prtilly defined hypothesis where the trnsition function is not defined outside the observed evidence. T Berg, B Jonsson, nd H Rffelt (2006). Regulr inference for stte mchines with prmeters. Bsed on lphbet refinement tht genertes new symbols indefinitely. 28 / 31

65 Relted Work Ides similr to ours hve been suggested nd explored in series of ppers, which lso dpt utomton lerning nd the L lgorithm to lrge lphbets. S Drews nd L D Antoni (2017). Lerning symbolic utomt. Gives more generl justifiction for lerning scheme like ours by providing tht lernbility is closed under product nd disjoint union. M Botinčn nd D Bbić (2013). Sigm*: Symbolic lerning of input-output specifictions. Weker termintion results tht is relted to the counter-exmple guided bstrction refinement procedure. Hndles trnsducers insted of utomt. 28 / 31

66 Contribution O Mler nd IE Mens. Lerning regulr lnguges over lrge lphbets. In TACAS, vol 8413 of LNCS, pges Springer, O Mler nd IE Mens. Lerning regulr lnguges over lrge ordered lphbets. Logicl Methods in Computer Science (LMCS), 11(3), O Mler nd IE Mens. A Generic Algorithm for Lerning Symbolic Automt from Membership Queries. In Models, Algorithms, Logics nd Tools, vol of LNCS, pges Springer, / 31

67 Conclusions We presented n lgorithm for lerning regulr lnguges over lrge lphbets using symbolic utomt. We decomposed the problem into lerning new sttes (s in stndrd utomton lerning) nd lerning the lphbet prtitions in ech stte. Modifiction of lphbet prtitions re treted in rigorous wy tht does not introduce superfluous symbols. It cn be done s sttic lerning of concepts/prtitions in the lphbet domin. We defined the notion of evidence comptibility which is n invrince of the lgorithm nd extended the brekpoint method to detect its violtion. We explored in detil nd implemented the cses where lphbets re numbers or Boolen vectors. We hndle both helpful nd non-helpful techers. 30 / 31

68 Future Work Extend the lgorithm to lphbets such s R n nd R n B n using regression trees. Explore the use of other deep lerning methods to lern the lphbet prtitions. Study more relistic situtions where the lerner does not hve full control over the smple nd when some noise is present. Mke more experiments nd lgorithmic improvement for the Boolen cse. Find nd explore convincing clss of pplictions. Thnk you! 31 / 31

Learning Moore Machines from Input-Output Traces

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

More information

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

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

More information

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

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

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

More information

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

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

More information

Theory of Computation Regular Languages

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

More information

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

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

More information

State Minimization for DFAs

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

More information

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

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

More information

CS375: Logic and Theory of Computing

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

More information

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

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

More information

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

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

More information

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

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

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

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

More information

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

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

a,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 information

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

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

More information

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

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

More information

Recursively Enumerable and Recursive. Languages

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

CISC 4090 Theory of Computation

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

CS 275 Automata and Formal Language Theory

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

More information

Non-Deterministic Finite Automata

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

More information

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

Non-deterministic Finite Automata

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

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

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

More information

Lecture 09: Myhill-Nerode Theorem

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

More information

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

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

More information

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

Deterministic Finite-State Automata

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

More information

Formal languages, automata, and theory of computation

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

More information

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

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

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2011.2.1 COMPUTER SCIENCE TRIPOS Prt IA Tuesdy 7 June 2011 1.30 to 4.30 COMPUTER SCIENCE Pper 2 Answer one question from ech of Sections A, B nd C, nd two questions from Section D. Submit the nswers

More information

Gold s algorithm. Acknowledgements. Why would this be true? Gold's Algorithm. 1 Key ideas. Strings as states

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 information

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

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

More information

Non-deterministic Finite Automata

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

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Harvard University Computer Science 121 Midterm October 23, 2012

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

More information

1.4 Nonregular Languages

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

More information

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

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

CSCI FOUNDATIONS OF COMPUTER SCIENCE

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

More information

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

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

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

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

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

More information

FABER Formal Languages, Automata and Models of Computation

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

More information

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

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

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

Automata and Languages

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

More information

Extending Automated Compositional Verification to the Full Class of Omega-Regular Languages

Extending Automated Compositional Verification to the Full Class of Omega-Regular Languages Extending Automted Compositionl Verifiction to the Full Clss of Omeg-Regulr Lnguges Azdeh Frzn 1, Yu-Fng Chen 2, Edmund M. Clrke 1, Yih-Kuen Tsy 2, nd Bow-Yw Wng 3 1 Crnegie Mellon University 2 Ntionl

More information

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

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

More information

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

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

More information

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

Faster Regular Expression Matching. Philip Bille Mikkel Thorup

Faster Regular Expression Matching. Philip Bille Mikkel Thorup Fster Regulr Expression Mtching Philip Bille Mikkel Thorup Outline Definition Applictions History tour of regulr expression mtching Thompson s lgorithm Myers lgorithm New lgorithm Results nd extensions

More information

Good-for-Games Automata versus Deterministic Automata.

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

More information

A tutorial on sequential functions

A tutorial on sequential functions A tutoril on sequentil functions Jen-Éric Pin LIAFA, CNRS nd University Pris 7 30 Jnury 2006, CWI, Amsterdm Outline (1) Sequentil functions (2) A chrcteriztion of sequentil trnsducers (3) Miniml sequentil

More information

Finite-State Automata: Recap

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

More information

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

1 From NFA to regular expression

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

More information

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages

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

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

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

More information

p-adic Egyptian Fractions

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

More information

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

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

More information

Relating logic to formal languages

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

More information

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir CSCI 2400 Models of Computtion, Section 3 Solutions to Homework 4 Problem 1. ll the solutions below refer to the Pumping Lemm of Theorem 4.8, pge 119. () L = f n b l k : k n + lg Let's ssume for contrdiction

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

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

Software Engineering using Formal Methods

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

More information

Streamed Validation of XML Documents

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

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

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

More information

Deterministic Finite Automata

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

More information

Worked out examples Finite Automata

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

More information

New data structures to reduce data size and search time

New data structures to reduce data size and search time New dt structures to reduce dt size nd serch time Tsuneo Kuwbr Deprtment of Informtion Sciences, Fculty of Science, Kngw University, Hirtsuk-shi, Jpn FIT2018 1D-1, No2, pp1-4 Copyright (c)2018 by The Institute

More information

Inference of regular expressions/grammars for given data entities

Inference of regular expressions/grammars for given data entities Inference of regulr expressions/grmmrs for given dt entities Lis Busser University of Kiserslutern, Embedded Systems Group l busser13@cs.uni-kl.de Abstrct We consider three different lgorithmic ides to

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

Fundamentals of Computer Science

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

More information

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

Lecture 6 Regular Grammars

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

More information

NFAs continued, Closure Properties of Regular Languages

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

More information

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

Lexical Analysis Finite Automate

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

More information

Homework 3 Solutions

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

More information

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

CS 330 Formal Methods and Models

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

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

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

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

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

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

CS 275 Automata and Formal Language Theory

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

More information

NFAs continued, Closure Properties of Regular Languages

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

More information

3 Regular expressions

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

More information

1 Structural induction

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

More information

1.3 Regular Expressions

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

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

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