PESIT SOUTHCAMPUS QUESTION BANK. Chapter 1 & 2 : Introduction to theory of computation and finite automata

Size: px
Start display at page:

Download "PESIT SOUTHCAMPUS QUESTION BANK. Chapter 1 & 2 : Introduction to theory of computation and finite automata"

Transcription

1 QUESTION BANK Fculty: Mr. Krthik S Totl Hours: 52 Chpter 1 & 2 : Introduction to theory of computtion nd finite utomt 1 Define lnguge ccepted by DFA 2 2 Define regulr lnguge 2 3 Give the forml definition of NFA 2 4 Define extended trnsition function for NFA 2 5 Define lnguge ccepted by NFA 2 6 Define ded configurtion in cse of NFA 2 7 Wht re the dvntges of non-deterministic FA 2 8 Give the forml definition of NFA 2* 9 Define the terms prefix nd suffix of string, productions, Sentententil form. 4* 10 Compre NFA & DFA 4* 11 Define the terms lphbet, string,prefix, suffix, lnguge give exmples to ech. 5* 12 Define n utomt for seril binry dder 5* 13 Define cceptors & trnsducers Write note on pplictions of forml lnguges nd utomt Explin the opertion of Deterministic Finite Acceptor (DFA) with digrm Distinguish between NFA & DFA Define the equivlence between two finite cceptors? 5 18 Define distinguishble nd indistinguishble sttes Derive the DFA tht ccepts the lnguge L = { n b : n >= 0 } 5* 20 Find the DFA tht recognizes the set of ll string on Σ={,b} strting with the 5* prefix b 21 Find the DFA tht ccepts ll strings on lphbet {0,1} except those contining 5* substring Give the procedure to reduce number of sttes in DFA. 5* 23 Give Nondeterministic finite Automt ccepting the following Lnguge 5 The set of strings in (0+1)* such tht some two 0 s re seprted by string whose length is 4i, for some i >=0. 24 Give description bout FA with empty moves 5 25 Construct DFA for the set of ll strings beginning with 1 which interpreted s the 5 binry representtion of n integer, is congruent to zero modulo 5 26 Construct DFA ccepting the following lnguge The set of ll strings such tht the 5 10 th symbol from the right end is Explin different units of utomt. Explin the terms 8 1) Configurtion 2) Move 3) Trnsition functions Show tht the lnguge L = { w : w {,b} * } is regulr? Also show tht L 2 is regulr? 28 Construct DFA & NFA to ccept ll string in {,b} such tht every hs one b 8 immeditely to its right? 29 Define: ) Symbol or element b) Alphbet(Σ) c) String(w,u,v) d) Conctention of strings e) Reverse of string f) length of string g) substring, prefix, suffix of 8 string g) w n h) Σ * i) Σ +

2 30 Define the lnguge ccepted by DFA, when is the lnguge clled regulr. Show tht the lnguge L= {w :w {,b}*} is regulr. 31 Drw NFA for trnsition tble given below: Sttes Input A B Q0 {q2} {q0,q1} Q1 Q0 {q1} Q2 - {q0,q1} 8* 8* 32 Define ) Lnguge (L) b) Sentence c) Complement(L ) d) L R e) L1.L2 f) L n 10 g) L * h) L 33 Give the forml definition of DFA? Explin trnsition grph? Give n exmple? 10 Define extended trnsition function ( δ * )? Define trnsition tble? Drw the trnsition tble, trnsition digrm, trnsition function of DFA ) which ccepts strings which hve odd number of s nd b s over the lphbet {,b} b) which ccepts string which hve even number of s nd b s over the lphbet {,b} c) which ccepts ll strings ending in 00 over lphbet {0,1} d) which ccepts ll strings hving 3 consecutive zeros e) which ccepts ll strings hving 5 consecutive ones f) which ccepts ll strings hving even number of symbols? 34 Give DFA & NFA which ccept the lnguge { (10) n : n 0 } Prove the equivlence between DFA & NFA OR 10 Let L be the lnguge ccepted by NFA M N = ( Q N,Σ,δ N,Q N,F N ). Then prove tht there exists deterministic finite cceptor M D = ( Q D,Σ,δ D,Q D,F D ) such tht L = L(M D ). 36 Define grmmr, proof techniques, lnguge. 7* 37 Convert the following NFA to DFA 10* b q0 q1 λ q2 ii) 0 1 q0 0,1 q1 0,1 q2

3 1) Reduce the number of sttes in DFA 0,1 0 q1 1 q3 Q0 0 1 q2 1 q4 q5 0, Chpter 3 & 4 : Regulr Expressions nd lnguges, Properties of Regulr Lnguges. 1 Give the forml definition of regulr expression with exmple. 2 2 Define liner grmmr. 2 3 Define unit production. 2 4 Define regulr grmmr with exmple. 2 5 How is lnguge L( R ) denoted by regulr expression R defined? Give 5 exmples. 6 Find ll strings in L ((+b)*b(+b)*) of length less thn four 5* 7 Show tht the utomton generted by procedure reduce is deterministic 5* 8 Write the NFA which ccepts L( r ) where r = ( + bb) * (b * + λ ) 5* 9 Prove tht Lnguge generted by right liner grmmr is regulr lnguge 5* 10 Define regulr expression,give regulr expression for L={ n b m : n 4, m 3} 5* 11 Show tht fmily of regulr lnguges re closed under intersection. 5* 12 Define homomorphism nd homomorphic imge. Let ={,b} nd ={,b,c} 5* nd h is defined by h() =b,h(b) =bbc,if w=b wht is h(w)? nd if L={,b}, wht is h(l)? 13 Define Regulr expression nd lnguge denoted by ny regulr expression 4* 14 Find Regulr expression for the lnguge L ={w {0,1}* : w hs no pirs of 6* Consecutive zeros. 15 Prove the following identities for regulr expression r,s nd t here r=s mens 6 L(r)=L(s) r+s=s+r, (rs)t=r(st),(r+s)t=rt+st 16 Prove or disprove the following for regulr expressions r,s,nd t 6

4 (rs+r)r=r(sr+r)* 17 Prove tht clss of Regulr sets is closed under quotient with rbitrry sets 6 18 Prove tht the clss of regulr sets is closed under Substitution 6 19 Prove tht The clss of Regulr sets is closed under homomorphism nd inverse 6 homomorphism 20 Find the NFA tht ccepts the lnguge L{b*+bb*b) 5* 21 Construct right nd left liner grmmr for the lnguge L ={ n b m :n 2,m 7* 3 22 Let L1= L(*b*) nd L2= L(b*) find L1/L2 8* 23 Give the set nottion of lnguge L( R ) denoted by regulr expressions given 8* below. ) *. ( + b ) b) (+b) * (+bb) c) () * (bb) * b Prove the following: If the sttes q nd qb re indistinguishble, nd if qc nd q n n r distinguishble, then qb,qc must be indistinguishble. 24 Let r be regulr expression. Then prove tht there is some NFA tht ccepts L( 8 r ) & hence L( r ) is regulr lnguge. 25 Let L be regulr lnguge i.e., there is NFA tht ccepts L. Then prove tht 8* there exists regulr expression r such tht L = L( R ) 26 Explin generlized trnsition grphs & how they re used for writing regulr 8 expression denoting sme lnguge s given NFA. 27 Construct the finite utomton tht ccepts the lnguge generted by grmmr 8* ( { V0,V1 }, {,b}, {V0}, { V0 V1, V1 bv0 b } ) 28 P.T. A lnguge L is regulr if nd only if there exists left liner grmmr G 8 such tht L = L(G) 29 P.T. A lnguge L is regulr if nd only if there exists regulr grmmr G such 8 tht L=L(G) 30 Let h be homomorphism & L regulr lnguge. Then prove tht 8 homomorphic imge h(l) is lso regulr. 31 Prove tht The set L={0 i2 }I is n integer, I>=1 } which consists of ll strings of 8 0 s whose length is perfect squre,is not regulr 32 Wht re the Applictions of Pumping Lemm 8 33 Wht re Decision Algorithms for Regulr sets 8 34 Define Emptiness, Finiteness,nd Infiniteness, Equivlence 8 35 Let L be ny subset of 0*.Prove tht L* is Regulr Show tht r=(1+01)*( 0+1*) denotes the lnguge L={w {0,1)*: w hs no 10* pir of consecutive zeros) find the other two expressions. 37 Give the set nd explin in English the sets denoted by following regulr 10* expressions. ) (11+0) (00+1) b) ( )(0+00) c) (0+1)00(0+1) d) e) Denote the regulr lnguges defined by the following grmmr s regulr expressions. ) G1 = ( { S }, {,b}, S, { S bs } ) b) G2 = ( { S,S1,S2},{,b},S,{ S S1b, S1 S1b S2, 10

5 S2 } ) 39 Show tht the fmily of regulr lnguges is closed under following opertions ) union b)intersection c)conctention d)complementtion e) strclosure f) difference g) reversl Is the Clss of Regulr sets closed under infinite union Wht is the reltionship between the clss of regulr sets nd the lest clss of 10 lnguges closed under union, intersection nd complement Contining ll finite sets 42 Give finite utomton construction to prove tht clss of regulr sets is closed 10 under substitution 43 Prove tht if two finite utomt re equivlent they ccept the sme lnguge Let L be the set of strings of 0 s nd 1 s beginning with 1 whose vlue treted s 10 binry number is prime,prove tht L is not regulr. 45 Wht re the properties of Regulr sets nd prove tht given L is not regulr with 10 n exmple 46 Wht re the closure properties of Regulr sets 10* 47 Write NFA & right liner grmmr for L(b*) 10* Given stndrd representtion of ny regulr lnguge L on Σ ) Prove tht there exists n lgorithm for determining whether or not ny w Σ * is in L b) Prove tht there exists n lgorithm for determining whether L is empty, finite or infinite. 48 Prove tht the lnguge L = { n b n : n 0 } is not regulr using pigeonhole 10* principle. Stte nd prove pumping lemm for regulr lnguges? Wht is the ppliction of pumping lemm. 49 Using pumping lemm, prove tht following lnguges re not regulr :- ) L = { n b n : n 0 } b) L = { ww r : w Σ * } Σ = {,b} c) L = { w Σ * : n (w) < n b (w) } Σ = {,b } d) L = { (b) n k : n > k, k 0 } 10 e) L = { n! : n 0 } f) L = { n b k c n+k : n 0, k 0 } g) L = { n b l : n l } 50 Define regulr expression. Construct n NFA for the L((+b)*bb) 6* 51 Show tht if L is regulr lnguge on lphbet then there exists right liner 8* grmmr G = (V,, S, P) such tht L=L(G). 52 Given the below NFA, write the corresponding regulr expression using generlized trnsition grphs. 10* b b,b Q0 b Q2

6 Chpter 5 : Context free Grmmrs And Lnguges 1 Define mbiguous CFG. 2 2 Define CFG nd Wht re its dvntges 5 3 Define simple grmmr or s-grmmr? Wht re its pplictions? 5 4 Define leftmost nd rightmost derivtion with exmple. 5 5 Define derivtion tree, prtil derivtion tree, yield. 5 6 Explin dependency grph & its pplictions in CFG. 5 7 Write the regulr expression for ll pscl rel numbers. 5 8 Explin exhustive serch prsing? Wht is the serious flw in using exhustive 5 serch prsing? 10 Prove the substitution rule of context free grmmr? 5 11 Find the regulr expression for pscl sets whose elements re integer numbers Let L1=L(*b*) nd L2=L(b*).find L1/L Define inherently mbiguous lnguge nd give n exmple? 5 14 Wht re CFG s Give CFG for the lnguge L= { n b2 n n>0} 5* 15 Given the grmmr G s follows: 6* S AS, A sba SS b Find the left most nd right most derivtion prse tree for the string bb. 16 Show tht the grmmr given below is mbiguous 6* E E+E/E*E/(E)/I,I /b/c 17 Wht re the pplictions of CFG 6* 18 Give CFG generting the following set tht is the set of plindromes over 5 lphbet{,b} 19 Give CFG for the set of ll strings of blnced prenthesis, ech left prenthesis 5 hs mtching right prenthesis nd pirs of mtching prenthesis re properly nested 20 Define context free grmmrs formlly. Give some exmples. 5* 21 Let G be the grmmr S->S SbS prove tht L(G)={x ech prefix of x hs tlest s mny s nd b s} 5 22 Write CFG which genertes the following CFL s L(G) = { ww r : w Σ * } Σ = { 8,b} ) L(G) = { b(bb) n bb(b) n : n 0 } b) L = { n b m : n m } c) L = { w {, b } * : n (w) = n b (w) nd n (v) n b (v) where v is ny prefix of w } d) L = { 2n b m : n 0 m 0 } 23 Let G = ( V,T,S,P) be CFG. Then prove tht for every w L(G), there exists 8* derivtion tree of G whose yield is w. 24 Prove tht yield of ny derivtion tree is in L(G), where G is CFG If L is regulr lnguge,prove tht the lnguge { uv:u L, v L R Is lso regulr 26 Find DFA s tht ccepts the following lnguges. ) L(*+b*b*) b) L(b(+b)*(+)) c) L((bb)* + (* +b)*) d) L((+b)*(+b)*)) 27 Construct prse tree for the following grmmr S-> As A->SbA SS b 28 Let G=(V,T,P,S)be CFG,then S=> if nd only if there is derivtion tree in 8*

7 grmmr G with yield 30 Construct Leftmost nd Right most derivtion tree for the following grmmr 8* S=>AS=>SbAS=>bAS=>bbS=>bb 31 Wht re mbiguous grmmr nd inherently mbiguous grmmrwith n 10* exmple 32 The grmmr E->E+E E*E (E) id genertes the set of rithmetic expressions with 10 +,*,Prentheses nd id.construct n equivlent unmbiguous grmmr. 33 Show tht every CFL without is generted by CFG ll of whose productions re 10* of the form A->, A->B nd A->BC 34 Show tht every CFL without generted by CFG ll of whose productions re of 10 the form A-> nd A->b 35 Let G be the grmmr 10 S->B ba, A-> S baa,b->b bs BB for the string bbbbb find leftmost nd right most derivtion prse tree 36 Is the grmmr given in q(42) is unmbiguous if it is prove it Wht re liner grmmr show tht if ll productions of CFG re of the form A- 10 >wb or A-w then L(G) is regulrs et 38 Cn every CFL without be generted by CFG ll of whose productions re of 10 the forms A->BCD nd A-> 39 Construct CFG for the set of ll strings over the lphbet {,b} with exctly twice 10 s mny s nd b s. 40 Given the grmmr G s follows S->AS A->sbA SS b find Leftmost derivtion 10 rightmost derivtion nd prse tree 41 Wht re CFG s Give CFG for the Lnguge L={ n b 2n n>0} Define CFG Construct CFG for the following Lnguge with n>=0,m>=0 10 L={ n b m c k :n+2m=k} 43 Define CFG Construct CFG for the following Lnguge with n>=0,m>=0 10 L={ n WW R b n : W {,b}*} 44 Show tht fmily of CFL is closed under union, conctention nd str closure Show tht the lnguge L= { n b n c n n 1} is not CFL 10 Chpter 6 : Pushdown utomt nd properties of CFL 1 Define the instntneous description of NPDA 5 2 Give the forml definition of DPDA nd deterministic CFL. 5 3 Define Liner Context free grmmr nd write the Pumping lemm for Liner 5* Lnguges. 4 Distinguish between DPDA nd NPDA 5* 5 Wht re the demerits of regulr lnguges when compred to context free 5 lnguges 6 Wht re the demerits of DFA (or NFA) when compred with PDA 5 7 Why FAs re less powerful thn the PDA s 5 8 How the Trnsition /move of PDA defined 5 9 Stte nd prove pumping lemm for CFL? Wht is its ppliction? Give two resons why finite utomt cnnot be used to recognize ll CFL & why 8 PDA is required for tht purpose 11 Explin the opertions of NPDA with digrm? 8 12 Write NPDA tht ccepts the lnguge L = { n b n : n 0 } U { } 8* 13 When do we sy CFL is ccepted by NPDA. Define ) cceptnce by finl stte. 8

8 b) Acceptnce by empty stck. 14 Define PDA Describe the cceptnce by finl Stte nd cceptnce by empty 8* Stck 15 Wht does ech of the following trnsitions represent? 8. δ(p,,z)=((q,z) b. δ(p,,z)=(q, ) c. δ(p,,z)=(q,r) d. δ(p,,z)=(q,r) e. δ(p,, )=(q,z) f. δ(p,,z)=(q, ) 16 Give the forml definition of NPDA. Explin clerly the trnsition function? 8 17 If L is CFL, then there exists Pd M such tht L= N(M) 8 18 If L is N(M1) for some PDA M1,then L is L(M2) for some PDA M If L is L(M2) for some PDA M2,then L is N(M1) for some PDA M When the PDA is Deterministic nd when it is clled nondeterministic 8 21 Is the PDA to ccept the Lnguge L(M)={wCW R W (=b)*} is deterministic Construct NPDA for the following lnguges 10* ) L = { w {,b} * : n (w) = n b (w) } b) L = { ww r : w {,b} + } 23 Show tht the lnguge L = { n b n : n 0 n 100 } is context free Prove tht for ny CFL L(specified s CFG without λ productions), there exists 10* NPDA M such tht L = L(M). 25 Obtin PDA to ccept the lnguge L(M)={W W (+b)* nd n(w)=nb(w) i.e the number of s in string w should be equl to number of b s in w 26 Wht is n instntneous description? Explin with respect to PDA 8 27 Construct NPDA tht ccepts the lnguge generted by grmmr with 10* productions ) S A b) S Abc bb c) B b d) C c 28 Obtin PDA to ccept the Lnguge L*(M)={wCw R W (+b)*}where W R is 10 reverse of W. Show the sequence of moves mde by the PDA for the string bcb,bcbb 29 If L = L(M) for some NPDA M, then prove tht L is CFL. 10* 30 Write the CFG for lnguge ccepted by NPDA whose trnsitions re given below :- 10* δ(q0,,z) ={ (q0,az) } δ(q0,,a) ={ ( q0,a) } δ(q0,b,a) ={ ( q1,λ ) } δ(q1,λ,z) = { (q2,λ) } 31 Obtin PDA to ccept string of blnced Prentheses. The prentheses to be 10 considered re(,),[,],{ nd } 32 Show tht following lnguges re not context free using pumping lemm 10 ) L = { n b n c n : n 0 } b) L = { ww : w {,b } * } c) L = { n! : n 0 } d) L = { n b j : n = j 2 } Define liner CFL. Stte pumping lemm for Liner CFL. 33 Obtin PDA to ccept the Lnguge L={w w (,b)* nd n(w) > nb(w)} 10

9 34 Construct n npd tht ccepts the lnguge generted by the grmmr S->ABB AA A->BB B->bBB A 10* 35 Construct the NPDA Corresponding to the grmmr 10* S A, A ABC bb, B b, C c. Derive the string for the grmmr nd show the sequence of moves mde by NPDA in Processing the sme string 36 Show tht lnguge L = { w : n (w) = n b (w) } is not liner. 10* 37 Design PDA for the lnguge L={ n b n n 0} give the trce for the input bbb 12* 38 Define n NPDA.Discuss bout the lnguge ccepted by Push down utomt. 12* Design n NPDA for the Lnguge L={W: n(w)=nb(w)+1} 39 Construct n NPDA tht ccepts the Lnguge ccepted by the grmmr S->A,A- 12* >ABC/bB/, B->b,C->c 40 Design PDA for the following lnguge L={ n b n n>=0}.give the trce for the 12* input bbb 41 Construct n NPDA Corresponding to the grmmr 12* S->A A->ABC bb B->b C->c 42 Obtin NPDA for the lnguge L={wwR : w in (0+1)*} 12* Show tht ccessible instntneous description for the string Construct the PDA equivlent to the following grmmr 12* S->AA,A->S bs 44 Show tht if L is CFL, then there is PDA M ccepting L by finl stte such tht 12 M hs t most two sttes nd mkes no moves 45 If L is N(M) for some PDA M, then L is Context-free Lnguge For the Grmmr 12 S-> ABB AA A->BB B->bBB A C-> Obtin the Corresponding PDA 47 For the grmmr 12 S-> ABC A->B B->bA b C-> Obtin the Corresponding PDA 48 Wht is the Procedure to convert CFG to PDA Wht is ppliction of GNF nottion of CFG? Is the PDA to ccept the lnguge 12 consisting of blnced prentheses is deterministic 50 Wht is the generl procedure used to convert from PDA to CFG 12 Chpter 7: Properties of Context-Free Lnguges. 1 Wht is norml form & why is it required? 4 2 Explin the method of Substitution with exmples 4 3 Wht is Left Recursion? How it cn be Eliminted 4 4 Wht is the need for simplifying Grmmr 4 5 Define CNF of CFG. 6 6 Convert the following CFG into CNF 6

10 S ba B A baa S B BB bs b 7 Eliminte Left Recursion from the following grmmr 6 E->E+T T T->T*F F F->(E) id 8 Eliminte Left Recursion from the following Grmmr 6 S->Ab A->Ab S 9 Is the following Grmmr mbiguous 6 S->Sb SS 10 Define greibch norml form convert the following grmmr 6* S Abb, A A B, B bab into the Greibch norml form 11 Convert the grmmr with productions S Ab, A b B Ac to 8 CNF. 12 Obtin the following grmmr in CNF 8 S->A B C A->B B->A C->cCD D->bd 13 Obtin the following grmmr in GNF 8 S->A B C A->B B->A C->cCD D->bd 14 Define CNF nd GNF Convert the following grmmr to CNF 10* S S [s S] p q (S being the only vrible. 15 Prove the fmily of CFL s re not closed under intersection nd 10* Complementtion 16 Wht re mbiguous grmmrs nd inherently mbiguous 10* grmmrs, give n exmple for ech 17 Prove tht fmily of CFL is closed under union, conctention nd 10 str closure. 18 Prove tht fmily of CFL is not closed under intersection nd 10 complementtion. 19 Let L1 be CFL nd L2 be regulr lnguge. Then prove tht L1 10* INTERSECTION L2 is context free. 20 Show tht the lnguge L = { w {,b,c} * : n (w) = n b (w) = n c (w) 10 } is not context free Wht is CNF nd GNF form Explin with n Exmple? Prove tht for every CFG we cn hve n equivlent grmmr using 10 CNF nottions where lnguge does not contin 24 Wht is the generl Procedure to convert grmmr into its 10 equivlent GNF nottion 25 Convert the following grmmr into GNF S->AB1 0 A->00A B B->1A1 10

11 26 Convert the following grmmr into GNF 10 A->BC B->CA b C->AB 27 Stte nd prove Pumping Lemm for Context free Lnguges Wht re the Applictions of pumping Lemm Show tht L={ n b n c n n>=0} is not Context free Prove tht CFLs re not closed under intersection nd 10 Complementtion 31 Prove tht CFL s re closed under Union, Conctention, nd str 10 closure 32 Show tht L= {Ww W {, b}*} is not Context free Show tht L= { p b q p=q 2 } is not context free Show tht L={n! n>=0} is not Context free 10 Chpter 8 : Introduction to Turing mchines 1 Define computtions of TM? 5 2 Explin with digrm the opertion of Turing mchines? Give forml definition of 5* Turing mchine. 3 Explin wht is ment by instntneous description of TM? 5 4 For Σ = {,b} design TM tht ccepts L = { n b n : n 1 } 5* 5 Design TM tht ccepts L = { n b n c n : n 1 } 5* 6 Define lnguge ccepted by TM? 5 7 When do we sy tht lnguge is not ccepted by TM? 5* 8 Define formlly non-deterministic TM. 5 9 On wht bsis we sy tht TM is trnsducer 5 10 Define the opertion of TM s trnsducers? Define Turing computble function? 5 11 Wht is Turing Computble 5 12 Write note on multidimensionl TM Write note on universl TM Obtin Turing mchine to ccept the lnguge L={0 n 1 n n>=1} 8 15 Obtin Turing mchine to ccept the lnguge L(M)={0 n 1 n 2 n n>=1} 8 16 Obtin Turing mchine to ccept the lnguge L={W w (0+1)*} contining the 8 sub string Obtin TM to ccept the lnguge contining strings of 0 s nd s ending with Give n exmple of TM tht never hlts i.e., tht goes to infinite loop? How is 8 tht represented in instntneous description? 19 Given two positive integers x nd y, design TM tht computes x+y 8 20 Design TM tht copies strings of 1 s 8 21 Design Turing mchine tht hlts t finl stte if x y nd t non-finl stte if 8 x<y 22 Design TM tht computes the function 8 x + y if x y F(x,y) = 0 if x<y 23 Design TM to implement the mcro instruction 8 If Then qj Else qk

12 24 Design TM tht multiplies two +ve integers in unry nottion 8 25 Write note on Turing Thesis. Define lgorithm in terms of TM Define equivlence of utomt? Demonstrte the equivlence of TM using 8 simultion. 27 Obtin TM to ccept plindrome consisting of s nd b's of ny length 8 28 Let x nd y re two Positive integers.obtin Turing mchine to perform x+y 8 29 Given string w design TM tht genertes the string ww where w Define TM with sty on option. Prove tht they re equivlent to clss of stndrd 8 TM? 31 Prove tht clss of deterministic TM & clss of non-deterministic TM re equivlent Explin wht do you men by countble, uncountble sets nd enumertion 8* procedure? 33 Prove tht set of ll TM, lthough infinite is countble 8 34 Define liner bounded utomt(lba)? When do we sy tht string is ccepted 8* by LBA? 35 Find LBA tht ccepts the lnguge L = { n! : n 0 } 10 * 36 Define TM with semi-infinite tpe & prove tht they re equivlent to clss of 10 stndrd Turing mchine. 37 Define offline TM & prove tht they re equivlent to clss of stndrd TM. 10 * 38 Construct TM tht stys in the finl stte qf whenever x>=y nd non-finl stte 12 qn whenever x<y where x nd y re positive integers represented in unry nottion 39 Wht re the vrious vritions of TM? How to chieve complex tsks using TM Prove tht if Lnguge is ccepted by multitpe Turing mchine, it is ccepted 12 by single tpe Turing mchine 41 Wht re the different techniques for construction of Turing mchine Wht re nondeterministic nd multidimensionl Turing mchine Design Turing mchine to compute log2n Design Turing mchine to compute n! Design Turing mchine to compute n Define Turing Mchine,Give Turing Mchine to implement,the totl recursive function 15 * multipliction. The Turing mchine strts with O m O n on its tpe nd ends with O mn surrounded by blnks 47 Wht is multi-tpe Turing mchine? Show how it cn be simulted using single tpe Turing mchine Write short notes on: Hlting Problem of Turing Mchine Appliction of CFG Multi Tpe Turing Mchine Post-Correspondence Problem 49 Write short notes on: Context Sensitive Grmmr & Lnguges Chomsky Hierrchy Pumping Lemm for Regulr Lnguges Post Correspondence Problem 50 Define the following Turing mchine with sty option Turing mchine with multiple trcks Turing mchine with semi-infinite tpe 20 * 20 * 20

13 Off-line Turing mchine Chpter 9 : Undecidbility. 1 Define unrestricted grmmr. 2 2 Explin wht is Undecidbility 5 3 Define recursively enumerble lnguge & recursive lnguge? 5 4 Define computbility nd decidbility 5 5 Wht re Recursive nd Recursively Enumerble Lnguges 5 6 Wht is the need for reducing one undecidble problem to other? 5 7 Define Vlid nd Invlid Computtion of TM's 5 8 Discuss the properties of Recursive Enumerble Lnguges 5 9 Discuss the Properties of Recursively Enumerble Lnguges 5 10 Wht is the modified version of PCP 5 11 Wht re Universl Turing Mchines 5 12 Define Non recursively enumerble Lnguge 5 13 Define Universl Lnguge 5 14 Give convincing rguments tht ny lnguge ccepted by n off line Turing 8 mchine is lso ccepted by some stndrd mchine. 15 Prove tht Lnguge Lu is Recursively Enumerble 8 16 Let S be n infinite countble set. Then prove tht its power set 2 S is not 8* countble. 17 Discuss on Rice s Theorem nd Undecidble Problems 8 18 Prove tht Lnguge Lu is not Recursive 8 19 Discuss the properties of R.E sets which re not r.e 8 20 Discuss Rice s theorem for Recursive index sets 8 21 Discuss the problems bout Turing Mchine 8 22 If PCP were decidble, then MPCP would be decidble tht is MPCP reduces to PCP 8 23 Discuss the properties of R.E sets which re R.E 8 24 Wht is the Undecidbility of PCP 8 25 Discuss the Appliction of PCP 8 26 Prove tht PCP is Undecidble 8 27 Wht is the Undecidbility of Post Correspondence Problem 8 28 Prove tht lnguge generted by n unrestricted grmmr is recursively 8 enumerble. 29 Discuss the Rice s theorem for recursively enumerble index sets 8 30 Give the procedure for writing n unrestricted grmmr which ccepts the 8* lnguge ccepted by given TM. 31 Prove tht for every recursively enumerble lnguge L there exists n unrestricted 8*

14 grmmr G such tht L = L(G). 32 Prove tht The Complement of Recursive Lnguge is Recursive 8 33 Prove tht The union of two recursive Lnguge is Recursive 8 34 Prove tht The Union of two recursively enumerble Lnguges is recursively 8 enumerble 35 Write note on Chomsky Hierrchy 8 36 If Lnguge L nd its complement re both recursively enumerble then l nd its 8 complement is recursive 37 Explin stte entry problem & blnk tpe hlting problem. How cn hlting 8 problem be reduced to bove problems? 38 Define context sensitive grmmr? Why it is clled non-contrcting? Define 10 context sensitive lnguge? 39 Wht is ment by Hlting problem of Turing mchine? Explin the blnk tpe 10 hlting problem 40 Write detiled note on The Chomsky hierrchy, Liner bounded utomt, Post 10 Correspondence Problem 41 Write CSG for lnguge L = { n b n c n : n 1 } 10* 42 For every CSL not including λ, prove tht there exists some liner bounded 10 utomton M such L = L(M). Prove the the converse lso 43 Prove tht 1) Every CSL L is recursive. 2) There exists recursive lnguge tht is 10 not context sensitive. 44 Prove tht it is Undecidble for rbitrry CFG s G1 nd G2 whether 10 L(G1)intersection L(G2) is empty. 45 Define & Explin TM hlting problem? Prove tht hlting problem is undecidble? Prove tht it is undecidble for ny rbitrry CFG G whether L(G)= * Wht re the Applictions of Greibch s theorem A Turing mchine is one tht cnnot chnge non blnk symbol to blnk. Which 10 cn be chieved by restriction tht δ(qi,)=(qi,,l or R). Then must be.show tht no generlity is lost by mking such restriction. 49 Write short notes on: 20* ) Appliction of Finite Automt b) Liner Bounded utomt c) Turing Mchine Hlting Problem d) Chomsky Hierrchy. 50 Prove tht It is undecidble for rbitrry CFG s G1 nd G2 whether Complement L(G1) is CFL nd L(G1) intersection L(G2) is CFL Write short notes on the following: ) Chomsky hierrchy b) Unrestricted grmmr c) Post correspondence problem d) Liner bounded utomt 4*5 =20 * ASSIGNMENT 1 1. Consider the given NFA nd check whether the strings w=01001 nd v= re ccepted or not. Sttes 0 1

15 q 0 q 1 *q 2 q 3 *q 4 {q 0, q 3 } Ø {q 2 } {q 4 } {q 4 } {q 0, q 1 } {q 2 } {q 2 } Ø {q 4 } 2. Convert the following NFA to its equivlent DFA. Sttes 0 1 p {p, q} {p} q r *s {r} {s} {s} {r} Ø {s} 3. Construct NFA ccepting the strings over = {, b} nd ending in b. Use it to construct DFA ccepting the sme set of strings. 4. Construct DFA tht will ccept strings on = {, b} where the number of b s divisible by 3.Check whether the string bbbbbb is ccepted or not. 5. Construct DFA equivlent to the NFA N=({p,q,r,s},{0,1},δ, p,{ q,s}), δ defined s Sttes 0 1 p {q, s} {q} *q r *s {r} {s} Ø {q,r} {p} {p} 6. Construct NFA trnsition digrm nd its equivlent DFA for M = ({q o,q 1, q 2 },{,b}, δ, q o,{q 2 }) where δ(q o,)= {q o,q 1 }, δ(q o,b)= {q 2 }, δ(q 1,)= {q o }, δ(q 1,b)= {q 1 }, δ(q 2,)= Ø, δ(q 2,b)= {q o,q 1 }. 7. Convert the given NFA with move to its equivlent DFA. Strt q 0 q 1 0 q 3 1 q 4 q 2 1

16 8. Convert the NFA with moves to NFA without moves. Strt p b q c b r 9. (i)convert NFA with moves to NFA without moves. (ii) Convert the -NFA to DFA Strt q 0 q 1 q Find the -closure for ll the sttes in the following -NFA. Strt b q 0 q 1 q 2 q Construct DFA tht ccepts ll the strings on Σ = {0,1} except those contining the substring Construct DFA hving set of ll strings over the lphbet Σ = {,b}whose lst two symbols re the sme. 13. Construct n equivlent DFA for the following NFA. 0,1 0 q 1 0,1 q 4 q 5 q 6 q 7 b q 8 q 9

17 Strt q 0 q q Construct n equivlent DFA for the following NFA. Strt q 0 b q 1 b q Construct n equivlent NFA without moves. b Strt q 0 q 1 q 2,b q 3 q Construct DFA for the following NFA. Let M=({q 0, q 1 }, {0,1},δ, q 0, {q 1 }) where δ(q 0,0)={q 0, q 1 }, δ(q 0,1)={q 1 }, δ(q 1,0)= Ø, δ(q 1,1)={q 0,q 1 }. 17. Construct DFA hving even no. of b s where Σ = {,b}. 18. Convert the the following NFA s to DFA s. p *q r *s *t 0 1 {p, q} {p} {r,s} {t} {p,r} {t} Ø Ø Ø Ø 19. Construct finite utomt tht ccepts the set of ll strings in {,b,c}* such tht the lst symbol in input string ppers erlier in the string.

18 ASSIGNMENT 2 1. Construct NFA equivlent to the regulr expression ((10)+(0+1))* Convert the following DFA to regulr expression. Strt 0 1 q 1 q 2 q 3 3. Construct the trnsition digrm of finite utomt corresponding to the regulr expression. (b+c*)*b 4. Find the regulr expression for the set of ll strings denoted by R 2 23 from the DFA. Strt Construct Regulr expression to the trnsition digrm. Strt q q q 3 6. Construct NFA for the regulr expression (/b)*bb nd drw its equivlent DFA. 7. Find the Regulr Expression corresponding to the Finite Automt ,1 Strt 1 0 q 0 q 1 q 2

19 8. Construct minimum stte utomton equivlent to given utomton M where trnsition tble is Sttes B q 0 q 0 Q 3 q 1 q 2 q 5 q 2 q 3 q 4 q 3 q 0 q 5 q 4 q 0 q 6 q 5 q 1 q 4 *q 6 q 1 q 3 9. Show tht the lnguge L = {0p, p is prime} is not regulr. 10. Construct regulr expression for (+b)* into -NFA nd find miniml stte DFA. 11. Construct NFA for the regulr expression (0+1)*0(0+1) nd drw its equivlent DFA. 12. Find whether the lnguges re regulr ) L = {w Є (,b) w=w R } b) L = { 0 n 1 m 2 m+n n,m 1} 13. Let G be the grmmr S B/bA, A /S/bAA, B b/bs/bb. For the string tree. bbbbb find the leftmost derivtion nd lso obtin the prse 14. Write Grmmr to recognize ll prefix expressions involving ll binry rithmetic opertors. Construct prse tree nd lso give the leftmost nd rightmost derivtion for the sentence -*+bc/de using the constructed grmmr. 15. Show tht the grmmr S /S/bSS/SSb/SbS is mbiguous. 16. Find derivtion tree of *b+*b given tht *b+*b is in L(G) where G is given by S S+S/S*S//b. 17. Find L(G) where G = ({S},{0,1},{S 0S1/},S). 18. Let G be the grmmr S OB/1A, A 0/0S/1AA, B 1/1S/0BB. For the string find its leftmost derivtion nd derivtion tree. 19. Show tht E E+E/E*E/(E)/id is mbiguous. Show tht id+id*id hve two distinct leftmost derivtion.

20 20. Show tht the grmmr S SbS/bSS/ is mbiguous nd give the lnguge generted by this grmmr.

21 ASSIGNMENT 3 1. Design PDA tht ccepts the lnguge of the grmmr. S AB, A A/, B Bb/ nd check for the string bb. 2. Convert the grmmr S 0S1/A, A 1A0/S/ to PDA tht ccepts the sme lnguge by empty stck. 3. Convert the grmmr S AA, A S/bS/ to PDA tht ccepts the sme lnguge by empty stck. 4. Consider the grmmr G=(V,T,P,S) where S A, A ABC/bB/, B b, C c.find the PDA nd process the string bc 5. Convert the PDA P=({q,p},{0,1},{Z 0,X}, δ,q, Z 0,{p}) hving the following trnsition function δ(q,0, Z 0 )={(q,xz 0 )}, δ(q,0, X)={(q,XX)}, δ(q,1, X)={(q,X), δ(q,, X)={(p, )}, δ(p,, X)={(p, )}, δ(p,1, X)={(p,XX), δ(p,1, Z 0 )={(p, )}to Context Free Grmmr. 6. Let M =({q 0, q 1 },{0,1},{Z 0,X}, δ, q 0, Z 0 ) where δ is given by δ(q 0,0, Z 0 )={(q 0,XZ 0 )}, δ(q 0,0, X)={(q 0,XX)}, δ(q 0,1, X)={(q 1, ), δ(q 1, 1, X)={(q 1, )}, δ(q 1,, X)={(q 1, )}, δ(q 1,, Z 0 )={(q 1, )}construct CFG G=(V,T,P,S) generting N(M). 7. Construct PDA ccepting { n b m n m,n 1} by empty stck. Also construct the corresponding CFG ccepting the sme set. 8. Construct CFG ccepting { m b n n<m} nd construct PDA ccepting L by empty stck. 9. Construct CFG G which ccepts N(M) where M=({q 0, q 1 },{,b},{z 0,Z}, δ, q 0, Z 0 ) where δ is given by δ(q 0,b, Z 0 )={(q 0,ZZ 0 )}, δ(q 0,, Z 0 )={(q 0, )}, δ(q 0,b, Z)={(q 0, ZZ), δ(q 0,, Z)={(q 1, Z)}, δ(q 1,b, Z)={(q 1,)}, δ(q 1,, Z 0 )={(q 0, Z 0 )}. 10. Consider the PDA with trnsitions, δ(q 0,,Z)={(q 0,AZ)}, δ(q 0,, A)={(q 0,A)}, δ(q 0,b, A)={(q 1, )}, δ(q 1,, Z)={(q 2, )}find the equivlent CFG. 11. Find grmmr in Chomsky Norml Form equivlent to S AbB, A A/, B bb/b. 12. Find grmmr in CNF equivlent to S AD, A B/bAB, B b, D d. 13. The grmmr hs the productions S 0A0/1B1/BB, B C/S/A, C S/ i) Eliminte the productions ii) Eliminte the unit productions iii) Eliminte the useless symbols iv) Convert into CNF.

22 14. Find CFG with no useless symbols equivlent to S AB/CA, B BC/AB, A, C B/b. 15. Find the equivlent CNF for the bove grmmr. 16. Obtin the CNF equivlent to the grmmr S ba/b, A baa/s/, B BB/bS/b. 17. Convert the Grmmr into CNF A bab/, B BA/. 18. Construct the equivlent GNF for the CFG, G = ({A 1, A 2, A 3 },{,b}, P, A) where P consists of A 1 A 2 A 3, A 2 A 3 A 1 /b, A 3 A 1 A 2 /. 19. Convert the given grmmr to GNF S Sb/b. 20. Design deterministic turing mchine to ccept the lnguge L={ i b i c i i 0}

23 Objective type questions 1. Automt in which the output depends on the trnsition nd current input is clled mchine. ) Moore b) Mely c) Finite stte d) Turing 2. Cn DFA simulte NFA? Yes/No. 3. Wht re the components of finite utomt model? ) I/p tpe, red hed, finite control b) I/p tpe, stck c) I/p, finite control d) finite control. 4. The recognizing cpbility of NFA nd DFA. ) my be different b)must be different c) must be sme d) none of these. 5. Give English description of the lnguges for the regulr expression *b+b*. 6. A regulr expression is tht describes the whole set of strings ccording to certin syntx rules. ) symbol b) string c) grmmr d) lnguge. 7. Arden s theorem helps in checking the of two regulr expressions. ) equivlence b) difference c) union d) conctention. 8. The of the progrmming lnguge cn be expressed using regulr expressions. ) tble b) grmmr c) lnguge d) tokens 9. Regulr expression ( b)( b) denotes the set. ) {,b,b,} b) {,b,b,bb} c) {,b} d) {,b,b,bb} 10. Let nd b be regulr expressions then (* U b*)* is equivlent to. ) ( U b)* b) (b* U *)* c) (b U )* d) U b 11. The recognizing cpbility of NDFA nd DFA. ) my be different b) must be different c) must be sme d) none of the bove. 12. The logic of pumping lemm is good exmple of. ) pigeon hole principle b) divide nd conquer strtegy c) recursion d) itertion.

24 13. A grmmr is sid to be mbiguous if it hs more thn one for string. ) Leftmost derivtion b) Rightmost derivtion c) Prse tree d) ll the bove. 14. The lnguges ccepted by PDA by empty stck nd finl sttes re different lnguges. True/Flse. 15. The number of uxiliry memory required for Pushdown Automt to behve like Finite utomt is ) 2 b) 1 c) 0 d) A PDA behves like TM when number of uxiliry memory it hs is. ) 2 b) 1 c) 0 d) The lnguge { m b m c m m 0}is context free lnguge. True/Flse. 18. CFL re not closed under intersection nd complementtion. True/Flse. 19. Consider the grmmr S PQ SQ PS, P x, Q y to get string of n terminls the number of productions to be used is. ) n 2 b) n+1 c) 2n d) 2n The CFG S S bs b is equivlent to the regulr expression. ) (*+b*)* b) (+b)* c)(+b)(+b)* d) (+b)*(b)* 21. The CFG S B ba, A b S B, B b bs BB genertes the string of terminl tht hve. ) equl no. of s nd b s b) odd no. of s nd odd no. of b s c) even no. of s nd even no. of b s d) odd no. of s nd even no. of s. 22. The intersection of CFL nd regulr lnguge. ) need not be regulr b) need not be context free c) is lwys regulr d) is lwys context free. 23. Give the tuple representtion of Turing mchine. 24. A TM is more powerful thn FA becuse. ) tpe movement confined to one direction b) it hs no finite stte c) it hs the cpbility to remember rbitrry rely long sequence of input symbols d) none of these. 25. A TM cn t solve hlting problem. True/Flse. 26. Complement of recursive lnguge is recursive. True/Flse. 27. The number of internl sttes of UTM should be t lest. 1 b) 2 c) 3 d) 4.

25

1.4 Nonregular Languages

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

More information

1.3 Regular Expressions

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

More information

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

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

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

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

More information

Formal languages, automata, and theory of computation

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

More information

Theory of Computation Regular Languages

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

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

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

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

More information

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

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

More information

CSC 473 Automata, Grammars & Languages 11/9/10

CSC 473 Automata, Grammars & Languages 11/9/10 CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is

More information

CS 275 Automata and Formal Language Theory

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

More information

Automata and Languages

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

More information

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

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

More information

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

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

More information

First Midterm Examination

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

More information

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

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

More information

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

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

More information

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

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

More information

CSCI FOUNDATIONS OF COMPUTER SCIENCE

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

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

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

More information

Closure Properties of Regular Languages

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

More information

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

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

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

More information

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

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

More information

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

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

More information

Lecture 6 Regular Grammars

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

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

Decidability. Models of Computation 1

Decidability. Models of Computation 1 Decidbility We investigte the power of lgorithms to solve problems. We demonstrte tht certin problems cn be solved lgorithmiclly nd others cnnot. Our objective is to explore the limits of lgorithmic solvbility.

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

CS375: Logic and Theory of Computing

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

More information

Lecture 08: Feb. 08, 2019

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

More information

First Midterm Examination

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

More information

Harvard University Computer Science 121 Midterm October 23, 2012

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

More information

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

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

More information

Deterministic Finite-State Automata

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

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Finite-State Automata: Recap

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

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

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

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

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

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

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages Automt & lnguges A primer on the Theory of Computtion Lurent Vnbever www.vnbever.eu Prt 5 out of 5 ETH Zürich (D-ITET) October, 19 2017 Lst week ws ll bout Context-Free Lnguges Context-Free Lnguges superset

More information

CHAPTER 1 Regular Languages. Contents

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

More information

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

More information

FABER Formal Languages, Automata and Models of Computation

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

More information

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

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

More information

Let's start with an example:

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

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Formal Languages Simplifications of CFGs

Formal Languages Simplifications of CFGs Forml Lnguges implifictions of CFGs ubstitution Rule Equivlent grmmr b bc ubstitute b bc bbc b 2 ubstitution Rule b bc bbc ubstitute b bc bbc bc Equivlent grmmr 3 In generl: xz y 1 ubstitute y 1 xz xy1z

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

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

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

More information

Non-Deterministic Finite Automata

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

More information

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

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

More information

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

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

More information

Non-deterministic Finite Automata

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

More information

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

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

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

THEOTY OF COMPUTATION

THEOTY OF COMPUTATION Pushdown utomt nd Prsing lgorithms: Pushdown utomt nd context-free lnguges; Deterministic PDNondeterministic PD- Equivlence of PD nd CFG-closure properties of CFL. PUSHDOWN UTOMT ppliction: Regulr lnguges

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v. 1 Exercises Chpter 1 Exercise 1.1. Let Σ e n lphet. Prove wv = w + v for ll strings w nd v. Prove # (wv) = # (w)+# (v) for every symol Σ nd every string w,v Σ. Exercise 1.2. Let w 1,w 2,...,w k e k strings,

More information

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

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

More information

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

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

More information

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

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

More information

NFAs continued, Closure Properties of Regular Languages

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

More information

Recursively Enumerable and Recursive. Languages

Recursively Enumerable and Recursive. Languages Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 0 Forml Methods nd Models Dn Richrds, George Mson University, Fll 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 8 1. Prove q (q p) p q p () (4pts) with truth tle. p q p q p (q p) p q

More information

Agenda. Agenda. Regular Expressions. Examples of Regular Expressions. Regular Expressions (crash course) Computational Linguistics 1

Agenda. Agenda. Regular Expressions. Examples of Regular Expressions. Regular Expressions (crash course) Computational Linguistics 1 Agend CMSC/LING 723, LBSC 744 Kristy Hollingshed Seitz Institute for Advnced Computer Studies University of Mrylnd HW0 questions? Due Thursdy before clss! When in doubt, keep it simple... Lecture 2: 6

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Thoery of Automata CS402

Thoery of Automata CS402 Thoery of Automt C402 Theory of Automt Tle of contents: Lecture N0. 1... 4 ummry... 4 Wht does utomt men?... 4 Introduction to lnguges... 4 Alphets... 4 trings... 4 Defining Lnguges... 5 Lecture N0. 2...

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings... Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

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

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

More information

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

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

a b b a pop push read unread

a b b a pop push read unread A Finite Automton A Pushdown Automton 0000 000 red unred b b pop red unred push 2 An Exmple A Pushdown Automton Recll tht 0 n n not regulr. cn push symbols onto the stck cn pop them (red them bck) lter

More information

3 Regular expressions

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

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

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

More information

CSC 311 Theory of Computation

CSC 311 Theory of Computation CSC 11 Theory of Computtion Tutoril on DFAs, NFAs, regulr expressions, regulr grmmr, closure of regulr lnguges, context-free grmmrs, non-deterministic push-down utomt, Turing mchines,etc. Tutoril 2 Second

More information

Non-deterministic Finite Automata

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

More information

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

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

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

NFAs continued, Closure Properties of Regular Languages

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

More information

More general families of infinite graphs

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

More information

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

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

More information

Revision Sheet. (a) Give a regular expression for each of the following languages:

Revision Sheet. (a) Give a regular expression for each of the following languages: Theoreticl Computer Science (Bridging Course) Dr. G. D. Tipldi F. Bonirdi Winter Semester 2014/2015 Revision Sheet University of Freiurg Deprtment of Computer Science Question 1 (Finite Automt, 8 + 6 points)

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

i 1 i 2 i 3... i p o 1 o 2 AUTOMATON q 1, q 2,,q n ... o q Model of a automaton Characteristics of automaton:

i 1 i 2 i 3... i p o 1 o 2 AUTOMATON q 1, q 2,,q n ... o q Model of a automaton Characteristics of automaton: Definition of n Automton:-An Automton is defined s system tht preforms certin functions without humn intervention. it ccepts rw mteril nd energy s input nd converts them into the finl product under the

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

Tutorial Automata and formal Languages

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

More information

I. Theory of Automata II. Theory of Formal Languages III. Theory of Turing Machines

I. Theory of Automata II. Theory of Formal Languages III. Theory of Turing Machines CI 3104 /Winter 2011: Introduction to Forml Lnguges Chter 13: Grmmticl Formt Chter 13: Grmmticl Formt I. Theory of Automt II. Theory of Forml Lnguges III. Theory of Turing Mchines Dr. Neji Zgui CI3104-W11

More information

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING INSTITUTE OF AERONAUTICAL ENGINEERING DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : FORMAL LANGUAGES AND AUTOMATA THEORY Course Code : A40509 Class :

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information