FORMAL LANGUAGES, AUTOMATA AND THEORY OF COMPUTATION EXERCISES ON REGULAR LANGUAGES

Size: px
Start display at page:

Download "FORMAL LANGUAGES, AUTOMATA AND THEORY OF COMPUTATION EXERCISES ON REGULAR LANGUAGES"

Transcription

1 FORMAL LANGUAGES, AUTOMATA AND THEORY OF COMPUTATION EXERCISES ON REGULAR LANGUAGES

2 Introduction This compendium contins exercises out regulr lnguges for the course Forml Lnguges, Automt nd Theory of Computtion t the School of Innovtion, Design nd Technology, Mälrdlen University. The nottion used throughout this compendium is tken from the Swedish course ook, nd is descried on the next pge. All exercises hs solution in the end of the compendium, including those mrked with ; Those mrked with ; re test ssignments. The compendium is outlined s follows. There re five sections; Mthemticl preliminries, Regulr expressions, Finite Automt, Regulr grmmr nd non-regulrity. Ech section strts with some simple exercises intended to lern new concepts. The difficulty of the exercises then increses, nd in the end there re test ssignments. Study Technique Discuss your solutions in the group! The other students re your iggest support in this course, use tht resource! Try to solve the esy exercises in the eginning of ech section! Don t look t the solution until you hve tried to solve n exercise. If you cnnot solve it, look t the solution nd try to grsp the sic ide of the solution nd try to solve it gin. You won t lern nything from just copying solution! To ensure tht property holds for certin utomtion, grmmr, expression etc. it might help to elorte with different strings. Try to construct strings which re violting wht you re trying to prove! Good luck with the course! Lennrt Slling, Formell språk, utomter och eräkningr,

3 Tle of Content Nottion 4 Mthemticl Preliminries 5 SOLUTIONS Regulr expressions Test Assignment. (Lesson ).... SOLUTIONS Finite Automt 6 Test Assignment. (Lesson, 9 pril)... Test Assignment. (Lesson, 9 pril)... Test Assignment 4. (Lesson, 5 pril) SOLUTIONS Regulr Grmmr 9 SOLUTIONS Non-Regulrity 4 Test Assignment 5. (Lesson, 5 pril) SOLUTIONS

4 Nottion Nottion Mening Exmple Other nottion The chrcter,,c,, c foo The string "foo" r, thing r, foo w, x, y, z Aritrry string w Σ ε The empty string λ k Numericl constnt k,,, 4 n, m Numericl vrile n =m L, S, A, B Lnguge, set L =Σ The empty set {} Σ An lphet Σ={, } {w foo} The set of ll w such tht foo holds {w w rev = w} k k repetitions of the chrcter 4 = k, 4 w k k repetitions of the string w w = www A k The set of ll strings with k ritrry elements {, } = {,,, } from the set A A Kleene str opertion on A {, } = {ε,,,,...}, = {ε,,,...}, (foo) = {ε, foo, foofoo,...} A + Plus opertor on the set A {, } + = {,,,,,...} w rev Reverse of the string w (foor) rev = roof w R L The complement lnguge to L (L),L C A The powerset of A {,} = {, {}, {}, {, } } A Numer of elements in A (sometimes {,, } =, utomtion =7 denoted crdinlity) w The numer of s in the string w rcdr =5 n (w), # (w) prefix (w) The set of strings x such tht w = xz prefix (c) ={ε,,, c} pprefix (w) The set of proper prefixes to w prefix (c) ={, } prefix (L) The set of strings w such tht w is prefix prefix (Σ )=Σ in some string in L suffix (w) The set of strings x such tht w = zx suffix (c) ={ε, c, c, c} psuffix(w) The set of proper suffixes to w psuffix (c) ={c, c} suffix(l) The set of strings w such tht w is suffix suffix (Σ )=Σ in some string in L A B The union of A nd B {,, } {,, 4} = {,,, 4} A + B A B The intersection of A nd B {,, } {,, 4} = {, } xy The conctention of the strings x nd x = foo,y = r,xy = foor y A B The set of ll elements which re in A {,, } {,, 4} = {} A \ B ut not in B A B The set of ll comintions of n element {, } {c, d} = {c, d, c, d} in A conctented with n element in B. # The end of string/stck N The set of nturl numers N = {,,,...} Z The set of integers Z = {...,,,,,,...} R The set of rel numers 47, R Ergo, hence, therefore End of proof 4

5 Mthemticl Preliminries Exercise.. Construct the powerset for the following sets. (i) {, } (o) (ii) {, } {, } (iii) {z} (iv) {,,,, 4} {,, 5,} (v) {,,, } {,, 5,} (vi) (the empty set) Exercise.. Determine the crdinlity of the following lnguges over the lphet Σ={, } (Tht is, re they finite, infinite nd countle, or infinite nd uncountle). Prove your nswers. (i) Σ (ii) Σ 4 (iii) Σ =Σ Σ Σ Σ (iv) Σ (v) Σ, tht is the powerset of ll lnguges over Σ. (Hint: use digonlistion rgument!) Exercise.. Find possile lphet Σ for the following lnguges. A word foor should e interpreted s string of chrcters f, o, o,, nd r. (i) The lnguge L = {oh, ouch, ugh} (ii) The lnguge L = {pple, per, 47} (iii) The lnguge of ll inry strings (o) (o) Exercise.4. Descrie wht the Kleene str opertion over the following lphets produces. (i) Σ={, } (o4) (ii) Σ={} (iii) Σ= (the empty lphet) Exercise.5. Descrie wht the + -opertion over the following lphets produces. (i) Σ={, } (o5) (ii) Σ={} (iii) Σ= (the empty lphet) 5

6 Exercise.6. Stte the lphet Σ for the following lnguges : (o6) (i) L =Σ = {ε,,,,,,,,,,,...} (ii) L =Σ + = {,,,...} (iii) L =Σ + = {ε} Exercise.7. Assuming tht Σ={, }, construct complement lnguges for the following. (o7) (i) {,, } (ii) Σ {} (iii) Σ + ε Exercise.8. Stte the following lnguges explicitly. (o8) (i) {,} {,c} (ii) {, } {,, } (iii) {x x N y N : y< (y +=x)} (N is the set of ll non-negtive integers) Exercise.9. Let Σ e n lphet, nd let ε e the empty string over Σ. (o9) (i) is ε in Σ? (ii) does it hold tht εεε = ε? does it hold for ε i where i? (iii) Let x nd y e two strings over Σ. Is the conctention of x nd y lwys the sme s the conctention of y nd x? Exercise.. A string is infinite when its length is infinite. Let Σ e n ritrry lphet. (o) (i) Does Σ contin ny infinite string? (ii) If Σ would e n infinite lphet (which it ctully my not e), would the nswer still e the sme? Exercise.. Prove tht 6 n (mod9)for ll integers n. (o74) Exercise.. (o75) Prove y induction tht S = S (tht is, tht the size of the powerset is equl to to the power of the size of the originl set) for ll finite sets S. 6

7 Exercise.. (o76) Let x e string nd let x rev e the sme string ut ckwrds. Prove tht (xy) rev = y rev x rev for ritrry strings x, y over n lphet Σ. (Hint: try to define x rev inductively) Exercise.4. Prove y induction tht A B = A B for ll sets A nd B. Exercise.5. Prove tht n = n+ for ll integers n. (o) (o) 7

8 Solutions Solution.. (i) S = {, {}, {}, {, } } (ii) S = {,, }, S = {, {}, {}, {}, {, }, {, }, {, }, {,, } } (iii) S = {, {z} } (iv) S = {, }, S = {, {}, {}, {, } } (v) S = {, }, S = {, {}, {}, {, } } (o) (vi) S = { } Solution.. (i) Σ = {ε} The set is finite. (o) (ii) Σ 4 = {,,,,,,,,,,,,,,, } The set is finite. (iii) Ech set in the infinite nd countle series is finite nd my therefore e counted y mpping it to the nturl numers. Therey, the full set cn e counted. The set is infinite nd countle. (iv) Σ = {{ε}, {}, {}, {, }} The set is finite. (v) The set is infinite nd uncountle. Solution.. (i) Σ={o, h, u, c, g} (o) (ii) Σ={, p, l, e, r,, 4, 7, } (iii) Σ={, } Solution.4. (i) All inry strings. (o4) (ii) All strings which contins nothing ut s (including the empty string). (iii) The lnguge which contins only the empty string. Solution.5. (i) Binry strings contining t lest one chrcter. (o5) (ii) Strings contining only s, with t lest one chrcter. (iii) The lnguge which contins only the empty string. 8

9 Solution.6. (i) Σ={, } (o6) (ii) Σ={} (iii) Σ= Solution.7. (i) L = {ε,,,,,,,,,,,,,...} (o7) (ii) L = {} (iii) L = {ε} Solution.8. (i) { {}, {, } } (o8) (ii) (iii) {,, 4, 5, 6, 7, 8, 9,, } Solution.9. (i) No. (o9) (ii) Yes. Yes. (iii) No, consider for instnce Σ ={, },x=,y =,xy =,yx=. Solution.. (i) No, even though the lnguge is infinite, ll strings hve finite length. (o) (ii) No, ech symol in the lphet still hs finite length, nd ech string hs finite length. Solution.. Clim: 6 n (mod9)for ll integers n. (o74) Verifiction: 6 =6=9 4 }{{} heltl, 6 = 6 = 9 4, 6 4 = 96 = 9 44 Bse step: We choose 6, tht is n =s se cse, since this is the lest n for which the clim must hold. Since 6 =6=9 4, the clim holds for the se cse. Induction step: We ssume tht the clim is true for certin cse nd try to show tht it is true for the following cse s well. Thus, ssume tht 9 divides 6 p, tht is 6 p =9k for some integer k. We wnt to show tht this implies tht 6 p+ =9l for some integer l. }{{} heltl }{{} heltl 9

10 If 6 p =9k for some p nd some integer k, then the following holds. 6 p+ = 6 6 p = 6 9k = 9(6k) }{{} integer = 9l where l is n integer Summry: The clim holds for n =, nd if it holds for some cse p, then it lso holds for the cse p +. Thus, it holds for ll cses, which concludes the proof. Solution.. (o75) Clim: S = S for ll finite sets S. Verifiction: = = = {x} = = = {x} {x, y} =4 = = {x,y} Bse step: We choose S = s se step, since this is the lest set for which the clim should hold. According to the verifiction ove, the clim should hold for the se step. Induction step: We ssume tht the clim is true for certin cse, nd try to prove it for the next cse. Thus, ssume tht S = S for some set S. We wnt to show tht this implies tht (S {x}) = S {x} for n ritrry element x S. If S = S for some set S, then the following holds. (S {x}) = S T where T = {t {x} t S } (S {x}) = S T = S + T since S nd T re disjoint (x S x S ) = S + {t {x} t S } = S + S = S = S (from the inductive hypothesis) = S + = S {x} since x S Summry: The clim holds for S =, nd if the clim holds for some set S then it lso holds for the set S {x} where x S. Thus, it holds in ll cses nd the proof is concluded. Solution.. (o76) ε rev = ε for the empty string ε. rev = for string with contining only single chrcter. A nonempty string x cn e prtitioned into two sustrings x = y where contins one or zero chrcters. We cn then define (y) rev = y rev where. Now we will show tht (xy) rev = y rev x rev. First ssume tht x is the empty string. If so, the clim is true, since (εy) rev = y rev = y rev ε. Now ssume tht x is string contining only one chrcter. If so, the clim is true s well, since (y) rev = y rev y definition. These re our se steps.

11 Now we ssume tht the clim (uv) rev = v rev u rev holds for two strings u, v. This is our inductive hypothesis. Now we wnt to show tht (uv) rev = v rev u rev. (uv) rev =(uv) rev y definition. Furthermore, (uv) rev = v rev u rev y inductive hypothesis, which yields (uv) rev = v rev u rev, which is wht we wnted to show. Since we hve shown tht the clim holds for (two) se cses, nd tht it holds for ny string which my e constructed y conctenting chrcter to the eginning of the first string, the clim holds for ll strings. Solution.4. (o) A B = A B for the empty string A = nd n ritrry set B. The clim lso holds for A = nd n ritrry B. Now ssume tht the clim holds for two sets A nd B (the induction hypothesis). We wnt to show tht A {x} B = A {x} B for n ritrry element x/ A (if x A the clim holds trivilly, since x A A {x} = A). We strt with the left hnd side. The cross product implies tht A {x} B = A B {x} B. Since A B nd {x} B re disjoint (since x/ A), it holds tht A B {x} B = A B + {x} B = A B + B. For the right hnd side it holds tht A {x} = A +. Thus, we hve A {x} B = ( A +) B = A B + B = A B + B. But then it lso holds tht A {x} B = A {x} B, which concludes the proof. Solution.5. Clim: n = n+ for ll integers n. (o) Verifiction: == = + == = + + =7= =7 Bse step: We choose n =s se cse, since this is the lest numer for which the clim should hold. According to the verifiction ove, the clim holds for the se step. Induction step: We ssume tht the clim holds for certin cse, nd try to prove tht it holds lso for the following cse. Thus, ssume tht k = k+ for some numer k. We wnt to show tht this implies tht k + k+ = k+. If k = k+ for some numer k, then the following holds k + k+ = ( k+ ) + k+ (from the inductive hypothesis) = k+ + k+ = k+ = k+ Summry: The clim holds for the se cse k =, nd if it holds for numer k then it lso holds for the following numer k +. Thus it holds for ll cses, which concludes the proof.

12 Regulr expressions Exercise.. (o) Construct regulr expressions representing lnguges, over the lphet {,, c}, in which for every string w it holds tht: (i) The numer of s in w is even. (ii) There re 4i + s in w. (i ) (iii) w =i.(i ) Exercise.. (o4) A regulr expression is miguous when there exists string which cn e constructed in two different wys from the regulr expression. Which of the following regulr expressions re miguous? (i) ( () cd ) (c ) (ii) () (iii) Exercise.. Consider the regulr expression ( (cd) ). (o4) (i) Find string over {,, c, d} 4 which mtches the expression. (ii) Find string over {,, c, d} 4 which does not mtch the expression. Exercise.4. Find regulr expression for the lnguge consisting of lternting zeroes nd ones. (o4) Exercise.5. (o4) Find regulr expression for the lnguge L over Σ={, } consisting of strings which contin exctly two or exctly three s. Exercise.6. (o4) Find regulr expression over the lnguge L over the lphet Σ={, } consisting of strings where the numer of s cn e evenly divided y. Exercise.7. Descrie which lnguges the following regulr expressions represents, using common english. (i) ( ) (ii) (iii) () (iv) ( ) (v) ( ) ( ) (o44)

13 (vi) (vii) ( ) ( ) (viii) ( ) Exercise.8. Let E e the following regulr expression: (o) c ( ε ( c) ( c) ) c (i) is L(E) ={,, c}? (ii) is L(EE) ={,, c}? TEST ASSIGNMENT. (LESSON ) (o45) Find regulr expression which represents the set of strings over {, } which contins the two sustrings nd.

14 Solutions Solution.. (i) ( c) ( (( c) ) ) (o) (ii) ( c) ( c) ( (( c) ) 4 ) (iii) (Σ ) Solution.. (o4) (i) Amiguous. For instnce, the string cn e constructed y using ( () cd ) or (c ). (ii) Amiguous. The string cn e constructed either y or. (iii) Unmiguous. Solution.. (o4) (i) mtches. (ii) cd doesn t mtch, since every c must e preceded y n in order for the string to mtch. Solution.4. (o4) Alterntive :. () is the lnguge of zero or more.. ( ε)() is the lnguge of lternting zeroes nd ones which ends in.. ( ε)() ( + ε) is the lnguge of lternting zeroes nd ones. Alterntive : ( ε)() ( + ε) ccording to the ove. Solution.5. (o4). is the set of strings with exctly one.. is the set of strings with exctly two s.. is the set of strings with exctly three s. 4. The lnguge L is then. Solution.6. (o4). re ll strings with exctly three s.. ( ) is then the lnguge L. 4

15 Solution.7. (i) An ritrry numer of inry chrcters ( or ) precedes the sustring. (o44) (ii) Strings tht must contin zero ut which otherwise consists only of ones. (iii) Strings consisting only of ones nd which lengths re even. (iv) An ritrry numer of repetitions of string consisting two s nd n ritrry numer of zeroes in ritrry positions. (v) Strings contining the sustring. (vi) Strings on the form......, tht is, strings tht egins with zero or more ones followed y zero or more zeroes. (vii) ( ) is ll strings which doesn t contin the sustring. ( ) is ll strings which doesn t contin the sustring. so the conctention of these is ll strings where ech occurrence of precedes ll occurrences of. (viii) Al strings which doesn t contin the sustring. Solution.8. (i) No. See for instnce the string which cnnot e produced y the regulr expression. (ii) Yes. (o) SOLUTION TEST ASSIGNMENT. (o45) ( ) ( ( ( ) ) ( ( ) )) ( ) 5

16 Finite Automt Exercise.. Let M e the following DFA. (o6) strt 4 (i) Write down four string ccepted y M nd the sequence of configurtions tht shows this. (ii) Write down four strings not ccepted y M. Exercise.. Let M e the following DFA. (o8) strt 5 4 (i) Write down four strings ccepted y M nd the sequence of configurtions tht shows this. (ii) Write down four strings not ccepted y M. Exercise.. Construct DFA which ccepts the following lnguge: (o5) L = {w w Σ w contins the sustring } Tht is, w = xy for two ritrry strings x nd y. Exercise.4. (o6) Construct finite utomt, deterministic of non-deterministic for the following regulr expressions. (i) ( ) (ii) ( ) (iii) 6

17 (iv) ( ) ( ) (v) ( ε) (vi) ( )( )( ) (vii) ( ) ( ) Exercise.5. Formlly define the utomt you constructed in Exercise.4. Exercise.6. Which lnguges re ccepted y the following utomt: (o7) (o7), (i) strt,, 4 strt, (ii), 4 (iii) strt 4 (iv) strt, (v) strt 7

18 (vi) strt Exercise.7. Find DFA s which ccepts the following lnguges: (o) (i) Strings over {, } ending in. (ii) String over {, } contining three consecutive s (tht is, contins the sustring ). (iii) Strings over {, } not contining the sustring. (iv) All strings over {, } where ech string of length 5 contins t lest two s. (v) The set of strings over {, } where ech pir of s immeditely succeeds pir of s. (vi) The strings ε, nd. (vii) Strings over {, } eginning with nd which, if interpreted s inry numer, is multiple of 5. As n exmple, the string should e ccepted since =, which is multiple of 5. On the other hnd, the string should not e ccepted, since =4 which is not multiple of 5. (viii) {w {, } w =n, w =m, m, n N} (ix) {w {, } w =n, n N} nd w doesn t contin the sustring. Exercise.8. (o5) Construct finite utomt which ccepts the lnguges defined y the following regulr expressions. (i) (ii) ( ( 4 ) ) (() (iii) ( ) ) Exercise.9. Construct DFA which is equivlent to the following regulr expression: ( ( )( ) ) (o9) Exercise.. Prove tht the following utomtion ccepts the lnguge L = { i j, i c j i, j }. (o9) 8

19 ,c c,,c strt,c 4 6 c c, 5 Exercise.. (o5) Convert the following finite utomt to GFA s nd find out which regulr expressions which descries the utomt s lnguges. (i) (ii), (iii) Exercise.. (o7) Construct regulr expressions which re equivlent to the following (deterministic) finite utomt: (i) strt 4 9

20 (ii) strt, 4, (iii), strt 4 (iv) strt Exercise.. Construct regulr expression representing the following utomtion. (o) strt Exercise.4. Convert ech of the NFA s elow to n equivlent DFA y suset construction. (o8) ε (i),

21 (ii) ε q, ε q q q Exercise.5. Convert the following NFA to DFA. (o65),, strt Exercise.6. Minimise the DFA elow y set prtitioning or doule complement. (o9) C, E A B φ D Exercise.7. Minimise the following DFA nd prove tht your new DFA relly is miniml. (o8) 7 8, 4 5 6

22 Exercise.8. (o64) Let L nd L e lnguges represented y the following utomt. Construct minimum DFA representing L L., strt L, 4 strt L TEST ASSIGNMENT. (LESSON ) Construct regulr expressions for the utomtion defined in exercise.. TEST ASSIGNMENT. (LESSON ) Convert the following NFA to n equivlent DFA y suset construction. (o8) (o),,ε,ε 4 TEST ASSIGNMENT 4. (LESSON ) Construct the minimum DFA which is equivlent with the following regulr expression: (o7) ( ( ) ) (c) Hint: The DFA hs 8 sttes.

23 Solutions Solution.. (i). :, #,, #. :, #, 4, #, 4, #,, #. :, #, 4, #,, #,, # 4. :, #, 4, #,, #,, #,, # (o6) (ii). ε.. 4. Solution.. (i). :, #,, #,, #. :, #, 5, #, 4, #. :, #,, #,, #, 5, #, 4, # 4. :, #, 5, #, 4, #,, #,, # (o8) (ii). ε.. 4. losningo5, 4 Note tht if the input string w exists in the lnguge L, we eventully will find the sustring in w. We define the sttes corresponding to how much of the sustring hs een oserved: Stte is the initil stte. In this stte no prt of the sustring hs een oserved. In stte, the first zero of hs een oserved. If zero turns up, we continue to serch for the next one in the sustring. In stte, the sustring of hs een oserved. If the next chrcter is one, we return to the initil stte since is not sustring of. In stte, the string hs een oserved. If we dd nother zero, we return to stte this ecuse the new zero my e the strt of new sustring. In stte 4 we hve oserved the full sustring. Thus, it doesn t mtter wht other chrcters there re in the string, since we lredy hve concluded tht the string exists in the lnguge. Consequently, stte 4 is n ccepting stte.

24 Solution.4. (o6), (i), (ii) (iii),, (iv) (v),ε, (vi),,,, (vii), 4 Solution.5. (i) M =({,, }, {, },δ,{}, {}), σ ε, (o7) 4

25 (ii) M =({,, }, {, },δ,{}, {}), (iii) M =({, }, {, },δ,, {, }), (iv) M =({, }, {, },δ,{}, {, }), (v) M =({, }, {, },δ,{}, {, }), (vi) M =({,, }, {, },δ,{}, {}), σ ε, σ σ ε, σ ε σ ε,,,, (vii) M =({,,, 4}, {, },δ,{}, {}), σ ε,, 4, 4 4, 4 Solution.6. (i) The strings with n even numer of chrcters nd length of t lest. (ii) The strings which contins t lest one, followed y n odd numer of chrcters. (iii) The strings tht ends in.note: or? (iv) The strings on the form n m,n,m. (v) The strings tht ends in. (vi) The strings tht doesn t strt with. Solution.7. (o7) (o) (i) (ii), 5

26 (iii), (iv) 5, ,, (v) 4, Note: stte should e n ccepting stte here. (vi) s, 7,

27 , (vii) s 4 (viii) 4 (ix) 5 6, Solution.8. (o5) (i) DFA:, 4 (ii) NFA: 7

28 (iii) NFA: 4 Solution.9. Construct n NFA given GFA. (o9). ( )( ) ( )( ). ( ) ( )

29 Convert the NFA to DFA (join the oviously equivlent sttes {5, } nd {4, 6}). 5 4 Solution.. (o9) We construct GFA from the finite utomtion.. Eliminte sttes nd 6, new trnsitions (, ), (, 4), (, 5), (, 4). +,c strt + c,c +,,c 4 + c c, 5. Eliminte stte 4. Since there re no pths from stte 4 (ded stte) we cn remove it entirely. + strt + c c 5. Crete new ccepting stte, numer 7, nd mke new epsilon-trnsitions from the previous ccepting sttes to 7. We do this to e le to eliminte stte nd 5. 9

30 + ε strt + c c ε Eliminer tillstånd och 5. strt c + 5. Join the two trnsitions from to c + strt 6 Thus, the utomtion ccepts the lnguge c +, which is the sme s { i j, i c j i, j }, which concludes the proof. Solution.. (i) (o5) (ii) ( ) (iii) ( ) ( ε) Solution.. Construct GFA s to crete regulr expressions, see Slling pge 48 nd forwrd. (i) ( + ( ) ) ( + (ε ) ) (ii) ( () ) ( () (ε ) ) (o7) (iii) ( ) (iv) ( + ) Solution.. We strt y constructing the corresponding GFA. (o). New finl stte, remove stte. ε strt. Remove stte. ( ) ( ) strt We now otin the regulr expression ( ( ) ) ( ).

31 Solution.4. We solve the ssignments y the method from Slling, pge 4. (o8), R (i) {,} {,,} {,} Step y step:. Initil stte: {, } {,},. {, } {,, } {, } {}(ded stte) {,} R {,,},. {,, } {,, } {,, } {, } {,} R {,,} {,}

32 , R 4. {, } {, } {, } {, } {,} {,,} {,} {q,q} (ii) {q,q} {q}, φ {q,q,q} {q,q,q}. Initil stte: {q,q}. {q,q} {q}. {q,q} {q,q,q} 4. {q} {} (ded) 5. {q} {q,q} 6. {q,q} {q,q,q} 7. {q,q} {q,q,q} 8. {q,q,q} {q,q,q} 9. {q,q,q} {q,q,q}. {q,q,q} {q,q,q}. {q,q,q} {q,q,q} Solution.5. We use the suset construction. (o65) {} {,} {,,} {,,,} {,} {,,} Step y step:. Initil stte: {}. {} {, }

33 . {} {} 4. {, } {,, } 5. {, } {} 6. {,, } {,,, } 7. {,, } {} 8. {,,, } {,,, } 9. {,,, } {, }. {, } {,, }. {, } {, }. {,, } {,,, }. {,, } {, } Solution.6. (o9) We show how to solve the prolem oth y using set prtitioning nd y using the doule complement. Set prtitioning: We use the minimistion lgorithm from Slling, pge 6. Level {A, B, C, D, E, } Level {A, B, C, D, E} { } Level {A, C, D, E} {B} { } Level {C, D, E} {A} {B} { } The stte is non-ccepting nd the sttes A, B, C, D, E re ccepting. The stte B trnsfers to y the string, ut the sttes A, C, D, E trnsfers to sttes in {C, D, E}. A trnsfers to y the string, ut C, D, E trnsfers to sttes in {D, E}. Level 4 {C, D, E} {A} {B} { } No further sttes cn e distinguished., φ B, A CDE

34 Doule reversing: We use the doule reversing lgorithm from Slling, pge 6. First we reverse the utomtion nd otin n NFA M rev. D E, φ C B A The next step is to convert M rev todfam using suset construction.. First we crete new stte from the set of sttes in the NFA which re rechle y consuming ε from some initil stte. Note tht the new stte is n ccepting stte, since the stte A is ccepting. {A,B,C,D,E}. Then, we crete new stte representing the rechle sttes from {A, B, C, D, E} y consuming n. The rechle sttes re {A, C, D, E}. {A,C,D,E} {A,B,C,D,E}. Now we find the sttes rechle y consuming from stte in {A, B, C, D, E}. {A,B,C,D,E} {A,C,D,E} 4. We crry on in the sme mnner, ut from some stte in {A, C, D, E}. {A,B,C,D,E} {A,C,D,E} {C,D,E} 5. Over gin, ut from stte in {C, D, E}. 4

35 {A,B,C,D,E} {A,C,D,E} {C,D,E} 6. Now, we hve otined n equivlent DFA M since no more trnsitions need to e exmined. Now we reverse M to otin n NFA (M ) rev. From (M ) rev we crete DFA M s efore.. {,} {}. {,} {,,} {}. {,} {} {,,} {} 4. {}, {,} {,,} We re done! Note tht this DFA is the sme s the one we otined erlier, except tht the sttes hve different nmes. 5

36 Solution.7. We solve the prolem y suset construction, Slling pge 6. (o8) Level {,,, 4, 5, 6, 7, 8} Strt Level {, 4, 6, 8} {,, 5, 7} Level {, 6, 4, 8} {, } {5, 7} Level {, 6} {4, 8} {, } {5, 7} The sttes,4,6 nd 8 re ccepting nd the sttes,,5 nd 7 re not. The sttes nd trnsfers to rejecting sttes y the string, ut the sttes 5 nd 7 trnsfers into ccepting sttes. The sttes nd 6 trnsfers into cceptingt sttes y the string, ut the sttes 4 nd 8 trnsfers into rejecting sttes y the string. Level 4 {, 6} {4, 8} {, } {5, 7} No further distinguishing cn e done. The miniml DFA is shown elow., {4,8} {,6} {5,7} {,} Solution.8. Interpret the utomt s one NFA nd convert this to DFA using suset construction. (o64) {,6} {,7}, {4} {,5} {,5,6} {,5} {,5,6} {4,5,6} {4,6} {4,7} {4,5} 6

37 Step y step:. Initil stte: {, 5}. {, 5} {, 5, 6}. {, 5} {4} 4. {, 5, 6} {4, 5, 6} 5. {, 5, 6} {, 7} 6. {4} {4} 7. {4} {4} 8. {4, 5, 6} {4, 5, 6} 9. {4, 5, 6} {4, 7}. {, 7} {, 6}. {, 7} {, 5}. {4, 7} {4, 6}. {4, 7} {4, 5} 4. {, 6} {, 6} 5. {, 6} {, 7} 6. {, 5} {, 5, 6} 7. {, 5} {, 7} 8. {4, 6} {4, 6} 9. {4, 6} {4, 7}. {4, 5} {4, 5, 6}. {4, 5} {4, 7}. {, 5, 6} {, 5, 6}. {, 5, 6} {, 7} G, E H K C A B I D F J We renme the sttes ccording to elow. Minimistion: Level {A, B, C, D, E, F, G, H, I, J, K} Level {A, B, C, D, I, J} {E,F,G,H,K} Accepting or not Level {A, C} {B, D, I, J} {E, G, H, K} {F } foo Level {A} {C} {B,D,I,J} {E,G,H,K} {F } r Level 4 {A} {C} {B,D,I,J} {E,G,H,K} {F } No further distinguishing possile. The new DFA:, {C} {A}, {B,D,I,J} {E,G,H,K} SOLUTION TEST ASSIGNMENT. TBA. (o8) 7

38 SOLUTION TEST ASSIGNMENT. (o) {,} {,,} {,,,4} Step y step:. Initil stte: {, }. {, } {,, }. {, } {, } 4. {,, } {,,, 4} 5. {,, } {, } 6. {,,, 4} {,,, 4} 7. {,,, 4} {, } SOLUTION TEST ASSIGNMENT 4. TBA. (o7) 8

39 4 Regulr Grmmr Exercise 4.. (o46) Try to construct regulr grmmr which genertes the lnguge { n n n N}. Explin why you don t succeed! Exercise 4.. (o48) Crete regulr grmmr for the following lnguges. Use S s the first non-terminl. When you hve creted the grmmrs, construct the corresponding NFA s. (i) {w w {, } w contints the sustring or } (ii) Exercise 4.. (o49) Crete NFA s for the following lnguges nd construct the corresponding regulr grmmrs using these. Use S s the first non-terminl. (i) (ε )( ) (ii) ( ) (iii) {w w {, } w doesn t end in } Exercise 4.4. (o47) Crete regulr grmmr for the lnguge of string over {, } which contins the sustrings nd. Exercise 4.5. Construct regulr grmmrs for the following lnguges. (o5) (i) ( ) ( ) (ii) { n m n + m =k + n, m, k N} Exercise 4.6. (o77) Construct regulr grmmr which produces the lnguge over the lphet Σ={, } consisting of ll strings with t most s. Show how the string is produced. Exercise 4.7. Construct regulr grmmr producing the following lnguge over the lphet Σ={, }: L = {w ( w w (mod )} Then show how the string is produced. (o78) 9

40 Solutions Solution 4.. (o46) It is logicl to strt y S... s production rule. From the eginning we hve to e le to generte s to otin the sme numer of s nd s. However, no other terminls my pper in regulr production rule. The context-sensitive grmmr S S ε, on the other hnd, is generting the lnguge. Solution 4.. (o48) (i) S S S T V T U V U U U U ε, S, T U V (ii) S T U T T ε U U V V V S ε T U ε V Solution 4.. (i) (ε )( ) =( ), S T S S S T T ε (o49) (ii) ( ) = S S S ε (iii) S T U S T S ε T T U ε U T S 4

41 Solution 4.4. (o47) S S S S S S A A B B B B C C D D D D ε S S S E E F F F F G G H H H H ε Solution 4.5. (o5) (i) S S S S A ε A A B B C C C D D S S A A A B B (ii) Construct strings with odd length consisting of some numer of s followed y some numer of s. S A odd B odd A odd A even B even ε A even A odd B odd B odd B even ε B even B odd Solution 4.6. (o77) S S S ε A A B ε B B C ε C C ε Production of the string : S S S A A B C C 4

42 Solution 4.7. (o78) S A B A B S ε B S A The string is produced s follows. S A S A B S A S A 4

43 5 Non-Regulrity Exercise 5.. (o79) Show tht if the lnguges L nd L re regulr, then the following lnguge re regulr. You cn use ny proof technique you like, nd use ny proof from the course ook nd/or the lecture mteril. (i) L L (ii) L (iii) L L (iv) L, dvs. Σ L (v) L L (vi) L L (vii) {w w L if nd only if w/ L } (viii) prefix (L ) (see Nottion) (ix) suffix (L ) (see Nottion) (x) sustring(l ) where sustring(l) ={w x, y such tht xwy L} Exercise 5.. Which of the following lnguges re regulr? (o68) (i) { n m n>m n<m} (ii) { n m n m n m} (iii) { n m n>m n<m} (iv) { n m n m n m} Exercise 5.. Prove tht if L is regulr, then L rev is regulr. (o4) Exercise 5.4. (o7) Wht cn e sid out the lnguge L = {w {, } w = w}? is it the empty string? is it regulr? Exercise 5.5. (o) Does it hold tht lnguge cnnot e regulr if it is the union of lnguges which re non-regulr? Does it hold for the intersection? For conctention? If it is true, prove it. If not, give counter exmple. 4

44 Exercise 5.6. (o8) Determine if the following lnguges re regulr or non-regulr. Prove tht your nswers re correct. You my use properties of regulr lnguges, closure properties of regulr lnguges, things you know out DFA s, NFA s or regulr expressions nd grmmrs. (i) { n n } (ii) {w w {, } w w } (iii) {w w {, } w = w } (iv) {w rev w L( n m )} (v) {xwx rev y x, w, y {, } + } (vi) { n n+m c m m } Exercise 5.7. Prove tht the following lnguges re non-regulr: (o) (i) {, n m+n m, n } (ii) {ww w ( ) + } (iii) {() n () n n } (iv) The set of strings over {, } with the eqully mny zeroes s ones. (v) {w ( ) w = w rev } (vi) {xx rev w x, w ( ) + } (vii) { n n is prime} (viii) { n n is composite} (ix) { m n m n} (x) { m n gcd(m, n) =}, where the function gcd(x, y) is the gretest common divisor. Exercise 5.8. Prove tht the lnguge L = { n n },n N is non-regulr using the pumping lemm. Exercise 5.9. Prove tht the lnguge L = {w {, } u : www = uu} is non-regulr. Exercise 5.. Let L e regulr lnguge. Wht cn e sid out the following lnguge? (o8) (o6) (o67) Exercise 5.. L = {w ww rev ww rev L} (o7) x is root to w if n such tht w = x n. We define the root to lnguge L s rot(l) ={x n :x n L}. Prove tht for ech lnguge L Σ it holds tht ε L Σ =root(l). 44

45 TEST ASSIGNMENT 5. (LESSON ) Determine if the following lnguges re regulr or not. (o4) (i) L = { i j c k i + j = k} (ii) L = { i j c k i j k min(8,j )} 45

46 Solutions Solution 5.. (i) Regulr lnguges re y definition closed under conctention. (o79) (ii) Regulr lnguges re y definition closed under the Kleene str opertion. (iii) Regulr lnguges re y definition closed under union. (iv) If L is regulr, it is possile to construct DFA for the lnguge. Assume tht M =(Q, Σ,δ,s,F) is such DFA. Then it is possile to construct new DFA M =(Q, Σ,δ,s,Q F ) which rejects string w if nd only if M would ccept w. L(M )=Σ L(M )=Σ L = L. Since it exists DFA ccepting the lnguge L, then L is regulr if L is regulr. Regulr lnguges re closed under complement. ) (v) DeMorgns lw implies tht L L = (L L. Since regulr lnguges re closed under complement nd union, they re lso closed under intersection. (vi) Note tht L L = L L. Since regulr lnguges re closed under intersection nd complement, they re lso close under set difference. (vii) Note tht {w w L om och endst om w/ L } =(L L ) (L L ). Since regulr lnguges re closed under set difference nd union, this set is regulr. (viii) Assume tht M is NFA ccepting L. Construct new NFA M equivlent to M except tht we dd new stte q f, which is the only finl stte in M. We lso dd ε-trnsitions to q f from ll sttes from with finl stte is rechle in M.Ifwz L, then w is consumed y the regulr trnsitions in M, followed y one of the ε-trnsitions to q f to simulte the consumption of z, without ctully consuming something. Thus, L(M )=prefix (L(M )) = prefix(l ), tht is, if L is regulr, then prefix(l ) is lso regulr. (ix) Assume tht M is NFA ccepting L. Construct new NFA M equivlent to M except tht we dd new initil stte q. In ddition, we dd ε-trnsitions from q to ll sttes where n initil stte is rechle. If xw L, then the consumption of x is simulted y trnsition from the first set of ε-trnsitions nd w is consumed y the regulr trnsitions in M. Thus, L(M )=suffix(l(m )) = suffix(l ), nd so it holds tht if L is regulr, then suffix(l ) is lso regulr. (x) Assume tht M is n NFA ccepting L. Construct new NFA M equivlent to M except tht we dd new initil stte q nd new finl stte q f, which is the only finl stte in M. In ddition, we dd ε-trnsitions q to ll sttes from which n initil stte cn e reched, nd ε-trnsitions q f from ll sttes from which finl stte cn e reched in M.Ifxwy L, the consumption of x is simulted y trnsition from the first set of ε-trnsitions, w is then consumed y the regulr trnsitions of M nd the consumption of y is simulted y trnsition from the second set of ε-trnsitions. Thus, L(M )=delstrng(l(m )) = delstrng(l ), nd hence it holds tht if L is regulr, then delstrng(l ) is lso regulr. Solution 5.. (o68) Not regulr. It is the sme lnguge s { n m n m} which is the complement to { n m n = m} which is not regulr (which you should hve discovered erlier). Since regulrity is closed under complementtion, the considered lnguge cn not e regulr (since it would imply tht { n m n = m} is regulr). Regulr. The lnguge cn e descried y the regulr expression. Regulr. This lnguge contins no lnguge, nd is thus regulr. 46

47 Solution 5.. (o4) Since L is regulr, there exists DFA ccepting this lnguge. If we reverse ll trnsitions in this utomtion, nd turn the initil stte into n ccepting stte nd ll ccepting sttes to initil sttes, the result is tht we run the originl utomtion ckwrds, nd the new utomtion will ccept the lnguge L rev. Since there exists n finite utomtion ccepting L rev, the lnguge is regulr. Solution 5.4. (o7) It is not the empty set since, for instnce, w = nd w = stisfies w = w. If we look it closer t this condition we notice tht w hs to strt with since this is the prefix on the left hnd side. In the sme wy, the strings hs to end in since tht is the postfix on the right hnd side. However, we cn mke n exception for the string which my ct oth s initil nd finl nd orrows, so to spek, its s from the prefix nd postfix strings in the condition. Thus, the string stisfies the condition =. We now try to find some lrger exmples. The strings re supposed to strt with, so we hd to dd to our miniml string. In ddition, we hd the requirement tht the strings should end in, ut we cn let the finl e the sme s the initil one to otin the string. If we keep on dding chrcters to this string, the requirement tht they should end in yields the following strings,,,... As cn e seen, there is regulrity in the strings which cn e summrised s: the strings egins with n followed y zero or more s. This cn e formulted s the regulr expression (). Since there exists regulr expression descriing the lnguge, it is regulr. Solution 5.5. (o) Lnguges formed y the union of two non-regulr lnguges my e regulr. For instnce, this is the cse with the lnguge constructed y the union of the two non-regulr lnguges { n m n = m} nd { n m n m}, which is descried y the regulr expression. The intersection of two non-regulr lnguges my lso result in regulr lnguge, for instnce the non-regulr lnguges n n nd n n, which intersection only contins the empty string, which is regulr. Conctention of two non-regulr lnguges will however lwys result in non-regulr lnguge. If we ssume the contrry, tht is, tht it is possile to crete regulr lnguge y conctention of two non-regulr lnguges, there would e finite utomtion ccepting this lnguge. Conctention of lnguges corresponds to conctention of two utomt ccepting respective lnguge. Thus, it would e possile to split this finite utomtion into two seprte utomt ccepting ech of the originl lnguges, which is contrdiction since these lnguges re non-regulr which mens there cnnot exist finite utomt ccepting them. Solution 5.6. (o8) Non-regulr. Assume tht L = { n n } is regulr lnguge. Then there exists DFA M ccepting L. Crete new DFA M equivlent to M except tht ll pirs of trnsitions δ(q,)= q nd δ(q,)= q re chnged to single trnsition δ(q,)= q (two trnsitions in M consuming two s re replced y trnsition consuming one ). M consumes hlf s mny s s M, L(M )={ n n } which hs to e regulr, since there is DFA ccepting this lnguge. This is contrdiction since we know tht { n n } is non-regulr. Thus, L is lso non-regulr. Non-regulr. Assume tht L = {w w {, } w w } is regulr. Since regulr lnguges re closed under complementtion nd intersection, (L) L( ) hs to e regulr. However, (L) L( )={ n n }, which is not regulr, nd thus neither is L. Non-regulr. Assume tht L = {w w {, } w = w } is regulr. We know from the closure properties of regulr lnguges tht L L( ) is regulr. However, L L( )= { n n }, which is not regulr. Hence, L is cnnot e regulr. 47

48 Regulr. The regulr expression descries the lnguge. Regulr. The regulr expression ( ) + ( ) + ( ) + ( ) + descries this lnguge. Note tht w cn hve n ritrry length, so it my consume the tril of x nd the eginning of x rev. The only requirement is tht the first chrcter in x (which must contin t lest one chrcter) is present in the rest of the string. Non-regulr. This lnguge cn lso e expressed s L = { n n } { n n+ c} { n n+ c }. Assume tht L is regulr. Then, L { } hs to e regulr. However, L { } = { n n }, which is non-regulr, thus L cnnot e regulr. Solution 5.7. (o) { n n+m m, n } = {}{ n n }{ m }. Since we know tht { n n } nd { m } re nonregulr nd tht conctention of non-regulr lnguges re non-regulr, the lnguge cnnot e regulr. The lnguge is non-regulr. Since ech pir of the infinitely mny strings over ( ) + re distinguished y the lnguge, tht is, ech pir x, y ( ) + ) where x y is distinguished when xx elongs to the lnguge nd yx doesn t. The fct tht this lnguge is non-regulr might e simpler to understnd if we let =nd =resulting in the lnguge { n n n } which is known to e non-regulr. Cll this lnguge L nd ssume tht it is regulr. Then L ( ) is lso regulr since regulr lnguges re closed under intersection. However, this is contrdiction since L L( )= { n n }, which is non-regulr. Thus, L cnnot e regulr. This lnguge distinguishes n infinite numer of strings nd it therefore non-regulr. Every pir of the infinitely mny strings x, y ( ) + where x y re distinguished when xx rev elongs to the lnguge ut not yx rev. The lnguge hs to distinguish infinitely mny strings. The proof is similr to the solution ove. For ech of the infinitely mny strings x, y ( ) + where x y, there exists string z = x rev such tht xzw elongs to the lnguge, ut not yzw. Hence infinitely mny strings re distinguished, nd the lnguge is not regulr. Also here it is useful to use rgumenttion out distinguishing strings. However, we need to mke slightly stricter requirements on the strings since it otherwise would not e ovious tht the lnguge distinguishes etween them. Tke two strings x = n nd y = n+. The numer of such strings re infinite. Since there exists n infinite numer of prime numers, there exists string z = m such tht n + m is prime, ut not (n +)+m (except when n = m = where oth nd re prime). Then xz elongs to the lnguge, ut not yz. The lnguge then distinguishes n infinite numer of strings, thus mking it non-regulr. Composite numers re numers which re not prime. Thus, this lnguge is the complementry lnguge to the lnguge or prime strings in the previous exercise, which ws non-regulr. Considering this nd the closure properties of complementtion, we cn derive tht this lnguge cnnot e regulr. This lnguge is the complement lnguge to { n n } which is non-regulr. By the closure properties for complementtion we know tht lso this lnguge is non-regulr. Solution 5.8. (o8) We strt y tking look t the pumping lemm. The pumping lemm sttes properties tht must hold for ll strings in regulr lnguge (with n infinite numer of strings). The lemm sttes tht ll strings in such lnguge, which hs 48

49 length exceeding certin numer, contins non-empty sustring which my oth e pumped up (repeted) n ritrry numer of times or pumped out (removed) such tht the resulting string still is in the lnguge. In ddition it holds tht such sustring exists in ech sustring of string in the lnguge, if the sustring hs length equl to or exceeding the numer stted ove. In other words, it holds tht ll strings w L such tht w N cn e re-written s w = xyz where y, nd for ll i N it holds tht xy i z L. In ddition, it holds tht ll sustrings of w where w N hs such pumping lock y. To prove tht lnguge is non-regulr using the pumping lemm, it is esiest to try to construct counter exmple. Thus, we strt y ssuming tht the lnguge L = { n n } is regulr, nd try to chieve contrdiction. We will do this y oserving n individul string in L nd show tht it is not possile to pump it using the pumping lemm. Thus, ccording to the pumping lemm it holds tht ech string in L hving length greter th or equl to n unknown numer N should hve pumping lock y which cn e pumped. Since we hve no ide wht N would e, we hve to e creful nd select string which is gurnteed to hve length which is equl to or greter thn N. The only wy we cn do this is to choose string which is prmeterised in N. For instnce, we cn consider the string w = N N, for which it nturlly holds tht w N. The next step is to find out exct where in the string w = xyz the pumping lock y is. Here we could use the cct tht pumping lock hs to exist in ll sustrings of w where w N. Consider the sustring N, for which it holds tht N N. Thus, N must contin y such tht w = xy i z,i N.Sowehvew = N k k N where x = N k, y = k nd z = N. We ttempt to pump out the pumping lock y once, nd otin the string = N k N where k>. This string is supposed to elong to the lnguge L ccording to the pumping lemm (under the ssumption tht L is regulr). But since we the numer of s nd the numer of s re not the sme, the pumped string cnnot e in the lnguge! We hve found contrdiction, nd hve to reject our hypothesis tht L would e regulr. Hence, L is non-regulr. Solution 5.9. (o6) We use the pumping lemm lso in this proof. The string w = N n elongs to the lnguge, since www = uu with u = N N N. If the strting string of zeroes is pumped, which ccording to the pumping lemm should e possile since the length of this string is greter thn or equl to N, the string is no longer in the lnguge. Tht is, if w = N N then www uu. Thus, the lnguge is non-regulr. Solution 5.. (o67) The strings in the lnguge consist of conctented pir of the sustring ww rev. Thus, the strings re the sme ckwrds nd forwrds, i.e., they re plindromes. Plindrome lnguges re not regulr, nd s we sw erlier, it is not possile to otin regulr lnguge y conctenting two non-regulr lnguges. Solution 5.. (o7) We hve tht root(l) ={x n :x n L}. Assume tht ε L nd let n =. This results in root(l) ={x x L} nd since we no longer hve ny requirements on which strings x which should elong to root(l) we hve tht root(l) =Σ. Thus, we hve shown tht ε L Σ = root(l). Now ssume tht Σ = root(l). We wnt to show tht this implies ε L. Since ε Σ,iths to hold tht n :ε n L. No mtter how mny times we repet ε, the result is gin ε, i.e., n :ε n = ε. Thus, it must hold tht ε L. Consequently, we hve shown tht ε L Σ = root(l) nd this together with the prgrph ove yields tht ε L Σ = root(l). 49

50 SOLUTION TEST ASSIGNMENT 5. (o4) L is non-regulr. Assume tht L is regulr for contrdiction. Then there should e numer N such tht if w L nd w N, then w contins non-empty sustring y which cn e pumped such tht w stys in the lnguge. Such string exists, s mtter of fct, in every sustring of w with length of t lest N chrcters. Consider the string N N c N which elongs to the lnguge since N + N =N. Let the eginning sequence of s e the pumping string y, which stisfies the condition in the pumping lemm since y N. If we pump up y once, the string no longer elongs to the lnguge, since N + N N. Thus, we hve chieved contrdiction, nd L cnnot e regulr. L is regulr. Ech string in L my consist of mximum 8 of ech of the chrcters, nd c. This mkes the numer of strings in L finite, thus regulr. 5

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

Regular Sets and Expressions

Regular Sets and Expressions Regulr Sets nd Expressions Finite utomt re importnt in science, mthemtics, nd engineering. Engineers like them ecuse they re super models for circuits (And, since the dvent of VLSI systems sometimes finite

More information

One Minute To Learn Programming: Finite Automata

One Minute To Learn Programming: Finite Automata Gret Theoreticl Ides In Computer Science Steven Rudich CS 15-251 Spring 2005 Lecture 9 Fe 8 2005 Crnegie Mellon University One Minute To Lern Progrmming: Finite Automt Let me tech you progrmming lnguge

More information

Solution to Problem Set 1

Solution to Problem Set 1 CSE 5: Introduction to the Theory o Computtion, Winter A. Hevi nd J. Mo Solution to Prolem Set Jnury, Solution to Prolem Set.4 ). L = {w w egin with nd end with }. q q q q, d). L = {w w h length t let

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata N Lecture Notes on Regulr Lnguges nd Finite Automt for Prt IA of the Computer Science Tripos Mrcelo Fiore Cmbridge University Computer Lbortory First Edition 1998. Revised 1999, 2000, 2001, 2002, 2003,

More information

EQUATIONS OF LINES AND PLANES

EQUATIONS OF LINES AND PLANES EQUATIONS OF LINES AND PLANES MATH 195, SECTION 59 (VIPUL NAIK) Corresponding mteril in the ook: Section 12.5. Wht students should definitely get: Prmetric eqution of line given in point-direction nd twopoint

More information

Reasoning to Solve Equations and Inequalities

Reasoning to Solve Equations and Inequalities Lesson4 Resoning to Solve Equtions nd Inequlities In erlier work in this unit, you modeled situtions with severl vriles nd equtions. For exmple, suppose you were given usiness plns for concert showing

More information

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY MAT 0630 INTERNET RESOURCES, REVIEW OF CONCEPTS AND COMMON MISTAKES PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY Contents 1. ACT Compss Prctice Tests 1 2. Common Mistkes 2 3. Distributive

More information

0.1 Basic Set Theory and Interval Notation

0.1 Basic Set Theory and Interval Notation 0.1 Bsic Set Theory nd Intervl Nottion 3 0.1 Bsic Set Theory nd Intervl Nottion 0.1.1 Some Bsic Set Theory Notions Like ll good Mth ooks, we egin with definition. Definition 0.1. A set is well-defined

More information

Algebra Review. How well do you remember your algebra?

Algebra Review. How well do you remember your algebra? Algebr Review How well do you remember your lgebr? 1 The Order of Opertions Wht do we men when we write + 4? If we multiply we get 6 nd dding 4 gives 10. But, if we dd + 4 = 7 first, then multiply by then

More information

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom Byesin Updting with Continuous Priors Clss 3, 8.05, Spring 04 Jeremy Orloff nd Jonthn Bloom Lerning Gols. Understnd prmeterized fmily of distriutions s representing continuous rnge of hypotheses for the

More information

Section 5-4 Trigonometric Functions

Section 5-4 Trigonometric Functions 5- Trigonometric Functions Section 5- Trigonometric Functions Definition of the Trigonometric Functions Clcultor Evlution of Trigonometric Functions Definition of the Trigonometric Functions Alternte Form

More information

Factoring Polynomials

Factoring Polynomials Fctoring Polynomils Some definitions (not necessrily ll for secondry school mthemtics): A polynomil is the sum of one or more terms, in which ech term consists of product of constnt nd one or more vribles

More information

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University SYSTEM FAULT AND Hrry G. Kwtny Deprtment of Mechnicl Engineering & Mechnics Drexel University OUTLINE SYSTEM RBD Definition RBDs nd Fult Trees System Structure Structure Functions Pths nd Cutsets Reliility

More information

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

and thus, they are similar. If k = 3 then the Jordan form of both matrices is Homework ssignment 11 Section 7. pp. 249-25 Exercise 1. Let N 1 nd N 2 be nilpotent mtrices over the field F. Prove tht N 1 nd N 2 re similr if nd only if they hve the sme miniml polynomil. Solution: If

More information

flex Regular Expressions and Lexical Scanning Regular Expressions and flex Examples on Alphabet A = {a,b} (Standard) Regular Expressions on Alphabet A

flex Regular Expressions and Lexical Scanning Regular Expressions and flex Examples on Alphabet A = {a,b} (Standard) Regular Expressions on Alphabet A flex Regulr Expressions nd Lexicl Scnning Using flex to Build Scnner flex genertes lexicl scnners: progrms tht discover tokens. Tokens re the smllest meningful units of progrm (or other string). flex is

More information

Experiment 6: Friction

Experiment 6: Friction Experiment 6: Friction In previous lbs we studied Newton s lws in n idel setting, tht is, one where friction nd ir resistnce were ignored. However, from our everydy experience with motion, we know tht

More information

A Visual and Interactive Input abb Automata. Theory Course with JFLAP 4.0

A Visual and Interactive Input abb Automata. Theory Course with JFLAP 4.0 Strt Puse Step Noninverted Tree A Visul nd Interctive Input Automt String ccepted! 5 nodes generted. Theory Course with JFLAP 4.0 q0 even 's, even 's q2 even 's, odd 's q1 odd 's, even 's q3 odd 's, odd

More information

SPECIAL PRODUCTS AND FACTORIZATION

SPECIAL PRODUCTS AND FACTORIZATION MODULE - Specil Products nd Fctoriztion 4 SPECIAL PRODUCTS AND FACTORIZATION In n erlier lesson you hve lernt multipliction of lgebric epressions, prticulrly polynomils. In the study of lgebr, we come

More information

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers. 2 Rtionl Numbers Integers such s 5 were importnt when solving the eqution x+5 = 0. In similr wy, frctions re importnt for solving equtions like 2x = 1. Wht bout equtions like 2x + 1 = 0? Equtions of this

More information

Binary Representation of Numbers Autar Kaw

Binary Representation of Numbers Autar Kaw Binry Representtion of Numbers Autr Kw After reding this chpter, you should be ble to: 1. convert bse- rel number to its binry representtion,. convert binry number to n equivlent bse- number. In everydy

More information

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( ) Polynomil Functions Polynomil functions in one vrible cn be written in expnded form s n n 1 n 2 2 f x = x + x + x + + x + x+ n n 1 n 2 2 1 0 Exmples of polynomils in expnded form re nd 3 8 7 4 = 5 4 +

More information

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful Pentominoes Bruce Bguley Cscde Mth Systems, LLC Astrct. Pentominoes nd their reltives the polyominoes, polycues, nd polyhypercues will e used to explore nd pply vrious importnt mthemticl concepts. In this

More information

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions. Lerning Objectives Loci nd Conics Lesson 3: The Ellipse Level: Preclculus Time required: 120 minutes In this lesson, students will generlize their knowledge of the circle to the ellipse. The prmetric nd

More information

MATH 150 HOMEWORK 4 SOLUTIONS

MATH 150 HOMEWORK 4 SOLUTIONS MATH 150 HOMEWORK 4 SOLUTIONS Section 1.8 Show tht the product of two of the numbers 65 1000 8 2001 + 3 177, 79 1212 9 2399 + 2 2001, nd 24 4493 5 8192 + 7 1777 is nonnegtive. Is your proof constructive

More information

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered: Appendi D: Completing the Squre nd the Qudrtic Formul Fctoring qudrtic epressions such s: + 6 + 8 ws one of the topics introduced in Appendi C. Fctoring qudrtic epressions is useful skill tht cn help you

More information

1.2 The Integers and Rational Numbers

1.2 The Integers and Rational Numbers .2. THE INTEGERS AND RATIONAL NUMBERS.2 The Integers n Rtionl Numers The elements of the set of integers: consist of three types of numers: Z {..., 5, 4, 3, 2,, 0,, 2, 3, 4, 5,...} I. The (positive) nturl

More information

19. The Fermat-Euler Prime Number Theorem

19. The Fermat-Euler Prime Number Theorem 19. The Fermt-Euler Prime Number Theorem Every prime number of the form 4n 1 cn be written s sum of two squres in only one wy (side from the order of the summnds). This fmous theorem ws discovered bout

More information

Modular Generic Verification of LTL Properties for Aspects

Modular Generic Verification of LTL Properties for Aspects Modulr Generic Verifiction of LTL Properties for Aspects Mx Goldmn Shmuel Ktz Computer Science Deprtment Technion Isrel Institute of Technology {mgoldmn, ktz}@cs.technion.c.il ABSTRACT Aspects re seprte

More information

2 DIODE CLIPPING and CLAMPING CIRCUITS

2 DIODE CLIPPING and CLAMPING CIRCUITS 2 DIODE CLIPPING nd CLAMPING CIRCUITS 2.1 Ojectives Understnding the operting principle of diode clipping circuit Understnding the operting principle of clmping circuit Understnding the wveform chnge of

More information

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn 33337_0P03.qp 2/27/06 24 9:3 AM Chpter P Pge 24 Prerequisites P.3 Polynomils nd Fctoring Wht you should lern Polynomils An lgeric epression is collection of vriles nd rel numers. The most common type of

More information

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Or more simply put, when adding or subtracting quantities, their uncertainties add. Propgtion of Uncertint through Mthemticl Opertions Since the untit of interest in n eperiment is rrel otined mesuring tht untit directl, we must understnd how error propgtes when mthemticl opertions re

More information

Unit 6: Exponents and Radicals

Unit 6: Exponents and Radicals Eponents nd Rdicls -: The Rel Numer Sstem Unit : Eponents nd Rdicls Pure Mth 0 Notes Nturl Numers (N): - counting numers. {,,,,, } Whole Numers (W): - counting numers with 0. {0,,,,,, } Integers (I): -

More information

Basic Research in Computer Science BRICS RS-02-13 Brodal et al.: Solving the String Statistics Problem in Time O(n log n)

Basic Research in Computer Science BRICS RS-02-13 Brodal et al.: Solving the String Statistics Problem in Time O(n log n) BRICS Bsic Reserch in Computer Science BRICS RS-02-13 Brodl et l.: Solving the String Sttistics Prolem in Time O(n log n) Solving the String Sttistics Prolem in Time O(n log n) Gerth Stølting Brodl Rune

More information

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001 CS99S Lortory 2 Preprtion Copyright W. J. Dlly 2 Octoer, 2 Ojectives:. Understnd the principle of sttic CMOS gte circuits 2. Build simple logic gtes from MOS trnsistors 3. Evlute these gtes to oserve logic

More information

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES DAVID WEBB CONTENTS Liner trnsformtions 2 The representing mtrix of liner trnsformtion 3 3 An ppliction: reflections in the plne 6 4 The lgebr of

More information

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right.

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right. Order of Opertions r of Opertions Alger P lese Prenthesis - Do ll grouped opertions first. E cuse Eponents - Second M D er Multipliction nd Division - Left to Right. A unt S hniqu Addition nd Sutrction

More information

Operations with Polynomials

Operations with Polynomials 38 Chpter P Prerequisites P.4 Opertions with Polynomils Wht you should lern: Write polynomils in stndrd form nd identify the leding coefficients nd degrees of polynomils Add nd subtrct polynomils Multiply

More information

9 CONTINUOUS DISTRIBUTIONS

9 CONTINUOUS DISTRIBUTIONS 9 CONTINUOUS DISTIBUTIONS A rndom vrible whose vlue my fll nywhere in rnge of vlues is continuous rndom vrible nd will be ssocited with some continuous distribution. Continuous distributions re to discrete

More information

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2 7 CHAPTER THREE. Cross Product Given two vectors = (,, nd = (,, in R, the cross product of nd written! is defined to e: " = (!,!,! Note! clled cross is VECTOR (unlike which is sclr. Exmple (,, " (4,5,6

More information

Bypassing Space Explosion in Regular Expression Matching for Network Intrusion Detection and Prevention Systems

Bypassing Space Explosion in Regular Expression Matching for Network Intrusion Detection and Prevention Systems Bypssing Spce Explosion in Regulr Expression Mtching for Network Intrusion Detection n Prevention Systems Jignesh Ptel, Alex Liu n Eric Torng Dept. of Computer Science n Engineering Michign Stte University

More information

Java CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser:

Java CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser: Jv CUP Jv CUP is prser-genertion tool, similr to Ycc. CUP uilds Jv prser for LALR(1) grmmrs from production rules nd ssocited Jv code frgments. When prticulr production is recognized, its ssocited code

More information

Lec 2: Gates and Logic

Lec 2: Gates and Logic Lec 2: Gtes nd Logic Kvit Bl CS 34, Fll 28 Computer Science Cornell University Announcements Clss newsgroup creted Posted on we-pge Use it for prtner finding First ssignment is to find prtners Due this

More information

Solutions for Selected Exercises from Introduction to Compiler Design

Solutions for Selected Exercises from Introduction to Compiler Design Solutions for Selected Exercises from Introduction to Compiler Design Torben Æ. Mogensen Lst updte: My 30, 2011 1 Introduction This document provides solutions for selected exercises from Introduction

More information

Answer, Key Homework 10 David McIntyre 1

Answer, Key Homework 10 David McIntyre 1 Answer, Key Homework 10 Dvid McIntyre 1 This print-out should hve 22 questions, check tht it is complete. Multiple-choice questions my continue on the next column or pge: find ll choices efore mking your

More information

Learning Outcomes. Computer Systems - Architecture Lecture 4 - Boolean Logic. What is Logic? Boolean Logic 10/28/2010

Learning Outcomes. Computer Systems - Architecture Lecture 4 - Boolean Logic. What is Logic? Boolean Logic 10/28/2010 /28/2 Lerning Outcomes At the end of this lecture you should: Computer Systems - Architecture Lecture 4 - Boolen Logic Eddie Edwrds eedwrds@doc.ic.c.uk http://www.doc.ic.c.uk/~eedwrds/compsys (Hevily sed

More information

Integration by Substitution

Integration by Substitution Integrtion by Substitution Dr. Philippe B. Lvl Kennesw Stte University August, 8 Abstrct This hndout contins mteril on very importnt integrtion method clled integrtion by substitution. Substitution is

More information

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation FUNCTIONS AND EQUATIONS. SETS AND SUBSETS.. Definition of set. A set is ny collection of objects which re clled its elements. If x is n element of the set S, we sy tht x belongs to S nd write If y does

More information

Math 135 Circles and Completing the Square Examples

Math 135 Circles and Completing the Square Examples Mth 135 Circles nd Completing the Squre Exmples A perfect squre is number such tht = b 2 for some rel number b. Some exmples of perfect squres re 4 = 2 2, 16 = 4 2, 169 = 13 2. We wish to hve method for

More information

MA 15800 Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

MA 15800 Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent! MA 5800 Lesson 6 otes Summer 06 Rememer: A logrithm is n eponent! It ehves like n eponent! In the lst lesson, we discussed four properties of logrithms. ) log 0 ) log ) log log 4) This lesson covers more

More information

1 Fractions from an advanced point of view

1 Fractions from an advanced point of view 1 Frtions from n vne point of view We re going to stuy frtions from the viewpoint of moern lger, or strt lger. Our gol is to evelop eeper unerstning of wht n men. One onsequene of our eeper unerstning

More information

Automated Grading of DFA Constructions

Automated Grading of DFA Constructions Automted Grding of DFA Constructions Rjeev Alur nd Loris D Antoni Sumit Gulwni Dileep Kini nd Mhesh Viswnthn Deprtment of Computer Science Microsoft Reserch Deprtment of Computer Science University of

More information

4.11 Inner Product Spaces

4.11 Inner Product Spaces 314 CHAPTER 4 Vector Spces 9. A mtrix of the form 0 0 b c 0 d 0 0 e 0 f g 0 h 0 cnnot be invertible. 10. A mtrix of the form bc d e f ghi such tht e bd = 0 cnnot be invertible. 4.11 Inner Product Spces

More information

Integration. 148 Chapter 7 Integration

Integration. 148 Chapter 7 Integration 48 Chpter 7 Integrtion 7 Integrtion t ech, by supposing tht during ech tenth of second the object is going t constnt speed Since the object initilly hs speed, we gin suppose it mintins this speed, but

More information

Math 314, Homework Assignment 1. 1. Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1.

Math 314, Homework Assignment 1. 1. Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1. Mth 4, Homework Assignment. Prove tht two nonverticl lines re perpendiculr if nd only if the product of their slopes is. Proof. Let l nd l e nonverticl lines in R of slopes m nd m, respectively. Suppose

More information

Quick Reference Guide: One-time Account Update

Quick Reference Guide: One-time Account Update Quick Reference Guide: One-time Account Updte How to complete The Quick Reference Guide shows wht existing SingPss users need to do when logging in to the enhnced SingPss service for the first time. 1)

More information

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May 2008. Time: 14:00 16:00

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May 2008. Time: 14:00 16:00 COMP20212 Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Digitl Design Techniques Dte: Fridy 16 th My 2008 Time: 14:00 16:00 Plese nswer ny THREE Questions from the FOUR questions provided

More information

Generating In-Line Monitors For Rabin Automata

Generating In-Line Monitors For Rabin Automata Generting In-Line Monitors For Rin Automt Hugues Chot, Rphel Khoury, nd Ndi Twi Lvl University, Deprtment of Computer Science nd Softwre Engineering, Pvillon Adrien-Pouliot, 1065, venue de l Medecine Queec

More information

Regular Repair of Specifications

Regular Repair of Specifications Regulr Repir of Specifictions Michel Benedikt Oxford University michel.enedikt@coml.ox.c.uk Griele Puppis Oxford University griele.puppis@coml.ox.c.uk Cristin Riveros Oxford University cristin.riveros@coml.ox.c.uk

More information

Solving the String Statistics Problem in Time O(n log n)

Solving the String Statistics Problem in Time O(n log n) Solving the String Sttistics Prolem in Time O(n log n) Gerth Stølting Brodl 1,,, Rune B. Lyngsø 3, Ann Östlin1,, nd Christin N. S. Pedersen 1,2, 1 BRICS, Deprtment of Computer Science, University of Arhus,

More information

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding 1 Exmple A rectngulr box without lid is to be mde from squre crdbord of sides 18 cm by cutting equl squres from ech corner nd then folding up the sides. 1 Exmple A rectngulr box without lid is to be mde

More information

DATABASDESIGN FÖR INGENJÖRER - 1056F

DATABASDESIGN FÖR INGENJÖRER - 1056F DATABASDESIGN FÖR INGENJÖRER - 06F Sommr 00 En introuktionskurs i tssystem http://user.it.uu.se/~ul/t-sommr0/ lt. http://www.it.uu.se/eu/course/homepge/esign/st0/ Kjell Orsorn (Rusln Fomkin) Uppsl Dtse

More information

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply? Assignment 3: Bohr s model nd lser fundmentls 1. In the Bohr model, compre the mgnitudes of the electron s kinetic nd potentil energies in orit. Wht does this imply? When n electron moves in n orit, the

More information

Vectors 2. 1. Recap of vectors

Vectors 2. 1. Recap of vectors Vectors 2. Recp of vectors Vectors re directed line segments - they cn be represented in component form or by direction nd mgnitude. We cn use trigonometry nd Pythgors theorem to switch between the forms

More information

Physics 43 Homework Set 9 Chapter 40 Key

Physics 43 Homework Set 9 Chapter 40 Key Physics 43 Homework Set 9 Chpter 4 Key. The wve function for n electron tht is confined to x nm is. Find the normliztion constnt. b. Wht is the probbility of finding the electron in. nm-wide region t x

More information

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity Bbylonin Method of Computing the Squre Root: Justifictions Bsed on Fuzzy Techniques nd on Computtionl Complexity Olg Koshelev Deprtment of Mthemtics Eduction University of Texs t El Pso 500 W. University

More information

Econ 4721 Money and Banking Problem Set 2 Answer Key

Econ 4721 Money and Banking Problem Set 2 Answer Key Econ 472 Money nd Bnking Problem Set 2 Answer Key Problem (35 points) Consider n overlpping genertions model in which consumers live for two periods. The number of people born in ech genertion grows in

More information

Unambiguous Recognizable Two-dimensional Languages

Unambiguous Recognizable Two-dimensional Languages Unmbiguous Recognizble Two-dimensionl Lnguges Mrcell Anselmo, Dor Gimmrresi, Mri Mdoni, Antonio Restivo (Univ. of Slerno, Univ. Rom Tor Vergt, Univ. of Ctni, Univ. of Plermo) W2DL, My 26 REC fmily I REC

More information

A.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324

A.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324 A P P E N D I X A Vectors CONTENTS A.1 Scling vector................................................ 321 A.2 Unit or Direction vectors...................................... 321 A.3 Vector ddition.................................................

More information

Graphs on Logarithmic and Semilogarithmic Paper

Graphs on Logarithmic and Semilogarithmic Paper 0CH_PHClter_TMSETE_ 3//00 :3 PM Pge Grphs on Logrithmic nd Semilogrithmic Pper OBJECTIVES When ou hve completed this chpter, ou should be ble to: Mke grphs on logrithmic nd semilogrithmic pper. Grph empiricl

More information

Pointed Regular Expressions

Pointed Regular Expressions Pointed Regulr Expressions Andre Asperti 1, Cludio Scerdoti Coen 1, nd Enrico Tssi 2 1 Deprtment of Computer Science, University of Bologn sperti@cs.unio.it scerdot@cs.unio.it 2 INRIA-Micorsoft tssi@cs.unio.it

More information

5.6 POSITIVE INTEGRAL EXPONENTS

5.6 POSITIVE INTEGRAL EXPONENTS 54 (5 ) Chpter 5 Polynoils nd Eponents 5.6 POSITIVE INTEGRAL EXPONENTS In this section The product rule for positive integrl eponents ws presented in Section 5., nd the quotient rule ws presented in Section

More information

Words Symbols Diagram. abcde. a + b + c + d + e

Words Symbols Diagram. abcde. a + b + c + d + e Logi Gtes nd Properties We will e using logil opertions to uild mhines tht n do rithmeti lultions. It s useful to think of these opertions s si omponents tht n e hooked together into omplex networks. To

More information

AntiSpyware Enterprise Module 8.5

AntiSpyware Enterprise Module 8.5 AntiSpywre Enterprise Module 8.5 Product Guide Aout the AntiSpywre Enterprise Module The McAfee AntiSpywre Enterprise Module 8.5 is n dd-on to the VirusScn Enterprise 8.5i product tht extends its ility

More information

Chapter. Contents: A Constructing decimal numbers

Chapter. Contents: A Constructing decimal numbers Chpter 9 Deimls Contents: A Construting deiml numers B Representing deiml numers C Deiml urreny D Using numer line E Ordering deimls F Rounding deiml numers G Converting deimls to frtions H Converting

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes of revolution, prt ii Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem ) nd the ccumultion process is to determine so-clled volumes of

More information

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS Known for over 500 yers is the fct tht the sum of the squres of the legs of right tringle equls the squre of the hypotenuse. Tht is +b c. A simple proof is

More information

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100 hsn.uk.net Higher Mthemtics UNIT 3 OUTCOME 1 Vectors Contents Vectors 18 1 Vectors nd Sclrs 18 Components 18 3 Mgnitude 130 4 Equl Vectors 131 5 Addition nd Subtrction of Vectors 13 6 Multipliction by

More information

On the expressive power of temporal logic

On the expressive power of temporal logic On the expressive power of temporl logic Joëlle Cohen, Dominique Perrin nd Jen-Eric Pin LITP, Pris, FRANCE Astrct We study the expressive power of liner propositionl temporl logic interpreted on finite

More information

Concept Formation Using Graph Grammars

Concept Formation Using Graph Grammars Concept Formtion Using Grph Grmmrs Istvn Jonyer, Lwrence B. Holder nd Dine J. Cook Deprtment of Computer Science nd Engineering University of Texs t Arlington Box 19015 (416 Ytes St.), Arlington, TX 76019-0015

More information

PHY 140A: Solid State Physics. Solution to Homework #2

PHY 140A: Solid State Physics. Solution to Homework #2 PHY 140A: Solid Stte Physics Solution to Homework # TA: Xun Ji 1 October 14, 006 1 Emil: jixun@physics.ucl.edu Problem #1 Prove tht the reciprocl lttice for the reciprocl lttice is the originl lttice.

More information

On decidability of LTL model checking for process rewrite systems

On decidability of LTL model checking for process rewrite systems Act Informtic (2009) 46:1 28 DOI 10.1007/s00236-008-0082-3 ORIGINAL ARTICLE On decidbility of LTL model checking for process rewrite systems Lur Bozzelli Mojmír Křetínský Vojtěch Řehák Jn Strejček Received:

More information

Solving BAMO Problems

Solving BAMO Problems Solving BAMO Problems Tom Dvis tomrdvis@erthlink.net http://www.geometer.org/mthcircles Februry 20, 2000 Abstrct Strtegies for solving problems in the BAMO contest (the By Are Mthemticl Olympid). Only

More information

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza Automt theory An lgorithmic pproch 0 Lecture Notes Jvier Esprz My 3, 2016 2 3 Plese red this! Mny yers go I don t wnt to sy how mny, it s depressing I tught course on the utomt-theoretic pproch to model

More information

MODULE 3. 0, y = 0 for all y

MODULE 3. 0, y = 0 for all y Topics: Inner products MOULE 3 The inner product of two vectors: The inner product of two vectors x, y V, denoted by x, y is (in generl) complex vlued function which hs the following four properties: i)

More information

5 a LAN 6 a gateway 7 a modem

5 a LAN 6 a gateway 7 a modem STARTER With the help of this digrm, try to descrie the function of these components of typicl network system: 1 file server 2 ridge 3 router 4 ckone 5 LAN 6 gtewy 7 modem Another Novell LAN Router Internet

More information

Warm-up for Differential Calculus

Warm-up for Differential Calculus Summer Assignment Wrm-up for Differentil Clculus Who should complete this pcket? Students who hve completed Functions or Honors Functions nd will be tking Differentil Clculus in the fll of 015. Due Dte:

More information

Data Compression. Lossless And Lossy Compression

Data Compression. Lossless And Lossy Compression Dt Compression Reduce the size of dt. ƒ Reduces storge spce nd hence storge cost. Compression rtio = originl dt size/compressed dt size ƒ Reduces time to retrieve nd trnsmit dt. Lossless And Lossy Compression

More information

Lectures 8 and 9 1 Rectangular waveguides

Lectures 8 and 9 1 Rectangular waveguides 1 Lectures 8 nd 9 1 Rectngulr wveguides y b x z Consider rectngulr wveguide with 0 < x b. There re two types of wves in hollow wveguide with only one conductor; Trnsverse electric wves

More information

Lecture 5. Inner Product

Lecture 5. Inner Product Lecture 5 Inner Product Let us strt with the following problem. Given point P R nd line L R, how cn we find the point on the line closest to P? Answer: Drw line segment from P meeting the line in right

More information

New Internet Radio Feature

New Internet Radio Feature XXXXX XXXXX XXXXX /XW-SMA3/XW-SMA4 New Internet Rdio Feture EN This wireless speker hs een designed to llow you to enjoy Pndor*/Internet Rdio. In order to ply Pndor/Internet Rdio, however, it my e necessry

More information

1. Definition, Basic concepts, Types 2. Addition and Subtraction of Matrices 3. Scalar Multiplication 4. Assignment and answer key 5.

1. Definition, Basic concepts, Types 2. Addition and Subtraction of Matrices 3. Scalar Multiplication 4. Assignment and answer key 5. . Definition, Bsi onepts, Types. Addition nd Sutrtion of Mtries. Slr Multiplition. Assignment nd nswer key. Mtrix Multiplition. Assignment nd nswer key. Determinnt x x (digonl, minors, properties) summry

More information

Rotating DC Motors Part II

Rotating DC Motors Part II Rotting Motors rt II II.1 Motor Equivlent Circuit The next step in our consiertion of motors is to evelop n equivlent circuit which cn be use to better unerstn motor opertion. The rmtures in rel motors

More information

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator AP Clculus Finl Review Sheet When you see the words. This is wht you think of doing. Find the zeros Find roots. Set function =, fctor or use qudrtic eqution if qudrtic, grph to find zeros on clcultor.

More information

Angles 2.1. Exercise 2.1... Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example

Angles 2.1. Exercise 2.1... Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example 2.1 Angles Reognise lternte n orresponing ngles Key wors prllel lternte orresponing vertilly opposite Rememer, prllel lines re stright lines whih never meet or ross. The rrows show tht the lines re prllel

More information

Object Semantics. 6.170 Lecture 2

Object Semantics. 6.170 Lecture 2 Object Semntics 6.170 Lecture 2 The objectives of this lecture re to: to help you become fmilir with the bsic runtime mechnism common to ll object-oriented lnguges (but with prticulr focus on Jv): vribles,

More information

All pay auctions with certain and uncertain prizes a comment

All pay auctions with certain and uncertain prizes a comment CENTER FOR RESEARC IN ECONOMICS AND MANAGEMENT CREAM Publiction No. 1-2015 All py uctions with certin nd uncertin prizes comment Christin Riis All py uctions with certin nd uncertin prizes comment Christin

More information

2005-06 Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

2005-06 Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration Source: http://www.mth.cuhk.edu.hk/~mt26/mt26b/notes/notes3.pdf 25-6 Second Term MAT26B 1 Supplementry Notes 3 Interchnge of Differentition nd Integrtion The theme of this course is bout vrious limiting

More information

Novel Methods of Generating Self-Invertible Matrix for Hill Cipher Algorithm

Novel Methods of Generating Self-Invertible Matrix for Hill Cipher Algorithm Bibhudendr chry, Girij Snkr Rth, Srt Kumr Ptr, nd Sroj Kumr Pnigrhy Novel Methods of Generting Self-Invertible Mtrix for Hill Cipher lgorithm Bibhudendr chry Deprtment of Electronics & Communiction Engineering

More information