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
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.
thatnodescansolvethemsimulatingacentralmonitor.Weareinterestedintheeciencyofdeterministicalgorithmsforlabeledmapconstruction.InthispaperweusetheextensivelystudiedLOCALmodelofcommunication[12].Inthismodel,communicationproceedsinsynchronousroundsandallnodesstartsimultaneously.Ineachroundeachnodecanexchangearbitrarymessageswithallitsneighborsandperformarbitrarylocalcomputations.Thetimeofcompletingataskisthenumberofroundsittakes.Ourgoalistoinvestigatetradeosbetweenthetimeofconstructingalabeledmapanditscost,i.e.,thenumberofmessagesneededtoperformthistask.Toseeextremeexamplesofsuchatradeo,considerthemapconstructiontaskonann-nodering.ThefastestwaytocompletethistaskisintimeD,whereD=bn=2cisthediameterofthering.Thiscanbeachievedby ooding,butthenumberofmessagesusedisthen(n2).Ontheotherhand,cost(n)(whichisoptimal)canbeachievedbyaversionofthetimeslicingalgorithm[11],butthentimemaybecomeverylargeanddependsonthelabelsofthenodes.Thegeneralproblemoftradeosbetweentimeandcostoflabeledmapcon-structioncanbeformulatedasfollows.ForagiventimeT,whatisthesmallestnumberofmessagesneededforconstructingalabeledmapbyeachnodeintimeT?Fortreesthisproblemistrivial:leavesofann-nodetreeinitiatethecom-municationprocessandinformationabouteverlargersubtreesgetsrsttothecentralnode(orcentralpairofadjacentnodes)andthenbacktoallleaves,usingtimeequaltothediameterofthetreeandO(n)messages,bothofwhichareop-timal.However,assoonastherearecyclesinthenetwork,thereisnocanonicalplacetostartinformationexchangeoneachcycleandproceedingfastseemstoforcemanymessagestobesentinparallel,whichinturnintuitivelyimplieslargecost.Thisphenomenonispresentalreadyinthesimplestsuchnetwork,i.e.,thering.Indeed,ourstudyshowsthatmeaningfultradeosbetweentimeandcostoflabeledmapconstructionalreadyoccurinrings.Weconsiderringswhosenodeshaveuniquelabelsthatarebinarystringsoflengthpolynomialinthesizeofthering.(Ourresultsarevalidalsoformuchlongerlabels,butthesecanbedismissedforpracticalityreasons.)Inthebegin-ning,everynodeknowsonlyitsownlabel,theallowedtimeTandthediameterDofthering.Equivalently,weprovideeachnodewithitslabel,withthedi-ameterDandwiththedelay=TD,whichistheextratimeallowedontopoftheminimumtimeDinwhichlabeledmapconstructioncanbeachieved,knowingDapriori.Knowingitsownlabelisanobviousassumption.Withoutanyadditionalknowledge,nodeswouldhavetoassumetheleastpossibletimeandhencedo oodingatquadraticcost.InsteadofprovidingnodeswithDand,wecouldhaveprovidedthemonlywiththealloweddelayovertheleastpossibletimeoflearningtheringwithoutaprioriknowledgeofthediameter.Thiswouldnotaectourasymptoticbounds.However,itwouldresultinmorecumbersomeformulationsbecause,withoutknowingDapriori,theoptimaltimeoflabeledmapconstructionvariesbetweenDandD+1,dependingonwhethertheringis eterD.Weprovethelowerboundontheclassoforientedringsofevensize.(Restrictingtheclassonwhichthelowerboundisprovedonlyincreasesthestrengthoftheresult.)Weformalizeorientationbyassigningportnumbers0and1intheclockwiseorderateachnode.Foreverynodev,let`(v)beitslabel.WerstdenethehistoryH(v;t)ofnodevattimet.IntuitivelyH(v;t)rep-resentstheentireknowledgethatnodevcanacquirebytimet.Sincewewanttoprovealowerboundoncost,itisenoughtoassumethatwheneveranodevsendsamessagetoaneighborinroundt+1,thecontentofthismessageisitsentirehistoryH(v;t).Wedenehistoriesofallnodesbysimultaneousinductionont.DeneH(v;0)astheone-elementsequenceh`(v)i.Intheinductivedeni-tion,wewillusetwosymbols,s0ands1,correspondingtothelackofmessage(silence)onport0and1,respectively.Assumethathistoriesofallnodesaredeneduntilroundt.WedeneH(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.WedeneacommunicationpatternuntilroundtforthesetEofalledgesoftheringasafunctionf:Ef1;:::;tg!f0;1g,wheref(e;i)=0,ifandonlyifnomessageissentonedgeeinroundi.ExecutingamapconstructionalgorithmAonagivenringdeterminesacommunicationpattern,whichinturndetermineshistoriesH(v;t),forallnodesvandallroundst.Foranypathk=hu0:::ukibetweennodesu0andukwedene,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(k1;f)hasbeendened.Wedene(k;f)=(k1;f)+d,ifandonlyif,f(fuk1;ukg;(k1;f)+k+i)=0,forallid,andf(fuk1;ukg;(k1;f)+k+d)=1.Inparticular,iff(fuk1;ukg;(k1;f)+k)=1then(k;f)=(k1;f).Intuitivelythecommunicationdelayonapathbetweenuandvindicatestheadditionaltime,withrespecttothelengthofthispath,thatitwouldtakenodevtoacquireanyinformationaboutnodeu,alongthispath,ifnoinformationcouldbecodedbysilence.Infactsomeinformationcanbecodedbysilence,andanalyzingthisphenomenonisthemainconceptualdicultyofourlowerboundproof.Inparticular,wewillshowthatifmapcon-structionhastobeperformedquickly,thenthenumberofcongurationsthatcanbecodedbysilenceissmallwithrespecttothetotalnumberofpossibleinstances,andhencemanymessageshavetobeusedforsomeofthem.Wedenethecommunicationdelayinducedbyacommunicationpatternfbetweenanodexanditsantipodalnode xastheminimumofthedelays pairscomposedofanedgeandaroundnumber,oftheform(fxh+p;xh+p+1g;rp),for0pD,whererp=(hxh:::xh+p+1i;g)+p+1.Bythedenitionofcommunicationdelayinducedonapath,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;rpd)2Zxh+d.Since(hxh+d:::xh+p+1i;g),wehaverpd=pd+(hxh+d:::xh+p+1i;g)+1pd++1.BydenitionofY,wehaved-353;,hencerp=p+(hxh:::xh+p+1i;g)+1p+1-353;pd++1rpd.Thisimpliesthatrp6=rpdandhencesetsZyandZy0aredisjoint.Noticethatify0isatdistanceDfromy,theny0istheantipodalnodeofyandhenceZyandZy0aredisjointbecausetheedgesintheirelementsaredierent.ItfollowsthatallsetsZyarepairwisedisjoint,hence[y2YZyhasatleastDbD=(+1)celements.Sinceeachelementcorrespondstoatleastonemessagesent,weconcludethatthealgorithmusesatleastDbD=(+1)c2 (D2=)messages.ut3ThealgorithmThegeneralideaofourlabeledmapconstructionalgorithmistospendthealloweddelayinapreprocessingphasethatdeactivatessomenodes,usingtheresidualtimeDforaphasedevotedtoinformationspreading.Thisresultsinareductionoftheoverallcostofthealgorithm,withrespectto ooding,sincenon-activenodesareonlyresponsibleforrelayingmessagesoriginatedatnodesthatremainedactiveafterthepreprocessingphase.Hence,thisapproachrequirestodeactivateasmanynodesaspossible.However,withindelay,wecannotaordtodeactivatesequencesofconsecutivenodesoflengthlargerthan2.Indeed,deactivatingsuchlongsequenceswouldimplythatthelabelofsomenon-activenodeisunknowntoallactivenodes,whichwouldmakethetimeoftheinformationspreadingphaseexceedtheremainingDrounds.Wereconciletheseoppositerequirementsbydeninglocalrulesthatallowustodeactivatealmosthalfofthecurrentlyactivenodes,withoutdeactivatingtwoconsecutiveones.Thisprocessistheniteratedasmanytimesaspossiblewithindelay.Thepreprocessingphaseofouralgorithmisdividedintostages,eachofwhichisinturncomposedofmultiplesteps.Intherststage,allnodesareactive.Nodesthatbecomenon-activeattheendofastagewillneverbecomeactiveagain.Inordertosimplifythedescriptionofthealgorithm,wewillusetheconceptofresidualring.Insucharing,thesetofnodesisasubsetoftheoriginalsetofnodes,andedgescorrespondtopathsofconsecutiveremovednodes.Inparticular,stageiisexecutedontheresidualringRicomposedofnodesthatremainedactiveattheendofthepreviousstage.CommunicationbetweenconsecutivenodesRiissimulatedbyamulti-hopcommunicationintheoriginalring,wherenon-activenodesrelaymessagesofactivenodes.Eachsimulatedmessageexchangeduringstageiisallotted2i1rounds. {IfSisofevenlength,i.e.,S=hlak:::a1b1:::bkri,nodesatandbtbecomenon-active,forallevenvaluesoft.Thismeansthateverysecondnodeisdeactivated,startingfromtheneighborsofthetwocentralnodes.Wearenowreadytoprovideadetaileddescriptionofourlabeledmapcon-structionalgorithm.Foreachtaskthatcannotbecarriedoutlocally,weallotaspecicnumberofroundstomaintainsynchronizationbetweentheexecutionofagivenpartofthealgorithmbydierentnodes.Intheanalysiswewillshowthattheallottedtimesarealwayssucient.AlgorithmRingLearningInput:D;;and".Phase1{preprocessingsetallnodesasactive{(locally);fori 1toblogc2dlog(8=")edlog((logD+3))e//STAGEconstructtheresidualringRiofactivenodes{(locally);electallnodesinRias(i;0)-leaders{(locally);forj 1todlog(8=")e//STEPconstructtheresidualringRi;jof(i;j1)-leaders{(locally);assigncolorc(u)toallnodesuinRi;jwithprocedureRTC(i;j);(allottedtime2i14j1(logD+1))elect(i;j)-leaderswithprocedureElect(i;j);(allottedtime2i14j1)runprocedureDeactivate(i,")inRi;(allottedtime2i14dlog(8=")e)Phase2{informationspreadinginround+1eachnodethatisstillactiveconstructslocallyalabeledmapofthepartoftheoriginalringconsistingofnodesfromwhichitreceivedmessagesduringPhase1,andsendsthismaptoitsneighbors;bothactiveandnon-activenodesthatreceiveamessagefromoneneighbor,sendittotheotherneighbor;attimeD+,allnodeshavethelabeledmapoftheringandstop.WenowprovethecorrectnessofAlgorithmRingLearningandanalyzeitbyestimatingitscostforagivendelay.Thersttwolemmasshowthatthetime2i1allottedformulti-hopcommunicationbetweenconsecutiveactivenodesinstagei,andthetime2i14j1allottedformulti-hopcommunicationbetweenconsecutive(i;j1)-leadersinstepjofstagei,aresucienttoperformtherespectivetasks.Lemma2.Thedistancebetweentwoconsecutive(i;j)-leadersisatmost2i14j.ThenexttwolemmaswillbeusedtoprovethecorrectnessofAlgorithmRing-Learning.Lemma3.AllcallstoproceduresRTC,Elect,andDeactivatecanbecarriedoutwithintimesallottedinAlgorithmRingLearning. Proof.AsshownintheproofofLemma4,thetimeusedforstageiisatmost2i14s(logD+3),wheres=dlog(8=")eisthenumberofstepsineachstage.InviewofLemma5,duringstageithereareatmostn(("=2+1)=2)i1activenodesinaringofsizen.Hencethecostofstageiisatmost2i14s(logD+3)n"=2+1 2i1:Sincethenumberofstagesislessthanlog,theoverallcostofthepreprocessingphaseislessthanblogcXi=12i14s(logD+3)n"=2+1 2i1:BoundingeachsummandwiththelastonewhichisthelargestweobtainblogcXi=12i14s(logD+3)n"=2+1 2i1n(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"]TJ/;ø 9;.962; Tf; -31;.75; -1;.95; Td; [00;0,andD,wehave1+log(1+"=2)"logD,forsucientlylargeD.HenceD 1"log(1+"=2)log;whichimpliesODlogDlog(1+"=2)log+D2logD 1"=OD2logD 1":ut4DiscussionandopenproblemsWeprovedalmostmatchingupperandlowerboundsforthetradeosbetweentimeandcostofthelabeledmapconstructiontaskintheclassofrings.Canthesetradeosbegeneralizedtoalargerclassofnetworks?Sincelowerboundsarestrongerwhenestablishedonamorerestrictedclassofgraphs,thechallenge suchtradeosbeestablishedforsomeotherclassesofnetworks(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.costtradeosforlabeledmapconstructiononringsisanotheropenproblem.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-osingossiping,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-osfortheweakunisonproblem,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.