/
Forexampleonecanverifythatf0;00;000garedistinguishablewithrespecttoEQa Forexampleonecanverifythatf0;00;000garedistinguishablewithrespecttoEQa

Forexampleonecanverifythatf0;00;000garedistinguishablewithrespecttoEQa - PDF document

danika-pritchard
danika-pritchard . @danika-pritchard
Follow
366 views
Uploaded On 2016-04-27

Forexampleonecanverifythatf0;00;000garedistinguishablewithrespecttoEQa - PPT Presentation

Supposewehavecomputedn1Nowwehavethatpnqifandonlyifpn1qandforeverya2wehavepan1qaThesecondpartrequiressomejusti cationandweproveitasalemmabelowLemma10LetMQq0FbeaDFAForan ID: 296019

Supposewehavecomputedn1.Nowwehavethatpnqifandonlyif{pn1qand{foreverya2wehave(p;a)n1(q;a).Thesecondpartrequiressomejusti cation andweproveitasalemmabelow.Lemma10LetM=(Q;;;q0;F)beaDFA.Foran

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Forexampleonecanverifythatf0;00;000gared..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Forexampleonecanverifythatf0;00;000garedistinguishablewithrespecttoEQandthatf00;01;10;11garedistinguishablewithrespecttoA.Wenowprovethemainresultofthissection.Lemma5LetLbealanguage,andsupposethereisasetofkdistinguishablestringswithrespecttoL.TheneveryDFAforLhasatleastkstates.Proof:IfLisnotregular,thenthereisnoDFAforL,muchlessaDFAwithlessthankstates.IfLisregular,letMbeaDFAforL,letx1;:::;xkbethedistinguishablestrings,andletqibethestatereachedbyMafterreadingxi.Foreveryi6=j,wehavethatxiandxjaredistinguishable,andsoqi6=qjbecauseofLemma3.Sowehavekdi erentstatesq1;:::;qkinM,andsoMhasatleastkstates.UsingLemma5andthefactthatthestringsf00;01;10;11garedistinguishablewithrespecttoAweconcludethateveryDFAforAhasatleast4states.Foreveryk1,considerthesetf0;00;:::;0kgofstringsmadeofkorfewerzeroes.ItiseasytoseethatthisisasetofdistinguishablestringswithrespecttoEQ.ThismeansthattherecannotbeaDFAforEQ,because,iftherewereone,itwouldhavetohaveatleastkstatesforeveryk,whichisclearlyimpossible.2StateMinimizationLetLbealanguageoveranalphabet.Wehaveseenintheprevioussectionthede nitionofdistinguishablestringswithrespecttoL.Wesaythattwostringsxandyareindistinguishable,andwewriteitxLyiftheyarenotdistinguishable.Thatis,xLymeansthat,foreverystringz,thestringxzbelongstoLifandonlyifthestringyzdoes.Byde nition,xLyifandonlyifyLx,andwealwayshavexLx.ItisalsoeasytoseethatifxLyandyLwthenwemusthavexLw.Inotherwords:Fact6TherelationLisanequivalencerelationoverthestringsin.AsyoumayrememberfromsuchclassesasMath55orCS70,whenyoude neanequivalencerelationoverasetyoualsode neawaytopartitionthesetintoacollectionofsubsets,calledequivalenceclass.AnequivalenceclassinwithrespecttoLisasetofstringsthatareallindistinguishablefromoneanother,andthatarealldistinguishablefromalltheothersnotintheset.Wedenoteby[x]theequivalenceclassthatcontainsthestringx.AfancywayofstatingLemma5istosaythateveryDFAforLmusthaveatleastasmanystatesasthenumberofequivalenceclassinwithrespecttoL.Perhapssurprisingly,theconverseisalsotrue:thereisalwaysaDFAthathaspreciselyasmanystatesasthenumberofequivalenceclasses.Theorem7(Myhill-Nerode)LetLbealanguageover.Ifhasin nitelymanyequivalenceclasseswithrespecttoL,thenLisnotregular.Otherwise,LcanbedecidedbyaDFAwhosenumberofstatesisequaltothenumberofequivalenceclassesinwithrespecttoL.Proof:Iftherearein nitelymanyequivalenceclasses,thenitfollowsfromLemma5thatnoDFAcandecideL,andsoLisnotregular.2 Supposewehavecomputedn�1.Nowwehavethatpnqifandonlyif{pn�1qand{foreverya2wehave(p;a)n�1(q;a).Thesecondpartrequiressomejusti cation,andweproveitasalemmabelow.Lemma10LetM=(Q;;;q0;F)beaDFA.Foranytwostatesp;qandintegern1,wehavethatp6nqifandonlyifp6n�1qorthereisana2suchthat(p;a)6n�1(q;a).Proof:Ifp6nq,thenthereisastringxsuchthatMacceptswhenstartingfrompandgivenx,butitrejectswhenstartingfromqandgivenx.Ifthelengthofxisn�1,thenwehavep6n�1q.Otherwise,letuswritex=ax0,whereaisthe rstcharacterofx,andletuscallp0=(p;a)andq0=(q;a).Thenthestringx0haslengthn�1anditshowsthatp06n�1q0.Fortheotherdirection,ifp6n�1qthenclearlyalsop6nq.Otherwise,ifthereisanasuchthat(p;a)6n�1(q;a),thenletx0bethestringoflengthn�1thatshowsthat(p;a)6n�1(q;a).Thenthestringax0oflengthnshowsthatp6nq.ThisgivesanO(jjjQj)timealgorithmtocomputengivenn�1,andsoanO(njjjQj)timealgorithmtocomputenfromscratch.Nowwecometoanimportantobservation:If,forsomek,wehavethattherelationkisthesameastherelationk+1,thenalsokisthesameasnforalln�k.Toseethatitistrue,notethattheprocessthatweusetogofromktok+1isindependentofk,andsoifitdoesnotchangetherelationwhenappliedonce,itwillnotchangetherelationifappliedanarbitrarynumberoftimes.Thisshowsthatthealgorithmconvergestoa xedpartitioninjQj�1steps,becauseitstartswithtwoequivalenceclasses,itcannotcreatemorethanjQjequivalenceclasses,andateachstepitmusteitherincreasethenumberofequivalenceclassesorreachthe nalpartition.Inparticular,ifweletk=jQj�1,thenwehavethatkisthesameasnforeverynk,anditcanbecomputedintimeatmostO(jQj2jj).Wecanalsoseethatkisthesamerelationas.Thisistruebecauseifpqthencertainlypkq.Butalso,ifp6q,thenthereisastringxthatshowsthisisthecase,andifwecallnthelengthofxwehavethatp6nq.Ifnk,thencertainlythisalsomeansthatp6kq;ifn�kwecanstillsaythatp6kqbecausewehaveobservedabovethatnandkarethesameforn�k.Wecannow nallydescribeourstateminimizationalgorithm.GivenM=(Q;;;q0;F).Letk=jQj�1andcomputetheequivalenceclassesofQwithrespecttok.De neanewautomatonM0=(Q0;;0;q00;F0)asfollows.ThereisastateinQ0foreachequivalenceclass.Theinitialstateq00istheequivalenceclass[q0].ThesetF0containalltheequivalenceclassesthatcontain nalstatesinF.1De ne0([q];a)=[(q;a)].RemovefromQ0allthestatesthatarenotreachablefromq00.Suchstatescanbeeasilyfounddoingadepth- rstsearchofthegraphoftheautomatonstartingfromq00.Theremovalofthesestatesdoesnotchangethelanguageacceptedbyautomatonbecausetheyneveroccurinacomputation.LetM00=(Q00;;00;q00;F00)bethenewautomaton. 1NotethatanequivalenceclasscontainseitheronlystatesinForonlystatesnotinF.4

Related Contents


Next Show more