Unit 2-ToC Handwritten

You might also like

Download as pdf
Download as pdf
You are on page 1of 47
Comtsion of funds Aulomala to Requdan CApsession ; Three For wea BEA Az (8,%,5,5,6), there ua requtlan Capression R, such Uhat L(e)= L(A) Prob Lek L be the Sek aceeptd by the DFA Ae (f4tangny & 6,4,,e) ( ile bung the Start Stale Lee ¥? be the Tepallan cap desenibing the a Olt Stina, a Such that. § (4, role , Gong Umoush inlrmediar States £4.49 14 sy Ri, valk be defined induchivty. (n) Basis Je=o a es By Strings wher ‘is euthey € ) Senge Stembol. | cones ay ‘Scanned wih CemScanner Ri: [o|s (4i,4)=44} 8 (45,4) 24; _ Cased iss ee =e). (fo \s (45.0)* 4) vfed) Asnolis sek a ONL Surnbols a cube Urok a 07 € Rid. ase Indudiion he formule. for getlig he Lome nj wb my hy (fi, ) le a (4) ree Jo ge the. heal ‘equa CA pression we hare. to Semply qe Ve fang Hy, Whee U tndicakes oe Stal Ond | indicated "fee Stak 2h Fi be Ue ho Of Stakes. Th there axe p re paths, Jeading ty fro Stak, then Ly 1 *j Rit Mate ip Fu Q Sok of final shales Fe . (47), Oe tip) as ‘Scanned wih CamScanner 1a ° Yau =o sa =(Or)re 1 te z 1, Tan te hw Me fend. Kel ie ty Ya y Hl jek pel ae yt kl yk ged Ben Yt YO . | kK (yy) a kj Be ‘yj | 0 oy* ly, vy Cy) (ne % E Ce +1) (ite? (ire) ¥ (1+) =( tte) Cire =" ( + [+ ¢) (Wey (ite) + t] ‘Scanned wih CamScanner VOY Og #08) = (eH) Cen)” CO) +) = 1((e) (ire) €] = (ites =i* f= G8) part eels) =¢ ee (en)+¢ ~ o+o= 6 (xy .,) (VY (y Ya) + (aa) “4 (ites (1 )+ (er or!) a t (et o+1) Otite *(%a ) ) (ny (x, +r, r “f (Ire)* (1)+ ( < Yaa wou Etor) — 4 + (Eton) = Oflte es QL stale = + a) Ox y (¥ aa) t (m4) = i" (ey (er04) aut ‘Scanned wih CamScanner “0 [Cerny (e101) re] ene (Ge erat] Ardea “Uren. R= @ +h? R= ah* t= €4441 5@ 4a = Lilt 4, ri) 5@ @ Toke pst 1,2 €+4,1 / vp & 5p R=ap* q, 24" - ie ta =n ie La lott) R o RP Vaz IN" (5. uw (ony Gre Ue veqalay a pression {°° Ue Day LA, Tne : Hl firdng Ry” [o all values of i,],F Ties ty ij u kk k) Shp 4 b=0 oO Sy Vyyel Vs) 6 ° ° I tia = Yan & veo ° © ° ly, 2? Yg32 0 V's3° &7° | | Shee kel kK eel a wr Xe a Y 7 Wet to Mn) 8g 3 ‘Scanned wih CamScanner (Ct) + (e1) (en (ey, = (é4) (1+ (e4)" (es) Ler) (Le (E41) 4) > (er) (1+1) = (41) ¢* x = Yr ny Devens: 0 = OF (Eiko = OF1%5 > ve hat He Ya ) Y. = OF ( ex1)( Er)" : O+ (Eri) [0 =) Ot I*> \* oO ‘Scanned wih CamScanner 0 on 0\* Yi3= Yt lh) Vis = pt Ceny(ery”g = . Yay = Yar + %) (we) - vat (enyt(en) sent ol ’ ° 0; 0% 9 Yaa = Yaa +a (m1) Ya Seah ier Xo = €+F1I"o ay a(n)" Is = oF | (EH)*y = oF 1*y = Io Gg o* D HO) O + y (en yt (en) “Oth = ° ° o\* o Batty (%) Ye = 1+ ( = 1+0 ) Yan y oe 3) = ty + ex) 0 ¥ ; oy rytyty! [ Ys = et yy (%) tes bo. (energy (0 "9 = (ero)th | : o slips (€+0) =e kee 2 2 1 1 1 1 Y= Hr Ne (a2) Va, * = 1 +i*o (fo) tuft a 1 a yt Nia = Yat Yalta) Yaa = Porto (c+*oy* (e+u*e) = Senet a Ys Ms Ma Ux a3)", = O41" alent yt A = Motut d " ("9 Yar = Yt ba ( On =I Set 0) Ceti 4, kt sur = Wy (e+ ©) lik oy ty = (aA 0) *1* ) BY ‘Scanned wih CamScanner a : ‘ a a Yaa t laa (2) Yoo = (Eto) + (Et 0)+(E4uo}k (e +1\*o) = Cerito) + (éHI"0) + (11*0)+ (ete) = (eti'o)+ (I"oy* = (n*oy* ‘ 4 1 ) rk od Yaa = Yaz + Yaa Cy) Yh = oF lito (erie) (110) = OF" O(II"0)* (11%) = OF 1" 0(1*d)* (11%) cow ( 1k Vy = Yn Ysa Ma) ‘yy = 6 giCeri*oy hi & = 1 yi a 1 ' i | %a 2 Gata (4a) Yar = J+ 1 Cento) * (eno) = 141 (iFo)* (erio) = 1+ ((n*oy* a ) * Ys Gy GS 22) 3 > (eto) $1 (erito)* "0 ‘Scanned wih CamScanner > (t40)41(1"0)* (e40)-+1(1 oy Reaulan eapression ts 1,” 3 aya a _Y¥ ayn yt Ns th, (33) ‘9 > Mocito)* (ut 0) +1*o(n a in *o) E ( F OFT (11*0)"1*0)* (tot (n*o)* 1 *0) Basi fprmula on Kequlaa expression ; ). Cetr)*=! re * er) at (01) o= o(!0) (et) = + tk Y € (en)tel (o%1) oF = (ort) Cenpti® =" ori* 0 = 1%0 oroit =o" £400" =0" & ayh (1 oy'=('0 joo g+0=0 yee 33 ‘Scanned wih CamScanner oO Design NFA Geeept WU Stings end with of over alphabet £= (0,1) 6 20-O NFA Conkoun Substring aabb OX @ dearer fas a » Qo eee” © a8" | bat ae @) Constwuck Nea amare bemoan 2 cme O* moh 0 (QV ‘Scanned wih CamScanner 3.4 RELATIONSHIP BETWEEN FA AND RE Thereisa close relationship between a finite automata and the regular expression we can show this relation in below figure. Can be Regular Can be Converted expression [ converted to — Deterministic NFAwith finite moves automata Can be Can be converted converted to NEAwithout «moves FIGURE : Relationship between FA and regular expression The above figure shows that it is convenient to convert the: regular expression toNFA with € moves. Let us see the theorem based on this conversion. 3,5 CONSTRUCTING FA FOR A GIVEN REs Theorem If bearegular expression then there exists a NFA with € -moves, which accepts L(r). Proof: First we will discuss the construction of NFA jf with ¢ -moves for regular expression r and then we prove that L(M) = L(r). Let r bethe regular expression over the alphabet » . Construction of NFA with « -moves Case 1: @ r=6 ‘Scanned wih CamScanner NFA M = ({s, f}, (35,5, 1) as shown in Figure] (a) s (No path from initial state sto ( ) reach the final state) Figure 4 (a) @ r=e NFA M = ({s}, { },, 5, {s}) as shown in Figure 1 (b) ( ) (The initial state sis the final state) Figure 1 (b) Gi) + = a,foralla €3, NFA M = ((5, f},2,8,5, (71) © a G) (One path is there from initial states to reach the final state fwith label a.) Figure 4 (c) Case2: [r|>1 Let », and r, be the two regular expressions over 2,25 and 1, and NV, aretwo NFA for y, and r, respectively as shown in Figure 2 (a). (s) ® 1M) = (s) & @® um) = % Figure 2 (a) NFA for regular expression 1, and r, ‘Scanned wih CamScanner Now letus compute for final state, which denotes the regular expression. 1 will be computed, because there are total 2states and finnl state is q, Who aeGuleah Gs eh) = 0(e)*(e) +0 -0+0 = 0 which isa final regular expression. ye start state bs 3.6.1 Arden's Method for Converting DFA to RE ‘As we have seen the Arden's theorem is useful for checking the equivalence of two regular expressions, we will also sec its use in conversion of DFA to RE. Following algorithm is used to build the. from given DFA. 1. Let g, be the initial state, 2. Therware gy, qpdysderoda umber of states.The final state may be some «, where J $1 3. Leta, represents the transition from q, 10 4,. 4, Calculate g, such that GAO, Ifg, isastart state 4 =y4,4€ 5, ‘Similarly compute te final state which ultimately gives the regular expression Example 4 ; Construct RE for the given DFA. Solution : Since thereis' only one state in the finite automata let us solve for q, only. 90 =%o0+ GaltE Go= OHNE ‘Scanned wih CamScanner Example 3 : Construct RE for the DFA given in below figure. Solution : Letus see the equations G=Hl+ gore = 900 = =H 0+ G1 +9501) Letussolve g, first, Go =H 14+ q,04+E 4p = 4901+ gol 04 Go = Go(O1 410) +e -s R=Q+ RP Jo = © {01410)* => QP* where 9 =(01+10)* R= qo.Q=6,P =(01+10) ‘Thus the regular expression will be r=(01+10)* Since gy isa final state, we are interested in g, only. Example 4 : Find out the regular expression from given DFA. o ‘Scanned wih CamScanner 3.9 PROPERTIES OF REGULAR SETS Regular ets are closed under following properties. 1. Union 2. Concatenation ‘Scanned wih CamScanner ayse Kleene Closure Complementation Transpose Intersection Union : If & and X, are two regular sets, then union of these denoted by R, + Ry or R, U Ry isalsoaregularset. Proof : Let X, and 2, be recognized by NFA N, and N, respectively as shown in Figurel (a) and Figure!(b). FIGURE ‘(b) NFA for regular set R We construct anewNFAN based on union of, and N, asshown in Figure 1 (¢) FIGURE 4(c) NFAfor Ny + Nz Now, LN) =€L(N) € + LN) € seRe +eR,€ =R +R, Since, NisFA, hence L(V) isaregularset (language). Therefore, R, + Ry isaregularset, ‘Scanned wih CamScanner . Concatenation : If x, and A, are two regular sets, then concal tenation of these denoted by 2,2, isalsoa regular set. Proof : Let # and 2, be recognized by NFA. N, and Ny respectively as shown in Figure 2(u) and Figure 2(b). FIGURE 2(b) NFA for regular set Ry WeconstructanewNFA Nbased on coneatenationof W, and N, asshown in Figure2(©)- GG ®D FIGURE 2(c) NFAfor regular set RR Now, LON) = Regular set accepted by 1; followed by regular set accepted by Na = RR, Since, L(V) isaregular set, hence R,R, isalsoaregular set. Kleene Closure : If Risa regularset, then Kleene closure ofthis denoted by R*isalso aregular set. Proof: Let R isaccepted byNFA Nv shown in Figure 3(a). FIGURE 3(a) NFA for regular set R ‘Scanned wih CamScanner We construct a new NFA based on NFA Nas shown in. Figure 3(b). FIGURE 3(b) NFA for regular expression for R” Now, LIN)={E,R,RR,RRR,...} =L Since, L(V) is aregularset, therefore R* isaregular set. Complement: If z isa regular set on some alphabet 5, then complement of R is denoted by E° — R or R isalsoa regular set, Proof : Let Rp be accepted by NFA N = (Q,2,6,s,F). It means, L(N)=R. Nis shown in Figure 4(a). FIGURE 4{a) NFA for regular set R We construct anew NFA yy' based on y as follows: (a) Change all final states to non-final states. (®) Change all non-final states to final states. W'is shown in Figure 4(b) FIGURE 4 (b) NFA ‘Scanned wih CamScanner Now, 1(N*) = {All the words which are not accepted by NFA N} = { All the rejected words by NFAV} ve R Since, L(N') isa regular set, therefore (z° — R) isaregular set. 5. Transpose :IfRisaregular set, then the transpose denoted by i, isalso aregular set. Proof : Let beaccepted by NFA N = (Q,3,,8,/°) as shown in Figure 5(@)- FIGURE 5 (a) NFA NV for regular set R If w isawordin p, then transpose (reverse) is denoted by w? - Let w = aja7.., Then wT = agg sme We construct anew ,v" based on 7 using following rules : (a) Change the all final states into non-final states: and merge all these into one stateand make it initial state, (b) Change initial state to final state. (c) Reverse the direction ofall edges. iy’ isshown in Figures (b) FIGURE 5(b) NFAN‘for regular set pT ‘Scanned wih CamScanner Let w = aa;...a, beawordin p, then itis recognized by jv and w? = a,a,_,..a, istecognized by yy" as shown in Figures (b) In general, we say that if'a word w in Ris accepted by and then y" accepts y7. Since, L(") isa regular set containing all w? ;itmeans, L(N*) = R7. Thus, R’ is a regular set. Intersection : if R and R, are two regular sets over 5, then intersection of these denoted by R, 7 R, isalso a regular set. Proof : By De Morgan's law for two sets A and B over R, AQ B=R*-(R*-A)U(R*-B)) So, RM Ry = E*-(E*-R)U(E*-R,)) Let R; =(£*-R,) and R, =(£*-R,) So, R; and R, are regular sets as these are complement of R, and Ry Let Ry = Ry U Ry So, &, isa regular set because it is the union of two regular sets R, and R,. Let Ry = E*~Rg So, X, isa regular set because it is the complement of regular set R,. Therefore, intersection of two regular sets is also regular set. ‘Scanned wih CamScanner Equivalence of finite automata and regular expression: Regular expression NFA with € moves L_ NFA without «moves }¢——— Theorem 1: Let be a regular expression, then there exists a NFA with c transitions that accepts (9. Proof: . , i This can be proved by indyetion method. The basis of the induction will be by considering r has zero operators. Basis(zero operators)- Now, since has zero operators, means r ean be either € or @ oF @ for some ain input set 5. The finite automata for the same can be written as Basis: Automata for e, 0, and a. (b) ©) ‘Scanned wih CamScanner Induction: This theorem can be true for n number of operators, The n is greater than oF equal to | The regular expression contai S equal to or more than one operator. For any type of regular expression there are only three possible cases. 1. Union . 2. Concatenation 3. Closure. Case 1: Union Let v=rts where r and s be the regular expressions, Consider two NFA"s MI and M2 MI=QI, 51,81,q0, Fl) M2=(Q2, ¥2,82,q0, F2) L(MI=L(®) means the language states by regular expression rl same which is represented by Mi. Similarly L(M2)=L(s). QI represents the set of all the states'in the machine M1. Q2 represents the set of all the states in the machine M2. We assume that q1 and q2 are totally different i.e.Q1 and Q2 are disjoint. Let q0 be initial state and f0 be the new final state. / Then MI=((QIUQ2U{q0,f0}),(E1 U £2),8,q0, (£0}) Then 8 is denoted by 1. 8( q0,¢)={q1,q2} . 8( q,a}=51( q,a) for q in QI-{f1} and ain D1 Ufe}. . 8( q,a)= 52( q,a) for q in Q2-{12} and a in 2 Ufe}. . (Fl, )=8(f2, €)={10}. awn ‘Scanned wih CamScanner The construction of the machine M shows the transition from 40 to £0 must begin by going I or q2 on c. If the path goes to ql, then it follows the path in machine MI and goes to the state fl and then to 10 one. ‘Thus L(M)=L(MI)UL(M2). That means either the path in machine MI or M2 will be followed. Case 2: Coneatenation Let T=rs where rand s be the regular expressions. Consider two NFA’s MI and M2 Such that L(M1)=L(®), L(M2)=L(s) The construction of the machine M will be M=((Q1UQ2,E1 U £2,8,{q1},(2}) Then & is denoted by 1. 8('q,a)= 81( q,a) for q in QI-{f1} and a in E1 Ute}. 2. a(fl, —)={q2} 3. 8( q,a)= 82( q.a) for q in Q2 and a in Y1 Ufc}. The initial state is q1 by some input a the next state will be fl. And on receiving c the transition will be from f1 to q2 and the final state will be £2. The transition from q2 to f2 will be on receiving some input b. Thus L(M)=ab . That is a is in L(MI) and b is in L(M2). ; Hence L(M)=L(MI)L(M2) is proved. Case 3: Closure : f Let rl* where rl be a regular expression. ‘The mapping function 8 is given by 1. 8( q0,€)= 8(f1, )={{q1,f0} SS ‘Scanned wih CamScanner 2. 8( qa)= 81( q,a) for q in QI-{f1} and a in 31 Ufc}. The machine MI shows that there was the transition from q0 to ql receiving c. Similarly a transition from q0 to £0 on ¢ there is the path. The path from f1 to ql receives ¢ transition. And f1 to f0 receives ¢ transition. Thus recursion is possible. Thus one can derive €,a,aa,aaa.... For the input a. Thus L(M)=L(M1)* is proved. For every regular expression, corresponding finite automata exist. 1. The NFA corresponding to regular expression, c is 2. The NFA corresponding to regular expression, a is >7O-—-©@ 3. The NFA corresponding to regular expression, a| b is a “ovo 4. The NFA corresponding to regular expression, ab is ‘Scanned wih CamScanner . The NFA corresponding to regular expression, a* is | a OO 2 -O-— a —_ 6. (O+1)* 1 (0/1) 7. (1/0)*(00+1) (1/0) apply union case (1/0)* apply closure case g 3b ‘Scanned wih CamScanner (00+1) apply union case Minimized states: 8. Construct a finite automation for the regular expression, (ab)* The finite automation corresponding to ab is ¢ >O-——@-© The finite automation corresponding to (ab)* is, € | ‘Scanned wih CamScanner 9% (b/a)*bba a O O OO. ed 7 - = *O—+O e*O @ = € b b a ‘Scanned wih CamScanner O Comstauck —funibe dutowaka for the Yegulan CApression — (o41) * (00 +11) (o+1)* (dite wthod) ere Tom 8) o,! Gx (o1y* tH ou Ba ‘Scanned wih CamScanner @ £ esign a foots duikewaka Fron Un Gwen Negulas capesion lot (oru)ots (Diseck method ssh. O Crstruct tranidron Diario tov Gen Vegan Capression LO (° +) 6* | a oS@ %y C 1o Ov 4; ! 0 ‘Scanned wih CamScanner Q) Combue NFA [e the folloriong eapressior | (a+b) *a. +h | ee BOO Oar” BAD This is Yequired NFA € O (a+) (arb) aa & NEA * ary 1) aa € © (Arb) (arb) a O-62.04H-@ wb Qt oe (HAG) 5@ ‘Scanned wih CemScanner | Comerbing Dra's 5 a Pequten CApIessiom by S by Stale - Dimnaling mMekhod. slip S "| femave atl the State. CAcapt Stouk & Stake brat Qs Reduce {he quien FA and Obkaun the Preeti Uronsion qioph uath start State fT L end state. () Find RE [Py Us given FA by SEM (stats Edemincie mined) si eee c en sigs ( Stal ea PLE ‘Scanned with CamScanner re er 7 The RE for Um quem NEA (ony olorin* Find RE for Ue Gin FA by SEM V4, OL SLO as Step 1 ‘pc 8 WS ig" Shep 2 The RE for tia Given A C « eq" (eh +t KE Yig" bh | © oa RE for Ue Gun NFA by stm (OSs ‘Scanned wih CamScanner Ship | \ ab | Goes, Bi athb stip a Et (bt aa) (bay ( g arbb) cn forte Start k end crabs 7 Should hort t include ¢ [RE = €+(byaa) Coe Yar de) | ‘Scanned wih CamScanner { (M hun 6) Mimmizabion 6 QrA (M Neweba_ i ) i Mimmizalion Of Sam in Preble é f “4 4. - noe table Apr alk paris Of sales (Po) @ Mask ad pains where Per & O FF () Th Unere are aura} wamaibod. Pours (?,a) suk Usk [6 (P,4), $ (a,4)] vs madbed , then mark [ray (where ‘3's an & impuk Spadoly Repeat ts Uli no mete Morbinas Can be Made (B Combine all the unmailed Pairs 2 mabe them a Sima, Stale in Uh Minimizer Spy. ‘Scanned wih CamScanner j nas maab ory Which hat Un Combinals on B ‘ Gf fowas Fhe pood ag kom | voles — D v wa vi Lee checking Uns by Hosted Stabs | aCe ayeS( 8a) sey S(A,o) 67 68 — = §(8%) =D Stn yec| pe ~ (CA) s$(c,a)=B S(cb)-e $ (tay: 8 SCan:c Cc,6) 2$(c.a).B SCGb)- Cc S( 8,4) =B § Cb.b)= D wid Un Marked Stale ko Verelen (cA) (8) (2) fo sj —_ a [ b © (4,,40)98 (414) “yt § (4o,a)= 4, 1M (42,44) =7 §C4a.4)° H § (4,4) +4, 1)2) 6 (4.05% ( La, $ (41,4)-4a a 40 Ae a. 4 ao ° . \ 6 9 tye (4,4) - (4,8) = Gsm) § (fat) = ONG § (4,4) = ts mei § (43.4) . ty 24 § la bets a | 1) 9 Ca, Fly § (4, a)-4, § (4, ».1, bt 8ta)e 9, $45.6). 44 §(4a,a): 4 § (45,6) = ty | (44, 4s) 7 él) ty i Ued-t) Ai S(qnay2dJ § (ted =4, (14,42) =) ety 5 (44,6) = 45 § (%,a)e% $ (4,6) 244 ak & yeoman wi, Wa madd St [4, 4a 45] fn) [4] Pureping Lemma {er Regular sols Pumping Lemma as tb gee a rolhod Of Pucraping mee impuk stivegs fon o den Slave. As purrnpung Qermuna a a a.) Condiken, tb Can be used to Ghouws Peak Corto Gels ane nat Vegullan. Problems 0 Pro a Dang Le fet [ia us not regulon sol “Here i SI rere fore a fa, ay wat} -fa", a’, al, and Take Ong Sting fon L, a denpin of the Shing 7 , st ule = avy) Take Uza \zaa Wea ted tue Juv] on Haylaayjey 34h | ‘Scanned wih CemScanner ad we leis Iide Jaol>; az fmal Condidion is Uvtw EL beds, UWia Veda wera (a) ( aa)" (2) iz Q (a) (aay (a) 2 Acaaa at $0 the Lovage als Get @ Problem pyoue Chak tn Lang Le tab [nz us nok ¥ | cgulan Sok nzy So Ls fab, ab, oth. 5 | Taba any Shioeg Aro L a?}* Length Of the Shing = b ‘Scanned wih CamScanner A ISE Yule Juvien, Ivlz1 (oo v4 | Zeuvw (avd rl) Bears” ~ = uv WwW Z n n-K 23 " Uv =a VEE (or) Il 2! yzak This conkiadi pur oapunplron wakia™ Thus we Gace on “ft 3 w= Ae is nak Ye ‘Scanned wih CamScanner G@) Prove hat L= fuw® [we fa.ny* 5, nod vegallan | n-k n f Seb Slep 2 Assume Uu gute 2= phony Pulos Long as Yequlan jel + fuyjén geal ak i ynat 4 Ww] 2LCODY FE tO at EL x 72 uw 6L atizo ted -K 2k 2: wwe Pooh Assure w= atb™ Sate ys ot wr =b"%a™ =e This tonkradit Our n,% 11 u | Za are bo Assumption . Thus the | “ w qeen Lang is not Yequlad. ‘Scanned with CemScanner ) . { i) ' (4 Ll Qa n22% 4 nol Vequllas | pa [nray 1 | Sel yules by luvl on Ly velo V7E Ly 4 20 «Le uviw EL Slaps | Asiune qe Lu reyallart | Zon! | nm uv =a vi ak _ nk ww - ies t Zi uvw L:a . | oe (a) (.*) (at) | | atk oal-h > a a altk a fe | this ts corkadicker to gus Assumpiion yence proved, that he quen mg ‘& nok Vequlans ‘Scanned wih CamScanner © b= fi al [ps puma nod iy 4 plone ts nok vequdon | Sok oe Yubes oO Jun] En Q VFfE wz Pe Pasar ® Ni2o uvtw él Assume inka Legal ys Yeaulles. cy : ° n pew z= ab ( here Spe the ah os ab Ww uy 2 a™ Vr ak NEE AVw ike a-k kK pe Zia a a 7 = uw ‘Scanned wih CamScanner ® L fo” i n >m | ‘6 nol regular sok tubes Ly jay) on b vee of VZzi b ¥izo ,uviwee Cus Sue. geen L= for i™ noma eqaban nom Z:-=oO1 uv: 0™ we ‘Scanned with CamScanner = oo Som 0 (0%) | = 6? 0%)” = Oe Lia 2= 8 (ony ym = 0° Oe" \™ =o. \™ tL Lens adiuk to Gut OAsumplion . ‘Scanned wih CamScanner Example 8 ; Show that the language 1 = {a' b"|i>0} is not regular. Solution : The set of strings accepted by language Lis, L= {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb...} Applying Pumping lemma for any of the strings above. Take the string abb, Itis of the form ww. Where, | uv |s i, vf 1 To find i such that u'w¢ L Take i=2 here, then uv = a(bb)b =abbb Hence ww = abbb ¢L Since abbb is not present in the strings of L. :. Lisnot regular. Example 9 ; Show that L = {0'n isa perfect square } is not regular. Solution : Step 1 : Let Lis regular by Pumping lemma. Letn be number of states of FA accepting L. Step 2: Let z= o* then |z[=n22. Therefore, we can writez=uvw; Where |uv|sn|ve1. Take any string of the language L= { 00, 0000, 000000..... } Take 0000 as string, here u=0, v=0, w= 00to findisuch that w'weL. Take i =2 here, then uv'w= 0(0)700 = 00000 This string 00000 is not present in strings of language L. So uv‘w¢ L. :. Itisa contradiction. ‘Scanned wih CamScanner

You might also like