Coalgebra, Lecture 15: Equations for Deterministic Automata

Size: px
Start display at page:

Transcription

1 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 nd show the generl ide nd concepts for this purpose. 1 Deterministic utomt We fix (not necessrily finite) set A clled n lphet. A deterministic utomton on A is pir (X, α) where X is set of sttes nd α X A X is function clled its trnsition function. In other words, deterministic utomton on A is n F lger for the functor F Set Set given y F X = A X. By considering deterministic utomt s F lgers we get the notion of homomorphism of utomt, which is the one of eing n F lger morphism. Tht is, n F lger morphism h (X, α) (Y, β) is function h X Y such tht the following digrm commutes: A X α X id A h h A Y Y β which mens tht h(α(, x)) = β(, h(x)) for every A nd x X. In the cse tht A nd X re finite sets, we cn drw the digrm of the utomton (X, α) which is the digrm with nodes in X nd rrows from node x 1 to node x 2 with lel s in x 2 for every A nd x 1, x 2 X such tht α(, x 1 ) = x 2. x 1 Exmple 1. If A = {, } nd X = {x 1, x 2, x 3 }, then the following digrm, x 1 x 2 x 3 represents the utomton (X, α) such tht α(, x 1 ) = α(, x 1 ) = x 2, α(, x 2 ) = x 2, α(, x 2 ) = x 3, α(, x 3 ) = x 3 nd α(, x 3 ) = x 2. 1

2 2 Exercise 1. Let A = {, }, X = {x 1, x 2, x 3 } nd Y = {y 1, y 2, y 3 }. Consider the utomt (X, α) nd (Y, β) whose digrms re given y:, x 1 x 2 x 3 y 1 y 2 y 3 i) Is there ny homomorphism of utomt h (X, α) (Y, β) such tht h(x 1 ) = y 1? Find such n h or, if it is not possile, explin why. ii) How mny homomorphisms of utomt h (X, α) (Y, β) re there? Justify your nswer. iii) How mny homomorphisms of utomt h (Y, β) (X, α) re there? Justify your nswer. We denote y A the set of ll words with symols in A. Tht is, every element w A is of the form w = 1 n, n N, where ech i A, 1 i n. In the prticulr cse tht n = 0, we otin the empty word which we denote y ɛ. Nottion. Given deterministic utomton (X, α) on A, w A nd x X, we define the stte w(x) X y induction s follows: x if w = ɛ, w(x) = α(, u(x)) if w = u, u A, A thus w(x) is the stte we rech from x y processing the word w from right to left. Exmple 2 (Exmple 1 continued). If we consider the utomton (X, α) given in Exmple 1, then we hve the following: (x 1 ) = x 2, (x 1 ) = x 3, 8 (x 3 ) = x 2, ɛ(x 2 ) = x 2, (x 1 ) = x 3. An esy wy to rememer how to do the previous clcultions is y introducing prenthesis for ech symol in A. For exmple: (x 1 ) = ((x 1 )) = (x 2 ) = ((x 2 )) = (x 2 ) = x 2. Remrk. Using the previous nottion, homomorphism of utomt h (X, α) (Y, β) is function h X Y such tht for every A nd x X we hve h((x)) = (h(x)). Exercise 2. Let A = {, } nd X = {x 1, x 2 }. Find the numer of functions α A X X such tht the utomton (X, α) stisfies the following two conditions: i) (x 1 ) = x 1. ii) For ll x X we hve tht (x) = (x). (Condition ii) sys tht the eqution = is stisfied y the utomton (X, α))

3 3 2 Equtions for deterministic utomt Now we turn our ttention to the study of equtions for deterministic utomt (cf. Exercise 2 ii)) which, informlly, re pirs of words (u, v) A A such tht the utomton cnnot distinguish etween processing the word u nd processing the word v from ny given stte. This is defined s follows. Definition 3. Let A e n lphet, n eqution on A is pir (u, v) A A. We sy tht the utomton (X, α) on A stisfies the eqution (u, v), denoted s (X, α) (u, v) if for every x X we hve u(x) = v(x). We denote y Eq(X, α) the set of equtions tht (X, α) stisfies, tht is Eq(X, α) = {(u, v) A A (X, α) (u, v)}. As (X, α) (u, v) if nd only if (X, α) (v, u), we cn denote the eqution (u, v) s u = v nd then we hve: (X, α) u = v x X u(x) = v(x). Exmple 4. Let A = {, }, X = {x, y} nd consider the utomton (X, α) on A given y the following digrm: x y Then (X, α) stisfies equtions such s =, = nd =, ut it does t stisfies the eqution = nor the eqution ɛ =, since (x) = y x = (x) nd ɛ(y) = y x = (y). Now, how cn we find ll the equtions tht (X, α) stisfies? This is in generl nontrivil tsk since there could e infinitely mny of them. For exmple, since (X, α) stisfies = then it lso stisfies ny eqution of the form = 2n+1 for n 1, ll of them re otined from = y replcing y, since =, s follows: = = = = 7 = 9 = 11 = In this sense, ech eqution = 2n+1, n 1, is generted (i.e., cn e deduced y using sustitution) y the single eqution =. In the cses tht A nd X re finite sets we cn find finite set of equtions tht genertes ll the equtions stisfied y (X, α). We will illustrte how to otin genertor set of equtions for the utomton given ove nd then formlize the concepts in Section 4. By Definition 3 ove we hve tht (X, α) u = v iff x X u(x) = v(x), so we re going to consider ll the sttes of (X, α) t the sme time nd mke trnsitions for ll the symols in A to see when the stte we rech with two different words is the sme. Tht is, we put ll the sttes of (X, α) in the tuple (x, y) nd strt to mke trnsitions, ccording to (X, α), for ech symol in A. For exmple, if we mke n trnsition nd trnsition from the tuple (x, y) we get the tuples (y, y) nd (x, x), respectively, which is illustrted in the following picture:

4 4 (x, y) (y, y) (x, x) Until now, there re no different words, strting from (x, y), tht will tke us to the sme tuple, hence we hve not found ny equtions yet. But, s we hve new tuples, nmely (y, y) nd (x, x), we need to do the trnsitions from those sttes for every symol in A. We cn strt with (y, y) y mking ll the trnsitions for every symol in A to otin the following: (x, y) (y, y) (x, x) In ech of those trnsitions we found two different words tht will tke us to the sme tuple. In fct, i) The words nd tke us from (x, y) to the sme tuple (y, y), which mens tht the eqution = is stisfied y (X, α). ii) The words nd tke us from (x, y) to the sme tuple (x, x), which mens tht the eqution = is stisfied y (X, α). Note tht in i) nd ii) we lwys strt from the tuple (x, y) which is the tuple tht represents ll the sttes of the utomton. Also, the equtions otined in i) nd ii) ove re given y the two shortest pths tht tke us to the sme tuple, which in some sense is the minimum informtion we wnt to cpture in n eqution. For exmple, the words nd will tke us to the sme tuple, i.e., the utomton stisfies the eqution =, ut = cn e deduced from = nd =. Therefore, the equtions in i) nd ii) ove re enough to deduce every eqution tht comes from the previous digrm. Now, we still hve to do the trnsitions from the tuple (x, x) to find new equtions nd/or new tuples. By mking ll the trnsitions from the tuple (x, x) we otin the following: (x, y) (y, y) (x, x) Agin, in ech of those trnsitions we found two different words tht will tke us to the sme tuple. In fct, iii) The words nd tke us from (x, y) to the sme tuple (y, y), which mens tht the eqution = is stisfied (X, α).

5 5 iv) The words nd tke us from (x, y) to the sme tuple (y, y), which mens tht the eqution = is stisfied (X, α). Finlly, s every tuple in the previous digrm hs ll the trnsitions for ech symol in A, we hve finished the process for finding generting set for the equtions tht the utomton (X, α) stisfies. Hence, generting set for Eq(X, α) is given y the equtions: =, =, =, = Tht is, every eqution in Eq(X, α) cn e deduced from the four equtions ove. Exercise 3. Find generting set for the equtions of the utomt (X, α) nd (Y, β) given in Exercise 1. 3 Monoids In this section, we study some sic concepts nd fcts out monoids tht will e used in the next section. We strt y defining the lgeric structure of monoid. Definition 5. A monoid is tuple M = (M,, e) such tht M is set, is inry opertion on M, clled multipliction, nd e is element in M, clled the identity element, nd they stisfy the following xioms: i) Associtivity: For every x, y, z M we hve tht (x y) z = x (y z). ii) e is the identity: for every x M we hve tht x e = e x = x. Exmple 6. The following re some exmples of monoids: i) The monoid (N, +, 0) of nturl numers with ddition nd identity element 0. ii) The monoid (N,, 1) of nturl numers with multipliction nd identity element 1. iii) The monoid (R,, 1) of rel numers with multipliction nd identity element 1. iv) The monoid (M 2 2 (R),, I 2 ) of 2 2 mtrices on the rel numers with mtrix multipliction nd identity element I 2 given y: I 2 = [ ] v) For ny given set A the monoid A = (A,, ɛ) of words on A with multipliction given y conctention nd identity element the empty word ɛ. This monoid plys n importnt role in (universl) lger nd lnguge theory nd it is clled the free monoid on A. vi) For ny given set X the monoid X X = (X X,, id X ) of functions from X to X with composition of functions nd identity element given y the identity function id X on X.

6 6 Definition 7. Let M = (M,, e) nd N = (N,, e ) e monoids. A monoid homomorphism h M N from M to N is function h M N tht preserves the monoid opertions, tht is: i) For ll m 1, m 2 M we hve tht h(m 1 m 2 ) = h(m 1 ) h(m 2 ), nd ii) h(e) = e. Exmple 8. Consider the function h N N defined y h(n) = 2 n. Then h is monoid homomorphism from the monoid (N, +, 0) of nturl numers with ddition to the monoid (N,, 1) of nturl numers with multipliction. In fct, for every n, m N we hve h(n + m) = 2 n+m = 2 n 2 m = h(n) h(m) nd h(0) = 2 0 = 1. Exercise 4. Define the determinnt function det M 2 2 (R) R s: det ([ c ]) = d c d i) Show tht det is monoid homomorphism from the monoid (M 2 2 (R),, I 2 ) of 2 2 mtrices on the rel numers with mtrix multipliction to the monoid (R,, 1) of rel numers with multipliction. ii) Is det monoid homomorphism from the monoid (M 2 2 (R), +, ) of 2 2 mtrices on the rel numers with mtrix ddition to the monoid (R, +, 0) of rel numers with ddition? Justify your nswer. For ny given set A we defined the free monoid (A,, ɛ) where A is the set of words with symols on A nd is given y the conctention of words. As every symol in A is n element in A, nmely the word w with only one symol given y w =, we hve function η A A A defined s η A () =. The monoid (A,, ɛ) is clled the free monoid on A since it stisfies the following (universl) property: (UP) For ny monoid (M,, e) nd ny function f A M there exists unique monoid homomorphism f from (A,, ɛ) to (M,, ɛ) such tht the following digrm commutes: η A A A f f M The monoid homomorphism f is cnoniclly defined for ny w = 1 n, n 1, i A s: f (w) = f ( 1 n ) = f( 1 ) f( n ) nd, clerly, f (ɛ) = e. The homomorphism f is clled the extension of f, since they oth gree on A, i.e., f () = f() for every A. The previous universl property sys tht in order to get monoid homomorphism from (A,, ɛ) to (M,, e) it is enough to define function f A M.

7 7 Exmple 9. Let A = {,, c} nd consider the monoid (Z 7, +, 0) of integers modulo 7 with ddition. Let f A Z 7 e the function such tht: f() = 2, f() = 5, f(c) = 3 Then, y the universl property (UP) ove, we cn find the vlue of the monoid homomorphism f for ny element w A. For exmple, we hve the following: f ( 2 c 3 ) = f() + f() + f(c) + f(c) + f(c) = 2f() + 3f(c) = = 6 f ( 4 2 cc 4 ) = 4f() + 2f() + f(c) + f() + 4f(c) = = 3. Definition 10. Let h M N e homomorphism of monoids etween the monoid (M,, e) nd the monoid (N,, e ). Define the kernel ker(h) of h nd the imge Im(h) of h s follows: ker(h) = {(m 1, m 2 ) M M h(m 1 ) = h(m 2 )} Im(h) = {n N m M h(m) = n} The imge of homomorphism hs cnonicl monoid structure s follows. Proposition 11. Let h M N e homomorphism of monoids etween the monoid (M,, e) nd the monoid (N,, e ). Then, Im(h) = (Im(h),, e ) is monoid nd it is sumonoid of (N,, e ). Proof. Clerly e Im(h) since h(e) = e. Associtivity follows from the fct tht h is homomorphism of monoids. Definition 12. Let M = (M,, e) e monoid. A congruence of M is n equivlence reltion θ on M such tht for every (m, n), (x, y) θ we hve tht (m x, n y) θ. Given set of pirs {(m i, n i )} i I in M M, we denote y {(m i, n i )} i I the lest congruence of M tht contins ech (m i, n i ), i I. {(m i, n i )} i I is clled the congruence generted y {(m i, n i )} i I. In cse tht I is finite nd {(m i, n i )} i I = {(m 1, n 1 ),..., (m k, n k )} we denote {(m i, n i )} i I s (m 1, n 1 ),..., (m k, n k ). Proposition 13. Let M = (M,, e) e monoid nd let θ e congruence of M. Let M/θ the set of ll equivlence clsses nd denote y [m] θ the equivlence clss of m M with respect to θ. Define the opertion on M/θ s [m] θ [n] θ = [m n] θ. Then M/θ = (M/θ,, [e] θ ) is monoid. Proof. Note tht is well defined since θ is congruence. Associtivity of nd the fct tht [e] θ is the identity of M/θ follow from the definition of nd the fct tht M is monoid. Exercise 5. i) Prove tht the kernel of monoid homomorphism is congruence. ii) Prove tht n equivlence reltion θ on A is congruence of the monoid (A,, ɛ) if nd only if is stisfies the following property: - For every A, (w, v) θ implies (w, v), (w, v) θ.

8 8 iii) Let (X, α) e n utomton on A. Show tht Eq(X, α) is congruence of the monoid (A,, ɛ). iv) Let M = (M,, e) nd N = (N,, e ) e monoids. We sy tht M nd N re isomorphic if there exist ijective monoid homomorphisms ϕ M N. Show tht: ) The inverse ϕ 1 of ijective monoid homomorphism ϕ is monoid homomorphism. ) For ny homomorphism h M N from M to N the monoids M/ker(h) nd Im(h) re isomorphic. v) Let θ e congruence on (A,, ɛ). Construct n utomton (X, α) on A such tht Eq(X, α) = θ. 4...putting everything together We finish y showing the connections etween the concepts we previously defined, this will give us cler ide on how we cn use lgeric nd ctegoricl techniques to study equtions for deterministic utomt. Given n utomton (X, α) on A, which is completely determined y its trnsition function α, we define the function α A X X s α()(x) = α(, x), A nd x X. We hve tht oth kind of functions re in one to one correspondence y the identity α()(x) = α(, x), i.e., we cn recover ny of them if we know the other one nd this correspondence is ijective. This is summrized s: α A X X α A X X α()(x) = α(, x) Now, given such n α A X X, y the universl property (UP) given in the previous section, there exists unique monoid homomorphism α from the monoid (A,, ɛ) to the monoid (X X,, id X ) such tht α η A = α. Lemm 14. Let (X, α) e deterministic utomton on A. Then for every x X nd w A we hve tht α (w)(x) = w(x). Proof. We proof this y induction on the length of w. In fct, i) If w = ɛ, then α (ɛ) = id X, which implies tht α (ɛ)(x) = id X (x) = x = ɛ(x). ii) If w = u with A nd u A, then we hve: α (u)(x) = ( α () α (u)) (x) = α () ( α (u)(x)) = α()(u(x)) = α(, u(x)) = u(x).

9 9 where the first equlity follows from the fct tht α is monoid homomorphism, the second one from definition of composition, the third one from the induction hypothesis nd the fct tht A, the fourth one from the definition of α, nd the lst one is the nottion we defined. Corollry 15. Let (X, α) e deterministic utomton on A. Then Eq(X, α) = ker( α ). Definition 16. Let (X, α) e deterministic utomton on A. The trnsition monoid trns(x, α) of (X, α) is the monoid defined s: trns(x, α) = Im( α ). By Exercise 5 nd the previous corollry, we hve tht trns(x, α) is isomorphic to (A,, ɛ)/eq(x, α). Exmple 17 (Exmple 4 continued). For A = {, } nd X = {x, y} we considered the utomton (X, α) on A given y the digrm: x In order to get generting set for the equtions of (X, α) we constructed the digrm y (x, y) (y, y) (x, x) From this digrm we cn otin ll the functions α (w) for ny w A, which is the function tht mps ech element in the tuple (x, y), which is the tuple contining ll the different elements in X, to its corresponding element in the tuple we rech from (x, y) y processing the word w from right to left. For exmple, if we consider the word then we rech the tuple (y, y) from the tuple (x, y), this mens tht the function α () mps ech element in (x, y) to its corresponding element in (y, y), i.e., α ()(x) = α ()(y) = y. According to this, since trns(x, α) = Im( α ) nd it is isomorphic to (A,, ɛ)/eq(x, α), we otin the equtions Eq(X, α) of (X, α) y looking t the pirs of words (u, v) such tht from the tuple (x, y) we get the sme tuple y processing the word u nd y processing the word v from right to left. This is wht we did in Exmple 4 ut we restricted our ttention to the equtions tht generted the congruence Eq(X, α). In this cse, we hve tht Eq(X, α) = (, ), (, ), (, ), (, ). Exercise 6. Let A e n lphet nd let E e set of equtions on A. Given n utomton (X, α) on A, we sy tht (X, α) stisfies E, denoted s (X, α) E, if (X, α) (u, v) for every (u, v) E. Let θ e congruence of (A,, ɛ) nd define the function τ θ A A /θ s τ θ (w) = [w] θ, then we hve tht τ θ is monoid homomorphism from (A,, ɛ) to (A /θ,, [ɛ] θ ) (why?). Show tht (X, α) θ if nd only if there exists monoid homomorphism g from (A /θ,, [ɛ] θ ) to (X X,, id X ) such tht α = g τ θ.

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

set is not closed under matrix [ multiplication, ] and does not form a group.

Prolem 2.3: Which of the following collections of 2 2 mtrices with rel entries form groups under [ mtrix ] multipliction? i) Those of the form for which c d 2 Answer: The set of such mtrices is not closed

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

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

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

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

378 Reltions 16.7 Solutions for Chpter 16 Section 16.1 Exercises 1. Let A = {0,1,2,3,4,5}. Write out the reltion R tht expresses > on A. Then illustrte it with digrm. 2 1 R = { (5,4),(5,3),(5,2),(5,1),(5,0),(4,3),(4,2),(4,1),

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

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

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

Parse trees, ambiguity, and Chomsky normal form

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

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

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

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

CM10196 Topic 4: Functions and Relations

CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

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

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

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

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

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA RIGHT LINEAR LANGUAGES. Right Liner Grmmr: Rules of the form: A α B, A α A,B V N, α V T + Left Liner Grmmr: Rules of the form: A Bα, A α A,B V N, α V T

Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte

Lecture 3: Equivalence Relations

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

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

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

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

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

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

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

Vectors 1-23-2018 I ll look t vectors from n lgeric point of view nd geometric point of view. Algericlly, vector is n ordered list of (usully) rel numers. Here re some 2-dimensionl vectors: (2, 3), ( )

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

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

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

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

Chapter 14. Matrix Representations of Linear Transformations

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

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

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.

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

ad = cb (1) cf = ed (2) adf = cbf (3) cf b = edb (4)

10 Most proofs re left s reding exercises. Definition 10.1. Z = Z {0}. Definition 10.2. Let be the binry reltion defined on Z Z by, b c, d iff d = cb. Theorem 10.3. is n equivlence reltion on Z Z. Proof.

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,

Bases for Vector Spaces

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

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

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

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

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

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

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

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35 9. Modules over PID This week we re proving the fundmentl theorem for finitely generted modules over PID, nmely tht they re ll direct sums of cyclic modules.

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one

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

First Midterm Examination

24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

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

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

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:

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

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

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

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

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

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.

Introduction to Group Theory

Introduction to Group Theory Let G be n rbitrry set of elements, typiclly denoted s, b, c,, tht is, let G = {, b, c, }. A binry opertion in G is rule tht ssocites with ech ordered pir (,b) of elements

Handout: Natural deduction for first order logic

MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

M A T H F A L L CORRECTION. Algebra I 2 1 / 0 9 / U N I V E R S I T Y O F T O R O N T O

M A T H 2 4 0 F A L L 2 0 1 4 HOMEWORK ASSIGNMENT #1 CORRECTION Alger I 2 1 / 0 9 / 2 0 1 4 U N I V E R S I T Y O F T O R O N T O 1. Suppose nd re nonzero elements of field F. Using only the field xioms,

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

Mtrix lger Mtrix ddition, Sclr Multipliction nd rnsposition Mtrix lger Section.. Mtrix ddition, Sclr Multipliction nd rnsposition rectngulr rry of numers is clled mtrix ( the plurl is mtrices ) nd the

Exercises with (Some) Solutions

Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points

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

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

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

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

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)

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

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

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

Notes on length and conformal metrics

Notes on length nd conforml metrics We recll how to mesure the Eucliden distnce of n rc in the plne. Let α : [, b] R 2 be smooth (C ) rc. Tht is α(t) (x(t), y(t)) where x(t) nd y(t) re smooth rel vlued

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

The Regulated and Riemann Integrals

Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

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

The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

Tutorial Automata and formal Languages

Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

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)

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

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

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

ɛ-closure, Kleene s Theorem,

DEGefW5wiGH2XgYMEzUKjEmtCDUsRQ4d 1 A nice pper relevnt to this course is titled The Glory of the Pst 2 NICTA Resercher, Adjunct t the Austrlin Ntionl University nd Griffith University ɛ-closure, Kleene

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

2.4 Linear Inequalities and Interval Notation

.4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

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

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

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

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

Model Reduction of Finite State Machines by Contraction

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

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

Lecture 3 (5.3.2018) (trnslted nd slightly dpted from lecture notes by Mrtin Klzr) Riemnn integrl Now we define precisely the concept of the re, in prticulr, the re of figure U(, b, f) under the grph of

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

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

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

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

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

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

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

Linear Inequalities. Work Sheet 1

Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges \$ 15 per week plus \$ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend

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