In troduction The sele ction pr oblem is de ned as follo ws giv en set con taining distinct elemen ts dra wn from totally ordered domain and giv en a n um b er 1 nd the th or der statistic of ie the elemen t of larger than exactly 1 elemen ts of an ID: 25673
Download Pdf The PPT/PDF document "Chapter Selecting the median DoritDor Ur..." 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.
DoritDorvingalongstandingresultofSconhage,PatersonandPippengereshoasettscanbefoundusingatmost2troductiontotallyordereddomain,andgivenanber1ndthederstatistic,i.e.,theelementoflargerthanexactly1elementsofandsmallerthantheothertsofisthe-thorderstatisticofTheselectionproblemisoneofthemostfundamen-beenelystudied.Selectionisusedasabuildingblocinthesolutionofothertalproblemssucsortingandndingconexhulls.Itissomewhatsurpris-ingthereforeonlyintheearly70'sitwasshosho+73],thattheselectionproblemcanbesolvedin)time.problem,theworkofBlumetal.completelysolvestheproblem.Ordoesit?AverynaturalsettingfortheselectionproblemisarisonmoAnalgorithminthismodelcantheinputtsonlybyperformingpairwisebethargedfortheseThecomparisonmodelmodelsbecomparisoncomplexityofndingthemedian?thatexactly1comparisonsareneeded,inthewcase,tondthemaximumorminimumofhreier[Sch32],Kislitsyn[Kis64e tofComputerScience,SchoolofSciences,RaymondandBeverlySacklerFyofExactSciences,elAvivUniv,TelAviv69978,ISRAEL.E-mailaddressescomparisonsareneededtondboththemaximumandumofofoh72]).Exactly2n 1comparisonsareneededtomergetosortedlistshoflength(StocerandYao[SY80)comparisonsareneededtosort(e.g.,FordandJohnson[FJ59Arelativelylargegap,consideringthefundamenbetwnloerandupperboundsontheexactcom-yofndingthemedian.Afterpresentingabasicbee+73]trytooptimizetheiralgorithmandalgorithmthatper-boundcomparisonsarerequired,intheworstcase,tondtheTheresultofBlumetal.issubsequenedbySconhage,PatersonandPippenger[SPP76whopresentabeautifulalgorithmfortheselectionofthemedian,oranyotherelement,usingatmost3Inthisworkweimproethelongstand-algorithmthatusesatmost2andJohn[BJ85](seealsoJohn[Joh88]),im-vingpreviousresultsofKirkpatrick[Kir81],MunroMunroandFusseneggerandGabooG78],obtaineda(1+)loerboundonberofcomparisonsneededtoselecttofasetofts,where)= )log isthebinaryenfunction(alllog-paperwnrecently[DZ95](usingsomewhatdierentmeth-odsfromtheonesusedhere)thatthe-thelementcanbeselectedusingatmost(1+ loglog Thisforsmallvaluesofisalmostopti-boundinparticulara2)loerboundonthenberofcomparisonsneededtondthemedian.Ourworkslightlynarrowsthegapbeteenthebestwnloerandupperboundsonthecomparisoncom-medianproblem.tisquitemodest,manynewideaswererequiredtoobtainit.Thesenewideasshedsomemorelightonthetricacyofthemedianndingproblem. DorandAlgorithmsforselectingthe-thelementforsmallaluesofereobtainedbyHadianandSobel[HS69[HS69a76],Yap[Yap76],RamananandHyal[RH84],Aigner[Aig82]andEusterbrock[Eus93berofcomparisonsneededintheworstcc]showedthatthei-thelementcanbebercomparisons.CuntoandMunro[CM89]hadshownthattheboundofFloydandRivestistightralideausedyScetal.intheirforthemassproductioneintroducefactoriesandperformananalysisoftheirproductioncosts.eobtainimprogreenfactoriesusingwhichwecanimproethe3resultofSconhage,PatersonandPippenger.Theperformanceofagreenfactoryismainlycacterizedbytoparameters)comparisons.oselectthemedian,euseafactorywith;A95.Actually,thereisatradeobeteentheloeranduppercostsofafactoryorev2wychooseecanselectthet,forexample,usingatmost2yusingafactorywith4andInthispaper,weconcentrateonfactoriesformedianselection.Itiseasytoverifythatthealgorithmdescribedhere,asthemedianndingalgorithmsofbothBlumetal.etal.,canbeimplementedinlineartimeintheRAMmodel.describeinmoredetailtheconceptoffactoryproductionandintroduceournotionpropertiesalgorithmwedescribeisageneralizationofthemedianmedian]andissimilartotheselectionalgorithmwedescribee].Inthesubsequentsectionswetrytodemonstratethemainideasusedintheconstructionofournewgreenfactories.Duetolackofspace,manyofthedetailsareomitted.actoryproductioncomposedtssmallerthanFig.1). }| { | {z Figure1:Thepartialorderorder]showthatproducingusuallyrequiresfewercomparisonsthantimestheberofcomparisonsrequiredtoproduceasingleThebestw,priortothiswork,ofproducingasingleaboutthemedianof2+1elementsusingthe3)mediancostperycanbecutbyalmostahalfifthe'saremassproducedusingfactories.Theinputstreamofasimplefactoryconsistsofsingle,anewdisjointcopyofisproduced.Afactoryiscythewingquanistheberofcomparisonsneededber;andnallytheductionr,whichisthemaximalnberfactorywhenlackofinputsstopsproduction.orev[SPP76]constructfactorieswiththefollowingcinitialck;etal.alsoshowthatifthereex-istfactories,for's,satisfying,forsomeA0,and;Rmedianoftscanbefoundusingatmost)compar-Theaboetheoremimmediatelyimpliesthereforetheexistenceofa3)medianalgorithm.Thewyfactoriesareusedbyselectionalgorithmsisdescribedinthenextsection.ornowwejustmen-yaselectionalgorithmareevtuallybroken,withei-upperyhacomparedel-besamesideoftheIfsuchelementsareeverreturnedtothefactorytheknownrelationsamongthemmaysaethefactory SELECTINGTHEMEDIANsomeofthecomparisonsithastoperform.ocapturethatsupportwnrelations).ThisextensionisimplicitinthewofScetal.[SPP76].MakingthisnotionexplicitsimpliestheanalysisofmedianalgorithmofScetal.isinfactobtainedyreplacingthefactoryofTheorem2.1byasimplegreenfactoryAgreenfactoryfor'sismainlycharacterizedbthefollowingtoquanlowerelementcandtheerelementcUsingtheseproductionbecalculatedasfollows:TheamortizedproductioncostofwhoseuppertsareevtuallyreturnedproductiontuallyreturnedTheamortizedproductioncostofanhthatnoneofitselementsisreturnedtothefactoryisNotethatinthisaccountingschemeweattributealltheproductioncosttoelementsthatarenotreturnedtothe.Theinitialcostandtheproductionresidueofabefore.in[DZ95Thenewdenitionusesamortizedcostsperwhereasourolddenitionusedamortizedcostsperdoesancewhethertheloerorupperpartofageneratedbeimplicitin[SPP76].eisagrenfactory;uandprductionr;u3heremeansthat;u3+(1)wherethe(1)iswithrespecttoupperethealgorithmoftoconstructsuchafactoryer,weareabletoreducetheupperandloythefactoryk;econstructedgreenfactoriesthatgeneratepartialordersthataremembersbeeasilyincorporateddescribedoobtainour2medianalgorithmweusegreenwiththefollowingc Figure2:Theorderedlistofeisagrenfactory;umainideasaredescribedinSection5.SelectionalgorithmsInthissectionwedescribeourselectionalgorithm.ThisalgorithmusesanThecomplexityoftheal-gorithmiscompletelydeterminedbythecofthefactoryused.ThisalgorithmisageneralizationofthemedianalgorithmofScetal.andavationoftheselectionalgorithmwedescribein[DZ95smallestusingatmost+(1amongtheinputelementsasthepercenalgorithmusestsaretothis,asproductionserted,usingbinaryinsertion,intoanorderedlist,asw,aseshallsoonshow,thatupper(i.e.,last)andtheelementsaboeittoolargetobepercent,orthatthetreoftheloer(i.e.,rst)andtheelementsbeloitaretoosmalltobethepercentileelementoolargeortoosmalltobethepercentareupperuppertsofthetothefactoryforrecycling.beoftheandletbethenberofelementscurrentlyinthefactory.Theberofelementsthathaenotybeen=(betheofthepercentileelementamongthenon-eliminatedelemen Dorandberbeupperberbe=(asthecentresofallthe'sinthelistsatisfyboththesecriteria,thetsarecurrentlyinthefactorysatisfyneither,andalltheothernon-eliminatedtssatisfyexactlyoneofthesecriteria.nectedprocesses:tlymanyelementsarepartialorderproducedanditsisinsertedtotheusingbinaryinsertion.ithecenoftheupperabotoobepercenN+1,thecentreofthelopartialorderlistandbelowitareeliminated,astheyaretoosmalltobepercenupperarerecycled.Thevalueofisupdatedaccordinglyisdecrementedbythenberofelementsintheloerpartof(includingthecen+1.+1andisnotapplicablethenythedenitionwehaWhennooneof(i),(ii)and(iii)canbeappliedwegetthattthisstage),whichis),andtheylinearselectionalgorithm.enowanalyzethecomparisoncomplexityoftheperformed,upperpartialorderofthelistisbrokItscentreandupperarereturnedtothefactoryTheamortizedproductionpartialorderpereachelementaboethecener(iii)isperformed,theloestpartialorderupperreturnedtothefactoryTheamortizedproductioncostperhelementbelowthecentslargerthanthepercentileelementandatmosttssmallerthanthepercentotalproductioncostofallpartialordersareevtuallybrokenisthereforeatmost(+(1).Atmost)generatedpartialordersproductionproductiontotalnberofcomparisonsperformedbythefactoryistherefore(+(1bethenallengthofthelist(whennoneof(i),(ii)and(iii)isapplicable).totalnberofpartialordersisatmost,asisremoedfromThetotalcostofthebinaryinsertionsintothelistisatmost)=)log)whichisThetotalnberofcomparisonsperformedbythealgorithmisthereforeatmost(+(1),asrequired.UsingtheofTheorem2.3,wobtainourmainresult:anbeseledusingatmostBasicprinciplesoffactorydesigndividedintothreesubsections.IntherstsubsectionwremindtheareandwhattheirdescribethenotionofInthethirdsubsectionwesktheconstructionofthefactoriesofScetal.al.Thesefactoriesaredescribedforasimplefactorydesign.describetingprincipleintroducedbyScetal.simplifytheyanalysis.informationwcaretorememberontheelementsthatpassthroughthefactorycanalwysbedescribedusingaHassediagram.hcomparisonmadebythealgorithmaddsanedgepossiblysomestageswemaydecideto`forget'theresultofsomecomparisonsandtheedgesthatcorrespondtothemarebermade,wecanttheberofedgesothisberremaininthefactorywhentheproductionstops.ber,inourfactories,isatmostaconstantimestheproductionresidueoftheanditcanbeattributedtotheinitialcost.Hyperpairsductionofapartialorderfromyproducingalargepartialorder,ahyp,thatcontainsapartialorder SELECTINGTHEMEDIAN Figure3:Somesmall's(Definition4.1.nhyp,wherisabi-narystring,isanitepartialorderwithadistinguishesingleelement(estandsfortheemptystring).isobtainedinthesamewaybuttakingthelowerofthetwocesasthenewcdiagramsofsmallhyperpairspropertiesyperpairsaregiveninthefollowingLemma.etheceofahyp(i)ThecgetherwiththeelementsaterthanitformawithcTheelementsaterthanformadisjointsetofhypsmallerthanitformawithcTheelementssmallerthanformadisjointsetofhyp(ii)Thesmallerwith0,with1.betainsanNoedgesarecutduringtheyperpairs.beforeoutputtingantainedinayperpair,allthetheelementsofthiswithelementsnotcontainedinetobecut.Thisrathercostlyoperationisreferredtoasdpruningc)ofahyperpairberofedgestsofthatarebelowthecenwiththeothertsofdpruningc)ofahyperpairisdenedanalogously,especiallyifagraftingprocessabobeloyperpairmoreconttoconsidertheperelemenpruningcosts.bethenberof0'sand)=tobethebetsbeloatmost)+andthecostofpruningtsaboisatmost)+berWhenanedgeconnectediscut,ayperpairThishyperpaircanthenbeusedintheconstructionofthenextThefollowingLemmaiseasilypro)=0)=0)=)+1)= )= )=)+1producelargervaluesof,wehaetoconstructlargerandlargeryperpairs.Whenwedesignafamilyoffacto-ries,weusuallychooseaninnitebinarystringhmemberofthisfamilyweconstructahyperpairlongenoughbeuppertpruningcostsofaninnitesequencearedenedasthelimits)=lim)and)=limTheselimitsdoexistforthehoseninnitestrings.etal.basetheirfactoriesontheinnite=01(10)forwhich,ascanbeeasilyv)=)=1Inourfactories,wealsoneedyperpairswithcheaperloerelementpruningcostand,expensivupperwingTheorempresenatradeobeteentheupperandloerelementpruningcosts.proofisomittedduetolackofspace.oranya;bW2fforwhich)=)=positiondescribebutcompleteSelectastringyperpairisalongenoughprexofaboeandtsbelowthecentreofthis+1elementsformacopyofByLemma4.1(ii),theremainingelemenformadisjointcollectionofpartialordersoftheform,whereisaprexofpartialordersareusedtoconstructanewthatwillbeusedtoconstructthenexteoutputan,wecutthe2edgesitconsomepartofangeneratedbythefactoryisrecycled,theelementsreturnedtothefactory(assingletons)areusedagainfortheconstructionofhyperpairs.Itiseasytockthattheloerandupperelementcostsofthis Dorandsimplefactoryareboth;u)+)+2.oranW2fegetthattheloeranduppertcostsare;uofthesimplefactoriesscribedaboecanbesignicantlyimproedusingecancheaplyndelementsthataresmallerthanthecenorelementsthatarelargerthanthecen(butnotbothusually).Theprocessofndingsuchele-tsiscalledPruningisthenusedtoobtaintsontheoppositeside.edemonstratethisnotionusingasimpleexample,thegraftingofsingletons.eanelemen,notcon-tainedinthehyperpair,andcompareittothecenofthehyperpair.ueisthisw,comparingnewtstothecentre,untileithertsaboethetre,ortsbelowthecentrearefound.process.tsareputintheoutputpartialorder.Theprun-ingprocesscompletethepartialordertoanAddingthisprocesstooursimplefactory,theupperandloerelementcostsarereduced;u;pr+2(notethatnoehaetopruneelementsfromatmostoneside).;u5ifwetak=01(10)=10(01)proofleastonesideofeachgeneratediscomposedofsin-gletons,andifthissideisrecycled,nocomparisonscanbereused.PippengerenowskhtheoperationofthegreengreenThesefactoriesimproveuponscribedabostartsbyproducinghyperpairscorrespond-bebeoflengthorbrevitywSomesmall'swereshowninFig.3.ByLemma4.1,,where+1)tainsanconstructingan,thefactoryinitiatesthefollopairgraftingprocess:xybeapairofelementsandletbeocouninitiallysettreofthehyperpair.-149;.1;pyone.Ontheotherhand,ifxcthencomparealso,ifxycthenincreaseyone.inthesimplefactorydescribedinthegraftingconuesuntsareabobeloprocessabobeloerorupperpartofanisreturnedtsreturnedareutilized.Theamortizedanalysisofthegreenfactoryencompassesatrade-obetupperofScetal.ycon'sand's,wherei-119;.4;1,theirfactoryisonlycapableofutilizingpairwisetrelationsamongtheelementsreturnedtoit(asthegraftingprocessusespairs).Ifaora,withi-119;.4;1,isreturnedtothefactory,itisimmediatelybrokto2'sorNotethatbothbe[SPP76],thattheupperandloerelementcostsofthis;uisSc'sbestancedprinciplesoffactorydesignourimproedfactoriesthatyieldthedianalgorithm.Therstoftheseprincipleswasalreadywingvariationsintheproducedpartialorders.Ourfactoriesconstructpartialordersfrom.TheproportionbetberofelemenbelowandaboetheofageneratedorderisnotxedinadvRecyclinglargerrelations.ThefactoriesofScetal.areonlycapableofrecyclingpairs(i.e.,'sand's).Ourfactoriesoctetsandotherstructureswhicharenothyperpairs.yperpairconstructsareobtainedbythemoresophisticatedgraftingprocessesused.Constructinghyper-products.ordersthatcouldnotbeusedfortheconstructionofyperpairs.partialordersyper-product,whereissomepartialorderwithtre,isahyperpairthateachofitselemenisalsothecentreofadisjoinHyperpairsareofcoursespecialcasesofhyper-productsas SELECTINGTHEMEDIANGraftinglargerrelationsandmass-grafting.process.graftingprocesses,ifonlypairsareoreachinputconstructwehaedierentgraftingprocesses.Someofourgraftingprocesseshniqueofmassproduction.Usingsub-factories.yperpairs(corresponding=01(10)).Ourfactoriesgenerateseveraltypesyperpairsyper-products,aboe.Theconstructionofeachoneofthesehyper-productsiscarriedoutinaseparatesub-productionunitthatwerefertoasatsub-factoriesalsodierinthe`raw-materials'thattheycanprocess.Usingcreditsintheamortizedcomplexityanalysis.Thelastprincipleisanaccountingprinciple.beprocessmaterialsfortheconstructionofpartialordersfromresultsinamhhigherproductioncost.oequalizethesesignedacredit(ordebitifnegativextendedabstractforafulldescriptionofourfactories.Inthedescribeafactorythatcanbegreatlysimpliedversionofourbestfactorythatyieldsthe2medianalgorithm.actoriesformedianselectionsatisfyingtheditionsofTheorem2.3isextremelyinokthissectionrelativelyshort,wedescribehereasimpli-wingresulthisonlyslightlywTheorem2.3:eisagrenfactory;uconsidered,theunitcostofthisfactoryis(1)andtheinitialcostandproductionresiduesarebetutilizesonlysingletons,pairsandquartetsdoesbalancedhyperpairs.isabletorecycleonlyafractionofatmost638oftheelementsinproportionquartetshaetobebrokenintopairs.ofthefactoryInthesecondandthethirdsubsectionsdescribeprocesses.,inthelastsubsectionwegiveafulldescriptionofthefactoryasinputs,singletons,pairs('sandimmediatelyjoinedintopairs.ysfourprocesses:yperpairgeneration,pairgrafting,quartetgrafting,andpruning.Thefactoryystosub-factoriesthatgenerateyperpairs.yperpairsyperpairs'sarepassedtotherstsub-factory'scanbeusedfortheconstructionofhyperpairscorrespondpassedtothesecondfactory(as'scanbeusedyperpairscorrespond=10(01)Inputpairsarespreadbeteenthetsub-factoriesaccordingtodemand.describedtion4tosimplifytheyanalysis.operationberWhennoamyoccurs,welettheerc)ofanoperationbethecostoftheoperationwhentheupperpart(orloerpart)ofitsresultiseliminated.NotethatupperandloercostsarecalculatedforwholetheupperandloarecalculatedpereliminatedelemenThefactoryisnotcapableofrecyclingelemeni2,hastobecutthereforeintoacollectionof's(Thepriceofthisoperationis1edgeperelemenbebesomeoftheberecycledyhaetobecut.Theexactproportionofquartetsthatwouldhaetobecutisnotknowninhpartialordershouldbecforthecuttingoftheseedges?Theonebeingrecycledortheonebeingconstructed?Theansweristhatthecostshouldbesplitbeteentheseto.Theoptimalcheme,inthecaseof,turnsouttobethefollo Dorandmostafraction638oftherecycledtsareinquartets.Ifmoretsareinquartetsthensomeofthequartetscutandthisischargedtothepartialorderbeingrecycled.Ifduringbeisctothepartialorderbeingconstructed.thentakespairsandturnsthemintoquartets.Nocostisassociatedwiththisoperationasnoedgesarecut.factorytheninatleastonethetosub-factories,alargeyperpairbearrivingatthefactoryaretheneitherusedforgraftingintherstsub-factoryorusedfortheconstructionofalargeenoughyperpairalsoineralargeenoughhyperpairisformed,aquartetprocessprocessisappliedonit.honeofthethesegraftingprocesseshasacollectionofpossibleoutcomes.Insomeoutcomeselementswithlowupperelementcostbuthighuppertcostareobtained.Someoftheseoutcomescanbeupperwthatiftherearenosuchoutcomes(whichcanbebinedwithprunedelements)wecanalwyscomfromtheupperupperupperprocesses,eliminationitself.eliminationcostdoesnotcontainundirectedcycles(undirectedcycles,ifobtained,arebroklastremarkregardsoptimizationscpoinuponberthataretobeaddedtotheoutputpartialorder.berbesumofoptimalnbers,beberthiscategory,intheoutputpartialorder).ThefactorytainsacounforeacandmakessurethatthenberofgraftedelementswillnotdierfromthiscounterbymorethanaconstantvGraftingpairsdescribeprocess,processcess].OurprocessproductionschemetoconstructasequenceofprocessTheseparametersaresetbythefactorywheninitiatingthisprocess.Thegraftingrecursivelybuildshyperpairspartialorder.Adominatedhyperpairofdirectionandlevisahyperpairwithcenberelationbetisusuallynotdetermined.processcomposeddominatedhyperpairs(withcen,respectively)oflevyperpair+1.Atrstahyperpairisconstructed,thatisthecentreofthenewhyperpairThetopossibleoutcomes,=1,are:cisadominatedhyperpairoflev+1.-109;頀cisnotdominatedb-109;頀c-109;頀cLet(1)and(2)bethecorrespondingcasesfor=0,-109;頀cc,respectivIf(2)or(2)occur,processstopped.purposesalsoforalsostopprocessdominatedhyperpairoflevel3isgenerated.yperpairsprocessreceivesitselementsaspairs.Itthereforestartswiththesecondcomparisonofthe0-thround.The\rowofthepairgraftingprocess,=1,iswninFig.4.Thefourpossibleoutcomesofthepairprocess,andThefourpossibleoutcomesofthisprocessupperandloercostsof,andDuetokofspace,omitthedetailedcosteliminationcosteliminatedelemenfourelemenu;v;w;z,whereuvuwz,isgraftedusingthefollowingsimplealgorithm: SELECTINGTHEMEDIAN el3 el2 cU20 cU21;1 el1 cU26 Figure4:wofpairgraftingwhen=1. Upperparteliminated erparteliminated Class Cost berof Cost berof elements elements U20 0 2 1 0 U21;1 4 2 3 2 U26 10 2 7 6 U04 6 \r 0 4 4 able1:Costsofpairgraftingu;wthepair(u;v)totheinputqueue.wcthencomparewitheachofpossibleprocessinFig.5.fourthpartialorder specialprocesssymmetric.Thequartetgraftingprocessconuesunomitthecostsanalysis.Thecosts,for3,aresummerizedinTable2.factoryalgorithmAsmentionedbefore,composedrstusesthestring=01(10)whilethesecondoneusesthestring=10(01)edescribetheoperationoftherstsub-factory(whoseinputsare's,pairsandsingletons).Theothersub-factoryworksinasymmetric.Theoperationoftherstsub-factoryiscomposedofthefollowingsteps:Generateahyperpair,where=01(10),andletbeitscenThecenwillbethecentreofthegeneratedpartialorder.abobelointhe cwzQ20 vcQ13wu uwvczQ04 cvuzw Q13 Figure5:ossibleoutcomesof Upperparteliminated erparteliminated Class Cost berof Cost berof elements elements Q20 1 2 2 0 Q1;12 3 2 4 2 Q13 \r= 1 3 3 Q04 4 \r 0 2 4 able2:Costsofoutputpartialorder.Applythegraftingprocesstilthreefromonetsfromcategoryareimme-diatelyplacedintheoutputpartialorderandthegraftingconprocess,orisobtained.tsfoundincategoryareimmediatelyplacedinthenalpartialorder.Ifthreetuplesfromareaailable,applythepairgraftingprocesstileitherisobtained.tsfoundincategoryareimmediatelyplacedinthenalpartialorder.obtainedusingpairgrafting,andtsfromtuplesobtainedusingquartetgraft-;Qg;L;LLfQ20gf;U;Uoreaconeofthesecaseswechooseanoptimalvalueof,pruneelementsfrominordertoacanoptimalsize(thisisrequiredonlyifereencountered)andoutputthisThesub-factorymaintainsthreecounhareinitiallysetto0.eraoracorrespondingWhenacertainpartofaora`consumed',instepcorrespondingtegral,amounThequartetgraftingprocess Dorandhesavalueofatleast3.oreacobtainedinstep(2a),andeacobtainedinsteps(2b)and(2c),anappropriatenberofelementsistobeprunedinstep(3).Twocountaintheberofelemenbebeloaborespectivoutputtingthepartialorder,tsabotsbeloarepruned.edepictthe\raourofthecostanalysisbyconsid-eringoneoftheworstcasesofthefactoryInthefolloing,wex637985whichistheoptimalvalue.Fobtainedin(2c),weprune1382elemenbelobeloThispruninggenerateshotsineithersingletonsorpairs(becausetheprun-ingprocessseparatessingletons,orr=2pairs,fromtheTheseelementscanbereturnedtothefactoryaspairsandsinceonepairisreturnedtothefactoryforevpairthatasutilized.thereisnoneedtobreakquartetsintopairs.Recyclingtheupperpartcutsoneedgeforeachpair\r=(becauseoftherecyclingrestrictions).us,thelo+1,eliminatedelemenandtheuppercostis()+1\r=oneeliminatedelement.RecallalsothattheeliminationcostisasingleedgepereliminatedelemenHence,theupperandloerelementcostsare:1+5+1\r= =1++1 Thecostanalysisofalltheothercasesisomitted.Concludingremarksremarks]andBlumetal.[BFP+73]andobtainedabetterAlthoughtheimprot,isquitemodest,manynewnewideasintroducedmayleadtofurtherimproedandaconsiderableeortwasdevotedtotheirelytobebetupperboundsberremainsachallengingopenproblem.problem.M.Aigner.thetopthreeelemeneteAppliedMathematics,4:247{267,1982.1982.+73]M.Blum,R.W.Floyd,V.Pratt,R.L.Rivest,andboundsComputerandSystemScienc,7:448{461,1973.1973.S.W.BentandJ.W.John.Findingthemedianrequires2ncomparisons.InProceedingsofe,RdeIsland,pages213{216,1985.1985.W.CuntoandJ.I.Munro.eragecaseselection.JournaloftheA,36(2):270{279,1989.1989.D.DorandU.ZwicFindingpercendingsofthe3rdIsraelSymposiumonTheandComputingsystems,1995.1995.J.EusterbrocErratato"SelectingthetopthreeproofeteAppliedMathematics41:131{137,1993.1993.G78]F.FusseneggerandH.N.Gabohtoloerboundsforselectionproblems.oftheA,26(2):227{238,April1978.1978.L.R.FS.M.Johnson.AtournamentournamenR.W.FloydandR.L.RivExpectedtimeboundsforselection.ationoftheA,18:165{173,18:165{173,A.HadianandM.Sobel.-thlargestColloquiaMathe-aSocietatisJanosBolyai,4:585{599,1969.1969.a76]L.HyBoundsforselection.SIAMJournalon,5:109{114,1976.1976.J.W.John.Anewloerboundfortheset-partitionSIAMJournalonComputing,17(4):640{647,August1988.1988.D.G.Kirkpatrick.AuniedlowerboundsetpartitioningJournalofthe,28:150{165,1981.1981.S.S.Kislitsyn.Ontheselectionofthe-thelemenMat.Zh.,5:557{564,1964.1964.I.MunroandP.V.Poblete.AlowerboundReportReportCS-82-21,UnivyofWaterloo,1982.1982.oh72]I.Pohl.Asortingproblemanditscomplexity.CommunicationoftheA,15:462{464,1972.1972.P.V.RamananL.HyNewalgorithmsJournalofA,5:557{578,1984.1984.h32]J.Schreier.Ontournamenteliminationsystems.MathesisPolska,7:154{160,1932.(inPPA.Schonhage,M.Paterson,andN.Pippenger.Findingthemedian.JournalofComputerandSystem,13:184{199,1976.1976.P.StocerandF.F.YOntheoptimalitSIAMJournalonComputing,9:85{90,9:85{90,ap76]C.K.YNewupperboundsforselection.ber