Lucia D.Penso
Valmir C.Barbosa
UniversidadeFederaldoRiodeJaneiro
ProgramadeEngenhariadeSistemaseComputac~ao,COPPE
CaixaPostal68511
21945-970RiodeJaneiro-RJ,Brazil
draque@cos.ufrj.br, valmir@cos.ufrj.br
Abstract
WeconsideraconnectedundirectedgraphG(n;m)withnnodesandmedges. Ak-dominatingsetDinGis
asetofnodeshavingthepropertythateverynodeinGisatmostkedgesawayfromatleastonenodeinD.
Findingak-dominatingsetofminimumsize isNP-hard. Wegiveanewsynchronousdistributed algorithm
tondak-dominatingsetinGofsizenogreaterthan
n=(k+1)
. OuralgorithmrequiresO(klog
n)time
andO(mlogk+nlogklog
n)messagestorun. Ithasthesametimecomplexityasthebestcurrentlyknown
algorithm,but improvesonthat algorithm'smessagecomplexityandis,in addition,conceptuallysimpler.
Keywords: k-dominatingsets,distributed algorithms,graphalgorithms.
1. Introduction
Let G(n;m) be aconnectedundirected graphwith n nodes and m edges. Fork n 1,ak-dominating
set D in Gisaset ofnodeswith thepropertythat everynodein Gis atmostk edgesawayfromat least
oneofthenodesof D. Theproblem ofndingk-dominatingsets ofrelativelysmallsizes isimportantina
varietyofcontexts,includingmulticastsystems[11],theplacementofserversinacomputernetwork[2],the
cachingof replicasindatabaseandoperatingsystems[8],andmessageroutingwithsparsetables[9].
Findingak-dominatingsetinGwiththeleastpossiblenumberofnodesisthoughttobeanintractable
problem(itisNP-completewhenformulatedasadecisionproblem[4]),soone normallysettlesforasetof
small size that is notnecessarily optimal. In general, the small size to be sought is at most
n=(k+1)
,
sinceit canbeargued that a k-dominatingset withno morethan this numberof nodesalwaysexists [6],
and likewise that aconnectedgraphonnnodesnecessarilyexists forwhicheveryk-dominatingset hasat
least
n=(k+1)
nodes[10].
The argument for
n=(k+1)
as an upper bound is instructive in the present context, and goes as
follows[6]. LetT bearootedspanning tree ofGand D
1 ;:::;D
k +1
apartition ofits nodes such that,for
0`k,everynodeinD
`+1
isawayfromtherootanumberx
`
oftreeedgessuchthatx
`
mod(k+1)=`.
ThispartitioncanbeconstructedeasilybytraversingT breadth-rstfromtherootandassigningeverynew
layerofnodescircularly tothe setsD
1 ;:::;D
k +1
. Clearly, everyoneof these setsis ak-dominatingset in
G. Also, because theypartition the graph'snode set, and considering that n k+1, it must be that at
leastoneofthem hasnomorethan
n=(k+1)
nodes.
Our topic in this paper is nding a k-dominating set in G having no more than
n=(k+1)
nodes
in lockstepat theoccurrence ofclock pulses, and its edges arebidirectionalcommunicationchannels that
deliver messagesbetween their end nodes before the clock pulse that follows the sending of the message
occurs. Timeismeasuredbycountingclockpulses.
Thecurrentbest synchronousalgorithm tondak-dominating setin Gis from[6], andishenceforth
referredtoasAlgorithmKP.Itproceedsintwostages: therststagepartitionsGintothetreesofarooted
spanningforestF,eachhavingat leastk+1nodesandheightO(k);thesecondstage approacheseachtree
U 2F asdescribedearlierfor thespanning treeT and partitionsits nodesinto thesets D U 1 ;:::;D U k +1 . If
f isthenumberoftreesin F, thenthek-dominatingset outputbythealgorithmisD =D U1 `1 [[D U f `f , whereU 1 ;:::;U f
arethetreesofF andD U
i
`
i
isthesmallestset ofD U i 1 ;:::;D U i k +1 for1if. Ifn U isthe
numberofnodesof U 2F,then
jDj=jD U 1 ` 1 j++jD Uf ` f j X U2F n U k+1 P U2F n U k+1 = n k+1 ; sincen U k+1forallU 2F.
While thesecond stage of Algorithm KP canbeeasily implemented within the bounds of O(k) time
and O(n) messages, its rst stage is based on an arcane combination of previously developed algorithms
for related problems [3, 5, 7], resulting in a time complexity of O(klog
n) and a message complexity of
O(mlogk+n 2
log
n). The latter, incidentally, is our best estimate of what is really involved, in terms
of communication needs, in Algorithm KP|such needs are thoroughly ignored in [6], but this message
complexityseemsto followfromthemessagecomplexities ofthealgorithm's buildingblocks.
Inthispaper,weintroduceanewsynchronousdistributed algorithmforndingak-dominatingset of
no more than
n=(k+1)
nodes in G. Like Algorithm KP, our algorithm toocomprises twosubsequent
stages, each having the samegoalas itscounterpartin AlgorithmKP. The second stage,in particular, is
exactlythesameasAlgorithmKP's.
OurcontributionistheintroductionofanewalgorithmforthepartitionofGintothetreesofF. When
comparedtoAlgorithmKP,ouralgorithmhasthesamecomplexityofO(klog
n)timewhileimprovingon
themessagecomplexity,whichinourcaseisofO(mlogk+nlogklog
n). Wealsondouralgorithmtobe
conceptuallysimplerthanAlgorithmKP,whichcanprobablybeattributedtothefactthatitwasdesigned
from scratch with the partitioning problem in mind. While ouralgorithm simply generates asequence of
\meta-graphs,"thelastofwhichhasnodesthatdirectlygivetherootedtreesofF,AlgorithmKPreducesthe
partitionproblemtoother,relatedproblemsandthencombinesalgorithmsforthoseproblemsintobuilding
asolutiontothepartitionproblem. Henceforth,weletthealgorithmweintroducebecalled AlgorithmPB.
The following is how the remainder of the paper is organized. The rst stage of Algorithm PB is
introducedin Section2and analyzedforcorrectnessandcomplexityin Section3. Concluding remarksare
givenin Section4.
2. The algorithm
InthissectionweintroducetherststageofAlgorithmPB.ThisstagendsarootedspanningforestF inG,
PartitionG startsby letting thenode set of G be thenode set of adirected graph G 0 , and proceeds fromtherein log (k+1) phases. For0i log(k+1)
1,phaseirstbuildstheedgesetof ~
G
i
andthen
beginsthetransformationof ~
G
i
intoanotherdirectedgraph, ~
G
i+1
,byclusteringthenodesof ~
G
i
togetherto
formthenodesof ~ G i+1 . Each nodeof ~ G i
standsforarootedtreein G,andthisclustering isperformedin
suchawaythatnotonlyiseachresultingnodeof ~
G
i+1
alsoarootedtreeinG,butonethathasatleast2 i+1
nodesandO(2 i+1
)height. Aftercompletionofphase
log(k+1)
1,thenodesetof ~
G
dlog (k +1)e
represents
thedesiredrootedspanning forestF (earlierterminationis alsopossible,aswediscussshortly).
Ifx andy arenodesof ~
G
i
, thenwesaythat xand y arepotential neighbors in ~
G
i
ifanedgeexists in
Gjoining somenode intherootedtree representedbyx tosomenodein therootedtreerepresentedbyy.
Wesaythat theyareneighbors in ~
G
i
ifadirectededgeexistsbetweenthem. Anodethathasnoneighbors
isisolated. Ifx andy areneighbors in ~
G
i
, thenweusex!y to indicatethat theedgebetweenx andy is
directedfromxtoy. Inthiscase,wesaythatxisanupstreamneighborofy,whichinturnisandownstream
neighborofx.
PartitionGisbasedonmanipulationsofnodeidentiers,whichweassumetobeadistinctnonnegative
integerforeverynodeinG. Theidentierofnodexin ~
G
i
,denoted byid(x), istheidentieroftherootof
itstree. If anode's identieris lessthan thoseofallitsneighbors,thenwecallthenodealocal minimum.
Ifitisgreater,thenwecallitalocalmaximum. ThefollowingishowPartition Gworksduringphasei. We
uselog (t)
nto denotelog:::logn,wherelog isrepeatedttimes.
Step1. Find theedgesof ~
G
i :
1a. Leteachnodeof ~
G
i
beinactive,iftheheightofthecorrespondingrootedtreeisatleast2 i+1
,oractive,
otherwise.
1b. For everyactive node x of ~
G
i
, nd thepotentialneighbors of x in ~
G
i
. If no potential neighbors are
foundforanynode,thenhaltandexitPartition G.
1c. Foreachactivenodex of ~
G
i
,lety bethe activepotentialneighborofx with theleastidentier. If x
hasnoactivepotentialneighbors,thenlety bethe(inactive) potentialneighborof xhavingtheleast
identier. Addx!y totheedgesetof ~
G
i
,thusmakingxandy neighborsin ~
G
i .
Remark. If no neighbors are found for any node in Step 1b, then in reality ~
G
i
has one single node that
encompasses all the nodes of G and therefore corresponds to a rooted spanning tree of G. In this case,
PartitionGterminatesprematurely,that is,before completingall
log(k+1)
phases.
Remark. Attheendof Step1c,everyactivenodeof ~
G
i
hasexactlyonedownstreamneighbor,whileevery
inactivenodehasnone. Similarly,bothactivenodeswhosedownstreamneighborisactiveandinactivenodes
mayhavebetweenzeroandsomepositivenumberofupstreamneighbors. Anactivenodewhosedownstream
neighborisinactivehasnoupstreamneighbors.
Step2. Find thenodesof ~ G i+1 : 2a. Ifx!y isanedgeof ~ G i
such thatx isanactivenodeandy aninactivenode, thencombine x intoy
bycreatingasingle node whoseidentier remainsid(y). Let X be theset of activenodes of ~
G
i that
arenotisolated.
2b. For x2X,letZ(x)X betheset ofupstreamneighbors ofx. IfZ(x)6=;,thenletz bethemember
of Z(x) having the least identier. For y 2 Z(x) such that y 6= z, check whether Z(y) = ;. In the
aÆrmativecase,combiney into x. Otherwise(i.e., Z(y)6=;),eliminateedgey !x. LetX betheset
ofactivenodesof ~
G
i
byeliminatingedgesfrom ~
G
i
appropriately. Also,combine intothenewly-formednodeanynodein X
thatmayhavebecomeisolated. LetX bethesetofactivenodesof ~
G
i
thatarenotisolated.
2d. RepeatStep2cforlocalmaxima,thenletX betheset ofactivenodesof ~
G
i
thatarenotisolated. For
x2X,letl x =id(x). 2e. For x2X,let l x = 8 < : l y ; ify!xisanedgeof ~ G i ; l x 1; ify!xisnotanedgeof ~ G i andl z >l x ; l x +1; ify!xisnotanedgeof ~ G i andl z <l x ,
wherez isthedownstreamneighborof x,and
l + x = 8 < : l y ; ifx!y isanedgeof ~ G i ; l x +1; ifx!y isnotanedgeof ~ G i andl z <l x ; l x 1; ifx!y isnotanedgeof ~ G i andl z >l x ,
wherez istheupstreamneighborofx. Nowconsider thebinaryrepresentationsofl
x ,l x , andl + x ,and
let A(x) be the set of positive natural numbers psuch that l
x and l
x
have the same bit at the pth
positionwhile l
x andl
+
x
do not. Likewise, letB(x) betheset of numberspsuch that l
x and l
x have
dierentbitsat thepthposition whilel
x andl
+
x
havethesamebit. Letp
(x)bethegreatestmember
ofA(x)[B(x). Ifx!y isanedgeof ~ G i suchthatp (x)=p
(y),thencombinexintoy andmakethe
resultingnodeisolatedbyeliminating edgesappropriately(ifanynodein X becomes isolatedbecause
of this, then combine that node into the newly-formednodeas well). Now letX bethe set of active
nodesof ~
G
i
thatarenotisolated,thenrepeatSteps2cand2dwithp
'sinplaceofid's,andonceagain
letX betheset ofactivenodesof ~
G
i
thatarenotisolated. IfX 6=;,thenletl
x =p
(x)forallx2X
andrepeatStep2e. IfX =;,thenlettheset ofisolatednodesof ~
G
i
bethenodesetof ~
G
i+1 .
Remark. InStep2a, itispossibleformorethanonex toexist forthesamey. Inthiscase,everysuchx is
combinedintothesingleresultingnodeofidentierid(y). Notethatfornosuchxtheremayexistanodez
suchthat z!x ory !z isanedge of ~
G
i
. Thisisso,respectively,becausexhasan inactivedownstream
neighborandbyStep1chasnoactiveneighbors,andbecausey,beinginactive,hasnodownstreamneighbors.
As aconsequence,thenewly-formed node isisolated in ~
G
i
. Atthe end ofStep 2a, thesingledownstream
neighborofeverymemberofX isactive,andthereforealsoamemberofX.
Remark. InStep2b,theremayexist morethanoney2Z(x)suchthat y6=z andZ(y)=;. Everysuchy
getscombinedintonodex. AttheendofStep2b,everymemberofX hasexactlyonedownstreamneighbor
and at most oneupstream neighbor. That is, the membersof X are arranged into groupsof nodes, each
grouphavingatmostonenodewithnoupstreamneighborandexactlyonenodethathasthesameneighbor
for both upstream and downstream neighbor. Except for these two-node directed cycles, such groups of
nodesmayberegardedasdirectedchains.
Remark. AttheendofStep2d,themembersofX arearrangedintodirectedchainsofnodeswhoseidentiers
arestrictlyincreasingordecreasingalongthechains. Eachsuchchainhasatleasttwonodes,ofwhichexactly
onehasnoupstreamneighborandexactlyonehasnodownstreamneighbor.
Remark. Step 2e repeatedly manipulates the node labels l
x
so that the nding of minima and maxima,
respectively as in Steps 2c and 2d, can once again be used to combine nodes in X into isolated nodes.
integershaveanever-dwindlingrange: ifj 1identiesaniterationwithinStep2e,thentherangeoflabels
during iteration j is 0;:::;log (j)
n. Eventually, during a certain iteration j log
n, this rangebecomes
f0;1gandconsequentlythetaking ofminima andmaxima asin Steps 2cand 2disguaranteedto produce
anemptyX. Atthebeginningofeachiteration,themembersofX arearrangedintodirectedchainswhose
labelsarestrictlyincreasingordecreasingalongthechains. Eachsuchchainhasatleasttwonodes,ofwhich
exactlyone hasnoupstreamneighborand exactlyonehasnodownstreamneighbor.
Steps1and2specifytheithphaseofPartitionGasthemanipulationofdirectedgraphs,rsttondthe
edgesof ~
G
i
inStep1,theninStep2tondthenodesof ~
G
i+1
. Ofcourse,therealizationofsuchoperations
ongraphsrequires communicationamongthenodesof ~
G
i
,whichultimatelytranslatesinto communication
amongthenodesofG. However,theassumptionofasynchronousmodelofdistributedcomputationmakes
thecommunicationneedsofPartitionGratherstraightforwardtorealize[10].
Becauseeachnodein ~
G
i
standsforarootedtreeinG,Steps1and2canberegardedasbeingexecuted
bythetrees'roots, which in turncoordinatetheremainingnodesin theirtreesin carryingoutthevarious
tasksprescribedbythealgorithm. Forexample,Step1ais abroadcastwithfeedbackontreeedgesstarted
by the root, which sends out the upper bound of 2 i+1
1 on the tree height for the ith phase. This is
propagatedbytheothernodesinthetree,whichsendonwhattheyreceive,ifnonzero,afterdecrementingit
byone. Thefeedbackisstartedbytheleaves,whichclearlyneverhappensifatleastoneleafisnotreached
bythebroadcast,thus signalingtotherootthatthetreeisoversized.
In the same vein, by simply letting every node in G that belongs to the same node x in ~
G
i
havea
recordofid(x),ndingthepotentialneighborsofxinStep1bandthedirectededgesincidenttoitin ~
G
i in
Step 1carealso simpleprocedures thatfunction byprobing theconnectionsofx in G. Wheneveranedge
isdeployed betweentwonodes in ~
G
i
, acorrespondingedgein G,referredto asthepreferrededge between
thosetwonodes,canalsobeeasilyidentied andrecordedforlateruse.
All the remainingactionsin Partition Gcanberealized viacommunication betweentheroots of two
treeswhosenodesin ~
G
i
areconnectedbyanedge. Wheneveramessageneedstobesent,itcanberoutedon
treeedgesonly,except tomovefromonetreeto theother,at which timeitmust gothroughthepreferred
edge between the twotrees. This is, for example, the basis for realizing the combination of a node into
another: combininga node x into a node y that is connected to it by anedge in ~
G
i
involvesmaking the
preferrededgebetweenthemanedgeofthenewtreeandthenpropagatingthroughx'streetheinformation
thatanewroot existsandhasidentierid(y).
3. Correctness and complexity
MostofourcorrectnessandcomplexityargumentshingeonhowwellStep2esucceedsin breakingdirected
chainsofnodesin ~
G
i
asneeded. It istothepropertiesofStep2ethatweturnrst.
Lemma1. Letx!y beanedgeatthebeginningofaniterationofStep2eofPartition G. Thefollowing
holds:
(i) Ifp
(x)2A(x)andp
(y)2A(y),thenp (x)6=p (y); (ii) Ifp (x)2B(x)andp
(y)2B(y),thenp (x)6=p (y); (iii) Ifp (x)2B(x)andp
(y)2A(y),thenp
(x)6=p
(y).
Proof: BySteps2athrough2e,edgex!yisinachainofnodeswhoselabelsareeitherstrictlyincreasing
orstrictlydecreasingalongthechain. Supposetheformercaserst. Thenl
x <l x <l y <l + y .
Ifp (x)2A(x), then l
x andl
x
havethesamebitat positionp (x)while l
x and l
y
havedierentbits
at that sameposition. Ifp
(y)2A(y), thenl
x andl
y
havethe samebitat position p (y)while l y andl + y
havedierentbits atthatsameposition. Sop
(x)andp
(y)cannotbethesameposition,thusproving(i).
Ifp (x)2B(x), then l x andl x
havedierent bitsat position p
(x) whilel
x andl
y
havethesamebit
at thatsameposition. If p
(y)2B(y), thenl
x andl
y
havedierentbits at position p (y)while l y andl + y
havethesamebitatthatsameposition. Sop
(x)andp
(y)cannotbethesameposition,whichproves(ii).
Wenowprove(iii). If p
(x) 2B(x), thenl
x and l
x
havedierent bitsat position p (x) whilel x and l y
havethesamebit at that sameposition. Suppose thesebits are100, respectivelyforl
x ,l x , and l y . By denitionof p
(x),at allotherpositions totheleftofp
(x) inthebinaryrepresentationsofl
x ,l x ,l y (that
is, positions correspondingto higher powersof two) wemust havethesamebit for allthree labels orbits
thatdierfrom l
x to l
x
andalsofroml
x to l
y
. Inotherwords,theonlypossibilitiesare000,111,010,and
101. Butthesepossibilitieshaveallthesamebitforl
x andl
y
,whichcontradictsthefactthatl
x <l
y . Then
thebitsforl
x ,l x ,andl y at position p (x)mustbe011. Ifp (x)=p
(y),thenthebitsofl
x andl
y
areboth1atposition p
(y),whichisinagreementwiththe
denition ofA(y). Bythis samedenition,at position p
(y) thebitof l +
y
must be0. Totheleft ofp
(y),
thepossibilitiesforl
x ,l y ,l + y
are000,111,010,and101,againfollowingthedenitionofp
(y). Thisimplies
the same bit for l
x and l
+
y
at all those positions, which like before contradicts the fact that l
x < l + y . So p (x)6=p (y).
Ifx!yisinachainofnodeswhoselabelsarestrictlydecreasingalongthechain,thenl
x >l x >l y >l + y .
Inthiscase,theargumentsthatprove(i)and(ii)remainunchanged,whilein theproofof(iii)itsuÆcesto
complementeverybitin thetripleswedisplayed(thisleadstocontradictionsofl
x >l y andl x >l + y ).
Lemma2. Letx!ybeanedgeatthebeginningofaniterationofStep2eofPartitionG. Ifp (x)=p (y), thenp (x)2A(x)andp (y)2B(y). Proof: If p (x) 2B(x)with either p (y)2B(y) or p
(y)2 A(y), then byLemma 1, parts (ii) and (iii),
p (x) 6=p (y). If p (x) 2A(x) and p
(y)2A(y), then by Lemma 1,part(i), p
(x)6=p
(y). Thence the
lemma.
Lemma3. Letx!y !zbepartofachainatthebeginningofaniterationofStep2eofPartitionG. If
p (x)=p (y),thenp (y)6=p (z). Proof: ByLemma2,p (x)2A(x) andp
(y)2B(y). ByLemma1,parts(ii)and(iii),p
(y)6=p
(z).
NowletI be thelast phaseofPartitionGin which prematuretermination inStep 1bdoesnotoccur.
Then1I
log(k+1)
1andwehavethefollowing.
Lemma 4. For i = 0;:::;I, every node of ~
G
i+1
that is not an inactive node of ~
G
i
is formed by the
combinationofatleasttwonodesof ~
G
i .
Proof: ByStep2e,thenodesetof ~
G
i+1
isthesetofisolatednodesin ~
G
i
attheendofStep2. Thelemma
followseasilyfromthefactthateveryisolatednodeproducedduringStep2(thatis,isolatednodesthatare
notinactiveduring phasei)resultfromthecombinationofatleasttwonodesof ~
G
i .
WearenowinpositiontodemonstratethatPartitionGdoesindeedachieveitsgoals.
Theorem 5. Fori =0;:::;I+1,the nodesof ~
G
i
form arooted spanning forestof G. Each tree in this
foresthasatleast2 i
nodesandO(2 i
inductionhypothesisisthatthenodesof ~
G
i
formarootedspanningforestofG,eachofwhosetreeshaving
atleast2 i
nodesandO(2 i
)height.
Inordertoshowthatthenodesof ~
G
i+1
doindeedformarootedspanningforestofG,bytheinduction
hypothesis itsuÆces toarguethat theset X isemptyat theend ofphasei. Thereasonforthis isthat it
isthe setof isolatednodes atthe endof phaseithat wetaketo bethenodeset of ~
G
i+1
,and that X =;
indicatesthateverynodeinGispartofthetreerepresentedbysomeisolatednode. Butthisfollowsdirectly
fromthefactthattherangeoflabelsduringStep2edecreasessteadilyastheiterationsprogress. Eventually,
thisrangebecomessuch thateverylabeliseither 0or1,atwhichtime thendingofminimaandmaxima
makesX empty.
Havingshownthis,weconsiderthenumberofnodesand heightofeachofthetreesin thenodeset of
~ G i+1 . Anodeof ~ G i+1
iseither aninactivenode of ~
G
i
or results,by Lemma4,from thecombinationof at
least two nodesof ~
G
i
. In theformer case,by Step 1athe nodecorrespondsto arooted treein Gwith at
least2 i+1
nodes. Inthelattercase,bythe inductionhypothesis,it correspondsto arooted treein Gwith
atleastq2 i
nodesforq2,that is,atleast2 i+1
nodes.
Asfortheheight,wereasonsimilarly. Ifanodein ~ G i+1 isaninactivenodeof ~ G i
,thenitsheightis,by
theinductionhypothesis,O(2 i
),whichinturnisO(2 i+1
). Ifitisacombinationofatleasttwonodesof ~
G
i ,
theneitherthiscombinationtakesplaceinoneofSteps2athrough2dorinStep2e. Intheformercase,the
combination iseither performed overasingleedge (Steps2aand2b), orit isperformedoverachainof at
mostsixedges(rstin Step2c, theninStep2d). Ineithercase,theinductionhypothesisleadstoaheight
ofq2 i
forq aconstant,whichisO(2 i+1
). ThecaseofStep2e isentirelyanalogous,sinceby Lemma3itis
eitherperformedoverasingleedge,orelsebythetakingofminimaandmaxima,asinSteps2cand2d.
Corollary 6. Thenodes of ~
G
I+1
form arooted spanning forest of G, and in this forest each tree has at
leastk+1nodesandO(k)height.
Proof: IfPartitionGterminatesinStep1bofsomephase,thenI <
log(k+1)
1andthecorollaryholds,
because ~
Ghasinthiscaseonesinglenodeencompassingallthenk+1nodesofG,andfurthermorethe
heightofthetreethatcorrespondstothissinglenodeisbyTheorem5O(2 I+1
),whichisO(k). IfPartitionG
runs throughall the phases,then I =
log (k+1)
1and the corollaryfollowsdirectly from Theorem5
withi=I+1=
log (k+1)
.
WenownalizethesectionbydiscussingthetimeandnumberofmessagesneededbyPartitionGand
byAlgorithmPBas awhole.
Theorem7. PartitionGrequiresO(klog
n)timeandO(mlogk+nlogklog
n)messagestocomplete.
Proof: Duringtheith phase,i=0;:::;
log (k+1)
1,each ofSteps1a through2drequires aconstant
numberofcommunication\rounds,"eachinturnrequiringanumberoftimeunitsproportionaltotheheight
of arootedtree in that phase,which byTheorem 5is O(2 i
). Thesameholds for each of theiterationsof
Step2e,ofwhichthereareat mostlog
n. ThenthetimerequiredforPartitionGtocompletegrowswith
dlog (k +1)e 1 X i=0 2 i log n dlog (k +1)e 1 X i=0 2 log(k +1) 2 i log n =(k+1)log n dlog (k +1)e 1 X i=0 1 2 i <2(k+1)log n;
soPartitionGrequires O(klog n)time.
The number of messages that PartitionG requires canbe estimated likewise for phase i, as follows.
Thenumberof messagessentduring Step1is dominatedbyStep 1bto determinethepotentialneighbors
in Gofanodein ~
G
i
,which requiresO(m)messages. Steps2a and2brequireO(n)messages,whichisthe
totalnumberoftree edges,becauseseveralnodesmaybecombinedintothesamenodeduringthosesteps.
However,eachoftheO(log
n)communication\rounds"inSteps2cthrough2eismoreeconomical,because
the chain structure of ~
G
i
in those stepsallows communication to take place along single paths from the
trees'roots, andsothenumberofmessages owingin each rootedtreeisproportionaltoits height,which
during phasei isO(2 i
)byTheorem5. AlsobyTheorem5,each rooted treein ~ G i hasat least2 i nodes, so
there areat mostn=2 i
rooted treesin ~
G
i
. Itfollowsthat thenumberofmessagesrequiredbyPartitionG
forcompletiongrowswith
dlog (k +1)e 1 X i=0 m+ n 2 i 2 i log n=m log(k+1) +nlog n log (k+1) ;
soPartitionGrequires O(mlogk+nlogklog
n)messages.
Corollary8. AlgorithmPBrequiresO(klog
n)timeandO(mlogk+nlogklog
n)messagestocomplete.
Proof: Immediate from Theorem7,considering that thealgorithm'ssecond stage requiresO(k) timeand
O(n)messages.
4. Concluding remarks
Wehaveconsideredthe problemofnding ak-dominatingsetwith nomorethan
n=(k+1)
nodesin G,
andgivenanewsynchronousdistributedalgorithmtosolveitinO(klog
n)timewhilerequiringO(mlogk+
nlogklog
n)messages. Our algorithm follows thesame overall strategy of [6], accordingto which rsta
rootedspanning forestisfoundin Gwithcertaincharacteristics,andthen thedesiredk-dominatingseton
thatforest.
Our algorithm introduces a new approach to nding the rooted spanning forest, which we think is
conceptually simplerthan theone of [6], and shares withthe algorithm of [6] theadditional computation
that is requiredto nd the k-dominating set. In both algorithms, theoverall complexity isdominated by
theforest-ndingstage. Bothhavethesametimecomplexity,butourshasbettermessagecomplexity.
Acknowledgments
The authors acknowledge partial support from CNPq, CAPES, the PRONEX initiative of Brazil's MCT
undercontract41.96.0857.00,andaFAPERJBBPgrant.
References
1. V.C.Barbosa,AnIntroductiontoDistributedAlgorithms,TheMITPress,Cambridge,MA,1996.
2. J.Bar-Ilan,G.Kortsarz,andD. Peleg,\Howto allocatenetworkcenters,"J. ofAlgorithms 15(1993),
385{415.
3. J. A. Garay, S. Kutten, and D. Peleg, \A sub-linear time distributed algorithm for minimum-weight
Completeness,W. H.Freeman&Co.,NewYork,NY, 1979.
5. A. V.Goldberg, S. A.Plotkin, andG.E. Shannon,\Parallelsymmetry-breakingin sparsegraphs," in
Proc. of the NineteenthAnnualACMSymposiumonTheoryof Computing,315{323,1987.
6. S.KuttenandD.Peleg,\Fastdistributedconstructionofsmallk-dominatingsetsandapplications,"J.
of Algorithms 28(1998),40{66.
7. A.PanconesiandA.Srinivasan,\Improveddistributedalgorithmsforcoloringandnetwork
decomposi-tionproblems,"inProc. of the Twenty-FourthAnnual ACMSymposiumon the Theory of Computing,
581{592,1992.
8. D.Peleg,\Distributeddatastructures:acomplexity-orientedview,"inProc.oftheFourthInt.Workshop
onDistributedAlgorithms,71{89,1990.
9. D. Pelegand E. Upfal,\A tradeobetweensize andeÆciency for routingtables,"J. of the ACM 36
(1989),510{530.
10. L. D.Penso,ADistributedAlgorithm toFind k-dominating Setsin Graphs,M.Sc. thesis,Federal
Uni-versityofRiodeJaneiro,Brazil,December1999.(In Portuguese.)
11. R.WittmannandM.Zitterbart,MulticastCommunication:Protocols andApplications, Morgan