Distributed Weight Balancing in Directed Topologies

This doctoral thesis concerns novel distributed algorithms for weight balancing over directed (communication) topologies. A directed topology (digraph) with nonnegative (or positive) weights assigned on each edge is weight-balanced if, for each node,…

Authors: Apostolos I. Rikos

Distributed Weight Balancing in Directed Topologies
UNIVERSITY OF CYPR US DEP AR TMENT OF ELECTRICAL AND COMPUTER ENGINEERING DISTRIBUTED WEIGHT BALANCING IN DIRECTED TOPOLOGIES APOSTOLOS I. RIK OS A Dissertation Submitted to the Universit y of Cyprus in Partial F ulfillmen t of the Requiremen ts for the Degree of Do ctor of Philosoph y MA Y 2018 V ALID A TION P A GE Do ctoral Candidate: Ap ostolos I. Rik os Do ctoral Thesis Title: Distributed W eigh t Balancing in Directed T op ologies The present Do ctoral Dissertation was submitted in partial fulfillment of the require- men ts for the Degree of Do ctor of Philosophy at the Department of Electrical and Computer Engineering and w as approv ed on the 23 rd of April, 2018 by the mem b ers of the Examination Committee . Examination Committee: Researc h Sup ervisor: (Dr. Christoforos N. Hadjicostis, Professor) Committee Mem b er: (Dr. Georgios Ellinas, Professor) Committee Mem b er: (Dr. Ioannis Krikidis, Asso ciate Professor) Committee Mem b er: (Dr. Themistoklis Charalam b ous, Assistant Professor) Committee Mem b er: (Dr. Gabriele Oliv a, Assistant Professor) DECLARA TION OF DOCTORAL CANDID A TE The presen t do ctoral dissertation was submitted in partial fulfillmen t of the requiremen ts for the degree of Do ctor of Philosoph y of the Univ ersit y of Cyprus. It is a pro duct of original w ork of my own, unless otherwise men tioned through references, notes, or any other statements. ..................................................................[F ull Name of Do ctoral Candidate] ..................................................................[Signature] ABSTRA CT A distributed system or netw ork can b e viewed as a set of subsystems that can share information via in terconnection links, whic h form a generally directed comm unication top ology . Distributed systems prov e to b e of vital imp ortance for the effectiveness of performing v arious tasks in the areas of co op erativ e con trol, distributed co ordina- tion, and con trol of m ulticomp onent systems. This do ctoral thesis concerns nov el dis- tributed algorithms for weigh t balancing ov er directed (communication) top ologies. A directed top ology (digraph) with nonnegative (or p ositiv e) w eights assigned on eac h edge is w eight-balanced if, for each no de, the sum of the w eigh ts of in-coming edges equals the sum of the w eights of out-going edges. The nov el algorithms in tro duced in this thesis can facilitate the developmen t of strategies for generating weigh t balanced digraphs, in a distributed manner, and find n umerous applications in co ordination and control of m ulti-comp onen t systems. In the first part of this thesis, w e address the problem of in teger w eight balancing in a multi-component system. W e in tro duce a no vel distributed algorithm that op erates o ver a static top ology and solves the weigh t balancing problem when the weigh ts are restricted to b e nonnegativ e integers. The prop osed algorithm is shown to conv erge to a w eight balanced digraph after a finite num b er of iterations that we explicitly b ound. This algorithm can also b e view ed as a distributed metho d for obtaining a set of integer flo ws that balance a flo w netw ork. In the second part of the thesis, w e inv estigate the problem of integer weigh t balancing in a multi-component system under a directed (static) in terconnection top ology in the presence of b ounded or unbounded dela ys (pack et drops) in the communication links. Sp ecifically , we present a nov el distributed algorithm which solves the in teger w eight balancing problem in the presence of arbitrary (time-v arying and inhomogeneous) de- la ys that migh t affect the transmission at a particular link at a particular time. Then, w e presen t an ev ent-based version of the proposed protocol in whic h eac h no de au- tonomously decides when communication and con trol updates should o ccur. In the presence of pac k et drops o ver the comm unication links, the algorithm can b e mo dified to conv erge to a set of w eights that form a balanced graph after a finite num b er of iterations (with probability one). In all the ab o ve cases, the resulting w eigh t balanced digraph is shown to b e unique and indep enden t on how dela ys or pack et drops manifest themselv es during the execution of the algorithm. In the third part of this thesis, we in vestigate the problem of in teger weigh t balancing in a m ulti-comp onen t system under a static directed in terconnection topology in the presence of low er and upp er limit constrain ts on the edge w eights. W e present a no vel distributed iv algorithm for obtaining admissible and balanced integer w eigh ts for the case when there are low er and upp er weigh t constrain ts on the communication links. Compared with the distributed algorithms mentioned earlier, the additional constrain t here is that each edge w eigh t has to lie within a given interv al, whereas communication exchanges (but not necessarily the assignment of weigh ts) b et ween neigh b oring no des are assumed to b e bidirectional. In the fourth part of this thesis we inv estigate the problem of integer weigh t balancing in a multi-component system ov er a directed (static) in terconnection topology , under lo wer and upp er limit constraints on the edge weigh ts, in the prese nce of b ounded or un b ounded delays (pack et drops) in the comm unication links. Sp ecifically , we present a no vel distributed algorithm whic h solves the integer weigh t balancing problem under lo wer and upp er w eight constraints ov er the communication links for the case where arbitrary (time-v arying and inhomogeneous) time dela ys affect the transmission at a particular link at a particular time. F urthermore, we presen t an even t-based version of the prop osed proto col in which each no de autonomously decides when communication and control up dates should o ccur so that the resulting netw ork executions still result in a weigh t balanced digraph and all no des ev en tually stop p erforming transmissions. Then, we extend the applicability of the prop osed algorithm to the case where p ossible pac ket drops affect the comm unication links. A cknow le dgements Firstly , I would lik e to express m y sincere gratitude to m y advisor Professor Christoforos N. Hadjicostis for the contin uous supp ort of m y Ph.D. study and related researc h, for his patience, motiv ation, and immense knowledge. His guidance help ed me in while researc hing and writing this thesis. I could not ha v e imagined ha ving a b etter advisor and ment or for my Ph.D. study . Besides m y advisor, I w ould lik e to thank my thesis committee, Professor Georgios Ellinas, Professor Ioannis Krikidis, Professor Themistoklis Charalam b ous, and Profes- sor Gabriele Oliv a, for their insigh tful comments and encouragemen t, but also for the suggestions and questions, which prompted me to widen m y research from v arious p er- sp ectiv es. My sincere thanks also go es to Professor Andrea Gasparri for the excellen t collab oration w e had. I would also like to thank my fello w Ph.D. students, Christoforos Keroglou and Nicolas Manitara, for the stimulating discussions, the sleepless nigh ts we w ere working together, and all the fun we hav e had during the last y ears. Sp ecial thanks go es to my friends in Cyprus, Greece and others scattered around the w orld. Thank you for your though ts, well-wishes, phone calls, e-mails, texts, visits, advice, and b eing there whenever I needed a friend. Last but not the least, I w ould like to thank my family: my parents, Ioannis Rikos and T amara Papak onstantinou, and my brother, Filipp os Rikos. W ords cannot express ho w grateful I am for all of the sacrifices that y ouve made on my b ehalf, for supp orting me spiritually throughout my Ph.D. studies and, in general, in my life. Con ten ts V alidation P age i Declaration of Do ctoral Candidate ii Abstract in English iii Ac kno wledgemen ts v List of Figures ix 1 In tro duction 1 1.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Motiv ation and Applications . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Main Contribu tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Preliminaries, Problem Statemen t and Cen tralized Approac h 8 2.1 Graph-Theoretic Notions . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Problem Statement for W eigh t Balancing . . . . . . . . . . . . . . . . . . 9 2.3 Cen tralized Algorithm for W eigh t Balancing . . . . . . . . . . . . . . . . . 10 2.3.1 F ormal Description of Cen tralized Algorithm . . . . . . . . . . . . 10 2.3.2 Illustrativ e Example of Centralized Algorithm . . . . . . . . . . . . 11 2.3.3 Bound on Number of Iterations of Centralized Algorithm . . . . . 13 2.3.4 Sim ulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 Distributed W eigh t Balancing 16 3.1 Distributed Algorithm for W eigh t Balancing . . . . . . . . . . . . . . . . . 16 3.1.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 17 3.1.2 Illustrativ e Example of Distributed Algorithm . . . . . . . . . . . . 18 3.2 Execution Time Analysis of Distributed Algorithm . . . . . . . . . . . . . 21 3.3 Sim ulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4 W eigh t Balancing o ver Unreliable Comm unication 30 4.1 Mo deling Time Delays and Pac ket Drops . . . . . . . . . . . . . . . . . . 30 vi Contents vii 4.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.3 Distributed Algorithm for W eigh t Balancing in the Presence of Time Dela ys . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 33 4.3.2 Illustrativ e Example of Distributed Algorithm . . . . . . . . . . . . 35 4.3.3 Execution Time Analysis of Distributed Algorithm . . . . . . . . . 37 4.4 Extension to Even t-T riggered Op eration . . . . . . . . . . . . . . . . . . . 40 4.4.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 41 4.4.2 Execution Time Analysis of Distributed Algorithm . . . . . . . . . 41 4.5 Distributed Algorithm for W eigh t Balancing in the Presence of Pac k et Dropping Links . . . . . . . . . . . . . . . . . . 43 4.5.1 Sim ulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 5 W eigh t Balancing under Link Capacit y Constrain ts 49 5.1 Graph-Theoretic Notions and Problem Statement . . . . . . . . . . . . . . 49 5.1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5.2 In teger Circulation Conditions . . . . . . . . . . . . . . . . . . . . . . . . 51 5.3 Distributed Algorithm for W eigh t Balancing under Link Capacity Constraints . . . . . . . . . . . . . . . . . . . . . . . 51 5.3.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 53 5.3.2 Illustrativ e Example of Distributed Algorithm . . . . . . . . . . . . 56 5.3.3 Pro of of Algorithm Completion . . . . . . . . . . . . . . . . . . . . 57 5.3.4 Sim ulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6 W eigh t Balancing under Link Capacit y Constrain ts o v er Unreliable Comm unication 67 6.1 Mo deling Time Delays and Pac ket Drops . . . . . . . . . . . . . . . . . . 68 6.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.3 Distributed Algorithm for W eigh t Balancing in the Presence of Time Dela ys . . . . . . . . . . . . . . . . . . . . . . . . 69 6.3.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 71 6.3.2 Pro of of Algorithm Completion . . . . . . . . . . . . . . . . . . . . 73 6.4 Extension to Even t-T riggered Op eration . . . . . . . . . . . . . . . . . . . 76 6.4.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 76 6.4.2 Pro of of Algorithm Completion . . . . . . . . . . . . . . . . . . . . 76 6.5 Distributed Algorithm for W eigh t Balancing in the Presence of Pac k et Dropping Links . . . . . . . . . . . . . . . . . . 78 6.5.1 F ormal Description of Distributed Algorithm . . . . . . . . . . . . 80 6.5.2 Pro of of Algorithm Completion . . . . . . . . . . . . . . . . . . . . 81 6.6 Sim ulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 7 Conclusions and F uture Directions 89 Contents viii 7.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.2 F uture Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Bibliograph y 93 List of Figures 2.1 Example of weigh t balanced digraph. . . . . . . . . . . . . . . . . . . . . . 10 2.2 W eighted digraph with initial w eights and initial imbalance for eac h no de. 12 2.3 Selection of a path b et w een a no de with p ositive imbalance and a no de with negativ e imbalance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Calculation of imbalance for each no de. . . . . . . . . . . . . . . . . . . . 12 2.5 Selection of a path b et w een a no de with p ositive imbalance and a no de with negativ e imbalance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.6 Resulting weigh t balanced digraph. . . . . . . . . . . . . . . . . . . . . . . 13 2.7 T otal im balance plotted against the n um b er of iterations for a random digraph of 20 no des when the prop osed centralized algorithm is executed. 15 2.8 T otal im balance plotted against the n um b er of iterations for a random digraph of 50 no des when the prop osed centralized algorithm is executed. 15 3.1 W eighted digraph with initial w eights and initial imbalance for eac h no de. 19 3.2 Distribution of w eights to outgoing edges by no des with p ositiv e imbalance. 19 3.3 W eight balanced digraph after 17 iterations. . . . . . . . . . . . . . . . . . 20 3.4 W eighted digraph with initial w eights and initial imbalances. . . . . . . . 24 3.5 W eight balanced digraph after 25 iterations. . . . . . . . . . . . . . . . . . 25 3.6 T ransfer of p ositive imbalance from no de v 1 on the left to no de v n on the righ t. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.7 Comparison b etw een Algorithm 2 , the w eight balancing algorithm pro- p osed in [ 47 ] and the im balance-correcting algorithm [ 24 ]. T op figur e: Av erage total imbalance plotted against the n umber of iterations for 1000 random digraphs of 20 no des. Bottom figur e: Av erage total im balance plotted against the num b er of iterations for 1000 random digraphs of 20 no des. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.8 Comparison b etw een Algorithm 2 , the w eight balancing algorithm pro- p osed in [ 47 ] and the im balance-correcting algorithm [ 24 ]. T op figur e: Av erage total imbalance plotted against the n umber of iterations for 1000 random digraphs of 50 no des. Bottom figur e: Av erage total im balance plotted against the num b er of iterations for 1000 random digraphs of 50 no des. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.1 W eighted digraph with initial weigh ts and initial im balances for each no de. 36 4.2 Distribution of imbalance from p ositively imbalanced no des. . . . . . . . . 36 4.3 Distribution of delay ed imbalance from p ositiv ely imbalanced no des. . . . 37 4.4 Final weigh t balanced digraph. . . . . . . . . . . . . . . . . . . . . . . . . 38 ix List of Figur es x 4.5 T otal dela y ed im balance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid line), 0 < τ lj < τ where τ = 10 (dashed line) and in the case where τ lj = τ = 10 (dashed-dotted line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.6 T otal dela y ed im balance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid line), 0 < τ lj < τ where τ = 10 (dashed line) and in the case where τ lj = τ = 10 (dashed-dotted line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.7 T otal dela y ed im balance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.8 Av erage total dela yed imbalance plotted against the n umber of iterations in logarithmic scale for 1000 random digraphs of 20 no des eac h in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). . . . . . . . . . . . . . 47 4.9 Av erage total dela yed imbalance plotted against the n umber of iterations in logarithmic scale for 1000 random digraphs of 50 no des eac h in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). . . . . . . . . . . . . . 48 5.1 W eighted digraph with initial weigh ts and initial im balances for each no de. 56 5.2 Distribution of imbalance from p ositively imbalanced no des. . . . . . . . . 57 5.3 Calculation of edge weigh ts from p ositiv ely imbalanced no des. . . . . . . . 57 5.4 Final weigh t balanced digraph. . . . . . . . . . . . . . . . . . . . . . . . . 58 5.5 Example of digraph where the In teger Circulation Conditions in Sec- tion 5.2 do not hold for the dashed edges. . . . . . . . . . . . . . . . . . . 62 5.6 Execution of Algorithm 5 for the case when the integer circulation condi- tions do not hold for a random graph of 20 no des. T op figur e: Absolute im balance ε [ k ] plotted against num b er of iterations. Bottom figur e: No de w eight imbalances x j [ k ] plotted against num b er of iterations. . . . . . . . 64 5.7 Execution of Algorithm 5 for the case when the integer circulation con- ditions hold for a random graph of 20 no des. T op figur e: Absolute im- balance ε [ k ] plotted against num b er of iterations. Bottom figur e: No de w eight imbalances x j [ k ] plotted against num b er of iterations. . . . . . . . 65 5.8 T otal (absolute) im balance ε [ k ] plotted against the num b er of iterations for the distributed algorithm (av eraged ov er 100 graphs of 20 no des eac h) in the case where the in teger circulation conditions hold. . . . . . . . . . . 66 5.9 T otal (absolute) im balance ε [ k ] plotted against the num b er of iterations for the distributed algorithm (av eraged ov er 100 graphs of 50 no des eac h) in the case where the in teger circulation conditions hold. . . . . . . . . . . 66 6.1 Digraph where no des exchange their desirable w eights in the presence of time delays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.2 Digraph where no des exchange their desirable w eights. . . . . . . . . . . . 79 List of Figur es xi 6.3 Execution of Algorithm 6 for the case when the integer circulation con- ditions hold for a random graph of 20 nodes with transmission delays 0 < τ lj < τ where τ = 10. T op figur e: T otal (absolute) im balance ε [ k ] (blue line) and p erceived total imbalance ε ( p ) [ k ] (red line) plotted against n umber of iterations. Bottom figur e: No de w eigh t imbalances x j [ k ] plot- ted against num b er of iterations. . . . . . . . . . . . . . . . . . . . . . . . 86 6.4 Execution of Algorithm 7 for the case when the integer circulation con- ditions hold for a random graph of 20 nodes with transmission delays 0 < τ lj < τ where τ = 10. T op figur e: T otal (absolute) im balance ε [ k ] (blue line) and p erceived total imbalance ε ( p ) [ k ] (red line) plotted against n umber of iterations. Bottom figur e: No de w eigh t imbalances x j [ k ] plot- ted against num b er of iterations. . . . . . . . . . . . . . . . . . . . . . . . 87 6.5 Execution of Algorithm 8 for the case when the integer circulation condi- tions hold for a random graph of 20 no des with pack et drop probability q j i = 0 . 8. T op figur e: T otal (absolute) imbalance ε [ k ] (blue line) and P erceived T otal Imbalance ε ( p ) [ k ] (red line) plotted against n umber of it- erations. Bottom figur e: No de w eight imbalances x j [ k ] plotted against n umber of iterations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Chapter 1 In tro duction The successful op eration of a distributed system or net work dep ends on a num b er of basic proto cols to circulate and pro cess data b etw een its comp onents. In distributed systems whose functionality do es not simply consist of transmitting data, but also inv olves con- trol and decision tasks (e.g., workload balancing across av ailable computing resources or leader election), traditional routing proto cols ma y b e inadequate or insufficien t. F or this reason, the design of algorithms and proto cols for distributed computation has attracted significan t atten tion b y the communication, control and computer science communities o ver the past few decades (e.g., [ 1 – 6 ], and references therein). A distributed system or netw ork consists of a set of comp onents (no des) that can share information with neighboring comp onen ts via connection links (edges), forming a gener- ally directed in terconnection top ology (digraph). The digraphs that describ e the com- m unication and/or physical top ology t ypically prov e to b e of vital imp ortance for the effectiv eness of distributed strategies in p erforming v arious tasks [ 2 , 7 , 8 ]. In many ap- plications, the assignment of w eights to the edges of this graph in a wa y that forms a balanced digraph (i.e., for each no de, the sum of the w eights on its incoming edges equals the sum of the weigh ts on its outgoing edges) is key to enabling the desired functional- it y . F or example, applications where balance pla ys a k ey role include net work adaptation strategies based on the use of con tin uous second order mo dels [ 9 ], and distributed adap- tiv e strategies to tune the coupling weigh ts of a netw ork based on lo cal information of no de dynamics [ 10 ]. W eight balancing is also closely related to w eights that form a doubly sto chastic digraph, which find applications in m ulti-comp onent systems (suc h as sensor netw orks) where one is interested in distributively a v eraging measurements at eac h comp onent. Doubly sto chastic digraphs play a k ey role in netw orked con trol prob- lems, including distributed av eraging [ 8 , 11 – 13 ] and distributed con vex optimization [ 14 – 16 ]. In particular, weigh t-balance is imp ortan t in the well-studied case where a set of comp onen ts (no des) w ant to distributiv ely av erage their individual measuremen ts (in this scenario, eac h no de pro vides a local measuremen t of global quantit y). One approach 1 Intr o duction 2 to wards av erage consensus is to follo w a linear iteration, where (instead of routing the v alue of each no de to all other no des) each no de rep eatedly up dates its v alue to b e a w eighted linear combination of its o wn v alue and the v alues of its neighbouring no des. The choice of the weigh ts has a relev ant effect on ho w the in terconnection b ehav es and whether av erage consensus is reached. F or example, it has b een shown that nonnegative w eights that form a primitiv e doubly sto chastic matrix (and thus also balance the graph) is a sufficient condition for asymptotic a verage consensus [ 17 , 18 ]. Because of the n umerous algorithms a v ailable in the literature that use of weigh t as- signmen ts that are balanced or even form a doubly sto c hastic matrix (p ossibly with self w eights for eac h no de), an imp ortan t researc h question is to characterize when a digraph can be given such edge w eight assignmen ts. In this thesis we fo cus on nonzero weigh t assignmen ts. In addition to its theoretical interest, the consideration of nonzero w eigh t assignmen ts is also relev an t from a practical persp ective, as the use of the maxim um n umber of edges generally leads to higher algebraic connectivity [ 19 ], which in turn af- fects p ositively the rate of conv ergence [ 20 – 23 ] of the algorithms that are to b e executed o ver doubly sto chastic digraphs. Once a characterization of weigh t-balanceable (doubly sto chasticable) digraphs is a v ail- able, the next natural question is the design of distributed strategies that allow the comp onen ts to find the appropriate weigh t assignments so that the ov erall interaction digraph is w eight balanced or doubly stochastic. Therefore, we presen t nov el distributed con trol algorithms to address these challenges. 1.1 Literature Review Previous wor k on weigh t balancing consists of the follo wing:  In [ 18 , 24 ] the authors in tro duce a sync hronized distributed strategy on a directed comm unication net work in which each agent prov ably balances its incoming and outgoing edge weigh ts in finite time. In this algorithm, each individual agen t can send a message to one of its out-neigh b ours and receive a message from its in- neigh b ours. F urthermore, as explained in [ 18 , 24 ], once w eight-balance is achiev ed, the no des can easily obtain weigh ts that form a doubly sto chastic matrix in a dis- tributed manner (in order to use them, for instance, to asymptotically reac h av- erage consensus). [The prop osed algorithm ac hieves this weigh t assignmen t under the assumption that individual agen ts can add self-w eights to the structure of the digraph.]  In [ 25 ] the authors in tro duce a distributed algorithm in which each agent is as- sumed to b e able to distinguish the information coming from the other agen ts Intr o duction 3 according to the identifier of the sender. Also, a global stopping time is set at whic h the iterations stop to p erform weigh t-balancing.  In [ 26 ] the authors in tro duce a synchronized distributed strategy on a directed comm unication net work in which each agent prov ably balances its incoming and outgoing edge weigh ts in an asymptotic fashion. In this algorithm eac h individual agen t can send a message to all of its out-neigh b ours and receive messages from all its in-neigh b ours. The authors show that the prop osed distributed algorithm guaran tees geometric conv ergence rate. The simplicity of the algorithm has allow ed its extension to asynchronous op eration, whic h is a v aluable contribution giv en that in reality there are inevitable delays in the exchange of information) as well as its con tinuous-time analog, that guaran tees a verage consensus without the need to obtain a doubly sto chastic matrix.  In [ 27 ] the authors in tro duce a synchronized distributed strategy on a directed comm unication net work in which each agent prov ably balances its incoming and outgoing edge weigh ts in an asymptotic fashion. In this algorithm, each individual agen t is assumed to b e able to send a messages to all of its out-neigh b ours and receiv e messages from all its in-neighbours. Sp ecifically , eac h agen t calculates a fraction λ whic h has as numerator the sum of incoming weigh ts and as denominator the sum of outgoing weigh ts, and then changes the weigh ts of its incoming and outgoing links accordingly . 1.2 Motiv ation and Applications The study of weigh t-balanced graphs/matrices has prov en to play an imp ortant role in the analysis and conv ergence of distributed co ordination algorithms since they find n umerous applications in distributed adaptiv e con trol or synchronization in complex net works. The main applications of weigh t-balanced graphs/matrices are sho wn b elow: Balancing of Ph ysical Quantities: In [ 17 ] a traffic-flow problem is studied consisting of n junctions and m one-wa y one w ay streets. Such an application sho ws that the goal of ensuring a smo oth traffic flow is asso ciated with balanced weigh ts on an appropri- ately defined digraph. W eight balanced digraphs app ear also in the design of stable flo c king algorithms for agen ts with significant inertial effects, where weigh t-balance al- lo ws for the decoupling of the centroid dynamics from the in ternal group formation [ 28 ]. Additionally , examples of applications where balance pla ys a key role include netw ork adaptation strategies based on the use of con tinuous second order models [ 9 ], and dis- tributed adaptiv e strategies to tune the coupling w eights of a net w ork based on lo cal information of no de dynamics [ 10 ]. W eight balancing can also b e asso ciated with the matrix balancing problem in netw ork optimization whic h is, in turn, asso ciated with Intr o duction 4 n umerous applications, such as predicting the distribution matrix of telephone traffic [ 29 ]. F urthermore, the weigh t balancing problem is related to matrix scaling problems whic h ha v e b een addressed in the context of nonnegative matrices [ 27 ]. One of the early motiv ations for the matrix scaling problem was the desire to start from the sto c hastic matrix of a Mark ov chain and obtain a scaled version of it that is doubly sto chastic and adheres to the sparsity structure of the original one. Many applications of matrix scaling can also b e found in economy or accoun ting mo dels (where it is imp ortant to balance the flow-of-funds), urban planning, statistics, and demography . Doubly Sto c hastic W eigh ts: In all of the ab ov e applications, weigh ts are asso ciated with the ph ysical interactions in a distributed control system, and are assigned to edges of the physical digraph. There are also many applications where weigh t balancing plays a significant role in the cyb er digraph of a giv en distributed control system. In particu- lar, weigh t balancing is closely related to weigh ts that form a doubly sto c hastic digraph, whic h find applications in m ulti-comp onent systems (suc h as sensor netw orks) where one is in terested in distributively av eraging measurements at each comp onent. Doubly sto c hastic digraphs play a key role in net work ed control problems, including distributed a veraging [ 8 , 11 – 13 , 30 ] and distributed conv ex optimization [ 14 – 16 ]. Conv ergence in gossip algorithms also relies on the structure of doubly sto chastic digraphs, see [ 20 , 21 ]. In particular, w eigh t-balance is imp ortan t in the w ell-studied case where a set of com- p onen ts (no des) wan t to distributively a verage their individual measuremen ts (in this scenario, eac h no de provides a lo cal measurement of global quantit y). One approac h to wards av erage consensus is to follo w a linear iteration, where (instead of routing the v alue of each no de to all other no des) each no de rep eatedly up dates its v alue to b e a w eighted linear combination of its o wn v alue and the v alues of its neighbouring no des. Asymptotic av erage consensus is then guaranteed (i.e., the no des asymptotically reac h consensus to the av erage of their initial v alues [ 2 , 8 , 31 , 32 ]) if the weigh ts used in the linear iteration form a doubly stochastic matrix (whic h correspond to a balanced di- graph) [ 31 ]. The c hoice of the w eights is imp ortant in ho w the in terconnection b ehav es and whether av erage consensus is reached. F or example, it has b een shown that nonneg- ativ e weigh ts that form a primitive doubly sto chastic matrix (and thus also balance the graph) is a sufficien t condition for asymptotic av erage consensus as long as the digraph is strongly connected [ 17 , 18 ]. Average consensus is a sp ecial case of the consensus problem whic h has receiv ed significan t atten tion from the computer science communit y [ 1 ] and the control communit y (see [ 2 , 7 , 13 ]), due to its applicabilit y to diverse areas, includ- ing multi-component systems, co op erativ e control [ 33 ], mo deling of flo cking b eha vior in biological and physical systems (e.g., [ 2 , 7 , 8 ]) and estimation and trac king [ 34 ]. Flo w Balancing: A weigh ted digraph that has a real or integer v alue (called the edge w eight) asso ciated with each edge is also similar to a flow net work where eac h edge receiv es a flo w that typically cannot exceed a given capacity (or, more generally , has to Intr o duction 5 lie within a given in terv al). Flows m ust satisfy the restriction that the amoun t of flow in to a no de equals the amount of flo w out of it, unless the no de is a source, which has only outgoing flow, or a sink, whic h has only incoming flo w. Th us, the weigh t-balancing problem w e deal with in this thesis can also b e viewed as the problem of pro ducing a feasible circulation in a directed graph with upp er and lo wer flo w constrain ts [ 35 ]. [In suc h settings, a circulation in a directed graph is an assignmen t of nonnegative weigh ts to the cycles of the graph and is called feasible if the flow in each edge (i.e., the sum of the weigh ts of the cycles con taining this edge) lies b et ween the corresp onding upp er and lo wer flow constraints.] Additionally , the problem we deal with can b e also viewed as a particular case of the standard net work flo w problem (see, e.g., [ 36 ]), where there is a cost asso ciated to the flo w on eac h link, and the ob jective is to minimize the total cost sub ject to constraints on the flows. Moreo ver, flow algorithms find further applications in a v ariety of other problems, like the maximum flow problem [ 37 ], auction algorithms [ 38 ], and energy minimization [ 39 ]. Balancing with Integer W eights: Digraphs that are balanced with integer w eights find numerous applications in a v ariet y of problems like swarm guidance [ 40 ], fractional pac king [ 41 , 42 ], matching in bipartite graphs [ 43 ], and edge-disjoin t paths [ 44 ]. 1.3 Main Con tributions As stated previously , this thesis fo cuses on the developmen t of distributed nov el al- gorithms that facilitate the developmen t of strategies for generating weigh t balanced digraphs. The main contributions of this thesis are as follows:  In Section 3.1 w e introduce a nov el distributed algorithm which achiev es integer w eight balancing in a multi-component system. W e presen t its formal description along with an illustrative example. Then, w e sho w that the prop osed distributed algorithm conv erges to a weigh t balanced digraph after a finite num b er of iter- ations, for which we obtain explicit b ounds. Finally , we presen t examples and sim ulations for the distributed algorithm.  In Section 4.3 w e introduce a nov el distributed algorithm which achiev es integer w eight balancing in a m ulti-comp onen t s ystem, in the presence of time delays o ver the comm unication links. W e present its formal description, along with an illus- trativ e example, and we sho w that the prop osed distributed algorithm conv erges to a weigh t balanced digraph after a finite num b er of iterations in the presence of b ounded time delays ov er the communication links. Then, in Section 4.4 , we dis- cuss an even t-triggered v ersion of the prop osed distributed algorithm and we sho w that it results in a w eigh t balanced digraph after a finite num b er of iterations in Intr o duction 6 the presence of arbitrary (time-v arying, inhomogeneous) but b ounded time dela ys o ver the communication links.  In Section 4.5 we show that the prop osed distributed algorithm presen ted in Sec- tion 4.3 is also able to con verge (with probabilit y one) to a weigh t balanced digraph in the presence of unbounded dela ys (pack et drops).  In Section 5.3 w e introduce a nov el distributed algorithm which achiev es integer w eight balancing in a multi-component system, in the presence of sp ecified lo wer and upp er limit constrain ts on the edge weigh ts. W e present its formal description along with an illustrativ e example. Then, w e show that as long as the conditions hold, then the prop osed distributed algorithm conv erges to a w eight balanced digraph after a finite num b er of iterations. Finally , we present examples and sim ulations for the prop osed distributed algorithm.  In Section 6.3 w e introduce a nov el distributed algorithm which achiev es integer w eight balancing in a m ulti-comp onen t system under sp ecified lo w er and upp er limit constraints on the edge weigh ts, in the presence of time delays o ver the comm unication links. W e show that as long as the conditions hold, then the prop osed distributed algorithm conv erges to a weigh t balanced digraph after a finite num b er of iterations. In Section 6.4 , we discuss an even t-triggered extension regarding the op eration of the aforementioned distributed algorithm and w e show that it results in a w eight balanced digraph after a finite num b er of iterations.  In Section 6.5 w e introduce a nov el distributed algorithm which achiev es integer w eight balancing in a m ulti-comp onen t system under sp ecified lo w er and upp er limit constraints on the edge weigh ts, in the presence of unbounded dela ys (pack et drops) o v er the comm unication links. W e sho w that as long as the conditions hold, then the prop osed distributed algorithm conv erges to a weigh t balanced digraph after a finite num b er of iterations. 1.4 Thesis Organization This thesis is organized as follows. In Chapter 2 , we presen t some basic notions and notation needed for our dev elopmen t. Then we present the problem form ulation and w e discuss a p ossible solution in a centralized fashion. In Chapter 3 , we introduce the distributed algorithm which achiev es balance with integer weigh ts after a finite n umber of iterations. In Chapter 4 , w e presen t the distributed algorithm which ac hieves integer w eight balancing in the presence of b ounded delays after a finite num b er of iterations. W e also analyze the case of unbounded delays (pac ket drops) in the communication links and discuss an even t-triggered version of the algorithm (that can b e used to av oid Intr o duction 7 unnecessary transmissions). In Chapter 5 , we presen t the conditions for the existence of a set of in teger weigh ts (within the allow able interv als) that balance a w eighted digraph. Then, we present the distributed algorithm which ac hiev es in teger weigh t balancing in a m ulti-comp onen t system, in the presence of sp ecified lo wer and upp er limit constraints on the edge weigh ts. In Chapter 6 , w e present the distributed algorithm, which ac hieves in teger weigh t balancing under low er and upp er limit constrain ts on the edge weigh ts in the presence of b ounded delays after a finite n um b er of iterations. W e also analyze the case of unbounded dela ys (pack et drops) in the comm unication links and discuss an ev ent-triggered version of the algorithm (that can b e used to a void unnecessary transmissions). Finally , in Chapter 7 we conclude this thesis with a brief summary and remarks ab out future work. Chapter 2 Preliminaries, Problem Statemen t and Cen tralized Approac h In this chapter, we first in tro duce some k ey notions and notation in Section 2.1 . Then, w e state and discuss the problem under consideration in Section 2.2 and present a cen tralized approach of the problem in Section 2.3 . 2.1 Graph-Theoretic Notions The sets of real, in teger and natural num b ers are denoted by R , Z and N , resp ectively . The symbol N 0 denotes the set of nonnegativ e in tegers while the p ositive part of Z is denoted by the subscript + (e.g. Z + ). V ectors are denoted by small letters whereas matrices are denoted by capital letters. A matrix with nonnegative elements is called nonnegativ e matrix and is denoted by A ≥ 0 while a matrix with p ositive elements is called p ositiv e matrix and is denoted by A > 0. A distributed system whose comp onen ts can exc hange masses of certain quantities of in terest (w eights or flows) via (p ossibly directed) links, can conv eniently b e captured by a digraph (directed graph). A digraph of order n ( n ≥ 2), is defined as G d = ( V , E ), where V = { v 1 , v 2 , . . . , v n } is the set of no des and E ⊆ V × V − { ( v j , v j ) | v j ∈ V } is the set of edges. A directed edge from no de v i to no de v j is denoted by ( v j , v i ) ∈ E , and indicates that v j can receiv e information or physical quantities from v i . W e will refer to the digraph G d as the physic al top olo gy . A digraph is called str ongly c onne cte d if for each pair of vertices v j , v i ∈ V , v j 6 = v i , there exists a directed p ath from v i to v j , i.e., we can find a sequence of v ertices v i ≡ v l 0 , v l 1 , . . . , v l t ≡ v j suc h that ( v l τ +1 , v l τ ) ∈ E for τ = 0 , 1 , . . . , t − 1. All nodes that ha ve edges to no de v j are said to b e in-neighbors of no de v j and b elong to the set N − j = { v i ∈ V | ( v j , v i ) ∈ E } . The cardinality of N − j is called the in-de gr e e of no de 8 Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 9 v j and is denoted b y D − j . The no des that ha v e edges from no de v j comprise its out- neigh b ors and are denoted by N + j = { v l ∈ V | ( v l , v j ) ∈ E } . The cardinality of N + j is called the out-de gr e e of v j and is denoted b y D + j . W e also let N j = N + j ∪ N − j denote the neighb ors of no de v j , and D j = D + j + D − j denote the total de gr e e of no de v j . A weigh ted digraph G d = ( V , E , F ) is a digraph in which eac h edge ( v j , v i ) ∈ E is asso ciated with a real or integer v alue f j i called the edge weigh t; matrix F = [ f j i ] with v alue f j i at its j th ro w, i th column p osition (where f j i = 0 if ( v j , v i ) do es not b elong in E ). Definition 1 . Given a weigh ted digraph G d = ( V , E , F ) of order n , the total in-weight of no de v j is denoted by S − j and is defined as S − j = P v i ∈N − j f j i , whereas the total out-weight of no de v j is denoted by S + j and is defined as S + j = P v l ∈N + j f lj . Definition 2 . Given a w eighted digraph G d = ( V , E , F ) of order n , the w eight imb alanc e of no de v j is denoted by x j and is defined as x j = S − j − S + j . Definition 3 . Giv en a weigh ted digraph G d = ( V , E , F ) of order n , the total imb alanc e (or absolute imb alanc e ) of digraph G d is denoted by ε and is defined as ε = P n j =1 | x j | . Definition 4 . A weigh ted digraph G d = ( V , E , F ) is called weigh t balanced if its total imb alanc e (or absolute imb alanc e ) is equal to 0, i.e., ε 4 = P n j =1 | x j | = 0. 2.2 Problem Statemen t for W eight Balancing W e are given a strongly connected digraph G d = ( V , E ), with a set of no des V = { v 1 , v 2 , . . . , v n } and a set of edges E ⊆ V × V − { ( v j , v j ) | v j ∈ V } . W e w ant to de- v elop a distributed algorithm that allo ws the no des to iteratively adjust the w eigh ts on their edges so that they even tually obtain a set of in teger w eights { f j i | ( v j , v i ) ∈ E } that satisfy the following: 1. f j i ∈ N for every edge ( v j , v i ) ∈ E ; 2. f j i = 0 if ( v j , v i ) / ∈ E ; 3. S + j = S − j for every v j ∈ V . The algorithms we develop in this thesis are iterativ e, and we use k to denote the iteration. F or example, S + j [ k ] will denote the v alue of the total out-weigh t of no de v j at time instant k , where k ∈ N 0 . In Figure 2.1 we can see an example of a digraph whic h satisfies the conditions presented ab o v e. As we can see, for every node v 1 , v 2 , v 3 , v 4 and v 5 the total in-weight (equal to 4 , 4 , 6 , 4 and 4 resp ectively) is equal to the total out-weight . Thus, the digraph in Figure 2.1 is weigh t balanced. Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 10 v 4 v 5 v 3 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = 0 2 2 4 2 4 2 4 2 Figure 2.1: Example of weigh t balanced digraph. 2.3 Cen tralized Algorithm for W eight Balancing W e no w in tro duce an algorithm which solves the integer w eight balancing problem ov er a multi -comp onent system in a cen tralized fashion. The centralized algorithm takes as input a strongly connected digraph G d = ( V , E ). It initializes the weigh ts of all edges to unit y and then iteratively p erforms the follo wing steps until the graph is balanced: 1. Computes the weigh t im balance of each no de. 2. Pick one no de with p ositiv e imbalance and one with negative imbalance; if there is more than one pair of no des satisfying such a condition, any pair can b e c hosen (something lik e that). 3. Find a path in the digraph from the no de with positive imbalance to the no de with negativ e imbalance (this is alwa ys p ossible as long as the graph is strongly connected). 4. Increase the weigh ts of all the edges in the path by the v alue of the weigh t imbalance of the p ositively imbalanced no de. W e discuss wh y the algorithm results in a weigh t balanced graph (and ho w many steps it tak es to do so), after we describ e the algorithm more formally . 2.3.1 F ormal Description of Centralized Algorithm A formal description of the prop osed centralized algorithm is presented in Algorithm 1 . Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 11 Algorithm 1 Cen tralized balancing with integer weigh ts Input A strongly connected digraph G d = ( V , E ) with n = |V | no des and m = |E | edges. Initialization Set k = 0; each no de v j ∈ V sets its out-going edge weigh ts as f lj [0] =  0 , if v l / ∈ N + j , 1 , if v l ∈ N + j . Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1. It computes its w eigh t imbalance x j [ k ] = S − j [ k ] − S + j [ k ]. 2. It selects one no de v + with p ositive imbalance br + and one no de v − with negative im balance br − (e.g., it selects the no de with the largest p ositiv e imbalance and the no de with the smallest negative imbalance, resp ectively). 3. It finds a non-cyclic path v + = v j 0 , v j 1 , · · · , v j t = v − from v + to v − . 4. It increases the weigh t on eac h edge on the path, whic h connects v + to v − , by br + , i.e., f j e +1 ,j e [ k + 1] = f j e +1 ,j e [ k ] + br + for e = 0 , 1 , · · · , t − 1. (All the other weigh ts are left unchanged.) 5. It rep eats (increases k to k + 1 and go es back to Step 1). 2.3.2 Illustrativ e Example of Cen tralized Algorithm W e first illustrate the cen tralized algorithm. W e then explain why it results in a weigh t balanced digraph after a finite num b er of iterations (b ounded by n − 1 = |V | − 1 in the w orst-case). Consider the digraph G d = ( V , E ) in Figure 2.2 , where V = { v 1 , v 2 , · · · , v 7 } , E = { e 1 , e 2 , · · · , e 13 } , E ⊆ V × V − { ( v j , v j ) | v j ∈ V } . The weigh t on each edge is ini- tialized to f j i [0] = 1 for ( v j , v i ) ∈ E (otherwise f j i [0] = 0). As a first step, we compute the weigh t imbalance x j [0] = S − j [0] − S + j [0] for each no de (this is sho wn in Figure 2.2 ). Once w e compute the im balance of each no de, the centralized algorithm selects (ran- domly or otherwise) one no de with p ositive im balance, sa y v 5 , and one no de with negative im balance, say v 7 . A path from no de v 5 to no de v 7 is selected (e.g., the path v 5 , v 7 ) and the weigh ts of all the edges in the path are increased by the v alue of the weigh t imbal- ance of the p ositively im balanced no de v 5 (namely , by the v alue of the w eigh t im balance x 5 = 2), as shown in Figure 2.3 . A t the next iteration, after the increase of the w eights of all the edges of the path v 5 , v 7 , w e recalculate the im balance for eac h no de v j as x j [1] = S − j [1] − S + j [1]. This can b e seen in Figure 2.4 . Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 12 v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = − 1 x 4 = − 1 x 5 = 2 x 6 = 1 x 7 = − 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Figure 2.2: W eigh ted digraph with initial w eights and initial im balance for eac h no de. v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = − 1 x 4 = − 1 x 5 = 2 x 6 = 1 x 7 = − 1 1 1 1 1 1 1 1 1 1 + 2 1 1 1 1 Figure 2.3: Selection of a path b et ween a no de with p ositiv e imbalance and a no de with negativ e imbalance. v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = − 1 x 4 = − 1 x 5 = 0 x 6 = 1 x 7 = 1 1 1 1 1 1 1 1 1 3 1 1 1 1 Figure 2.4: Calculation of imbalance for eac h no de. A t the next iteration, one no de with p ositive im balance, say v 7 , and one no de with negativ e im balance, sa y v 4 are selected. A path from no de v 7 to no de v 4 is created (e.g., the path v 7 , v 4 ) and the weigh ts of all the edges in the path are increased by the v alue of the weigh t im balance of the p ositiv ely imbalanced no de v 7 (namely , by the v alue of the weigh t imbalance x 4 = 1), as shown in Figure 2.5 . Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 13 v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = − 1 x 4 = − 1 x 5 = 0 x 6 = 1 x 7 = 1 1 1 1 1 1 1 1 1 3 1 1 + 1 1 1 Figure 2.5: Selection of a path b et ween a no de with p ositiv e imbalance and a no de with negativ e imbalance. The pro cess is repeated un til the graph b ecomes w eight balanced. In this particular example, this o ccurs after four iterations and the final weigh ts are shown in Figure 2.6 . v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = 0 x 6 = 0 x 7 = 0 1 1 1 1 1 1 1 1 3 1 2 1 2 Figure 2.6: Resulting weigh t balanced digraph. W e will next explain why the proposed cen tralized algorithm results i n a weigh t balanced digraph after a finite num b er of iterations (b ounded by n − 1 in the w orst-case). 2.3.3 Bound on Num b er of Iterations of Cen tralized Algorithm Notice that eac h edge app ears as the incoming edge of exactly one node and as the outgoing edge of exactly one (other) no de. Th us, we immediately hav e that n X j =1 x j [ k ] = 0 , for all k . This means that if there is a no de with p ositiv e im balance at Step 2 of the iteration, then there has to b e at least one no de with negative imbalance (and vice-versa). Also, notice that the adjustment of weigh ts in Step 3 of the iteration, achiev es the follo wing: 1. It balances the no de v + that had p ositive imbalance. Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 14 2. It do es not c hange the im balance of all other in termediate no des v j 1 , · · · , v j t − 1 in the path v + = v j 0 , v j 1 , · · · , v j t = v − from v + to v − . 3. It increases the im balance of the no de v − that had negative imbalance. Note that if a no de starts balanced or b ecomes balanced during any iteration, it remains balanced for the remainder of the algorithm (b ecause Steps 1, 2, and 3 do not affect the im balance of intermediate no des in the path that is selected, and only these no des can b e balanced). F urthermore, at eac h iteration, at least one no de b ecomes balanced (namely , the no de with p ositiv e imbalance that is pick ed at Step 1). Note that it is p ossible for t w o no des to b ecome balanced at each iteration (if the no de with negativ e im balance that is pick ed happ ens to also b ecome balanced; in fact, this is the case at the last iteration). Thus, it is easy to see that the algorithm tak es at most n − 1 iterations to reach a set of weigh ts that forms a weigh t balanced graph. Another easily obtainable b ound on the num b er of iterations is the follo wing: if we think of the absolute b alanc e of the graph at iteration k as ε [ k ] = P n j =1 | x j [ k ] | , then each iteration decreases this imbalance by at least 2 (i.e., P n j =1 | x j [ k + 1] | ≤ P n j =1 | x j [ k ] | − 2) unless the graph is balanced. [Note that P n j =1 | x j [0] | is necessarily an ev en num b er (b ecause the sum of p ositive balances is equal to the negativ e of the sum of the negative im balances, and both of them are integer num b ers). Also, each iteration decreases the sum of the positive imbalances by at least 1; thus, the absolute sum of the negativ e im balances also has to decrease by at least 1 as w ell.] The ab o ve discussion implies the prop osition b elo w. Pr op osition 1 . The n umber of iterations T required by the prop osed centralized algo- rithm to balance a digraph G d = ( V , E ) satisfies T ≤ min( n − 1 , 1 2 P n j =1 | x j [0] | ). 2.3.4 Sim ulation Study In this section, w e present sim ulation results for random graphs of size n = 20 and 50 no des. Figure 2.7 shows the case of a random digraph of n = 20 no des. Here we can see that the prop osed centralized algorithm conv erges to a weigh t balanced digraph after a finite n umber of iterations. Figure 2.8 shows the same case as Figure 2.7 with the difference that the netw ork consists of 50 no des. The increase in netw ork size do es not cause any ma jor changes in p erformance and the conclusions are the same as in Figure 2.7 . Pr eliminaries, Pr oblem Statement and Centr alize d Appr o ach 15 0 10 20 30 40 50 60 70 80 90 100 0 5 10 15 20 25 30 35 40 45 50 Total Imbalance for a Random Graph of 20 Nodes Number of Iterations Total Imbalance Figure 2.7: T otal im balance plotted against the n umber of iterations for a random digraph of 20 no des when the proposed centralized algorithm is executed. 0 10 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 120 140 160 180 200 Total Imbalance for a Random Graph of 50 Nodes Number of Iterations Total Imbalance Figure 2.8: T otal im balance plotted against the n umber of iterations for a random digraph of 50 no des when the proposed centralized algorithm is executed. Chapter 3 Distributed W eigh t Balancing In this c hapter, we presen t a no vel distributed algorithm which deals with the problem of balancing a weigh ted digraph. This chapter is organized as follo ws. In Section 3.1 we introduce a no v el distributed algorithm which ac hiev es integer w eight balancing in a multi-component system. In Sections 3.1.1 - 3.3 we presen t a formal description of the prop osed distributed algorithm and demonstrate its p erformance via an illustrative example. Then, in Section 3.2 , w e sho w that the prop osed distributed algorithm conv erges to a w eight balanced digraph after a finite num b er of iterations and we calculate an explicit b ound on the num b er of iterations required. In Section 3.3 we presen t sim ulation results and comparisons for the prop osed distributed algorithm. The chapter is concluded in Section 3.4 . 3.1 Distributed Algorithm for W eigh t Balancing In this section w e present a distributed algorithm (Algorithm 2 ) in which the no des iterativ ely adjust the p ositive integer weigh ts of their outgoing edges, suc h that the digraph b ecomes weigh t balanced after a finite n umber of iterations. W e assume that eac h no de observes but cannot set the weigh ts of its incoming edges, and based on these w eights it adjusts the weigh ts on its outgoing edges. It is required that the weigh ts on the outgoing edges of each no de can b e adjusted differ ently if necessary . (Note that this requiremen t is not presen t in [ 45 ] where each no de sets equal weigh ts to all of its outgoing edges; when restricting ourselves to in teger weigh ts, ho wev er, this requirement b ecomes necessary for balancing to b e p ossible, see, for example, [ 46 ]). Giv en a strongly connected digraph G d = ( V , E ), Algorithm 2 has eac h node v j ∈ V initialize the weigh ts of all of its outgoing edges to n (or some constant greater than or equal to unity 1 ). Then, it enters an iterative stage where each no de v j p erforms the 1 It will b ecome evident from our analysis that this constant do es not hav e to b e the same for all no des (and its v alue do es not affect the termination of the algorithm), but for simplicity we take it to b e n in this analysis. Note that if all edge weigh ts were initialized to 1, the execution of Algorithm 2 16 Distribute d Weight Balancing 17 follo wing steps (a formal description of Algorithm 2 app ears later): 1. The no de computes its w eight imbalance. 2. If the no de has p ositive imbalance, it increases the integer weigh ts of its outgoing edges so that it b ecomes weigh t balanced (assuming no further c hanges b y its in- neigh b ors on its incoming edges). Sp ecifically , the outgoing edges are assigned, if p ossible, equal integer weigh ts; otherwise, if this is not p ossible, they are assigned in teger weigh ts suc h that the maxim um difference among them is equal to unit y . This means that some of the outgoing edges of each no de migh t get larger w eigh ts (b y unity) than others, and we assume that each no de selects a priori a fixed (p ossibly randomly selected) ordering of its out-neigh b ors that determines the precedence with which outgoing edges get higher weigh t. 2 3. If the no de has negative im balance, it decreases (if p ossible) the integer weigh ts of its outgoing edges so that i) they hav e v alue greater or equal to unity , and ii) its w eigh t im balance b ecomes equal to − 1 (assuming no further changes by its in-neigh b ors on its incoming edges). As in Step 2 ab ov e, the outgoing edges are assigned, if p ossible, equal integer weigh ts; otherwise, if this is not p ossible, they are assigned in teger w eigh ts (greater or equal to unit y) such that the maximum difference among them is equal to unity (again, we assume each no de determines whic h of its outgoing edges get higher weigh t based on some a priori fixed ordering of its out-neighbors). F or simplicity , w e assume that during the execution of the distributed algorithm, the no des up date the weigh ts on their outgoing edges in a sync hronous manner, but it should b e eviden t from our pro of that the algorithm can also b e extended to asynchronous settings where, during each iteration, a no de is selected (randomly or otherwise) to up date the weigh ts on its outgoing edges based on its im balance at that p oin t. 3 3.1.1 F ormal Description of Distributed Algorithm A formal description of the prop osed distributed algorithm is presented in Algorithm 2 . is iden tical to the execution of the algorithm in [ 47 ] b ecause no des with negative imbalance never take an y action. 2 The exact ordering is not critical and, in fact, other strategies are p ossible as long as they keep some balance among weigh ts. F or example, the algorithm proposed in [ 46 ], by having each no de with positive im balance increase the weigh t of the outgoing edge with minimum weigh t, also imp oses some sort of balance among the w eights on its outgoing edges. This algorithm has b een shown to complete in finite time, but a explicit b ound on the n umber of steps required has not been obtained. 3 A key requirement in that case is that, as long as the graph is not balanced, no no de is completely excluded from selection. Distribute d Weight Balancing 18 Algorithm 2 Distributed balancing with integer weigh ts Input A strongly connected digraph G d = ( V , E ) with n = |V | no des and m = |E | edges. Initialization Set k = 0; each no de v j ∈ V sets its outgoing edge weigh ts as f lj [0] =  0 , if v l / ∈ N + j , n, if v l ∈ N + j . No de v j also orders its out-neighbors in the set N + j in some random (but fixed) order. Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1. It computes its w eigh t imbalance x j [ k ] = S − j [ k ] − S + j [ k ]. 2. If x j [ k ] > 0, it sets the v alues of the weigh ts on its outgoing edges as f lj [ k + 1] =  S − j [ k ] D + j  , ∀ v l ∈ N + j . Then, it c ho oses the first S − j [ k ] − D + j $ S − j [ k ] D + j % of its outgoing edges (according to the ordering of its out-neighbors chosen during initialization), and increases their v alue b y 1 so that | f lj − f hj | ≤ 1 , ∀ v l , v h ∈ N + j . 3. If x j [ k ] < − 1, it do es the follo wing: (i) If  S − j [ k ] D + j  ≥ 1, then no de v j sets the v alues of the weigh ts on its outgoing edges as f lj [ k +1] =  S − j [ k ] D + j  , ∀ v l ∈ N + j . Then, it chooses the first 1 + S − j [ k ] −D + j $ S − j [ k ] D + j % of its outgoing edges (according to the ordering of its out-neighbors chosen during initialization), and increases their w eight b y 1 so that | f lj − f hj | ≤ 1 , ∀ v l , v h ∈ N + j . (ii) If  S − j [ k ] D + j  = 0, then no de v j sets the v alues of the w eights on its outgoing edges as f lj [ k + 1] = 1. 4. It rep eats (increases k to k + 1 and go es back to Step 1). 3.1.2 Illustrativ e Example of Distributed Algorithm Consider the digraph G d = ( V , E ) in Figure 3.1 , where V = { v 1 , v 2 , . . . , v 7 } , E = { e 1 , e 2 , . . . , e 13 } , E ⊆ V × V − { ( v j , v j ) | v j ∈ V } . The weigh t on each edge is initialized to f lj [0] = 7 for ( v l , v j ) ∈ E (otherwise f lj [0] = 0). As a first step, e ac h no de computes its w eigh t im balance x j [0] = S − j [0] − S + j [0] (the corresp onding im balances are sho wn in Figure 3.1 ). Algorithm 2 requires eac h no de with p ositiv e imbalance to increase the v alue of the weigh ts on its outgoing edges by equal in teger amounts (or with maxim um difference b etw een them equal to unit y), so that the total increase mak es the no de balanced. This ensures that weigh ts remain strictly p ositive and S + j [ k + 1] = S − j [ k ]. In particular, the balance of no de v j will b ecome zero, unless the weigh ts of its incoming edges are c hanged by its in-neighbors. In this case, the no des that hav e p ositiv e im balance (equal to 14 and 7, resp ectively) Distribute d Weight Balancing 19 v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 =0 x 2 =0 x 3 = − 7 x 4 = − 7 x 5 =1 4 x 6 =7 x 7 = − 7 7 7 7 7 7 7 7 7 7 7 7 7 7 Figure 3.1: W eigh ted digraph with initial w eights and initial im balance for eac h no de. are no des 5 and 6, which distribute their im balance to their outgoing edges as shown in Figure 3.2 . F or example, no de 5 has imbalance x 5 [0] = 14 and sets f 65 [1] = 7 + 7 = 14 and f 75 [1] = 7 + 7 = 14. v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 = −3 x 2 = −3 x 3 = 6 x 4 = − 4 x 5 = −6 x 6 = 4 x 7 = 6 7 7 7 − 3 7 7 7 − 3 7 − 3 7+7 7+7 7 − 3 7 − 3 7 − 3 7+7 Figure 3.2: Distribution of weigh ts to outgoing edges b y no des with p ositive imbal- ance. The distributed algorithm also requires each no de with negativ e im balance to decrease the v alue of the weigh ts on its outgoing edges by equal integer amounts (or with max- im um difference b et ween them equal to unity), so that i) the w eights are at least 1 and ii) the total decrease makes the no des imbalance equal to − 1. This ensures that w eights remain strictly p ositive and S + j [ k + 1] = S − j [ k ] + 1. The balance of no de v j remains negativ e at − 1, unless the weigh ts of its incoming edges are changed by its in-neigh b ors. In this case, the no des that hav e negative imbalance (all equal to − 7) are no des 3, 4 and 7, whic h distribute their im balance to their outgoing edges as sho wn in Figure 3.2 . F or example, node 7 has im balance x 7 [0] = − 7 and sets f 67 [1] = 7 − 3 = 4 and f 47 [1] = 7 − 3 = 4. In the next iteration, after the in teger weigh t up date on the outgoing edges of each node with p ositive (or negativ e) imbalance at k = 0, the no des recalculate their imbalance as Distribute d Weight Balancing 20 x j [1] = S − j [1] − S + j [1], and the pro cess is rep eated. After a finite num b er of iterations, whic h w e explicitly b ound in the next section, w e reac h the weigh ted digraph with the in teger weigh ts shown in Figure 3.3 . In this example, this o ccurs after 17 iterations. v 6 v 7 v 3 v 5 v 4 v 1 v 2 x 1 =0 x 2 =0 x 3 =0 x 4 =0 x 5 =0 x 6 =0 x 7 =0 9 7 11 9 6 10 3 14 14 4 7 7 21 Figure 3.3: W eight balanced digraph after 17 iterations. R emark 3.1 . Note that Algorithm 2 resembles [ 48 ] in man y w ays: when a no de has p ositiv e im balance, it increases the weigh ts on its outgoing edges; whereas when it has negativ e imbalance, it decreases the w eigh ts on its outgoing edges. The restriction to in tegers, how ev er, creates some “anomalies” that need to b e addressed. In particular, one has to worry ab out the follo wing cases: (i) When the imbalance is p ositiv e but not divisible b y the out-degree of the no de, it is not p ossible to increase the weigh ts of the outgoing edges b y equal in teger amounts. In order to keep the w eights on its outgoing edges integer-v alued, the no de makes the needed adjustmen ts while allowing the weigh ts to differ b y at most 1. (ii) The same applies when the imbalance is negative (in which case the w eigh ts hav e to decrease). An obvious additional constrain t in this case is the fact that the weigh ts ha ve to b e kept strictly p ositive. (iii) An interesting feature of Algorithm 2 is that when the imbalance of a no de is negativ e, the no de adjusts the w eights on its outgoing edges so that it achiev es an im balance of − 1 (not zero) assuming no changes in their incoming weigh ts. The reasons for this choice b ecome clear in the pro of of termination later on. R emark 3.2 . It is worth pointing out that Algorithm 2 is similar to the weigh t balancing algorithm presented in [ 47 ], but allows no des to adjust the weigh ts of their outgoing edges regardless of whether they hav e p ositive or negative imbalance; this means that Algorithm 2 will typically conv erge faster than the algorithm presented in [ 47 ] (though in the worst case they will tak e a similar num b er of iterations to conv erge). Distribute d Weight Balancing 21 3.2 Execution Time Analysis of Distributed Algorithm Herein, we calculate an explicit b ound on the num b er of iterations required, in the worst-c ase , for the giv en digraph to b ecome balanced. Our b ound is O ( n 3 m 2 ) iterations and, since m < n 2 , we can also b ound the num b er of iterations as O ( n 7 ). Note that the b ound we obtain also applies for the imbalance-correcting algorithm in [ 46 ] (note that [ 46 ] established conv ergence in finite time for the imbalance-correcting algorithm, but did not provide a bound on the num b er of iterations). Thus, the imp ortance of the result in this section is that the num b er of iterations (for b oth our prop osed algorithm and for the im balance-correcting algorithm in [ 46 ]) is p olynomial in the size of the digraph and not exp onen tial. Let the total imbalance of the digraph at iteration k b e ε [ k ] = n X j =1 | x j [ k ] | , where x j [ k ] = S − j [ k ] − S + j [ k ] with S − j [ k ] = P v i ∈N − j f j i [ k ] and S + j [ k ] = P v l ∈N + j f lj [ k ]. Clearly , the total im balance is a nonnegativ e quan tit y that is zero if and only if the digraph is balanced. Also, since we hav e P j x j [ k ] = 0 (b ecause eac h weigh t f j i [ k ] app ears twice, once with a p ositiv e sign and once with a negative sign), we see that: (i) the total im balance of the digraph at any given k is an even num b er, and (ii) if there is a no de with p ositive im balance, then there is also (at least one) no de with negative im balance. F or conv enience, in the remainder of this section, w e will sometimes refer to no des with p ositiv e (negative) im balance as p ositive ( ne gative ) no des, and to no des with zero imbalance as b alanc e d no des. Pr op osition 2 . During the execution of Algorithm 2 , we hav e ε [ k + 1] ≤ ε [ k ] ≤ ε [0] ≤ n 2 ( n − 2) . Pr o of. Since the digraph is assumed to b e strongly connected, eac h no de has at least one incoming edge and at least one outgoing edge. Also, each no de has at most n − 1 incoming edges and at most n − 1 outgoing edges. Since at initialization all edges ha ve w eight n , we hav e | x j [0] | ≤ n ( n − 2), which means that ε [0] ≤ n 2 ( n − 2). T o gain some insight, assume (for now) that at iteration k , only no de v j c hanges the w eights on its outgoing edges (with the other no des not making any changes regardless of their imbalance). W e hav e the following three cases to consider: (i) Case 1: No de v j has p ositive imb alanc e x j [ k ] . In such case, no de v j uniformly 4 increases the w eights on its outgoing edges in suc h a wa y so that x j [ k + 1] = 0 (b ecause 4 It is possible that some weigh ts are not increased, but, due to the fixed ordering of the out-neighbors of node v j (with whic h weigh ts are increased by one o v er the v alue of other weigh ts), we ha ve f lj [ k + 1] ≥ f lj [ k ] for all v l ∈ N + j . Distribute d Weight Balancing 22 S + j [ k + 1] = S − j [ k ] and S − j [ k + 1] = S − j [ k ] —since no other no de up dates the weigh ts on its outgoing edges). In order to see ho w the total im balance changes, we lo ok at ε [ k + 1] − ε [ k ] = P n l =1 | x l [ k + 1] | − | x l [ k ] | ( a ) = − x j [ k ] + P v l ∈N + j | f lj [ k + 1] − f lj [ k ] + x l [ k ] | − | x l [ k ] | ( b ) ≤ − x j [ k ] + P v l ∈N + j | f lj [ k + 1] − f lj [ k ] | ( c ) = − x j [ k ] + P v l ∈N + j ( f lj [ k + 1] − f lj [ k ]) = 0 . (a) follows b ecause x j [ k + 1] = 0, x j [ k ] is p ositive, and only no des in N + j see changes in their weigh ts from incoming edges; in particular, no de v l sees its incoming weigh t from no de v j increase by f lj [ k + 1] − f lj [ k ]. (b) stems from the triangle inequality , and (c) from Step 2 of Algorithm 2 and the fact that f lj [ k + 1] ≥ f lj [ k ] for v l ∈ N + j . Note that equalit y holds in Case 1 if al l no des in N + j ha ve p ositive or zero balance. (ii) Case 2: No de v j with ne gative imb alanc e x j [ k ] ≤ − 2 . In this case, no de v j decreases the weigh ts on its outgoing edges so that x j [ k + 1] = − a j for some in teger a j ≥ 1. The aim is for a j to b e unity (in Step 3.1 of Algorithm 2 ) but this may not b e p ossible as the w eights on the outgoing edges of v j are constrained to remain ab ov e unity (in Step 3.2 of Algorithm 2 ). Using similar arguments as in the previous case (but keeping in mind the difference in the signs of the v arious quantities), we hav e ε [ k + 1] − ε [ k ] = a j − | x j [ k ] | + P l 6 = j | x l [ k + 1] | − | x l [ k ] | = a j + x j [ k ] + P v l ∈N + j | f lj [ k + 1] − f lj [ k ] + x l [ k ] | − | x l [ k ] | ≤ a j + x j [ k ] + P v l ∈N + j | f lj [ k + 1] − f lj [ k ] | ( d ) = a j + x j [ k ] − P v l ∈N + j ( f lj [ k + 1] − f lj [ k ]) = 0 , where (d) follows from the fact that the total decrease in the weigh ts satisfies P v l ∈N + j ( f lj [ k + 1] − f lj [ k ]) = S + j [ k + 1] − S + j [ k ] = S − j [ k ] + a j − S + j [ k ] = a j + x j [ k ] . In Case 2, equality holds if all no des in N + j ha ve negative or zero balance. (iii) Case 3: No de v j with x j [ k ] = − 1 or x j [ k ] = 0 . In this case, no de v j do es not do an ything so we easily conclude that ε [ k + 1] − ε [ k ] = 0. Clearly , the arguments in the ab ov e three cases establish that ε [ k + 1] ≤ ε [ k ] in an async hronous setting where, at each iteration k , a single no de v j is selected (randomly or otherwise) to up date the weigh ts on its outgoing edges based on its imbalance x j [ k ] Distribute d Weight Balancing 23 at that p oint. In fact, with a little bit of b o ok-keeping, we can extend the ab o ve argumen t in the synchronous setting of Algorithm 2 , where no des adjust the weigh ts on their outgoing edges sim ultaneously . The key difference is that now the weigh ts on the incoming edges of each no de v j ma y c hange: S − j [ k + 1] is no longer identical to S − j [ k ] and has to b e explicitly accoun ted for. Letting ∆ f j i = f j i [ k + 1] − f j i [ k ], we hav e ε [ k + 1] − ε [ k ] = P n j =1 | x j [ k + 1] | − | x j [ k ] | = P v j ∈V |S − j [ k + 1] − S + j [ k + 1] | − | x j [ k ] | = P v j ∈V | P v i ∈N − j ∆ f j i − P v l ∈N + j ∆ f lj + x j [ k ] | − | x j [ k ] | . Consider now the following partition of V : set A = { v j | x j [ k ] > 0 } , set B = { v j | x j [ k ] ≤ − 2 } , and set C = { v j | x j [ k ] = − 1 or x j [ k ] = 0 } . Using these partitions, ε [ k + 1] − ε [ k ] ( e ) = P v j ∈A | P v i ∈N − j ∆ f j i | − x j [ k ] ( f ) + P v j ∈B | P v i ∈N − j ∆ f j i − a j | + x j [ k ] ( g ) + P v j ∈C | P v i ∈N − j ∆ f j i + x j [ k ] | + x j [ k ] , where (e) follows from Case 1, (f ) follows from Case 2, and (g) from the fact that x j [ k ] ≤ 0 for v j ∈ C . Using the triangle inequalit y on each line we hav e ε [ k + 1] − ε [ k ] ≤ P v j ∈A P v i ∈N − j | ∆ f j i | − x j [ k ] + P v j ∈B P v i ∈N − j | ∆ f j i | + a j + x j [ k ] + P v j ∈C P v i ∈N − j | ∆ f j i | = P v j ∈A P v l ∈N + j | ∆ f lj | − x j [ k ] + P v j ∈B P v l ∈N + j | ∆ f lj | + a j + x j [ k ] + P v j ∈C P v l ∈N + j | ∆ f lj | = 0 , where the key was to re-arrange the summation of the | ∆ f j i | and to take adv antage of the inequalities we prov ed earlier, in Cases 1, 2 and 3. Note that Prop osition 2 essentially giv es us a wa y to analyze the execution time of the prop osed algorithm (and also the algorithm in [ 46 ]). The basic idea is to b ound the n umber of steps K it takes for ε [ k + K ] to become strictly smaller than ε [ k ]. In Prop osition 3 b elo w, we argue that K ≤ m 2 , where m is the num b er of edges of the digraph; this implies that the execution time of the algorithm can b e b ounded by Execution Time ≤ m 2 ε [0] 2 ≤ [ n ( n − 1)] 2 n 2 ( n − 2) 2 ≤ αn 7 , where α is a natural n um b er (i.e., α ∈ N ). [Note that the n umber of edges m in a digraph satisfies m ≤ n ( n − 1), the initial total imbalance satisfies 5 ε [0] ≤ n 2 ( n − 2), and 5 Note that the total initial imbalance dep ends on the initial weigh ts that eac h no de assigns to its outgoing edges. F or the case where each node initializes the weigh ts of its outgoing edges to b e equal Distribute d Weight Balancing 24 eac h decrease that takes place is by at least t wo (since ε [ k ] is alwa ys an even num b er).] Pr op osition 3 . During the execution of Algorithm 2 , we hav e ε [ k + K ] < ε [ k ] , k = 0 , 1 , 2 , ... when ε [ k ] > 0 and K > m 2 ( m = |E | is the num b er of edges in the given digraph G d ). Before pro viding the pro of of Prop osition 3 , we discuss an example of a “difficult” digraph in order to provide intuition ab out the problem. Example 3.1. Consider the digraph G d = ( V , E ) in Figure 3.4 , where V = { v 1 , v 2 , . . . , v 8 } , E = { e 1 , e 2 , . . . , e 15 } , E ⊆ V × V − { ( v j , v j ) | v j ∈ V } . Edges { e 1 , e 2 , . . . , e 15 } are not de- noted in the figure to a void cluttering the diagram. The w eigh t on eac h edge is f lj [0] = 1 for ( v l , v j ) ∈ E (otherwise, f lj [0] = 0). G d in volv es of 4 cycles C 1 , C 2 , C 3 , C 4 , which com- prise of the following edges: C 1 : < ( v 2 , v 1 ) , ( v 3 , v 2 ) , ( v 1 , v 3 ) > , C 2 : < ( v 4 , v 2 ) , ( v 5 , v 4 ) , ( v 3 , v 5 ) , ( v 2 , v 3 ) > , C 3 : < ( v 6 , v 4 ) , ( v 7 , v 6 ) , ( v 5 , v 7 ) , ( v 4 , v 5 ) > , C 4 : < ( v 8 , v 6 ) , ( v 7 , v 8 ) , ( v 6 , v 7 ) > . v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 x 1 =1 x 2 =0 x 3 =0 x 4 =0 x 5 =0 x 6 =0 x 7 =0 x 8 = − 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Figure 3.4: W eighted digraph with initial weigh ts and initial imbalances. Initially , each no de computes its weigh t imbalance x j [0] = S − j [0] − S + j [0] (this initial im balance is indicated in Figure 3.4 ). The only no de that will take action is no de v 1 , whic h has p ositive imbalance equal to 1 (all other no des hav e im balance zero or − 1). Note that node v 1 will increase the weigh t on edge ( v 2 , v 1 ), causing an im balance to node v 2 who will then b e forced to take action. Dep ending on whether v 2 increases the weigh t on edge ( v 3 , v 2 ) or ( v 4 , v 2 ), no de v 3 or no de v 4 will b e forced to take action. Th us, there are differen t p ossibilities (executions of the algorithm) that dep end on the fixed ordering of out-neigh b ors, and b elo w we consider a particular such execution. [Note that at each iteration, only one no de takes action because all other no des hav e im balance zero or to unity then the execution time of the prop osed distributed algorithm can b e b ounded by O ( n 6 ) time steps. Distribute d Weight Balancing 25 − 1: initially no de v 1 , then no de v 2 , etc.; thus, we use the term “transferring of the im balance” to indicate the fact that the imbalanced no de forces an out-neighbor to b e im balanced.] • In the first 3 iterations, the im balance gets transferred to no des v 2 , v 3 and then bac k to no de v 1 . Note that the choices we made here were for no de v 2 to transfer the imbalance to no de v 3 , and for no de v 3 to transfer the imbalance back to no de v 1 . • In the next 7 iterations, the im balance gets transferred to no des v 2 , v 4 , v 5 , v 3 , v 2 , v 3 and bac k to v 1 . Again, at eac h iteration, only one no de has p ositiv e imbalance: first no de v 1 , then no de v 2 , then v 4 , then v 5 , then v 3 , then v 2 , then v 3 , and finally v 1 . Note that, giv en the previous c hoices, the only choice w e had here was whether at no de v 4 w e increase the weigh t at edge ( v 6 , v 4 ) or edge ( v 5 , v 4 ); we assumed the latter. • In the next 11 iterations, the imbalance gets transferred to no des v 2 , v 4 , v 6 , v 7 , v 5 , v 4 , v 5 , v 3 , v 2 , v 3 , and back to v 1 , resp ectiv ely . • In the last 4 iterations, the imbalance gets transferred to no des v 2 , v 4 , v 6 , and v 8 resp ectiv ely . • The resulting balanced digraph is shown in Figure 3.5 and is reached after 25 iterations. Summarizing, w e hav e that cycle C 1 w as crossed four times, cycle C 2 w as crossed three times, cycle C 3 w as crossed tw o times, and cycle C 4 w as crossed one time. As a result, the num b er of iterations required, in order for digraph G d to reach weigh t balance, is 4 | C 1 | + 3 | C 2 | + 2 | C 3 | + | C 4 | , where | C i | is the length of cycle C i . v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 x 1 =0 x 2 =0 x 3 =0 x 4 =0 x 5 =0 x 6 =0 x 7 =0 x 8 =0 1 4 3 3 2 2 1 5 4 2 1 4 3 2 3 Figure 3.5: W eight balanced digraph after 25 iterations. W e are no w ready to pro ceed with the pro of of Prop osition 3 . Distribute d Weight Balancing 26 Pr o of. Since ε [ k ] > 0, we hav e at least one no de with p ositiv e imbalance, sa y no de v 1 , and at least one no de with negativ e imbalance, say no de v n . Note that, at each iteration of Algorithm 2 , no de v n (in fact, an y no de with negative im balance) will retain its negativ e im balance unless at least one of its in-neighbors v n i , ( v n , v n i ) ∈ E , has p ositive im balance and increases the weigh t on the edge ( v n , v n i ). The reason is that the changes that v n initiates on the w eigh ts on its outgoing edges can only mak e its imbalance − 1; thus, for the imbalance to b ecome zero or p ositive, it has to b e that one or more of its incoming w eigh ts are increased. This can only happ en if one or more of its in-neighbors ha v e p ositive imbalance, at whic h p oint it follows from the pro of of Prop osition 2 (strict inequality for Case 1) that the total imbalance will decrease (by at least tw o). In order to determine a b ound on the n um b er of steps K required for the total im balance to decrease, w e can assume without loss of generalit y that negative no des remain negativ e (b ecause at the momen t an y negativ e no de b ecomes balanced or p ositive, we also hav e a decrease in the total imbalance). Consider the (worst 6 ) case where v 1 has im balance b for some p ositive integer b , v n has im balance − b , and the remaining no des v 2 , v 3 , ..., v n − 1 are all balanced (refer to Figure 3.6 , where v 1 is the no de on the far left and v n is the no de on the far righ t). A t the first iteration, no de v 1 sends its imbalance to at least one of its out-neigh b ors (by increasing the weigh t on at least one of its outgoing edges). This out-neighbor (resp. these out-neigh b ors) of no de v 1 do es (resp. do) the same at the next iteration, and this pro cess is rep eated. If, at any p oint, no de v n is reac hed, the o verall imbalance will decrease by at least t wo (i.e., ε [ k + 1] ≤ ε [ k ] − 2). ! " # ! $ # % & # % $ # % ' # % ( # v 1 v n C 1 C 2 C 3 C N ... Figure 3.6: T ransfer of p ositive imbalance from no de v 1 on the left to no de v n on the righ t. Let us now analyze the num b er of iterations it takes for no de v n to b e reached (i.e., for one of its in-neighbors to b ecome p ositiv e). Observe the following: (i) At eac h iteration, the im balance gets transferred from a no de to one or more of that no des’s out-neighbors. If more than one out-neigh b ors are inv olved, then the decrease will o ccur faster; thus, w e consider the case when the im balance gets transferred to only one out-neigh b or. (ii) As the iterations pro ceed, mark the first time an edge is trav ersed for the second 6 It will b ecome eviden t that this is the worst case scenario at the completion of the argument. Distribute d Weight Balancing 27 time, and call the cyclic sequence of edges visited up to this p oint C 1 (refer to Figure 3.6 ). Note that C 1 is a cyclic sequence of edges (not no des, i.e., a certain no de ma y b e visited more than once while trav ersing cycle C 1 ). Also note that C 1 has at most n ( n − 1) edges b ecause that is the total n umber of edges of the digraph. (iii) While trav ersing C 1 for the second time, w e will b e forced at some p oint to trav erse a new edge (that has not b een trav ersed b efore (otherwise, the digraph is not strongly connected). The reason is the fact that the w eights on the out-going edges from each no de cannot differ by more than unity (this is where the notion of approximate balance among the w eights on the out-going edges pla ys are role). Let C 2 denote the set of edges tra versed until the time we stop trav ersing new edges (i.e., we are forced to trav erse an edge that we ha v e already visited). Let C 2 b e the set of edges that are not in C 1 and ha ve b een visited so far. (iv) W e can contin ue in this fashion (defining C i as shown in Figure 3.6 ) un til we reac h no de v n . Note that the n umber of cycles N satisfies N ≤ m (where m = |E | is the n umber of edges of the given digraph G d ) b ecause each cycle has at least one edge and the digraph has a total of n ( n − 1) cycles. F rom the ab o v e discussion (see also Example 3.1 ), we hav e #(iterations to reach v n ) ≤ N X i =1 ( N − i + 1) | C i | ≤ N m , since P N i =1 | C i | ≤ m . Finally , each cycle C i has at least one edge, which means w e can ha ve at most m cycles. This allo ws us to conclude that #(iterations to reach v n ) ≤ m 2 , whic h completes the pro of of the prop osition. R emark 3.3 . The b ound w e obtain is actually m 2 ε [0] 2 and can easily b e improv ed (if one lo oks at the last equation in Section IV and realizes that it is in our b est interest to ha ve cycle 1 ha ve size | C 1 | = m − ( N − 1) and all other cycles hav e size equal to 1) to m 2 ε [0] 2 . In terms of the example w e pro vide, this b ound suggests m 2 / 2 iterations which is 113. Nevertheless, the main motiv ation in obtaining our bound was to establish that the n umber of iterations is b ounded b y a num b er that is p olynomial (and not exp onential) in the size of the graph. 3.3 Sim ulation Study W e compare the prop osed algorithms with the current state-of-the-art. Sp ecifically , w e run Algorithm 2 in large digraphs (of size n = 20 and 50) and compare their performance against t w o other algorithms: (a) the weigh t balancing algorithm in [ 47 ] in whic h each no de v j with p ositive imbalance x j > 0, increases the weigh ts of its outgoing edges b y Distribute d Weight Balancing 28 equal integer amoun ts (if p ossible) so that it b ecomes weigh t balanced, (b) the im balance- correcting algorithm in [ 24 ] in which every no de v j with p ositive imbalance x j > 0 adds all of its weigh t im balance x j to the outgoing no de with the lo west weigh t w . Figure 3.7 sho ws the cases of: (i) 1000 av eraged digraphs of 20 no des each, where ev ery edge is initialized to 1, and (ii) 1000 av eraged digraphs of 20 no des eac h, where every edge is initialized to 20, resp ectively . Figure 3.7 sho ws that for the first case Algorithm 2 con verges as fast as the one in [ 47 ] (as expected due to the particular initialization used). F or the second case w e ha v e that when the edge’s initialization is greater than 1 then Algorithm 2 is the fastest among algorithms [ 24 , 47 ]. 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 Average of 1000 Graphs of 20 nodes with initial value 1 Number of Iterations Average Total Imbalance Algorithm 2 Rikos and Hadjicostis, CDC, 2013 Gharesifard and Cortes, Allerton, 2009 0 20 40 60 80 100 120 140 160 180 200 0 200 400 600 800 1000 Average of 1000 Graphs of 20 nodes with initial value N Number of Iterations Average Total Imbalance Algorithm 2 Rikos and Hadjicostis, CDC, 2013 Gharesifard and Cortes, Allerton, 2009 Figure 3.7: Comparison b etw een Algorithm 2 , the w eigh t balancing algorithm pro- p osed in [ 47 ] and the im balance-correcting algorithm [ 24 ]. T op figur e: Av erage total im balance plotted against the num b er of iterations for 1000 random digraphs of 20 no des. Bottom figur e: Average total imbalance plotted against the num b er of itera- tions for 1000 random digraphs of 20 no des. Figure 3.8 sho ws the same cases as Figure 3.7 , with the difference that the netw ork consists of 50 no des. The p erformances do not c hange due to the net work size and the conclusions are the same as in Figure 3.7 . 3.4 Chapter Summary In this section, we describ ed an iterative distributed algorithm and established that it conv erges to a w eight balanced digraph after a finite num b er of steps. W e hav e also b ounded the execution time of the prop osed algorithm as O ( n 7 ), where n is the n umber of no des in the digraph and we demonstrated the op eration, p erformance, and adv an tages of the prop osed algorithm via v arious simulations. Distribute d Weight Balancing 29 0 20 40 60 80 100 120 140 160 180 200 0 50 100 150 200 Average of 1000 Graphs of 50 Nodes with Initial Value 1 Number of Iterations Average Total Imbalance Algorithm 2 Rikos and Hadjicostis, CDC, 2013 Gharesifard and Cortes, Allerton, 2009 0 20 40 60 80 100 120 140 160 180 200 0 5000 10000 Average of 1000 Graphs of 50 Nodes with Initial Value 50 Number of Iterations Average Total Imbalance Algorithm 2 Rikos and Hadjicostis, CDC, 2013 Gharesifard and Cortes, Allerton, 2009 Figure 3.8: Comparison b etw een Algorithm 2 , the w eigh t balancing algorithm pro- p osed in [ 47 ] and the im balance-correcting algorithm [ 24 ]. T op figur e: Av erage total im balance plotted against the num b er of iterations for 1000 random digraphs of 50 no des. Bottom figur e: Average total imbalance plotted against the num b er of itera- tions for 1000 random digraphs of 50 no des. Chapter 4 W eigh t Balancing o v er Unreliable Comm unication In this c hapter, we presen t a no vel distributed algorithm which deals with the problem of balancing a w eigh ted digraph in the presence of time dela ys and pack et drops ov er the comm unication links. The algorithm presented in this chapter has app eared in [ 49 , 50 ]. This chapter is organized as follo ws. In Section 4.1 we present the additional notation needed in this chapter and the mo del used for the time dela ys and the w ay they manifest themselv es, while in Section 4.2 we present the problem form ulation. In Section 4.3 we in tro duce a no v el distributed algorithm whic h ac hieves integer weigh t balancing in a m ulti-comp onen t system, in the presence of time dela ys ov er the comm unication links. W e present a formal description of the prop osed distributed algorithm, demonstrate its p erformance via an illustrative example and sho w that it con verges to a w eigh t balanced digraph after a finite num b er of iterations in the presence of b ounded time dela ys ov er the comm unication links. In Section 4.4 we discuss an even t-triggered version of the prop osed distributed algorithm and show that it results in a w eigh t balanced digraph after a finite n umber of iterations in the presence of arbitrary (time-v arying, inhomogeneous) but b ounded time delays o v er the comm unication links. In Section 4.5 w e show that the prop osed distributed algorithm is also able to con verge (with probabilit y one) to a weigh t balanced digraph in the presence of un b ounded dela ys (pac ket drops). In Section 4.5.1 w e presen t sim ulation results and comparisons of the prop osed distributed algorithm and the chapter is concluded in Section 4.6 . 4.1 Mo deling Time Dela ys and P ac k et Drops In this c hapter, w e assume that no de v j assigns a unique order in the set { 0 , 1 , ..., D + j − 1 } , to each of its outgoing edges. The order of link ( v l , v j ) is denoted by P lj (suc h that { P lj | v l ∈ N + j } = { 0 , 1 , ..., D + j − 1 } ) and will b e used later on as a w ay of allo wing 30 Weight Balancing over Unr eliable Communic ation 31 no de v j to make changes to its outgoing edge weigh ts in a predetermined r ound-r obin 1 fashion. F urthremore, for the developmen t of the results in this chapter, we assume that a trans- mission on the link from no de v j to no de v l initiated at time step k undergo es an a priori unknown delay τ lj [ k ], where τ lj [ k ] is an in teger that satisfies 0 ≤ τ lj [ k ] ≤ τ lj ≤ ∞ (i.e., dela ys are b ounded 2 ). The maximum delay is denoted by τ = max ( v l ,v j ) ∈E τ lj . In the w eight balancing setting we consider, no de v j is in c harge of assigning weigh ts f lj [ k ] to each link ( v l , v j ) and of sending to each out-neigh b or v l the v alue f lj [ k ]. Under the ab o v e dela y mo del, the w eight f lj [ k ] b ecomes av ailable to no de v l at time step k + τ lj [ k ]. F rom the p ersp ectiv e of no de v j , the delay ed w eigh t for link ( v j , v i ), ∀ v i ∈ N − j , at time step k is given by f j i [ k ] = f j i [ k last ] , where k last = max { s | s + τ j i [ s ] ≤ k } , (4.1) i.e., f j i [ k ] is the most recen tly sent weigh t f j i [ · ] seen at no de v j b y time step k . The weigh ts av ailable on the incoming links of no de v j at time step k comprise the v alues receiv ed by its in-neigh b ors by that time, i.e., it is the s et of v alues in the set { f j i [ s ] | 0 ≤ s ≤ k , s + τ j i [ s ] ≤ k , v i ∈ N − j } where f j i [ s ] denotes the v alue sen t b y the in-neighbor v i to no de v j at time step s , and is received at v j b y time step k . The proto col we prop ose has each no de v j up date the information state at time k by com bining (in a linear fashion) its own outgoing-edge v alues f lj [ k ] , ∀ v l ∈ N + j (whic h are a v ailable without delay) and the p ossibly dela yed information received by time step k from its in-neighbors { f j i [ s ] | 0 ≤ s ≤ k , s + τ j i [ s ] ≤ k , v i ∈ N − j } , i.e., the v alues that arriv e at no de v j b y time k . R emark 4.1 . In our case, the ab ov e definition of f j i [ k ] is equiv alent to f j i [ k ] = max { f j i [ s ] | s + τ j i [ s ] ≤ k } b ecause, during the execution of the algorithm presen ted later, the w eights f j i on each edge ( v j , v i ) are assigned by no de v i in a non-decreasing manner, i.e., for v j ∈ N + i , f j i [ k ] ≤ f j i [ k + 1], where k ∈ N 0 . Pr op osition 4 . When f j i [ k ] are non-decreasing and delays are b ounded, the ab ov e dela y mo del, implies that f j i [ k + τ ] ≥ f j i [ k ]. Pr o of. The pro of follows directly from the definition of f j i [ k ]. W e ha ve that f j i [ k + τ ] = f j i [ k last ] where k last = max { s | s + τ j i [ s ] ≤ k + τ } . Obviously , k last ≥ k b ecause τ j i [ k ] ≤ τ . Since the weigh ts of each edge are non-decreasing we hav e that f j i [ k + τ ] = f j i [ k last ] ≥ f j i [ k ]. 1 Eac h no de v j up dates (increases) the weigh ts of its out-neighbors by following a unique predeter- mined order. More sp ecifically , following this predetermined order, no de v j up dates (increases by unity) its weigh ts, one at a time, until it b ecomes balanced. The next time it needs to up date the weigh ts of its out-neigh b ors, it will contin ue from the outgoing edge it stopp ed the previous time and cycle through the edges in a round-robin fashion according to the unique predetermined ordering. 2 W e later relax the assumption of b ounded delays and consider pack et dropping links. Weight Balancing over Unr eliable Communic ation 32 Definition 5 . Given a weigh ted digraph G d = ( V , E , F ) of order n , the total in-weight seen at time step k by no de v j is S − j [ k ] = P v i ∈N − j f j i [ k ]. Since, for every no de, the w eights of its outgoing edges are a v ailable without delay , the total out-weight of no de v j at time step k is the same as in Definition 1 (denoted by S + j [ k ]). Definition 6 . Given a w eighted digraph G d = ( V , E , F ) of order n , the delay ed w eight imb alanc e of no de v j , calculated at time step k , is x j [ k ] = S − j [ k ] − S + j [ k ]. Definition 7 . Given a weigh ted digraph G d = ( V , E , F ) of order n , the total delaye d imb alanc e of digraph G d , at a time step k , is ε [ k ] = P n j =1 | x j [ k ] | . Apart from b ounded delays, unr eliable comm unication links in practical settings could also result in p ossible pac ket drops (i.e., unbounded delays) in the corresp onding com- m unication net work. T o mo del pack et drops, w e assume that, at each time step k , a pac ket that is sen t from no de v i to no de v j on link ( v j , v i ) ∈ E is dropp ed with probabil- it y q j i , where we ha ve q j i < 1. F or simplicity , we assume indep endence b etw een pack et drops at different time steps or differen t links. W e establish that, in b oth cases, despite the presence of bounded delays or pac ket drops, the proposed distributed algorithm con- v erges, after a finite n umber of iterations, to a w eight balanced digraph that is identical to the one obtained under no pack et drops (in the case of pack et drops this con vergence o ccurs with probability one). 4.2 Problem Statemen t W e are given a strongly connected digraph G d = ( V , E ), with a set of no des V = { v 1 , v 2 , . . . , v n } and a set of edges E ⊆ V × V − { ( v j , v j ) | v j ∈ V } . W e w ant to de- v elop a distributed algorithm that allo ws the no des to iteratively adjust the w eigh ts on their edges so that they even tually obtain a set of in teger w eights { f j i | ( v j , v i ) ∈ E } that satisfy the following: 1. f j i ∈ N for every edge ( v j , v i ) ∈ E ; 2. f j i = 0 if ( v j , v i ) / ∈ E ; 3. S + j = S − j = S − j for every v j ∈ V . W e in tro duce and analyze a distributed algorithm that allo ws eac h node to assign in teger w eights to its outgoing links, so that the res ulting weigh t assignmen t is balanced. The prop osed algorithm is able to handle arbitrary but b ounded time-dela ys that ma y affect the information exchange b etw een agents in the system. W e also explicitly b ound the n umber of steps required for conv ergence. Among other implications, this b ound estab- lishes that the prop osed algorithm completes its op eration in p olynomial time, as long Weight Balancing over Unr eliable Communic ation 33 as the underlying digraph is strongly connected or is a collection of strongly connected digraphs. 3 4.3 Distributed Algorithm for W eigh t Balancing in the Presence of Time Dela ys Giv en a strongly connected digraph G d = ( V , E ), the algorithm has each no de initialize the w eights of all of its outgoing edges to unit y . W e consider for now that in digraph G d , each link transmission can undergo an arbitrary but b ounded delay . In order to handle dela ys, we employ a strategy where the no des run a w eight balancing proto col and process weigh t information as so on as it arrives. According to this proto col, eac h no de en ters an iterative stage where it p erforms the following steps: 1. It computes its dela y ed weigh t imbalance according to the latest received w eigh t v alues from its in-neighbors. 2. If it has p ositive (delay ed) im balance, it increases b y 1 the integer w eights of its outgoing edges one at a time, follo wing the priorit y order until it b ecomes weigh t balanced. This means that the outgoing edges are assigned, if p ossible, equal in teger w eights; otherwise, if this is not p ossible, they are assigned in teger weigh ts suc h that the maximum difference among them is equal to one (it should b e clear that for a giv en S − j the order among the outgoing links of no de v j mak e this assignmen t unique). W e argue that the ab ov e distributed algorithm obtains integer w eights that balance the digraph after a finite num b er of iterations (which we b ound in terms of the num b er of no des/edges of the given digraph). Using a path-based analysis of the algorithm, w e pro ve that the resulting weigh t balanced digraph is unique and indep endent of the link- dela ys that ma y o ccur during the execution of the algorithm. F or simplicity , we assume that during the execution of the distributed algorithm, the no des up date the w eights on their outgoing edges in a sync hronous 4 manner based on the information a v ailable at each no de at that particular instant. Note that if the dela y b et ween async hronous changes in w eights of differen t links can b e b ounded b y some maximum delay then asynchronous up dates can b e captured by our sync hronized delay ed comm unication mo del if we allo w an increase in ¯ τ . 4.3.1 F ormal Description of Distributed Algorithm A formal description of the prop osed distributed algorithm is presented in Algorithm 3 . 3 As discussed in [ 24 ], this is a necessary and sufficient condition for weigh t-balancing to b e p ossible. 4 Ev en though we do not discuss this issue in the thesis, asynchronous op eration is not a problem for the distributed algorithm. Weight Balancing over Unr eliable Communic ation 34 Algorithm 3 Distributed balancing in the presence of time delays Input A strongly connected digraph G d = ( V , E ) with n = |V | no des and m = |E | edges. Initialization Set k = 0; each no de v j ∈ V do es the following: 1. It assigns a unique priority order to its outgoing edges as P lj , for v l ∈ N + j (suc h that { P lj | v l ∈ N + j } = { 0 , 1 , ..., D + j − 1 } ). 2. It sets its outgoing edge weigh ts as f lj [0] =  0 , if ( v l , v j ) / ∈ E , 1 , if ( v l , v j ) ∈ E . 3. It sets its (p erceived) incoming weigh ts to b e equal to unity , f j i [0] = 1, ∀ v i ∈ N − j . 4. It transmits the weigh ts f lj [0] on each outgoing edge ( v l , v j ) ∈ E to each v l ∈ N + j . Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1. It receiv es the weigh ts on its incoming edges f j i [ k ]. More specifically , for eac h no de v i ∈ N − j let F j i = { f j i [ s + τ j i [ s ]] | s + τ j i [ s ] = k } b e the set of weigh ts of link ( v j , v i ) ∈ E that arrive at no de v j at time step k . W e hav e that f j i [ k + 1] = ( f j i [ k ] , if F j i = ∅ , max { f j i [ k ] , max f j i ∈F j i { f j i }} , if F j i 6 = ∅ . 2. It computes its weigh t im balance according to the latest receiv ed w eight v alues from its in-neighbors x j [ k + 1] = S − j [ k + 1] − S + j [ k + 1] . 3. If x j [ k + 1] = br + j > 0, it sets the v alues of the w eights on its outgoing edges to f lj [ k + 1] =  S − j [ k +1] D + j  , ∀ v l ∈ N + j . Then, it c ho oses the set of the first (according to the priorit y order) S − j [ k + 1] − D + j $ S − j [ k + 1] D + j % outgoing edges, and increases their w eight by 1 so that | f lj [ k + 1] − f hj [ k + 1] | ≤ 1 , ∀ v l , v h ∈ N + j and S + j [ k + 1] = S − j [ k ]. 4. It transmits the new weigh ts f lj [ k + 1] on each outgoing edge ( v l , v j ) ∈ E to the corresp onding out-neigh b or v l ∈ N + j . 5. It rep eats (increases k to k + 1 and go es back to Step 1). Weight Balancing over Unr eliable Communic ation 35 The follo wing lemma is useful in our analysis later on. Lemma 4.2. Supp ose that at iter ation k no de v j has in-weights { f j i [ k ] | v i ∈ N − j } . Given a unique or der P lj , wher e v l ∈ N + j , on its outgoing links (such that { P lj | v l ∈ N + j } = { 0 , 1 , ..., D + j − 1 } ), we have that f lj [ k + 1] = F lj ( X v i ∈N − j f j i [ k ]) . Mor e over, F lj is monotonic al ly non-de cr e asing in its ar gument, i.e., F lj ( x ) ≥ F lj ( y ) if x ≥ y . Pr o of. F rom the algorithm description we hav e that for integer x , we hav e that F lj ( x ) = $ x D + j % + ind l ( x ) , where ind l =      1 , if P lj < x −  x D + j  D + j , 0 , otherwise. F lj ( x ) is clearly monotonic in its argument. W e no w illustrate the distributed algorithm via an example and then explain why it asymptotically results in a weigh t balanced digraph after a finite num b er of iterations. W e also obtain b ounds on its execution time. 4.3.2 Illustrativ e Example of Distributed Algorithm Consider the digraph G d = ( V , E ) in Figure. 4.1 , where V = ( v 1 , v 2 , . . . , v 6 ), E = ( m 31 , . . . , m 46 ), E ⊆ V × V − { ( v i , v i ) | v i ∈ V } . The weigh t on each edge is initial- ized to f lj [0] = 1 for ( v l , v j ) ∈ E and eac h no de assigns a unique priority order to eac h of its outgoing edges. F or the purp oses of this example, let us assume that the priority orders are as follows: • v 1 : P 31 = 1, • v 2 : P 32 = 1, • v 3 : P 13 = 1 , P 23 = 2 , P 43 = 3, • v 4 : P 54 = 1 , P 64 = 2, • v 5 : P 15 = 1 , P 35 = 2 , P 45 = 3, • v 6 : P 26 = 1 , P 46 = 2. Weight Balancing over Unr eliable Communic ation 36 (F or example, no de v 4 will first increase f 54 and then f 64 ). As a first step, each node computes its weigh t imbalance x j [0] = S − j [0] − S + j [0], ∀ v j ∈ V (these v alues are sho wn in Figure. 4.1 ). v 6 v 3 v 5 v 4 v 1 v 2 x 1 = 1 x 2 = 1 x 3 = 0 x 4 = 1 x 5 = − 2 x 6 = − 1 1 1 1 1 1 1 1 1 1 1 1 1 Figure 4.1: W eighted digraph with initial w eigh ts and initial im balances for each no de. Once eac h no de computes its imbalance, the distributed algorithm requires each no de with p ositive im balance to increase the v alue of the weigh ts on its outgoing edges b y equal in teger amoun ts (or with maximum difference betw een them equal to one) according to the predetermined priority order that eac h no de assigned to its outgoing edges, so that the total increase makes the no de balanced. In this case, the no des that hav e p ositiv e im balance are no des v 1 , v 2 and v 4 (equal to x 1 [0] = 1 , x 2 [0] = 1 and x 4 [0] = 1) resp ectiv ely), and they increase their outgoing edges as shown in Figure 4.2 . v 6 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = − 2 x 6 = − 1 1 2 1 2 1 1 1 2 1 1 1 1 Figure 4.2: Distribution of imbalance from positively im balanced no des. In Figure 4.2 we can see that the edges m 31 , m 32 , m 54 ha ve now v alues equal to 2. Note here that the nodes v 1 , v 2 and v 4 increased the edge-w eigh ts f 31 , f 32 and f 54 resp ectiv ely , since the corresp onding no des had the highest order (as chosen by the no des during the initialization step). No des v 3 and v 5 will receiv e the new weigh ts of their incoming edges after a n umber of iterations equal to the corresp onding time-delay for eac h edge i.e., v 3 and v 5 will receive them after τ 31 [0], τ 32 [0] and τ 54 [0], resp ectiv ely . F or example, let us consider that the time delays are equal to τ 31 [0] = 6, τ 32 [0] = 3 and τ 54 [0] = 7. This Weight Balancing over Unr eliable Communic ation 37 means that no de v 3 will receiv e the new weigh t of m 31 at k = 6 and the new w eight of m 32 at k = 3, while v 5 will receiv e the new w eight of m 54 at k = 7. In Figure 4.3 , w e can see the digraph at time step k = 5. Here, no de v 3 has receiv ed the new weigh t of edge m 32 and has increased its outgoing edge m 13 b y 1 (b ecause it has the highest priorit y order) while it maintains the v alue of its outgoing edge m 23 (whic h has the second priorit y order) the same (and equal to 1) b ecause the new weigh t of the edge m 31 has not yet arrived. v 6 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = − 2 x 6 = − 1 1 3 2 2 1 1 1 2 1 1 1 1 Figure 4.3: Distribution of delay ed imbalance from p ositively imbalanced no des. Note here that all the no des in the digraph contin ue to send the same v alues on their outgoing edges at every iteration un til they receive up dated w eigh ts on their incoming edges. This means that the time delays τ 31 [0], τ 32 [0] and τ 54 [0] are not necessarily the time-steps after which the no des v 3 and v 5 will b e informed for the new w eights of their incoming edges. F or example, if τ 32 [0] = 3 then v 3 will receive the new weigh t f 32 [1] = 2 at iteration k = 3; how ever, at iteration k = 1 no de v 2 re-sends its outgoing w eigh ts to its out-neighbors; th us, if τ 32 [1] = 1 then v 3 will receive the new weigh t f 32 [1] = 2 at iteration k = 2 (it will also receive it at k = 3) and it will act accordingly (it will essen tially ignore it). After the integer weigh t up date on the outgoing edges of eac h no de with p ositive imbal- ance at k = 0, the no des c heck for up dated incoming edge w eight s f j i [1], ∀ ( v j , v i ) ∈ E (assuming that f j i [1] = f j i [0] = f j i [0] if no w eigh t is received). Then they rec alculate their im balances x j [1], ∀ v j ∈ V , and the pro cess is rep eated. After a finite num b er of iterations, which w e explicitly b ound in the next sections, we reac h the weigh ted di- graph with integer w eights shown in Figure 4.4 . As we will argue later on the thesis, this weigh ted digraph is the same irresp ective of how time-delays manifest themselves. 4.3.3 Execution Time Analysis of Distributed Algorithm In this section we analyze the functionality of the distributed algorithm and we pro ve that it solv es the weigh t balancing problem in the presence of arbitrary (time-v arying, inho- mogeneous) but b ounded time delays that may app ear during the information exc hange Weight Balancing over Unr eliable Communic ation 38 v 6 v 3 v 5 v 4 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = 0 x 6 = 0 3 4 3 4 3 2 1 3 1 1 1 1 Figure 4.4: Final weigh t balanced digraph. b et w een agen ts in the system. Sp ecifically , we prov e that the prop osed distributed al- gorithm results in a set of weigh ts that form a w eight balanced matrix after O ( n 6 τ ) iterations, where n is the num b er of no des of the giv en digraph and τ is the maximum dela y in the digraph; also we show that the resulting weigh t balanced digraph is unique (irresp ectiv e of ho w delays manifest themselv es) and iden tical to the one we obtain when transmissions b et ween nodes happ en instan taneously (no delays). W e b egin the analysis with the following theorem. Setup: Consider an arbitrary strongly connected digraph G d = ( V , E ), where V = ( v 1 , v 2 , . . . , v n ) is the set of no des, and E ⊆ V × V − { ( v j , v j ) | v j ∈ V } is the set of edges. Consider an execution of the prop osed distributed algorithm where there are no dela ys ( τ = 0) and denote the resulting weigh ts on the edges as f ∗ lj [0] = 1 , f ∗ lj [1] , ..., f ∗ lj [ k ] , ... ∀ ( v l , v j ) ∈ E . Consider another execution of the prop osed distributed balancing algorithm where there are arbitrary but b ounded delays (0 < τ < ∞ ) and denote the resulting set of weigh ts as T r ansmitted : f lj [0] = 1 , f lj [1] , ..., f lj [ k ] , ... ∀ ( v l , v j ) ∈ E , Receiv ed : f lj [0] = 1 , f lj [1] , ..., f lj [ k ] , ... ∀ ( v l , v j ) ∈ E . Theorem 4.3. Under the ab ove setup, we have for al l ( v l , v j ) ∈ E and al l k ≥ 0 1. f ∗ lj [ k + 1] ≥ f ∗ lj [ k ] , 2. f lj [ k + 1] ≥ f lj [ k ] , 3. f lj [ k + 1] ≥ f lj [ k ] . Pr o of. Consider the case when τ = 0. At Step 2 of the prop osed algorithm (at an arbitrary iteration k ), if no de v j has p ositiv e imbalance x j [ k ] > 0 then it increases the w eights on its outgoing edges so that it b ecomes weigh t balanced (i.e., f ∗ lj [ k + 1] ≥ f ∗ lj [ k ], Weight Balancing over Unr eliable Communic ation 39 ∀ v l ∈ N + j ). If no de v i has negativ e (or zero) im balance x j [ k ] ≤ 0, it leav es the weigh ts of its outgoing edges unchanged (i.e., f ∗ lj [ k + 1] = f ∗ lj [ k ], ∀ v l ∈ N + j ). As a result, w e hav e f ∗ lj [ k + 1] ≥ f ∗ lj [ k ] , ∀ ( v l , v j ) ∈ E . Consider now the case when arbitrary but b ounded time-delays ( τ > 0) affect link transmissions. Using a similar argument as ab ov e we easily establish that f lj [ k + 1] ≥ f lj [ k ] , ∀ ( v l , v j ) ∈ E . By the definition of f lj [ k + 1] we ha ve that f lj [ k + 1] = f lj [ k last ] where k last = max { s | s + τ lj [ s ] ≤ k + 1 } . Similarly , f lj [ k ] = f lj [ k 0 last ] where k 0 last = max { s | s + τ lj [ s ] ≤ k } . Clearly , k 0 last ≤ k last and since f lk [ k + 1] ≥ f lj [ k ] and k last ≥ k 0 last w e hav e that f lj [ k + 1] ≥ f lj [ k ] , ∀ v l ∈ N + j , whic h completes the pro of. After establishing monotonicit y for the w eigh ts of the outgoing edges for every no de in the digraph, we contin ue with the follo wing theorem. Theorem 4.4. Under the ab ove setup, it holds that for every k , f lj [ k ] ≤ f ∗ lj [ k ] ≤ f lj [( k + 1)( τ + 1)] , ∀ ( v l , v j ) ∈ E . (4.2) Pr o of. The pro of is by induction. F or k = 0, we hav e at initialization f lj [0] = f ∗ lj [0] ≤ f lj [ τ + 1], where f lj [0] = f ∗ lj [0] = 1, and ( 4.2 ) holds (since f lj [ k ] and f ∗ lj [ k ] are non decreasing and min { f lj [ k ] } = 1, for ev ery k ). Let us assume that for ev ery ( v l , v j ) ∈ E w e hav e f lj [ k ] ≤ f ∗ lj [ k ] ≤ f lj [( k + 1)( τ + 1)] , b y the induction hypothesis. W e w ould like to show that f lj [ k + 1] ≤ f ∗ lj [ k + 1] ≤ f lj [( k + 2)( τ + 1)] , ∀ ( v l , v j ) ∈ E . The fact that f lj [ k + 1] ≤ f ∗ lj [ k + 1] is a consequence of Theorem 4.3 ; we hav e that f lj [ k + 1] = f lj [ k last ] where k last = max { s | s + τ j i [ s ] ≤ k + 1 } . Clearly , k last ≤ k + 1 and (from Theorem 4.3 ) f lj [ k last ] ≤ f lj [ k + 1]. As a result, w e ha v e that f lj [ k + 1] ≤ f lj [ k + 1]. T o show that f lj [ k + 1] ≤ f ∗ lj [ k + 1] w e observe that i) f lj [ k ] ≤ f ∗ lj [ k ] (by induction hypothesis), ii) It follo ws from Lemma 4.2 that f lj [ k + 1] = F lj ( P v i ∈N − j f j i [ k ]) ≤ f ∗ lj [ k + 1] = F lj ( P v i ∈N − j f ∗ j i [ k ]), ∀ ( v l , v j ) ∈ E . As a result, since f lj [ k + 1] ≤ f lj [ k + 1] and f lj [ k + 1] ≤ f ∗ lj [ k + 1] we hav e that f lj [ k + 1] ≤ f ∗ lj [ k + 1]. Weight Balancing over Unr eliable Communic ation 40 W e are left with sho wing that f ∗ lj [ k + 1] ≤ f lj [( k + 2)( τ + 1)]. F rom the induction h yp othesis, we hav e that f ∗ lj [ k ] ≤ f lj [( k + 1)( τ + 1)]. W e observ e that i) f ∗ lj [ k + 1] = F lj ( P v i ∈N − j f ∗ j i [ k ]) ≤ F lj ( P v i ∈N − j f j i [( k + 1)( τ + 1)]) = f lj [( k + 1)( τ + 1) + 1], ii) f lj [( k + 1)( τ + 1) + 1] ≤ f lj [( k + 2)( τ + 1)] (from Prop osition 4 ). As a result, we hav e that f ∗ lj [ k + 1] ≤ f lj [( k + 2)( τ + 1)] and ( 4.2 ) holds. No w, w e can pro ceed with the final theorem where w e establish that the prop osed balancing algorithm con verges to a set of weigh ts that form a w eigh t balanced digraph, whic h is unique and indep enden t of the o ccurring dela ys. Theorem 4.5. Under the ab ove setup, the pr op ose d b alancing algorithm under no delays ( τ = 0 ) c onver ges to a set of weights f ∗ lj that form a weight b alanc e d digr aph after a finite numb er of steps b ounde d by O ( n 6 ) while the pr op ose d b alancing algorithm in the pr esenc e of nonzer o delays ( τ > 0 ) c onver ges to a set of weights f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after O ( n 6 τ ) iter ations. Pr o of. As shown in [ 47 ], for the case where τ = 0, the prop osed distributed algorithm reac hes a set of weigh ts that forms a weigh t balanced digraph F ∗ after a finite n um b er of steps b ounded b y O ( n 6 ), where n is the num b er of no des in the digraph. This means that for every ( v l , v j ) ∈ E , ∃ k 0 ∈ N 0 for which f ∗ lj [ k + 1] = f ∗ lj [ k ] , ∀ k ≥ k 0 . F rom ( 4.2 ) w e ha ve f lj [( k 0 + 1)( τ + 1)] ≥ f ∗ lj [ k 0 ] and f lj [( k 0 + 1)( τ + 1)] ≤ f ∗ lj [( k 0 + 1)( τ + 1)]; how ev er, since f ∗ lj [ k 0 ] = f ∗ lj [( k 0 + 1)( τ + 1)] w e ha ve f lj [( k 0 + 1)( τ + 1)] = f ∗ lj [ k 0 ], which means that the prop osed algorithm reac hes a set of weigh ts f lj = f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E after ( k 0 + 1)( τ + 1) time steps. As a result, since the τ = 0 case completes its op eration after O ( n 6 ) steps (from [ 47 ]), then the prop osed distributed algorithm completes its op eration after O ( n 6 τ ) steps where n and τ are the num b er of no des and the maximum dela y in the given digraph, resp ectively . F urthermore, since f lj [( k 0 + 1)( τ + 1)] = f ∗ lj [ k 0 ], ∀ ( v l , v j ) ∈ E , then the resulting edge weigh ts are equal to the resulting edge weigh ts of the case where no delays affect link transmissions. 4.4 Extension to Ev ent-T riggered Op eration Motiv ated b y the need to reduce energy consumption, c omm unication bandwidth, net- w ork congestion, and/or pro cessor usage, many researchers hav e considered the use of even t-triggered comm unication and con trol [ 51 , 52 ]. In this section, we discuss an ev ent-triggered op eration of the prop osed distributed algorithm where each agent au- tonomously decides when communication and con trol up dates should o ccur so that the resulting net w ork executions still result in a weigh t balanced digraph after a finite n um- b er of steps in the presence of arbitrary (time-v arying, inhomogeneous) but b ounded Weight Balancing over Unr eliable Communic ation 41 time dela ys that migh t affect link transmissions. More sp ecifically , following the pro- p osed even t-triggered strategy , w e can pro v e that (i) all no des even tually stop transmit- ting, and (ii) the prop osed distributed algorithm is able to obtain a set of weigh ts that balance the corresp onding digraph after a finite num b er of iterations. 4.4.1 F ormal Description of Distributed Algorithm A formal description of the algorithm’s even t-triggered version is presented in Algo- rithm 4 . 4.4.2 Execution Time Analysis of Distributed Algorithm Pr op osition 5 . Under the ab ov e setup , the prop osed even t-triggered balancing al- gorithm con verges, in the presence of b ounded delays ( τ > 0), to a set of weigh ts f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after a finite n umber of steps b ounded b y O ( n 6 τ ) iterations (where the set of weigh ts f ∗ lj is the set of weigh ts obtained by the nominal algorithm that runs with no even-triggering and no delays). Pr o of. As shown in [ 47 ], when τ = 0 the distributed algorithm in Section 4.3.1 reaches, after a finite num b er of steps b ounded by O ( n 6 ) (where n is the num b er of no des in the digraph), a set of weigh ts f ∗ lj , ∀ ( v l , v j ) ∈ E , that forms a weigh t balanced digraph. This means that there exists k 0 ∈ N 0 , such that, for every ( v l , v j ) ∈ E , w e hav e f ∗ lj [ k + 1] = f ∗ lj [ k ] = f ∗ lj , ∀ k ≥ k 0 . Consider no w the even t-triggered op eration of the prop osed distributed balancing algo- rithm in the presence of b ounded dela ys in the comm unication links. The op eration of the ev ent-triggered v ersion is identical to the operation of the prop osed distributed algo- rithm with delays introduced in Section 4.3.1 if we assume that in the latter algorithm all transmissions of identical weigh ts (that o ccur in the original version of the algorithm but not in the even t-triggered v ersion) suffer the maxim um p ossible delay . As a result, since the op eration of b oth algorithms is iden tical 5 , w e hav e that the even t-triggered op eration of the distributed algorithm will conv erge to a set of weigh ts that form a w eight balanced digraph after a finite num b er of steps b ounded by O ( n 6 τ ) iterations. Also, since ∃ k 0 ∈ N 0 for whic h f lj [ k + 1] = f lj [ k ] = f ∗ lj , ∀ k ≥ k 0 , from Step 3 of the algorithm, we can see that all no des even tually stop transmitting (and the w eights are iden tical to the weigh ts obtained by the algorithm in Section 4.3.1 ). R emark 4.6 . It is interesting to note here that ev ent-triggering comes at the cost of sp eed in the sense that retransmissions of identical weigh ts could hav e p otentially allow ed the receiving no de to learn the weigh t change earlier (particularly if the delay after a 5 The op eration is iden tical under different delays in each case. Weight Balancing over Unr eliable Communic ation 42 Algorithm 4 Ev en t-triggered distributed balancing in the presence of time dela ys Input A strongly connected digraph G d = ( V , E ) with n = |V | no des and m = |E | edges. Initialization Set k = 0; each no de v j ∈ V do es the following: 1. It assigns a unique priority order to its outgoing edges as P lj , for v l ∈ N + j (suc h that { P lj | v l ∈ N + j } = { 1 , 2 , ..., D + j } ). 2. It sets its outgoing edge weigh ts as f lj [0] =  0 , if ( v l , v j ) / ∈ E , 1 , if ( v l , v j ) ∈ E . 3. It sets its (p erceived) incoming weigh ts to b e equal to unity , f j i [0] = 1, ∀ v i ∈ N − j . 4. It transmits the new weigh ts f lj [0] on each outgoing edge ( v l , v j ) ∈ E to each v l ∈ N + j . Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1. It receives the weigh ts on its incoming edges f j i [ k + 1]. More sp ecifically , for each in-neigh b oring no de v i ∈ N − j let F j i = { f j i [ s + τ j i [ s ]] | s + τ j i [ s ] = k + 1 } b e the set of weigh ts of link ( v j , v i ) ∈ E that arrive at no de v j at time step k + 1. W e ha ve that f j i [ k + 1] = ( f j i [ k ] , if F j i = ∅ , max { f j i [ k ] , max f j i ∈F j i { f j i }} , if F j i 6 = ∅ . 2. If f j i [ k + 1] = f j i [ k ] for each v i ∈ N − j then skip Steps 3, 4, and 5. Poin t out that this is the ma jor difference from the previous algorithm. 3. It computes its weigh t im balance according to the latest receiv ed w eight v alues from its in-neighbors x j [ k + 1] = S − j [ k + 1] − S + j [ k + 1] . 4. If x j [ k + 1] = br + j > 0, it sets the v alues of the w eights on its outgoing edges to f lj [ k + 1] =  S − j [ k +1] D + j  , ∀ v l ∈ N + j . Then, it chooses the set of the first (according to the priorit y order) S − j [ k + 1] − D + j $ S − j [ k + 1] D + j % outgoing edges, and increases their weigh t by 1 so that | f lj [ k + 1] − f hj [ k + 1] | ≤ 1 , ∀ v l , v h ∈ N + j and S + j [ k + 1] = S − j [ k + 1]. 5. It transmits the new weigh ts f lj [ k + 1] on each outgoing edge ( v l , v j ) ∈ E to the corresp onding out-neigh b or v l ∈ N + j . 6. It rep eats (increases k to k + 1 and go es back to Step 1). Weight Balancing over Unr eliable Communic ation 43 triggering is large, in which case it could b e offset by a smaller dela y in a subsequen t transmission). R emark 4.7 . It is imp ortan t to note here that the prop osed distributed balancing al- gorithm (along with its ev en t triggered op eration) is able to conv erge (with probability one) to a set of weigh ts that form a balanced graph after a finite num b er of iterations in the case where there are differen t (p ossibly unbounded) delay distributions (except the uniform one which was thoroughly analyzed) in the communication links during the information exc hange b etw een no des in the netw ork. 4.5 Distributed Algorithm for W eigh t Balancing in the Presence of P ack et Dropping Links Apart from b ounded delays, unr eliable comm unication links in practical settings could also result in p ossible pack et drops (i.e., un b ounded dela ys) in the corresp onding commu- nication netw ork. In this section, we analyze the p erformance of the prop osed distributed w eight balancing algorithm in the presence of p ossible pac k et drops in the communica- tion links. T o mo del pac k et drops, w e assume that, at each time step k , a pack et that is sen t from no de v i to no de v j on link ( v j , v i ) ∈ E is dropp ed with probabilit y q j i , where we ha v e q j i < 1. F or simplicity , we assume indep endence b etw een pac ket drops at differen t time steps or differen t links. W e establish that, despite the presence of pack et drops, the prop osed distributed algorithm con v erges, with probabilit y one, to a w eight balanced digraph after a finite num b er of iterations. This w eight balanced digraph is iden tical to the one obtained under no pack et drops. Pr op osition 6 . Consider the ab ov e setup , where the proposed balancing algorithm, with no pac ket drops and no dela ys, conv erges to a set of weigh ts f ∗ lj that form a w eight balanced digraph after a finite num b er of ste ps b ounded by O ( n 6 ). In the presence of pack et drops o ccurring with probability q lj , q lj < 1, ∀ ( v l , v j ) ∈ E (indep enden tly b et w een different links and different time steps), the prop osed balancing algorithm also con verges, with probability one, to a set of weigh ts f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after a finite n umber of iterations. Pr o of. As mentioned earlier and shown in [ 47 ] for the case where τ = 0, the prop osed distributed algorithm reaches a set of w eights F ∗ that forms a weigh t balanced digraph after a finite n um b er of steps b ounded by O ( n 6 ), where n is the n um b er of nodes in the digraph. This means that for every ( v l , v j ) ∈ E , ∃ k 0 ∈ N 0 for whic h f ∗ lj [ k + 1] = f ∗ lj [ k ] , ∀ k ≥ k 0 . Consider now an execution of the prop osed distributed balancing algorithm where pack- ets containing information are dropp ed with probabilit y q lj < 1 for each communication Weight Balancing over Unr eliable Communic ation 44 link ( v l , v j ) ∈ E , and assume indep endence b etw een pack et drops at differen t time steps and differen t links. During transmissions on link ( v l , v j ), we hav e that at each transmission, a pack et go es through with probability 1 − q lj > 0. Th us, if w e consider k lj consecutiv e uses of link ( v l , v j ), the probability that at least one pack et will go through is 1 − q k lj lj , which will b e arbitrarily close to 1 for a sufficiently large k lj . Sp ecifically , for any (arbitrarily small)  > 0, we can choose k lj =  log  log q lj  , to ensure that each transmission go es through at least once within k lj steps with prob- abilit y 1 −  . Let τ = max ( v l ,v j ) ∈E { k lj } ; then since the prop osed distributed algorithm completes under no pack et drops in O ( n 6 ) steps, we can conclude that it will complete by O ( n 6 τ ) steps with probability (1 −  ) n 6 |E | in the presence of pack et drops (note that |E | is the n umber of edges in the giv en digraph). By making  arbitrarily small we can mak e this probabilit y arbitrarily close to 1. Moreov er, since this particular execution of the algorithm (that o ccurs with probability (1 −  ) n 6 |E | ) is essentially identical to an execution of the algorithm in Section 4.3.1 with delays that are b ounded b y τ , the final w eigh ts are iden tical to the w eigh ts of that algorithm (i.e., for large enough k we hav e f lj [ k ] = f ∗ lj for all ( v l , v j ) ∈ E ). R emark 4.8 . Note here that the presence of pack et drops can b e dealt in a wa y iden tical to the presence of un b ounded dela ys in the communication links during the information exc hange b etw een no des in the netw ork. In fact, when the delays in the comm unication links are un b ounded, then the prop osed distributed algorithm is still able to obtain a set of weigh ts that balance the corresp onding digraph after a finite n umber of iterations. R emark 4.9 . It is worth p ointing out that the prop osed distributed algorithm is able to conv erge (with probability one) to a set of w eights that form a balanced graph after a finite n umber of iterations when there are b oth p ossible pac ket drops and arbitrary but b ounded time delays in the communication links, while the resulting weigh t bal- anced digraph is again unique and indep enden t of how pac k et drops and dela ys manifest themselv es in link transmissions. 4.5.1 Sim ulation Study In this section, we present sim ulation results and comparisons for the prop osed dis- tributed algorithm. Sp ecifically , w e present detailed numerical results for a random graph of size n = 20 and for the av erage of 1000 random digraphs of 20 and 50 no des Weight Balancing over Unr eliable Communic ation 45 eac h. W e illustrate the b ehavior of the prop osed distributed algorithm for the follow- ing three differen t scenarios: (i) the scenario where there are no pack et drops in the comm unication links ( v j , v i ) ∈ E and each no de v j transmits the w eights f lj [ k + 1] of eac h outgoing edge ( v l , v j ) ∈ E to each v l ∈ N + j at each iteration k , (ii) the scenario where there are pack et drops with equal probabilit y q (where 0 ≤ q < 1) for every comm unication link ( v j , v i ) ∈ E and each no de v j transmits the w eights f lj [ k + 1] of eac h outgoing edge ( v l , v j ) ∈ E to eac h v l ∈ N + j at each iteration k , (iii) the scenario where there are no pack et drops at the communication links ( v j , v i ) ∈ E and eac h no de v j transmits only once the up dated weigh ts f lj [ k + 1] of eac h outgoing edge ( v l , v j ) ∈ E to eac h v l ∈ N + j . Eac h scenario of the prop osed distributed algorithm is analyzed in a) the absence of time-delays in the comm unication links (i.e., τ lj [ k ] = 0, ∀ ( v l , v j ) ∈ E ) and b) the presence of time-dela ys in the comm unication links (i.e., 0 ≤ τ lj [ k ] ≤ τ lj , ∀ ( v l , v j ) ∈ E ). Note here that in the case where τ lj [ k ] = 0, ∀ ( v l , v j ) ∈ E we hav e that f lj [ k ] = f lj [ k ] and the prop osed distributed algorithm is iden tical to the algorithm presented in [ 47 ], where we consider the transmission b etw een no des to happ en instantaneously . Figure 4.5 shows what happ ens in the case of a randomly created graph of 20 no des, in whic h the op eration of the prop osed distributed algorithm includes no pac k et drops at the communication links ( v j , v i ) ∈ E and each no de v j transmits the weigh ts f lj [ k + 1] of eac h outgoing edge ( v l , v j ) ∈ E to each v l ∈ N + j at eac h iteration k . W e plot the total delaye d imb alanc e as a function of the num b er of iterations k for the cases where τ = 0 (solid line), τ = 10 (dashed line) and τ lj = τ = 10, ∀ ( v l , v j ) ∈ E (dashed-dotted line). The plot demonstrates that the prop osed distributed algorithm is able to obtain a set of w eights that balance the corresp onding digraph after a finite num b er of iterations as argued in the previous section. Figure 4.6 sho ws the same case as Figure 4.5 , with the difference that the op eration of the prop osed distributed algorithm includes pac ket drops with equal probability q (where 0 < q < 1) for every comm unication link ( v j , v i ) ∈ E and each no de v j transmits the w eights f lj [ k + 1] of each outgoing edge ( v l , v j ) ∈ E to eac h v l ∈ N + j at eac h iteration k . Here, the plot suggests, that the prop osed distributed algorithm is able to obtain a set of weigh ts that balance the corresp onding digraph after a finite n um b er of iterations. Figure 4.7 shows the same case as Figures 4.5 and 4.6 , with the difference b eing that the op eration of the prop osed distributed algorithm includes no pack et drops at the comm unication links ( v j , v i ) ∈ E but each node v j transmits only once the up dated w eights f lj [ k + 1] of eac h outgoing edge ( v l , v j ) ∈ E to each v l ∈ N + j . Here, the plot demonstrates that the prop osed distributed algorithm is able to obtain a set of weigh ts that balance the corresp onding digraph after a finite num b er of iterations. Figure 4.8 shows what happens for the av erage of 1000 random digraphs of 20 no des each for the three scenarios of the proposed distributed algorithm presen ted in Figures 4.5 , 4.6 Weight Balancing over Unr eliable Communic ation 46 0 100 200 300 400 500 600 700 800 0 5 10 15 20 25 30 35 40 45 50 Number of Iterations Total Delayed Imbalance Total Delayed Imbalance vs Iterations for Random Graph of 20 Nodes τ = 0 0 < τ < 10 τ = 10 Figure 4.5: T otal dela yed imbalance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid line), 0 < τ lj < τ where τ = 10 (dashed line) and in the case where τ lj = τ = 10 (dashed-dotted line). 0 100 200 300 400 500 600 700 800 0 5 10 15 20 25 30 35 40 45 Number of Iterations Total Delayed Imbalance Total Delayed Imbalance vs Iterations for Random Graph of 20 Nodes q = 0.5, τ = 0 q = 0.5, 0 < τ < 10 q = 0.5, τ = 10 Figure 4.6: T otal dela yed imbalance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid line), 0 < τ lj < τ where τ = 10 (dashed line) and in the case where τ lj = τ = 10 (dashed-dotted line). and 4.7 resp ectively . Note that the plot colors of the three scenarios in Figures 4.5 , 4.6 and 4.7 , remain the same in Figure 4.8 (i.e., the scenarios of Figures 4.5 , 4.6 and 4.7 are sho wn with blue, red and green, resp ectiv ely , in Figure 4.8 ). W e plot the av erage total dela yed imbalance as a function of the n um b er of iterations k in logarithmic scale for τ = 0 (solid lines), τ = 10 (dashed lines) and τ lj = τ = 10, ∀ ( v l , v j ) ∈ E (dashed-dotted lines). Here w e can see that the first scenario of the prop osed distributed algorithm (presen ted in Figure 4.5 ) is iden tical to the third one (presented in Figure 4.7 ) for the case where there are no time-delays in the comm unication links (i.e., τ lj [ k ] = 0, Weight Balancing over Unr eliable Communic ation 47 0 100 200 300 400 500 600 700 800 0 10 20 30 40 50 60 Number of Iterations Total Delayed Imbalance Total Delayed Imbalance vs Iterations for Random Graph of 20 Nodes τ = 0 0 < τ < 10 τ = 10 Figure 4.7: T otal dela yed imbalance plotted against the num b er of iterations for a random digraph of 20 no des in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). ∀ ( v l , v j ) ∈ E ). How ever, the first scenario (Figure 4.5 ) generally outp erforms the second and third scenarios (Figures 4.6 and 4.7 , resp ectively) for the case where there are time- dela ys in the communication links (i.e., 0 ≤ τ lj [ k ] ≤ τ lj , ∀ ( v l , v j ) ∈ E ). 10 0 10 1 10 2 10 3 0 5 10 15 20 25 30 35 40 45 50 Number of Iterations (Log) Average Total Delayed Imbalance Total Delayed Imbalance vs Iterations for Average of 1000 Graphs of 20 Nodes τ = 0 0 < τ < 10 τ = 10 q = 0.5, τ = 0 q = 0.5, 0 < τ < 10 q = 0.5, τ = 10 τ = 0 0 < τ < 10 τ = 10 Figure 4.8: Av erage total delay ed imbalance plotted against the num b er of iterations in logarithmic scale for 1000 random digraphs of 20 no des each in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). Figure 4.9 shows the same cases as Figure 4.8 , with the difference being that the netw ork consists of 50 no des. The p erformance of the prop osed distributed algorithm do es not c hange due to the net work size and the conclusions are the same as in Figure 4.8 . Weight Balancing over Unr eliable Communic ation 48 10 0 10 1 10 2 10 3 0 50 100 150 200 250 Number of Iterations (Log) Average Total Delayed Imbalance Total Delayed Imbalance vs Iterations for Average of 1000 Graphs of 50 Nodes τ = 0 0 < τ < 10 τ = 10 p = 0.5, τ = 0 p = 0.5, 0 < τ < 10 p = 0.5, τ = 10 τ = 0 0 < τ < 10 τ = 10 Figure 4.9: Av erage total delay ed imbalance plotted against the num b er of iterations in logarithmic scale for 1000 random digraphs of 50 no des each in the case where τ = 0 (solid lines), 0 < τ lj < τ where τ = 10 (dashed lines) and in the case where τ lj = τ = 10 (dashed-dotted lines). 4.6 Chapter Summary In this chapter, w e in tro duced a nov el distributed iterative algorithm and established that it con verges to a weigh t balanced digraph after a finite num b er of steps. W e ha ve also b ounded the execution time of the prop osed algorithm as O ( n 6 τ ), where n is the n umber of no des and τ is the maximum delay in the digraph, and argued that the resulting weigh t balanced digraph is unique and indep endent of how the delays that affect link transmissions materialize. W e also added extensions to handle the cases of pack et drops ov er the communication links and even t-triggered op eration. In b oth scenarios, the proposed algorithm conv erges (with probabilit y one) to a set of weigh ts that form a balanced graph after a finite num b er of iterations while the resulting weigh t balanced digraph is unique and indep enden t of how pack et drops affect link transmissions. W e also demonstrated the op eration, p erformance, and adv an tages of the prop osed algorithm via v arious simulations. Chapter 5 W eigh t Balancing under Link Capacit y Constrain ts In this c hapter, we presen t a no vel distributed algorithm which deals with the problem of balancing a weigh ted digraph in the presence of link capacit y constraints ov er the comm unication links. The algorithm presented in this chapter has app eared in [ 53 , 54 ]. This chapter is organized as follows. In Section 5.1 w e present additional notation and the problem formulation. In Section 5.2 we present the conditions for the existence of a set of integer weigh ts (within the allo wable interv als) that balance a w eighted digraph. In Section 5.3 we in tro duce a nov el distributed algorithm which ac hieves in teger weigh t balancing in a multi-component system, in the presence of sp ecified low er and upp er constrain ts on the edge weigh ts. W e present a formal description of the prop osed dis- tributed algorithm and demonstrate its p erformance via an illustrativ e example. Then w e show that, as long as the conditions presen ted in Section 5.2 hold, the prop osed distributed algorithm con verges to a weigh t-balanced digraph after a finite num b er of iterations and we conclude by we presenting simulation results and comparisons. 5.1 Graph-Theoretic Notions and Problem Statemen t In this c hapter, we assume that a pair of no des v j and v i that are connected b y an edge in the digraph G d (i.e., ( v j , v i ) ∈ E and/or ( v i , v j ) ∈ E ) can exchange information among themselves (in b oth directions). In other w ords, the c ommunic ation top olo gy is captured b y the undirected graph G u = ( V , E u ) that corresponds to a giv en directed graph G d = ( V , E ), where E u = ∪ ( v j ,v i ) ∈E { ( v j , v i ) , ( v i , v j ) } = E ∪ E r , with E r = { ( v i , v j ) | ( v j , v i ) ∈ E } . [Recall that a graph is undirected if and only if ( v j , v i ) ∈ E implies ( v i , v j ) ∈ E .] 49 Weight Balancing under Link Cap acity Constr aints 50 Also, we assume that no de v j assigns a unique order in the set { 0 , 1 , ..., D j − 1 } to eac h of its outgoing and incoming edges. The order of link ( v l , v j ) (or ( v j , v i )) is denoted b y P ( j ) lj (or P ( j ) j i ) (suc h that { P ( j ) lj | v l ∈ N + j } ∪ { P ( j ) j i | v i ∈ N − j } = { 0 , 1 , ..., D j − 1 } ) and will b e used later on as a w ay of allowing no de v j to make changes to its outgoing and incoming edge weigh ts in a unique predetermined order. This unique order is used during the execution of the prop osed distributed algorithm as a wa y of allowing no de v j to transmit messages to its out- and in-neighbors in a r ound-r obin 1 fashion. Giv en a digraph G d = ( V , E ) w e can asso ciate nonnegativ e integer weigh ts f j i ∈ N 0 on eac h edge ( v j , v i ) ∈ E . In this thesis, these weigh ts will b e restricted to hav e p ositive in teger v alues and lie in an in terv al [ l j i , u j i ], i.e., 0 < l j i ≤ f j i ≤ u j i and f j i ∈ N , for ev ery ( v j , v i ) ∈ E . W e will also use matrix notation to denote (resp ectiv ely) the integer w eight, low er limit, and upp er limit matrices by the n × n matrices F = [ f j i ], L = [ l j i ], and U = [ u j i ], where F ( j, i ) = f j i , L ( j, i ) = l j i , U ( j, i ) = u j i , and f j i ∈ N , for every ( v j , v i ) ∈ E (obviously f j i = l j i = u j i = 0 when ( v j , v i ) / ∈ E ). 5.1.1 Problem Statemen t W e are giv en a strongly connected digraph G d = ( V , E ), as well as lo w er and upp er b ounds l j i and u j i ( l j i ≤ u j i , l j i , u j i ∈ R ) on eac h eac h edge ( v j , v i ) ∈ E . W e wan t to dev elop a distributed algorithm that allows the no des to iterativ ely adjust the w eights on their edges so that they even tually obtain a set of integer weigh ts { f j i | ( v j , v i ) ∈ E } that satisfy the following: 1. f j i ∈ N 0 for each edge ( v j , v i ) ∈ E . 2. l j i ≤ f j i ≤ u j i for each edge ( v j , v i ) ∈ E ; 3. S + j = S − j for each v j ∈ V ; The distributed algorithm needs to resp ect the communication constrain ts imp osed by the undirected graph G u that corresp onds to the given directed graph G d . R emark 5.1 . One of the main differences of this c hapter with c hapters 3 and 4 is that the algorithms presen ted in this c hapter require a bidirectional communication top ology , whereas the aforementioned algorithms assume a communication topology that matches the weigh t (physical) top ology . W e should p oin t out that direct application of these earlier algorithms to the problem that is of in terest in this c hapter will generally fail (b ecause weigh ts are restricted to lie within low er and upp er limits). Also, note that there are man y applications where the physical top ology is directed but the communication 1 Eac h no de v j transmits to its out- and in-neigh b ors by follo wing a unique predetermined order. The next time it needs to transmit to an out- or in-neighbor, it will contin ue from the outgoing or incoming edge it stopp ed the previous time and cycle through the edges in a round-robin fashion according to the unique predetermined ordering. Weight Balancing under Link Cap acity Constr aints 51 top ology is bidirectional (e.g., traffic weigh t in an one wa y street is directional, but comm unication b et ween traffic lights at the end p oin ts of the street will, in fact, b e bidirectional). In such cases, the algorithms prop osed here are directly applicable. More generally , in many applications, the comm unication top ology do es not necessarily matc h the ph ysical one. 5.2 In teger Circulation Conditions Giv en a strongly connected digraph G d = ( V , E ), with lo wer and upp er b ounds l j i and u j i (0 < l j i ≤ u j i ) on each edge ( v j , v i ) ∈ E , the necessary and sufficient conditions for the existence of a set of inte ger weigh ts { f j i | ( v j , v i ) ∈ E } that satisfy the c ap acity c onstr aints (i.e., l j i ≤ f j i ≤ u j i for each edge ( v j , v i ) ∈ E ), and b alanc e c onstr aints (i.e., S + j = S − j for ev ery v j ∈ V ), can b e stated (by adopting Theorem 3 . 1 in [ 36 ]) as follo ws: (i) for every ( v j , v i ) ∈ E , we hav e d l j i e ≤ b u j i c , (5.1) and (ii) for each subset of no des S , S ⊂ V , we hav e X ( v j ,v i ) ∈E − S d l j i e ≤ X ( v l ,v j ) ∈E + S b u lj c , (5.2) where E − S = { ( v j , v i ) ∈ E | v j ∈ S , v i ∈ V − S } , (5.3) E + S = { ( v l , v j ) ∈ E | v j ∈ S , v l ∈ V − S } . (5.4) 5.3 Distributed Algorithm for W eigh t Balancing under Link Capacit y Constrain ts In this section we provid e an o verview of the op eration of a distributed balancing al- gorithm (Algorithm 5 ) and discuss a p ossible enhancemen t. The algorithm is iterative and op erates by having, at each iteration, no des with p ositive weigh t imbalance at- tempt to change the integer weigh ts on b oth their incoming and outgoing edges so that they become weigh t balanced. A t eac h iteration k , each no de v j compares the total in-weight from the w eights of its incoming edges against the total out-weight from the w eights of its outgoing edges. If its w eight imbalance is p ositiv e ( x j [ k ] > 0) then it increases (decreases) the w eigh ts of its outgoing (incoming) edges according to the order c hosen at initialization. Finally , it transmits the amount of change it desires for eac h Weight Balancing under Link Cap acity Constr aints 52 incoming/outgoing edge to the corresp onding in/out neigh b or; the node also receives the amoun t of c hange its neigh b ors desire for the corresp onding edges, based on which it calculates the new edge w eights; the ab ov e pro cedure is rep eated at each iteration. W e establish that, if the necessary and sufficient inte ger cir culation c onditions for the existence of a set of inte ger weigh ts that balance the giv en digraph are satisfied, the algorithm completes after a finite n umber of iterations. W e next describ e the iterative algorithm in more detail. Initialization. A t initialization, eac h no de is aw are of the feasible w eight interv al on eac h of its incoming and outgoing edges, i.e., no de v j is a ware of l j i , u j i for eac h v i ∈ N − j and l lj , u lj for each v l ∈ N + j . F urthermore, the weigh ts are initialized at the ceiling of the lo wer b ound of the feasible interv al, i.e., f j i [0] = d l j i e . This initialization is alw ays feasible but not critical and could b e any integer v alue in the feasible weigh t interv al [ l j i , u j i ] (according to condition ( 5.1 ) an in teger exists in the interv al [ l j i , u j i ]). Also eac h no de v j c ho oses a unique order P ( j ) lj and P ( j ) j i for its outgoing links ( v l , v j ) and incoming links ( v j , v i ) resp ectively , such that { P ( j ) lj | v l ∈ N + j } ∪ { P ( j ) j i | v i ∈ N − j } = { 0 , 1 , ..., D j − 1 } . Iteration. A t each iteration k ≥ 0, no de v j is aw are of the integer weigh ts on its incoming edges { f j i [ k ] | v i ∈ N − j } and outgoing edges { f lj [ k ] | v l ∈ N + j } , and calculates its weigh t imbalance x j [ k ] according to Definition 2 . A. Sele cting desir able weights: Eac h no de v j with p ositive weigh t imbalance (i.e., with x j [ k ] > 0) attempts to change the integer weigh ts in b oth its incoming edges and its outgoing edges. No attempt to change weigh ts is made if no de v j has negative or zero w eight imbalance. When x j [ k ] > 0, no de v j attempts to change the weigh ts at its incoming edges { f j i [ k + 1] | v i ∈ N − j } , and outgoing edges { f lj [ k + 1] | v l ∈ N + j } in a w a y that drives its w eight im balance x j [ k + 1] to zero (at least if no other changes are inflicted on the weigh ts). More sp ecifically , it go es through the links (incoming and outgoing) according to their ordering and changes their w eights by a unit v alue, b y +1 or − 1, dep ending whether they are outgoing or incoming edges, resp ectiv ely . If an outgoing (incoming) edge has reac hed its max (min) v alue then its weigh t does not c hange and no de v j pro ceeds in changing the next one according to the predetermined order. According to the inte ger cir culation c onditions , each no de v j ∈ V with p ositive w eight imbalance at iteration k ( x j [ k ] > 0) will alwa ys b e able to calculate a w eigh t assignmen t for its incoming and outgoing edge weigh ts so that its weigh t im balance b ecomes zero (at least if no other c hanges are inflicted on the weigh ts of its incoming or outgoing links). This means that the selection of desirable w eights in the ab ov e algorithm is alwa ys feasible. The resulting additiv e change desired by no de v j on f j i [ k ] of edge ( v j , v i ) ∈ E at iteration k will b e denoted b y c ( j ) j i [ k ]. Note: Next time no de v j needs to c hange the w eigh ts of its incoming/outgoing edges, it will contin ue from the edge it stopp ed the previous time and cycle through the edge Weight Balancing under Link Cap acity Constr aints 53 w eights in a round-robin fashion according to the ordering chosen at initialization. If an edge reaches its maximum or minimum v alue, then its weigh t do es not increase of decrease and no de v j pro ceeds in changing the next one (according to the chosen ordering). The total change amount desired by no de v j on the weigh t f j i [ k ] of edge ( v j , v i ) ∈ E (or the weigh t f lj [ k ] of edge ( v l , v j ) ∈ E ) at iteration k will b e denoted by c ( j ) j i [ k ] (or c ( j ) lj [ k ]). B. Inte ger weight adjustment. Since the integer w eigh t f j i on each edge ( v j , v i ) ∈ E affects p ositiv ely the weigh t imbalance x j [ k ] of no de v j and negatively the w eigh t imbalance x i [ k ] of no de v i , w e need to take in to account the p ossibilit y that b oth no des are attempting to inflict c hanges on the in teger w eights sim ultaneously . Supp ose that after one iteration of the algorithm (say at iteration k ), no de v i increases the weigh t f j i [ k ] of its outgoing edge ( v j , v i ) by an in teger v alue c ( i ) j i [ k ] while no de v j decreases the weigh t f j i [ k ] of its incoming edge ( v j , v i ) by an integer v alue c ( j ) j i [ k ]. The new weigh t on edge ( v j , v i ) ∈ E is tak en to b e f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ]. (Since w e hav e l j i ≤ f j i [ k ] + c ( i ) j i [ k ] ≤ u j i and l j i ≤ f j i [ k ] + c ( j ) j i [ k ] ≤ u j i , where c ( i ) j i ≥ 0 and c ( j ) j i ≤ 0, we ha v e that l j i ≤ f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] ≤ u j i .] R emark 5.2 . In the enhanced version of Algorithm 5 , each no de v j with negative weigh t im balance x j [ k ] < − 1 attempts to add 1 to the weigh ts of its incoming edges { f j i [ k + 1] | v i ∈ N − j } , and subtract 1 from the weigh ts of its outgoing edges { f lj [ k + 1] | v l ∈ N + j } one at a time, follo wing the predetermined order in a round-robin fashion, un til its w eight im balance x j [ k + 1] b ecomes equal to − 1 (at least if no other changes are inflicted on the weigh ts). R emark 5.3 . The ab ov e w eight adjustment signifies that after iteration k of the prop osed distributed algorithm, once no des v i and v j determine whether to increase (decrease) by c ( i ) j i [ k ] ( c ( j ) j i [ k ]) the w eight of edge ( v j , v i ) (where c ( i ) j i [ k ] , − c ( j ) j i [ k ] ∈ N 0 ), the new w eigh t of edge ( v j , v i ) will b e f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ]. According to the weigh t adjustmen t w e hav e that 1 ≤ l j i ≤ f j i [ k ] + c ( i ) j i [ k ] ≤ u j i and 1 ≤ l j i ≤ f j i [ k ] + c ( j ) j i [ k ] ≤ u j i , where c ( i ) j i [ k ] ≥ 0, and c ( j ) j i [ k ] ≤ 0 resp ectively . As a result we ha v e that 1 ≤ l j i ≤ f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] ≤ u j i ⇒ 1 ≤ l j i ≤ f j i [ k + 1] ≤ u j i and f j i [ k + 1] ∈ N 0 . 5.3.1 F ormal Description of Distributed Algorithm A formal description of the prop osed distributed algorithm is presented in Algorithm 5 . R emark 5.4 . In Steps 3 and 4 of the algorithm, after no de v j calculates the new w eight assignmen t for b oth its incoming and outgoing edges, it transmits the amoun t of c hange on eac h outgoing and incoming edge. The weigh t assignment on edge ( v j , v i ) is determined by the tw o inciden t no des ( v j and v i ) and the new weigh t b ecomes f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] where c ( i ) j i [ k ] (or c ( j ) j i [ k ]) is the change desired b y no de v i (or v j ). According to the In teger Circulation Conditions in Section 5.2 , eac h Weight Balancing under Link Cap acity Constr aints 54 Algorithm 5 Distributed Balancing Under Link Capacity Constraints Input 1) A strongly connected digraph G d = ( V , E ) with n = |V | no des, m = |E | edges. 2) l j i , u j i for ev ery ( v j , v i ) ∈ E . Initialization Set k = 0; each no de v j ∈ V do es: 1) It sets the weigh ts on its incoming/outgoing edge w eights as f j i [0] = d l j i e , ∀ v i ∈ N − j , f lj [0] = d l lj e , ∀ v l ∈ N + j . 2) It assigns a unique order to its outgoing (or incoming) edges ( v l , v j ) (or ( v j , v i )) as P ( j ) lj (or P ( j ) j i ), for v l ∈ N + j (or v i ∈ N − j ) (suc h that { P ( j ) lj | v l ∈ N + j } ∪ { P ( j ) j i | v i ∈ N − j } = { 0 , 1 , ..., D j − 1 } ). Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1) It computes its weight imb alanc e as x j [ k ] = X v i ∈N − j f j i [ k ] − X v l ∈N + j f lj [ k ] . 2) If x j [ k ] > 0, it increases (decreases) b y 1 the in teger weigh ts f lj [ k ] ( f j i [ k ]) of its out- going (incoming) edges v l ∈ N + j ( v i ∈ N − j ) one at a time, follo wing the predetermined order P ( j ) lj ( P ( j ) j i ) until its w eight imbalance b ecomes zero (if an edge has reac hed its maxim um (minim um) v alue and it cannot b e increased (decreased) further, its w eight do es not c hange and no de v j pro ceeds in c hanging the next one according to the prede- termined order. ( Enhanc e d version only) If x j [ k ] < − 1, it decreases (increases) by 1 the integer weigh ts f lj [ k ] ( f j i [ k ]) of its outgoing (incoming) edges v l ∈ N + j ( v i ∈ N − j ) one at a time, follow- ing the predetermined order P ( j ) lj ( P ( j ) j i ) until its weigh t im balance b ecomes − 1 (if an edge has reac hed its minim um (maximum) v alue and it cannot b e decreased (increased) further, its w eigh t do es not c hange and no de v j pro ceeds in changing the next one ac- cording to the predetermined order). 3) It transmits the amount of change c ( j ) lj [ k ] (or c ( j ) j i [ k ]) on eac h outgoing (or incoming) edge. 4) It receiv es the amount of c hange c ( l ) lj [ k ] (or c ( i ) j i [ k ]) from eac h outgoing (or incoming) edge. Then, it sets its incoming and outgoing weigh ts to b e f j i [ k + 1] = max(min( f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] , u j i ) , l j i ) for its incoming weigh ts and f lj [ k + 1] = max(min( f lj [ k ] + c ( l ) lj [ k ] + c ( j ) lj [ k ] , u lj ) , l lj ) for its outgoing weigh ts. 5) It rep eats (increases k to k + 1 and go es back to Step 1). Weight Balancing under Link Cap acity Constr aints 55 no de v j ∈ V with nonzero weigh t imbalance will alwa ys b e able to calculate desired c hanges for its incoming and outgoing edge weigh ts, so that its w eight imbalance b e- comes zero (or equal to − 1). This means that the selection of desirable w eigh ts in the ab o v e algorithm is alw ays feasible. R emark 5.5 . Note that, in the enhanced version of Algorithm 5 , no attempt to change w eights is made if no de v j has weigh t imb alance equal to − 1 or zero. If no des with negativ e weigh t imbalance were as aggressive as no des with p ositive weigh t imbalance (and tried to make w eight changes that would mak e their balance zero), then one could run into p erio dicit y problems. As an example, consider the case of a ring digraph G d with no des V = { v 1 , v 2 , v 3 , v 4 } and edges E = { e 21 , e 32 , e 43 , e 14 } where e 21 = ( v 2 , v 1 ), e 32 = ( v 3 , v 2 ), e 43 = ( v 4 , v 3 ) and e 14 = ( v 1 , v 4 ). Supp ose the edge orders are as follows: for v 1 , P (1) 21 = { 0 } , P (1) 14 = { 1 } ; for v 2 , P (2) 32 = { 0 } , P (2) 21 = { 1 } ; for v 3 , P (3) 43 = { 0 } , P (3) 32 = { 1 } ; and for v 4 , P (4) 14 = { 0 } , P (4) 43 = { 1 } (i.e., each no de will first change the weigh t of its outgoing link and then the weigh t of its incoming link). If all no des (with p ositiv e or negative w eight imbalance) tried to mak e weigh t changes to balance themselv es, the edge weigh ts for time steps k = 0 , 1 , 2 , 3 , 4, would b e k = 0 : w 21 [0] = 1 , w 32 [0] = 1 , w 43 [0] = 2 , w 14 [0] = 2 , k = 1 : w 21 [1] = 2 , w 32 [1] = 1 , w 43 [1] = 1 , w 14 [1] = 2 , k = 2 : w 21 [2] = 2 , w 32 [2] = 2 , w 43 [2] = 1 , w 14 [2] = 1 , k = 3 : w 21 [3] = 2 , w 32 [3] = 1 , w 43 [3] = 1 , w 14 [3] = 2 , k = 4 : w 21 [4] = 1 , w 32 [4] = 1 , w 43 [4] = 2 , w 14 [4] = 2 . W e see that at iteration k = 4, w eights (thus, no de balances) are exactly the same as at k = 0; moreov er, the ordering in which c hanges will b e made at the edges of eac h no de is also exactly the same as in iteration k = 0. W e conclude that we ha ve encoun tered p erio dic b eha vior and the digraph G d will nev er b ecome balanced (i.e., w lj [ k ] = w lj [ k + 4], ∀ ( v l , v j ) ∈ E and x j [ k ] = x j [ k + 4], ∀ v j ∈ V ). R emark 5.6 . The op eration of Algorithm 5 and its enhanced version, can b e extended also for the case where each no de v j do es not necessarily wan t a weigh t imbalance equal to zero, but rather demands a weigh t im balance equal to x ( s ) j 6 = 0. When P n j =1 x ( s ) j = 0, and for each S (where S ⊂ V ) we hav e P ( v j ,v i ) ∈E − S d l j i e ≤ P ( v l ,v j ) ∈E + S b u lj c + P v j ∈S x ( s ) j (where E − S and E + S w ere defined in ( 5.3 ) and ( 5.4 )), then ev ery node can obtain a nonzero w eight imbalance equal to x ( s ) j as long as the no des with p ositiv e weigh t imbalance op erate according to Step 2 until their weigh t imbalance b ecomes equal to x ( s ) j , and the no des with negative weigh t im balance operate according to Step 3 un til their weigh t im balance b ecomes equal to x ( s ) j − 1. Weight Balancing under Link Cap acity Constr aints 56 W e no w illustrate the distributed algorithm via an example and then explain why it results in a w eight balanced digraph after a finite n umber of iterations. W e also obtain b ounds on its execution time. 5.3.2 Illustrativ e Example of Distributed Algorithm Consider the digraph G d = ( V , E ) in Figure 5.1 , where V = ( v 1 , v 2 , . . . , v 5 ), E = ( m 21 , . . . , m 45 ), E ⊆ V × V − { ( v j , v j ) | v j ∈ V } , L = [ l j i ] and U = [ u j i ] for ev ery ( v j , v i ) ∈ E . The w eight on eac h edge is initialized to f j i [0] = d l j i e for ( v l , v j ) ∈ E and eac h no de assigns a unique order to each of its outgoing and incoming edges. F or the purp oses of this example, let us assume that this order is as follows: • v 1 : P (1) 21 = 1 , P (1) 31 = 2 , P (1) 41 = 3, • v 2 : P (2) 32 = 1 , P (2) 52 = 2 , P (2) 21 = 3, • v 3 : P (3) 43 = 1 , P (3) 53 = 2 , P (3) 32 = 3 , P (3) 31 = 4, • v 4 : P (4) 14 = 1 , P (4) 43 = 2 , P (4) 45 = 3, • v 5 : P (5) 45 = 1 , P (5) 52 = 2 , P (5) 53 = 3. (F or example, no de v 2 will first increase f 32 , then f 52 and then it will decrease f 21 .) As a first step, eac h node computes its weigh t imbalance x j [0] = P v i ∈N − j f j i [0] − P v l ∈N + j f lj [0] (these v alues are shown in Figure 5.1 ). v 4 v 5 v 3 v 1 v 2 x 1 = 2 x 2 = 3 x 3 = − 2 x 4 = − 1 x 5 = − 2 [5 . 4 , 10 ] [6 . 2 , 9] [1 . 2 , 7] [9 . 2 , 15 ] [2 , 5] [1 , 6] [1 . 3 , 5] [2 . 6 , 9] 6 2 1 2 3 7 10 2 Figure 5.1: W eighted digraph with initial w eigh ts and initial im balances for each no de. Once eac h no de computes its imbalance, the distributed algorithm requires each no de with p ositive w eigh t imbalance to increase (decrease) by 1 the integer w eigh ts f lj [ k ] ( f j i [ k ]) of its outgoing (incoming) edges v l ∈ N + j ( v i ∈ N − j ) one at a time, following the predetermined order P lj un til its w eigh t imbalance b ecomes zero. In this case, the no des that hav e p ositive w eight im balance are no des v 1 and v 2 (equal to x 1 [0] = 2 and x 2 [0] = 3) resp ectiv ely), and they increase their outgoing edges as sho wn in Figure 5.2 . Weight Balancing under Link Cap acity Constr aints 57 v 4 v 5 v 3 v 1 v 2 +1 +1 − 1 +1 +1 x 1 = 2 x 2 = 3 x 3 = − 2 x 4 = − 1 x 5 = − 2 [5 . 4 , 10 ] [6 . 2 , 9] [1 . 2 , 7] [9 . 2 , 15 ] [2 , 5] [1 , 6] [1 . 3 , 5] [2 . 6 , 9] 6 2 1 2 3 7 10 2 Figure 5.2: Distribution of imbalance from positively im balanced no des. In the next step of the distributed algorithm each no de transmits the amount of c hange c ( j ) lj [ k ] (or c ( j ) j i [ k ]) on eac h outgoing (or incoming) edge and receiv es the amount of c hange c ( l ) lj [ k ] (or c ( i ) j i [ k ]) from eac h outgoing (or incoming) edge. Then, it sets its incoming (outgoing) w eigh ts to b e f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] ( f lj [ k + 1] = f lj [ k ] + c ( l ) lj [ k ] + c ( j ) lj [ k ]). This can b e seen in Figure 5.3 . v 4 v 5 v 3 v 1 v 2 x 1 = 2 x 2 = 3 x 3 = − 2 x 4 = − 1 x 5 = − 2 [5 . 4 , 10 ] [6 . 2 , 9] [1 . 2 , 7] [9 . 2 , 15 ] [2 , 5] [1 , 6] [1 . 3 , 5] [2 . 6 , 9] 6 + 1 − 1 2 + 1 1 + 1 2 3 7 10 2 + 1 Figure 5.3: Calculation of edge weigh ts from p ositiv ely imbalanced no des. Eac h no de, after the integer weigh t up date on its outgoing and incoming edges, recalcu- lates its im balances x j [1], ∀ v j ∈ V , and the pro cess is rep eated. After a finite n um b er of iterations, sho wn in the next section, w e reac h the w eighted digraph with in teger w eigh ts sho wn in Figure. 5.4 . 5.3.3 Pro of of Algorithm Completion W e show that, as long as the In teger Circulation Conditions in Section 5.2 hold, then the total imbalance ε [ k ] in Definition 3 go es to zero after a finite num b er of iterations of Algorithm 5 . This implies that the w eight im balance x j [ k ] for each no de v j ∈ V go es to zero after a finite num b er of iterations, and th us (from the up dates in Algorithm 5 ) the in teger weigh t f j i [ k ] on eac h edge ( v j , v i ) ∈ E stabilizes to an integer v alue f ∗ j i (where Weight Balancing under Link Cap acity Constr aints 58 v 4 v 5 v 3 v 1 v 2 x 1 = 0 x 2 = 0 x 3 = 0 x 4 = 0 x 5 = 0 [5 . 4 , 10 ] [6 . 2 , 9] [1 . 2 , 7] [9 . 2 , 15 ] [2 , 5] [1 , 6] [1 . 3 , 5] [2 . 6 , 9] 7 3 3 3 3 7 10 4 Figure 5.4: Final weigh t balanced digraph. f ∗ j i ∈ N 0 ) within the given lo wer and upp er limits, i.e., 1 ≤ l j i ≤ f ∗ j i ≤ u j i for all ( v j , v i ) ∈ E . W e b egin by establishing some preliminary results. Pr op osition 7 . Consider the problem form ulation describ ed in Section 5.1 . At each iteration k during the execution of Algorithm 5 , it holds that 1. F or any subset of no des S ⊂ V , let E − S and E + S b e defined by ( 5.3 ) and ( 5.4 ) resp ectiv ely . Then, X v j ∈S x j [ k ] = X ( v j ,v i ) ∈E − S f j i [ k ] − X ( v l ,v j ) ∈E + S f lj [ k ] ; 2. P n j =1 x j [ k ] = 0; 3. ε [ k ] = 2 P v j ∈V − [ k ] | x j [ k ] | where V − [ k ] = { v j ∈ V | x j [ k ] < 0 } . Pr o of. T o pro ve the first statement, let E S = { ( v j , v i ) ∈ E | v j ∈ S , v i ∈ S } Weight Balancing under Link Cap acity Constr aints 59 b e the set of edges that are in ternal to the set S . F rom the definition of the w eigh t im balance for no de v j , we hav e (after re-arranging the summations) X v j ∈S x j [ k ] = X v j ∈S    X v i ∈N − j f j i [ k ] − X v l ∈N + j f lj [ k ]    = X ( v j ,v i ) ∈E − S f j i [ k ] − X ( v l ,v j ) ∈E + S f lj [ k ] + + X ( v j ,v i ) ∈E S f j i [ k ] − X ( v l ,v j ) ∈E S f lj [ k ] = X ( v j ,v i ) ∈E − S f j i [ k ] − X ( v l ,v j ) ∈E + S f lj [ k ] . F or the second statemen t, we can take any S ⊂ V and argue that X v j ∈V x j [ k ] = X v j ∈S x j [ k ] + X v j ∈V −S x j [ k ] = X ( v j ,v i ) ∈E − S f j i [ k ] − X ( v l ,v j ) ∈E + S f lj [ k ] + + X ( v j ,v i ) ∈E − V −S f j i [ k ] − X ( v l ,v j ) ∈E + V −S f lj [ k ] = 0 , where the last line follows from the fact that E + S = E − V −S and E − S = E + V −S . F or the third statement, notice that, from the definition of ε [ k ] in Definition 3 , we ha ve ε [ k ] = X v j ∈V | x j [ k ] | = X v j ∈V − [ k ] | x j [ k ] | + X v j ∈V −V − [ k ] | x j [ k ] | = X v j ∈V − [ k ] | x j [ k ] | + X v j ∈V −V − [ k ] x j [ k ] = 2 X v j ∈V − [ k ] | x j [ k ] | , where the third line follows from the definition of V − [ k ] (all no des ha ve nonnegative balance) and the last line follo ws from the second statemen t of this prop osition. Pr op osition 8 . Consider the problem form ulation describ ed in Section 5.1 . Let V − [ k ] ⊂ V b e the set of no des with negative weigh t im balance at iteration k , i.e., V − [ k ] = { v j ∈ V | x j [ k ] < 0 } . During the execution of Algorithm 5 , we hav e that V − [ k + 1] ⊆ V − [ k ] . Weight Balancing under Link Cap acity Constr aints 60 Pr o of. W e will argue that no des with nonnegativ e weigh t imbalance at iteration k can nev er reach negative w eight imbalance at iteration k + 1, thus establishing the pro of of the prop osition. Consider a node v j with a nonnegativ e weigh t imbalance x j [ k ] ≥ 0. No de v j ma y attempt to make weigh t c hanges on its edges: c ( j ) j i [ k ] ≤ 0 for all v i ∈ N − j and c ( j ) lj [ k ] ≥ 0 for all v l ∈ N + j . If no in-neigh b or or out-neighbor of no de v j attempts to inflict changes on the w eights of these edges, then it is not hard to see that the weigh t imbalance of no de v j at iteration k + 1 will b e x j [ k + 1] = X v i ∈N − j f j i [ k + 1] − X v l ∈N + j f lj [ k + 1] = X v i ∈N − j ( f j i [ k ] + c ( j ) j i [ k ]) − X v l ∈N + j ( f lj [ k ] + c ( j ) lj [ k ]) = x j [ k ] − x j [ k ] = 0 (b ecause, by design, the changes in the weigh ts are chosen so that the balance b ecomes zero). If one (or more) of the in-neigh b ors or out-neigh b ors of node v j ha ve nonegative balance, then they will also attempt to make changes on the weigh ts. In particular, f j i [ k + 1] = f j i [ k ] + c ( j ) j i [ k ] + c ( i ) j i [ k ] , where c ( i ) j i [ k ] ≥ 0, and f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ] + c ( l ) lj [ k ] , where c ( l ) lj [ k ] ≤ 0. Putting these together we hav e x j [ k + 1] = X v i ∈N − j f j i [ k + 1] − X v l ∈N + j f lj [ k + 1] = X v i ∈N − j ( f j i [ k ] + c ( j ) j i [ k ] + c ( i ) j i [ k ]) − − X v l ∈N + j ( f lj [ k ] + c ( j ) lj [ k ] + c ( l ) lj [ k ]) = 0 + X v i ∈N − j c ( i ) j i [ k ] − X v l ∈N + j c ( l ) lj [ k ] ≥ 0 . F or the first case where all neigh b ors of no de v j do not b elong in V − [ k ] then x i [ k ] , x l [ k ] ≥ 0, for every v i ∈ N − j and v l ∈ N + j . This means that during iteration k of Algorithm 5 , Weight Balancing under Link Cap acity Constr aints 61 the edge weigh ts of v j will change by its in/out neighbors (i.e., the w eights of the incoming edges ( v j , v i ) will b e increased b y c ( i ) j i [ k ] where v i ∈ N − j while the w eights of the outgoing edges will b e decreased by c ( l ) lj [ k ] where v l ∈ N + j ). In that case the weigh t im balance of no de v j will increase ( x j [ k + 1] > x j [ k ]). F or the new weigh t imbalance of v j (i.e., x j [ k + 1]) we ha ve that it will either remain negativ e (i.e., x j [ k + 1] < 0), or it will b ecome nonegativ e v j ∈ V − [ k + 1]. F or the second case, if all the neigh b ors of no de v j b elong in V − [ k ] they will not make any weigh t changes on the edges that connect them with no de v j and so w e ha ve that v j ∈ V − [ k + 1]. But if some of the neigh b ors v i and v l (where v i ∈ N − j and v l ∈ N + j ) do not b elong in V − [ k ] (i.e., x i [ k ] , x l [ k ] ≥ 0) then they will increase the incoming and decrease the outgoing edge weigh ts by c ( i ) j i [ k ] and c ( l ) lj [ k ] resp ectively and so the weigh t imbalance of no de v j will b e improv ed (i.e., x j [ k + 1] > x j [ k ]). F or the new w eight imbalance of v j (i.e., x j [ k + 1]) we hav e that it will either remain negative (i.e., x j [ k + 1] < 0) or it will b ecome nonegative and remain so for the rest of the iterations (i.e., x j [ k + 1] ≥ 0). As a result we ha ve that during the execution of Algorithm 5 , V − [ k + 1] ⊆ V − [ k ] , ∀ k ≥ 0. Pr op osition 9 . Consider the problem form ulation describ ed in Section 5.1 . During the execution of Algorithm 5 , it holds that 0 ≤ ε [ k + 1] ≤ ε [ k ] , ∀ k ≥ 0 , where ε [ k ] ≥ 0 is the total im balance of the net work at iteration k (as defined in Defi- nition 3 ). Pr o of. F rom the third statement of Prop osition 7 , we ha ve ε [ k +1] = 2 P v j ∈V − [ k +1] | x j [ k + 1] | and ε [ k ] = 2 P v j ∈V − [ k ] | x j [ k ] | , whereas from Prop osition 8 , w e ha ve V − [ k + 1] ⊆ V − [ k ]. Consider a no de v j ∈ V − [ k ] with w eight im balance x j [ k ] < 0. W e analyze b elow the follo wing tw o cases: 1. All neighbors of no de v j ha ve negative or zero weigh t im balance; 2. At least one neighbor of no de v j has p ositiv e weigh t im balance. In b oth cases, no de v j ab o v e will not make any w eight changes on its edges. In the first case, the w eight imbalance of no de v j will not change (i.e., x j [ k + 1] = x j [ k ] < 0). In the second case, we ha v e x i [ k ] ≥ 0 or x l [ k ] ≥ 0, for some v i ∈ N − j or v l ∈ N + j . This means that during iteration k of Algorithm 5 , the edge weigh ts of v j migh t c hange by its in/out neighbors (i.e., the w eight of an incoming edge ( v j , v i ) might b e increased by c ( i ) j i [ k ] ≥ 0 (for some) v i ∈ N − j or the w eight of an outgoing edge migh t b e decreased b y c ( l ) lj [ k ] ≥ 0 (for some) v l ∈ N + j ). Thus, in the second case, the weigh t im balance of no de v j will satisfy x j [ k + 1] ≥ x j [ k ]. In fact, w e will hav e that either x j [ k + 1] ≥ 0 (i.e., Weight Balancing under Link Cap acity Constr aints 62 v j / ∈ V − [ k + 1]) or x j [ k + 1] < 0 and | x j [ k + 1] | ≤ | x j [ k ] | . As a result, in b oth cases, we ha ve ε [ k + 1] ≤ ε [ k ] (using the third statement in Prop osition 7 ). According to the ab o ve prop osition we hav e that the total imbalance ε [ k ] of the net- w ork at iteration k (as defined in Definition 3 ) will b e reduced after a finite num b er of iterations. Pr op osition 10 . Consider the problem formulation describ ed in Section 5.1 where the in teger circulation conditions are satisfied. Algorithm 5 balances the weigh ts in the graph in a finite num b er of steps (i.e., ∃ k 0 s.t. ∀ k ≥ k 0 , f j i [ k 0 ] = f j i [ k ], ∀ ( v j , v i ) ∈ E and x j [ k ] = x j [ k 0 ] = 0, ∀ v j ∈ V ). Pr o of. By contradiction, supp ose Algorithm 5 runs for an infinite n umber of iterations and the total imbalance remains p ositiv e (i.e., ε [ k ] > 0 for all k ). Then, there is alwa ys (at eac h k ) at least one no de with p ositive w eight imbalance. Let V + [ k ] = { v j ∈ V | x j [ k ] ≥ 0 } b e the set of nodes that hav e p ositive weigh t im balance at time step k . Let V + denote the set of no des that hav e p ositive weigh t im balance infinitely often . [Since no des with p ositive weigh t imbalance can b ecome balanced (but not negativ ely balanced), this means that nodes in the set V + could become balanced at some iteration, as long as they become p ositively imbalanced at later iterations.] Also, w e can define the set of no des V − as V − = lim k →∞ V − [ k ], where V − [ k ] = { v j ∈ V | x j [ k ] < 0 } . This set is w ell defined (due to the fact that p ositively im balanced no des cannot b ecome negatively balanced) and contains at least one no de with negativ e w eight im balance (otherwise the graph is balanced). The ab ov e discussion implies that as k go es to infinit y , the set of no des V can b e partitioned into three sets: V − , V + , and V − ( V + ∪ V − ) (the latter is the set of no des that remain balanced after a finite n umber of steps –and nev er obtain p ositiv e imbalance again). This is shown in Fig. 5.5 . V + V − ( V − ∪ V + ) V − 1 Figure 5.5: Example of digraph where the Integer Circulation Conditions in Sec- tion 5.2 do not hold for the dashed edges. Since the graph is strongly connected, no des in the set V + need to b e connected to/from no des in the other tw o sets. This is shown via the dashed edges in Fig. 5.5 (note that the presence of all four t yp es of edges is not necessary , but there has to b e at least one Weight Balancing under Link Cap acity Constr aints 63 edge from a no de in V + to a no de in one of the t wo other sets, and at least one edge from a no de in one of the tw o other sets to a no de in V + ). T ake S ⊂ V to b e V + and note that S has at least one no de (since the num b er of no des is finite). Consider a no de v j ∈ V − that has at least one in-neigh b or v i in S and/or at least one out-neigh b or v l in S . Since v i (and/or v l ) has a p ositiv e w eight im balance infinitely often, it will ev entually attempt to change the weigh t f j i [ k ] (or f lj [ k ]) by c ( i ) j i [ k ] ≥ 0 (or c ( l ) lj [ k ] ≤ 0). If this change happ ens, then x j [ k + 1] > x j [ k ] so that v j either arriv es at a nonegative weigh t imbalance (i.e., x j [ k + 1] ≥ 0, whic h is a con tradiction) or 0 > x j [ k + 1] > x j [ k ] (implying 2 that ε [ k + 1] < ε [ k ], which is also a con tradiction b ecause, if the integer v alued ε [ k ] decreases infinitely often, it will b ecome zero, thus x j [ k ] = 0 for all v j ∈ V ). Consider no w a no de v j 0 that has zer o weigh t imbalance and has at least one in-neighbor v i 0 in S and/or at least one out-neighbor v l 0 in S . Since v i 0 (or v l 0 ) has a p ositive weigh t im balance infinitely often, it will ev entually attempt to change the weigh t f j 0 i 0 [ k ] (or f l 0 j 0 [ k ]) by c ( i 0 ) j 0 i 0 [ k ] ≥ 0 (or c ( l 0 ) l 0 j 0 [ k ] ≤ 0). If this change happ ens, then no de v j 0 w ould ev entually reac h p ositive weigh t im balance at some iteration, and this w ould happen infinitely often whic h is a con tradiction b ecause v j 0 b elongs in the set of no des with zero w eight imbalance (at least after a large enough num b er of steps). Th us, for Algorithm 5 , the only p ossibility left is that the weigh ts of edges outgoing from no des in S cannot increase and the w eights of edges incoming to no des in S cannot decrease. In other words, for k ≥ k 0 for some large enough k 0 w e hav e f j i [ k ] = d l j i e ∀ ( v j , v i ) ∈ E − S , f lj [ k ] = b u lj c ∀ ( v l , v j ) ∈ E + S , where E − S and E + S are defined by ( 5.3 ) and ( 5.4 ) resp ectively . F rom the first statemen t of Prop osition 7 , for the set S , w e ha ve that P v j ∈S x j [ k ] = P ( v j ,v i ) ∈E − S f j i [ k ] − P ( v l ,v j ) ∈E + S f lj [ k ]. Th us, we hav e X ( v j ,v i ) ∈E − S l j i − X ( v l ,v j ) ∈E + S u lj = X v j ∈S x j [ k ] > 0 , whic h means that the Integer Circulation Conditions in Section 5.2 do not hold (i.e., we reac h a contradiction). As a result w e hav e that if the Integer Circulation Conditions in Section 5.2 hold, the total im balance ε [ k ] decreases after a finite n umber of iterations, and Algorithm 5 results in a weigh t-balanced digraph after a finite num b er of iterations. 2 F rom the third statement of Prop osition 7 , we ha ve ε [ k + 1] = 2 P v j ∈V − [ k +1] | x j [ k + 1] | and ε [ k ] = 2 P v j ∈V − [ k ] | x j [ k ] | . Weight Balancing under Link Cap acity Constr aints 64 As a result we hav e that if the inte ger cir culation c onditions hold, the total im balance ε [ k ] decreases after a finite n um b er of iterations, and the algorithm results in a weigh t balanced digraph after a finite n umber of iterations. 5.3.4 Sim ulation Study In this section, we present simulation results for the prop osed distributed algorithm. Sp ecifically , we first present n umerical results for a random graph of size n = 20 illus- trating the b eha vior of Algorithm 5 for tw o differen t cases: (i) the case when the inte ger cir culation c onditions do not hold, th us, a set of in teger w eights that balance the digraph cannot b e obtained; (ii) the case when the inte ger cir culation c onditions hold and a set of integer w eigh ts that balance the graph can b e obtained. The w eights are initialized at the ceiling of the lo wer b ound of the feasible in terv al, i.e., f j i [0] = d l j i e . Figure 5.6 shows what happ ens in the case of a randomly created graph of 20 no des, in which the inte ger cir culation c onditions do not hold. In the first case, w e plot the absolute imb alanc e ε = P n j =1 | x j | , ∀ v j ∈ V (as defined in Definition 3 ) and in the second case the no des weight imb alanc es x j [ k ] (as defined in Definition 2 ) as a function of the n umber of iterations k for the distributed algorith m. The plots suggest that the prop osed distributed algorithm is unable to obtain a set of w eights that balance the corresp onding digraph. 0 10 20 30 40 50 60 70 80 90 100 0 50 100 150 Absolute Imbalance vs Iterations for Random Graph of 20 Nodes Number of Iterations Absolute Imbalance 0 10 20 30 40 50 60 70 80 90 100 −20 −10 0 10 Node Weight Imbalances vs Iterations for Random Graph of 20 Nodes Number of Iterations Node Weight Imbalances Figure 5.6: Execution of Algorithm 5 for the case when the integer circulation con- ditions do not hold for a random graph of 20 no des. T op figur e: Absolute imbalance ε [ k ] plotted against num b er of iterations. Bottom figur e: No de weigh t imbalances x j [ k ] plotted against n umber of iterations. Figure 5.7 shows the same case as Figure 5.6 , with the difference that the inte ger cir cu- lation c onditions hold. Here, the plots suggest that the prop osed distributed algorithm is able to obtain a set of integer weigh ts that balance the corresp onding digraph after a finite n umber of iterations. Weight Balancing under Link Cap acity Constr aints 65 0 10 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 Absolute Imbalance vs Iterations for Random Graph of 20 Nodes Number of Iterations Absolute Imbalance 0 10 20 30 40 50 60 70 80 90 100 −20 −10 0 10 20 Node Weight Imbalances vs Iterations for Random Graph of 20 Nodes Number of Iterations Node Weight Imbalances Figure 5.7: Execution of Algorithm 5 for the case when the in teger circulation condi- tions hold for a random graph of 20 no des. T op figur e: Absolute imbalance ε [ k ] plotted against n umber of iterations. Bottom figur e: No de weigh t imbalances x j [ k ] plotted against n umber of iterations. R emark 5.7 . Note that b oth Figures. 5.6 and 5.7 illustrate some of the prop erties es- tablished in the analysis in the previous section: for example: once no des hav e p ositiv e w eight imbalance, they retain a positive or zero w eight im balance; while no des ha v e neg- ativ e w eight imbalance, their im balance increases monotonically; the absolute im balance is monotonically non-increasing, and so forth. Figure 5.8 shows what happ ens in the case of 100 a veraged graphs of 20 and 50 no des eac h when the inte ger cir culation c onditions hold. W e plot the av erage total (abso- lute) imbalance ε [ k ] = P n j =1 | x j [ k ] | (as defined in Definition 3 ) as a function of the n umber of iterations k for the distributed algorithm. The plot suggests that the pro- p osed distributed algorithm is able to obtain a set of integer weigh ts that balance the corresp onding graph after a finite n um b er of iterations. 5.4 Chapter Summary In this c hapter, w e in tro duced and analyzed a nov el distributed algorithm which achiev es in teger w eight balancing in a m ulti-comp onent system in the presence of lo wer and upp er constrain ts on the edge weigh ts. W e analyzed its functionality , established its correctness and show ed that it achiev es integer weigh t balancing after a finite n umber of steps. W e also demonstrated the op eration, p erformance, and adv antages of the prop osed algorithm via v arious simulations. Weight Balancing under Link Cap acity Constr aints 66 0 20 40 60 80 100 120 140 160 180 200 0 50 100 150 Absolute Imbalance vs Iterations for Average of 100 Graphs of 20 Nodes Number of Iterations Absolute Imbalance Figure 5.8: T otal (absolute) imbalance ε [ k ] plotted against the num b er of iterations for the distributed algorithm (av eraged ov er 100 graphs of 20 no des eac h) in the case where the in teger circulation conditions hold. 0 50 100 150 200 250 300 350 400 0 50 100 150 200 250 300 350 400 450 Absolute Imbalance vs Iterations for Average of 100 Graphs of 50 Nodes Number of Iterations Absolute Imbalance Figure 5.9: T otal (absolute) imbalance ε [ k ] plotted against the num b er of iterations for the distributed algorithm (av eraged ov er 100 graphs of 50 no des eac h) in the case where the in teger circulation conditions hold. Chapter 6 W eigh t Balancing under Link Capacit y Constrain ts o v er Unreliable Comm unication In this c hapter, we presen t a no vel distributed algorithm which deals with the problem of balancing a weigh ted digraph under link capacity constraints in the presence of time dela ys and pack et drops ov er the comm unication links. The algorithms presen ted in this c hapter hav e app eared in [ 55 ]. This chapter is organized as follo ws. In Section 6.1 we present the additional notation needed in this chapter and we recall the mo deling of time delays and pack et drops and the wa y they manifest themselves. In Section 6.2 w e present the problem formulation. In Section 6.3 we in tro duce a nov el distributed algorithm which ac hieves in teger weigh t balancing under link capacity constrain ts in the presence of time delays o ver the com- m unication links. W e presen t a formal description of the proposed distributed algorithm and sho w that as long as the conditions presen ted in Section 5.2 hold, then the prop osed distributed algorithm conv erges to a weigh t balanced digraph after a finite num b er of iterations in the presence of b ounded time dela ys ov er the communication links. In Sec- tion 6.4 we discuss an even t-triggered op eration of the prop osed distributed algorithm and show that it results in a weigh t balanced digraph after a finite num b er of iterations in the presence of arbitrary (time-v arying, inhomogeneous) but b ounded time dela ys o ver the comm unication links. In Section 6.5 we sho w that the prop osed distributed algorithm is also able to conv erge (with probability one) to a w eight balanced digraph in the presence of un b ounded dela ys (pac ket drops). In Section 6.6 we present simulation results and comparisons and the c hapter is concluded in Section 6.7 . 67 Weight Balancing under Link Constr aints over Unr eliable Communic ation 68 6.1 Mo deling Time Dela ys and P ac k et Drops In this chapter, w e assume that a transmission from node v j to no de v l at time step k undergo es an a priori unknown dela y τ ( j ) lj [ k ] whic h is an in teger that satisfies 0 ≤ τ ( j ) lj [ k ] ≤ τ lj ≤ ∞ (i.e., delays are b ounded). The maximum dela y is denoted by τ = max ( v l ,v j ) ∈E τ lj . In the w eight balancing setting we consider, no de v j is in charge of assigning the actual weigh t f lj [ k ] to each link ( v l , v j ), and then transmits to no de v l the amoun t of change c ( j ) lj [ k ] it desires at time step k . Under the ab ov e delay mo del (which assumes bidirectional communication), no de v l ( v j ) receives the change amoun t c ( j ) lj [ k ] ( c ( l ) lj [ k ]), prop osed by no de v j ( v l ) o ver the actual (p erceived) weigh t f lj [ k ] ( f ( p ) lj [ k ]), at time step k + τ ( j ) lj [ k ] ( k + τ ( l ) lj [ k ]). F rom the p ersp ective of no de v j , the dela yed w eight change for link ( v l , v j ), ∀ v l ∈ N + j , at time step k is giv en by c ( l ) lj [ k ] = k X k 0 = k − τ , k 0 + τ ( l ) lj [ k 0 ]= k c ( l ) lj [ k 0 ] , (6.1) i.e., c ( l ) lj [ k ] is the sum of weigh t c hanges c ( l ) lj sen t from v l and seen from no de v j at time step k . Apart from b ounded delays, unr eliable comm unication links in practical settings could also result in p ossible pac ket drops (i.e., unbounded delays) in the corresp onding com- m unication netw ork. T o mo del pack et drops, we assume that a transmission on each link ( v j , v i ) from no de v i to no de v j is unr eliable whic h means that each particular edge ma y drop pack ets with some (non-total) probability . W e assume indep endence b etw een pac ket drops at different time steps or different links (or even different directions of the same link), so that, we can mo del a pack et drop via a Bernoulli random v ariable: P r { x k ( j, i ) = m } = ( q j i , if m = 0, 1 − q j i , if m = 1, (6.2) where x k ( j, i ) = 1 if the transmission from node v i to node v j at time step k is successful. W e also define the matrix Q = [ q j i ] where q j i is the entry at the j th ro w and i th column; w e tak e q j i = 1 for ( v j , v i ) / ∈ E u and can set q j i = 0 if the link is reliable. W e establish that, despite the presence of pac ket drops, the proposed distributed algorithm con verges, with probability one, to a w eight balanced digraph after a finite num b er of iterations (as long as a feasible solution exists and q j i < 1 for all links ( v j , v i ) ∈ E u ). Note that, in this chapter, the in teger w eigh t f j i on edge ( v j , v i ) ∈ E is assigned by no de v i . More sp ecifically , f j i is assigned b y no de v i ; due to p ossible (b ounded or un b ounded) time delays the p erceiv ed w eight f ( p ) j i on this link b y no de v j migh t b e different. This means that each no de will know exactly the w eigh ts on its outgoing edges f lj but only Weight Balancing under Link Constr aints over Unr eliable Communic ation 69 ha ve access to p er c eive d w eights f ( p ) j i on its incoming edges, which will b e e qual to f lj if no de v j is able to successfully communicate with no de v l . Definition 8 . Given a w eighted digraph G d = ( V , E , F ), along with a p erceived weigh t assignmen t F p = [ f ( p ) j i ], the total p er c eive d in-w eigh t of no de v j is defined as S − ( p ) j and is defined as S − ( p ) j = P v i ∈N − j f ( p ) j i . Definition 9 . Given a weigh ted digraph G d = ( V , E , F ) of order n , the p er c eive d weight imb alanc e x ( p ) j of no de v j is x ( p ) j = S − ( p ) j − S + j while the p erceived total imbalance of digraph G d is defined as ε ( p ) = P n j =1 | x ( p ) j | . 6.2 Problem Statemen t W e are given a strongly connected digraph G d = ( V , E ), as well as lo wer and upper limits l j i and u j i (0 < l j i ≤ u j i , where l j i , u j i ∈ R ) on each eac h edge ( v j , v i ) ∈ E . Considering that link transmissions undergo arbitrary , b ounded or unbounded delays (i.e., pac ket drops), we wan t to develop a distributed algorithm that allows the nodes to iterativ ely adjust the integer weigh ts on their edges so that they ev entually obtain a set of integer w eights { f j i | ( v j , v i ) ∈ E } that satisfy the following: 1. f j i ∈ N for each edge ( v j , v i ) ∈ E ; 2. l j i ≤ f j i ≤ u j i for each edge ( v j , v i ) ∈ E ; 3. S + j = S − j = S − ( p ) j for each v j ∈ V . The distributed algorithm needs to resp ect the communication constrain ts imp osed by the undirected graph G u that corresp onds to the given directed graph G d . W e in tro duce and analyze a distributed algorithm that allo ws eac h node to assign in teger w eights to its outgoing links, so that the resulting weigh t assignment is balanced. 6.3 Distributed Algorithm for W eigh t Balancing in the Presence of Time Dela ys In this section w e provide an ov erview of the distributed w eigh t balancing algorithm op eration; the formal description of the algorithm is provided in Algorithm 6 . The algorithm is iterative and op erates by having, at each iteration, no des with p ositive p erceiv ed w eight im balance attempt to change the integer weigh ts on b oth their incoming and/or outgoing edges so that they b ecome weigh t balanced. W e assume that eac h no de is in charge of assigning the weigh ts on its outgoing edges. More sp ecifically , f j i is assigned by no de v i ; due to p ossible time dela ys the p erceiv ed weigh t f ( p ) j i on this link b y no de v j migh t b e different. This means that each no de will know exactly the weigh ts Weight Balancing under Link Constr aints over Unr eliable Communic ation 70 on its outgoing edges but only hav e access to p erceiv ed weigh ts on its incoming edges. W e use k to denote the iteration and index v ariables. F or example, the change amount from no de v j on the weigh t f j i [ k ] of edge ( v j , v i ) ∈ E at iteration k will b e denoted by c ( j ) j i [ k ]. Note: Each no de v j can only calculate its p er c eive d weight imb alanc e x ( p ) j (as defined in Definition 9 ) at each iteration k . This means that it has no access to the total (or p erceiv ed total) imbalance of the digraph G d . R emark 6.1 . Note here that the in teger weigh t f lj on edge ( v l , v j ) ∈ E is assigned by no de v j . Th us, no de v j has access to the true weigh t f lj of edge ( v l , v j ) while no de v l has access to a p er c eive d weigh t f ( p ) lj , which will b e equal to f lj if no de v j is able to successfully communicate with no de v l . W e describ e the op eration of the iterative algorithm and establish that, if the necessary and sufficien t Integer Circulation Conditions in Section 5.2 are satisfied, the algorithm completes after a finite num b er of iterations. Initialization. At initialization, each no de is aw are of the feasible weigh t interv al on eac h of its incoming and outgoing edges, i.e., no de v j is a ware of l j i , u j i for eac h v i ∈ N − j and l lj , u lj for each v l ∈ N + j . F urthermore, the weigh ts are initialized at the ceiling of the lo wer b ound of the feasible interv al, i.e., f j i [0] = d l j i e . This initialization is alw ays feasible but not critical and could b e any integer v alue in the feasible weigh t interv al [ l j i , u j i ] (according to Section 5.2 ) an integer alwa ys exists in the interv al [ l j i , u j i ]). Also eac h no de v j c ho oses a unique order P ( j ) lj and P ( j ) j i for its outgoing links ( v l , v j ) and incoming links ( v j , v i ) resp ectively , such that { P ( j ) lj | v l ∈ N + j } ∪ { P ( j ) j i | v i ∈ N − j } = { 0 , 1 , ..., D j − 1 } . Iteration. A t each iteration k ≥ 0, no de v j is aw are of the p er c eive d integer weigh ts on its incoming edges { f ( p ) j i [ k ] | v i ∈ N − j } and the (actual) weigh ts on its outgoing edges { f lj [ k ] | v l ∈ N + j } , whic h allo ws it to calculate its p er c eive d weigh t imbalance x ( p ) j [ k ] according to Definition 9 . A. Sele cting Desir able Weights. Each no de v j with p ositive p er c eive d weigh t im balance (i.e., x ( p ) j [ k ] > 0) attempts to c hange the weigh ts on its incoming edges { f j i [ k ] | v i ∈ N − j } and/or outgoing edges { f lj [ k ] | v l ∈ N + j } in a wa y that driv es its p erceived w eigh t im balance x ( p ) j [ k + 1] to zero (at least if no other changes are inflicted on the weigh ts). No attempt to c hange weigh ts is made if no de v j has negative or zero p erceived weigh t im balance. Sp ecifically , no de v j attempts to add +1 (or subtract − 1) to its outgoing (or incoming) integer weigh ts one at a time, according to a predetermined (cyclic) order un til its p erceived weigh t imbalance b ecomes zero. If an outgoing (incoming) edge has reac hed its max (min) v alue (according to the feasible interv al on that particular edge), then its w eight do es not c hange and no de v j pro ceeds to c hange the next one according to the predetermined order, in a round-robin fashion. The desired weigh t c hange b y node Weight Balancing under Link Constr aints over Unr eliable Communic ation 71 v j on edge ( v j , v i ) ∈ E at iteration k will b e denoted by c ( j ) j i [ k ]; similarly , the desired w eight by no de v j on edge ( v l , v j ) ∈ E at iteration k will b e denoted b y c ( j ) lj [ k ]. Note: Next time no de v j has p ositiv e p er c eive d weigh t imbalance it con tinues increasing (decreasing) its outgoing (incoming) edges by 1, one at a time, follo wing the (cyclic) predetermined order starting from the edge it stopp ed the previous time it had p ositiv e w eight imbalance. B. Exchanging Desir able weights. Once the no des with p ositive p er c eive d weigh t imbal- ance calculates the desirable weigh t change for eac h incoming { c ( j ) j i [ k ] | v i ∈ N − j } and outgoing { c ( j ) lj [ k ] | v l ∈ N + j } weigh t, they take the follo wing steps in sequence: 1) No de v j transmits the desirable w eight c hange c ( j ) j i [ k ] ( c ( j ) lj [ k ]) to eac h in- (out-) neigh- b or v i ( v l ). 2) No de v j receiv es the delay ed desired weigh t changes c ( i ) j i [ k ] ( c ( l ) lj [ k ]) from each in- (out-) neighbor v i ( v l ). If no w eight change is receiv ed due to time delays, then no de v j assumes that c ( i ) j i [ k ] = 0 ( c ( l ) lj [ k ] = 0) for the corresp onding incoming (outgoing) edge ( v j , v i ) (( v l , v j )). 3) It calculates its new outgoing ( p er c eive d incoming) w eigh ts f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ] + c ( l ) lj [ k ] ( f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ] + c ( i ) j i [ k ]). Then, the new outgoing ( p er c eive d incoming) w eights are adjusted so that the new w eight is pro jected on to the feasible in terv al [ l lj , u lj ] ([ l j i , u j i ]) of the corresp onding edge. This (along with all the parameters in volv ed) can b e seen in Figure 6.1 . R emark 6.2 . Since the w eight f j i on each edge ( v j , v i ) ∈ E affects p ositively the weigh t im balance x j [ k ] of node v j and negativ ely the w eight imbalance x i [ k ] of node v i , we need to tak e into account the p ossibilit y that b oth no des desire a change on the weigh t sim ultaneously . Thus, the prop osed algorithm attempts to coordinate the weigh t c hange. The challenge how ever, is the fact that time delays ma y o ccur during transmissions (in either direction) while the no des are trying to agree on a w eight v alue. v i v 7 v 2 v j v 6 v 5 v l c ( i ) j i [ k ] c ( i ) j i [ k ] or 0 c ( j ) lj [ k ] c ( j ) lj [ k ] or 0 c ( j ) j i [ k ] c ( j ) j i [ k ] or 0 c ( l ) lj [ k ] c ( l ) lj [ k ] or 0 Figure 6.1: Digraph where no des exc hange their desirable weigh ts in the presence of time dela ys. 6.3.1 F ormal Description of Distributed Algorithm A formal description of the prop osed distributed algorithm is presented in Algorithm 6 . Weight Balancing under Link Constr aints over Unr eliable Communic ation 72 Algorithm 6 Distributed w eight Balancing Algorithm in the Presence of Time Delays Input 1) A strongly connected digraph G d = ( V , E ) with n = |V | no des and m = |E | edges. 2) l j i , u j i for ev ery ( v j , v i ) ∈ E . Initialization Set k = 0; each no de v j ∈ V do es: 1) It sets the weigh ts on its p er c eive d incoming and outgoing edge weigh ts as f ( p ) j i [0] = d l j i e , ∀ v i ∈ N − j , f lj [0] = d l lj e , ∀ v l ∈ N + j . 2) It assigns a unique order to its outgoing and incoming edges as P ( j ) lj , for v l ∈ N + j or P ( j ) j i , for v i ∈ N − j (suc h that { P ( j ) lj | v l ∈ N + j } ∪ { P ( j ) j i | v i ∈ N − j } = { 0 , 1 , ..., D j − 1 } ). Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1) It computes its p er c eive d weight imb alanc e as in Definition 9 x ( p ) j [ k ] = X v i ∈N − j f ( p ) j i [ k ] − X v l ∈N + j f lj [ k ] . 2) If x ( p ) j [ k ] > 0, it calculates the desired amount of change for the w eights on its outgoing and incoming edges. Sp ecifically , it increases (decreases) by 1 the integer weigh ts f lj [ k ] ( f ( p ) j i [ k ]) of its outgoing (incoming) edges v l ∈ N + j ( v i ∈ N − j ) one at a time, follo wing the predetermined order P ( j ) lj ( P ( j ) j i ) until its w eight imbalance b ecomes zero (if an edge has reac hed its maximum v alue, its w eight do es not c hange and no de v j pro ceeds in changing the next one according to the predetermined order). Then, it stores the desired change amoun t for each outgoing edge as c ( j ) lj [ k ] and each incoming edge as c ( j ) j i [ k ]. 3) If x ( p ) j [ k ] > 0, it transmits the desired weigh t change c ( j ) lj [ k ] ( c ( j ) j i [ k ]) on each outgoing (incoming) edge. 4) It receives the (p ossibly delay ed) desired weigh t change c ( l ) lj [ k ] ( c ( i ) j i [ k ]) from each outgoing (incoming) edge. [If no w eigh t change is received due to time dela ys it assumes c ( l ) lj [ k ] = 0 ( c ( i ) j i [ k ] = 0) for the corresp onding outgoing (incoming) edge.] 5) It sets its new outgoing weigh ts to b e f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ] + c ( l ) lj [ k ] , and its new p er c eive d incoming weigh ts to b e f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ] + c ( i ) j i [ k ] . 6) It adjusts the new outgoing weigh ts according to the corresp onding upp er and lo w er w eight constraints as f lj [ k + 1] = max { l lj , min { u lj , f lj [ k + 1] }} , and its new p er c eive d incoming weigh ts according to the corresp onding upp er and lo wer w eight constraints as f ( p ) j i [ k + 1] = max { l j i , min { u j i , f ( p ) j i [ k + 1] }} . 7) It rep eats (increases k to k + 1 and go es back to Step 1). Weight Balancing under Link Constr aints over Unr eliable Communic ation 73 R emark 6.3 . According to the In teger Circulation Conditions in Section 5.2 , each no de v j ∈ V with p ositiv e p er c eive d weigh t imbalance at iteration k ( x ( p ) j [ k ] > 0) will alwa ys b e able to calculate a weigh t assignmen t for its incoming and outgoing edge w eights so that its p er c eive d w eigh t imbalance b ecomes zero (at least if no other changes are inflicted on the w eigh ts of its incoming or outgoing links). This means that the selection of desirable weigh ts in Algorithm 6 is alwa ys fe asible . R emark 6.4 . It is imp ortant to note here that the total p er c eive d in-w eight S − ( p ) j of no de v j migh t b e affected from p ossible time delays at Step 4 of Algorithm 6 . Sp ecifically , if transmissions are affected from p ossible time delays then v j sets f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ] where c ( j ) j i [ k ] < 0 (since no des only attempt to make changes on the w eigh ts if their p erceived balance is p ositive, no de v i will only attempt to increases the weigh t f j i [ k ] of edge ( v j , v i )). This means that during the execution of Algorithm 6 w e hav e f ( p ) j i [ k ] ≤ f j i [ k ] for each edge ( v j , v i ) ∈ E , at each time step k . R emark 6.5 . The weigh t adjustment in Algorithm 6 signifies that after iteration k of the prop osed distributed algorithm, once no de v j calculates the desired weigh t changes for its incoming (outgoing) edges c ( j ) j i [ k ] ( c ( j ) lj [ k ]), ∀ v i ∈ N − j ( ∀ v l ∈ N + j ), it receives the dela y ed desired w eigh t c hanges from its in- (out-) neighbors c ( i ) j i [ k ] ( c ( l ) lj [ k ]). Then, the new w eight of edge ( v j , v i ) (( v l , v j )) will b e f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( i ) j i [ k ] + c ( j ) j i [ k ] ( f lj [ k + 1] = f lj [ k ] + c ( l ) lj [ k ] + c ( j ) lj [ k ]). According to Step 6 of the prop osed algorithm we alw ays hav e that 0 < l j i ≤ f ( p ) j i [ k + 1] ≤ u j i and 0 < l lj ≤ f lj [ k + 1] ≤ u lj . 6.3.2 Pro of of Algorithm Completion In this section we analyze the functionality of the distributed algorithm and w e prov e that it solves the weigh t balancing problem in the presence of arbitrary (time-v arying, inhomogeneous) but b ounded time dela ys that ma y app ear during the information ex- c hange b etw een agents in the system. Pr op osition 11 . Consider the problem formulation describ ed in Section 6.2 . Let V − [ k ] ⊂ V b e the set of no des with negativ e w eight imbalance at iteration k , i.e., V − [ k ] = { v j ∈ V | x j [ k ] < 0 } . During the execution of Algorithm 6 , we hav e that V − [ k + 1] ⊆ V − [ k ] . Pr o of. W e will first argue that no des with nonnegative p er c eive d w eight imbalance at iteration k can never reac h negative p erceived w eight im balance at iteration k + 1. Com bining this with the fact that the p erceiv ed w eight imbalance of a no de is alw a ys b elo w its actual weigh t im balance, we establish the pro of of the prop osition. Weight Balancing under Link Constr aints over Unr eliable Communic ation 74 Consider a no de v j with a nonnegative p erceiv ed weigh t imbalance x ( p ) j [ k ] ≥ 0 (from Remark 6.4 , since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0, we hav e that also x j [ k ] ≥ 0). W e analyze b elo w the following tw o cases: 1. at least one neigh b or of no de v j has p ositiv e p erceived weigh t im balance, 2. all neighbors of no de v j ha ve negative or zero p erceived weigh t im balance. In b oth cases, since x ( p ) j [ k ] ≥ 0, no de v j will attempt to change the weigh ts of (some of ) its incoming and outgoing edges. Sp ecifically , no de v j will calculate the desirable weigh t c hange c ( j ) j i [ k ] ( c ( j ) lj [ k ]) for its incoming (outgoing) edges ( v j , v i ) (( v l , v j )) where v i ∈ N − j ( v l ∈ N + j ). Then, it transmits the desired weigh t change c ( j ) j i [ k ] ( c ( j ) lj [ k ]) to its incoming (outgoing) edges ( v j , v i ) (( v l , v j )) where v i ∈ N − j ( v l ∈ N + j ). In the first case, we hav e (i) x ( p ) i [ k ] > 0 for some v i ∈ N − j , or (ii) x ( p ) l [ k ] > 0 for some v l ∈ N + j . F or (i) we hav e that during iteration k of Algorithm 6 , the incoming edge weigh ts of v j migh t change by its in-neigh b ors (i.e., the w eight of an incoming edge ( v j , v i ) might b e increased to b e equal to f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] for some v i ∈ N − j ). In this case, since the transmission of c ( i ) j i [ k ] from v i to v j migh t suffer time delay , we hav e that v j sets its outgoing weigh ts to b e f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ], and its p er c eive d incoming w eights to b e f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ]. Th us, w e hav e that x ( p ) j [ k + 1] = 0. [Note that, after τ ( i ) j i [ k ] time steps (during the iteration k + τ ( i ) j i [ k ]) no de v j will receive the desired weigh t c hange c ( i ) j i [ k ] which was sent from no de v i at time step k . Then it will up date its its p er c eive d incoming weigh ts to b e f ( p ) j i [ k + τ ( i ) j i [ k ] + 1] = f ( p ) j i [ k + τ ( i ) j i [ k ]] + c ( i ) j i [ k + τ ( i ) j i [ k ]], whic h means that x ( p ) j [ k + τ ( i ) j i [ k ] + 1] > 0.] As a result, for (i) we hav e that nonnegativ e p er c eive d w eight imbalance of no de v j at iteration k remains nonnegative at iteration k + 1. F or (ii) we ha ve that the outgoing edge weigh ts of v j migh t change by its out-neighbors v l ∈ N + j and it can b e argued in a similar manner. In the second case, w e hav e x ( p ) i [ k ] ≤ 0 for every v i ∈ N − j , and x ( p ) l [ k ] ≤ 0 for every v l ∈ N + j . This means that the neighbors of v j will not attempt to c hange the weigh ts of its incoming and outgoing edges. As a result, since v j will transmit its desired weigh t c hanges and then set its outgoing weigh ts to be f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ] and its p er c eive d incoming weigh ts to b e f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ], we hav e that x ( p ) j [ k + 1] = 0. As a result w e ha ve that during iteration k of Algorithm 6 , no des with nonnegative p er c eive d weigh t imbalance can never reach negativ e p er c eive d weigh t imbalance at it- eration k + 1. F rom Remark 6.4 , since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0, we ha ve that also no des with nonnegative weigh t imbalance can nev er reac h negativ e w eight im balance, th us establishing the pro of of the prop osition. Weight Balancing under Link Constr aints over Unr eliable Communic ation 75 Pr op osition 12 . Consider the problem form ulation describ ed in Section 6.2 . During the execution of Algorithm 6 , it holds that 0 ≤ ε [ k + 1] ≤ ε [ k ] , ∀ k ≥ 0 , where ε [ k ] ≥ 0 is the total imbalance of the netw ork at iteration k (see Definition 3 ). Pr o of. F rom the third statement of Prop osition 7 , we ha ve ε [ k +1] = 2 P v j ∈V − [ k +1] | x j [ k + 1] | and ε [ k ] = 2 P v j ∈V − [ k ] | x j [ k ] | , whereas from Prop osition 11 , w e hav e V − [ k + 1] ⊆ V − [ k ]. Consider a no de v j ∈ V − [ k ] with weigh t im balance x j [ k ] < 0 (obviously we ha v e that also x ( p ) j [ k ] < 0 since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0 from Remark 6.4 ). W e analyze b elo w the following tw o cases: 1. all neighbors of no de v j ha ve negative or zero p erceived weigh t im balance, 2. at least one neigh b or of no de v j has p ositiv e p erceived weigh t im balance. In b oth cases, node v j will not mak e any changes on its edges. In the first case, the w eight imbalance of no de v j will not c hange (i.e., x j [ k + 1] = x j [ k ] < 0). In the second case, we hav e (i) x ( p ) i [ k ] ≥ 0 for some v i ∈ N − j , or (ii) x ( p ) l [ k ] ≥ 0 for some v l ∈ N + j . F or (i) w e ha ve that during the iteration k of Algorithm 6 , the incoming edge weigh ts of v j migh t c hange by its in-neigh b ors (i.e., the w eight of an incoming edge ( v j , v i ) migh t b e increased to b e equal to f j i [ k + 1] = f j i [ k ] + c ( i ) j i [ k ] for some v i ∈ N − j ). In this case (regardless of whether we ha ve a dela y during the transmission of c ( i ) j i [ k ] from v i to v j ) we ha ve ε [ k + 1] ≤ ε [ k ] (using the third statement in Prop osition 7 ). F or (ii) w e hav e that during iteration k of Algorithm 6 , the out-neigh b or of v j migh t transmit the desired change amoun t of the outgoing edge weigh ts to no de v j . In this case, if the transmission of c ( l ) lj [ k ] is delay ed, then the w eigh t imbalance of v j will not change (i.e., x j [ k + 1] = x j [ k ] < 0), but when v j receiv es c ( l ) lj [ k + τ ( l ) lj [ k ]] then the weigh t imbalance of no de v j will satisfy x j [ k + 1] ≥ x j [ k ]. As a result, for b oth cases, w e hav e ε [ k + 1] ≤ ε [ k ] (using the third statement in Prop osition 7 ). Pr op osition 13 . Consider the problem form ulation describ ed in Section 6.2 where the Integer Circulation Conditions in Section 5.2 are satisfied. Algorithm 6 balances the w eights in the graph in a finite n umber of steps (i.e., ∃ k 0 so that ∀ k ≥ k 0 , f j i [ k 0 ] = f j i [ k ], ∀ ( v j , v i ) ∈ E and x j [ k ] = x j [ k 0 ] = 0, ∀ v j ∈ V ). Pr o of. By contradiction, supp ose Algorithm 6 runs for an infinite n umber of iterations and its total im balance remains p ositive (i.e., ε [ k ] > 0 for all k ). During the execution of the prop osed distributed balancing algorithm, transmissions on each communication link ( v l , v j ) ∈ E are affected by arbitrary (time-v arying and inhomogeneous) b ounded Weight Balancing under Link Constr aints over Unr eliable Communic ation 76 time delays. W e hav e that the delays that affect transmissions on each link ( v l , v j ) ∈ E are b ounded (i.e., 0 ≤ τ ( j ) lj [ k ] ≤ τ lj ≤ ∞ ). Th us, the pack ets transmitted on each link ( v l , v j ) ∈ E will even tually reach the corresp onding no de after a finite num b er of steps. Supp ose now that Algorithm 6 runs for an infinite num b er of iterations and by con tra- diction its total im balance remains p ositiv e (i.e., ε [ k ] > 0 for all k ). This means that alw ays (at eac h k ) there will exist at least one no de with p ositive weigh t imbalance and thus the pro of of this Prop osition b ecomes iden tical to the pro of of Prop osition 10 (b ecause, as argued ab ov e, its p erceived im balance will ev en tually b ecome p ositive, once all transmitted pack ets are receiv ed). As a result, w e hav e that if the Integer Circulation Conditions in Section 5.2 hold, the total im balance ε [ k ] decreases after a finite n umber of iterations, and Algorithm 6 results in a weigh t-balanced digraph after a finite num b er of iterations. 6.4 Extension to Ev ent-T riggered Op eration Motiv ated b y the need to reduce energy consumption, c omm unication bandwidth, net- w ork congestion, and/or pro cessor usage, many researchers hav e considered the use of even t-triggered comm unication and con trol [ 51 , 52 ]. In this section, we discuss an ev ent-triggered op eration of the prop osed distributed algorithm where each agent au- tonomously decides when communication and con trol up dates should o ccur so that the resulting netw ork executions still result in a weigh t-balanced digraph after a finite num- b er of steps in the presence of arbitrary (time-v arying, inhomogeneous) but b ounded time dela ys that migh t affect link transmissions. More sp ecifically , follo wing the pro- p osed even t-triggered strategy , w e can pro v e that (i) all no des even tually stop transmit- ting, and (ii) the prop osed distributed algorithm is able to obtain a set of weigh ts that balance the corresp onding digraph after a finite num b er of iterations. 6.4.1 F ormal Description of Distributed Algorithm A formal description of the algorithm’s ev en t-triggered op eration is presen ted in Algo- rithm 7 . 6.4.2 Pro of of Algorithm Completion Pr op osition 14 . Consider the problem formulation describ ed in Section 6.2 where the in teger circulation conditions in Section 5.2 are satisfied. Algorithm 7 balances, the w eights in the graph in a finite num b er of steps [even in the presence of b ounded delays] (i.e., ∃ k 0 so that ∀ k ≥ k 0 , f j i [ k 0 ] = f j i [ k ], ∀ ( v j , v i ) ∈ E and x j [ k ] = x j [ k 0 ] = 0, ∀ v j ∈ V ). Pr o of. The ev ent-triggered op eration of Algorithm 7 is identical to the op eration of Algorithm 7 with delays if we assume that in the latter algorithm all transmissions Weight Balancing under Link Constr aints over Unr eliable Communic ation 77 Algorithm 7 Ev en t-T riggered Distributed Balancing in the Presence of Time Dela ys Input (Inputs are the same as Algorithm 6 ). Initialization F or k = 0, eac h no de v j ∈ V do es the following: (Steps 1, 2 are the same as Algorithm 6 ). 3) (Same as Iteration-Step 1 in Algorithm 6 ). 4) (Same as Iteration-Step 2 in Algorithm 6 ). 5) (Same as Iteration-Step 3 in Algorithm 6 ). 6) If x ( p ) j [0] > 0, it sets its outgoing weigh ts to b e f lj [1] = f lj [0] + c ( j ) lj [0] , and its new p er c eive d incoming weigh ts to b e f ( p ) j i [1] = f ( p ) j i [0] + c ( j ) j i [0] . Iteration F or k = 1 , 2 , 3 , . . . , each no de v j ∈ V do es the following: 1) Event trigger e d c ondition: If no weigh t change is receiv ed due to time delays then no de v j skips Steps 2, 3, 4, 5, 6, and 7 b elo w; otherwise (even t triggered condition) it receiv es the dela yed desired w eigh t change c ( l ) lj [ k ] ( c ( i ) j i [ k ]) from each outgoing (incoming) edge and p erforms the steps b elo w. 2) It sets its outgoing w eights to b e f lj [ k + 1] = f lj [ k + 1] + c ( l ) lj [ k ] , and its new p er c eive d incoming weigh ts to b e f ( p ) j i [ k + 1] = f ( p ) j i [ k + 1] + c ( i ) j i [ k ] . 3) (Same as Step 1 in Algorithm 6 ). 4) (Same as Step 2 in Algorithm 6 ). 5) (Same as Step 3 in Algorithm 6 ). 6) If x ( p ) j [ k ] > 0, it sets its outgoing weigh ts to b e f lj [ k + 1] = f lj [ k ] + c ( j ) lj [ k ] , and its new p er c eive d incoming weigh ts to b e f ( p ) j i [ k + 1] = f ( p ) j i [ k ] + c ( j ) j i [ k ] . 7) (Same as Step 6 in Algorithm 6 ). 8) It rep eats (increases k to k + 1 and go es back to Step 1). Weight Balancing under Link Constr aints over Unr eliable Communic ation 78 of desired w eight changes suffer the maxim um p ossible delay . As a result, since the op eration of b oth algorithms is iden tical 1 , we hav e that Algorithm 7 will conv erge to a set of weigh ts that form a weigh t-balanced digraph after a finite num b er of steps. Also, since ∃ k 0 so that ∀ k ≥ k 0 , f j i [ k 0 ] = f j i [ k ], ∀ ( v j , v i ) ∈ E and x j [ k ] = x j [ k 0 ] = 0, ∀ v j ∈ V , from Step 1 of Algorithm 7 , we can see that all no des even tually stop transmitting. 6.5 Distributed Algorithm for W eigh t Balancing in the Presence of P ack et Dropping Links In this section w e provide an ov erview of the distributed w eigh t balancing algorithm op eration; the formal description of the algorithm is provided in Algorithm 8 . The algorithm is iterative and op erates by having, at each iteration, no des with p ositive p erceiv ed w eight im balance attempt to change the integer weigh ts on b oth their incoming and/or outgoing edges so that they b ecome w eigh t balanced. Again, we assume that eac h no de is in charge of assigning the weigh ts on its outgoing edges (i.e., f j i is assigned b y no de v i ; due to p ossible pac k et drops the p erceived w eight f ( p ) j i on this link by no de v j migh t b e differen t) which means that eac h no de will know exactly the w eights on its outgoing edges but only hav e access to p erceived weigh ts on its incoming edges. Note that the op eration of Algorithm 8 is similar to Algorithm 6 with the main difference b eing that eac h no de is required to calculate and transmit the desirable weights (and not the desired change amounts) for its incoming and outgoing edges. W e describ e the op eration of iterative algorithm and establish that, if the necessary and sufficien t integer circulation conditions for the existence of a set of inte ger weigh ts that balance the given digraph are satisfied, the algorithm completes, almost surely , after a finite n umber of iterations. Initialization. Same as Algorithm 6 . Iteration. A t each iteration k ≥ 0, no de v j is aw are of the p er c eive d integer weigh ts on its incoming edges { f ( p ) j i [ k ] | v i ∈ N − j } and the (actual) weigh ts on its outgoing edges { f lj [ k ] | v l ∈ N + j } , which allo w it to calculate its p er c eive d weigh t im balance x ( p ) j [ k ] according to Definition 9 . A. Sele cting Desir able weights: Each no de v j with p ositive p er c eive d weigh t imbalance (i.e., x ( p ) j [ k ] > 0) attempts to c hange the weigh ts on its incoming edges { f j i [ k ] | v i ∈ N − j } and/or outgoing edges { f lj [ k ] | v l ∈ N + j } in a wa y that driv es its p erceived w eigh t im balance x ( p ) j [ k + 1] to zero (at least if no other changes are inflicted on the weigh ts). No attempt to c hange weigh ts is made if no de v j has negative or zero p erceived weigh t im balance. Specifically , no de v j attempts to add +1 (or subtract − 1) to its outgoing (or incoming) in teger weigh ts one at a time, according to a predetermined (cyclic) order un til 1 The op eration is iden tical under different delays in each case. Weight Balancing under Link Constr aints over Unr eliable Communic ation 79 its p erceived weigh t im balance becomes zero. If an outgoing (incoming) edge has reac hed its max (min) v alue (according to the feasible interv al on that particular edge), then its w eight do es not c hange and no de v j pro ceeds in changing the next one according to the predetermined order. The desired weigh t b y no de v j on edge ( v j , v i ) ∈ E at iteration k will b e denoted b y f ( j ) j i [ k ]; similarly , the desired w eigh t by no de v j on edge ( v l , v j ) ∈ E at iteration k will b e denoted by f ( j ) lj [ k ]. Note: Next time no de v j has p ositiv e p er c eive d weigh t imbalance it con tinues increasing (decreasing) its outgoing (incoming) edges by 1, one at a time follo wing the (cyclic) predetermined order starting from the edge it stopp ed the previous time it had p ositiv e balance. B. Exchanging Desir able weights: Once the no des with p ositive p er c eive d weigh t im bal- ance calculate the desirable incoming { f ( j ) j i [ k ] | v i ∈ N − j } and outgoing { f ( j ) lj [ k ] | v l ∈ N + j } weigh ts, they take the follo wing steps in sequence: 1) Node v j transmits (receiv es) the calculated desirable weigh ts f ( j ) j i [ k ] ( f ( l ) lj [ k ]) to (from) their in- (out-) neigh b or v i ( v l ). [No des with non-p ositive p erceived weigh t imbalance simply transmit the v alues f ( p ) j i [ k ].] 2) If no weigh t is received from out-neighbor v l (due to a pack et drop), then no de v j assumes that f ( l ) lj [ k ] = f lj [ k ] for the corresp onding outgoing edge ( v l , v j ) which suffered a pack et drop on the transmission on the reverse link from no de v l to no de v j . Then it calculates its new outgoing weigh ts f lj [ k + 1] = f ( l ) lj [ k ] + f ( j ) lj [ k ] − f lj [ k ] (pro jected on to the feasible in terv al [ l lj , u lj ]) and it transmits them to each corresp onding out-neighbor v l ∈ N + j . 3) It receives the new incoming weigh ts { f ( p ) j i [ k + 1] | v i ∈ N − j } from each corresp onding in-neigh b or. If no weigh t is received then no de v j assumes that f ( p ) j i [ k + 1] = f ( j ) j i [ k ] for the corresp onding incoming edge ( v j , v i ) whic h suffered a pack et drop. This (along with all the parameters inv olved) can b e seen in Figure 6.2 . v i v 7 v 2 v j v 6 v 5 v l f j i [ k + 1] f ( p ) j i [ k ] or f ( j ) j i [ k ] f lj [ k + 1] f ( p ) lj [ k ] or f ( l ) lj [ k ] f ( j ) j i [ k ] f ( j ) j i [ k ] or f j i [ k ] f ( l ) lj [ k ] f ( l ) lj [ k ] or f lj [ k ] Figure 6.2: Digraph where no des exchange their desirable w eigh ts. R emark 6.6 . The differen t weigh ts that the no des are exchanging (and what happ ens in the case of a pack et drop) are shown in Fig. 6.2 . Sp ecifically , at each iteration k , eac h no de v j calculates its p er c eive d w eight imbalance x ( p ) j [ k ] and if its p ositiv e then it calculates the desired weigh ts for its incoming and outgoing edges ( f ( j ) j i [ k ] and f ( j ) lj [ k ] Weight Balancing under Link Constr aints over Unr eliable Communic ation 80 resp ectiv ely). Then, it sends the desired incoming w eight f ( j ) j i [ k ] to its in-neighbors v i ∈ N − j while it receives (if there is no pac ket drop) the desired incoming weigh t f ( l ) lj [ k ] from its out-neigh b ors v l ∈ N + j . If there is a pack et drop, it assumes that f ( l ) lj [ k ] = f lj [ k ]. It then calculates the new w eight for its outgoing edges f lj [ k + 1], ∀ v l ∈ N + j , and transmits them to v l ∈ N + j , while it receives the new w eights from its in-neighbors (if no incoming w eigh t is received then it assumes f ( p ) j i [ k + 1] = f ( j ) j i [ k ], otherwise f ( p ) j i [ k + 1] = f j i [ k + 1]). Dep ending on the p ossible pack et drops that might o ccur during the exc hange of the desirable weigh ts, we hav e the follo wing four cases: 1. f ( j ) j i [ k ] is dropp ed, 2. b oth f ( j ) j i [ k ] and f j i [ k + 1] are dropp ed, 3. f j i [ k + 1] is dropp ed, 4. no pack et is dropp ed. F or the first tw o cases, the new w eight on edge ( v j , v i ) ∈ E is taken to b e f j i [ k +1] = f ( i ) j i [ k ] where l j i ≤ f ( i ) j i [ k ] ≤ u j i (the difference in the t wo cases is that in the second case the p erceiv ed v alue of the w eight at no de v j is f ( p ) j i [ k + 1] = f ( j ) j i [ k ]. F or the third and fourth cases, the new weigh t on edge ( v j , v i ) ∈ E is taken to b e f j i [ k + 1] = [ f ( i ) j i [ k + 1] + f ( j ) j i [ k + 1] − f j i [ k ]] b u j i c d l j i e (where [ x ] b u j i c d l j i e denotes the pro jection on to the in terv al). The difference in the t w o cases is that in the third case f ( p ) j i [ k + 1] = f ( j ) j i [ k ], while in the fourth f ( p ) j i [ k + 1] = f ( i ) j i [ k + 1] + f ( j ) j i [ k + 1] − f j i [ k ]. 6.5.1 F ormal Description of Distributed Algorithm A formal description of the prop osed distributed algorithm is presented in Algorithm 8 . R emark 6.7 . According to the integer circulation conditions, each no de v j ∈ V with p ositiv e p er c eive d w eight im balance at iteration k ( x ( p ) j [ k ] > 0) will alwa ys b e able to calculate a w eight assignmen t for its incoming and outgoing edge w eigh ts so that its p er c eive d weigh t imbalance b ecomes zero (at least if no other changes are inflicted on the w eights of its incoming or outgoing links). This means that the selection of desirable w eights in Algorithm 8 is alw ays fe asible . R emark 6.8 . It is imp ortant to note here that the total p er c eive d in-w eight S − ( p ) j of no de v j migh t b e affected from p ossible pack et drops at Step 7 of Algorithm 8 . Specifically , if a pack et drop o ccurs; then v j assumes f ( p ) j i [ k + 1] = f ( j ) j i [ k ] where f ( j ) j i [ k ] ≤ f j i [ k + 1] (since no des only attempt to make c hanges on the weigh ts if their p erceived weigh t imbalance is positive, no de v i can only increase the weigh t of edge ( v j , v i )). This means that during the execution of Algorithm 8 we hav e f ( p ) j i [ k ] ≤ f j i [ k ] for eac h edge ( v j , v i ) ∈ E , at each time step k . Weight Balancing under Link Constr aints over Unr eliable Communic ation 81 Algorithm 8 Distributed weigh t Balancing Algorithm in the Presence of Pac k et Drops Input (Inputs are the same as Algorithm 6 ). Initialization (Steps 1, 2 are the same as Algorithm 6 ). Iteration F or k = 0 , 1 , 2 , . . . , each no de v j ∈ V do es the following: 1) It computes its p er c eive d weight imb alanc e as in Definition 9 x ( p ) j [ k ] = X v i ∈N − j f ( p ) j i [ k ] − X v l ∈N + j f lj [ k ] . 2) If x ( p ) j [ k ] > 0, it increases (decreases) by 1 the integer weigh ts f lj [ k ] ( f ( p ) j i [ k ]) of its outgoing (incoming) edges v l ∈ N + j ( v i ∈ N − j ) one at a time, follo wing the predetermined order P ( j ) lj ( P ( j ) j i ) until its w eight imbalance b ecomes zero (if an edge has reac hed its maxim um v alue, its w eight do es not c hange and no de v j pro ceeds in changing the next one according to the predetermined order). It stores the desirable weigh ts on eac h incoming edge as f ( j ) j i [ k ] and each outgoing edge as f ( j ) lj [ k ]. 3) If x ( p ) j [ k ] ≤ 0, it sets f ( j ) lj [ k ] = f lj [ k ] (and f ( j ) j i [ k ] = f ( p ) j i [ k ]) for its outgoing (incoming) edges in E + j ( E − j ). 4) It transmits the new w eight f ( j ) j i [ k ] on each incoming edge. 5) It receives the new weigh t f ( l ) lj [ k ] from each outgoing edge (if no w eight was received then it assumes that f ( l ) lj [ k ] = f lj [ k ]). 6) It sets its outgoing w eights to b e f lj [ k + 1] = f ( l ) lj [ k ] + f ( j ) lj [ k ] − f lj [ k ]. 7) It transmits the new w eight f lj [ k + 1] on eac h outgoing edge. 8) It receiv es new weigh t f ( p ) j i [ k + 1] from each incoming edge (if no w eight is received then it assumes that f ( p ) j i [ k + 1] = f ( j ) j i [ k ]). 9) It rep eats (increases k to k + 1 and go es back to Step 1). 6.5.2 Pro of of Algorithm Completion In this section, w e sho w that, as long as the In teger Circulation Conditions in Section 5.2 hold, then the total im balance ε [ k ] in Definition 3 go es to zero after a finite num b er of iterations of Algorithm 8 . This implies that the w eight imbalance x j [ k ] for each no de v j ∈ V go es to zero after a finite num b er of iterations, and thus (from the weigh t up dates in Algorithm 8 ) the integer weigh t f j i [ k ] on eac h edge ( v j , v i ) ∈ E stabilizes to an integer v alue f ∗ j i (where f ∗ j i ∈ N 0 ) within the given lo w er and upp er limits, i.e., 1 ≤ l j i ≤ f ∗ j i ≤ u j i for all ( v j , v i ) ∈ E . Pr op osition 15 . Consider the problem formulation describ ed in Section 6.2 . Let V − [ k ] ⊂ V b e the set of no des with negativ e w eight imbalance at iteration k , i.e., V − [ k ] = { v j ∈ V | x j [ k ] < 0 } . During the execution of Algorithm 8 , we hav e that V − [ k + 1] ⊆ V − [ k ] . Weight Balancing under Link Constr aints over Unr eliable Communic ation 82 Pr o of. W e will first argue that no des with nonnegative p er c eive d w eight imbalance at iteration k can never reac h negative p erceived w eight im balance at iteration k + 1. Com bining this with the fact that the p erceiv ed w eight imbalance of a no de is alw a ys b elo w its actual weigh t im balance, we establish the pro of of the prop osition. Consider a no de v j with a nonnegative p erceiv ed weigh t imbalance x ( p ) j [ k ] ≥ 0 (from Remark 6.8 , since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0 we hav e that also x j [ k ] ≥ 0). W e analyze b elo w the following tw o cases: 1. at least one neigh b or of no de v j has p ositiv e p erceived weigh t im balance, 2. all neighbors of no de v j ha ve negative or zero p erceived weigh t im balance. In b oth cases, since x ( p ) j [ k ] ≥ 0, no de v j will attempt to change the weigh ts of (some of ) its incoming and outgoing edges. Sp ecifically , node v j calculates the desirable weigh t f ( j ) j i [ k ] ( f ( j ) lj [ k ]) for its incoming (outgoing) edges ( v j , v i ) (( v l , v j )) where v i ∈ N − j ( v l ∈ N + j ). In the first case, b oth in- and out-neighbors ( v i and v l resp ectiv ely) of v j will calculate the desirable weigh ts for their incoming and outgoing edges. Dep ending on the p ossible pac ket drops that migh t o ccur during the transmissions from no de v i to no de v j , w e consider the following tw o scenarios: a) No pack et is dropp ed, b) At least one pack et is dropp ed. Recall that from the p erceptiv e of no de v j the following transmissions take place: first, no de v j sends f ( j ) j i [ k ] to each in-neighbor v i ∈ N − j . Then it receives f ( l ) lj [ k ] from every out-neigh b or v l ∈ N + j and finally , once it calculates the new weigh ts f lj [ k + 1] for its outgoing edges ( v l , v j ) (where v l ∈ N + j ), it transmits them to every out-neigh b or v l ∈ N + j . F or the first scenario (a), we hav e x ( p ) j [ k + 1] = X v i ∈N − j f ( p ) j i [ k + 1] − X v l ∈N + j f lj [ k + 1] (6.3) = X v i ∈N − j ( f ( i ) j i [ k ] + f ( j ) j i [ k ] − f j i [ k ]) − − X v l ∈N + j ( f ( j ) lj [ k ] + f ( l ) lj [ k ] − f lj [ k ]) . Since X v i ∈N − j f ( j ) j i [ k ] = X v l ∈N + j f ( j ) lj [ k ] , (6.4) Weight Balancing under Link Constr aints over Unr eliable Communic ation 83 ( 6.3 ) b ecomes x ( p ) j [ k + 1] = X v i ∈N − j ( f ( i ) j i [ k ] − f j i [ k ]) − − X v l ∈N + j ( f ( l ) lj [ k ] − f lj [ k ]) . (6.5) Also, since f ( i ) j i [ k ] ≥ f j i [ k ] and f ( l ) lj [ k ] ≤ f lj [ k ], ∀ ( v j , v i ) , ( v l , v j ) ∈ E , we conclude x ( p ) j [ k + 1] ≥ 0 , ∀ v j ∈ V . As a result we conclude that, for scenario (a), the nonnegative p er c eive d w eight imbalance of no de v j at iteration k remains nonnegative at iteration k + 1. F or scenario (b), let us assume (without loss of generalit y) that f j i [ k + 1], sent from no de v i to no de v j at Step 7 of the prop osed algorithm, suffered a pack et drop while all the other transmissions were successful. W e hav e that x ( p ) j [ k + 1] = X v i 0 ∈N − j f ( p ) j i 0 [ k + 1] − − X v l ∈N + j f lj [ k + 1] (6.6) = f ( j ) j i [ k ] + X v i 0 ∈N − j −{ v i } ( f j i 0 [ k + 1]) + f ( j ) j i [ k ] − − X v l ∈N + j ( f ( j ) lj [ k ] + f ( l ) lj [ k ] − f lj [ k ]) , whic h, in a similar manner, leads to the conclusion that x ( p ) j [ k + 1] ≥ 0 , ∀ v j ∈ V . Th us, for scenario (b), we conclude that if only the transmission from no de v i to no de v j suffered a pack et drop, the nonnegative p er c eive d weigh t imbalance of no de v j at iteration k remains nonnegative at iteration k + 1. The remaining scenarios, where multiple transmissions suffer pack et drops during the same iteration k , as well as the remaining cases, where all neigh b ors of no de v j ha ve negativ e or zero p erceived weigh t imbalance, can b e argued in a similar manner. As a result w e ha ve that during an iteration k of Algorithm 8 , no des with nonnega- tiv e p er c eive d w eight im balance can never reach negativ e p erceived weigh t imbalance at iteration k + 1. F rom Remark 6.8 , since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0, w e hav e that also no des with nonnegative weigh t imbalance can nev er reac h negativ e w eight im balance, th us establishing the pro of of the prop osition. Pr op osition 16 . Consider the problem form ulation describ ed in Section 6.2 . During the execution of Algorithm 8 , it holds that 0 ≤ ε [ k + 1] ≤ ε [ k ] , ∀ k ≥ 0 , Weight Balancing under Link Constr aints over Unr eliable Communic ation 84 where ε [ k ] ≥ 0 is the total imbalance of the netw ork at iteration k (see Definition 3 ). Pr o of. F rom the third statement of Prop osition 7 , we ha ve ε [ k +1] = 2 P v j ∈V − [ k +1] | x j [ k + 1] | and ε [ k ] = 2 P v j ∈V − [ k ] | x j [ k ] | , whereas from Prop osition 15 , w e hav e V − [ k + 1] ⊆ V − [ k ]. Consider a no de v j ∈ V − [ k ] with weigh t im balance x j [ k ] < 0 (obviously we ha v e that also x ( p ) j [ k ] < 0 since x ( p ) j [ k ] ≤ x j [ k ], ∀ k ≥ 0 from Remark 6.8 ). W e analyze b elo w the following tw o cases: 1. all neighbors of no de v j ha ve negative or zero p erceived weigh t im balance, 2. at least one neigh b or of no de v j has p ositiv e p erceived weigh t im balance. In b oth cases, no de v j will not make any weigh t c hanges on its edges. In the first case, the w eight im balance of no de v j will not c hange (i.e., x j [ k + 1] = x j [ k ] < 0). In the second case, we hav e (i) x ( p ) i [ k ] ≥ 0 for some v i ∈ N − j , or (ii) x ( p ) l [ k ] ≥ 0 for some v l ∈ N + j . F or (i) w e ha ve that during the iteration k of Algorithm 8 , the incoming edge weigh ts of v j migh t c hange by its in-neigh b ors (i.e., the w eight of an incoming edge ( v j , v i ) migh t b e increased to b e equal to f j i [ k + 1] = f ( i ) j i [ k ] for some v i ∈ N − j ). In this case (regardless if we hav e a pac k et drop during the transmission of f j i [ k + 1] from v i to v j ) we hav e ε [ k + 1] ≤ ε [ k ] (using the third statemen t in Prop osition 7 ). F or (ii) we ha v e that during iteration k of Algorithm 8 , the out-neighbor of v j migh t transmit the new outgoing edge w eights to node v j (i.e., v j migh t receiv e the new f ( l ) lj [ k ] from some v l ∈ N + j ). In this case, if f ( l ) lj [ k ] suffers a pac k et drop, the weigh t im balance of v j will not change (i.e., x j [ k + 1] = x j [ k ] < 0). If f ( l ) lj [ k ] is transmitted successfully then the w eight im balance of no de v j will satisfy x j [ k + 1] ≥ x j [ k ]. As a result, for b oth cases, w e hav e ε [ k + 1] ≤ ε [ k ] (using the third statement in Prop osition 7 ). Pr op osition 17 . Consider the problem formulation describ ed in Section 6.2 where the In teger Circulation Conditions in Section 5.2 are satisfied. Algorithm 8 balances the w eights in the graph in a finite n umber of steps, with probability one (i.e., ∃ k 0 so that almost surely ∀ k ≥ k 0 , f j i [ k 0 ] = f j i [ k ], ∀ ( v j , v i ) ∈ E and x j [ k ] = x j [ k 0 ] = 0, ∀ v j ∈ V ). Pr o of. By contradiction, supp ose Algorithm 8 runs for an infinite n umber of iterations and its total im balance remains p ositive (i.e., ε [ k ] > 0 for all k ). During the execution of the prop osed distributed balancing algorithm, pack ets con taining information are dropp ed with probability q lj < 1 for eac h comm unication link ( v l , v j ) ∈ E (we assume indep endence b etw een pac k et drops at different time steps and differen t links and link directions). During transmissions on link ( v l , v j ), we hav e that at eac h transmission, a pac ket go es through with probabilit y 1 − q lj > 0. Thus, if w e consider k lj consecutiv e uses of link ( v l , v j ), the probability that at least one pack et will go through is 1 − q k lj lj , which Weight Balancing under Link Constr aints over Unr eliable Communic ation 85 will b e arbitrarily close to 1 for a sufficiently large k lj . Sp ecifically , for an y (arbitrarily small)  > 0, we can choose k lj =  log  log q lj  , to ensure that each transmission go es through b y k lj steps with probability 1 −  . Supp ose now that Algorithm 8 runs for an infinite n um b er of iterations (where infinite successful pac ket transmissions o ccurred on each link ( v l , v j ), for a sufficiently large k lj ) and, by contradiction, its total imbalance remains p ositiv e (i.e., ε [ k ] > 0 for all k ). This means that alw ays (at each k ) there will exist at least one no de with p ositive w eight imbalance and th us the pro of of this Prop osition b ecomes identical to the pro of of Prop osition 10 . As a result w e hav e that if the Integer Circulation Conditions in Section 5.2 hold, the total im balance ε [ k ] decreases after a finite n umber of iterations, and Algorithm 8 results in a weigh t-balanced digraph after a finite num b er of iterations. 6.6 Sim ulation Study In this section, we present sim ulation results and comparisons for the prop osed dis- tributed algorithms. Sp ecifically , we presen t detailed n umerical results for a random graph of size n = 20 and for the av erage of 1000 random digraphs of 20 and 50 no des eac h. W e illustrate the b ehavior of the prop osed distributed algorithm for the following three differen t scenarios: (i) the scenario where Algorithm 6 op erates in a randomly created graph of 20 no des where for every comm unication link ( v j , v i ) ∈ E there are b ounded transmission dela ys 0 < τ lj < τ where τ = 10 (indep endently betw een different links and link directions) and each no de v j transmits the desired weigh t c hange c ( j ) lj [ k ] ( c ( j ) j i [ k ]) on each outgoing (incoming) edge ( v l , v j ) ∈ E (( v j , v i ) ∈ E ) to eac h v l ∈ N + j ( v i ∈ N − j ), at each iteration k , (ii) the scenario where Algorithm 7 op erates in a ran- domly created graph of 20 no des where for every communication link ( v j , v i ) ∈ E there are b ounded transmission delays 0 < τ lj < τ where τ = 10 (indep endently b etw een dif- feren t links and link directions) and eac h no de v j transmits only once the desired weigh t c hange c ( j ) lj [ k ] ( c ( j ) j i [ k ]) on each outgoing (incoming) edge ( v l , v j ) ∈ E (( v j , v i ) ∈ E ) to each v l ∈ N + j ( v i ∈ N − j ), (iii) the scenario where Algorithm 8 op erates in a randomly created graph of 20 no des where for ev ery comm unication link ( v j , v i ) ∈ E there are pac ket drops with equal probability q (where 0 ≤ q < 1) (indep endently b et w een different links and link directions) and each no de v j transmits the new weigh t f lj [ k + 1] ( f ( j ) j i [ k ]) on each outgoing (incoming) edge ( v l , v j ) ∈ E (( v j , v i ) ∈ E ) to each v l ∈ N + j ( v i ∈ N − j ), at eac h iteration k . Note that the the integer circulation conditions (presen ted in Section 5.2 ) hold of all three different scenarios. Weight Balancing under Link Constr aints over Unr eliable Communic ation 86 In Fig. 6.3 we show the operation of Algorithm 6 in a randomly created graph of 20 nodes where for ev ery comm unication link ( v j , v i ) ∈ E there are b ounded transmission dela ys 0 < τ lj < τ where τ = 10 (indep endently b et ween differen t links and link directions) and eac h no de v j transmits the desired w eight change c ( j ) lj [ k ] ( c ( j ) j i [ k ]) on eac h outgoing (incoming) edge ( v l , v j ) ∈ E (( v j , v i ) ∈ E ) to each v l ∈ N + j ( v i ∈ N − j ), at each iteration k . In the first case, we plot the absolute imb alanc e ε = P n j =1 | x j | , ∀ v j ∈ V (blue line) and the p erceived total imbalance ε ( p ) = P n j =1 | x ( p ) j | (red line) against the num b er of iterations k . In the second case the no des b alanc es x j [ k ] (as defined in Definition 2 ) as a function of the num b er of iterations k for the distributed algorithm. Here, the plot suggests that the absolute imbalance ε b ecomes equal to zero after a finite num b er of iterations, whic h means that Algorithm 6 is able to obtain a set of in teger weigh ts that balance the corresp onding digraph after a finite num b er of iterations in the presence of b ounded transmission delays 0 < τ lj < τ , where τ = 10, on eac h link ( v l , v j ) ∈ E . 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations 0 50 100 Absolute Imbalance Absolute and Perceived Absolute Imbalance vs Iterations for a Random Graph of 20 Nodes Absolute Imbalance Perceived Absolute Imbalance 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations -10 0 10 20 Node Flow Balances Node Flow Balances vs Iterations for a Random Graph of 20 Nodes Figure 6.3: Execution of Algorithm 6 for the case when the in teger circulation condi- tions hold for a random graph of 20 no des with transmission delays 0 < τ lj < τ where τ = 10. T op figur e: T otal (absolute) imbalance ε [ k ] (blue line) and p erceived total im balance ε ( p ) [ k ] (red line) plotted against num b er of iterations. Bottom figur e: No de w eight imbalances x j [ k ] plotted against n umber of iterations. In Fig. 6.4 w e show the op eration of Algorithm 7 for the same case as Fig. 6.3 . Here the plot suggests that Algorithm 7 is able to obtain a set of integer weigh ts that balance the corresp onding digraph after a finite num b er of iterations in the presence of b ounded transmission delays 0 < τ lj < τ , where τ = 10, on eac h link ( v l , v j ) ∈ E , for the case where each no de v j transmits only once the desired w eight change. In Fig. 6.5 we show the op eration of Algorithm 8 for the same cases as Figs. 6.3 and 6.4 . The plot suggests that Algorithm 8 is able to obtain a set of integer w eights that balance the corresp onding digraph after a finite num b er of iterations in the presence of pac ket dropping links with probability q = 0 . 8, on each link ( v l , v j ) ∈ E . Weight Balancing under Link Constr aints over Unr eliable Communic ation 87 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations 0 50 100 Absolute Imbalance Absolute and Perceived Absolute Imbalance vs Iterations for a Random Graph of 20 Nodes Absolute Imbalance Perceived Absolute Imbalance 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations -10 0 10 20 Node Flow Balances Node Flow Balances vs Iterations for a Random Graph of 20 Nodes Figure 6.4: Execution of Algorithm 7 for the case when the in teger circulation condi- tions hold for a random graph of 20 no des with transmission delays 0 < τ lj < τ where τ = 10. T op figur e: T otal (absolute) imbalance ε [ k ] (blue line) and p erceived total im balance ε ( p ) [ k ] (red line) plotted against num b er of iterations. Bottom figur e: No de w eight imbalances x j [ k ] plotted against n umber of iterations. 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations 0 50 100 150 Absolute Imbalance Absolute and Perceived Absolute Imbalance vs Iterations for a Random Graph of 20 Nodes Absolute Imbalance Perceived Absolute Imbalance 0 100 200 300 400 500 600 700 800 900 1000 Number of Iterations -20 -10 0 10 20 Node Flow Balances Node Flow Balances vs Iterations for a Random Graph of 20 Nodes Figure 6.5: Execution of Algorithm 8 for the case when the in teger circulation condi- tions hold for a random graph of 20 no des with pac ket drop probabilit y q j i = 0 . 8. T op figur e: T otal (absolute) im balance ε [ k ] (blue line) and Perceiv ed T otal Imbalance ε ( p ) [ k ] (red line) plotted against num b er of iterations. Bottom figur e: No de weigh t imbalances x j [ k ] plotted against n umber of iterations. 6.7 Chapter Summary In this c hapter, w e in tro duced and analyzed a nov el distributed algorithm which achiev es in teger weigh t balancing in a m ulti-comp onent system under low er and upp er constrain ts on the edge weigh ts in the presence of time delays ov er the comm unication links. W e analyzed its functionality , established its correctness and sho w ed that it achiev es integer Weight Balancing under Link Constr aints over Unr eliable Communic ation 88 w eight balancing after a finite num b er of steps. W e also added extensions to handle the cases of pac ket drops ov er the communication links and even t-triggered op eration where w e sho wed that in b oth scenarios, the prop osed algorithm conv erges (with probability one) to a set of weigh ts that form a balanced graph after a finite n umber of iterations W e also demonstrated the op eration, p erformance, and adv antages of the prop osed algorithm via v arious simulations. Chapter 7 Conclusions and F uture Directions 7.1 Conclusions In this thesis, we presented distributed algorithms for weigh t balancing o ver a static directed graph. In Chapter 3 we presented a distributed algorithm whic h deals with the problem of balancing a w eighted digraph. The prop osed distributed algorithm op erates b y having eac h no de compute its w eight im balance and then increase the integer w eights of its outgoing edges so that it b ecomes w eight balanced. Sp ecifically , the outgoing edges are assigned, if possible, equal in teger weigh ts; otherwise, if this is not p ossible, they are assigned integer weigh ts suc h that the maximum difference among them is equal to unit y . W e show ed that our distributed algorithm results in a weigh t balanced digraph after a finite n umber of iterations (b ounded in the w orst case by O ( n 7 )) and w e also carried out numerical simulations to illustrate the op eration and p otential adv an tages of the prop osed distributed algorithm. In Chapter 4 , we presented a no vel distributed algorithm which deals with the problem of balancing a w eighted digraph in the presence of time delays (b ounded b y a maximum v alue τ ) and pac ket drops ov er the communication links. This algorithm op erates by ha ving each no de compute its delay ed weigh t imbalance according to the latest received w eight v alues from its in-neighbors. Then, if it has p ositiv e (delay ed) imbalance, it in- creases by 1 the in teger w eigh ts of its outgoing edges one at a time, follo wing a fixed priorit y order (in a round robin fashion) until it b ecomes w eigh t balanced. This means that the outgoing edges are assigned, if p ossible, equal in teger weigh ts; otherwise, if this is not p ossible, they are assigned integer weigh ts suc h that the maximum difference among them is equal to one. W e show ed that our distributed algorithm conv erges to a set of weigh ts f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after O ( n 6 τ ) iterations (where f ∗ lj is a set of w eights that form a weigh t balanced digraph) after a finite num b er of steps b ounded by O ( n 6 ) 89 Conclusions and F utur e Dir e ctions 90 under no delays ( τ = 0). Then, we extended this result for the case where communi- cation links could also result in possible pac ket drops (i.e., un b ounded delays) in the corresp onding comm unication net work where w e sho wed that the prop osed distributed algorithm conv erges, with probability one, to a set of weigh ts f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after a finite n um b er of iterations despite the presence of pac k et drops o ccurring with probabilit y q lj , where f ∗ lj is the set of weigh ts that form a weigh t balanced digraph and are obtained after a finite num b er of steps b ounded by O ( n 6 ) under no pack et drops ( q lj = 0). F ollo wing these developmen ts, we presented an even t-triggered version of the prop osed distributed algorithm where eac h agen t autonomously decides when commu- nication and control up dates should o ccur so that the resulting net work executions still result to a set of weigh ts f lj = f ∗ lj , ∀ ( v l , v j ) ∈ E , after a finite num b er of steps b ounded b y O ( n 6 τ ) iterations (where the set of weigh ts f ∗ lj is the set of weigh ts obtained b y the nominal algorithm that runs with no ev en-triggering and no dela ys). W e also carried out n umerical simulations to sho w the op eration and p oten tial adv antages of the prop osed distributed algorithm. In Chapter 5 , w e presen ted a no vel distributed algorithm whic h deals with the problem of balancing a weigh ted digraph in the presence of upp er and low er w eigh t constraints o ver the communication links. Our distributed algorithm op erates by having eac h no de com- pute its weigh t imbalance according to the w eigh t v alues from its out- and in-neighbors. Then, if it has p ositive im balance it attempts to add +1 (or subtract − 1) to its outgo- ing (or incoming) integer weigh ts one at a time, according to a predetermined (cyclic) order, in a round robin fashion, un til its weigh t imbalance b ecomes zero. Each no de transmits the amount of c hange it calculated on each outgoing (or incoming) edge while it receives the amount of chan ge calculated by its out- and in-neighbors; it then assigns in teger weigh ts on its incoming and outgoing edges with resp ect to the corresp onding upp er and low er w eight constraints. W e sho wed that our distributed algorithm results in a weigh t balanced digraph after a finite num b er of iterations and carried out numer- ical simulations to illustrate the op eration and p oten tial adv antages of the prop osed distributed algorithm. Finally , in Chapter 6 , we presented a nov el distributed algorithm which deals with the problem of balancing a w eighted digraph within the allo wable edge weigh t interv als in the presence of time delays and pac ket drops o v er the communication links. Our distributed algorithm op erates b y having eac h no de compute its p erceived w eigh t imbalance accord- ing to the latest received weigh t v alues from its in-neighbors. When the comm unication links are sub ject to time delays, a no de has p ositive p erceiv ed imbalance, it calculates the desired change amoun t for each incoming and outgoing links by adding +1 (or sub- tracting 1) to its outgoing (or incoming) in teger weigh ts one at a time, according to a predetermined (cyclic) order until its weigh t imbalance b ecomes zero. The no de subse- quen tly transmits the amount of c hange it calculated on each outgoing (or incoming) Conclusions and F utur e Dir e ctions 91 edge while it receives the amount of change calculated by its out- and in-neighbors, and assigns in teger w eights on its incoming and outgoing edges with resp ect to the corre- sp onding upper and lo w er w eight constraints. W e sho wed that our distributed algorithm results in a weigh t balanced digraph after a finite n umber of iterations. The op eration of the prop osed algorithm was extended for the case where w e hav e even t-driven actua- tors, enabling a more efficien t use of the a v ailable resources. Sp ecifically , w e presented an ev en t-triggered op eration of the proposed distributed algorithm where eac h agen t autonomously decides when comm unication and control up dates should o ccur so that the resulting executions still result to a weigh t balanced digraph after a finite n umber of iterations. Finally , the op eration of the prop osed algorithm w as extended for the case where comm unication links could also result in p ossible pac ket drops (i.e., unbounded dela ys) in the corresp onding communication netw ork. In this case, w e sho wed that the prop osed distributed algorithm conv erges, with probability one, to a weigh t balanced digraph after a finite num b er of iterations. W e also carried out numerical sim ulations to illustrate the op eration and p otential adv antages of the prop osed distributed algorithm. 7.2 F uture Directions In this thesis we hav e that weigh t-balanced graphs/matrices play an imp ortan t role in the analysis and conv ergence of distributed co ordination algorithms. The algorithms in tro duced in this thesis can also be used for other applications. A distributed algorithm whic h deals with the problem of balancing a w eigh ted digraph, introduced and analyzed in Chapter 3 , can be used for the case where each agen t in the net work wan ts to calculate a common quan tized v alue equal to the exact a verage of the initial v alues (i.e., the no des need to reac h quan tized consensus). Sp ecifically , b y assuming that eac h no de has t wo initial v alues (the quantized measurement along with the v alue 1) we can implement a “mass summation” algorithm in whic h every no de sums the incoming v alues and then directly transmits them to an out-neighbor, chosen according to the predetermined priorit y order. This iteration will allo w each agen t to obtain t wo in teger v alues, the ratio of which is equal to the a verage of the initial v alues of the no des. The extension tow ards quan tized av erage consensus has applications in capacit y and memory constrain ed sensor net works, load balancing in pro cessor net works, and others. In Chapter 5 w e presen ted a nov el distributed algorithm whic h deals with the problem of balancing a w eighted digraph in the presence of upp er and low er w eigh t constraints o ver the communication links and we extended its op eration, in Chapter 6 , for the cases where w e ha ve time dela ys and pack et drops o ver the comm unication links. The presence of constrain ts o ver the comm unication links means that the differences of the resulting link w eights (that form a weigh t balanced digraph) are also constrained and dep end on the upp er and low er weigh t interv als and the graph structure. Given a weigh t balanced Conclusions and F utur e Dir e ctions 92 digraph, one can use a finite-time algorithm, based on max-consensus, to obtain a doubly sto c hastic matrix which find applications in distributed av eraging. In this matrix the link weigh t differences are also constrained (since they dep end on the weigh t balanced digraph) and affect the asymptotic conv ergence rate tow ards a verage consensus. Thus, the design of a distributed algorithm which calculates a set of weigh ts that form a w eight balanced digraph in the presence of upp er and low er weigh t constrain ts and minimizes the link w eight differences is an imp ortant op en problem, which will allow us to p erform distributed a veraging under the maximum p ossible rate of con vergence (i.e., the conv ergence rate under which ev ery no de reaches, asymptotically , av erage conse nsus will b e the maximum p ossible). The op eration of the proposed distributed algorithm, presented in Chapters 5 and 6 , can also b e extended to the case where nodes with negative w eight im balance also at- tempt to change the in teger weigh ts in b oth its incoming edges and its outgoing edges with resp ect to the corresp onding upp er and low er weigh t constraints. Dep ending on the graph structure, this could impro ve the sp eed under whic h w e are able to obtain a set of weigh ts that form a w eight balanced digraph, which means that once the no des ha ve reac hed a w eight balanced digraph, they can mo v e on to some other distributed computation (e.g., a verage consensus). F urthermore, the prop osed algorithm op eration can b e extended to handle more realistic scenarios in which the edges are able to take v alues in m ultiple spaces. This extension is highly imp ortant since, firstly , it can handle the case where eac h edge ma y suffer damages and will be unable to obtain a certain range of v alues, and secondly , a p ossible solution of this problem will lead to the def- inition of a new circulation theorem, th us improving and extending the one presen ted in Section 5.2 , p ossibly leading to impro ved v ersions of algorithms which deal with the standard and maximum flo w problem, auction problem, and energy minimization prob- lem. Finally , the prop osed algorithm op eration relies on bi-directional comm unication (i.e., the comm unication top ology is captured by the undirected graph that corresp onds to the netw ork digraph). This assumption may not b e v alid for applications whic h require directed comm unication since transmitting and receiving information requires energy , whic h is t ypically a sparse commo dity in many netw ork ed applications, suc h as sensor netw orks and mobile ad ho c comm unication netw orks. Thus, the extension of the op eration of the prop osed algorithm for the case when the communication top ology matc hes exactly the physical top ology (i.e., the comm unication top ology is captured by a directed graph) is an open problem whic h will extend the range of applications tow ards more realistic scenarios. Bibliograph y [1] N. Lync h, Distribute d Algorithms . San Mateo: CA: Morgan Kaufmann Publishers, 1996. [2] R. Olfati-Sab er, J. F ax, and R. Murra y , “Consensus and co op eration in net w orked m ulti-agent systems,” Pr o c e e dings of the IEEE , vol. 95, no. 1, pp. 215–233, January 2007. [3] R. Ko etter and M. M´ edard, “An algebraic approach to netw ork co ding,” IEEE/A CM T r ansactions on Networking , vol. 11, no. 5, pp. 782–795, Octob er 2003. [4] M. Rabbat and R. D. Now ak, “Distributed optimization in sensor netw orks,” Pr o- c e e dings of the 3r d International Symp osium on Information Pr o c essing in Sensor Networks (IPSN) , pp. 20–27, 2004. [5] A. Giridhar and P . R. Kumar, “Computing and communicating functions o ver sensor netw orks,” IEEE Journal on Sele cte d Ar e as in Communic ations , vol. 23, no. 4, pp. 755–764, April 2005. [6] J. Hromko vic, R. Klasing, A. Pelc, P . Ruzick a, and W. Unger, “Dissemination of information in communication netw orks,” 2005. [7] A. Jadbabaie, J. Lin, and A. Morse, “Co ordination of groups of mobile autonomous agen ts using nearest neighbor rules,” IEEE T r ansactions on Automatic Contr ol , v ol. 48, no. 6, pp. 988–1001, June 2003. [8] W. Ren and R. W. Beard, Distribute d Consensus in Multi-V ehicle Co op er ative Con- tr ol: The ory and Applic ations . Springer-V erlag, New Y ork, 2008. [9] P . DeLellis, M. di Bernardo, F. Garofalo, and M. Porfiri, “Evolution of complex net works via edge snapping,” IEEE T r ansactions on Cir cuits and Systems , vol. 57, no. 8, pp. 2132–2143, August 2010. [10] W. Y u, P . DeLellis, G. Chen, M. di Bernardo, and J. Kurths, “Distributed adaptive con trol of synchronization in complex net works,” IEEE T r ansactions on Automatic Contr ol , vol. 57, no. 8, pp. 2153–2158, 2012. 93 Biblio gr aphy 94 [11] J. C. F. Bullo and S. Mart ´ ınez, Distribute d Contr ol of R ob otic Networks . Applied Mathematics Series, Princeton Universit y Press, 2009. [12] R. Olfati-Sab er and R. Murray , “Consensus problems in net works of agents with switc hing top ology and time-dela ys,” IEEE T r ansactions on A utomatic Contr ol , v ol. 49, no. 9, pp. 1520–1533, September 2004. [13] L. Xiao and S. Boyd, “F ast linear iterations for distributed av eraging,” Systems and Contr ol L etters , vol. 53, no. 1, pp. 65–78, Septem b er 2004. [14] B. Johansson, M. Rabi, and M. Johansson, “A randomized incremen tal subgradient metho d for distributed optimization in net work ed systems,” SIAM J. on Optimiza- tion , vol . 20, no. 3, pp. 1157–1170, August 2009. [15] A. Nedic and A. Ozdaglar, “Distributed subgradient metho ds for multi-agen t opti- mization,” IEEE T r ansactions on Automatic Contr ol , vol. 54, pp. 48–61, 2009. [16] M. Zhu and S. Mart ´ ınez, “On distributed con vex optimization under inequalit y and equalit y constraints via primal-dual s ubgradien t metho ds,” T ech. Rep., 2009. [17] L. Ho oi-T ong, “On a class of directed graphs — with an application to traffic-flo w problems,” Op er ations R ese ar ch , v ol. 18, pp. 87–94, F ebruary 1970. [18] B. Gharesifard and J. Cort´ es, “When do es a digraph admit a doubly sto c hastic adjacency matrix?” Pr o c e e dings of the Americ an Contr ol Confer enc e (A CC) , pp. 2440–2445, July 2010. [19] C. W. W u, “Algebraic connectivity of directed graphs,” Line ar and Multiline ar A lgebr a , vol. 53, pp. 203–223, 2005. [20] S. Boyd, A. Ghosh, B. Prabhak ar, and D. Shah, “Gossip algorithms: design, analysis and applications,” in 24th Annual Joint Confer enc e of the IEEE Computer and Communic ations So cieties (INFOCOM) , v ol. 3, March 2005, pp. 1653–1664. [21] J. Liu, A. S. Morse, B. D. O. Anderson, and C. Y u, Thr e e De c ades of Pr o gr ess in Contr ol Scienc es . Springer Berlin Heidelb erg, 2010. [22] M. Cao and C. W. W u, “T op ology design for fast conv ergence of net work consensus algorithms,” IEEE International Symp osium on Cir cuits and Systems (ISCAS), New Orle ans, LA, USA , pp. 1029–1032, 2007. [23] A. Ghosh and S. Bo yd, “Upp er b ounds on algebraic connectivity via conv ex opti- mization,” Line ar Algebr a and its Applic ations , vol. 148, pp. 693–707, 2006. Biblio gr aphy 95 [24] B. Gharesifard and J. Cort´ es, “Distributed strategies for making a digraph weigh t- balanced,” Pr o c e e dings of the 47 th A nnual Al lerton Confer enc e on Communic ation, Contr ol, and Computing , pp. 771–777, 2009. [25] A. Priolo, A. Gasparri, E. Mon tijano, and C. Sagues, “A decentralized algorithm for balancing a strongly connected w eigh ted digraph,” Pr o c e e dings of the Americ an Contr ol Confer enc e (ACC) , pp. 6547–6552, 2013. [26] T. Charalam b ous and C. N. Hadjicostis, “Distributed formation of balanced and bisto c hastic weigh ted adjacency matrices in digraphs,” Pr o c e e dings of the Eur op e an Contr ol Confer enc e (ECC) , pp. 1752–1757, 2013. [27] M. H. Sc hneider and S. A. Zenios, “A comparative study of algorithms for matrix balancing,” Op er ations R ese ar ch , v ol. 38, no. 3, pp. 439–455, 1990. [28] D. Lee and M. W. Sp ong, “Stable flo c king of multiple inertial agen ts on balanced digraphs,” IEEE T r ansactions on Automatic Contr ol , vol. 52, pp. 1469–1475, April 1984. [29] D. P . Bertsek as, Network Optimization: Continuous and Discr ete Mo dels . Belmont, Massac husetts: Athena Scientic, 1998. [30] C. N. Hadjicostis, A. D. Dom ´ ınguez-Garc ´ ıa, and T. Charalambous, “Distributed a veraging and balancing in net work systems, with applications to co ordination and con trol,” F oundations and T r ends R  in Systems and Contr ol , v ol. 5, no. 3–4, 2018. [31] J. Tsitsiklis, “Problems in decentralized decision making and computation,” Ph.D. dissertation, Massac husetts Institute of T ec hnology , Cambridge, MA, Cam bridge, 1984. [32] J. Cort´ es, “Distributed algorithms for reaching consensus on general functions,” A utomatic a , vol. 44, no. 3, pp. 726–737, March 2008. [33] R. Olfati-Sab er, “Distributed Kalman filtering for sensor netw orks,” Pr o c e e dings of 46th IEEE Confer enc e on De cision and Contr ol , pp. 5492–5498, December 2007. [34] R. Carli, A. Chiuso, L. Sc henato, and S. Zampieri, “Distributed Kalman filtering based on consensus strategies,” IEEE Journal on Sele cte d A r e as in Communic a- tions , vol. 26, no. 4, pp. 622–633, May 2008. [35] E. M. Arkin and C. H. P apadimitriou, “On the complexity of circulations,” Journal of A lgorithms , vol. 7, pp. 134–145, March 1986. [36] L. F ord and D. R. F ulkerson, Flows in Networks . Princeton Universit y Press, 2010. Biblio gr aphy 96 [37] A. V. Goldberg and R. E. T arjan, “A new approac h to the maxim um-flow problem,” Journal of the Asso ciation for Computing Machinery , v ol. 35, no. 4, pp. 921–940, Octob er 1988. [38] D. P . Bertsek as, “Auction algorithms for net w ork flow problems: A tutorial in tro- duction,” Computational Optimization and Applic ations , vol. 1, no. 1, pp. 7–66, Octob er 1992. [39] Y. Boyk ov and V. Kolmogorov, “An exp erimental comparison of min-cut/max- flo w algorithms for energy minimization in vision,” IEEE T r ansactions on Pattern A nalysis and Machine Intel ligenc e , v ol. 26, no. 9, pp. 1124–1137, September 2004. [40] S. Bandy opadhy a y , S.-J. Ch ung, and F. Y. Hadaegh, “Probabilistic sw arm guidance using inhomogeneous Marko v c hains,” IEEE T r ansactions on Contr ol of Network Systems , 2014, (in preparation, [41] S. A. Plotkin, D. B. Shmoys, and E. T ardos, “F ast appro ximation algorithms for fractional packing and co v ering problems,” Mathematics of Op er ations R ese ar ch , v ol. 20, no. 2, pp. 257–301, May 1995. [42] N. Garg and J. Knem ann, “F aster and simpler algorithms for m ulticommo dity flo w and other fractional pac king problems,” SIAM Journal of Computing , v ol. 37, no. 2, pp. 630–652, 2007. [43] J. E. Hopcroft and R. M. Karp, “An n 5 / 2 algorithm for maximum matchings in bipartite graphs,” SIAM Journal on Computing , v ol. 2, pp. 225–231, 1973. [44] V. Guruswami, S. Khanna, R. Ra jaraman, B. Shepherdd, and M. Y annak akis, “Near-optimal hardness results and approximation algorithms for edge-disjoin t paths and related problems,” Journal of Computer and System Scienc es , vol. 67, no. 3, pp. 473–496, June 2003. [45] C. N. Hadjicostis and A. I. Rik os, “Distributed strategies for balancing a weigh ted digraph,” Pr o c e e dings of 20 th Me diterr ane an Confer enc e on Contr ol A utomation (MED) , pp. 1141–1146, 2012. [46] B. Gharesifard and J. Cort´ es, “Distributed strategies for generating weigh t-balanced and doubly sto chastic digraphs,” Eur op e an Journal of Contr ol , vol. 18, no. 6, pp. 539–557, 2012. [47] A. I. Rikos and C. N. Hadjicostis, “Distributed balancing of a digraph with integer w eights,” Pr o c e e dings of the IEEE Confer enc e on De cision and Contr ol (CDC) , pp. 1983–1988, 2013. Biblio gr aphy 97 [48] A. I. Rik os, T. Charalam b ous, and C. N. Hadjicostis, “Distributed w eight balancing o ver digraphs,” IEEE T r ansactions on Contr ol of Network Systems , vol. 1, no. 2, pp. 190–201, June 2014. [49] A. I. Rikos and C. N. Hadjicostis, “Integer weigh t balancing in directed graphs in the presence of communication delays,” Pr o c e e dings of the 54 th IEEE Confer enc e on De cision and Contr ol (CDC) , pp. 3493–3498, 2015. [50] ——, “Distributed in teger weigh t balancing in the presence of time dela ys in di- rected graphs,” IEEE T r ansactions on Contr ol of Network Systems , vol. 5, no. 3, pp. 1300–1309, 2018. [51] D. V. Dimarogonas, E. F razzoli, and K. H. Johansson, “Distributed ev ent-triggered con trol for m ulti-agent systems,” IEEE T r ansactions on Automatic Contr ol , vol. 57, no. 5, pp. 1291–1297, 2012. [52] C. Nowzari and J. Cort´ es, “Distributed even t-triggered co ordination for a v erage consensus on weigh t-balanced digraphs,” A utomatic a , August 2014. [53] A. I. Rik os and C. N. Hadjicostis, “Distributed integer w eight balancing within in terv al constraints,” Pr o c e e dings of the 55 th IEEE Confer enc e on De cision and Contr ol (CDC) , pp. 1775–1780, 2016. [54] ——, “Distributed balancing with constrained integer weigh ts,” IEEE T r ansactions on A utomatic Contr ol , 2018 (to app ear). [55] ——, “Distributed w eight balancing under integer constrain ts in the presence of pac ket drops,” Pr o c e e dings of the 56 th IEEE Confer enc e on De cision and Contr ol (CDC) , pp. 4570–4575, 2017.

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment