/
Learning a ring cheaply and fast Emanuele G Learning a ring cheaply and fast Emanuele G

Learning a ring cheaply and fast Emanuele G - PDF document

min-jolicoeur
min-jolicoeur . @min-jolicoeur
Follow
461 views
Uploaded On 2014-10-28

Learning a ring cheaply and fast Emanuele G - PPT Presentation

Fusco Andrzej Pelc and Rossella Petreschi Computer Science Department Sapienza University of Rome 00198 Rome Italy fusco petreschi diuniroma1it Departement dinformatique Universite du Quebec en Outaouais Gatineau Quebec J8 ID: 8496

Fusco Andrzej Pelc

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Learning a ring cheaply and fast Emanuel..." 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

thatnodescansolvethemsimulatingacentralmonitor.Weareinterestedintheeciencyofdeterministicalgorithmsforlabeledmapconstruction.InthispaperweusetheextensivelystudiedLOCALmodelofcommunication[12].Inthismodel,communicationproceedsinsynchronousroundsandallnodesstartsimultaneously.Ineachroundeachnodecanexchangearbitrarymessageswithallitsneighborsandperformarbitrarylocalcomputations.Thetimeofcompletingataskisthenumberofroundsittakes.Ourgoalistoinvestigatetradeo sbetweenthetimeofconstructingalabeledmapanditscost,i.e.,thenumberofmessagesneededtoperformthistask.Toseeextremeexamplesofsuchatradeo ,considerthemapconstructiontaskonann-nodering.ThefastestwaytocompletethistaskisintimeD,whereD=bn=2cisthediameterofthering.Thiscanbeachievedby ooding,butthenumberofmessagesusedisthen(n2).Ontheotherhand,cost(n)(whichisoptimal)canbeachievedbyaversionofthetimeslicingalgorithm[11],butthentimemaybecomeverylargeanddependsonthelabelsofthenodes.Thegeneralproblemoftradeo sbetweentimeandcostoflabeledmapcon-structioncanbeformulatedasfollows.ForagiventimeT,whatisthesmallestnumberofmessagesneededforconstructingalabeledmapbyeachnodeintimeT?Fortreesthisproblemistrivial:leavesofann-nodetreeinitiatethecom-municationprocessandinformationabouteverlargersubtreesgets rsttothecentralnode(orcentralpairofadjacentnodes)andthenbacktoallleaves,usingtimeequaltothediameterofthetreeandO(n)messages,bothofwhichareop-timal.However,assoonastherearecyclesinthenetwork,thereisnocanonicalplacetostartinformationexchangeoneachcycleandproceedingfastseemstoforcemanymessagestobesentinparallel,whichinturnintuitivelyimplieslargecost.Thisphenomenonispresentalreadyinthesimplestsuchnetwork,i.e.,thering.Indeed,ourstudyshowsthatmeaningfultradeo sbetweentimeandcostoflabeledmapconstructionalreadyoccurinrings.Weconsiderringswhosenodeshaveuniquelabelsthatarebinarystringsoflengthpolynomialinthesizeofthering.(Ourresultsarevalidalsoformuchlongerlabels,butthesecanbedismissedforpracticalityreasons.)Inthebegin-ning,everynodeknowsonlyitsownlabel,theallowedtimeTandthediameterDofthering.Equivalently,weprovideeachnodewithitslabel,withthedi-ameterDandwiththedelay=T�D,whichistheextratimeallowedontopoftheminimumtimeDinwhichlabeledmapconstructioncanbeachieved,knowingDapriori.Knowingitsownlabelisanobviousassumption.Withoutanyadditionalknowledge,nodeswouldhavetoassumetheleastpossibletimeandhencedo oodingatquadraticcost.InsteadofprovidingnodeswithDand,wecouldhaveprovidedthemonlywiththealloweddelayovertheleastpossibletimeoflearningtheringwithoutaprioriknowledgeofthediameter.Thiswouldnota ectourasymptoticbounds.However,itwouldresultinmorecumbersomeformulationsbecause,withoutknowingDapriori,theoptimaltimeoflabeledmapconstructionvariesbetweenDandD+1,dependingonwhethertheringis eterD.Weprovethelowerboundontheclassoforientedringsofevensize.(Restrictingtheclassonwhichthelowerboundisprovedonlyincreasesthestrengthoftheresult.)Weformalizeorientationbyassigningportnumbers0and1intheclockwiseorderateachnode.Foreverynodev,let`(v)beitslabel.We rstde nethehistoryH(v;t)ofnodevattimet.IntuitivelyH(v;t)rep-resentstheentireknowledgethatnodevcanacquirebytimet.Sincewewanttoprovealowerboundoncost,itisenoughtoassumethatwheneveranodevsendsamessagetoaneighborinroundt+1,thecontentofthismessageisitsentirehistoryH(v;t).Wede nehistoriesofallnodesbysimultaneousinductionont.De neH(v;0)astheone-elementsequenceh`(v)i.Intheinductivede ni-tion,wewillusetwosymbols,s0ands1,correspondingtothelackofmessage(silence)onport0and1,respectively.Assumethathistoriesofallnodesarede neduntilroundt.Wede neH(v;t+1)as:{hH(v;t);s0;s1i,ifvdidnotgetanymessageinroundt+1;{hH(v;t);s0;H(u;t)i,ifvdidnotgetanymessageinroundt+1onport0butreceivedamessageonport1fromitsclockwiseneighboruinthatround;{hH(v;t);H(w;t);s1i,ifvdidnotgetanymessageinroundt+1onport1butreceivedamessageonport0fromitscounterclockwiseneighborwinthatround;{hH(v;t);H(w;t);H(u;t)i,ifvreceivedamessageonport0fromitscounter-clockwiseneighborwandamessageonport1fromitsclockwiseneighboru,inroundt+1.Wede neacommunicationpatternuntilroundtforthesetEofalledgesoftheringasafunctionf:Ef1;:::;tg�!f0;1g,wheref(e;i)=0,ifandonlyifnomessageissentonedgeeinroundi.ExecutingamapconstructionalgorithmAonagivenringdeterminesacommunicationpattern,whichinturndetermineshistoriesH(v;t),forallnodesvandallroundst.Foranypathk=hu0:::ukibetweennodesu0andukwede ne,byinduc-tiononk,thecommunicationdelay(k;f)inducedonkbythecommunica-tionpatternf.Fork=1,(1;f)=d,ifandonlyif,f(fu0;u1g;i+1)=0,forallid,andf(fu0;u1g;d+1)=1.Inparticular,iff(fu0;u1g;1)=1then(1;f)=0.Supposethat(k�1;f)hasbeende ned.Wede ne(k;f)=(k�1;f)+d,ifandonlyif,f(fuk�1;ukg;(k�1;f)+k+i)=0,forallid,andf(fuk�1;ukg;(k�1;f)+k+d)=1.Inparticular,iff(fuk�1;ukg;(k�1;f)+k)=1then(k;f)=(k�1;f).Intuitivelythecommunicationdelayonapathbetweenuandvindicatestheadditionaltime,withrespecttothelengthofthispath,thatitwouldtakenodevtoacquireanyinformationaboutnodeu,alongthispath,ifnoinformationcouldbecodedbysilence.Infactsomeinformationcanbecodedbysilence,andanalyzingthisphenomenonisthemainconceptualdicultyofourlowerboundproof.Inparticular,wewillshowthatifmapcon-structionhastobeperformedquickly,thenthenumberofcon gurationsthatcanbecodedbysilenceissmallwithrespecttothetotalnumberofpossibleinstances,andhencemanymessageshavetobeusedforsomeofthem.Wede nethecommunicationdelayinducedbyacommunicationpatternfbetweenanodexanditsantipodalnode xastheminimumofthedelays pairscomposedofanedgeandaroundnumber,oftheform(fxh+p;xh+p+1g;rp),for0pD,whererp=(hxh:::xh+p+1i;g)+p+1.Bythede nitionofcommunicationdelayinducedonapath,wehaveg(fxh+p;xh+p+1g;rp)=1,forall0pD.WenowshowthatsetsZyarepairwisedisjoint.PicktwonodesfromY:anodey=xhandanodey0=xh+datclockwisedistancedDfromxh.Consideranodexh+p,withdpD.Considertwopairs,(fxh+p;xh+p+1g;rp)2Zxhand(fxh+p;xh+p+1g;rp�d)2Zxh+d.Since(hxh+d:::xh+p+1i;g),wehaverp�d=p�d+(hxh+d:::xh+p+1i;g)+1p�d++1.Byde nitionofY,wehaved&#x-353;,hencerp=p+(hxh:::xh+p+1i;g)+1p+1&#x-353;p�d++1rp�d.Thisimpliesthatrp6=rp�dandhencesetsZyandZy0aredisjoint.Noticethatify0isatdistanceDfromy,theny0istheantipodalnodeofyandhenceZyandZy0aredisjointbecausetheedgesintheirelementsaredi erent.ItfollowsthatallsetsZyarepairwisedisjoint,hence[y2YZyhasatleastDbD=(+1)celements.Sinceeachelementcorrespondstoatleastonemessagesent,weconcludethatthealgorithmusesatleastDbD=(+1)c2 (D2=)messages.ut3ThealgorithmThegeneralideaofourlabeledmapconstructionalgorithmistospendthealloweddelayinapreprocessingphasethatdeactivatessomenodes,usingtheresidualtimeDforaphasedevotedtoinformationspreading.Thisresultsinareductionoftheoverallcostofthealgorithm,withrespectto ooding,sincenon-activenodesareonlyresponsibleforrelayingmessagesoriginatedatnodesthatremainedactiveafterthepreprocessingphase.Hence,thisapproachrequirestodeactivateasmanynodesaspossible.However,withindelay,wecannota ordtodeactivatesequencesofconsecutivenodesoflengthlargerthan2.Indeed,deactivatingsuchlongsequenceswouldimplythatthelabelofsomenon-activenodeisunknowntoallactivenodes,whichwouldmakethetimeoftheinformationspreadingphaseexceedtheremainingDrounds.Wereconciletheseoppositerequirementsbyde ninglocalrulesthatallowustodeactivatealmosthalfofthecurrentlyactivenodes,withoutdeactivatingtwoconsecutiveones.Thisprocessistheniteratedasmanytimesaspossiblewithindelay.Thepreprocessingphaseofouralgorithmisdividedintostages,eachofwhichisinturncomposedofmultiplesteps.Inthe rststage,allnodesareactive.Nodesthatbecomenon-activeattheendofastagewillneverbecomeactiveagain.Inordertosimplifythedescriptionofthealgorithm,wewillusetheconceptofresidualring.Insucharing,thesetofnodesisasubsetoftheoriginalsetofnodes,andedgescorrespondtopathsofconsecutiveremovednodes.Inparticular,stageiisexecutedontheresidualringRicomposedofnodesthatremainedactiveattheendofthepreviousstage.CommunicationbetweenconsecutivenodesRiissimulatedbyamulti-hopcommunicationintheoriginalring,wherenon-activenodesrelaymessagesofactivenodes.Eachsimulatedmessageexchangeduringstageiisallotted2i�1rounds. {IfSisofevenlength,i.e.,S=hlak:::a1b1:::bkri,nodesatandbtbecomenon-active,forallevenvaluesoft.Thismeansthateverysecondnodeisdeactivated,startingfromtheneighborsofthetwocentralnodes.Wearenowreadytoprovideadetaileddescriptionofourlabeledmapcon-structionalgorithm.Foreachtaskthatcannotbecarriedoutlocally,weallotaspeci cnumberofroundstomaintainsynchronizationbetweentheexecutionofagivenpartofthealgorithmbydi erentnodes.Intheanalysiswewillshowthattheallottedtimesarealwayssucient.AlgorithmRingLearningInput:D;;and".Phase1{preprocessingsetallnodesasactive{(locally);fori 1toblogc�2dlog(8=")e�dlog( (logD+3))e//STAGEconstructtheresidualringRiofactivenodes{(locally);electallnodesinRias(i;0)-leaders{(locally);forj 1todlog(8=")e//STEPconstructtheresidualringRi;jof(i;j�1)-leaders{(locally);assigncolorc(u)toallnodesuinRi;jwithprocedureRTC(i;j);(allottedtime2i�14j�1 (logD+1))elect(i;j)-leaderswithprocedureElect(i;j);(allottedtime2i�14j�1)runprocedureDeactivate(i,")inRi;(allottedtime2i�14dlog(8=")e)Phase2{informationspreadinginround+1eachnodethatisstillactiveconstructslocallyalabeledmapofthepartoftheoriginalringconsistingofnodesfromwhichitreceivedmessagesduringPhase1,andsendsthismaptoitsneighbors;bothactiveandnon-activenodesthatreceiveamessagefromoneneighbor,sendittotheotherneighbor;attimeD+,allnodeshavethelabeledmapoftheringandstop.WenowprovethecorrectnessofAlgorithmRingLearningandanalyzeitbyestimatingitscostforagivendelay.The rsttwolemmasshowthatthetime2i�1allottedformulti-hopcommunicationbetweenconsecutiveactivenodesinstagei,andthetime2i�14j�1allottedformulti-hopcommunicationbetweenconsecutive(i;j�1)-leadersinstepjofstagei,aresucienttoperformtherespectivetasks.Lemma2.Thedistancebetweentwoconsecutive(i;j)-leadersisatmost2i�14j.ThenexttwolemmaswillbeusedtoprovethecorrectnessofAlgorithmRing-Learning.Lemma3.AllcallstoproceduresRTC,Elect,andDeactivatecanbecarriedoutwithintimesallottedinAlgorithmRingLearning. Proof.AsshownintheproofofLemma4,thetimeusedforstageiisatmost2i�14s (logD+3),wheres=dlog(8=")eisthenumberofstepsineachstage.InviewofLemma5,duringstageithereareatmostn(("=2+1)=2)i�1activenodesinaringofsizen.Hencethecostofstageiisatmost2i�14s (logD+3)n"=2+1 2i�1:Sincethenumberofstagesislessthanlog,theoverallcostofthepreprocessingphaseislessthanblogcXi=12i�14s (logD+3)n"=2+1 2i�1:BoundingeachsummandwiththelastonewhichisthelargestweobtainblogcXi=12i�14s (logD+3)n"=2+1 2i�1 n(logD+3)log(1+"=2)log8 "2;whichisO(DlogDlog(1+")log="2).utLemma7.ThecostoftheinformationspreadingphaseofAlgorithmRingLearningwithinputparametersD;,and",where0"1,isO(D2logD=("21�")).Theorem3.ThecostofAlgorithmRingLearning,executedintimeD+inaringofdiameterD,isO(D2logD=1�"),foranyconstantparameter0"1andanyD.Proof.Lemmas6and7implythatthecostofAlgorithmRingLearning,ex-ecutedwithparametersD,,and",inaringofdiameterD,isoftheor-derO(DlogDlog(1+"=2)log+D2logD=(1�"));foranyconstant0"1.Sincelog(1+"=2)�"isnegativeforall"&#x]TJ/;ø 9;&#x.962; Tf;&#x -31;.75; -1;.95; Td;&#x [00;0,andD,wehave1+log(1+"=2)�"logD,forsucientlylargeD.HenceD 1�"�log(1+"=2)log;whichimpliesODlogDlog(1+"=2)log+D2logD 1�"=OD2logD 1�":ut4DiscussionandopenproblemsWeprovedalmostmatchingupperandlowerboundsforthetradeo sbetweentimeandcostofthelabeledmapconstructiontaskintheclassofrings.Canthesetradeo sbegeneralizedtoalargerclassofnetworks?Sincelowerboundsarestrongerwhenestablishedonamorerestrictedclassofgraphs,thechallenge suchtradeo sbeestablishedforsomeotherclassesofnetworks(suchasboundeddegreenetworksorevenjustgridsandtori),similarlyaswedidforrings?Finally,noticethatforringstheinformationspreadingphasecanbeper-formedintime2D(insteadof3D)bylettingeachactivenodeinitiatetwosequencesofmessages(oneclockwise,andtheothercounterclockwise),eachcontaininglabelsofallalreadyvisitednodes.Moreover,theoverallcostofthedoublingalgorithm,executedintime2D+onaringofdiameterDandsizen,isO(nlog+nD=)=O(Dlog+D2=).ThisshouldbecomparedtothecostofAlgorithmRingLearning,thatcanbeassmallasO(D1+"logD)fortotaltime2Dandanyconstant"�0.Thecostofthedoublingalgorithmbecomesasymptoticallysmallerwhentheoveralltimeislargerthan2D+D1�"=logD.Closingthesmallgapbetweenourboundsonthetimevs.costtradeo sforlabeledmapconstructiononringsisanotheropenproblem.References1.H.Attiya,A.Bar-Noy,D.Dolev,D.Koller,D.Peleg,andR.Reischuk,Renaminginanasynchronousenvironment,JournaloftheACM37(1990),524{548.2.B.Awerbuch,Optimaldistributedalgorithmsforminimumweightspanningtree,counting,leaderelectionandrelatedproblems,Proc.19thAnnualACMSymposiumonTheoryofComputing(STOC1987),230{240.3.J.Chalopin,S.Das,andA.Kosowski,Constructingamapofananonymousgraph:Applicationsofuniversalsequences,Proc.14thInternationalConferenceonPrin-ciplesofDistributedSystems(OPODIS2010),119{134.4.R.ColeandU.Vishkin,Deterministiccointossingwithapplicationstooptimalparallellistranking,InformationandControl70(1986),32-53.5.A.Czumaj,L.Gasieniec,andA.Pelc,Timeandcosttrade-o singossiping,SIAMJournalonDiscreteMathematics11(1998),400-413.6.G.N.FredricksonandN.A.Lynch,Electingaleaderinasynchronousring,JournaloftheACM34(1987),98{115.7.L.Gasieniec,A.Pagourtzis,I.Potapov,andT.Radzik.Deterministiccommuni-cationinradionetworkswithlargelabels.Algorithmica47(2007),97{117.8.A.V.Goldberg,S.A.Plotkin,andG.E.Shannon,Parallelsymmetry-breakinginsparsegraphs,SIAMJournalonDiscreteMathematics1(1988),434{446.9.D.S.Hirschberg,andJ.B.Sinclair,Decentralizedextrema- ndingincircularcon- gurationsofprocesses,CommunicationsoftheACM23(1980),627{628.10.A.Israeli,E.Kranakis,D.Krizanc,andN.Santoro,Time-messagetrade-o sfortheweakunisonproblem,NordicJournalofComputing4(1997),317{341.11.N.L.Lynch,Distributedalgorithms,MorganKaufmannPubl.Inc.,SanFrancisco,USA,1996.12.D.Peleg,DistributedComputing,ALocality-SensitiveApproach,SIAMMono-graphsonDiscreteMathematicsandApplications,Philadelphia2000.13.G.L.Peterson,AnO(nlogn)unidirectionaldistributedalgorithmforthecircularextremaproblem,ACMTransactionsonProgrammingLanguagesandSystems4(1982),758{762.14.M.YamashitaandT.Kameda,Computingonanonymousnetworks:PartI-characterizingthesolvablecases,IEEETrans.ParallelandDistributedSystems7(1996),69{89.