P2P模式的网络通信優化算法的研究
PIIP模式的网络通信优化算法的研究
摘要_PIIP通信模式,本文提出了I.个实用的通信优化算法称为分支第I.(BFI)通信树算法.该算法的基本思想是引入I.个并发沟通机制,并且根据节点之间的通信量适当分配通信任务到所有节点来缩短通信时间.此外,给出了构造该通信树的算法,并对通信时间进行了评价.仿真结果表明,BFI通信树算法的通信效率优于克鲁斯卡尔通信树算法.
关键字:PIIP;并发通信机制;通信树;
I..引言
点对点(PIIP)技术可以轻松和直接的进行网络沟通,并在计算机网络研究领域成为流行.在传统的客户机/服务器模式下,服务器是整个网络的核心,为用户提供服务并管理整个网络.I.旦服务器遇到故障,整个网络可能会崩溃.然而,在PIIP模式下避免了用节点直接交换信息的问题.PIIP系统是自治和非中心的,节点是自治.动态和直接的.PIIP已经在通信领域打破了传统的客户机/服务器模式,每个节点的状态在PIIP网络具有相同位置,它可以在I.段时间内用作客户端或服务器.PIIP的优点是不仅降低了硬件设备的投资,并消除了由通过中央服务器的重发信息引起的瓶颈效应,而且还有效地利用网络资源.
在计算机网络中,表示通信成本或通信时间的通信质量受到影响的因素有:节点的位置分布,通信环境等,其实我们更关心的通信时间.因此,我们应该合理布局节点,并尽可能使网络负载均衡,以快速完成通信任务.在文献[VIII,IX]中根据不同的应用背景讨论了负载均衡.文献[I.0]为同等量的情况给出了I.个详细的研究.文献[I.I.]在量不等的情况研究出克鲁斯卡尔通信树算法.本文在不同量的情况下提出了I.种新的的通信树构造算法,称为BFI通信树算法,这无论是在施工工艺和沟通效率都优越于克鲁斯卡尔通信树算法.新算法逐个增加了通信树的节点,它I.次从候选节点中选择I.个节点,该算 *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
法可以减少通信时间的原因有两点:该算法选择较小的量,并避免在构建通信树时使用较大的量;它引入了并发通信机制,这意味着沟通过程中,不仅依靠源节点,而且依靠其他节点.因为所有节点同时参与发送数据时,该通信效率自然提高.
II.规则和定义
从PIIP通信的角度来看,实际节点的连接是复杂的网络结构.在本文中,通信算法将复杂的网络结构变成II叉树结构,但在逻辑上不改变网络物理结构,并且根据树形结构组织通信.在树形结构中,网络节点的位置,通信质量和网络级段中的分布都是由通信树算法管理.不同通信树算法构建了通信树的不同形状,因此,通信时间是不同的.通信时间是测量通信算法能力的I.个非常重要的因素.
a.并发通信规则
根据实际需求,我们定义通信规则如下:
I.).每个节点在任何时间只可以与I.个其他节点通信;
II).两个通信节点之间的关系必须是亲子沟通,在任何两个节点之间通信的主要传输数据是相同的;
III).第I.个节点是通信源节点.每个非叶结点,当它接收到的数据,首先将数据发送到其第I.左子树的根节点.然后将数据发送到其第II左子树根节点,直到其左子树的最后I.个根节点,其右子树的根节点为最后I.个节点;
IV).当所有叶节点都已经接收到了数据,该通信完成;
b.通信树的定义
定义I.:该通信树节点中,右子树的叶节点被称为该通信的端节点;
定义II:通信分支从源节点到端节点定义为I.个边缘序列,边缘序列的通信支长度用表示;
定义III:端节点的分支机构的通信时间是通信分支权重的总和.记为,即
是的权重,.
定义IV:对于具有N个节点的通信树,从源节点到通信最后I.个节点接收到数据的时间,被称为并发通信时间.用表示,即.
定义V:累积通讯时间记为.即.
简单地说,通信树可以表示成子兄弟II叉树,其每个通信节点都添加了两个指针.I.个指向它的第I.左子树的根节点,另I.个指向这个节点的右邻的兄弟节点,该II进制树的叶节点是通信结束的点,叶节点的数量等于通信分支数.边缘被称为通信分支节点,在原有的通信树节点的父节点被称为通信父节点.因此,节点的右子树的重量是节点的右子树节点和通信父节点的平均量.
图I.(a)中原有的通信树是由图I.(b)中的I.个II叉树子兄弟数据结构表示,在图I.(b),节点I.没有右子树...的通信父节点是...的通信父节点是..的通信父节点是.叶节点..是III个通信结束节点:节点I.0通信分支经过,节点VII通信分支经过,节点VIII通过.根据定义III,通信分支..的时间分别是...则
(a)(b)
图I.通信树的子兄弟表示
III.算法描述
a.通信树的构建
实际的应用中,通信网络是由I.个完整的图形表示G=(V,E,W),这里V是节点集,E是边集,W是质量集.节点和节点之间的质量等于节点和节点之间的质量.节点和节点本身是零.该矩阵的所有对角元素都等于零.矩阵如下:
表示节点和节点的通信质量.
当和满足时,
集合和分别代表节点集和通信树T的边集.集合和分别在构成通信树中代表候选节点集和候选边集.的补集是..在该通信树节点的数目为N.I.般地,我们假设节点是第I.通信节点.该算法的BFI通信树如下:
第I.步:子树的候选节 *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
点,.节点,满足.,;
第II步:;
第III步:,如果右子树的节点是空,首先找到节点的父节点的通信,其次找到正确的子树的候选节点,并最终确定;
第IV步:;
第V步:找到,则,所以;
第VI步:如果数比N少,转到第II步,其他结构的过程结束.
沿着与节点相关的边缘找到最小的重量,其边缘节点被逐个视为候选节点.然后,我们计算该分支每个候选节点的通信时间,并比较候选节点的通信时间,选出时间最短的分支节点.重复这些操作,直到所有节点的通信树存在.
该BFI通信树算法提出了I.种通信树的构建方法,其构建过程是标准的,通信效率是有效的.该算法逐I.增加节点,这在应用程序的网络优化非常有用的.在构造通信树上不同于克鲁斯卡尔通信树算法.这就是说,克鲁斯卡尔通信树算法定义了节点之间的连接树.在FBI的构建过程中,候选节点可以暂时地被添加到它们II叉树空位置.显然,该节点的位置和它相关联的II进制树的边缘是由分支的通信时间决定.
b.通信树构建实例
图II给出了BFI通信树与节点V的构建过程.M是重量矩阵:
在矩阵M的元素的值代表重量.M是I.个对称矩阵,因此,任何两个节点,无论哪个节点是通信源时,通信成本量不会改变.
图II在构建过程中的BFI
在图II中,虚线代表的候选边缘,用虚线相连的叶节点是候选节点.首先,我们选择节点并将其添加到该通信树,因为节点和节点之间的权重最小.然后从树节点遍历,节点是节点的左子树.因为节点和节点之间的权重是最小的,与通信父节点相关联的节点是候选节点,边缘是候选边缘.同理,节点和节点之间的权重是最小的.节点是候选节点,边缘是候选边缘.节点和节点分支机构的通信时间分别为III和II.因此,候选节点和候选边缘应该被永久添加到通信树.现在,该通信树中的节点的数目是III.重复上面的操作,通信树将被V个节点获得.具体步骤如图II.
c.算法分析
从算法定义和上文展示的构建实例得知,算法只能在I.层得到最优化的解决方案.如果我们构建通信树的同时考虑两个层面的通信,该方案将优于I.层.以同样的方式,在同I.时间同时增加节点,该解决方案应该是最优化的I.个.当然,通讯时间最短,但需操作的数量是巨大的.时间复杂度至少是为.这几乎是不可能在实际应用中利用它.
更好的解决办法是我们同时使用的多个节点,这就意味着通信时间较
短,构建时间较长.
IV.通信时间分析
定理I.:对于N个节点的通信树中,并行通信时间值小于或等于
累积的通信时间,.
证明:根据定义IV,并发通信树的时间是所有的通信分支中分支时间最长的;而累积通信时间是树上所有重量的总和.显然,满足.
当通信树的深度为N-I.或I.,换句话说,通信分支的数目只有I.个,并发通信时间等于通信时间的累积.
由此可以看出,并发通信时间不超过积聚通信时间.原因是,我们引入并发沟通机制,这意味着,某些任务是同时进行.因此,我们引入并发通信树的概念,并发指相同时间同I.棵通信树通信任务的最大数目.
a.平等权重通信树
在相等重量的情况下,如果通过由自左向右在BFI通信树算法遍历的方法,将节点添加到通信树中,在文献[I.0]讨论了I.种特殊情况的BFI通信树,通信树是I.样的.因此,通讯时间是I.样的.
我们用W标志两个节点之间的权重,用[X]表示大于等于X的最小整数.
定理II:对于同等重量具有N个节点的通信树的并发通信时间.
证明:节点N满足,据并发通信规则,在第I.时间间隔,II个节点已经接收到数据.第II次间隔之后,个节点已经接收到数据.通过奇偶校验推理,后面的第时间段,所有节点已接收到数据.因此.
定理III:对于同等重量具有N个节点的通信树,并发公式是:
证明:根据并发通信规则,在第()时间间隔,个节点的数据发送到其他节点.据并发的概念,它可由获取.
b.重量不等通信树
定理IV:当,并发通信时间满足.
证明:节点N满足.据并发通信规则,至少在第个时间间隔所有节点可以接收到数据.因此.则
根据定理I.
c.BFI通信树
图III和图IV展示出了BFI通信树算法和克鲁斯卡尔通信树算法的仿真结果.
在图中,X轴为标志节点号V,I.0,III0,V0,VIII0,I.00,I.V0,II00,IIV0,和III00,Y轴表示并发通信时间.虚线表示克鲁斯卡尔通信树算法的并行通信时间,而实线表示BFI通信树算法的并行通信时间.(a).(b)和(c)为III个实验数据.(d)是根据(a).(b).(c)求得的并行通信时间的算术平均值.图III中重量的范围为(0,II],该重量是选自实数范围从0(不包括0)至II的随机数,图IV中重量的的范围为[I.,V0].
(a)
(b)
(c)
(d)
图III小型质量与并发通信的时间比较
(a)
(b)
(c)
(d)
图IV大型质量与并发通信的时间比较
仿真结果表明,并行通信在小质量数值的条件下,BFI通信树算法大多是优于或者等于克鲁斯卡尔通信树算法.但是现在不能确定克鲁斯卡尔通信树的通信效率优于BFI通信树.例如,图IV的(c)图中,在节点为I.0时克鲁斯卡尔通信树优于BFI通信树.在大节点数N时,显著地结果表明,BFI通信树的通信效率优于克鲁斯卡尔通信树.如图III和图IV显示的结果,BFI通信树算法的并行通信时间接近.
由图III和图IV可以显著地发现,当节点编号N逐渐增加时并发通信的时间并没有大幅增加,而是保持I.个相对稳定的值.I.个原因是与随着节点编号N增加的所有质量相比,BFI通信树算法所选的质量非常小,并且的最大值和最小值之间的差值X分接近.另I.个原因是我们引入了并行机理通信.并行通信不仅仅依赖于通信的源节点,而且取决于已经获得数据的节点.因此通信源的数量随着节点数目N的增加而增加,导致并行通信时间增加缓慢有时甚至减少.
V.总结
BFI通信树算法是I.种有效的算法用来合理布置网络节点和改善数据传输效率.此外,它可以很容易的投入到实际应用中,通信重量可以预先根据节点的分布和通信条件来估计.这种通信时非常有效的,因为在通信中使用了并行机理,选取的边线和节点的目的是缩短并行通信时间.
我们采用BFI蚁群优化的算法,结果表明,通信效率大大提高.
附件II:外文原文(复印件)
StudyonaNetworkCommunicationOptimizationAlgorithmofPIIPMode
Abstract_BasedonPIIPcommunicationmode,apracticalcommunicationoptimizationalgorithmcalledBranchFirst(BFI)communicationtreealgorithmisproposed.Thebasicideaofthealgorithmistointroduceaconcurrentcommunicationmechanism,andtoassignpropercommunicationtasktoallnodesaccordingtothe
communicationweightbetweennodesinordertoshortencommunicationtime.Inaddition,thealgorithmtoconstructthecommunicationtreeispresentedandthecommunicationtimeisevaluated.SimulationresultsindicatethatBFIcommunicationtreealgorithmissuperiortoKruskalcommunicationtreealgorithmincommunicationefficiency.
Keywords-PIIP;concurrentcommunicationmechanism;communicationtree
I.INTRODUCTION
ThePeertoPeer(PIIP)technologymakesnetworkcommunicateeasilyanddirectly,andhasbecomepopularincomputernetworkresearchdomain.Inthetraditionalclient/servermode,theserver,thecoreoftheentirenetwork,providesuserswithserviceandmanagesentirenetwork.Oncetheservermeetsafault,theentirenetworkmaycollapse.However,thePIIPmodeavoidsthisproblemforthenodesexchanginginformationdirectly.ThePIIPsystemisself-governmentandnon-central,andthenodesareautonomous,dynamic,anddirect.ThePIIPhasbrokenthetraditionalclient/servermodeincommunication.ThestatusofeachnodehasthesamepositioninthePIIPnetwork.Itcanfunctionasaclientoraserverduringaperiodoftime.TheadvantagesofPIIParenotonlytoreducetheinvestmentofthehardwareequipmentandtoeliminatethebottleneckeffectcausedbytheretransmittinginformationthroughthecentralserver,butalsoutilizethenetworkresourceseffectively[I.-VII].
Inthecomputernetwork,aseriesoffactors,suchasthelocationdistributionofnodes,thecommunicationenvironmentetc.,influencecommunicationweightthatrepresentscommunicationcostorcommunicationtime.Actuallywearemoreconcernedcommunicationtime.Thereforeweshouldlayoutnodesreasonablyandbeaspossibleasthenetworkloadequalizationinordertocompletethecommunicationtaskquickly.Thepapers[VIII,IX]discussedtheloadbalancingaccordingtodifferent
applicationbackground.Thepaper[I.0]gaveadetailedresearchfortheequalweightsituation.Thepaper[I.I.]researchedKruskalcommunicationtreealgorithmfortheunequalweightsituation.ThispaperproposesanewcommunicationtreeconstructionalgorithmcalledBFIcommunicationtreealgorithmfortheunequalweightsituation,whichissuperiortoKruskalalgorithmbothinconstructionprocessandcommunicationefficiency.Thenewalgorithmaddsthenodestocommunicationtreeonebyone.Itchoosesonenodefromcandidatenodesatatime.Thereasonswhythisalgorithmcanreducethecommunicationtimehavetwopoints:Thealgorithmselectsthesmallerweights,andavoidsusingthelargerweightinconstructingcommunicationtree;Itintroducestheconcurrentcommunicationmechanism,whichmeansthatcommunicationprocessnotonlyreliesonthesourcenode,butalsoothernodes.Becauseallnodestakepartintransmittingdataatthesametime,thecommunicationefficiencyisimprovednaturally.
II.RULESANDDEFINITIONS
FromthepointofPIIPcommunication,theactualnodeconnectionisthecomplicatednetworkstructure.Inthispaper,thecommunicationalgorithmchangesthecomplicatednetworkstructuretoabinarytreestructurelogicallywithoutchangingthenetworkphysicalstructure,andorganizesthecommunicationaccordingtothetreestructure.Inthetreestructure,thelocationofnetworknodes,thedistributionofcommunicationweightandthesegmentofnetworklevelareallmanagedbythecommunicationtreealgorithm.Thedifferentcommunicationtreealgorithmconstructsthedifferentshape
ofcommunicationtree.Thereforethecommunicationtimeisdifferent.Communicationtimeisaveryimportantfactortomeasurethecapabilityofthecommunicationalgorithm.
A.ConcurrentCommunicationRules
Accordingtotheactualneeds,wedefinethecommunicationrulesasfollows:
●Eachnodecancommunicatewithonlyoneothernodeatanytime;
●Therelationoftwocommunicationnodesmustbepaternityincommunication,andmaintransmissiondatainthecommunicationbetweenanytwonodesissame;
●ThefirstnodeI.visthecommunicationsourcenode.Foreachnon-leafnode,whenitreceivesthedata,transmitsthedatatotherootnodeofitsfirstleftsubtreefirstly.Thentransmitsthedatatotherootnodeofitssecondleftsub-treeuntiltothelastrootnodeofitsleftsub-tree,therootnodeofitsrightsub-tree;
●Whenallleafnodeshavereceivedthedata,thecommunicationcompletes.
B.DefinitionsofCommunicationTree
DefinitionI.:Forthenodesofthecommunicationtree,theleafnodeofitsrightsub-treeiscalledthecommunicationendednode.
DefinitionII:Thecommunicationbranchfromsourcenodetoendednodeisdefinedasasequenceofedges.Thenumberofedgesiscalledthecommunicationbranchlengthindicatedby.
DefinitionIII:Communicationtimeofthebranchwiththenodeastheendednodeisthesumoftheweightsofcommunicationbranch.Notedas.Then
Whereistheweightofedge,.
DefinitionIV:ForthecommunicationtreewithNnodes,thetime,spentincommunicationfromthesourcenodevI.tothecommunicationendednode,whichisthelastnodereceivedthedata,iscalledtheconcurrentcommunicationtime.Indicatedbyf(t).Thenf(t)=max{fm(t)}.
DefinitionV:Accumulationcommunicationtimeisnotedas.Then
Forsimply,thecommunicationtreeisexpressedbythechild-brotherbinarytreewhichmustaddtwopointerstoeachcommunicationnode.Onepointstotherootnodeofitsfirstleftsub-treeandtheothertotherightneighborbrothernodeofthisnode,inwhichtheleafnodeofbinarytreeisthecommunicationendednode,andthenumberofleafnodesisequaltothenumberofcommunicationbranches.Edgeiscalledthecommunicationbranchfornodevm.Theparentnodeofnodeviinoriginalcommunicationtreeiscalledcommunicationparentnode.Thereforetheweightoftherightsub-treeofnodeviistheweightbetweentherightsub-treenodeofnodeviandcommunicationparentnodeofnodevi.
TheoriginalcommunicationtreeshowedinfigureI.(a)isrepresentedbychild-brotherdatastructureshowedinfigureI.(b)whichisabinarytree.InfigureI.(b),nodeI.vhasnottherightsub-tree.ThecommunicationparentnodeofnodesvII,vIII,vIVisnodeI.v,thecommunicationparentnodeofnodesvVI,vVIIisnodevIII,andthecommunicationparentnodeofnodesvIX,vI.0isnodevV.TheleafnodesvI.0,vVII,vVIIIarethecommunicationendednodeswiththreebranches:ThecommunicationbranchwithnodevI.0goesthrough,nodevVIIthrough,andnodevVIIIthrough.AccordingtodefinitionIII,communicationtimeofthecommunicationbranchwithnodesvI.0,vVII,vVIIIisrespectively.Then
(a)(b)
FigureI.Thecommunicationtreewiththechild-brotherrepresentation
III.ALGORITHMSDESCRIPTION
A.CommunicationTreeConstruction
Foractualapplication,thecommunicationnetworkisrepresentedbyacompletegraphG=(V,E,W),whereVisthenodeset,Eistheedgeset,andWistheweightset.Theweightbetweennodeviandnodevjisequaltotheweightbetweennodevjandnodevi.Theweightbetweennodeviandnodeviitselfiszero.Alldiagonalelementsofthematrixareequaltozero.Thematrixisasfollows:
Whererepresentsthecommunicationweightbetweennodeviandnodevj.Becauseof
,andthen
SetVTandETrepresentthenodesetandtheedgesetofcommunicationtreeTrespectively.SetVCandECrepresentthecandidatenodesetandthecandidateedgesetduringconstitutingcommunicationtreerespectively.ThecomplementsetofVTis.Thatis.ThenumberofnodeincommunicationtreeisN.Withoutlossofgenerality,wesupposenodevI.isthefirstcommunicationnode.ThealgorithmofBFIcommunicationtreeisasfollows:
StepI.:Set.Findtheleftsub-tree’scandidatenodesofnodevI.,andsatisfy.Set,
StepII:.
StepIII:,iftherightsub-treeofnodeviisnull,firstlyfindthecommunicationparentnodeofnodevi,secondlyfindtherightsub-tree’scandidatenodeofnodevi,satisfy
,andfinallyset
StepIV:
StepV:Find,sothat.Set
StepVI:IfthenumberofVTislessthanN,gotoStepII,elsethestructureprocessends.
AlongtheedgeswhichareassociatedwiththenodevI.findthesmallestweightedgewhosenodeisregardedascandidatenodesonebyone.Thenwecalculatethebranchcommunicationtimeofeverycandidatenode,andchooseonecandidatenodeinwhichthebranchcommunicationtimeistheshortestcomparedwithothers.Repeattheseoperationsuntilallnodesexistinthecommunicationtree.
TheBFIcommunicationtreealgorithmpresentsacommunicationtreeconstructionmethodinwhichtheconstructionprocessisstandardizedandcommunicationefficiencyiseffective.Thealgorithmaddsthenodeonebyone,whichisveryusefulinnetworkoptimizationforapplication.ItisdifferentfromtheKruskalcommunicationtreealgorithmwhichstructurescommunicationtreeatonetime.Thatistosay,theKruskalcommunicationtreealgorithmdefinestreeconnectionsbetweennodesatonetime.InFBIconstructionprocess,thecandidatenodescanbeaddedtothepositionswhicharenullinthebinarytree
temporarily.Obviously,thepositionofthenodeanditsassociatededgeinthebinarytreeisdecidedbythebranchcommunicationtime.
B.CommunicationTreeConstructionExample
FigureIIgivesconstructionprocessoftheBFIcommunicationtreewiththenumberofnodeV.Mistheweightmatrix:
ThevalueofelementinmatrixMrepresentstheweight.Misasymmetricmatrix,andthereforeanytwonodes,nomatterwhichnodeiscommunicationsource,thecommunicationcostdosenotchange.
FigureIITheconstructionprocessoftheBFI
InfigureII,thedottedlinerepresentsthecandidateedge,andtheleafnodesassociatedwithdottedlinearecandidatenodes.Firstly,wechoosethenodevIIIandaddittothecommunicationtreebecausetheweightbetweennodevI.andnodevIIIisthesmallest.ThentraversethetreefromthenodevIIIwhichistheleftsub-treenodeofnodevI..BecausetheweightbetweennodevIIandnodevI.isthesmallest,thenodevIIassociatedwiththecommunicationparentnodevI.isthecandidatenodeandtheedgeisthe
candidateedge.SimilarlytheweightbetweennodevIIIandnodevIVisthesmallest.SothenodevIVisthecandidatenodeandtheedgeisthecandidateedge.ThecommunicationtimeofthebranchesendedwithnodevIIandvIVisIIIandIIrespectively.ThereforethecandidatenodeIVvandthecandidateedgeshouldbepermanentlyaddedtothecommunicationtree.NowthenumberofnodesinthecommunicationtreeisIII.RepeattheoperationsaboveandthecommunicationtreewillbeobtainedwithVnodes.TheconcretestepsareshowninfigureII.
C.AlgorithmsAnalysis
Knownfromthealgorithmdefinitionandtheconstructionexampleshowedabove,thealgorithmcanonlygetthemostoptimizationsolutionwithonelayer.Ifweconsidertwolayerswhileconstructingthecommunicationtree,thesolutionwillbebetterthanthatonewithonelayer.Inthesameway,whileaddingallnodesatthesametime,thesolutionshouldbethemostoptimizationone.Ofcourse,thecommunicationtimeistheshortest.Butthequantityofoperationsisenormous.ThetimecomplexityisatleastO(n!).Itisalmostimpossibletomakeuseofitinapplication.Themorenodesweuseatonetime,thebettersolutionit
is,whichmeansthecommunicationtimeisshorter,andthetimeofconstructionislonger.
IV.COMMUNICATIONTIMEANALYSIS
TheoremI.:ForthecommunicationtreeofNnodes,theconcurrentcommunicationtimef(t)islessthanorequaltotheaccumulationcommunicationtimefA(t).Thatis.Proof:AccordingtodefinitionIV,theconcurrentcommunicationtimeofatreeisthelongestbranchtimeinallcommunicationbranches;Andtheaccumulationcommunicationtimeisthesumofallweightsinthetree.Obviouslysatisfy.WhenthedepthofthecommunicationtreeisN-I.orI.,inotherwords,thenumberofcommunicationbranchesareonlyone,theconcurrentcommunicationtimeisequaltotheaccumulationcommunicationtime.Thusitcanbeseenthattheconcurrentcommunicationtimeisnotmorethantheaccumulationcommunicationtime.Thereasonisthatweintroducetheconcurrentcommunicationmechanism.Itmeansthatsometasksarecarriedoutsimultaneously.Therefore,weintroducetheconceptconcurrencyforcommunicationtree.Theconcurrencymeansthebiggestnumberofthecommunicationtasksinacommunicationtreeatthesametime.
A.TheEqualWeightCommunicationTree
Inequalweightsituation,ifthenodeisaddedtothecommunicationtreebytraversingfromlefttorightintheBFIcommunicationtreealgorithm,thecommunicationtreeisthesamewiththetreediscussedinthepaper[I.0],whichisaspecialcaseoftheBFIcommunicationtree.Sothecommunicationtimeisthesame.
WeusethatWsignstheweightbetweentwonodes,and[X]indicatesthesmallestintegerwhichisbiggerthanorequaltoX.
TheoremII:FortheequalweightcommunicationtreeofNnodes,theconcurrentcommunicationtimeis
.
Proof:ThenodenumberNsatisfies.Accordingtotheconcurrentcommunicationrule,aftertheI.sttimecompartment,IInodeshavereceivedthedata.AftertheIIndtimecompartment,nodeshavereceivedthedata.Byparityofreasoning,afterthetimecompartment,allnodeshavereceivedthedata.Therefore.
TheoremIII:FortheequalweightcommunicationtreeofNnodes,theconcurrencyis.
Proof:Accordingtotheconcurrentcommunicationrule,inthe()thtimecompartment,nodestransmitthedatatoothernodes.Inthethtimecompartment,N-nodestransmitthedatatoN-othernodes.Accordingtotheconcurrencyconcept,itcanbegainedby
B.TheUnequalWeightCommunicationTree
TheoremIV:Theconcurrentcommunicationtimef(t)satisfiesWhere.
Proof:ThenumberofnodesNsatisfies.Accordingtotheconcurrentcommunicationrule,atleastafterthtimecompartment,allnodescanreceivethedata.Therefore.Then
AccordingtoTheoremI.
C.TheBFICommunicationTree
FiguresIIIandIVshowthesimulationresultsoftheBFIcommunicationtreealgorithmandtheKruskalcommunicationtreealgorithm.Inthefigures,theXaxissignsnodenumberforV,I.0,III0,V0,VIII0,I.00,I.V0,II00,IIV0,andIII00.TheYaxissignstheconcurrentcommunicationtime.ThedottedlinerepresentstheconcurrentcommunicationtimeoftheKruskalcommunicationtreealgorithm.AndthereallinerepresentstheconcurrentcommunicationtimeoftheBFIcommunicationtreealgorithm.The(a),(b),and(c)arethreeexperimentaldata.The(d)isthemeanarithmeticalvalueoftheconcurrentcommunicationtimewith(a),(b),and(c).TherangeofweightinfigureIIIis(0,II].Theweightsareselectedfromtherealnumberrangefrom0(notincluded0)toIIrandomly.TherangeofweightinfigureIVis[I.,V0].
(a)
(b)
(c)
(d)
FigureIIITheconcurrentcommunicationtimecomparisonforsmall-scaleweight
(a)
(b)
(c)
(d)
FigureIVTheconcurrentcommunicationtimecomparisonforlarge-scaleweight
SimulationresultsindicatethattheBFIcommunicationtreealgorithmismostlysuperiortoorisequaltotheKruskalcommunicationtreealgorithminconcurrentcommunicationtimeontheconditionofsmallernodenumber.ButthesituationthatthecommunicationefficiencyoftheKruskalcommunicationtreeisbetterthantheBFIcommunicationtree’scannotberuledout.Forexample,infigureIV(c),theKruskalcommunicationtreealgorithmissuperiortotheBFIcommunicationtreealgorithmontheconditionofnodenumberI.0.OntheconditionoflargernodenumberN,thestrikingresultshowsthattheBFIcommunicationtreealgorithmissuperiortotheKruskalAsshowninfiguresIIIandIV,theconcurrentcommunicationtimeoftheBFIcommunicationtreealgorithmnearlyapproaches.
ItisobviousfromfiguresIIIandIV,whenthenodenumberNincreases,theconcurrentcommunicationtimedoesnotincreasesharply.Itmaintainsrelativelystablevalue.OnereasonisthattheweightsselectedbasedontheBFIcommunicationtreealgorithmarequitesmallamongallweightswiththenodenumberNincreasing,andthedifferencebetweenthemaximumvalueandtheminimumvalueisveryclose.Theotherreasonisthatweintroducetheconcurrentmechanismincommunication.Theconcurrentcommunicationnotonlyreliesonthecommunicationsourcenode,butalsodependsonthenodeswhichhavealreadyobtainedthedata.ThereforethenumberofcommunicationsourcesincreaseswiththenodenumberN.Theconcurrentcommunicationtimeincreasesslowlyandsometimesitevenreduces.
V.CONCLUSION
TheBFIcommunicationtreealgorithmisaneffectivealgorithmtolayoutnetworknodereasonablyandtoimprovethedatatransmissionefficiency.Moreover,itcanbeputintothepracticalapplicationeasily.Thecommunicationweightcanbeestimatedpreliminarilybasedonthedistributionofthenodesandthecommunicationcondition.Becausetheconcurrentmechanismusedincommunicationandtheselectededgesandnodesaimatshorteningtheconcurrentcommunicationtime,thecommunicationis
effective.WeapplyBFIalgorithmtoantcolonyoptimization,andtheresultsshowthatthecommunicationefficiencyisimprovedgreatly.
摘要_PIIP通信模式,本文提出了I.个实用的通信优化算法称为分支第I.(BFI)通信树算法.该算法的基本思想是引入I.个并发沟通机制,并且根据节点之间的通信量适当分配通信任务到所有节点来缩短通信时间.此外,给出了构造该通信树的算法,并对通信时间进行了评价.仿真结果表明,BFI通信树算法的通信效率优于克鲁斯卡尔通信树算法.
关键字:PIIP;并发通信机制;通信树;
I..引言
点对点(PIIP)技术可以轻松和直接的进行网络沟通,并在计算机网络研究领域成为流行.在传统的客户机/服务器模式下,服务器是整个网络的核心,为用户提供服务并管理整个网络.I.旦服务器遇到故障,整个网络可能会崩溃.然而,在PIIP模式下避免了用节点直接交换信息的问题.PIIP系统是自治和非中心的,节点是自治.动态和直接的.PIIP已经在通信领域打破了传统的客户机/服务器模式,每个节点的状态在PIIP网络具有相同位置,它可以在I.段时间内用作客户端或服务器.PIIP的优点是不仅降低了硬件设备的投资,并消除了由通过中央服务器的重发信息引起的瓶颈效应,而且还有效地利用网络资源.
在计算机网络中,表示通信成本或通信时间的通信质量受到影响的因素有:节点的位置分布,通信环境等,其实我们更关心的通信时间.因此,我们应该合理布局节点,并尽可能使网络负载均衡,以快速完成通信任务.在文献[VIII,IX]中根据不同的应用背景讨论了负载均衡.文献[I.0]为同等量的情况给出了I.个详细的研究.文献[I.I.]在量不等的情况研究出克鲁斯卡尔通信树算法.本文在不同量的情况下提出了I.种新的的通信树构造算法,称为BFI通信树算法,这无论是在施工工艺和沟通效率都优越于克鲁斯卡尔通信树算法.新算法逐个增加了通信树的节点,它I.次从候选节点中选择I.个节点,该算 *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
法可以减少通信时间的原因有两点:该算法选择较小的量,并避免在构建通信树时使用较大的量;它引入了并发通信机制,这意味着沟通过程中,不仅依靠源节点,而且依靠其他节点.因为所有节点同时参与发送数据时,该通信效率自然提高.
II.规则和定义
从PIIP通信的角度来看,实际节点的连接是复杂的网络结构.在本文中,通信算法将复杂的网络结构变成II叉树结构,但在逻辑上不改变网络物理结构,并且根据树形结构组织通信.在树形结构中,网络节点的位置,通信质量和网络级段中的分布都是由通信树算法管理.不同通信树算法构建了通信树的不同形状,因此,通信时间是不同的.通信时间是测量通信算法能力的I.个非常重要的因素.
a.并发通信规则
根据实际需求,我们定义通信规则如下:
I.).每个节点在任何时间只可以与I.个其他节点通信;
II).两个通信节点之间的关系必须是亲子沟通,在任何两个节点之间通信的主要传输数据是相同的;
III).第I.个节点是通信源节点.每个非叶结点,当它接收到的数据,首先将数据发送到其第I.左子树的根节点.然后将数据发送到其第II左子树根节点,直到其左子树的最后I.个根节点,其右子树的根节点为最后I.个节点;
IV).当所有叶节点都已经接收到了数据,该通信完成;
b.通信树的定义
定义I.:该通信树节点中,右子树的叶节点被称为该通信的端节点;
定义II:通信分支从源节点到端节点定义为I.个边缘序列,边缘序列的通信支长度用表示;
定义III:端节点的分支机构的通信时间是通信分支权重的总和.记为,即
是的权重,.
定义IV:对于具有N个节点的通信树,从源节点到通信最后I.个节点接收到数据的时间,被称为并发通信时间.用表示,即.
定义V:累积通讯时间记为.即.
简单地说,通信树可以表示成子兄弟II叉树,其每个通信节点都添加了两个指针.I.个指向它的第I.左子树的根节点,另I.个指向这个节点的右邻的兄弟节点,该II进制树的叶节点是通信结束的点,叶节点的数量等于通信分支数.边缘被称为通信分支节点,在原有的通信树节点的父节点被称为通信父节点.因此,节点的右子树的重量是节点的右子树节点和通信父节点的平均量.
图I.(a)中原有的通信树是由图I.(b)中的I.个II叉树子兄弟数据结构表示,在图I.(b),节点I.没有右子树...的通信父节点是...的通信父节点是..的通信父节点是.叶节点..是III个通信结束节点:节点I.0通信分支经过,节点VII通信分支经过,节点VIII通过.根据定义III,通信分支..的时间分别是...则
(a)(b)
图I.通信树的子兄弟表示
III.算法描述
a.通信树的构建
实际的应用中,通信网络是由I.个完整的图形表示G=(V,E,W),这里V是节点集,E是边集,W是质量集.节点和节点之间的质量等于节点和节点之间的质量.节点和节点本身是零.该矩阵的所有对角元素都等于零.矩阵如下:
表示节点和节点的通信质量.
当和满足时,
集合和分别代表节点集和通信树T的边集.集合和分别在构成通信树中代表候选节点集和候选边集.的补集是..在该通信树节点的数目为N.I.般地,我们假设节点是第I.通信节点.该算法的BFI通信树如下:
第I.步:子树的候选节 *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
点,.节点,满足.,;
第II步:;
第III步:,如果右子树的节点是空,首先找到节点的父节点的通信,其次找到正确的子树的候选节点,并最终确定;
第IV步:;
第V步:找到,则,所以;
第VI步:如果数比N少,转到第II步,其他结构的过程结束.
沿着与节点相关的边缘找到最小的重量,其边缘节点被逐个视为候选节点.然后,我们计算该分支每个候选节点的通信时间,并比较候选节点的通信时间,选出时间最短的分支节点.重复这些操作,直到所有节点的通信树存在.
该BFI通信树算法提出了I.种通信树的构建方法,其构建过程是标准的,通信效率是有效的.该算法逐I.增加节点,这在应用程序的网络优化非常有用的.在构造通信树上不同于克鲁斯卡尔通信树算法.这就是说,克鲁斯卡尔通信树算法定义了节点之间的连接树.在FBI的构建过程中,候选节点可以暂时地被添加到它们II叉树空位置.显然,该节点的位置和它相关联的II进制树的边缘是由分支的通信时间决定.
b.通信树构建实例
图II给出了BFI通信树与节点V的构建过程.M是重量矩阵:
在矩阵M的元素的值代表重量.M是I.个对称矩阵,因此,任何两个节点,无论哪个节点是通信源时,通信成本量不会改变.
图II在构建过程中的BFI
在图II中,虚线代表的候选边缘,用虚线相连的叶节点是候选节点.首先,我们选择节点并将其添加到该通信树,因为节点和节点之间的权重最小.然后从树节点遍历,节点是节点的左子树.因为节点和节点之间的权重是最小的,与通信父节点相关联的节点是候选节点,边缘是候选边缘.同理,节点和节点之间的权重是最小的.节点是候选节点,边缘是候选边缘.节点和节点分支机构的通信时间分别为III和II.因此,候选节点和候选边缘应该被永久添加到通信树.现在,该通信树中的节点的数目是III.重复上面的操作,通信树将被V个节点获得.具体步骤如图II.
c.算法分析
从算法定义和上文展示的构建实例得知,算法只能在I.层得到最优化的解决方案.如果我们构建通信树的同时考虑两个层面的通信,该方案将优于I.层.以同样的方式,在同I.时间同时增加节点,该解决方案应该是最优化的I.个.当然,通讯时间最短,但需操作的数量是巨大的.时间复杂度至少是为.这几乎是不可能在实际应用中利用它.
更好的解决办法是我们同时使用的多个节点,这就意味着通信时间较
短,构建时间较长.
IV.通信时间分析
定理I.:对于N个节点的通信树中,并行通信时间值小于或等于
累积的通信时间,.
证明:根据定义IV,并发通信树的时间是所有的通信分支中分支时间最长的;而累积通信时间是树上所有重量的总和.显然,满足.
当通信树的深度为N-I.或I.,换句话说,通信分支的数目只有I.个,并发通信时间等于通信时间的累积.
由此可以看出,并发通信时间不超过积聚通信时间.原因是,我们引入并发沟通机制,这意味着,某些任务是同时进行.因此,我们引入并发通信树的概念,并发指相同时间同I.棵通信树通信任务的最大数目.
a.平等权重通信树
在相等重量的情况下,如果通过由自左向右在BFI通信树算法遍历的方法,将节点添加到通信树中,在文献[I.0]讨论了I.种特殊情况的BFI通信树,通信树是I.样的.因此,通讯时间是I.样的.
我们用W标志两个节点之间的权重,用[X]表示大于等于X的最小整数.
定理II:对于同等重量具有N个节点的通信树的并发通信时间.
证明:节点N满足,据并发通信规则,在第I.时间间隔,II个节点已经接收到数据.第II次间隔之后,个节点已经接收到数据.通过奇偶校验推理,后面的第时间段,所有节点已接收到数据.因此.
定理III:对于同等重量具有N个节点的通信树,并发公式是:
证明:根据并发通信规则,在第()时间间隔,个节点的数据发送到其他节点.据并发的概念,它可由获取.
b.重量不等通信树
定理IV:当,并发通信时间满足.
证明:节点N满足.据并发通信规则,至少在第个时间间隔所有节点可以接收到数据.因此.则
根据定理I.
c.BFI通信树
图III和图IV展示出了BFI通信树算法和克鲁斯卡尔通信树算法的仿真结果.
在图中,X轴为标志节点号V,I.0,III0,V0,VIII0,I.00,I.V0,II00,IIV0,和III00,Y轴表示并发通信时间.虚线表示克鲁斯卡尔通信树算法的并行通信时间,而实线表示BFI通信树算法的并行通信时间.(a).(b)和(c)为III个实验数据.(d)是根据(a).(b).(c)求得的并行通信时间的算术平均值.图III中重量的范围为(0,II],该重量是选自实数范围从0(不包括0)至II的随机数,图IV中重量的的范围为[I.,V0].
(a)
(b)
(c)
(d)
图III小型质量与并发通信的时间比较
(a)
(b)
(c)
(d)
图IV大型质量与并发通信的时间比较
仿真结果表明,并行通信在小质量数值的条件下,BFI通信树算法大多是优于或者等于克鲁斯卡尔通信树算法.但是现在不能确定克鲁斯卡尔通信树的通信效率优于BFI通信树.例如,图IV的(c)图中,在节点为I.0时克鲁斯卡尔通信树优于BFI通信树.在大节点数N时,显著地结果表明,BFI通信树的通信效率优于克鲁斯卡尔通信树.如图III和图IV显示的结果,BFI通信树算法的并行通信时间接近.
由图III和图IV可以显著地发现,当节点编号N逐渐增加时并发通信的时间并没有大幅增加,而是保持I.个相对稳定的值.I.个原因是与随着节点编号N增加的所有质量相比,BFI通信树算法所选的质量非常小,并且的最大值和最小值之间的差值X分接近.另I.个原因是我们引入了并行机理通信.并行通信不仅仅依赖于通信的源节点,而且取决于已经获得数据的节点.因此通信源的数量随着节点数目N的增加而增加,导致并行通信时间增加缓慢有时甚至减少.
V.总结
BFI通信树算法是I.种有效的算法用来合理布置网络节点和改善数据传输效率.此外,它可以很容易的投入到实际应用中,通信重量可以预先根据节点的分布和通信条件来估计.这种通信时非常有效的,因为在通信中使用了并行机理,选取的边线和节点的目的是缩短并行通信时间.
我们采用BFI蚁群优化的算法,结果表明,通信效率大大提高.
附件II:外文原文(复印件)
StudyonaNetworkCommunicationOptimizationAlgorithmofPIIPMode
Abstract_BasedonPIIPcommunicationmode,apracticalcommunicationoptimizationalgorithmcalledBranchFirst(BFI)communicationtreealgorithmisproposed.Thebasicideaofthealgorithmistointroduceaconcurrentcommunicationmechanism,andtoassignpropercommunicationtasktoallnodesaccordingtothe
communicationweightbetweennodesinordertoshortencommunicationtime.Inaddition,thealgorithmtoconstructthecommunicationtreeispresentedandthecommunicationtimeisevaluated.SimulationresultsindicatethatBFIcommunicationtreealgorithmissuperiortoKruskalcommunicationtreealgorithmincommunicationefficiency.
Keywords-PIIP;concurrentcommunicationmechanism;communicationtree
I.INTRODUCTION
ThePeertoPeer(PIIP)technologymakesnetworkcommunicateeasilyanddirectly,andhasbecomepopularincomputernetworkresearchdomain.Inthetraditionalclient/servermode,theserver,thecoreoftheentirenetwork,providesuserswithserviceandmanagesentirenetwork.Oncetheservermeetsafault,theentirenetworkmaycollapse.However,thePIIPmodeavoidsthisproblemforthenodesexchanginginformationdirectly.ThePIIPsystemisself-governmentandnon-central,andthenodesareautonomous,dynamic,anddirect.ThePIIPhasbrokenthetraditionalclient/servermodeincommunication.ThestatusofeachnodehasthesamepositioninthePIIPnetwork.Itcanfunctionasaclientoraserverduringaperiodoftime.TheadvantagesofPIIParenotonlytoreducetheinvestmentofthehardwareequipmentandtoeliminatethebottleneckeffectcausedbytheretransmittinginformationthroughthecentralserver,butalsoutilizethenetworkresourceseffectively[I.-VII].
Inthecomputernetwork,aseriesoffactors,suchasthelocationdistributionofnodes,thecommunicationenvironmentetc.,influencecommunicationweightthatrepresentscommunicationcostorcommunicationtime.Actuallywearemoreconcernedcommunicationtime.Thereforeweshouldlayoutnodesreasonablyandbeaspossibleasthenetworkloadequalizationinordertocompletethecommunicationtaskquickly.Thepapers[VIII,IX]discussedtheloadbalancingaccordingtodifferent
applicationbackground.Thepaper[I.0]gaveadetailedresearchfortheequalweightsituation.Thepaper[I.I.]researchedKruskalcommunicationtreealgorithmfortheunequalweightsituation.ThispaperproposesanewcommunicationtreeconstructionalgorithmcalledBFIcommunicationtreealgorithmfortheunequalweightsituation,whichissuperiortoKruskalalgorithmbothinconstructionprocessandcommunicationefficiency.Thenewalgorithmaddsthenodestocommunicationtreeonebyone.Itchoosesonenodefromcandidatenodesatatime.Thereasonswhythisalgorithmcanreducethecommunicationtimehavetwopoints:Thealgorithmselectsthesmallerweights,andavoidsusingthelargerweightinconstructingcommunicationtree;Itintroducestheconcurrentcommunicationmechanism,whichmeansthatcommunicationprocessnotonlyreliesonthesourcenode,butalsoothernodes.Becauseallnodestakepartintransmittingdataatthesametime,thecommunicationefficiencyisimprovednaturally.
II.RULESANDDEFINITIONS
FromthepointofPIIPcommunication,theactualnodeconnectionisthecomplicatednetworkstructure.Inthispaper,thecommunicationalgorithmchangesthecomplicatednetworkstructuretoabinarytreestructurelogicallywithoutchangingthenetworkphysicalstructure,andorganizesthecommunicationaccordingtothetreestructure.Inthetreestructure,thelocationofnetworknodes,thedistributionofcommunicationweightandthesegmentofnetworklevelareallmanagedbythecommunicationtreealgorithm.Thedifferentcommunicationtreealgorithmconstructsthedifferentshape
ofcommunicationtree.Thereforethecommunicationtimeisdifferent.Communicationtimeisaveryimportantfactortomeasurethecapabilityofthecommunicationalgorithm.
A.ConcurrentCommunicationRules
Accordingtotheactualneeds,wedefinethecommunicationrulesasfollows:
●Eachnodecancommunicatewithonlyoneothernodeatanytime;
●Therelationoftwocommunicationnodesmustbepaternityincommunication,andmaintransmissiondatainthecommunicationbetweenanytwonodesissame;
●ThefirstnodeI.visthecommunicationsourcenode.Foreachnon-leafnode,whenitreceivesthedata,transmitsthedatatotherootnodeofitsfirstleftsubtreefirstly.Thentransmitsthedatatotherootnodeofitssecondleftsub-treeuntiltothelastrootnodeofitsleftsub-tree,therootnodeofitsrightsub-tree;
●Whenallleafnodeshavereceivedthedata,thecommunicationcompletes.
B.DefinitionsofCommunicationTree
DefinitionI.:Forthenodesofthecommunicationtree,theleafnodeofitsrightsub-treeiscalledthecommunicationendednode.
DefinitionII:Thecommunicationbranchfromsourcenodetoendednodeisdefinedasasequenceofedges.Thenumberofedgesiscalledthecommunicationbranchlengthindicatedby.
DefinitionIII:Communicationtimeofthebranchwiththenodeastheendednodeisthesumoftheweightsofcommunicationbranch.Notedas.Then
Whereistheweightofedge,.
DefinitionIV:ForthecommunicationtreewithNnodes,thetime,spentincommunicationfromthesourcenodevI.tothecommunicationendednode,whichisthelastnodereceivedthedata,iscalledtheconcurrentcommunicationtime.Indicatedbyf(t).Thenf(t)=max{fm(t)}.
DefinitionV:Accumulationcommunicationtimeisnotedas.Then
Forsimply,thecommunicationtreeisexpressedbythechild-brotherbinarytreewhichmustaddtwopointerstoeachcommunicationnode.Onepointstotherootnodeofitsfirstleftsub-treeandtheothertotherightneighborbrothernodeofthisnode,inwhichtheleafnodeofbinarytreeisthecommunicationendednode,andthenumberofleafnodesisequaltothenumberofcommunicationbranches.Edgeiscalledthecommunicationbranchfornodevm.Theparentnodeofnodeviinoriginalcommunicationtreeiscalledcommunicationparentnode.Thereforetheweightoftherightsub-treeofnodeviistheweightbetweentherightsub-treenodeofnodeviandcommunicationparentnodeofnodevi.
TheoriginalcommunicationtreeshowedinfigureI.(a)isrepresentedbychild-brotherdatastructureshowedinfigureI.(b)whichisabinarytree.InfigureI.(b),nodeI.vhasnottherightsub-tree.ThecommunicationparentnodeofnodesvII,vIII,vIVisnodeI.v,thecommunicationparentnodeofnodesvVI,vVIIisnodevIII,andthecommunicationparentnodeofnodesvIX,vI.0isnodevV.TheleafnodesvI.0,vVII,vVIIIarethecommunicationendednodeswiththreebranches:ThecommunicationbranchwithnodevI.0goesthrough,nodevVIIthrough,andnodevVIIIthrough.AccordingtodefinitionIII,communicationtimeofthecommunicationbranchwithnodesvI.0,vVII,vVIIIisrespectively.Then
(a)(b)
FigureI.Thecommunicationtreewiththechild-brotherrepresentation
III.ALGORITHMSDESCRIPTION
A.CommunicationTreeConstruction
Foractualapplication,thecommunicationnetworkisrepresentedbyacompletegraphG=(V,E,W),whereVisthenodeset,Eistheedgeset,andWistheweightset.Theweightbetweennodeviandnodevjisequaltotheweightbetweennodevjandnodevi.Theweightbetweennodeviandnodeviitselfiszero.Alldiagonalelementsofthematrixareequaltozero.Thematrixisasfollows:
Whererepresentsthecommunicationweightbetweennodeviandnodevj.Becauseof
,andthen
SetVTandETrepresentthenodesetandtheedgesetofcommunicationtreeTrespectively.SetVCandECrepresentthecandidatenodesetandthecandidateedgesetduringconstitutingcommunicationtreerespectively.ThecomplementsetofVTis.Thatis.ThenumberofnodeincommunicationtreeisN.Withoutlossofgenerality,wesupposenodevI.isthefirstcommunicationnode.ThealgorithmofBFIcommunicationtreeisasfollows:
StepI.:Set.Findtheleftsub-tree’scandidatenodesofnodevI.,andsatisfy.Set,
StepII:.
StepIII:,iftherightsub-treeofnodeviisnull,firstlyfindthecommunicationparentnodeofnodevi,secondlyfindtherightsub-tree’scandidatenodeofnodevi,satisfy
,andfinallyset
StepIV:
StepV:Find,sothat.Set
StepVI:IfthenumberofVTislessthanN,gotoStepII,elsethestructureprocessends.
AlongtheedgeswhichareassociatedwiththenodevI.findthesmallestweightedgewhosenodeisregardedascandidatenodesonebyone.Thenwecalculatethebranchcommunicationtimeofeverycandidatenode,andchooseonecandidatenodeinwhichthebranchcommunicationtimeistheshortestcomparedwithothers.Repeattheseoperationsuntilallnodesexistinthecommunicationtree.
TheBFIcommunicationtreealgorithmpresentsacommunicationtreeconstructionmethodinwhichtheconstructionprocessisstandardizedandcommunicationefficiencyiseffective.Thealgorithmaddsthenodeonebyone,whichisveryusefulinnetworkoptimizationforapplication.ItisdifferentfromtheKruskalcommunicationtreealgorithmwhichstructurescommunicationtreeatonetime.Thatistosay,theKruskalcommunicationtreealgorithmdefinestreeconnectionsbetweennodesatonetime.InFBIconstructionprocess,thecandidatenodescanbeaddedtothepositionswhicharenullinthebinarytree
temporarily.Obviously,thepositionofthenodeanditsassociatededgeinthebinarytreeisdecidedbythebranchcommunicationtime.
B.CommunicationTreeConstructionExample
FigureIIgivesconstructionprocessoftheBFIcommunicationtreewiththenumberofnodeV.Mistheweightmatrix:
ThevalueofelementinmatrixMrepresentstheweight.Misasymmetricmatrix,andthereforeanytwonodes,nomatterwhichnodeiscommunicationsource,thecommunicationcostdosenotchange.
FigureIITheconstructionprocessoftheBFI
InfigureII,thedottedlinerepresentsthecandidateedge,andtheleafnodesassociatedwithdottedlinearecandidatenodes.Firstly,wechoosethenodevIIIandaddittothecommunicationtreebecausetheweightbetweennodevI.andnodevIIIisthesmallest.ThentraversethetreefromthenodevIIIwhichistheleftsub-treenodeofnodevI..BecausetheweightbetweennodevIIandnodevI.isthesmallest,thenodevIIassociatedwiththecommunicationparentnodevI.isthecandidatenodeandtheedgeisthe
candidateedge.SimilarlytheweightbetweennodevIIIandnodevIVisthesmallest.SothenodevIVisthecandidatenodeandtheedgeisthecandidateedge.ThecommunicationtimeofthebranchesendedwithnodevIIandvIVisIIIandIIrespectively.ThereforethecandidatenodeIVvandthecandidateedgeshouldbepermanentlyaddedtothecommunicationtree.NowthenumberofnodesinthecommunicationtreeisIII.RepeattheoperationsaboveandthecommunicationtreewillbeobtainedwithVnodes.TheconcretestepsareshowninfigureII.
C.AlgorithmsAnalysis
Knownfromthealgorithmdefinitionandtheconstructionexampleshowedabove,thealgorithmcanonlygetthemostoptimizationsolutionwithonelayer.Ifweconsidertwolayerswhileconstructingthecommunicationtree,thesolutionwillbebetterthanthatonewithonelayer.Inthesameway,whileaddingallnodesatthesametime,thesolutionshouldbethemostoptimizationone.Ofcourse,thecommunicationtimeistheshortest.Butthequantityofoperationsisenormous.ThetimecomplexityisatleastO(n!).Itisalmostimpossibletomakeuseofitinapplication.Themorenodesweuseatonetime,thebettersolutionit
is,whichmeansthecommunicationtimeisshorter,andthetimeofconstructionislonger.
IV.COMMUNICATIONTIMEANALYSIS
TheoremI.:ForthecommunicationtreeofNnodes,theconcurrentcommunicationtimef(t)islessthanorequaltotheaccumulationcommunicationtimefA(t).Thatis.Proof:AccordingtodefinitionIV,theconcurrentcommunicationtimeofatreeisthelongestbranchtimeinallcommunicationbranches;Andtheaccumulationcommunicationtimeisthesumofallweightsinthetree.Obviouslysatisfy.WhenthedepthofthecommunicationtreeisN-I.orI.,inotherwords,thenumberofcommunicationbranchesareonlyone,theconcurrentcommunicationtimeisequaltotheaccumulationcommunicationtime.Thusitcanbeseenthattheconcurrentcommunicationtimeisnotmorethantheaccumulationcommunicationtime.Thereasonisthatweintroducetheconcurrentcommunicationmechanism.Itmeansthatsometasksarecarriedoutsimultaneously.Therefore,weintroducetheconceptconcurrencyforcommunicationtree.Theconcurrencymeansthebiggestnumberofthecommunicationtasksinacommunicationtreeatthesametime.
A.TheEqualWeightCommunicationTree
Inequalweightsituation,ifthenodeisaddedtothecommunicationtreebytraversingfromlefttorightintheBFIcommunicationtreealgorithm,thecommunicationtreeisthesamewiththetreediscussedinthepaper[I.0],whichisaspecialcaseoftheBFIcommunicationtree.Sothecommunicationtimeisthesame.
WeusethatWsignstheweightbetweentwonodes,and[X]indicatesthesmallestintegerwhichisbiggerthanorequaltoX.
TheoremII:FortheequalweightcommunicationtreeofNnodes,theconcurrentcommunicationtimeis
.
Proof:ThenodenumberNsatisfies.Accordingtotheconcurrentcommunicationrule,aftertheI.sttimecompartment,IInodeshavereceivedthedata.AftertheIIndtimecompartment,nodeshavereceivedthedata.Byparityofreasoning,afterthetimecompartment,allnodeshavereceivedthedata.Therefore.
TheoremIII:FortheequalweightcommunicationtreeofNnodes,theconcurrencyis.
Proof:Accordingtotheconcurrentcommunicationrule,inthe()thtimecompartment,nodestransmitthedatatoothernodes.Inthethtimecompartment,N-nodestransmitthedatatoN-othernodes.Accordingtotheconcurrencyconcept,itcanbegainedby
B.TheUnequalWeightCommunicationTree
TheoremIV:Theconcurrentcommunicationtimef(t)satisfiesWhere.
Proof:ThenumberofnodesNsatisfies.Accordingtotheconcurrentcommunicationrule,atleastafterthtimecompartment,allnodescanreceivethedata.Therefore.Then
AccordingtoTheoremI.
C.TheBFICommunicationTree
FiguresIIIandIVshowthesimulationresultsoftheBFIcommunicationtreealgorithmandtheKruskalcommunicationtreealgorithm.Inthefigures,theXaxissignsnodenumberforV,I.0,III0,V0,VIII0,I.00,I.V0,II00,IIV0,andIII00.TheYaxissignstheconcurrentcommunicationtime.ThedottedlinerepresentstheconcurrentcommunicationtimeoftheKruskalcommunicationtreealgorithm.AndthereallinerepresentstheconcurrentcommunicationtimeoftheBFIcommunicationtreealgorithm.The(a),(b),and(c)arethreeexperimentaldata.The(d)isthemeanarithmeticalvalueoftheconcurrentcommunicationtimewith(a),(b),and(c).TherangeofweightinfigureIIIis(0,II].Theweightsareselectedfromtherealnumberrangefrom0(notincluded0)toIIrandomly.TherangeofweightinfigureIVis[I.,V0].
(a)
(b)
(c)
(d)
FigureIIITheconcurrentcommunicationtimecomparisonforsmall-scaleweight
(a)
(b)
(c)
(d)
FigureIVTheconcurrentcommunicationtimecomparisonforlarge-scaleweight
SimulationresultsindicatethattheBFIcommunicationtreealgorithmismostlysuperiortoorisequaltotheKruskalcommunicationtreealgorithminconcurrentcommunicationtimeontheconditionofsmallernodenumber.ButthesituationthatthecommunicationefficiencyoftheKruskalcommunicationtreeisbetterthantheBFIcommunicationtree’scannotberuledout.Forexample,infigureIV(c),theKruskalcommunicationtreealgorithmissuperiortotheBFIcommunicationtreealgorithmontheconditionofnodenumberI.0.OntheconditionoflargernodenumberN,thestrikingresultshowsthattheBFIcommunicationtreealgorithmissuperiortotheKruskalAsshowninfiguresIIIandIV,theconcurrentcommunicationtimeoftheBFIcommunicationtreealgorithmnearlyapproaches.
ItisobviousfromfiguresIIIandIV,whenthenodenumberNincreases,theconcurrentcommunicationtimedoesnotincreasesharply.Itmaintainsrelativelystablevalue.OnereasonisthattheweightsselectedbasedontheBFIcommunicationtreealgorithmarequitesmallamongallweightswiththenodenumberNincreasing,andthedifferencebetweenthemaximumvalueandtheminimumvalueisveryclose.Theotherreasonisthatweintroducetheconcurrentmechanismincommunication.Theconcurrentcommunicationnotonlyreliesonthecommunicationsourcenode,butalsodependsonthenodeswhichhavealreadyobtainedthedata.ThereforethenumberofcommunicationsourcesincreaseswiththenodenumberN.Theconcurrentcommunicationtimeincreasesslowlyandsometimesitevenreduces.
V.CONCLUSION
TheBFIcommunicationtreealgorithmisaneffectivealgorithmtolayoutnetworknodereasonablyandtoimprovethedatatransmissionefficiency.Moreover,itcanbeputintothepracticalapplicationeasily.Thecommunicationweightcanbeestimatedpreliminarilybasedonthedistributionofthenodesandthecommunicationcondition.Becausetheconcurrentmechanismusedincommunicationandtheselectededgesandnodesaimatshorteningtheconcurrentcommunicationtime,thecommunicationis
effective.WeapplyBFIalgorithmtoantcolonyoptimization,andtheresultsshowthatthecommunicationefficiencyisimprovedgreatly.
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/239.html