A tutorial on sequential functions

Size: px
Start display at page:

Download "A tutorial on sequential functions"

Transcription

1 A tutoril on sequentil functions Jen-Éric Pin LIAFA, CNRS nd University Pris 7 30 Jnury 2006, CWI, Amsterdm

2 Outline (1) Sequentil functions (2) A chrcteriztion of sequentil trnsducers (3) Miniml sequentil trnsducers (4) Minimiztion of sequentil trnsducers (5) Composition of sequentil trnsducers (6) An lgebric pproch (7) The wreth product principle

3 Prt I Sequentil functions

4 Informl definitions A trnsducer (or stte mchine) is n utomton equipped with n output function. A trnsducer computes reltion on A B. A sequentil trnsducer is trnsducer whose underlying utomton is deterministic (but not necessrily complete). A sequentil trnsducer computes prtil function from A into B. A pure sequentil trnsducer computes prtil function ϕ preserving prefixes: if u is prefix of v, then ϕ(u) is prefix of ϕ(v).

5 An exmple of pure sequentil trnsducer b 0 ε On the input b, the output is b 0 ε

6 Pure sequentil trnsducers A pure sequentil trnsducer is 6-tuple A = (Q, A, B, i,, ) where the input function (q, ) q Q nd the output function (q, ) q B re defined on the sme domin D Q A. q q q

7 Extensions of the trnsition nd output functions The trnsition function is extended to Q A Q. Set q ε = q nd, if q u nd (q u) re defined, q (u) = (q u). The output function is extended to Q A B. Set q ε = ε nd, if q u nd (q u) re defined, q (u) = (q u)((q u) ). u q u (q u) q q u q u

8 Pure sequentil functions The function ϕ: A B defined by ϕ(u) = i u is clled the function relized by A. A function is pure sequentil if it cn be relized by some pure sequentil trnsducer.

9 Exmples of pure sequentil functions Replcing consecutive white spces by single one: 1 2 ε Converting upper cse to lower cse letters: b b. 1 A B b.

10 Coding nd decoding Consider the coding 0 b 1010 c 100 d 1011 r 11 Decoding function 1 ε 1 r 1 ε 1 d 0 0 ε 0 c 0 b

11 Decoding 0 b 1010 c 100 d 1011 r ε r 0 b 1 d 0 c 0 ε 4 1 ε brcdbr

12 Sequentil trnsducers: informl definition A sequentil trnsducer is trnsducer whose underlying utomton is deterministic (but not necessrily complete). There is n initil prefix nd terminl function. 11 ε b 0 ε On the input b, the output is

13 Sequentil trnsducers A sequentil trnsducer is 8-tuple A = (Q, A, B, i,,, m, ρ) where (Q, A, B, i,, ) is pure sequentil trnsducer, m B is the initil prefix nd ρ: Q B is prtil function, clled the terminl function. 11 ε b 0 ε

14 Sequentil functions The function ϕ: A B defined by ϕ(u) = m(i u)ρ(i u) is clled the function relized by A. A function is sequentil if it cn be relized by some sequentil trnsducer.

15 Some exmples of sequentil functions The function x x + 1 (in reverse binry) 1 0 ε ε The mp ϕ : A A defined by ϕ(x) = uxv. u 1 v

16 Addition (in reverse binry) (0, 0) 0 (0, 1) 1 (1, 0) 1 ε (1, 1) ε (0, 0) 1 1 (0, 1) 0 (1, 0) 0 (1, 1) 1 In inverse binry nottion, 22 = nd 13 = Tking s input (0, 1)(1, 0)(1, 1)(0, 1)(1, 0), the output is , the inverse binry representtion of 35 =

17 Hrdwre pplictions (Wikipedi) The circuit digrm for 4 bit TTL counter

18 Other exmples Multipliction by Replcing ech occurrence of 011 by ε 2 1 ε 3 ε

19 Multipliction by ε

20 Prt II A chrcteriztion

21 The geodesic metric The distnce between bbb nd bbb is 7. b b b b b

22 The geodesic metric (2) Denote by u v the longest common prefix of the words u nd v. Then d(u, v) = u + v 2 u v Exmple: d(bbb, bbb) = = 7. One cn show tht d is metric. (1) d(u, v) = 0 iff u = v, (2) d(u, v) = d(v, u), (3) d(u, v) d(u, w) + d(w, v).

23 A chrcteriztion of sequentil functions A function ϕ: : A B is Lipschitz if there exists some K > 0 such tht, for ll u, v A, d(ϕ(u), ϕ(v)) Kd(u, v) Theorem (Choffrut 1979) Let ϕ : A B be function whose domin is closed under tking prefixes. TFCAE: (1) ϕ is sequentil, (2) ϕ is Lipschitz, nd ϕ 1 preserves regulr sets.

24 A chrcteriztion of pure sequentil functions Theorem (Ginsburg-Rose 1966) Let ϕ : A B be function whose domin is closed under tking prefixes. TFCAE: (1) ϕ is pure sequentil function, (2) ϕ is Lipschitz nd preserves prefixes, nd ϕ 1 preserves regulr sets.

25 Prt III Miniml sequentil trnsducers

26 Residuls of lnguge Let L be lnguge over A. Let u A. The (left) residul of L by u is the set u 1 L = {x A ux L}. It is esy to see tht v 1 (u 1 L) = (uv) 1 L. Let A = {, b} nd L = A ba. Then 1 1 L = L 1 L = A ba ba b 1 L = L (b) 1 L = A ba A, etc.

27 Miniml utomton of lnguge The miniml utomton of lnguge L is equl to A(L) = (Q, A,, i, F) where Q = {u 1 L u A }, i = L nd F = {u 1 L u L}). The trnsition function is given by (u 1 L) = 1 (u 1 L) = (u) 1 L. u 1 L (u) 1 L

28 Exmple of miniml utomton Let A = {, b} nd L = A ba. Then 1 L = A ba ba = L 1 b 1 L = L b 1 L 1 = A ba A = L 2 1 L 1 = L 1 1 L 2 = A = L 3 b 1 L 2 = L 1 L 3 = b 1 L 3 = L 3 b, b L L b 1 L 2 L 3 b

29 Residuls of sequentil function Let ϕ : A B be function nd let u A. The residul of ϕ by u is the function u 1 ϕ : A B defined by (u 1 ϕ)(x) = (ϕ u) 1 ϕ(ux) where (ϕ u) is the longest common prefix of the words ϕ(ux), for ux Dom(ϕ). In other words, u 1 ϕ cn be obtined from the function x ϕ(ux) by deleting the prefix ϕ u of ϕ(ux).

30 The function n 6n n x ϕ(x) 0 ε n x ϕ(x)

31 Let ε 1 ϕ = ϕ 0. Then ϕ 0 represents n 3n n x ϕ(x) 0 ε n x ϕ(x)

32 The function ϕ 0, representing n 3n n x ϕ 0 (x) 0 ε ε n x ϕ 0 (x)

33 Residuls of ϕ 0 Let ϕ 0, ϕ 1 nd ϕ 2 be the functions representing n 3n, n 3n + 1 nd n 3n + 2, respectively. ϕ 0 0 = 0 (0 1 ϕ 0 )(x) = 0 1 ϕ 0 (0x) = ϕ 0 (x) ϕ 0 1 = 1 (1 1 ϕ 0 )(x) = 1 1 ϕ 0 (1x) = ϕ 1 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 0 (1x) represents 3(2n + 1) = 6n + 3 nd 1 1 ϕ 0 (1x) represents ((6n + 3) 1)/2 = 3n + 1.

34 The function ϕ 1, representing n 3n + 1 n x ϕ 1 (x) 0 ε ε n x ϕ 1 (x)

35 Residuls of ϕ 1 ϕ 1 0 = 1 (0 1 ϕ 1 )(x) = 1 1 ϕ 1 (0x) = ϕ 0 (x) Indeed, if x represents n, 0x represents 2n, ϕ 1 (0x) represents 3(2n) + 1 = 6n + 1 nd 1 1 ϕ 1 (0x) represents ((6n + 1) 1)/2 = 3n. ϕ 1 1 = 0 (1 1 ϕ 1 )(x) = 0 1 ϕ 1 (1x) = ϕ 2 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 1 (1x) represents 3(2n + 1) + 1 = 6n + 4 nd 0 1 ϕ 1 (1x) represents (6n + 4)/2 = 3n + 2.

36 The function ϕ 2, representing n 3n + 2 n x ϕ 2 (x) 0 ε ε n x ϕ 2 (x)

37 Residuls of ϕ 2 ϕ 2 0 = 0 (0 1 ϕ 2 )(x) = 0 1 ϕ 2 (0x) = ϕ 1 (x) Indeed, if x represents n, 0x represents 2n, ϕ 2 (0x) represents 3(2n) + 2 = 6n + 2 nd 0 1 ϕ 2 (0x) represents (6n + 2)/2 = 3n + 1. ϕ 2 1 = 1 (1 1 ϕ 2 )(x) = 1 1 ϕ 2 (1x) = ϕ 2 (x) Indeed, if x represents n, 1x represents 2n + 1, ϕ 2 (1x) represents 3(2n + 1) + 2 = 6n + 5 nd 1 1 ϕ 2 (1x) represents ((6n + 5) 1)/2 = 3n + 2.

38 Miniml sequentil trnsducer of function ϕ It is the sequentil trnsducer whose sttes re the residuls of ϕ nd trnsitions re of the form ψ ψ(ε) ψ ( 1 ψ)(ε) 1 ψ Recll tht ψ is the longest common prefix of the words ψ(x), for x Dom(ϕ). The initil stte is ε 1 ϕ nd the initil prefix is ϕ ε.

39 More formlly... It is the sequentil trnsducer A ϕ = (Q, A, B, i,,, m, ρ) defined by Q = {u 1 ϕ u A nd Dom(ϕ u) } i = ε 1 ϕ, m = ϕ ε nd, for q Q, ρ(q) = q(ε) A typicl trnsition of A ϕ : u 1 ϕ (u 1 ϕ) (u 1 ϕ)(ε) ((u) 1 ϕ)(ε) (u) 1 ϕ

40 The miniml sequentil function of n 6n ε = nd = 1110 = Thus ϕ( ) =

41 Prt IV Minimizing sequentil trnsducers

42 The three steps of the lgorithm How to minimize sequentil trnsducer? (1) Obtin trim trnsducer (esy) (2) Normlise the trnsducer (tricky) (3) Merge equivlent sttes (stndrd)

43 Obtining trim trnsducer Let A = (Q, A, B, i,,, m, ρ) be sequentil trnsducer nd let F = Dom(ρ). The trnsducer A is trim if the utomton (Q, A,, q 0, F) is trim: ll sttes re ccessible from the initil stte nd one cn rech finl stte from ny stte. Algorithm: it suffices to remove the useless sttes.

44 Equivlent trnsducers ε b ε b ε b ε b ε ε b b ε ε ε b b ε These four sequentil trnsducers relize exctly the sme function ϕ : {, b} {, b}, with domin () b, defined, for ll n 0, by ϕ( 2n b) = (b) n.

45 Normlized trnsducer Let A = (Q, A, B, i,,, m, ρ) be sequentil trnsducer. For ech stte q, denote by m q the gretest common prefix of the words (q u)ρ(q u), where u rnges over the domin of the sequentil function. Equivlently, m q = ϕ q ε, where ϕ q is the sequentil function relized by the trnsducer derrived from A by tking q s initil stte nd the empty word s initil prefix. A sequentil trnsducer is normlized if, for ll sttes q, m q is the empty word.

46 m q = (q u)ρ(q u) ε ε b ε ε b ε b ε ε b ε (1) m 1 = ε m 2 = ε m 3 = ε (2) m 1 = ε m 2 = m 3 = ε (3) m 1 = ε m 2 = m 3 = ε (4) m 1 = m 2 = m 3 = ε

47 Normlising trnsducer Let A = (Q, A, B, i,,, m, ρ) be trim sequentil trnsducer. One obtins normlised trnsducer by chnging the initil prefix, the output function nd the terminl function s follows: q = m 1 q (q )m q m = mm i ρ (q) = m 1 q ρ(q)

48 Normlistion on n exmple ε ε b b ε ε b ε b ε One hs m 1 =, m 2 =, m 3 = ε. Thus m = mm 1 = ε = 1 = m 1 1 (1 )m 2 = 1 (b) = b 2 = m 1 2 (1 )m 1 = 1 (ε) = ε 1 b = m 1 1 (1 b)m 3 = 1 ()ε = ε ρ (3) = m 1 3 ρ(3) = ε 1 ε = ε

49 Computing the m q is not so esy... b b 1 2 ε ε b b b b 3 4 bb X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb

50 Solving the system X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb We work on k = A {0}. Addition is the lest common prefix opertor (u + 0 = 0 + u = u by convention). Observe tht u + u = u nd u(v 1 + v 2 ) = uv 1 + uv 2 (but (v 1 + v 2 )u = v 1 u + v 2 u does not hold in generl). Thus k is left semiring.

51 Choffrut s lgorithm (2003) The prefix order is prtil order on k (with u 0 by convention). One cn extend this order to k n componentwise. Proposition For ll u, v k n, the function f(x) = ux + v is incresing. The sequence f n (0) is decresing nd converges to the gretest fixpoint of f. The gretest solution of our system is exctly (m 1, m 2, m 3, m 4 ).

52 Exmple of Choffrut s lgorithm X 1 = bx 1 + bx 2 + bx 3 X 2 = X 1 + bx 4 X 3 = X 1 + bx 4 X 4 = bx 2 + bb The sequence f n (0) is (0, 0, 0, 0), (0, 0, 0, bb), (0, bbb, bbb, bb), (bbbb, bbb, bbb, b), (bb, ε, bbb, b), (b, ε, bb, b), (b, ε, b, b), (b, ε, b, b). Thus m 1 = b, m 2 = ε, m 3 = b, m 4 = b.

53 Merging sttes Two sttes re equivlent if they re equivlent in the input utomton (Q, A, i, F, ), hve the sme output functions nd the sme terminl functions: p q p q p = q ρ(p) = ρ(q)

54 Prt V Composition of sequentil functions

55 Composition of two pure sequentil trnsducers Theorem Pure sequentil functions re closed under composition. Let σ nd τ be two pure sequentil functions relized by the trnsducers A = (Q, A, B, q 0,, ) nd B = (P, B, C, p 0,, ) The wreth product of B by A is obtined by tking s input for B the output of A. It relizes τ σ.

56 Wreth product of two pure sequentil trnsducers The wreth product is defined by B A = (P Q, A, C, (p 0, q 0 ),, ) (p, q) = (p (q ), q ) (p, q) = p (q ) (p, q) p (q ) (p (q ), q )

57 Composition of two sequentil trnsducers Theorem Sequentil functions re closed under composition. Let ϕ nd ψ be two sequentil functions relized by the trnsducers A (equipped with the initil word n nd the terminl function ρ) nd B (equipped with the initil word m nd the terminl function σ). The wreth product of B by A is obtined by tking m(p 0 n) s initil word nd, s terminl function, ω(p, q) = (p ρ(q))σ(p ρ(q)).

58 Iterting sequentil functions... Iterting sequentil functions cn led to difficult problems... { 3n + 1 if n is odd Let f(n) = n/2 if n is even It is conjectured tht for ech positive integer n, there exists k such tht f k (n) = 1. The problem is still open.

59 Miniml trnsducer of the 3n + 1 function Let f(n) = { 3n + 1 if n is odd n/2 if n is even ε ε ε ε ε

60 Iterting the 3n + 1 function... 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1.

61 A useful result Let ϕ : A B be pure sequentil function relized by A = (Q, A, B, q 0,, ). Let L be the regulr lnguge over B recognized by the DFA B = (P, B,, p 0, F). The wreth product of B by A is the DFA B A = (P Q, A, (p 0, q 0 ), ) defined by (p, q) = (p (q ), q ). Theorem The lnguge ϕ 1 (L) is recognized by B A.

62 Exmple 1 Let ϕ(u) = n, where n is the number of occurrences of b in u. This function is pure sequentil: b ε ε b ε ε b ε Then ϕ 1 () is the set of words contining exctly one occurrence of b.

63 Wreth product of the two utomt 1 2 1, 2 b 1, 3 2, 2 b 2, 3 1, 1 b 2, 1 b b b

64 The opertion L LA Let A = (Q, A, B, q 0, F, ) be DFA. Let B = Q A nd let σ: A B be the pure sequentil function defined by σ( 1 n ) = (q 0, 1 )(q 0 1, 2 ) (q 0 1 n 1, n ) q (q, ) q Let A nd let C = F {} B. Then σ 1 (B CB ) = LA.[Proof on blckbord!]

65 Exmple 2 Therefore B A recognizes LA, where B is the miniml utomton of B CB. B \ C B C 1 2 Note tht if ϕ is formul of liner temporl logic, then L(F(p Xϕ)) = A L(ϕ)

66 Prt VI The lgebric pproch Ide: replce utomt by monoids.

67 Trnsformtion monoid of n utomton b c b, c b, c b Reltions:

68 Trnsformtion monoid of n utomton b c b, c b, c b Reltions: =

69 Trnsformtion monoid of n utomton b c b b, c b, c b Reltions: =

70 Trnsformtion monoid of n utomton b c b b, c b, c b Reltions: = c =

71 Trnsformtion monoid of n utomton b c b b, c b, c b Reltions: = c = b =

72 Trnsformtion monoid of n utomton b c b b, c b, c b Reltions: = c = b = bb = b

73 Trnsformtion monoid of n utomton b c b bc b, c b, c b Reltions: = c = b = bb = b

74 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b

75 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc

76 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc cc = c

77 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc cc = c bc = b

78 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c

79 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c cb = bc

80 Trnsformtion monoid of n utomton b c b bc c b, c b, c b Reltions: = c = b = bb = b cb = bc cc = c bc = b bc = c cb = bc The end!

81 Recognizing by morphism Definition Let M be monoid nd let L be lnguge of A. Then M recognizes L if there exists monoid morphism ϕ : A M nd subset P of M such tht L = ϕ 1 (P). Proposition A lnguge is recognized by finite monoid iff it is recognized by finite deterministic utomton.

82 Syntctic monoid Definition (lgorithmic) The syntctic monoid of lnguge is the trnsition monoid of its miniml utomton. Definition (lgebric) The syntctic monoid of lnguge L A is the quotient monoid of A by the syntctic congruence of L: u L v iff, for ech x, y A, xvy L xuy L

83 Prt VII The wreth product principle The wreth product N K of two monoids N nd K is defined on the set N K K by the following product: (f 1, k 1 )(f 2, k 2 ) = (f, k 1 k 2 ) with f(k) = f 1 (k)f 2 (kk 1 ) Strubing s wreth product principle provides description of the lnguges recognized by the wreth product of two utomt (or monoids).

84 The wreth product principle Proposition Let M nd N be monoids. Every lnguge of A recognized by M N is finite union of lnguges of the form U σϕ 1 (V ), where ϕ : A N is monoid morphism, U is lnguge of A recognized by ϕ nd V is lnguge of BN recognized by M.

85 The wreth product principle 2 Theorem Let L A be lnguge recognized by n wreth product of the form (P, Q A) (Q, A). Then L is finite union of lnguges of the form W σ 1 (V ), where W A is recognized by (Q, A), σ is C-sequentil function ssocited with the ction (Q, A) nd V (Q A) is recognized by (P, Q A).

86 References I C. Choffrut, Contributions à l étude de quelques fmilles remrqubles de fonctions rtionnelles, Thèse de doctort, Université Pris 7, Pris (LITP), C. Choffrut, A generliztion of Ginsburg nd Rose s chrcteriztion of gsm mppings, in Automt, Lnguges nd Progrmming, H. A. Murer (éd.), pp , Lecture Notes in Comput. Sci. vol. 71, Springer, 1979.

87 References II C. Choffrut, Minimizing subsequentil trnsducers: survey, Theoret. Comp. Sci. 292 (2003), S. Ginsburg nd G. F. Rose, A chrcteriztion of mchine mppings, Cnd. J. Mth. 18 (1966),

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

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

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

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

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

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

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

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

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

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

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

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

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

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

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

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

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

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

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

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

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

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

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Lecture 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

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

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

First Midterm Examination

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

More information

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

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

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

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

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

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

A negative answer to a question of Wilke on varieties of!-languages

A negative answer to a question of Wilke on varieties of!-languages A negtive nswer to question of Wilke on vrieties of!-lnguges Jen-Eric Pin () Astrct. In recent pper, Wilke sked whether the oolen comintions of!-lnguges of the form! L, for L in given +-vriety of lnguges,

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

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

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

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

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

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

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

Radix enumeration of rational languages is almost co-sequential

Radix enumeration of rational languages is almost co-sequential Rdix enumertion of rtionl lnguges is lmost co-sequentil Pierre-Yves Angrnd Jcques Skrovitch July 18, 2008 Abstrct We define nd study here the clss of rtionl functions tht re finite union of sequentil functions.

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

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

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

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

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

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

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

More general families of infinite graphs

More general families of infinite graphs More generl fmilies of infinite grphs Antoine Meyer Forml Methods Updte 2006 IIT Guwhti Prefix-recognizle grphs Theorem Let G e grph, the following sttements re equivlent: G is defined y reltions of the

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

Closure Properties of Regular Languages

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

More information

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

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

Designing finite automata II

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

More information

How to simulate Turing machines by invertible one-dimensional cellular automata

How to simulate Turing machines by invertible one-dimensional cellular automata How to simulte Turing mchines by invertible one-dimensionl cellulr utomt Jen-Christophe Dubcq Déprtement de Mthémtiques et d Informtique, École Normle Supérieure de Lyon, 46, llée d Itlie, 69364 Lyon Cedex

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

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

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

Nondeterministic Biautomata and Their Descriptional Complexity

Nondeterministic Biautomata and Their Descriptional Complexity Nondeterministic Biutomt nd Their Descriptionl Complexity Mrkus Holzer nd Sestin Jkoi Institut für Informtik Justus-Lieig-Universität Arndtstr. 2, 35392 Gießen, Germny 23. Theorietg Automten und Formle

More information

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1 Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite

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

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

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

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

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

The Value 1 Problem for Probabilistic Automata

The Value 1 Problem for Probabilistic Automata The Vlue 1 Prolem for Proilistic Automt Bruxelles Nthnël Fijlkow LIAFA, Université Denis Diderot - Pris 7, Frnce Institute of Informtics, Wrsw University, Polnd nth@lif.univ-pris-diderot.fr June 20th,

More information

Automata and semigroups recognizing infinite words

Automata and semigroups recognizing infinite words Automt nd semigroups recognizing infinite words Olivier Crton 1 Dominique Perrin 2 Jen-Éric Pin1 1 LIAFA, CNRS nd Université Denis Diderot Pris 7, Cse 7014, 75205 Pris Cedex 13, Frnce 2 Institut Gsprd

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

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

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy: Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes

More information

Results on Planar Near Rings

Results on Planar Near Rings Interntionl Mthemticl Forum, Vol. 9, 2014, no. 23, 1139-1147 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/10.12988/imf.2014.4593 Results on Plnr Ner Rings Edurd Domi Deprtment of Mthemtics, University

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

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

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

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

More information

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

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

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

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

Chapter 3. Vector Spaces

Chapter 3. Vector Spaces 3.4 Liner Trnsformtions 1 Chpter 3. Vector Spces 3.4 Liner Trnsformtions Note. We hve lredy studied liner trnsformtions from R n into R m. Now we look t liner trnsformtions from one generl vector spce

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's Journl of utomt, Lnguges n Combintorics u (v) w, x{y c OttovonGuerickeUniversitt Mgeburg Tight lower boun for the stte complexity of shue of regulr lnguges Cezr C^mpenu, Ki Slom Computing n Informtion

More information

FORMAL LANGAUGES & AUTOMATA

FORMAL LANGAUGES & AUTOMATA FORMAL LANGAUGES & AUTOMATA VICKY G We re going to study the reltionship between specil kind of mchine (utomt), lnguges nd specil kind of lgebr (monoids). Automt Regulr Lnguges Monoids 1. Monoids nd Lnguges

More information

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008 Mth 520 Finl Exm Topic Outline Sections 1 3 (Xio/Dums/Liw) Spring 2008 The finl exm will be held on Tuesdy, My 13, 2-5pm in 117 McMilln Wht will be covered The finl exm will cover the mteril from ll of

More information

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language. Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

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

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

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

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

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

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

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

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

More information

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

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

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

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

More information

Random subgroups of a free group

Random subgroups of a free group Rndom sugroups of free group Frédérique Bssino LIPN - Lortoire d Informtique de Pris Nord, Université Pris 13 - CNRS Joint work with Armndo Mrtino, Cyril Nicud, Enric Ventur et Pscl Weil LIX My, 2015 Introduction

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

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