Σχόλια 0

Το κείμενο του εγγράφου

A fast algorithm for computing minimum routing cost spanning treesRui Campos*,Manuel RicardoINESC Porto,Faculdade de Engenharia,Universidade do Porto,Rua Dr.Roberto Frias,378,4200-465 Porto,Portugala r t i c l e i n f oArticle history:Received 18 November 2007Received in revised form 28 May 2008Accepted 17 August 2008Available online 27 August 2008Responsible Editor:V.R.SyrotiukKeywords:Minimum Routing Cost TreeShortest Path TreeMinimum Spanning TreeBridgingRoutinga b s t r a c tCommunication networks have been developed based on two networking approaches:bridging and routing.The convergence to an all-Ethernet paradigm in Personal and LocalArea Networks and the increasing heterogeneity found in these networks emphasizesthe current and future applicability of bridging.When bridging is used,a single activespanning tree needs to be deﬁned.A MinimumRouting Cost Tree is known to be the opti-mal spanning tree if the probability of communication between any pair of network nodesis the same.Given that its computation is a NP-hard problem,approximation algorithmshave been proposed.We propose a newapproximation MinimumRouting Cost Tree algorithm.Our algorithmhas time complexity lower than the fastest known approximation algorithmand provides aspanning tree with the same routing cost in practice.In addition,it represents a bettersolution than the current spanning tree algorithm used in bridged networks. 2008 Elsevier B.V.All rights reserved.1.IntroductionAlong with the increasing convergence to an all-IP par-adigm,in recent years,we have been witnessing a conver-gence to what can be called an all-Ethernet paradigm,especially in Personal Area Networks (PANs) and LocalArea Networks (LANs).In fact,standards such as IEEE802.11 [1] and Bluetooth with the speciﬁcation of thePAN proﬁle [2],and the recent draft speciﬁcation of theWiMedia Network (WiNet),that builds on the WiMediaUWB (Ultra Wide Band) radio platform[3,4],have been de-ﬁned to appear in the upper layers of the OSI (Open Sys-tems Interconnection) model as legacy Ethernet links.This paradigm eases the use of bridging in scenarios be-yond the traditional Ethernet LANs.For instance,IEEE802.1D bridges [5] are being used to interconnect IEEE802.11 networks to backhaul Ethernet infrastructures,tocreate Bluetooth PANs,and to interconnect Bluetooth PANsto IEEE 802 networks [2].Additionally,they have been pro-posed to interconnect UWB WiNet networks to IEEE 802networks [4] and pointed out by upcoming standards,suchas IEEE 802.11s [6],as a solution to interconnect Layer 2mesh networks to other IEEE 802 networks.The use ofbridging enables the creation of a single Layer 2 networkfrom the point of view of the upper layers and hides fromthem the multiplicity of underlying links that may form aPAN/LAN.New PAN/LAN wired or wireless technologiescan be smoothly integrated with existing technologies,without modiﬁcations to the protocol stack above the datalink layer of the OSI model.Also,IP and its companion pro-tocols,such as Dynamic Host Conﬁguration Protocol(DHCP) [7] and Address Resolution Protocol (ARP) [8],areenabled to run transparently over multiple underlyinglinks.When bridging is used a single spanning tree needs tobe deﬁned as the active network topology.Several span-ning trees can be computed from the graph that modelsthe network topology,also known as the topology graph.In the topology graph,the vertices model the networknodes,the edges model the network links connecting thenetwork nodes,and the weights assigned to the edges rep-resent costs computed based on metrics,such as band-width and delay.A Minimum Routing Cost Tree (MRCT)is,by deﬁnition,the optimal spanning tree from the1389-1286/$ - see front matter 2008 Elsevier B.V.All rights reserved.doi:10.1016/j.comnet.2008.08.013* Corresponding author.Tel.:+351222094258;fax:+351222094250.E-mail addresses:rcampos@inescporto.pt (R.Campos),mricardo@inescporto.pt (M.Ricardo).Computer Networks 52 (2008) 3229–3247Contents lists available at ScienceDirectComputer Networksj ournal homepage:www.el sevi er.com/l ocat e/comnetstandpoint of the routing cost and always represents aspanning tree closer to the optimal solution deﬁned bythe union of the Shortest Path Trees.The need for a single active spanning tree has been of-ten presented as one of the major disadvantages of bridg-ing.However,for heterogeneous PANs/LANs,i.e.,networks whose corresponding topology graphs have het-erogeneous edge weights,this may not represent a signif-icant disadvantage.In Mieghem et al.[9,10] havedemonstrated that,as the networks become increasinglyheterogeneous,the union of the Shortest Path Trees tendsto converge to a single spanning tree,a MinimumSpanningTree (MST),which also deﬁnes an approximate or the exactMRCT in such cases.Therefore,with the increasing hetero-geneity found in PANs/LANs – consider,for example,anEthernet network where 100 Mbit/s and 1 Gbit/s linksmay coexist in the same LAN,or a future PAN where IEEE802.11 (54 Mbit/s),Bluetooth (3 Mbit/s),and UWB WiNet(480 Mbit/s) links may coexist,the use of bridging gainsa new interest.Regarding the computation of a spanning tree from amesh network topology,the IEEE has speciﬁed the RapidSpanning Tree Protocol (RSTP) included in the IEEE802.1Dstandard [5].The devices participating in the proto-col elect a root node (called the root bridge) and each de-vice computes the shortest path towards the elected root.The union of these paths represents the ﬁnal spanning tree,a Shortest Path Tree (SPT) fromthe root node’s perspective.Nonetheless,an arbitrary SPT is selected to deﬁne the ac-tive network topology,as a consequence of the arbitraryselection of the root node.In practice,the arbitrary SPTdoes not deﬁne a good approximation to an MRCT,in par-ticular for heterogeneous networks,precisely where theuse of bridging would be of greater interest.The computation of an MRCT is known to be a NP-hardproblem [11].That fact has led to the development ofapproximation algorithms.The fastest known approxima-tion algorithm has been proposed by Wu et.al [12] but itonly applies to metric graphs,i.e.,graphs whose edgesweights obey to the triangle inequality.In practice,edgeweights may not obey to this condition since it may fre-quently happen that the direct path between two adjacentnodes is longer than some indirect path between them.Assuch,the algorithm is not generically applicable.The fast-est known generic approximation algorithmhas been pro-posed by Wong [13].Wong’s algorithm speciﬁes thecomputation of n Shortest Path Trees (SPTs),where n isthe number of nodes in the input graph,and selects thetree with the lowest routing cost.Still,the mandatory com-putation of n SPTs and the calculation of the routing costfor each of them represent its main disadvantages.Morerecently,Grout [14] has proposed a greedy approximationMRCT algorithm,called Add algorithm,that provides goodresults for homogeneous graphs (i.e.,graphs whose edgesweights are equal) and lower time complexity than Wong’salgorithm.Nonetheless,it does not work for non-homoge-neous graphs.We herein propose a new approximationMRCT algorithm,called Campos’s algorithm,that has lowertime complexity than Wong’s algorithm while providing aspanning tree with similar routing cost for both homoge-neous and heterogeneous graphs in practice.Furthermore,Campos’s algorithm provides results better than the cur-rent spanning tree algorithm used in bridged networks,namely for heterogeneous networks.The motivation for the present work is three-fold.Firstly,the relevance that bridging has and is envisionedto have in the future within the PAN/LAN scope.Secondly,the shortcomings found in the spanning tree algorithmcurrently used by IEEE 802.1D bridges;in general,it doesnot represent a good approximation MRCT algorithm.Thirdly,the lack of an approximation MRCT algorithmthatprovides similar results to Wong’s algorithm (in practice)and has lower time complexity.The contributions of our work are the following.Firstly,we propose Campos’s algorithmas a new approximationMRCT algorithm.To the best of our knowledge,it is theﬁrst approximation MRCT algorithmwith time complexitylower than Wong’s algorithmwhile offering similar routingcosts in practical cases.Furthermore,it represents a differ-ent approach concerning improvements to the currentspanning tree algorithmused by IEEE 802.1D bridges;pre-vious proposals have focused more on the provisioning ofloop freedom or on the improvement of the performanceof the spanning tree protocol itself,and less on the compu-tation of the spanning tree used as active topology.Sec-ondly,we make a comparative analysis of multiplespanning tree algorithms against the current spanning treealgorithm used in IEEE 802.1D bridges by using simula-tions.Previous studies have focused more on asymptoticalanalysis or have considered a limited scope;for instance,in[14] Grout has compared his algorithm with MST algo-rithms but did not compare it with IEEE algorithm and/orWong’s algorithm.Thirdly,we conclude about the realisticscenarios where Add and the classical MST algorithms canbe used as faster alternatives to Wong’s algorithmfor com-puting approximate MRCTs.Based on the simulation results we conclude that:(1)Campos’s algorithm does represent the current fastestapproximation MRCT algorithm and does provide resultssimilar to those obtained using Wong’s algorithmfor prac-tical cases;(2) as the number of vertices in the currentgraph increases,Campos’s algorithm performs better thanAdd algorithm,when sparse homogeneous graphs are con-sidered;(3) Campos’s algorithm gives lower routing coststhan the spanning tree algorithm currently used by IEEE802.1D bridges and may be used in current and newbridg-ing oriented solutions to deﬁne the active spanning tree;(4) Add algorithmis a good approximation MRCT algorithmas far as homogeneous graphs are concerned,but it per-forms poorly for heterogeneous graphs;(5) MST algo-rithms tend to approximate the result provided byWong’s algorithm as the weights in the input graph be-come increasingly heterogeneous.Along the paper we take three major assumptions.Firstly,we limit our analysis to networks with up to 50nodes.We focus on small scale networks,such as PANsand LANs,as this represents the typical applicability do-main for bridging.Secondly,while computing an approxi-mate MRCT our goal is to ﬁnd the approximateunconstrained MRCT.That is,we do not assume any con-straints,such as,minimum node degree in the ﬁnal span-ning tree.Thirdly,we assume a random communication3230 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247pattern within a bridged network:the probability of com-munication between each pair of network nodes in the ac-tive spanning tree is the same,as it has already beenassumed by others [15,16],so that an MRCT can be consid-ered the optimal active spanning tree.The rest of the paper is organized as follows:In Section2,we deﬁne some concepts and terms in the context ofgraph theory.In Section 3,we present the related workon approximation MinimumRouting Cost Tree algorithmsand the major approaches proposed to improve the perfor-mance of bridged networks.In Section 4,we describe thespanning tree algorithms considered in our analysis.Sec-tion 5 describes our approximation MRCT algorithm.Sec-tion 6 provides the comparison methodology we used toevaluate it against the state of the art spanning tree algo-rithms.Section 7 describes STS,a newsimulator developedto support our analysis.Section 8 presents the set of simu-lations we have performed.Section 9 shows and analysesthe simulation results.Finally,Section 10 mentions the fu-ture work and Section 11 draws the conclusions.2.Graph theoretic deﬁnitionsIn this section,we present the concepts of graph,tree,and spanning tree,and deﬁne some terms used along thepaper.In addition,we deﬁne three well known spanningtrees:Shortest Path Tree (SPT),Minimum Spanning Tree(MST),and Minimum Routing Cost Tree (MRCT).2.1.Graphs and spanning treesSome types of graphs are deﬁned in graph theory.Direc-ted and undirected graphs,weighted and unweightedgraphs as well as their combinations are deﬁned.Here,we consider weighted,undirected graphs.Fig.1 illustratesan example of a weighted,undirected graph.Circles represent the vertices of the graph,lines repre-sent the edges of the graph,and the numbers next to thelines specify the weights assigned to the correspondingedge.Formally,a weighted,undirected graph G ¼ðV;E;wÞ is deﬁned as a set of vertices V connected by aset of edges E#VxV (i.e.,the elements of E are 2-elementsubsets of V) with weights w that represent costs assignedto the edges of G;w(i,j) deﬁnes the weight assigned to theedge (i,j) and takes an integer value.The number of verti-ces in G is n ¼ jVj and the number of edges is m¼ jEj.Thegraph in Fig.1 has n ¼ 6 and m¼ 7.The set of verticesadjacent to a vertex v is denoted by Av.The degree of a ver-tex v is deﬁned as its number of adjacent edges,where anadjacent edge to v is an edge connecting it to a neighborvertex.In Fig.1 vertex 2,for example,has degree 3.A graphwhere all vertices have degree n 1 is called a completegraph.A path in G is deﬁned as a sequence of connectedadjacent vertices;the path starts at the ﬁrst vertex of thesequence and ends at the last vertex of the sequence,ver-tices f and l,respectively.The cost of the path between fand l,cGðf;lÞ,is equal to the sumof the weights of the edgesbelonging to the path.In Fig.1,the sequence {1,2,5,3,6}represents a path between vertices 1 and 6 andcGð1;6Þ ¼ 10 þ1 þ10 þ5 ¼ 26.A cycle in G is deﬁned asa path where the ﬁrst and the last vertex in the sequenceare the same,i.e.,f ¼ l.In Fig.1,the sequence {1,2,5,3,1}deﬁnes a cycle.A graph G in which edge weights satisfythe triangle inequality is called a metric graph.The triangleinequality is deﬁned by the following expression:cGði;jÞ 6 cGði;kÞ þcGðk;jÞ;ð1Þwhich states that the direct path between two vertices iand j in G has always lower or equal cost than any otherpath in G between the two vertices.In graph theory,a tree T is deﬁned as a connected graphwithout cycles.Any two vertices in T are connected by ex-actly one path and the number of edges in T is n 1.InFig.1,if the edges (1,2) and (2,4) are removed we get atree.A spanning tree for a graph G ¼ ðV;E;wÞ is deﬁnedas a subgraph of G that is a tree,contains all vertices ofG,and has jVj 1 edges.Some cost functions can be de-ﬁned for a tree T.The cost between a source vertex s anda vertex v,with s,v 2 T,is given bycTðs;vÞ;ð2Þwhich expresses the cost of the path between s and v in T.The total cost for T is given byCtotalðTÞ ¼Xn1e¼1wTðeÞ;ð3Þwhere wTðeÞ represents the weight assigned to edge e 2 ETand ETdeﬁnes the set of edges of T.The routing cost for T isCrðTÞ ¼Xni¼1Xnj¼1cTði;jÞ;i–j:ð4ÞBased on the minimization of the cost functions deﬁned in(2)–(4),three spanning trees have been deﬁned for an in-put graph G.A Shortest Path Tree (SPT) rooted at a vertex s,wellknown in the scope of network routing protocols,deﬁnesa tree composed by the union of the paths between s andeach of the other vertices in G such thatcSPTðs;vÞ ¼ minðcGðs;vÞÞ:ð5ÞA MinimumSpanning Tree (MST) represents a spanning treeT*such thatCtotalðT

Þ ¼ minXni¼1Xnj¼1cTði;jÞ;i–j!;ð7Þfor all spanning trees T that can be computed from G.SPT,MST,and MRCT are not necessarily unique.For in-stance,a unique MST is only guaranteed when the weightsof G are all different;otherwise,there can be multiplespanning trees that match the minimum total cost crite-rion.The algorithms used to compute these spanning treesare described in Section 4.3.Related workBelow,we ﬁrst present related work on approximationMRCT algorithms and then refer some approaches thathave been proposed in order to improve the performanceof bridged Ethernet networks.In [13] Wong has proposed a 2-approximation algo-rithm,which means that the resulting spanning tree hasat most 2 times the routing cost of the actual MRCT.Wong’salgorithmdeﬁnes the computation of n SPTs using a short-est path algorithm,such as Dijkstra’s algorithm(see Section4.4),and the calculation of the routing cost for each ofthem.The tree with lowest routing cost is selected as the2-approximate MRCT.The time complexity Oðn2logðnÞþm nÞ is the major drawback of Wong’s algorithm;n SPTsand the routing cost for each of them needs to becomputed in order to ﬁnd the best SPT.Better genericapproximation MRCT algorithms,15/8-approximationand 3/2-approximation running in time Oðn3Þ and Oðn4Þ,respectively,are proposed in the literature [11];yet,betterapproximations are achieved at a cost of increased timecomplexities.Wu et al.[12] have demonstrated that to ﬁnd an MRCTin a general weighted graph is equivalent to solving thesame problemin a complete graph in which edge weightssatisfy the triangle inequality,i.e.,a complete metric graph.For metric graphs they have proposed the Polynomial TimeApproximation Scheme (PTAS) for ﬁnding an ð1 þeÞ-approximate MRCT in time Oðn2d2=ee2Þ.Using this schemea 2-approximate MRCT can be computed in time Oðn2Þ.However,concerning general graphs,ﬁrstly the inputgraph has to be converted into a metric graph,then theapproximate MRCT is computed using the PTAS,and ﬁnallythe approximate MRCT found for the metric graph can betransformed into a spanning tree of the original graph.Thisleads to an overall time complexity Oðn3Þ [11].In [14] Grout proposes a greedy algorithm – Add algo-rithm– that does not guarantee any asymptotical approx-imation but,in practice,provides good results forhomogeneous graphs and has lower time complexity (seeSection 4.5) than the previous algorithms.Add algorithmassumes that the way to approximate an MRCT is by min-imizing the number of relay vertices – vertices with degreegreater than one – in the ﬁnal spanning tree.Thus,itsobjective is to compute a spanning tree with the minimalset of relay vertices.Despite performing well for homoge-neous networks,Add algorithm does not work for non-homogeneous networks,as we will show later on.Conse-quently,it does represent a good approximation MRCTalgorithm but only addresses homogeneous networks.In [9,10] Mieghem et al.analyze the inﬂuence of theedge weights structure in the union of all SPTs (USPTs) usedby routing approaches to deﬁne the active network topol-ogy.They show that USPTsexhibits different behaviorsdepending on the level of heterogeneity of the edgeweights in the input graph.For increasingly heterogeneousinput graphs they demonstrate that USPTsconverges to orcoincides with a single spanning tree,an MST;in otherwords,a MST approximates or coincides with USPTs.Thismeans that under such conditions an MST algorithm canbe used as an approximation MRCT algorithm or even asthe MRCT algorithm.The proposals for improving the performance of bridgedEthernet networks have mostly concentrated on overcom-ing the need to use a single spanning tree as the active net-work topology;less work has been performed on theimprovement of the routing cost of the active spanningtree.In [17] Lui et al.propose a new bridging device,calledSTAR bridge,that can coexist with current IEEE 802.1Dbridges in the same network.STAR bridges take advantageof the possible existence of alternate paths shorter than thepaths deﬁned by the active spanning tree computed usingIEEE algorithm.If such path exists,STAR bridges forwardframes over it,instead of using the spanning tree path de-ﬁned by IEEE spanning tree algorithm;through simulationthe authors demonstrate the effectiveness of this approach.STAR bridges introduce a more complex operation modelthan IEEE 802.1D bridges,since they need to computethe possible alternate paths that may be used to forwardframes,and need to explicitly exchange information aboutattached end-hosts,so that frames can be forwarded to-wards the right end-hosts over the alternate paths.In [18] Rodeheffer et al.propose the so-called Smart-Bridge aiming at improving the scalability of Ethernet net-works.SmartBridges overcome the single spanning treelimitation by always using a shortest path to forwardframes,as it happens in routing.In addition,they introduceimprovements in the convergence time when networktopology changes occur;the authors claim that Smart-Bridges are three orders of magnitude faster than IEEE802.1D bridges using the IEEE spanning tree protocol.Sim-ilarly to STAR bridges,SmartBridges introduce a more com-plex operation model and also need to exchangeinformation about attached end-hosts.Moreover,they arenot backwards compatible with IEEE 802.1D bridges;asimilar backwards compatible solution has been proposedby Perlman [19].In [20] Pellegrini et al.propose a new algorithm,calledTree-Based Turn-Prohibition (TBTP),targeting GigabitEthernet networks and aiming at tackling the non-efﬁcientutilization of the underlying Gigabit links if using IEEE802.1D bridges.The TBTP algorithm computes an activetopology that besides the spanning tree links containsalternate links that enable shorter forwarding paths,as ithappens in the STAR solution;for compatibility reasonsthe spanning tree is computed using IEEE spanningalgorithm.As it happens for the previously described pro-3232 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247posals,bridges using the TBTP algorithm introduce anoperation model more complex than the IEEE 802.1D oper-ation model;for instance,the computation of the activetopology has time complexity Oðm2Þ.Huang and Cheng [21] proposed a new spanning treealgorithm that,for non-homogeneous networks,providesa spanning tree more balanced than the spanning treeachieved by using IEEE algorithm.Informally,a balancedspanning tree is deﬁned as a tree where no leaf is much far-ther away fromthe root than any other leaf;an example ofa balanced tree is the complete binary tree.By deﬁning amore balanced spanning tree the authors claimthat its cor-responding routing cost will be lower.However,this con-clusion does not always hold.Indeed,it is only true forhomogeneous trees,where link weights are all equal andthe topology of the tree is the only factor inﬂuencing itsrouting cost (see Section 5);in this case,a more balancedtree contributes to the reduction of the routing cost,sincethe average path between each pair of nodes tends to beshorter.Regarding heterogeneous networks the linkweights also inﬂuence the routing cost of the tree and amore balanced tree does not necessarily have lower rout-ing cost;it depends on its link weights.Thereby,in general,the authors’ algorithm does not provide a spanning treewith lower routing cost than IEEE algorithm.Recently,Elmeleegy et al.[22] proposed a new device,called EtherFuse,that can be inserted into existing bridgedEthernet networks to reduce the reconﬁguration time andprevent congestion due to packet duplication during tem-porary formation of forwarding loops.EtherFuse is com-patible with the current spanning tree protocol;it worksas a watchdog by monitoring,for instance,the existenceof temporary loops and the sudden leave of the root bridge.By means of an EtherFuse prototype the authors haveshown the actual effectiveness of the device to tackle thecurrent problems found in the RSTP protocol and the per-formance improvements achieved from common applica-tions’ perspective,such as web browsing and ﬁle transfer.However,EtherFuse only addresses the problems identi-ﬁed in the RSTP protocol;an Ethernet network includingEtherFuse devices will still have an active spanning treedeﬁned by current IEEE algorithm.4.Spanning tree algorithmsThis section describes the spanning tree algorithmsconsidered in the comparative analysis we carried out toevaluate Campos’s algorithm.We describe the currentspanning tree algorithm used by IEEE 802.1D bridges,thetwo most relevant MST algorithms (Kruskal’s and Prim’salgorithms),Dijkstra’s algorithm,on which Wong’s algo-rithm is based,and Add algorithm.4.1.IEEE 802.1D Spanning tree algorithmThe Rapid Spanning Tree Protocol (RSTP) protocol cur-rently deﬁned in IEEE 802.1D standard [5] deﬁnes an SPTas the active spanning tree within a network.The algo-rithmused to compute an SPT consists of two major steps:(1) the devices participating in the protocol elect a rootnode,named root bridge;(2) each device computes ashortest path towards the root node;the union of thesepaths represents the ﬁnal spanning tree and deﬁnes aShortest Path Tree from the root node’s perspective.Theroot node is arbitrarily selected,what leads to an arbitrarySPT.The time complexity associated to the computation ofa Shortest Path Tree is deﬁned in Section 4.4.4.2.Prim’s algorithmPrim’s algorithm [23] by Prim is,in conjunction withKruskal’s algorithm,one of the classical greedy algorithmsused to compute an MST for an input graph G.InitiallyPrim’s algorithm selects an arbitrary vertex u (initial ver-tex) as the current candidate to make part of the spanningtree T.u is then added to the list of vertices L that includesthevertices candidates to make part of the spanning tree Tat each step of the algorithm;at the beginning,u is the un-ique element in L.A generic vertex v in L is characterizedby the weight wvof the edge connecting v to its candidateparent vertex in T,pv;the initial vertex has wu¼ 0 and itscandidate parent vertex puis undeﬁned,since it is the rootof the spanning tree T.At each step the algorithmworks asfollows.The vertex v with the lowest weight is removedfrom L and deﬁned as the current spanned vertex.Eachvertex a adjacent to v in G that does not belong to T yetis added to L;v represents the candidate parent vertex inT for each vertex a added to L.If a already belongs to Lbut the weight wðv;aÞ < wa,waand the candidate parentvertex paare updated accordingly,i.e.,wa¼ wðv;aÞ andpa¼ v.This process is repeated until the n vertices havebeen added to T.At that stage T deﬁnes an MST,whoseedges are deﬁned by the union of the edges ðv;pvÞ.Prim’salgorithm runs in Oðn mÞ in its more naive implementa-tion and in Oðn2Þ time when ensuring that for each itera-tion at most n edges are searched.Yet,if binary heaps inconjunction with adjacency lists or Fibonacci heaps [24]in conjunction with adjacency lists are used,the time com-plexity can be improved to OðmlogðnÞÞ andOðmþn logðnÞÞ,respectively.4.3.Kruskal’s algorithmKruskal’s algorithm [25] by Kruskal is another popularalgorithmtargeting the same problem.Kruskal’s algorithmstarts with a forest which consists of n trees,where eachvertex is initially a separate tree.Afterwards,the edges inthe graph are sorted by weight in non-decreasing order.At each step of the algorithm,the edge (u,v) with the low-est weight is selected.If vertices u and v belong to two dif-ferent trees,the two trees are combined into a single tree.If the selected edge connects vertices which belong to thesame tree the edge is rejected and not examined again,as it would produce a cycle.While running the algorithm,less and bigger trees are achieved until a single tree isfound,an MST;the algorithm ﬁnishes when either allnodes have been spanned or all edges have been processed.Sorting the edges in non-decreasing order takesOðm logðmÞÞ time.This deﬁnes the asymptotic runningtime of the algorithm.In practice,Kruskal’s algorithm hasbeen implemented using priority queues,whose elementsare the edges of the graph.R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 32334.4.Dijkstra’s algorithmDijkstra’s algorithm [26] by Dijkstra is the classicalshortest path algorithm used,for instance,in networkrouting protocols.Dijkstra’s algorithmgrows froma sourcevertex and extends outward within the graph,until all ver-tices have been spanned and an SPT has been found.Foreach vertex v the algorithm maintains two attributes:dv,the shortest path estimate from the source to v,and pv,which stores the parent vertex of v in the SPT.At the begin-ning,the shortest path estimates for all vertices other thanthe source are set to 1;the estimate for the source is set to0.The algorithmalso maintains a set S of vertices whose ﬁ-nal shortest path costs from the source have not yet beendetermined.Initially,this set contains all vertices of G.Starting with the source vertex,the algorithm repeatedlyselects the vertex u 2 S with the minimum shortest pathestimate du.Furthermore,it re-evaluates the shortest pathestimates of the vertices adjacent to u,and updates themifda> duþwðu;aÞ,where w(u,a) deﬁnes the weight of edge(u,a) and a is adjacent to u.Once a vertex is removed fromS,its shortest path cost from the source has been found.When the algorithm ﬁnishes,dvwill be the cost of theshortest path fromthe source to v.The union of the edgesðv;pvÞ deﬁnes the ﬁnal SPT.A naive implementation thatexamines all nodes in S to ﬁnd the minimum runs inOðn2Þ.If,as in Prim’s algorithm,binary heaps or Fibonacciheaps are used,Oðm logðnÞÞ and Oðmþn logðnÞÞ runningtimes can be achieved,respectively.4.5.Add algorithmAdd algorithm [14] by Grout represents a vertex ori-ented version of Prim’s algorithm.It considers that theway to approximate an MRCT for G is by minimizing thenumber of relay nodes in the ﬁnal spanning tree.Add algo-rithm ignores the edge weights and considers as the deci-sion criterion the degree of the vertices in G.A spanningrelay (a vertex with more than one adjacent edge) is choseninitially as the vertex of highest degree to start the con-struction of the spanning tree T.Next,all its adjacent edgesas well as the adjacent vertices are selected to make part ofT.Fromthe vertices currently spanned,a new spanning re-lay is selected,adjacent to the maximum number of uns-panned vertices.The process is repeated until all verticesbelong to T.If an adjacent edge of the current spanning re-lay connects two vertices already in T,the edge is rejected.At the end,T represents the approximate MRCT.Add is notan exact greedy algorithm as it does not provide the opti-mal number of relays,in general [14];nonetheless,it per-forms well in practice.It runs in Oðn logðnÞÞ time in theworst case.Usually,it runs faster due to the tendency formany nodes to be added to T at each stage.5.Campos’s algorithmOur proposal,Campos’s algorithm,represents a newapproximation MRCT algorithm that improves the perfor-mance of bridged Layer 2 networks,particularly whenthe edges of the graph modeling the network have hetero-geneous weights.It aims at improving the routing cost ofthe active spanning tree assumed in these networks,takinginto account that an MRCT is by deﬁnition the optimalspanning tree.In [11] the routing cost of a spanning tree is shown todepend both on the edge weights and on the tree topology.These two factors have impact in the diameter of the tree –the cost of the longest path between any two vertices inthe tree– which inﬂuences the routing cost of the tree;in general,a spanning tree with lower diameter has lowerrouting cost.Consider,for example,the trees shown inFig.2.They have the same set of edge weights but differenttopologies.The left-hand side tree has routing cost 104 anddiameter 7,while the right-hand side tree has routing cost89 and diameter 5.In this case,the right-hand side tree haslower routing cost due to its lower diameter.Thus,thecomputation of an MRCT for a graph G must consider bothedge weights and topology.Nonetheless,when the graph Gis homogeneous or extremely heterogeneous a single fac-tor actually inﬂuences the selection of an MRCT,as demon-strated by Grout [14] and by the analysis and conclusionsdrawn by Mieghem et al.[9,10].Add algorithm providesan approximate MRCT when G is homogeneous by consid-ering the degree of the vertices as the selection criterion.On the other hand,an MST approximates or coincides withan MRCT when links are extremely heterogeneous and isselected based on the edge weights only.Between thesetwo extreme cases both factors inﬂuence the selection ofan MRCT.Therefore,a combination of the criterion usedby MST algorithms (edge weights) and the criterion con-sidered by Add algorithm(degree of the vertices) in a singlealgorithmappears as a promising approach to approximateFig.2.Two example trees with the same set of edge weights but different topologies.3234 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247an MRCT.That is what Campos’s algorithmdoes in order toconsider both topology and edge weights in the generalcase;in fact,it takes into account an additional criterionin order to contribute to the reduction of the diameter ofthe ﬁnal spanning tree (see Section 5.1).5.1.Description of the algorithmCampos’s algorithm takes Prim’s algorithm as basis butintroduces two major modiﬁcations.Firstly,it deﬁnes adeterministic approach to ﬁnd the initial vertex.Secondly,it considers parameters other than the edge weight to se-lect the vertex to be extracted from the list of vertices Lat each step of the algorithm.The newparameters are par-tially imported from other spanning tree algorithms,namely from Add and Dijkstra’s algorithms.The algorithmdeﬁnes basic parameters and composed parameters.Thelatter are obtained by combining the former.As in Prim’s algorithm,Campos’s algorithm starts byselecting the initial vertex.Three basic parameters charac-terizing a vertex v 2 V are considered for that purpose: dv– degree of the vertex sv– sum of adjacent edge weights mv– maximum adjacent edge weightThe combination of the basic parameters deﬁnes thecomposed parameter spvthat characterizes the potentialof v to span neighbor vertices;we call it the spanning po-tential.spvincludes the three components shown in (8):the degree of the vertex,the inverse of the average adja-cent edge weight,and the inverse of the maximum adja-cent edge weight.These components are considered ininverse proportion since higher weight values imply lowerspanning potential.C1,C2,and C3are coefﬁcients whosevalues have been found by simulation:C1¼ C3¼ 0:2 andC2¼ 0:6.These were the values for which we could obtainthe best routing cost results.Still,it should be emphasizedthat the latter are not strongly dependent on the actualvalues selected for C1,C2,and C3;for instance,forC1¼ C3¼ 0:25 and C2¼ 0:55 the obtained results werenot signiﬁcantly different.spv¼ C1 dvþC2

dvsvþC3

1mv;ð8Þwheresv¼Pnj¼1wðv;jÞ;v–j;mv¼ wðv;lÞ:wðv;lÞ Pwðv;kÞ ^ k;l;v 2 V:The vertex f 2 V:spfPspj;8j 2 V is deﬁned as the initialvertex.Inother words,the vertex withthe highest spanningpotential is selected as the initial vertex,as in Add algo-rithm.This selection criterion represents a modiﬁed ver-sion of the criterion used by Add algorithm for selectingthe initial spanning relay.Besides considering the degreeof the vertices,our algorithm considers the average adja-cent edge weight and the maximumadjacent edge weight.The two additional parameters are relevant for non-homo-geneous graphs;for homogeneous graphs only the degreeof the vertices inﬂuences the choice of the initial vertexsince the other two parameters are constant for all vertices.In order to select the vertex to be extracted fromthe listof vertices L at each step of the algorithm,Campos’s algo-rithmdeﬁnes the following set of basic parameters to char-acterize a vertex v 2 V: wv– weight (considered as in Prim’s algorithm) dv– degree of the vertex sv– sum of the adjacent edge weights cfv– estimate cost of the path between v and f in T pdv– degree of the candidate parent vertex in T psv– sumof the adjacent edge weights of the candidateparent vertex in TBy combining themthe algorithmdeﬁnes the followingcomposed parameters:wdv¼ C4:wvþC5 cfv;ð9Þjspv¼ sdvþsdvswv;ð10Þwheresdv¼ dvþpdv;swv¼ svþpsv:The composed parameter wdv(9) characterizes the weightof the edge connecting v and its candidate parent vertex pvin T and the estimated cost of the path between v and f in Timplicitly dictated by the candidate parent vertex pv.Thecomposed parameter jspv(10) characterizes the joint span-ning potential of v and pv.In (9) the coefﬁcients C4and C5take values which de-pend on the set of edge weights of the input graph G.Aftercomputing the mean ðlÞ and standard deviation ðrÞ for theset of edge weights of G,the algorithm evaluates the ratior=lthat is used to characterize the heterogeneity of theinput graph.If it is below a threshold Thr,C4¼ C5¼ 1;otherwise,C4¼ 0:9 and C5¼ 0:1.These values have beenobtained by simulation.Also based on simulations wefound out that as the number of vertices in the input graphincreases Thr should increase proportionally.Therefore,Thrhas been deﬁned as a function of n ¼j V j;the values 0.4and 0.005 in (11) have been found by simulation.Again,it should be emphasized that the obtained results are notstrongly dependent on the actual values selected for thevarious coefﬁcients;for instance,if C4¼ 0:85 andC5¼ 0:15 the obtained results did not differ signiﬁcantlyfromthose presented herein.Nevertheless,the best resultswere obtained using the coefﬁcients mentioned above.Thr ¼ 0:4 þ0:005 ðn 10Þ:ð11ÞThe needtogive more importancetowvðC4¼ 0:9Þ whentheinput graph has highly heterogeneous edge weights comesfromthe fact that the major factor inﬂuencing the selectionof an MRCT in those cases is the set of edge weights.The algorithm proceeds as follows:Initially all verticeshave wvand cfvset to 1,except f that has wfand cffsetto 0;the other basic parameters listed above have unde-ﬁned values at this stage.At each step of the algorithm,the vertex u 2 L:wdu< wdj;8j 2 L is selected as the nextR.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3235vertex to be extracted fromL that initially only contains f.Ifthere is more than one vertex in L with the same value ofwdv,jspvis considered to break the tie.Let S#L deﬁnethe set of vertices in L having the same lowest value ofwdv.The vertex u 2 S:jspuPjspj;8j 2 S is then the vertexextracted from L in that case.Afterwards,for every vertexa 2 Au^a R T (Audeﬁnes the set of vertices adjacent to u),if wdabecomes lower while computed considering u asthe candidate parent vertex,wdaand jspaare updatedaccording to the new values of the corresponding basicparameters,wa¼ wðu;aÞ,cfa¼ cfuþwðu;aÞ,pda¼ du,andpsa¼ su.If wdaachieves the same value but jspaachievesa greater value if computed considering u as the candidateparent,only jspais updated according to the new values ofthe pdaand psa.In both cases u becomes the candidate par-ent vertex for a,i.e.,pa¼ u.a is then added to L if it does3236 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247not yet belong to L and the edge ðu;puÞ is added to T.Thisprocess is repeated until the n vertices have been added toT.At that stage T is the approximate MRCT.The set of parameters listed above enables the algo-rithmto take both topology and edge weights into accountduring the computation of the approximate MRCT.The wvparameter,already considered in Prim’s algorithm,relatesto the edge weights.By considering the n 1 lowest edgeweights the algorithmtries to reduce the costs of the pathsbetween the vertices in the ﬁnal spanning tree and,conse-quently,reduce the routing cost of the ﬁnal spanning tree.The cfvparameter is imported from Dijkstra’s algorithmand considers both topology and edge weights.By mini-mizing cfvfor each vertex the algorithm tries to reducethe diameter of the ﬁnal spanning tree and,consequently,its routing cost;in fact,if we deﬁne the initial vertex as theroot of the ﬁnal spanning tree,a reduction in the cost of thepath towards the root contributes to the reduction of thediameter of the tree.The parameters sdvðdvþpdvÞ andswvðsvþpsvÞ are related to topology.They allow the algo-rithmto characterize the joint spanning potential of a ver-tex v and its candidate parent vertex pdv.By selecting ﬁrstR.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3237the vertices that together with their candidate parent ver-tices have the highest joint spanning potential,the algo-rithm reduces the number of relay vertices in the ﬁnalspanning tree;this contributes to the reduction of its rout-ing cost,as demonstrated by Add algorithm.Campos’s algorithmis formally deﬁned above.Since thedeﬁnition is independent of the actual implementation,wealso deﬁne it using pseudo code in order to both showhowwe have implemented Campos’s algorithm in the STS sim-ulator (see Section 7) and analyze its time complexity.Taking into account the partial time complexities pro-vided in the pseudo code above,i.e.,O(m),O(m),O(n),and Oðn logðnÞ þmÞ,we conclude that Campos’s algorithmhas time complexity Oðmþn logðnÞÞ,when implementedusing Fibonacci heaps in conjunction with adjacency lists.In spite of the computation of additional parameters char-acterizing the vertices (O(m) time),the computation of themean and standard deviation for the set of edge weights ofG (O(m) time),and the deterministic selection of the initialvertex (O(n) time),the overall time complexity of the algo-rithm is of the same order of Prim’s algorithm.5.2.Illustrative exampleIn order to illustrate the use of Campos’s algorithmin thecomputation of an approximate MRCT,let us considerthe input graph shown in Fig.3.We start by calculatingthe parameters dv,sv,and mv,and the spanning potentialfor each vertex ðspvÞ.The values are presented in Table 1.According to the algorithm,the vertex with the highestspvis selected as the initial vertex f;in this case vertex 1 isselected.Subsequently,f is added to the list of vertices L.Here,L is modeled by a table,where each column repre-sents a vertex in the list,the shadowed column emphasizesthe vertex selected at each step of the algorithm to makepart of T,and the cells with bold borders highlight the com-posed parameter and the value that made it happen.Thetables (a)–(h) below represent different instances of L.Ini-tially,L only contains vertex 1.The values of the parame-ters characterizing vertex 1 are shown in table (a);somevalues are undeﬁned since the initial vertex does not haveparent vertex.In this example,the coefﬁcients C4and C5used in the computation of wdvare equal,as the meanfor the set of edge weights is 2.00 and the standard devia-tion is 0.74 (0.74/2.00 0.37 < Thr).The algorithm pro-ceeds by removing vertex 1 from L.Then,all adjacentvertices to 1 (vertices 2 and 4) are added to L;this is shownin table b).Vertex 4 is then selected to make part of T,sinceit is the vertex with the highest value of jspvand wdvisequal for all vertices in L;the vertices adjacent to vertex4 (vertex 3 and 5) are added to L.Vertex 2 is now selectedto make part of T,as it is the vertex with the lowest valueof wdv.Vertex 6 is added to L;since the composed param-eter wd3gets higher value if computed using vertex 2 ascandidate parent vertex (7 > 5),the candidate parent forvertex 3 is unchanged.Vertex 3 is added to T,given thatit is the vertex with the highest value of jspvand wdvisequal for all vertices in L.Vertex 7 is added to L.Regardingvertex 5 nothing changes,as the composed parameter wd5does not get lower value if vertex 3 is considered as its can-didate parent vertex;the other vertices adjacent to 3 al-ready belong to T.Vertex 5 is selected next,given that itis the vertex with the highest value of jspvamong the ver-tices in L with the lowest value of wdv(vertices 5 and 6).Vertex 8 is added to L;the other adjacent vertices (3) and(4) already belong to T.Subsequently,as the vertex withthe lowest value of wdv,vertex 6 is added to T.Since wd7does not get lower value if vertex 6 is considered as its can-didate parent vertex,its parameters remain unchanged.Atthis stage,vertex 7 is selected to make part of T.Since thecomposed parameter jsp8gets higher value if vertex 7 isconsidered as its candidate parent vertex (the value ofwd8remains the same),the parameters w8,p8,pd8,ps8,and cf8are updated accordingly;this is illustrated in tableh),where the values of the updated parameters are shownin bold.Vertex 8 is ﬁnally selected to make part of T.At thispoint,T deﬁnes the approximate MRCT shown in Fig.3.6.Comparison methodologyRegarding the evaluation of Campos’s algorithmagainststate of the art spanning tree algorithms targeting theFig.3.Example graph and the corresponding approximate MRCT com-puted using Campos’s algorithm (in bold).Table 1Values of the parameters dv,sv,and mvand the corresponding spanningpotential ðspvÞ for each vertex vvvdsvmvspv1 2 2 1 1.202 3 6 3 0.973 4 10 3 1.114 3 5 2 1.065 3 7 3 0.926 2 5 3 0.717 3 6 3 0.978 2 3 2 0.903238 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247same problemwe used the following methodology.Firstly,we selected the spanning tree algorithms to be consideredin our comparative analysis,besides current IEEE spanningtree algorithm.We considered the following algorithms:Wong’s algorithm,as the current fastest approximationMRCT algorithm,and Add as the fastest approximationMRCT algorithm for the speciﬁc case of homogeneous in-put graphs,as well as the two most used MST algorithms,Kruskal’s and Prim’s algorithms,known to provide goodapproximation to an MRCT for highly heterogeneousgraphs [9,10].Secondly,we deﬁned the parameters to betaken into account while comparing the algorithms.Twoparameters were considered:(1) the routing cost of thespanning tree returned by each algorithm,given that weare comparing approximation MRCT algorithms;(2) theexecution time for each algorithm,since our purpose isto demonstrate that Campos’s algorithm requires lowerexecution time than the fastest known approximationMRCT algorithm and that it has time complexity of thesame order of Add,Kruskal’s,Prim’s,and IEEE algorithms.Finally,we deﬁned the type of analysis to be used in theevaluation of our algorithm.A possible approach could beto consider an asymptotical analysis from the perspectiveof the routing cost and a time complexity analysis regard-ing the execution time of the algorithms.However,suchkind of analysis provides only information about the worstcases.Thereby,we considered a simulation oriented ap-proach so that we could evaluate the performance of thealgorithms in other cases,namely in practical cases;a widerange of randomly generated input graphs,from homoge-neous to highly heterogeneous graphs,have been consid-ered for that purpose.Since we did not ﬁnd any existingand open simulator addressing our speciﬁc purpose wehave developed a new simulator from the scratch.7.Spanning trees simulatorThe simulations have been performed using a newsim-ulator,called Spanning Trees Simulator (STS).STS is writ-ten in C++ and uses the popular Boost Graph Library(BGL) [27] for the computation of MSTs and SPTs accordingto the classical spanning tree algorithms,i.e.,Dijkstra’s,Prim’s,and Kruskal’s algorithms;in addition,it includesAdd,Wong’s,and Campos’s algorithms.Campos’s algorithmis implemented using Fibonacci heaps in conjunction withadjacency lists so that a time complexity OðmþnlogðnÞÞcan be achieved.STS accepts the following inputparameters:1.smax– the maximumsize for the input graphs expressedin number of vertices.2.smin– the minimumsize for the input randomgraph.Italso deﬁnes the granularity in the generation of theinput graphs.For instance,if the maximum size is setto 30 and the minimum size is set to 10,the simulatorwill simulate input graphs with 10,20,and 30 vertices.v1 v 24 v2 3 5 v3 5 6 v5 6 7wv0 wv11 wv1 2 2 wv2 2 2 wv2 2 2dv2dv32dv3 4 3dv4 3 2dv3 2 3sv2 sv65 sv6 10 7 sv10 7 5 sv7 5 6pv- pv11 pv1 4 4 pv4 4 2 pv4 2 3pdv- pdv22 pdv2 3 3 pdv3 3 3 pdv3 3 4psv- psv22 psv2 5 5 psv5 5 6 psv5 6 10cfv0 cfv11 cfv1 3 3 cfv3 3 3 cfv3 3 5wdv0 wdv22 wdv2 5 5 wdv5 5 5 wdv5 5 7jspv- jspv5.65.7 jspv5.6 7.5 6.5 jspv7.5 6.5 5.5 jspv6.5 5.5 7.4v6 7 8 v7 8 v8wv2 2 2 wv2 2 wv1dv2 3 2 dv3 2 dv2sv5 6 3 sv6 3 sv3pv2 3 5 pv3 5 pv7pdv3 4 3 pdv4 3 pdv3psv6 10 7 psv10 7 psv6cfv3 5 5 cfv5 5 cfv6wdv5 7 7 wdv7 7 wdv7jspv5.5 7.4 5.5 jspv7.4 5.5 jspv5.6a bcd efghR.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 32393.emax– the maximum number of edges to be simulatedfor each input graph with n vertices.4.S – the set of edge weights considered while generatingan input random graph.5.sta – the spanning tree algorithm to be simulated,besides the two spanning tree algorithms consideredas reference by the simulator,i.e.,current IEEE spanningtree algorithm and Wong’s algorithm.6.nr – the number of simulation runs.Taking into account these input parameters the simula-tor deﬁnes the following sequence of steps for each simula-tion run.For each n 2 fsmin;2smin;...;smaxg,STS generatesemaxðn 1Þ þ1 random graphs with increasing numberof edges m2 fn 1;n;n þ1;...;emaxg.It employs one ofthe variants of the Erdös and Renyi [28] model for generat-ing the randomgraphs.The ﬁrst variant considers a randomgraph with n vertices and deﬁnes a probability p that anedge is present in the graph.The second sets an edge be-tween eachpair of vertices with equal probability,indepen-dently of the other edges.STS uses the latter variant and foreach randomly selected edge assigns it a random weightfromthe set S with equal probability.This means that G ischosen uniformly at random from the collection of allgraphs which have n vertices and m edges.For each G,thesimulator computes n SPTs,the routing cost for each SPT,and selects the lowest routing cost as the routing cost forthe approximate MRCT provided by Wong’s algorithm.Inaddition,it calculates the expected value for the routingcost of an arbitrarily selected SPT,as considered by currentIEEE spanning tree algorithm,and calculates the routingcost for a spanning tree computed using the sta algorithm;IEEE and Wong’s algorithms are considered as a referenceby STS,since they represent,respectively,the current usedspanning tree algorithm in real networks and the fastestapproximation MRCT algorithm.Besides the routing cost,the simulator calculates the execution time for each span-ning tree algorithm.At each simulation run STS stores thevalues of the routing cost andexecutiontime found for each(n,m).The whole process is repeated for nr simulations.The STS simulator provides two output parameters:theaverage routing cost and the average execution time foreach (n,m) and for each simulated spanning tree algorithm.These values are computed considering nr simulations;themargin of error for each value is also presented regarding aconﬁdence interval of 95%.STS provides the routing costsand the execution times for Wong’s and sta algorithms nor-malized to the values obtained for IEEE spanning tree algo-rithm,i.e.,the time required to compute an SPT.STS is open source and can be downloaded at [29],where further information about it is provided,namelyregarding its utilization.8.Simulation setupWe considered a wide set of simulations to evaluateCampos’s algorithm against the spanning tree algorithmsreferred in Section 6.The STS simulator was used to carryout the simulations.The following input parameters weredeﬁned:(1) size of the input randomgraph;(2) set of edgeweights used in the generation of the input randomgraph.Since our focus is on graphs modeling small scale networks(see Section 1),we considered input randomgraphs of thefollowing sizes:10,30,and 50 vertices.For each n deﬁningthe size of the input graph,we performed simulations foreach possible number of edges,i.e.,from n 1 (tree) ton ðn 1Þ=2 (complete graph) in order to cover the wholespectrumof topologies for a graph with n vertices.A widerange of input graphs,fromhomogeneous to highly heter-ogeneous graphs,have been covered by deﬁning differentinput sets of edge weights generated using the followingdiscrete functions:u½n ¼ Kn1;1 6 n 6 5 ^ n 2 N;ð12Þv½n ¼ n;1 6 n 6 5 ^ n 2 N;ð13Þw½n ¼1;n ¼ 0K1:w½n 1;n odd;1 6 n 6 10 ^ n 2 N;K2:w½n 1;n even;2 6 n 6 10 ^ n 2 N;8>><>>:ð14Þwhere K,K1,K2are constants and N represents the set ofnatural numbers.In our simulations,K 2 f1;10g,K1¼ 5,and K2¼ 2.For K ¼ 1 the discrete function (12) was usedto generate homogeneous input graphs;for K ¼ 10 it wasused to generate highly heterogeneous input graphs withedge weights selected from the sets S1 ¼ f1;10;100g andS2 ¼ f1;10;100;1000;10000g.The functions 13 and 14were used to generate slightly heterogeneous and highlyheterogeneous input graphs,respectively.(13) was usedto generate the sets S3 ¼ f1;2;3g and S4 ¼ f1;2;3;4;5gand (14) was employed to generate the setS5 ¼ f1;5;10;50;100;1000;5000;10000;50000g.There isno particular reason to consider these speciﬁc discretefunctions for generating the sets of edge weights.The onlyobjective was to consider sets of edge weights with differ-ent levels of heterogeneity.Therefore,other sets could beconsidered,as long as they could be used to generate inputrandom graphs with different levels of heterogeneity.In the context of our simulations a set of edge weightsrepresents the possible values for a given metric,e.g.,bandwidth,delay,power consumption,typically used tocharacterize a link of a communication network.In prac-tice,few possible values are usually deﬁned for a givenmetric.Consider,for instance,the example of an Ethernetnetwork.With the advent of 1Gbit/s and 10 Gbit/s linkscoexisting with legacy 100 Mbit/s links,we have a scenariowhere links of different capacities coexist.If we character-ize each link according to its capacity we get the followingpossible values:1,10,and 100.Another example is a futurePersonal Area Network composed by different wired/wire-less links.Technologies such as UWB,Ethernet,Bluetooth,and IEEE 802.11 may coexist in the same network.If we as-sign weights to each wired/wireless link according to someof the metrics above mentioned a few possible values willbe deﬁned as well.In that sense,the sets of edge weightsconsidered in our simulations include a few values;how-ever,in order to cover different cases,we took into accountdifferent sizes for the sets of edge weights by varying thenumber of values generated through the discrete functions(12)–(14).3240 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247The same set of simulations was performed for eachspanning tree algorithmunder analysis.One hundred sim-ulations were performed for each set of input parameters(size of graph,set of edge weights).9.Results and evaluationThis section presents the simulation results and evalu-ates the various spanning tree algorithms under analysisfrom the perspectives of the routing cost and executiontime,with special focus on Campos’s algorithm.The mostrelevant results are presented;further results can be foundin [29].Along the description and analysis of the simula-tion results we use the expressions ‘‘sparse graph” and‘‘dense graph” to refer to the density of the input graphs;sparse graphs refer to graphs with the number of edgesm¼HðnÞ,while dense graphs refer to graphs withm¼Hðn2Þ.9.1.Routing costThe routing cost of the spanning trees computed byeach spanning tree algorithmwas analyzed for different in-put graphs.Below,we present the simulation results forhomogeneous,slightly heterogeneous,and highly hetero-geneous input graphs.The curves for the different span-ning tree algorithms under analysis,i.e.,Campos’s,Prim’sKruskal’s,Add,and Wong’s algorithms,are shown in Figs.4–6 with the corresponding 95% conﬁdence intervals.Theresults were obtained for input random graphs with 10,30,and 50 vertices.They are normalized to the routing costof the spanning tree obtained by using IEEE spanning treealgorithm and are presented as a function of the averagedegree per vertex (the maximum average degree per ver-tex is equal to n 1 and corresponds to the complete inputrandomgraph).For the sake of clearness,the curves corre-sponding to spanning tree algorithms providing similarrouting costs are presented in the same plot.9.1.1.Homogeneous graphsThe plots shown in Fig.4 were obtained considering theset of edge weights S ¼ f1g as input to the STS simulator;as mentioned in Section 6,the simulator uses the set ofedge weights as input to generate the input randomgraphs.The set S was obtained by using the discrete func-tion in (12) with n ¼ 1.From the plots in Fig.4 we can ﬁrstly conclude thatCampos’s algorithm provides an approximate MRCT withthe same routing cost as the spanning tree provided byWong’s algorithm regardless of the number of vertices ofthe input graph.Therefore,concerning homogeneous inputgraphs Campos’s algorithm can in fact be used as anapproximation MRCT algorithm providing the same rout-ing cost as Wong’s algorithm while running in 1=nth ofthe time.In addition,we conclude that,in general,ouralgorithm provides a spanning tree with the same routingcost as Add algorithm.But,as the size of the input graph in-creases,it performs even better than Add algorithm forsparse input graphs.This can be seen in Fig.4 for n ¼ 50;the difference in the routing cost,on average,reachesFig.4.Routing costs for each spanning tree algorithm under analysis when homogeneous input graphs of 10,30,and 50 vertices are considered.R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3241about 7% for an average degree per vertex equal to 4.Thedifference can be explained by the cfvparameter consid-ered in Campos’s algorithm.Unlike Add algorithm,whichonly considers the degree of the vertices as the decisionFig.5.Routing costs for each spanning tree algorithm under analysis when slightly heterogeneous input graphs of 10,30,and 50 vertices are considered.Fig.6.Routing costs for each spanning tree algorithm under analysis when highly heterogeneous input graphs of 10 and 50 vertices are considered.3242 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247criterion to select the next spanning relay,Campos’s algo-rithmalso considers the cost of the path to the initial ver-tex as criterion.This contributes to a reduction of thediameter of the ﬁnal spanning tree and,consequently,ofits routing cost,although it only takes relevant effect forsparse graphs;for dense graphs the cost of the path be-tween each vertex and the initial vertex tend to be similaror equal,as it happens for the complete graph,and the de-gree of the vertices criterion is enough to ﬁnd a goodapproximate MRCT.Finally,Campos’s algorithm,as Wong’sand Add algorithms,provides lower routing costs than cur-rent IEEE spanning tree algorithm,independently of thesize of the input graph,even though the gain increaseswith the size of the input graph and is higher for sparsegraphs;for n ¼ 10 the gain may achieve 10%,while forn ¼ 50 it may achieve about 13%.As expected,MST algorithms represent a bad approxi-mate MRCT when the input graph is homogeneous.Still,Prim’s algorithm performs better than Kruskal’s algorithm.The routing cost for Kruskal’s algorithm diverges from therouting costs provided by any of the other spanning treealgorithms.The algorithm is only concerned with theselection of the n 1 edges with the lowest weight sothat the total cost of the resulting spanning tree can beminimized.Since in this case the weights are all the same,the ﬁnal spanning tree will result from the random selec-tion of n 1 edges out of the input graph G that togetherform a spanning tree of G.Thus,with no selection crite-rion in place,the resulting spanning tree tends to havehigher diameter and,consequently,higher routing cost.Regarding Prim’s algorithm,for small graphs,it providesrouting costs close or equal to IEEE algorithm.Nonethe-less,concerning sparse graphs as the number of verticesin the input graph increases Prim’s algorithm tends toprovide higher routing costs and diverges from the rout-ing costs provided by IEEE algorithm.For dense inputgraphs Prim’s algorithm presents the same routing costof IEEE algorithm and in the extreme case (completegraph),it provides the same routing cost of Campos’s,Wong’s,and Add algorithms,since it actually computesan SPT from the initial vertex’s perspective that deﬁnesthe best SPT (for the complete graph any SPT is the bestSPT).9.1.2.Slightly heterogeneous graphsThe plots shown in Fig.5 were obtained by consideringthe set of edge weights S ¼ f1;2;3g as input to the STSsimulator.The set S was obtained by using the discretefunction in (13) with 1 6 n 6 3.Regarding Campos’s algorithmwecan conclude the fol-lowing.When the number of vertices in the input graph issmall ðn ¼ 10Þ Campos’s algorithm provides the same re-sults as Wong’s algorithm,independently of the inputgraph density.As the size of the input graph increasesCampos’s algorithm tends to perform slightly worse thanWong’s algorithm but provides similar or the same resultswhen the input graph is dense.Then,our algorithmrepre-sents a suitable alternative to Wong’s algorithmalso whenthe input graph is slightly heterogeneous.On the otherhand,Campos’s algorithm provides lower routing coststhan current IEEE spanning tree algorithm,independentlyof the size of the input graph.The gain may reach 21%but,in contrast to what happens for homogeneous inputgraphs,it decreases with the size of the input graph (thisoccurs for both Campos’s and Wong’s algorithms).Concerning MST algorithms the following conclusionscan be drawn.Prim’s algorithm provides a good approxi-mate MRCT when the size of the input graph is small.Forn ¼ 10 the routing cost is just about 5% greater than therouting cost provided by Campos’s and Wong’s algorithms;the results for Kruskal’s algorithm are similar but divergefor dense input graphs.We conclude that the edge weightshave the major impact in the selection of the approximateMRCT when the input graph has small size or,in otherwords,edge weights can almost be used as the only selec-tion criterion regarding the construction of the approxi-mate MRCT.However,as the size of the input graphincreases MST algorithms provide worse results,evenworse than current IEEE spanning tree algorithm.Thiscan be explained by using the example given in Fig.2.For a given input graph G with 6 vertices,if one of thespanning trees shown in Fig.2 is an MST the other also de-ﬁnes an MST for G,since both have total cost equal to 7.AnMST algorithm can select both with equal probability,although they have different topologies and,as such,havedifferent routing costs;the spanning tree on the right-handside has lower routing cost.This fact,on average,contrib-utes to increase the routing cost of the ﬁnal spanning tree.For small size input graphs the number of possible MSTs issmall and the differences in topology are small too;there-by,the average routing cost does not greatly diverge fromthe routing cost of the best MST (from the perspective ofthe routing cost),which represents a good approximateMRCT,as implicitly shown by our simulation results.Yet,the number of possible MSTs increases for bigger inputgraphs,as well as the number of MSTs providing higherrouting cost than the best MST.On average,the routingcost of the spanning tree computed by an MST algorithmincreases accordingly.Nevertheless,for the input graphsconsidered in this case the differences between the routingcost for the MST algorithms and the other spanning treealgorithms are attenuated by the reduced heterogeneityof the edge weights;for highly heterogeneous the differ-ences are greater when the input graphs are dense (seeSection 9.1.3).As theoretically expected,Add algorithm does not pro-vide goodresults for heterogeneous graphs,even forslightly heterogeneous graphs.Regardless of the size ofthe input graph it provides routing costs that diverge fromthe results achieved by the other algorithms.This is be-cause it does not consider the edge weights at all;onlytopology is considered which is in general insufﬁcient forconstructing a spanning tree with small routing cost asmentioned in Section 5.The conclusion is that,in fact,Add algorithm cannot be used as an approximate MRCTwhen the input graph is non-homogeneous.9.1.3.Highly heterogeneous graphsThe plots shown in Fig.6 were obtained by consideringthe set of edge weights S ¼ f1;10;100;1000;10000g as in-put to the STS simulator.S was obtained by using the dis-crete function in (12) with K ¼ 10 and 1 6 n 6 5.Only theR.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3243plots for n ¼ 10 and n ¼ 50 are presented,since for n ¼ 30theresults areverysimilar totheresults obtainedfor n ¼ 50.From the plots in Fig.6 we conclude that,when thenumber of vertices in the input graph is small ðn ¼ 10Þ,Campos’s algorithm provides the same results as Wong’salgorithm regardless of the density of the input graph.Asthe size of the input graph increases Campos’s algorithmperforms differently depending on the density of the inputgraph.For sparse graphs it provides the same routing costsas Wong’s algorithm.This is illustrated by the plot of Fig.6for n ¼ 50;for n ¼ 30 the performance of the algorithm isvery similar.As the average degree per vertex in the inputgraph increases Campos’s algorithm slightly diverges fromthe routing costs provided by Wong’s algorithm (differ-ences of about 10% can be achieved).Then,for highly het-erogeneous graphs our algorithm provides the sameresults as Wong’s algorithmwhen the input graph is smallor,for bigger input graphs,when it is sparse;for densegraphs it provides slightly worse results.When comparedto IEEE spanning tree algorithm,it provides lower routingcosts independently of the size of the input graph.The gainmay reach about 17% for n ¼ 50,although,for dense inputgraphs it decreases signiﬁcantly.The worse performancefor dense graphs can be explained as follows.For highlyheterogeneous input graphs Campos’s algorithm considersthe edge weight as the major selection criterion (see Sec-tion 5).Thereby,it tends to follow the results providedby Prim’s algorithm,which exhibits worse performancefor dense input graphs;still,the increasing rate of the rout-ing cost as the input graph becomes denser is attenuatedby the other parameters considered in our algorithm.Regarding MST algorithms the simulation results con-ﬁrmthat as the input graph becomes more heterogeneousthey tend to approximate the routing costs provided byWong’s algorithm and can actually be used as an approxi-mate MRCT.This is evident for n ¼ 10,with Prim’s algo-rithm providing routing costs that can be just 1% higherthan the routing costs provided by Wong’s algorithm;Krus-kal’s algorithm also shows a tendency to converge to theresults given by Wong’s algorithm.For bigger input graphsit can only be observed for sparse graphs in this case.Thisis due to the fact that for dense graphs the high heteroge-neity inherent to the edge weights set S tends to be less re-ﬂected inthe generated random input graphs as thenumber of edges in the graph increases.In other words,the probability of equal weights assigned to the edges ofthe graph increases.Thus,in order to reduce this probabil-ity and increase the level of heterogeneity in the inputgraphs we have performed further simulations using theinput edge weight S = {1,5,10,50,100,500,1000,5000,10000,50000} generated using the discrete function in(14).The obtained results can be found in [29].They con-ﬁrm that both Prim’s and Kruskal’s algorithms tend toapproximate Wong’s algorithm results also for densergraphs when higher heterogeneity is in place;for instance,for n ¼ 30 the routing costs provided by Prim’s algorithmare below the routing costs for IEEE algorithm regardlessof the density of the input graph and are only about 10%higher than the routing costs provided by Wong’s algo-rithm;the exception are the input graphs with densityclose to the complete graph,where Prim’s algorithmresultsdiverge a bit more fromWong’s algorithmresults.Further-more,the obtained results show that Campos’s algorithmfollows the tendency of Prim’s algorithm (used as basisfor the former) and indeed provides better results as theheterogeneity in the input graph increases.In fact,thiswas already expected since Campos’s algorithmis basicallyan improved version of Prim’s algorithm,namely for highlyheterogeneous input graphs,where the edge weights rep-resent the most relevant criterion in the algorithm.Thislet us conclude that,for even higher heterogeneous inputgraphs,Campos’s algorithm will tend to approximate fur-ther Prim’s algorithm results which was demonstrated torepresent an approximation MRCT algorithm or even theexact MRCT algorithm in such cases (see Section 3).The simulation results for Add algorithm are not pre-sented,since it was already shown in the previous section(Fig.5) that the algorithmdoes not work for heterogeneousinput graphs.For highly heterogeneous input graph this issimply exacerbated;during our simulations we veriﬁedthat,for instance,for n ¼ 30 the routing costs providedby Add algorithm could reach two and even three ordersof magnitude the routings costs of the other spanning treealgorithms under analysis.9.2.Execution timeThe results shown in Fig.7 are independent of the set ofedge weights used to generate the input randomgraphs.Infact,the execution time is inﬂuenced by the number of ver-tices and the number of edges of the input graph,as ex-pressed in Section 4 for the different spanning treealgorithms.Therefore,the results were obtained by onlyvarying these two parameters.The values for each algo-rithm are normalized to the time needed to compute anSPT using the Dijkstra’s algorithm.The execution time forWong’s algorithm isnot shown since it is simply n timesthe execution time needed to compute an SPT.The obtained results are according to the time complex-ities of the algorithms provided in Section 4.Campos’s algo-rithm essentially takes the same execution time asDijkstra’s algorithm used to compute an SPT and 2 timesthe execution time of Prim’s algorithm;this is mostly dueto the further calculations performed by Campos’s algo-rithm regarding the selection of the initial vertex and thecomputation of the ratior=lcharacterizing the heteroge-neity of the input graph.As expected,the execution timesof both Campos’s and Prim’s algorithms do not strongly de-pend on the number of edges in the input graph;the num-ber of vertices has the major impact as demonstrated bythe time complexities provided in Section 4.Add algorithmtakes execution times similar to Prim’s algorithmfor sparsegraphs,but runs faster as the density of the input graph in-creases.This is due to the tendency for many vertices to beadded to the spanning tree at each step of the algorithm,asexplained in [14],in contrast to what happens in Prim’salgorithm where a single vertex is added to the spanningtree at each step.According to our simulation results forn ¼ 30 and n ¼ 50,Add algorithm can be about 5 and 10times faster than Prim’s and Campos’s algorithms,respec-tively,concerning dense input graphs;the difference iseven greater when the number of vertices in the input3244 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247graph increases.Kruskal’s algorithm takes more time tocompute a spanning tree.Also,its execution time increaseswith the number of edges in the input graph;this isaccording to the time complexity provided in Section 4.In spite of being simple to implement by using a priorityqueue,it is the least efﬁcient spanning tree algorithm.9.3.DiscussionOur early idea of combining the criteria used by theMST algorithms (edge weights) and Add algorithm(degreeof the vertices) in a single algorithmrevealed to be a goodapproach to design a newapproximation MRCT algorithm.Besides performing well for the extreme cases already cov-ered by Add and Prim’s algorithms,Campos’s algorithmpro-vides good results for other cases.In fact,in general itprovides results similar to those obtained using Wong’salgorithmand runs much faster than the former.Neverthe-less,regarding increasing heterogeneous input graphs ittends to perform better for sparse input graphs than fordense graphs,although this tendency disappears for extre-mely heterogeneous input graphs.In practice,the topologyof a PAN or a LAN typically deﬁnes a sparse graph,sinceeach network device is only directly linked to a fractionof the devices present in the network;this fraction eventends to decrease with the increasing number of nodesparticipating in the network.For instance,in currentbridged Ethernet networks each bridge is only directlylinked to a fraction of the bridges participating in the net-work.Another example is a future PAN envisioned to in-clude multiple wired/wireless technologies [30].Thecoexistence of different wired and wireless technologiesand the limited number of network interfaces per networknode precludes the establishment of direct links fromeachdevice to all the others.Thereby,Campos’s algorithmrepre-sents a true faster alternative to Wong’s algorithmin prac-tical cases.On the other hand,in all cases we haveanalyzed,Campos’s algorithm always provides a spanningtree with lower routing cost than the spanning tree com-puted using current IEEE algorithm,regardless of the num-ber of vertices or the number of edges in the input graph;in particular,Campos’s algorithm provides signiﬁcantlylower routing costs for heterogeneous input graphs.Assuch,it may be used in bridging oriented solutions to de-ﬁne the active spanning tree with reductions in the routingcost that may reach 21%,on average,without introducingfurther time complexity from a pure algorithmic point ofview.Additionally,for homogeneous input graphs it pro-vides the same routing cost as the spanning tree con-structed by using Add algorithm,in general,but performsbetter than the latter for sparse graphs as the number ofvertices in the input graph increases.This means that,inpractical cases,Campos’s algorithmcan provide lower rout-ing costs than Add algorithm;the gain augments as thenumber of vertices in the input graph increases.On theother hand,concerning highly heterogeneous graphs ittends to approximate the results provided by the MSTalgorithms which in such conditions provide an approxi-mate or the exact MRCT.In practice,the reduction in execution time enabled byCampos’s algorithmwhen compared to Wong’s algorithmisimportant.Given that we may be talking about mobile anddynamic networks that may experience frequent topologychanges,a newMRCT must be computed as fast as possible,sothat thenetworkreconﬁgurationtimeis minimal.Inaddi-tion,while in highly capable devices the reduction in com-putation time may not make much difference,in PANs,forexample,it may make difference indeed.The devices form-ingsuchnetworks mayhavelimitedcomputational capabil-ity,which may lead to a signiﬁcant absolute reduction incomputation time.On the other hand,a faster computationof an MRCT leads to lower energy consumption,which is animportant point considering devices running on batterypower,and releases the CPUearlier for other tasks.In general,Add algorithmdoes deﬁne a good approxi-mation MRCT algorithm for homogeneous graphs.Whencompared to Wong’s algorithm it tends to provide worseresults for sparse input graphs as the size of the inputgraph increases.Thereby,it may diverge from the resultsprovided by Wong’s algorithm for practical cases.On theother hand,it does not performwell for heterogeneous in-put graphs.Therefore,in spite of being faster than Wong’sand Campos’s algorithms,it has limited applicability inpractice.It can only be applied to homogeneous networksthat either contain small number of nodes or deﬁne adense topology,where the major advantages of the algo-rithm come up,as far as execution time and routing costare concerned.The MST algorithms tend to approximate the result pro-vided by Wong’s algorithm as the weights in the graphFig.7.Execution time for each spanning tree algorithm under analysis considering input graphs of 30 and 50 vertices.R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3245become increasingly heterogeneous;yet,for practical casesthey can only be considered as approximation MRCT algo-rithms for small input graphs ðn ¼ 10Þ.Conversely,they donot provide good results for homogeneous graphs.In spiteof converging to the same results as the heterogeneity inthe input graph increases,the two MST algorithms consid-ered for analysis do not exhibit the same performance;Kruskal’s algorithm generally provides worse results thanPrim’s algorithm and is less efﬁcient than the latter.Thisis explained by the different procedures followed by eachalgorithm.Kruskal’s algorithm does not take topology intoaccount at all.It only cares about selecting the n 1 edgeswith the lowest weight so that the total cost of the result-ing spanning tree can be minimized.When there is morethan one edge with equal weight the algorithmselects ran-domly one of them to be positioned ﬁrst in the priorityqueue.On average,this leads to the construction ofstretched spanning trees that have higher diameters and,consequently,higher routing costs.Rather,Prim’s algo-rithmsomehowconsiders topology as an implicit selectioncriterion.At each step,after selecting the next vertex v tobe added to the partial spanning tree,the algorithm addsall the neighbor vertices of v to the list L.If a given neigh-bor vertex vnis already in L and the edge connecting it to vhas weight equal to the weight currently assigned to vnthealgorithm does not update the weight and the candidateparent vertex in L.This tends to reduce the number of par-ent vertices in the ﬁnal spanning tree and,consequently,contributes to the construction of an MST with lower rout-ing cost than the MST provided by Kruskal’s algorithm.In summary,Campos’s algorithm actually represents anew faster approximation MRCT algorithm for practicalcases.It provides the same results as the currently fastestknown approximation MRCT algorithm,Wong’s algorithm,and runs n times faster,where n deﬁnes the number of ver-tices in the input graph.On the other hand,Campos’s algo-rithm has the same time complexity as Add and Prim’salgorithms,but performs well also for other than the ex-treme cases covered by the formers.In practice,it can evenprovide better results than Add algorithmfor homogeneousinput graphs.In addition,it constructs a spanning tree withrouting cost that may reach up to 79% the routing cost ofthe tree constructed by current IEEE spanning tree algo-rithm;the routing cost is particularly lower for heteroge-neous networks,exactly where the use of bridging maybe of greater interest.If,for instance,the edge weights rep-resent the delay associated to each network link,suchreduction in routing cost will mean a reduction on the aver-age communication delay,and consequently an increase onthe average throughput,between every pair of nodes.10.Future workThe evaluation of Campos’s algorithm and the variousspanning tree algorithms considered herein,using real net-works and real metrics,such as throughput or delay,maybe a future work item.Furthermore,the comparative anal-ysis presented may be extended by considering otherapproximation MRCT algorithms,namely the 15/8-approx-imation and 3/2-approximation algorithms running intime Oðn3Þ and Oðn4Þ,respectively,proposed in the litera-ture [11].It would be interesting to evaluate whether theresults provided by these algorithms are signiﬁcantly bet-ter than the results provided by Campos’s and Wong’s algo-rithms,in practical cases.Finally,we may considerimprovements to Campos’s algorithm.Along the simula-tions we veriﬁed that the routing cost of the ﬁnal spanningtree depends signiﬁcantly on the selected initial vertex.Currently,for increasingly heterogeneous graphs,the algo-rithm cannot guarantee that the initial vertex is the rightone,i.e.,the vertex with the highest degree in the ﬁnalspanning tree.Thus,improvements to the selection of theinitial vertex may be considered in the future as a way toimprove the results achieved by our algorithm.In addition,the deﬁnition of the composed parameters wdvand jspvmay be modiﬁed by considering other basic parameterseither to be combined with current parameters or to re-place them.11.ConclusionCommunication networks have been developed basedon two networking approaches:bridging and routing.The convergence to an all-Ethernet paradigm and theincreasing heterogeneity found in Personal Area Networks(PANs) and Local Area Networks (LANs) emphasizes thecurrent and future applicability of bridging oriented solu-tions based on IEEE 802.1D bridges.The use of IEEE802.1D bridges requires that a single spanning tree is con-ﬁgured as the active network topology.A Minimum Rout-ing Cost Tree is known to be the optimal spanning tree,though its computation is a NP-hard problem.We pro-posed a new approximation MRCT algorithm,namedCampos’s algorithm,that has time complexity lower thanthe fastest known approximation MRCT algorithm andprovides a spanning tree with similar routing cost,inpractice.Additionally,our algorithm provides a spanningtree with lower routing cost than the routing cost of thespanning tree computed using current IEEE algorithm;on average,the routing cost reductions may reach 21%.Thus,in practice,bridging oriented solutions have gainsin using our algorithm instead of current IEEE algorithm,namely in current and future heterogeneous PANs/LANs.The new algorithm may be used together with a signalingprotocol that enables it to operate in a distributedmanner.AcknowledgementsThe authors would like to thank the support from thePortuguese Foundation for Science and Technology (FCT)under the fellowship SFRH/BD/19429/2004/.Also,theywould like to thank to the anonymous reviewers for theirvaluable comments that did contribute to improve thequality of the paper.References[1] IEEE 802.11 Work Group,Part 11:Wireless LAN Medium AccessControl (MAC) and Physical Layer (PHY) Speciﬁcations,1999.[2] Bluetooth SIG,Personal Area Networking Proﬁle,Version 1.0,2003.[3] Standard ECMA-368,High Rate Ultra Wideband PHY and MACStandard,ﬁrst ed.,2005.3246 R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247[4] B.Brackenridge,UWB the WiMedia Way,2007.<http://www.extremetech.com/article2/0,1697,2129903,00.asp>.[5] IEEE 802.1D Work Group,IEEE Standard for Local and MetropolitanArea Networks:Media Access Control (MAC) Bridges,2004.[6] M.Bahr,Update on the hybrid wireless mesh protocol of IEEE802.11s,in:Proceedings of the IEEE International Conference onMobile Adhoc and Sensor Systems (MASS 2007),Pisa,2007,pp.1–6.[7] R.Droms,Dynamic host conﬁguration protocol,IETF RFC 2131(1997).[8] D.C.Plummer,An Ethernet address resolution protocol,IETF RFC 826(1982).[9] P.Mieghem,S.Langen,Inﬂuence of the link weight structure on theshortest path,Physical Review E 71 (056113) (2005) 1–13.[10] P.Mieghem,S.M.Magdalena,Phase transition in the link weightstructure of networks,Physical Review E 72 (056138) (2005) 2–7.[11] B.Y.Wu,K.Chao,Spanning Trees and Optimization Problems,Chapman & Hall,2004.[12] B.Y.Wu et al.,A polynomial time approximation scheme forminimum routing cost spanning trees,in:Proceedings of the NinthAnnual ACM-SIAM Symposium on Discrete Algorithms,SanFrancisco,1998,pp.21–32.[13] R.Wong,Worst-case analysis of network design problemheuristics,SIAM Journal of Algebraic Discrete Mathematics 1 (1980) 51–63.[14] V.Grout,Principles of cost minimization in wireless networks,Journal of Heuristics 11 (2005) 115–133.[15] P.Gupta,P.Kumar,Capacity of wireless networks,IEEE Transactionson Information Theory 46 (2) (2000) 388–404.[16] P.Stuedi,G.Alonso,Computing throughput capacity for realisticwireless multihop networks,in:Proceedings of the Ninth ACMInternational Symposium on Modeling Analysis and Simulation ofWireless and Mobile Systems,Terromolinos,Spain,2006,pp.191–198.[17] K.Lui,W.C.Lee,K.Nahrstedt,STAR:a transparent spanning treebridge protocol with alternate routing,ACM SIGCOMM ComputerCommunication Review 32 (3) (2002) 33–46.[18] T.L.Rodeheffer,C.A.Thekkath,D.C.Anderson,SmartBridge:ascalable bridge architecture,in:Proceedings of ACM SIGCOMM,Stockholm,2000,pp.205–216.[19] R.Perlman,Rbridges:transparent routing,in:Proceedings ofINFOCOM,vol.2,Hong Kong,2004,pp.1211–1218.[20] F.D.Pellegrini,D.Starobinski,M.G.Karpovsky,L.B.Levitin,Scalable cycle-breaking algorithms for gigabit ethernetbackbones,in:Proceedings of INFOCOM,vol.4,Hong Kong,2004,pp.2175–2184.[21] N.Huang,Y.Cheng,An effective spanning tree algorithm for abridged LAN,in:Proceedings of the International Workshop onAdvanced Communication and Applications for High SpeedNetworks,Munich,1992,pp.43–49.[22] K.Elmeleegy,A.L.Cox,T.S.Eugene Ng,EtherFuse:an ethernetwatchdog,in:Proceedings of ACMSIGCOMM,Kyoto,2007,pp.253–264.[23] R.Prim,Shortest connection networks and some generalizations,Bell System Technical Journal 36 (1957) 1389–1401.[24] M.Fredman,R.Tarjan,Fibonacci heaps and their uses in improvednetwork optimization algorithms,Journal of the ACM (JACM) 34 3(1987) 596–615.[25] J.B.Kruskal,On the shortest spanning subtree of a graph and thetraveling salesman problem,in:Proceedings of the AmericanMathematical Society,vol.7,1956,pp.48–50.[26] E.W.Dijkstra,A note on two problems in connexion with graphs,in:Numerische Mathematik,vol.1,1959,pp.269–271.[27] Boost Graph Library (BGL).<http://www.boost.org/libs/graph/doc/index.html>.[28] P.Erdos,A.Renyi,On random graphs I,Publicationes MathematicaeDebrecen 6 (1959) 290–297.[29] Rui Campos.<http://telecom.inescporto.pt/~rcampos>.[30] R.Campos,M.Ricardo,Dynamic and automatic connection ofpersonal area networks to the global internet,in:Proceedings ofthe 2006 International Conference on Wireless communications andmobile computing,Vancouver,2006,pp.581–586.Rui Campos received a Diploma degree inElectrical and Computers Engineering in 2003from University of Porto,Portugal.He worksas a researcher at INESC Porto and since 2004he is pursuing his PhD in Electrical andComputers Engineering.His research interestsinclude mobile communications,autoconﬁg-uration and self-management of PersonalArea Networks,and spanning tree algorithms.Manuel Ricardo received a Diploma degree in1988,an M.S.in 1992,and a Ph.D.in 2000,allin Electrical and Computers Engineering fromUniversity of Porto,Portugal.He is an associ-ate professor at University of Porto,where hegives courses in mobile communications andcomputer networks.He also leads the Com-munication Networks and Services Area atINESC Porto.R.Campos,M.Ricardo/Computer Networks 52 (2008) 3229–3247 3247