recent)algorithmcalledbdm.bdmskipscharactersusinga\suxau-
|
|
|
- Janis Newman
- 10 years ago
- Views:
Transcription
1 1Dept.ofComputerScience,UniversityofChile.BlancoEncalada2120,Santiago, ABit-parallelApproachtoSuxAutomata: FastExtendedStringMatching Abstract.Wepresentanewalgorithmforstringmatching.Thealgorithm,calledBNDM,isthebit-parallelsimulationofaknown(butomaton"whichismadedeterministicinthepreprocessing.BNDM,in- recent)algorithmcalledbdm.bdmskipscharactersusinga\suxau- 2InstitutGaspardMonge,CiteDescartes,Champs-sur-Marne, PartiallysupportedbyChileanFondecytgrant GonzaloNavarro13MathieuRanot2 theiroriginalformulation.weshowthat,asotherbit-parallelalgorithms, BNDMcanbeextendedtohandleclassesofcharactersinthepattern orverylongpatterns(e.g.onenglishtextitisthefastestbetween5 stead,simulatesthenondeterministicversionusingbit-parallelism.this easilyimplementothervariantsofbdmwhichareextremelycomplexin ily.thismakesitthefastestalgorithminallcasesexceptforveryshort and110characters).moreover,thealgorithmisverysimple,allowingto algorithmis20%-25%fasterthanbdm,2-3timesfasterthanotherbitparallelalgorithms,and10%-40%fasterthanalltheboyer-moorefam- 1Introduction Thestring-matchingproblemistondalltheoccurrencesofagivenpattern p=p1p2:::pminalargetextt=t1t2:::tn,bothsequencesofcharactersfrom eralizethesuxautomatondenitiontohandleclassesofcharacters.to andinthetext,multiplepatternsandtoallowerrorsinthepatternor thebestofourknowledge,thisextensionhasnotbeenstudiedbefore. inthetext,combiningsimplicity,eciencyandexibility.wealsogen- thersthavinglinearworst-casebehavior,isknuth-morris-pratt(kmp)[14].a Moore(BM)[6].Thisalgorithmleadstoseveralvariations,likeHoorspool[12] secondalgorithm,asfamousaskmp,whichallowstoskipcharacters,isboyer- andsunday[20],formingthefastestknownstring-matchingalgorithms. regardedaslookingforautomatawhichareecientinsomesense.forinstance, anitecharacterset. KMPissimplyadeterministicautomatonthatsearchesthepattern,beingits mainmeritthatitiso(m)inspaceandconstructiontime.manyvariationsof Severalalgorithmsexisttosolvethisproblem.Oneofthemostfamous,and thebmfamilyaresupportedbyanautomatonaswell. wheretheideaistosearchasubstringofthepatterninsteadofaprex(askmp), Alargepartoftheresearchinecientalgorithmsforstringmatchingcanbe Anotherautomaton,called\suxautomaton"isusedin[9,10,11,15,19],
2 approach,whichhasalsobeenextendedtomultipatternmatching[9,11,19] (i.e.lookingfortheoccurrencesofasetofpatterns). orasux(asbm).optimalsublinearalgorithmsonaverage,like\backward DAWGMatch"(BDM)orTurboBDM[10,11],havebeenobtainedwiththis algorithmshavebeenobtainedforexactstringmatching[2,22],aswellasapproximatestringmatching[22,23,3].althoughthesealgorithmsworkwellonly Anotherrelatedlineofresearchistotakethoseautomataintheirnondetionsinsidecomputerwordstoperformmanyoperationsinparallel.Competitive memoryrequirements. onrelativelyshortpatterns,theyaresimpler,moreexible,andhaveverylow terministicforminsteadofmakingthemdeterministic.usuallythenondeter- ministicversionsareverysimpleandregularandcanbesimulatedusing\bit- parallelism"[1].thistechniqueusestheintrinsicparallelismofthebitmanipula- Matching(BNDM),whichweextendtohandleclassesofcharacters,tosearch tainafaststringmatchingalgorithm,calledbackwardnondeterministicdawg Shift-Or[2].BNDMusesanondeterministicsuxautomatonthatissimulated multiplepatterns,andtoallowerrorsinthepatternand/orinthetext,like thanshift-or),fasterthanitsdeterministic-automatoncounterpartbdm(20%- 25%faster),usinglittlespaceincomparisonwiththeBDMorTurboBDMalgorithms,andbeingverysimpletoimplement.Itbecomesthefasteststring matchingalgorithm,beatingalltheboyer-moorefamily(sundayincluded)by terministicversionusingbit-parallelism.thisextensionhasnotbeenconsidered forthebdmorturbobdmalgorithmsbefore. previousoneswhichcouldbeextendedinsuchaway(typically2-3timesfaster usingbit-parallelism.thisnewalgorithmhastheadvantageofbeingfasterthan Inthispaperwemergesomeaspectsofthetwoapproachesinordertoob letters),dependingonjjandthearchitecture,otheralgorithmsbecome fasterthanbndm(sundayandbdm,respectively).moreover,wedeneanew suxautomatonwhichhandlesclassesofcharactersandwesimulateitsnonde- 10%to40%.Onlyforveryshort(upto2-6letters)orverylongpatterns(past thebitwise-xorand\"complementsallthebits.theshift-leftoperation,\<<", thebitsofcomputerwords:\j"isthebitwise-or,\&"isthebitwise-and,\b"is denotebitrepetition(e.g.031=0001).weusec-likesyntaxforoperationson ofpifpcanbewrittenp=uxv,u;v2.wedenotefact(p)thesetoffactors calledsu(p). ofp.afactorxofpiscalledasuxofpisp=ux.thesetofsuxesofpis Weintroducesomenotationnow.Awordx2isafactor(i.e.substring) movesthebitstotheleftandenterszerosfromtheright,i.e.bmbm?1:::b2b1<< r=bm?r:::b2b10r.wecaninterpretbitmasksasintegersalsotoperform arithmeticoperationsonthem. Anexpandedversionofthisworkcanbefoundin[17]. Wedenoteasb`:::b1thebitsofamaskoflength`.Weuseexponentiationto
3 thenexplainhowisitusedinthesearchalgorithm 2.1SuxAutomata WedescribeinthissectiontheBDMpatternmatchingalgorithm[10,11].This algorithmisbasedonasuxautomaton.werstdescribesuchautomatonand 2SearchingwithSuxAutomata andisshowninfigure1.weshownowhowthecorrespondingdeterministic niteautomatonthatrecognizesallthesuxesofthispattern.by\incomplete" wemeanthatsometransitionsarenotpresent. fordeterministicacyclicwordgraph)istheminimal(incomplete)deterministic automatonisbuilt.i Asuxautomatononapatternp=p1p2:::pm(frequentlycalledDAWG(p)- Thenondeterministicversionofthisautomatonhasaveryregularstructure Fig.1.Anondeterministicsuxautomatonforthepatternp=baabbaa.Dashedlines representepsilontransitions(i.e.theyoccurwithoutconsuminganyinput).iisthe initialstateoftheautomaton. Givenafactorxofthepatternp,endpos(x)isthesetofallthepattern positionswhereanoccurrenceofxends(thereisatleastone,sincexisafactor ofthepattern,andthereareasmanyasrepetitionsofxinsidep).formally, suchintegeraposition.forexample,endpos(baa)=f3;7ginthewordbaabbaa. Noticethatendpos()isthecompletesetofpossiblepositions(recallthatis givenx2fact(p),wedeneendpos(x)=fi=9u;p1p2:::pi=uxg.wecalleach theemptystring).noticethatforanyu;v,endpos(u)andendpos(v)areeither Fact(p),wedeneuvifandonlyifendpos(u)=endpos(v) disjointoronecontainedintheother. p=baabbaa,wehavethatbaaaabecauseinalltheplaceswhereaaendsin (noticethatoneofthefactorsmustbeasuxoftheotherforthisequivalence tohold,althoughtheconverseisnottrue).forinstance,inourexamplepattern thepattern,baaendsalso(andvice-versa). Wedeneanequivalencerelationbetweenfactorsofthepattern.Foru;v2 setsofpositions.astate,therefore,canbethoughtofafactorofthepattern ThenodesoftheDAWGcorrespondtotheequivalenceclassesof,i.e.to
4 inthenondeterministicautomaton. 1;)[p(i2+1;)[:::[p(ik;),where Anotherwaytoseeitisthatthesetofpositionsisinfactthesetofactivestates alreadyrecognized,exceptbecausewedonotdistinguishbetweensomefactors. whichisthesametosaythatwetrytoextendthefactorthatwerecognized withthenexttextcharacter,andkeepthepositionsthatstillmatch.ifweare Thereisanedgelabeledfromthesetofpositionsfi1;i2;:::ikgtop(i1+ p(i;)=(figifimandpi= pattern).asanexample,thedeterministicsuxautomatonofthewordbaabbaa correspondstothesetf0::mg.finally,astateisterminalifitscorresponding subsetofpositionscontainsthelastpositionm(i.e.wematchedasuxofthe isgiveninfigure2. leftwithnomatchingpositions,wedonotbuildthetransition.theinitialstate ;otherwise Fig.2.Deterministicsuxautomatonofthewordbaabbaa.Thelargestnodeisthe initialstate. 0,1,2,3,4,5,6,7 ab2,3,6,7 1,4,52,6 a aba3,7bbaa b The(deterministic)suxautomatonisawellknownstructure[8,5,11,18], 4567 andwedonotproveanyofitspropertieshere(neitherthecorrectnessofthe previousconstruction).thesizeofdawg(p)islinearinm(countingbothnodes algorithmisthatthisautomatoncannotonlybeusedtorecognizethesuxes ofp,butalsofactorsofp.bythesuxautomatondenition,thereisapath andedges),andcanbebuiltinlineartime[8].averyimportantfactforour butoptimalinaverage(o(nlogm=m)time)4.othermorecomplexvariations suchasturbobdm[10]andmultibdm[11,19]achievelineartimeintheworst matchingalgorithmcalledbdm.thisalgorithmiso(mn)timeintheworstcase, 2.2SearchAlgorithm Thesuxautomatonstructureisusedin[10,11]todesignasimplepattern labeledbyxformtheinitialnodeofdawg(p)ifandonlyifxisafactorofp. 4ThelowerboundofO(nlogm=m)inaverageforanypatternmatchingalgorithm underaberbouillimodelisfroma.c.yaoin[24].
5 case.tosearchapatternp=p1p2:::pminatextt=t1t2:::tn,thesux longestone.thebackwardsearchendsbecauseoftwopossiblereasons: suxesofprarethereverseprexesofp).thelastrecognizedprexisthe positionlastinsidethewindowandendingattheendofthewindow(sincethe avariablelast).thiscorrespondstondingaprexofthepatternstartingat searchesbackwardsinsidethewindowforafactorofthepatternpusingthe notcorrespondtotheentirepatternp,thewindowpositionisremembered(in automatonofpr=pmpm?1:::p1(i.ethepatternreadbackwards)isbuilt.a suxautomaton.duringthissearch,ifaterminalstateisreachedwhichdoes windowoflengthmisslidalongthetext,fromlefttoright.thealgorithm 1.Wefailtorecognizeafactor,i.ewereachaletterthatdoesnotcorrespond thewindowtotherightinlastcharacters(wecannotmissanoccurrence toatransitionindawg(pr).figure3illustratesthiscase.wethenshift becauseinthatcasethesuxautomatonwouldhavefounditsprexinthe window). Failtorecognizeafactorat:thepatterncannotstartbefore. SearchforafactorwiththeDAWG Recordinlastthewindowpositionwhenaterminalstateisreached last Window Themaximumprexstartsatlast 2.Wereachthebeginningofthewindow,thereforerecognizingthepatternp. Wereporttheoccurrence,andweshiftthewindowexactlyasintheprevious Fig.3.Basicsearchwiththesuxautomaton safeshift case(noticethatwehavethepreviouslastvalue). Newwindow Searchexample:wesearchthepatternaabbaabinthetext WerstbuildDAWG(pr=baabbaa),whichisgiveninFigure2.Wenotethe currentwindowbetweensquarebracketsandtherecognizedprexinarectangle. Webeginwith T=[abbabaa]bbaab,m=7,last=7. T=abbabaabbaab:
6 1.T=[abbabaa]bbaab. aisafactorofprandareverse prexofp.last=6. 2.T=[abbabaa]bbaab. aaisafactorofprandareverse prexofp.last=5. 3.T=[abbabaa]bbaab. aabisafactorofpr. Wefailtorecognizethenexta. Soweshiftthewindowtolast. Wesearchagainintheposition: T=abbab[aabbaab], last=7. 4.T=abbab[aabbaab]. bisafactorofpr. 5.T=abbab[aabbaab]. baisafactorofpr. 6.T=abbab[aabbaab]. baaisafactorofpr. 7.T=abbab[aabbaab]. baaisafactorofpr,andareverse prexofp.last=4. 8.T=abbab[aabbaab]. baabisafactorofpr. 9.T=abbab[aabbaab]. baabbisafactorofpr. 10.T=abbab[aabbaab]. baabbaisafactorofpr. 11.T=abbab[aabbaab]. Werecognizethewordaabbaab andreportanoccurrence. 3Bit-Parallelism In[2],anewapproachtotextsearchingwasproposed.Itisbasedonbitparallelism[1],whichconsistsintakingadvantageoftheintrinsicparallelism ofthebitoperationsinsideacomputerwordtocutdownthenumberofoperationsbyafactorofatmostw,wherewisthenumberofbitsinthecomputer word. TheShift-Oralgorithmusesbit-parallelismtosimulatetheoperationofa nondeterministicautomatonthatsearchesthepatterninthetext(seefigure4). AsthisautomatonissimulatedintimeO(mn),theShift-Oralgorithmachieves O(mn=w)worst-casetime(optimalspeedup).Ifweconverttheautomatonto deterministicwegetaversionofkmp[14],whichiso(n)searchtime,although twiceasslowinpracticeformw baabbaa Fig.4.Anondeterministicautomatontosearchthepatternp=baabbaainatext. Theinitialstateis0. WeexplainnowavariantoftheShift-Oralgorithm(calledShift-And).The algorithmbuildsrstatablebwhichforeachcharacterstoresabitmask bm:::b1.themaskinb[c]hasthei-thbitsetifandonlyifpi=c.thestateof thesearchiskeptinamachinewordd=dm:::d1,wherediissetwheneverthe
7 statenumberediinfigure4isactive.therefore,wereportamatchwhenever dmisset. textcharacter:eachstategetsthevalueofthepreviousone,providedthetext whichmimicswhatoccursinsidethenondeterministicautomatonforeachnew charactermatchesthecorrespondingarrow.the\j0m?11"correspondstothe usingtheformulad0 WesetD=0originally,andforeachnewtextcharacterTj,weupdateD allthetime). algorithmusesdm=wecomputerwordsforthesimulation(notallthemareactive initialself-loop.forpatternslongerthanthecomputerword(i.e.m>w),the Thisalgorithmisverysimpleandcanbeextendedtohandleclassesofcharacters(i.e.eachpatternpositionmatchesasetofcharacters),andtoallow mismatches.thisparadigmwaslaterenhancedtosupportwildcards,regular problems[22,3].bit-parallelismbecameageneralwaytosimulatesimplenon- expressions,approximatesearch,etc.yieldingthefastestalgorithmsforthose deterministicautomatainsteadofconvertingthemtodeterministic.thisishow weuseitinouralgorithm. 4Bit-ParallelismonSuxAutomata WesimulatetheBDMalgorithmusingbit-parallelism.Theresultisanalgorithm whichissimpler,useslessmemory,hasmorelocalityofreference,andiseasily ((D<<1)j0m?11)&B[Tj] dm:::d1. And,wekeepthestateofthesearchusingmbitsofacomputerwordD= 4.1TheBasicAlgorithm WesimulatethereverseversionoftheautomatonofFigure1.JustasforShift- showlaterhowtoextendthealgorithmforlongerpatterns. extendedtohandlemorecomplexpatterns.werstassumethatmwand ispositionedatanewtextpositionjustafterpos,itsearchesbackwardsthe windowtpos+1::tpos+musingthedawgautomaton,untileithermiterations areperformed(whichimpliesamatchinthecurrentwindow)ortheautomaton cannotperformanytransition. TheBDMalgorithmmovesawindowoverthetext.Eachtimethewindow updated.eachtimewendaprexofthepattern(dm=1)werememberthe weinitializedandscanthewindowbackwards.foreachnewtextcharacterwe Tpos+1+m?k::Tpos+m.Sincewebeginatiteration0,theinitialvalueforDis1m. Thereisamatchifandonlyifafteriterationmitholdsdm=1.Whenever longestprexmatchedcorrespondstothenextwindowposition. dm=1,wehavematchedaprexofthepatterninthecurrentwindow.the Inourcase,thebitdiatiterationkissetifandonlyifpm?i+1::m?i+k= Thealgorithmisasfollows.Eachtimewepositionthewindowinthetext
8 setsthebitscorrespondingtothepositionswherethepatternhasthecharacter c(justasinshift-and).theformulatoupdatedfollows andwesuspendthescanning(thiscorrespondstonothavinganytransitionto followintheautomaton).ifwecanperformmiterationsthenwereportamatch. positioninthewindow.ifwerunoutof1'sindthentherecannotbeamatch notshownforclarity. realcode,relatedtoimprovedowofcontrolandbitmanipulationtricks,are WeuseamaskBwhichforeachcharactercstoresabitmask.Thismask ThealgorithmissummarizedinFigure5.Someoptimizationsdoneonthe D0 (D&B[Tj])<<1 BNDM(p=p1p2:::pm;T=t1t2:::tn) 3. 1.Preprocessing 2. 4.Search Fori21::mdoB[pm?i+1] Forc2doB[c] Whilepos<=n?mdo j D=1m WhileD!=0mdo 0m;last m0m 11. j j?1 D&B[Tpos+j] B[pm?i+1]j0m?i10i? ifd&10m?1!=0mthen Fig.5.Bit-parallelcodeforBDM.Someoptimizationsarenotshownforclarity Endofwhile pos D ifj>0thenlast pos+last D<<1 elsereportanoccurrenceatpos+1 j thecurrentwindowbetweensquarebrackets,aswellastherecognizedprexin Searchexample:wesearchthepatternaabbaabinthetextT=abbabaabba arectangle.webeginwith T=[abbabaa]bbaab,D= ,B=a ab.immediatelyaftereachstepnumber(1to11)weshowthetextandnote last=7,j=7. b ,m=7,
9 1.[abbabaa]bbaab & D= j=6;last=6 2.[abbabaa]bbaab & D= j=5;last=5 3.[abbabaa]bbaab & D= j=4;last=5 4.[abbabaa]bbaab & D= j=3;last=5 Wefailtorecognize thenexta.soweshift thewindowtolast.we searchagainintheposition:abbab[aabbaab],last =7,j=7. 5.abbab[aabbaab] & D= j=6;last=7 6.abbab[aabbaab] & D= j=5;last=7 7.abbab[aabbaab] & D= j=4;last=4 8.abbab[aabbaab] & D= j=3;last=4 9.abbab[aabbaab] & D= j=2;last=4 10.abbab[aabbaab] & D= j=2;last=4 11.abbab[aabbaab] & D= j=0;last=4 Reportanoccurrenceat6. 4.2HandlingLongerPatterns WecancopewithlongerpatternsbysettingupanarrayofwordsDtandsimulatingtheworkonalongcomputerword.Weproposeadierentalternative whichwasexperimentallyfoundtobefaster. Ifm>w,wepartitionthepatterninM=dm=wesubpatternssi,suchthat p=s1s2:::smandsiisoflengthmi=wifi<mandmm=m?w(m?1). Thosesubpatternsaresearchedwiththebasicalgorithm. Wenowsearchs1inthetextwiththebasicalgorithm.Ifs1isfoundata textpositionj,weverifywhethers2followsit.thatis,wepositionawindowat Tj+m1::Tj+m1+m2?1andusethebasicalgorithmfors2inthatwindow.Ifs2is inthewindow,wecontinuesimilarlywiths3andsoon.thisprocessendseither becausewendthecompletepatternandreportit,orbecausewefailtonda subpatternsi. Wehavetomovethewindownow.Aneasyalternativeistousetheshift last1thatcorrespondstothesearchofs1.however,ifwetestedthesubpatterns s1tosi,eachonehasapossibleshiftlasti,andweusethemaximumofallshifts.
10 jj=w))otherwise. Thatis,O(mn)intheworstcase(e.g.T=an;p=am),O(n=m)inthebestcase (e.g.t=an;p=am?1b),ando(nlogjjm=m)onaverage(whichisoptimal). 4.3Analysis ThepreprocessingtimeforouralgorithmisO(m+jj)ifmw,andO(m(1+ Ouralgorithm,however,benetsfrommorelocalityofreference,sincewedonot accessanautomatonbutonlyafewvariableswhichcanbeputinregisters(with theexceptionofthebtable).asweshowintheexperiments,thisdierence makesouralgorithmthefastestone. Inthesimplecasemw,theanalysisisthesameasfortheBDMalgorithm. words).thebestcaseoccurswhenthetexttraversalusings1alwaysperformsits maximumshiftafterlookingonecharacter,whichiso(n=w).weshow,nally, thattheaveragecaseiso(nlogjjw=w).clearlythesecomplexitiesareworse thanthoseofthesimplebdmalgorithmforlongenoughpatterns.weshowin oftheo(mn)stepsofthebdmalgorithmforcestoworkondm=wecomputer theexperimentsuptowhichlengthourversionisfasterinpractice. s1andcheckfortherestofthepattern.thecheckfors2inthewindowcosts Whenm>w,ouralgorithmisO(nm2=w)intheworstcase(sinceeach totalcostincurredbytheexistenceofs2:::smisatmost O(w)atmost.Withprobability1=jjwwends2andchecks3,andsoon.The Thesearchcostfors1isO(nlogjjw=w).Withprobability1=jjw,wend theshiftsnow.thesearchofeachsubpatternsiprovidesashiftlasti,andwe whichthereforedoesnotaectthemaincosttosearchs1(neitherintheory sincetheextracostiso(1)norinpracticesince"isverysmall).weconsider takethemaximumshift.now,theshiftlastiparticipatesinthismaximumwith M?1 Xi=1w takingthemaximum)thelongestpossibleshiftswwiththeirprobabilities,we probability1=jjwi.thelongestpossibleshiftisw.hence,ifwesum(insteadof jjwi"=w jjw(1+o(w=jjw))=o(1) 5FurtherImprovements longerthanlast1andshorterthanlast1+"=last1+o(1),andhencethecost isthatofsearchings1pluslowerorderterms. getintothesamesumabove,whichis"=o(1).therefore,theaverageshiftis [10,15],thelastonebeinglinearintheworstcaseandstillsublinearonaverage.Themainideaistoavoidretraversingthesamecharactersinthebackward caseevenformw,sincewecantraversethecompletewindowbackwards andadvanceitinonecharacter.ouraimnowistoreduceitsworstcasefrom O(nm2=w)toO(nm=w),i.e.O(n)whenm=O(w). 5.1ALinearAlgorithm Althoughouralgorithmhasoptimalaveragecase,itisnotlinearintheworst ImprovedvariationsonBDMalreadyexist,suchasTurboBDMandTurboRF
11 positions,wealreadyknowthatti+last::ti+m?1isaprexofthepattern(recallfigure3).theendingpositionoftheprexinthewindowisusuallycalled thecriticalposition.themainproblemifthisareaisnotretraversedishowto rememberonlytherstone. asfollows:letubethepatternprexbeforethecriticalposition.ifwereach setofpositionswhichisgivenbythestatewereachedinthesuxautomaton. p=uzr)werecognizethewholepatternp,andthenextshiftcorrespondsto thelongestborderofp(i.e.thelongestproperprexthatisalsoasux),which Weshifttotherightmostoccurrenceofzrinthepattern. possibletoknowwhetherzrisasuxofthepatternp:ifzrisasux,(i.e. thecriticalpositionafterreading(backwards)afactorzwiththedawg,itis canbecomputedinadvance.ifzrisnotasux,itappearsinthepatternina OnestrategyaddsakindofBMmachinetotheBDMalgorithm.Itworks windowvericationusingthefactthatwhenweadvancethewindowinlast determinethenextshift,sinceamongallpossibleshiftsinti+last::ti+m?1we preprocessingphasetoassociateinlineartimeanoccurrenceofzrinthepattern patternafterthebmshift.wedothatnow.recallthatuistheprexbefore thecriticalposition.theturborf(secondvariation)[10]usesacomplicated thefactorzwereadwiththedawgisasux,wetestwhetherdjzj=1.to gettherightmostoccurrence,weseektherightmost1ind,whichwecanget (ifitexists)inconstanttimewithlog2(d&(d?1))5.weimplementedthis algorithmunderthenamebmbndmintheexperimentalpartofthispaper. Thisalgorithmremainsquadratic,becausewedonotkeepaprexofthe ItisnotdiculttosimulatethisideainourBNDMalgorithm.Toknowif usethispreprocessingphaseondawgs.withoursimulation,thispreprocessing toaborderbuofu,inordertoobtainthemaximalprexofthepatternthatisa suxofuzr.moreover,theturborfusesasuxtree,anditisquitedicultto phasebecomessimple.toeachprexuiofthepatternp,weassociateamask Bord[i]thatregistersthestartingpositionsofthebordersofui(included). factorzends).hence,thebitsofx=bord[i]&darethepositionssatisfying anoccurrenceofzr.therstsetofpositionsisbord[i],andthesecondoneis bothcriteria.aswewanttherightmostsuchoccurrence(i.e.themaximalprex), nameturbobndmintheexperimentalpartofthispaper. preciselythecurrentdvalue(i.e.positionsinthepatternwheretherecognized wetakeagainlog2(x&(x?1)).weimplementedthisalgorithmunderthe borderofu,wewantthepositionswhichstartaborderofuandcontinuewith Thistableisprecomputedinlineartime.Now,tojoinoneoccurrenceofzrtoa 5.2AConstant-SpaceAlgorithm Itisalsointerestingtonoticethat,althoughthealgorithmneedsO(jjm=w) extraspace,wecanmakeitconstantspaceonabinaryalphabet2=f0;1g. 5Itisfasterandcleanertoimplementthislog2byshiftingthemasktotherightuntil andgetthesameresult. itbecomeszero.usingthistechniquewecanusethesimplerexpressiond^(d?1)
12 Thetrickisthatinthiscase,B[1]=pandB[0]=B[1].Therefore,weneed whichifthealphabetisconsideredofconstantsizeisofthesameorderofthe representingthesymbolsofwithbitsandworkingonthebits(themisaligned noextrastorageapartfromthepatternitselftoperformalltheoperations.in normalsearchtime. theory,anytextoveranitealphabetcouldbesearchedinconstantspaceby matcheshavetobelaterdiscarded).thisinvolvesanaveragesearchtimeof 6Extensions mlog2jjlog2(mlog2jj)=normaltimelog2jj1+log2log2jj nlog2jj log2m Weanalyzenowsomeextensionsapplicabletoourbasicscheme,whichforma thisworktheonlyextendedpatternswedealwitharethoseallowingaclassof successfulcombinationofeciencyandexibility. charactersateachposition. patterns"thosethataremorecomplexthanasimplestringtobesearched.in 6.1ClassesofCharacters AsintheShift-Oralgorithm,weallowthateachpositioninthepatternmatches notonlyasinglecharacterbutanarbitrarysetofcharacters.wecall\extended isnotanymoreadawg.wecallitextendeddawg.toourknowledge,this ognizesallsuxesofanextendedpatternp=c1c2:::cm.thisautomaton inp.afactorx=x1x2:::xrofp=c1c2:::cmisasuxifx12cm?r+1;x22 thatx12ci?r+1;x22ci?r+2;:::;xr2ci.suchaniiscalledapositionofx Ci?r+2;:::;xr2Cm. inisafactorofanextendedpatternp=c1c2:::cmifthereexistsanisuch Similarlytotherstpartofthiswork,wedesignanautomatonwhichrec- Wedenotep=C1C2:::Cmsuchextendedpatterns.Awordx=x1x2:::xr intheextendedpatternb[a,b]abbaa,andl-endpos(bba)=f3;6g(noticethat, DAWG,exceptforthenewdenitionofsuxes.Foranyxfactorofp,wedenote L-endpos(x)thesetofpositionsofxinp.Forexample,L-endpos(baa)=f3;7g implementation. ConstructionTheconstructionweuseisquitesimilartotheonewegiveforthe kindofautomatonhasneverbeenstudied.werstgiveaformalconstruction unlikebefore,thesetsofpositionscanbenotdisjointandnooneasubsetofthe oftheextendeddawg(provingitscorrectness)andlaterpresentabit-parallel other).wedenetheequivalencerelationeforu;vfactorsofpby uevifandonlyifl-endpos(u)=l-endpos(v):
13 factors(aspreviouslydened).theequivalencerelationeiscompatiblewith Lemma1LetpbeanextendedpatternandEtheequivalencerelationonits theconcatenationonwords. Wedenep(i;)withi2f0;1;:::;m;m+1g;2by StatesoftheautomatonaretheequivalenceclassesofE.Thereisanedge Thislemmaallowsustodeneanautomatonfromthisequivalenceclass. p(i;)=(figifimand2ci labeledbyfromthesetofpositionsfi1;i2;:::ikgtop(i1+1;)[p(i2+ ;otherwise word[a,b]aa[a,b]baaisgiveninfigure6. 1;)[:::[p(ik+1;),ifitisnotempty.Theinitialnodeoftheautomaton thesetofpositionsthatcontainm.asanexample,thesuxautomatonofthe isthesetthatcontainsallthepositions.terminalsnodesoftheautomatonare 0,1,2,3,4,5,6,7ba1,2,3,4,6,7 1,4,5aa2,3,4,7 2,6 4,5b b aaa,bbaa b3,7 3,44567 a,b Lemma2TheExtendedDAWGofanextendedpatternp=C1C2:::Cmrecognizesthesetofsuxesofp. Fig.6.ExtendedDAWGoftheextendedpattern0[a;b]1a2a3[a;b]4b5a6a7 ba bit-parallelism. Abit-parallelimplementation:fromtheaboveconstruction,theonlymodicationthatouralgorithmneedsisthattheBtablehasthei-thbitsetforall charactersbelongingtothesetofthei-thpositionofthepattern.thereforewe tendedpatternp.wedonotgiveanalgorithmtobuildthisextendeddawg Wecanusethisnewautomatontorecognizethesetofsuxesofanex- initsdeterministicform,butwesimulatethedeterministicautomatonusing simplychangeline3(partofthepreprocessing)inthealgorithmoffigure5to Fori21::m;c2doifc2pithenB[c] B[c]j0m?i10i?1
14 longshifts.however,thisismuchmoreresistantthansomesimplevariationsof doesnotchange. suchthatnowthepreprocessingtakeso(jjm)timebutthesearchalgorithm characters.thisiscommon,forinstance,indnadatabases.wecaneasily itselfmayhavebasiccharactersaswellasothersymbolsdenotingsetsofbasic Boyer-Mooresinceitusesmoreknowledgeaboutthematchedcharacters. canbedegradediftheclassesofcharactersaresignicantlylargeandprevent Moore-likealgorithm.Itshouldbeclear,however,thattheeciencyoftheshifts Wepointoutnowanotherextensionrelatedtoclassesofcharacters:thetext WecombinetheexibilityofextendedpatternswiththeeciencyofaBoyerhandlesuchtexts.AssumethatthesymbolCrepresentsthesetfc1;:::;crg. ThenwesetB[C]=B[c1]j:::jB[cr].Thisismuchmorediculttoachieve oflengthminparallel,wecanuseanarrangementproposedin[22],which withalgorithmsnotbasedonbit-parallelism. 6.2MultiplePatterns TosearchasetofpatternsP1:::Pr(i.e.reportingtheoccurrencesofallthem) concatenatesthepatternsasfollows:p=p11p21:::pr1p12p22:::pr2::::: P1mP2m:::Prm(i.e.alltherstletters,thenallthesecondletters,etc.)and Figure5isthattheshiftisnotinonebitbutinrbitsinline15(sincewehave searchespjustasasinglepattern.theonlydierenceinthealgorithmof position.thatis,wereplacetheold10m?1testmaskby1r0r(m?1)inline12. neededforeachword.moreover,itwillreportthematchesofanyofthepatterns dmofthecomputerwordweconsideralltherbitscorrespondingtothehighest rbitspermultipatternposition)andthatinsteadoflookingforthehighestbit andwillnotallowshiftingmorethanwhatallpatternsallowtoshift. patterns).inthiscasetheshiftinline15isforonebit,andthemaskforline12is (10m?1)r.Onsomeprocessorsashiftinonepositionisfasterthanashiftinr>1 positions,whichcouldbeanadvantageforthisarrangement.ontheotherhand, Thiswillautomaticallysearchforrwordsoflengthmandkeepallthebits intheircurrentproposal. inthiscasewemustclearthebitsthatarecarriedfromthehighestpositionof apatterntothenextone,replacingline15ford=(d<<1)&(1m?10)r.this dierentlengthsforthealgorithmofwuandmanber[22]whichisnotpossible involvesanextraoperation.finally,thisarrangementallowstohavepatternsof Analternativearrangementis:P=P1P2:::Pr(i.e.justconcatenatethe sothatthepatternsineachgrouptinwbits.sincethisskipscharacters,itis betteronaveragethan[22].asweshowintheexperiments,thisisalsobetter ifmbw=2candrm>wwedividethesetofpatternsintodr=bw=mcegroups, themostconservativeamongalltherpatterns. thansequentiallysearchingeachpatterninturn,evengiventhattheshiftsare Clearlythesetechniquescannotbeappliedtothecasem>bw=2c.However,
15 patterninatextallowingatmostk\errors".theerrorsareinsertions,deletions Approximatestringmatchingistheproblemofndingalltheoccurrencesofa 6.3ApproximateStringMatching oneforlowerrorlevels. anecientlterisproposedtodeterminethatlargetextareascannotcontain allthepiecesinparallel.sincekerrorscannotdestroythek+1pieces,someof thepiecesmustappearwithnoerrorsclosetoeachoccurrence.theyusethe andreplacementstoperforminthepatternsothatitmatchesthetext.in[22], thebestofbothworlds:ourperformanceiscomparabletoboyer-moorealgorithmsandwekeeptheexibilityofbit-parallelismhandleclassesofcharacters. Weshowintheexperimentshowouralgorithmperformsinthissetup. 7ExperimentalResults Weranextensiveexperimentsonrandomandnaturallanguagetexttoshow Ourmultipatternsearchtechniquepresentedintheprevioussectioncombines anoccurrence.itisbasedondividingthepatternink+1piecesandsearching amultipatternboyer-moorestrategyispreferred,whichisfasterbutdoesnot handleclassesofcharactersandotherextensions.thisalgorithmisthefastest multipatternsearchalgorithmmentionedinthepreviousparagraph.in[4,3], textsandpatternswith=2to64,aswellasnaturallanguagetextanddna sequences. UltraSparc-1of167MHz,with64MbofRAM,runningSunOS5.5.1.WemeasureCPUtimes,whicharewithin2%with95%condence.Weusedrandom howecientareouralgorithmsinpractice.theexperimentswererunonasun thebmfamily.turbobndmiscompetitivewithsimplebndmandhaslinear simplebndm.classicalbdm,ontheotherhand,issometimesslowerthan form2-6.thefastestalgorithmisbmbndm,thoughitisverycloseto KMP(veryslowtoappearintheplots,closeto0.14sec/Mb),Shift-Or(not patterns.thecomparisonincludesthebestknownalgorithms:bm,bm-sunday, alwaysshown,closeto0.07sec/mb),classicalbdm,andourthreebit-parallel variants:bndm,bmbndmandturbobndm. Ourbit-parallelalgorithmsarealwaysthefastestforshortpatterns,except WeshowinFigure7someoftheresultsforshort(mw)andlong(m>w) BNDM).Forlargeralphabets,ontheotherhand,anotherverysimplealgorithm ismorecomplex(noticethatboyer-mooreisfasterthanbdm,butslowerthan worstcase.ouralgorithmsareespeciallygoodforsmallalphabetssincetheyuse moreinformationonthematchedpatternthanothers.theonlygoodcompetitor forsmallalphabetsisboyer-moore,whichhoweverisslowerbecausethecode getsveryclose:bm-sunday.however,wearealwaysatleast10%faster. 6Wedidnotincludethemorecomplexvariationsofouralgorithmbecausetheyhave alreadybeenshownverysimilartothesimpleone.wedidnotincludealsothe algorithmswhichareknownnottoimprove,suchasshift-orandkmp. Onlongerpatterns6ouralgorithmceasestoimprovebecauseitbasically
16 searchesfortherstwlettersofthepattern,whileclassicalbdmkeepsimproving.hence,ouralgorithmceasestobethebestone(beatenbybdm)form Thisvaluewouldatleastduplicateina64-bitarchitecture. generatedmanuallyasfollows:weselectfromanenglishtextaninfrequentword, thebndmalgorithm.wecomparetheeciencyagainstshift-or.theresultis presentedintable1,whichshowsthateveninthecaseofthreeinitialornal namely"responsible"(closeto10matchespermegabyte).thenwereplaceits lettersallowingalargeclassofcharacterstheshiftsaresignicantandwedouble theperformanceofshift-or.hence,ourgoalsofhandlingclassesofcharacters rstorlastcharactersbytheclassfa::zg.thiswilladverselyaecttheshiftsof withimprovedsearchtimesareachieved. Weshowalsosomeillustrativeresultsusingclassesofcharacters,whichwere responsible responsibl? responsib?? responsi??? ?esponsible ??sponsible ???ponsible PatternShift-OrBNDM Table1.Searchtimeswithclassesofcharacters,in1/100-thofsecondspermegabyte onenglishtext.thequestionmark'?'representstheclassfa::zg. rstarrangementisslightlymoreecientthanthesecondone,theyarealways calledmulti-bndm(1)and(2)attendingtotheirpresentationorder),against vesequentialsearcheswithbndm(calledbndminthelegend),andagainst theparallelversionproposedin[22](calledmulti-wm).asitcanbeseen,our moreecientthanasequentialsearch(althoughtheimprovementisnotve-fold thatalthoughwetaketheminimumshiftamongallthepatterns,wecanstill dobetterthansearchingeachpatterninturn.wetakerandomgroupsofve patternsoflength6andcompareourmultipatternalgorithm(initstwoversions, WepresentinFigure8someresultsonourmultipatternalgorithm,toshow forapproximatestringmatching.weincludethefastestknownalgorithmsin thecomparison[4,3,7,13,16,23,22].wecomparethosealgorithmsagainst buttwo-orthree-foldbecauseofshortershifts),andaremoreecientthanthe ourversionof[4](wherethesundayalgorithmisreplacedbyourbndm),while proposalof[22]provided8. weconsider[22]notasthebit-parallelalgorithmpresentedtherebuttheirother proposal,namelyreductiontoexactsearchingusingtheiralgorithmmulti-wm formultipatternsearch(showninthepreviousexperiment).figure9showsthe Finally,weshowtheperformanceofourmultipatternalgorithmwhenused
17 resultsfordierentalphabetsizesandm=20. algorithmceasestobecompetitiveshortbeforetheoriginalversion[4].thisis back,ouralgorithmisquitecloseto[4](sometimesevenfaster)whichmakesit becausethelengthofthepatternstosearchforiso(m=k).despitethisdraw- areasonablycompetitiveyetmoreexiblealternative,whilebeingfasterthan theotherexiblecandidate[22]. 8Conclusions SinceBNDMisnotverygoodforveryshortpatterns,theapproximatesearch ofanondeterministicsuxautomaton.thisautomatonhasbeenpreviously Wepresentanewalgorithm(calledBNDM)basedonthebit-parallelsimulation usedindeterministicforminanalgorithmcalledbdm.ournewalgorithm isexperimentallyshowntobeveryfastonaverage.itisthefastestalgorithm matchingandapproximatepatternmatching,amongothers. tendedsimplyandecientlytohandleclassesofcharacters,multiplepattern usingbit-parallelismandbecomepracticalalgorithms.turbobndmhasaverageperformanceveryclosetobndm,thougho(n)worstcasebehavior,while BMBNDMisslightlyfasterthanBNDM.TheBNDMalgorithmcanbeex- inallcasesforpatternsfromlength5to110(onenglish;theboundsvary variationscalledturbobndmandbmbndmwhicharederivedfromthecor- dependingonthealphabetsizeandthearchitecture).wepresentalsosome respondingvariantsofbdm.thesevariantsaremuchmoresimplyimplemented tershasneverbeenstudied.itsstudyshouldpermittoextendthebdmand TurboRFtohandleclassesofcharacters. Thenewsuxautomatonweintroduceandsimulateforclassesofcharac- References isjustabmalgorithmwhichusespairsofcharactersinsteadofsingleones. matchingsoftwares.weplantoworkonthisideatoo. Thisisanorthogonaltechniquethatcanbeincorporatedinallalgorithms,and ageneralstudyofthistechniquewouldpermittoimprovethespeedofpattern TheAgrepsoftware[21]isinmanycasesfasterthanBNDM.However,Agrep 5.A.Blumer,A.Ehrenfeucht,andD.Haussler.Averagesizesofsuxtreesand 4.R.Baeza-YatesandC.Perleberg.Fastandpracticalapproximatepatternmatching.InProc.CPM'92,pages185{192.Springer-Verlag,1992.LNCS644ing.InProc.ofCPM'96,pages1{23, (10):74{82,October1992. putercongress,volumei,pages465{476.elsevierscience,september R.Baeza-YatesandG.Navarro.Afasteralgorithmforapproximatestringmatch- 1.R.Baeza-Yates.Textretrieval:Theoryandpractice.In12thIFIPWorldCom- 2.R.Baeza-YatesandG.Gonnet.Anewapproachtotextsearching.CACM, dawgs.discreteappliedmathematics,24(1):37{45, R.S.BoyerandJ.S.Moore.Afaststringsearchingalgorithm.Communications oftheacm,20(10):762{772,1977.
18 10.M.Crochemore, 9.M.Crochemore, 8.M.Crochemore.Transducersandrepetitions.Theor.Comput.Sci.,45(1):63{86, 7.W.ChangandJ.Lampe.Theoreticalandempiricalcomparisonsofapproximate stringmatchingalgorithms.inproc.ofcpm'92,pages172{181,1992.lncs R.N.Horspool.Practicalfastsearchinginstrings.Softw.Pract.Exp.,10:501{506, 11.M.CrochemoreandW.Rytter.Textalgorithms.OxfordUniversityPress,1994. S.Jarominek,T.Lecroq,W.Plandowski,andW.Rytter.Fastpracticalmultipatternmatching.Rapport93-3,InstitutGaspardMonge,UniversitedeMarnela Vallee,1993. L.Gasieniec,S.Jarominek,T.Lecroq,W.Plandowski,andW.Rytter.Speeding uptwostring-matchingalgorithms.algorithmica,(12):247{267,1994. A.Czumaj, 13.P.Jokinen,J.Tarhio,andE.Ukkonen.Acomparisonofapproximatestring 14.D.E.Knuth,J.H.Morris,Jr,andV.R.Pratt.Fastpatternmatchinginstrings. matchingalgorithms.softwarepracticeandexperience,26(12):1439{1458, A.Czumaj, 15.T.Lecroq.Recherchesdemot.Thesededoctorat,Universited'Orleans,France, 16.G.Navarro.Apartialdeterministicautomatonforapproximatestringmatching. SIAMJournalonComputing,6(1):323{350, M.Ranot.Onthemultibackwarddawgmatchingalgorithm(MultiBDM).In 17.G.NavarroandM.Ranot.Abit-parallelapproachtosuxautomata:Fast 18.M.Ranot.Asymptoticestimationoftheaveragenumberofterminalstatesin InProc.ofWSP'97,pages112{124.CarletonUniversityPress,1997. Processing,pages149{165,Valparaiso,Chile,November12-13,1997.CarletonUniversityPress. Chile,November12-13,1997.CarletonUniversityPress. R.Baeza-Yates,editor,Proceedingsofthe4rdSouthAmericanWorkshoponString dawgs.inr.baeza-yates,editor,proc.ofwsp'97,pages140{148,valparaiso, puterscience,univ.ofchile,jan1998.ftp://ftp.dcc.uchile.cl/pub/users/- gnavarro/bndm.ps.gz. extendedstringmatching.technicalreporttr/dcc-98-1,dept.ofcom- 20.D.Sunday.Averyfastsubstringsearchalgorithm.CACM,33(8):132{142,August 21.S.WuandU.Manber.Agrep{afastapproximatepattern-matchingtool.In 22.S.WuandU.Manber.Fasttextsearchingallowingerrors.CACM,35(10):83{91, 23.S.Wu,U.Manber,andE.Myers.Asub-quadraticalgorithmforapproximate 24.A.C.Yao.Thecomplexityofpatternmatchingforarandomstring.SIAMJournal Proc.ofUSENIXTechnicalConference,pages153{162, October1992. oncomputing,8(3):368{387,1979. limitedexpressionmatching.algorithmica,15(1):50{67,1996. ThisarticlewasprocessedusingtheLATEXmacropackagewithLLNCSstyle
19 m m m m m m BDM BNDM BMBNDM TurboBNDMShift-Or Sunday Boyer-Moore Fig.7.Timesin1/100-thofsecondspermegabyte.Forrsttothirdrow,random textwith=4,randomtextwith=64andenglishtext.leftcolumnshowsshort patterns,rightcolumnshowslongpatterns.
20 t Multi-BNDM(1)Multi-BNDM(2)Multi-WMBNDM Fig.8.Timesin1/100-thofsecondspermegabyte,formultipatternsearchonrandom textofdierentalphabetsizes(xaxis) k t k t Ex.Part.(ours) Ex.Part.[4] Ex.Part.[22] BitParall.[3]Col.Part.[7] Counting[13]+DFA[16] 4-russians[23] Fig.9.Timesinsecondspermegabyte,forrandomtextonpatternsoflength20,and =16and64(rstandsecondcolumn,respectively).Thexaxisisthenumberof errorsallowed.
Online EFFECTIVE AS OF JANUARY 2013
2013 A and C Session Start Dates (A-B Quarter Sequence*) 2013 B and D Session Start Dates (B-A Quarter Sequence*) Quarter 5 2012 1205A&C Begins November 5, 2012 1205A Ends December 9, 2012 Session Break
4 m m 2m 21 K N Am -K 5K E m m m m K S mm m B m V ms S m S E D m V m 1 m m m m m 2 ( m ) 2 m E mm m m mn A m V mm m m E mm m m K m mm m K 3 495 175 B 19 415 16 66 A D ( 1 23 391)1 928 9 337 S G O 18 3
Fast string matching
Fast string matching This exposition is based on earlier versions of this lecture and the following sources, which are all recommended reading: Shift-And/Shift-Or 1. Flexible Pattern Matching in Strings,
Improved Single and Multiple Approximate String Matching
Improved Single and Multiple Approximate String Matching Kimmo Fredriksson Department of Computer Science, University of Joensuu, Finland Gonzalo Navarro Department of Computer Science, University of Chile
Ź Ź ł ź Ź ś ź ł ź Ś ę ż ż ł ż ż Ż Ś ę Ż Ż ę ś ź ł Ź ł ł ż ż ź ż ż Ś ę ż ż Ź Ł Ż Ż Ą ż ż ę ź Ń Ź ś ł ź ż ł ś ź ź Ą ć ś ś Ź Ś ę ę ć ż Ź Ą Ń Ą ł ć ć ł ł ź ę Ś ę ś ę ł ś ć ź ś ł ś ł ł ł ł ć ć Ś ł ź Ś ł
Number of objects. 16 32 64 128 256 512 1k 2k 4k 8k 16k 32k 64k 128k256k512k 1m 2m 4m 8m
GarbageCollectionforLargeMemoryJava AndreasKrallandPhilippTomsich Applications InstitutfurComputersprachen,TechnischeUniversitatWien Argentinierstrae8,A{1040Wien,Austria tolarge,data-intensivescienticapplicationsallocatingmemoryinthe
Factoring - Factoring Special Products
6.5 Factoring - Factoring Special Products Objective: Identify and factor special products including a difference of squares, perfect squares, and sum and difference of cubes. When factoring there are
A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW)
Journal of Computer Science 4 (5): 393-401, 2008 ISSN 1549-3636 2008 Science Publications A Fast Pattern Matching Algorithm with Two Sliding Windows (TSW) Amjad Hudaib, Rola Al-Khalid, Dima Suleiman, Mariam
Factoring Methods. Example 1: 2x + 2 2 * x + 2 * 1 2(x + 1)
Factoring Methods When you are trying to factor a polynomial, there are three general steps you want to follow: 1. See if there is a Greatest Common Factor 2. See if you can Factor by Grouping 3. See if
A Partition-Based Efficient Algorithm for Large Scale. Multiple-Strings Matching
A Partition-Based Efficient Algorithm for Large Scale Multiple-Strings Matching Ping Liu Jianlong Tan, Yanbing Liu Software Division, Institute of Computing Technology, Chinese Academy of Sciences, Beijing,
timeout StoR!msg0 RtoS?ack0
c1997kluweracademicpublishers,boston.manufacturedinthenetherlands. FormalMethodsinSystemDesign,,?{??(1997) SymbolicVericationofCommunication ProtocolswithInniteStateSpacesusingQDDs queues.itiswell-knownthatmostinterestingvericationproblems,suchasdeadlockdetection,
PERFECT SQUARES AND FACTORING EXAMPLES
PERFECT SQUARES AND FACTORING EXAMPLES 1. Ask the students what is meant by identical. Get their responses and then explain that when we have two factors that are identical, we call them perfect squares.
7-6. Choosing a Factoring Model. Extension: Factoring Polynomials with More Than One Variable IN T RO DUC E T EACH. Standards for Mathematical Content
7-6 Choosing a Factoring Model Extension: Factoring Polynomials with More Than One Variable Essential question: How can you factor polynomials with more than one variable? What is the connection between
DECLARATION OF PERFORMANCE NO. HU-DOP_TN-212-25_001
NO. HU-DOP_TN-212-25_001 Product type 212 (TN) 3,5x25 mm EN 14566:2008+A1:2009 NO. HU-DOP_TN-212-35_001 Product type 212 (TN) 3,5x35 mm EN 14566:2008+A1:2009 NO. HU-DOP_TN-212-45_001 Product type 212 (TN)
DECLARATION OF PERFORMANCE NO. HU-DOP_TD-25_001
NO. HU-DOP_TD-25_001 Product type TD 3,5x25 mm EN 14566:2008+A1:2009 NO. HU-DOP_TD-35_001 Product type TD 3,5x35 mm EN 14566:2008+A1:2009 NO. HU-DOP_TD-45_001 Product type TD 3,5x45 mm EN 14566:2008+A1:2009
An efficient matching algorithm for encoded DNA sequences and binary strings
An efficient matching algorithm for encoded DNA sequences and binary strings Simone Faro and Thierry Lecroq [email protected], [email protected] Dipartimento di Matematica e Informatica, Università
FORT LAUDERDALE INTERNATIONAL BOAT SHOW BAHIA MAR IN-WATER SET-UP SCHEDULE
IN-WATER SET-UP SCHEDULE 200-221 B DOCK Friday, October 22 9:00 a.m. 1 FACE DOCK Saturday, October 23 10:00 a.m. 222-245 Friday, October 22 11:00 a.m. 2 Sunday, October 24 10:00 a.m. 3 Sunday, October
Factoring. Factoring Polynomial Equations. Special Factoring Patterns. Factoring. Special Factoring Patterns. Special Factoring Patterns
Factoring Factoring Polynomial Equations Ms. Laster Earlier, you learned to factor several types of quadratic expressions: General trinomial - 2x 2-5x-12 = (2x + 3)(x - 4) Perfect Square Trinomial - x
1.4. Removing Brackets. Introduction. Prerequisites. Learning Outcomes. Learning Style
Removing Brackets 1. Introduction In order to simplify an expression which contains brackets it is often necessary to rewrite the expression in an equivalent form but without any brackets. This process
READ ME For all study abroad students. How to study abroad and also graduate successfully:
READ ME For all study abroad students How to study abroad and also graduate successfully: We are providing sample curricula from our partner universities to help you plan ahead for your study abroad semester
A The Exact Online String Matching Problem: a Review of the Most Recent Results
A The Exact Online String Matching Problem: a Review of the Most Recent Results SIMONE FARO, Università di Catania THIERRY LECROQ, Université de Rouen This article addresses the online exact string matching
Trading Calendar - East Capital UCITS Funds
Trading Calendar - UCITS s The table shows i) the days the funds will be closed due to holidays and ii) which days the funds have early cut-off times (11.30am Central European Time). Please note that the
A Multiple Sliding Windows Approach to Speed Up String Matching Algorithms
A Multiple Sliding Windows Approach to Speed Up String Matching Algorithms Simone Faro and Thierry Lecroq Università di Catania, Viale A.Doria n.6, 95125 Catania, Italy Université de Rouen, LITIS EA 4108,
1. Find the length of BC in the following triangles. It will help to first find the length of the segment marked X.
1 Find the length of BC in the following triangles It will help to first find the length of the segment marked X a: b: Given: the diagonals of parallelogram ABCD meet at point O The altitude OE divides
COMMERCIAL AIRLINE FACT SHEET
COMMERCIAL AIRLINE FACT SHEET PASSENGER 100% Process LIFEJACKETS Black ame: SURVITECpos_PMS.eps Colourway: 100% Pantone PMS 158c RFD 102 Mk 2BA (00002136) Demo model (40982001) RFD 102 Mk 3 (00002256)
รายงานผลการด าเน นงาน เร อง โครงการศ นย เร ยนร การเกษตรพอเพ ยงป 2552 โดย
รายงานผลการด าเน นงาน เร อง โครงการศ นย เร ยนร การเกษตรพอเพ ยงป 2552 โดย นายประพนธ ธ ปะเตม ย เกษตรอ าเภอ (น กว ชาการส งเสร มการเกษตรช านาญการ) ส าน กงานเกษตรอ าเภอบางบ วทอง จ งหว ดนนทบ ร รายงานผลการด าเน
Factoring (pp. 1 of 4)
Factoring (pp. 1 of 4) Algebra Review Try these items from middle school math. A) What numbers are the factors of 4? B) Write down the prime factorization of 7. C) 6 Simplify 48 using the greatest common
Russian Mechanized Corp Composition 1942-1945
Russian Mechanized Corp Composition 1942-1945 In September 1942 a Mechanized Corp consisted of the following: Corps 3 Mechanized Brigades BG-20 1 Tank Brigade BG-37 or 2 Tank Regiments BG-22 or 2 Tank
SolidWorks Corporation: CSWP Sample Exam
SolidWorks Corporation: CSWP Sample Exam Certified SolidWorks Professional: Solid Modeling Specialist (CSWP-CORE) These questions are an example of what to expect in Segment 1 of the CSWP-CORE exam. How
VericationofAsynchronousCircuits usingtimedautomata MariusBozga,HouJianmin,OdedMalerandSergioYovine InthisworkweapplythetimingvericationtoolOpenKronos,whichis Abstract basedontimedautomata,toverifycorrectnessofnumerousasynchronouscircuits.
BUSINESS ANALYTICS. Overview. Lecture 0. Information Systems and Machine Learning Lab. University of Hildesheim. Germany
Tomáš Horváth BUSINESS ANALYTICS Lecture 0 Overview Information Systems and Machine Learning Lab University of Hildesheim Germany BA and its relation to BI Business analytics is the continuous iterative
Use Case Diagram. Tom Polanski, Analex Corporation CSCI 6448 - Object-Oriented Analysis and Design (Spring 2001) Homework #3 Use Cases
Tom Polanski, Analex Corporation CSCI 6448 - Object-Oriented Analysis and Design (Spring 2001) Homework #3 Use Cases Use Case Diagram Homeowner Intruder Trigger Wireless Sensor Trigger Access Point Monitor
Future Trends in Airline Pricing, Yield. March 13, 2013
Future Trends in Airline Pricing, Yield Management, &AncillaryFees March 13, 2013 THE OPPORTUNITY IS NOW FOR CORPORATE TRAVEL MANAGEMENT BUT FIRST: YOU HAVE TO KNOCK DOWN BARRIERS! but it won t hurt much!
Improved Approach for Exact Pattern Matching
www.ijcsi.org 59 Improved Approach for Exact Pattern Matching (Bidirectional Exact Pattern Matching) Iftikhar Hussain 1, Samina Kausar 2, Liaqat Hussain 3 and Muhammad Asif Khan 4 1 Faculty of Administrative
How to Code Load Rating of a New Bridge with No Load Rating Analysis. How to Code Load Rating of a Bridge Exempt from Load Rating Per ODOT BDM
BMS Coding of Load Rating How to Load Rating of a New Bridge with No Load Rating Analysis 84 Method of Rating: 5 Engineering Judgment Superstructure (Default) 85 Software of Rating Analysis: 0 No calculations
Chords and Voicings Made Simple By: Sungmin Shin January 2012
Chords and Voicings Made Simple By: Sungmin Shin January 2012 I. Intervals An interval is the space between two notes. intervals of a 2nd, 3rd, 6th, and 7th can be diminished, minor, major, or augmented
EXAMINATION POINT SCORES USED IN THE 2014 SCHOOL AND COLLEGE PERFORMANCE TABLES
1. Points are allocated to each of a pupil s exam results using the scoring systems set out in this document. This enables the calculation of average point scores for pupils at the end of key stage 4 and
~ EQUIVALENT FORMS ~
~ EQUIVALENT FORMS ~ Critical to understanding mathematics is the concept of equivalent forms. Equivalent forms are used throughout this course. Throughout mathematics one encounters equivalent forms of
NOTES: Please check the website regularly as this timetable is subject to change up to 10 days prior to the start date of the examinations
December 2011 Christmas Exam Timetable Full-time Students PROVISIONAL BA (Hons) Degree Level 1 / BA Ordinary Degree Levels 1 & 2 / Higher Certificate Levels 1 & 2 NOTES: Please check the website regularly
The wide window string matching algorithm
Theoretical Computer Science (00) 9 0 www.elsevier.com/locate/tcs The wide window string matching algorithm Longtao He a,, Binxing Fang a, Jie Sui b a Research Center of Computer Network and Information
Improved Single and Multiple Approximate String Matching
Improved Single and Multiple Approximate String Matching Kimmo Fredrisson and Gonzalo Navarro 2 Department of Computer Science, University of Joensuu [email protected] 2 Department of Computer Science,
College of Science. Agricultural Sciences Department. Biology and Chemistry Department. Earth and Space Science Department
College of Science Graduate Degrees: Master of Science (MS), Master of Arts (MA) Undergraduate Degrees: Associate of Applied Science (AAS), Bachelor of Science (BS), Bachelor of Arts (BA) Agricultural
Mark Scheme (Results) January 2012. GCE Decision D1 (6689) Paper 1
Mark Scheme (Results) January 2012 GCE Decision D1 (6689) Paper 1 Edexcel is one of the leading examining and awarding bodies in the UK and throughout the world. We provide a wide range of qualifications
List of Undergraduate Courses University of Economics, Prague Fall/Winter Semester 2015/2016
1FU301 Fundamentals of Accounting in English bachelor Accounting English 3 no 1FU361 Financial reporting under IFRS and US GAAP - Basic Concepts (in English) bachelor Accounting English 3 no 1BP260 Banking
Data Mining Applications in Manufacturing
Data Mining Applications in Manufacturing Dr Jenny Harding Senior Lecturer Wolfson School of Mechanical & Manufacturing Engineering, Loughborough University Identification of Knowledge - Context Intelligent
Factoring Special Polynomials
6.6 Factoring Special Polynomials 6.6 OBJECTIVES 1. Factor the difference of two squares 2. Factor the sum or difference of two cubes In this section, we will look at several special polynomials. These
BACCALAUREATRE DEGREE REQUIREMENTS
BACCALAUREATRE DEGREE REQUIREMENTS BACHELOR OF ARTS (BA) REQUIREMENTS The BA degree emphasizes written and oral communication skills, creative thinking, critical analyses of texts, understanding cultures,
Customer Pole Display SERIES 8035
Customer Pole Display SERIES 8035 Operation Manual Version 1.0 This equipment has been tested and found to comply with the limits for Class A digital device. Pursuant to Part 15 of the FCC Rules. These
Data Mining: Overview. What is Data Mining?
Data Mining: Overview What is Data Mining? Recently * coined term for confluence of ideas from statistics and computer science (machine learning and database methods) applied to large databases in science,
Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures
Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it
S. Mai 1 and C. Zimmermann 2
Az : P. I. C. S C D, S. 649-659, C, USA, 5. Rk A A T C Hz M S. M C. Zmmm A L Gm N S m m. I m z m m k. Rk m, k, m q. T xm m m m w k m. T w k, k x, w k. I Gm m m m. B k m mj m, k w k. T m m mj m. T m m mm.
NRFs administrasjon TLF 22 43 76 60 [email protected]. Norske Rørgrossisters Forening. Efficientinformation logistics. Terje Røising General Manager
NRFs administrasjon TLF 22 43 76 60 [email protected] Terje Røising General Manager Morten Svensen Technical Manager Efficientinformation logistics Iren Bjerklund Database Operator NRF Excel sheet. The following
IMPROVED ALGORITHMS FOR STRING SEARCHING PROBLEMS
TKK Research Reports in Computer Science and Engineering A Espoo 2009 TKK-CSE-A1/09 IMPROVED ALGORITHMS FOR STRING SEARCHING PROBLEMS Doctoral Dissertation Leena Salmela Dissertation for the degree of
Using the ac Method to Factor
4.6 Using the ac Method to Factor 4.6 OBJECTIVES 1. Use the ac test to determine factorability 2. Use the results of the ac test 3. Completely factor a trinomial In Sections 4.2 and 4.3 we used the trial-and-error
IT Application Controls Questionnaire
IT Application Controls Questionnaire Internal Control Questionnaire Question Yes No N/A Remarks A1.a. MULTIPLE USER PROCESSING INPUT CONTROLS Input controls are the procedures and methods utilized by
BALANCED THREE-PHASE CIRCUITS
BALANCED THREE-PHASE CIRCUITS The voltages in the three-phase power system are produced by a synchronous generator (Chapter 6). In a balanced system, each of the three instantaneous voltages have equal
Fundamentele Informatica II
Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear
JUNE PRELIMINARY EXAMINATION TIMETABLE
JUNE PRELIMINARY EXAMINATION TIMETABLE 28-May 08:30 BCDM BCom Digital Marketing 1st Year STM11 Statistics 28-May 08:30 BCM BCom Marketing 1st Year STM11 Statistics 28-May 08:30 BBM BCom Business Management
Factoring - Grouping
6.2 Factoring - Grouping Objective: Factor polynomials with four terms using grouping. The first thing we will always do when factoring is try to factor out a GCF. This GCF is often a monomial like in
Lecture 4: Exact string searching algorithms. Exact string search algorithms. Definitions. Exact string searching or matching
COSC 348: Computing for Bioinformatics Definitions A pattern (keyword) is an ordered sequence of symbols. Lecture 4: Exact string searching algorithms Lubica Benuskova http://www.cs.otago.ac.nz/cosc348/
Certificate of Compliance
No. 0V151007.CFMTW07 Brushless Dc motor FL42BLS01(CE), FL16, FL20, FL22, FL24, FL28, FL32, FL33, FL36, FL42, FL45 EN 61000-6-3:2007+A1:2011, EN 61000-6-1:2007, EN 55014-2:1997+A1:2001+A2:2008, No. 0V151007.CFMTW08
Simplification of Radical Expressions
8. Simplification of Radical Expressions 8. OBJECTIVES 1. Simplify a radical expression by using the product property. Simplify a radical expression by using the quotient property NOTE A precise set of
List of Graduate Courses University of Economics, Prague Fall/Winter Semester 2015/2016
1FP419 Business Valuation (in German) master Accounting German 3 no 1FP421 Business Valuation (in English) master Accounting English 3 no 1FU491 Financial reporting under IFRS and US GAAP - Comparsion
k, then n = p2α 1 1 pα k
Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square
Oral Diagnosis: The Physical Exam
1. Oral Diagnosis: The Physical Exam 2. Comprehensive Evaluation Page - 1 3. Purpose 4. Purpose Page - 2 5. Purpose 6. Purpose Page - 3 7. Purpose 8. Resources Page - 4 9. Basic Techniques 10. Record Findings
SCHOOLOFCOMPUTERSTUDIES RESEARCHREPORTSERIES UniversityofLeeds Report95.4
SCHOOLOFCOMPUTERSTUDIES RESEARCHREPORTSERIES UniversityofLeeds Report95.4 AcquisitionsandApplications Generic3-DShapeModel: DivisionofArticialIntelligence XShen&DCHogg by February1995 sequencesandrepresentedbythecontrolpointsofab-splinesurface.the
Schedule GS-2 INTERMEDIATE GENERAL SERVICE
I. APPLICABILITY AND AVAILABILITY A. Except as modified herein, this schedule is applicable only to a non-residential Customer (1) who elects (a) to receive Electricity Supply Service and Electric Delivery
Basic Music Theory for Junior Cert.
1 Reading Different Clefs Basic Music Theory for Junior Cert. The most commonly used clefs are the treble and bass. The ability to read both of these clefs proficiently is essential for Junior Cert. Music.
Training Manual. Shuffle Master Gaming Three Card Poker Training Manual R20020325
Training Manual 2001 Shuffle Master, Inc. First Printing All Rights Reserved Printed in the United States of America No part of this publication may be reproduced or distributed in any form or by any means,
Rational Expressions - Complex Fractions
7. Rational Epressions - Comple Fractions Objective: Simplify comple fractions by multiplying each term by the least common denominator. Comple fractions have fractions in either the numerator, or denominator,
RESEARCH OF THE NETWORK SERVER IN SELF-SIMILAR TRAFFIC ENVIRONMENT
RESEARCH OF THE NETWORK SERVER IN SELF-SIMILAR TRAFFIC ENVIRONMENT Sergejs Ilnickis Keywords: network traffic, self-similar traffic, traffic analysis. Abstract - Last scientific publication shows that
List of Graduate Courses University of Economics, Prague Fall/Winter Semester 2015/2016
1FP419 Business Valuation (in German) master Accounting German 3 no 1FP421 Business Valuation (in English) master Accounting English 3 no 1FU491 Financial reporting under IFRS and US GAAP - Comparsion
Find all of the real numbers x that satisfy the algebraic equation:
Appendix C: Factoring Algebraic Expressions Factoring algebraic equations is the reverse of expanding algebraic expressions discussed in Appendix B. Factoring algebraic equations can be a great help when
DHL EXPRESS CANADA E-BILL STANDARD SPECIFICATIONS
DHL EXPRESS CANADA E-BILL STANDARD SPECIFICATIONS 1 E-Bill Standard Layout A B C D E F G Field/ DHL Account Number Billing Customer Name Billing Customer Address Billing Customer City Billing Customer
Factoring Polynomials
Factoring Polynomials 4-1-2014 The opposite of multiplying polynomials is factoring. Why would you want to factor a polynomial? Let p(x) be a polynomial. p(c) = 0 is equivalent to x c dividing p(x). Recall
Ukulele Music Theory Part 2 Keys & Chord Families By Pete Farrugia BA (Hons), Dip Mus, Dip LCM
This lesson assumes that you are using a ukulele tuned to the notes G, C, E and A. Ukulele Notes In lesson 1, we introduced the sequence of 12 notes, which repeats up and down the full range of musical
Factoring Trinomials of the Form x 2 bx c
4.2 Factoring Trinomials of the Form x 2 bx c 4.2 OBJECTIVES 1. Factor a trinomial of the form x 2 bx c 2. Factor a trinomial containing a common factor NOTE The process used to factor here is frequently
NormalizingIncompleteDatabases
NormalizingIncompleteDatabases Abstract 600MountainAvenue,MurrayHill,NJ07974USA E-mail:[email protected] AT&TBellLaboratories LeonidLibkin Databasesareoftenincompletebecauseofthepresence ofdisjunctiveinformation,duetoconicts,partialknowledgeandotherreasons.queriesagainstsuchdatabaseswithnullvalues[akg91,il84],isdisjunctiveinforticsofsuchdatabasesandprovenormalizationtheorems
Exercise Set 3. Similar triangles. Parallel lines
Exercise Set 3. Similar triangles Parallel lines Note: The exercises marked with are more difficult and go beyond the course/examination requirements. (1) Let ABC be a triangle with AB = AC. Let D be an
Factoring Polynomials
Factoring Polynomials Factoring Factoring is the process of writing a polynomial as the product of two or more polynomials. The factors of 6x 2 x 2 are 2x + 1 and 3x 2. In this section, we will be factoring
How to Play Chords on your Mountain Dulcimer tuned DAd
How to Play Chords on your Mountain Dulcimer tuned DAd (or Surviving in a Multi-Instrument Jam) by Missy Strothers If you are like me, sooner or later you ll get into a festival situation where you ll
CALIFORNIA S TRADE PUBLICATION FOR THE HOME LOAN ORIGINATOR
CORN TRD PUBCTON OR TH HOM ON ORGNTOR OUTTNDNG COMPNY O TH MONTH YOUR PRMR R TT MORTGG NDR m gg mm 9 % g % H B T m gg v m w O f f H R DWOR K! % mm w NO DM N J B C R w g wb b w v B H / P BB B B C T v f
Langara College Fall 2008 - archived
SCHOOL OF MANAGEMENT BUSM 3200 Operations Management COURSE OUTLINE Section 001 Fall 2008 INSTRUCTOR NAME: Francesca Deveau, MBA, BA (finance & eco), CPF, Lean Certified OFFICE: B253i OFFICE HOURS: Tuesday
CMS-1500 Claim Form/American National Standards Institute (ANSI) Crosswalk for Paper/Electronic Claims
There are two ways to file Medicare claims to CGS - electronically or through a paper form created by the Centers for Medicare & Medicaid Services (CMS-1500). The required information is the same regardless
