1 / 37

Distributed Maintenance of Spanning Tree using Labeled Tree Encoding

Distributed Maintenance of Spanning Tree using Labeled Tree Encoding. Vijay K. Garg Anurag Agarwal PDSL Lab University of Texas at Austin. Outline. Previous work and System model “Core” and “Non-core” strategy Neville’s code Self-stabilizing spanning tree algorithm Conclusion.

umed
Download Presentation

Distributed Maintenance of Spanning Tree using Labeled Tree Encoding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Maintenance of Spanning Tree using Labeled Tree Encoding Vijay K. Garg Anurag Agarwal PDSL Lab University of Texas at Austin

  2. Outline • Previous work and System model • “Core” and “Non-core” strategy • Neville’s code • Self-stabilizing spanning tree algorithm • Conclusion

  3. Motivation • Maintaining spanning trees in distributed fashion • Broadcast • Convergecast • Self Stabilization [Dijkstra 74] is a powerful fault-tolerance paradigm • Design algorithms to tolerate transient data faults • Despite faults, algorithm converges to a good state

  4. Previous Work • Many self-stabilizing algorithms for spanning trees • Breadth-first spanning tree: [DIM90, AK93] • Depth-first spanning tree: [CD94] • Minimum spanning tree: [AS97] • Our work makes stronger assumptions but achieves better bounds

  5. Comparison with Previous Work • Popular model assumes all communication registers can be read/written in one time step • In a completely connected topology, it amounts to doing O(n) work in one time step • Our model assumes processes take one communication step • In our model, the previous algorithms would have at least O(n) time complexity

  6. System Model • System with n nodes labeled 1 … n • Nodes form a completely connected graph • Topology is static • Computation step • Internal computation • One communication event • A message is ready to be delivered in one time step

  7. “Core and Non-Core” Strategy for Self Stabilization • Maintain “Core” and “Non-Core” data structures • Core structures are always correct • Non-core structures can be derived from Core structures Non-Core Structure Core Structure Index of permutation 1 … n! Permutation

  8. n = 4 Non-Core Structure Core Structure Index of permutation 2 Permutation 1 2 4 3 “Core and Non-Core” strategy for Self Stabilization • Strategy: Always assume Non-Core structures got corrupted and align it with Core structures

  9. n = 4 Non-Core Structure Core Structure Index of permutation 2 Permutation 1 2 4 3 1 2 3 4 “Core and Non-Core” strategy for Self Stabilization • Strategy: Always assume Non-Core structures got corrupted and align it with Core structures

  10. 1 2 4 3 1 2 3 4 “Core and Non-Core” strategy for Self Stabilization • Strategy: Always assume Non-Core structures got corrupted and align it with Core structures • Challenge lies in efficient detection and correction n = 4 Non-Core Structure Core Structure Index of permutation 2 Permutation 1

  11. Neville’s Code [Neville 53] • Similar to Prufer code • Each labeled tree with n nodes has one to one correspondence with a Neville’s code • Code is a sequence of n - 2 numbers from the set {1,…,n} • code[i] denotes the ith number in the code sequence

  12. Neville’s Code: Example 8 6 3 Code = 7768338 7 5 4 2 1

  13. Spanning Tree → Neville’s Code • x = least node with degree 1 • for i = 1 to n-1 • code[i] = parent[x] • Delete edge between x and parent[x] • if (degree[parent[x]] = 1 && parent[x] ≠ n) • x = parent[x] else • x = least node with degree 1

  14. Neville’s Code: Example • x = least node with degree 1 • for i = 1 to n-1 • code[i] = parent[x] • Delete edge between x and parent[x] • if (degree[parent[x]] = 1 && parent[x] ≠ n) • x = parent[x] else • x = least node with degree 1 8 6 3 7 5 4 2 1 code = 7768 code = 776 code = 77 code = 7 code = 7768338 x = 7 x = 1 x = 2 x = 6

  15. Self Stabilization using Neville’s code • Need to maintain “parent” (Non-core) for each node • Auxiliary data structures for efficiency • code[i] : Neville’s code • f[i] : Iteration in which node i is chosen as “x” • z[i] : last occurrence of node i in code • Node i maintains ith components of data structures • Put constraints on these data structures so that the parent pointers give a valid tree

  16. Constraints • Three constraint sets provide different guarantees on the structure of the resulting spanning tree with respect to the tree generated by Neville’s code Spanning Tree (R) Isomorphic (C) Identical Efficiency

  17. 8 6 3 7 5 4 2 1 Constraints for R • (R1) For all i: code[f[i]] = parent[i] • Follows from the code building procedure • Node 7 was chosen as “x” in iteration 3. So f[7] = 3 • code[f[7]] = code[3] = 6 = parent[7] code = 7768338

  18. Constraints for R • Simple restrictions on the range of the structures • (R2) For 1 ≤ i ≤ n – 2: 1 ≤ code[i] ≤ n and code[n – 1] = n • (R3) (i) For 1 ≤ i ≤ n – 1: 1 ≤ f[i] ≤ n – 1 • (R4) For all i: z[i] = max j such that code[j] = i • Definition of z

  19. 8 6 3 7 5 4 2 1 Constraints for R • (R5) For all i: z[i] ≠ 0  f[i] = z[i] + 1 • Captures preference given to parent when its degree becomes one • Node 7 occurs last in code at position 2. Hence, z[7] = 2. • Also, f[7] = 3. • f[7] = z[7] + 1 code = 7768338

  20. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 2 3 5 4

  21. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 4 2 3 (E1) code ? 5 4

  22. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 2 3 E1 violated ! (E1) 5 4

  23. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 2 3 (E1) 5 4

  24. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 2 3 check z ≥ 3 z = max {0,3,4} (E2) check z ≥ 4 5 4

  25. 1 Maintaining R - Constraint R4 • For all i: z[i] = maximum j such that code[j] = i • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j 2 3 (E2) 5 4

  26. Maintaining R - Other Constraints • Local checks: Can be checked and corrected without contacting any other node • (R2) , (R3) (i), (R5) • (R1) For all i: code[f[i]] = parent[i] • Inquire node f[i] to get code[f[i]] and match with parent[i] • On mismatch, reset parent[i] to agree with code[f[i]]

  27. Analysis of Algorithm for maintaining R • Theorem: The algorithm requires O(1) time per node and O(1) messages per node on average in one cycle • Theorem: The algorithm stabilizes in O(d) time, where d is the upper bound on the number of times a node appears in the code • With high probability, a random code assignment would have d = O(log n/ log log n)

  28. Conclusion • Self stabilization algorithm for spanning tree • Requires O(1) messages per node on average • Provides fast stabilization • Allows changing root node and systematic modification of the tree

  29. Future Work • Remove the restriction on topology and labels • Apply the strategy of core and non-core states to other problems

  30. Questions ?

  31. Neville’s code → Spanning Tree • x = least node with degree 1 • for i = 1 to n-1 • parent[x] = code[i] • degree[x]--; degree[parent[x]]--; • If (degree[parent[x]] == 1) • x = code[i] else • x = least node with degree 1

  32. Round vs Bounded Delivery Time • Round: Every process takes atleast one step • Definition allows one process to send/receive multiple messages in one time unit

  33. Self Stabilization using Neville’s code • Need to maintain “parent” for each node • Auxiliary data structures for efficient detection • code[i] : Neville’s code • f[i] : Iteration in which node i was selected as x • z[i] : last occurrence of node i in code • Node i maintains ith components of data structures • Put constraints on these data structures so that the parent pointers give a valid tree

  34. Constraints • (R1) For all i: code[f[i]] = parent[i] • (R2) 1 <= i <= n-2, 1 <= code[i] <= n and code[n – 1] = n • (R3) (i) 1 <= f[i] <= n – 1 (ii) f is a permutation on [1…n] • (R4) For all i: z[i] = max. j such that code[j] = i • (R5) For all i: z[i] != 0 => f[i] = z[i] + 1

  35. Two sets of constraints • R = { R1, R2, R3(1), R4, R5} • Resulting spanning tree may differ from the one given by code in the leaves • Self-stabilization is easier and more efficient • C = { R1, R2, R3, R4, R5} • Resulting spanning tree is isomorphic to the one given by code • Self-stabilization is harder and becomes inefficient

  36. One interesting constraint • For all i: z[i] = maximum j such that code[j] = I • Split the constraint into two different constraints • (E1) z[i] ≠ 0  code[z[i]] = i • (E2) code[j] = i  z[i] ≥ j • For (E1), node i queries the node z[i] to get code[z[i]] and matches it against i • For (E2), • every node j with code[j] = i sends a message to node i containing j • Node i then sets z[i] = max { z[i], j }

  37. References 1. Y. Afek, S. Kutten, and M. Yung. Memory-efficient self stabilizing protocols for general networks. In Proc. of the 4th Int’l Workshop on Distributed Algorithms, pages 15–28. Springer- Verlag, 1991. 2. S. Aggarwal and S. Kutten. Time optimal self-stabilizing spanning tree algorithm. In Proc. of the 13th Conference on Foundations of Software Technology and Theoretical Computer Science, pages 400–410, 1993. 3. G. Antonoiu and P. Srimani. Distributed self-stabilizing algorithm for minimum spanning tree construction. In European Conference on Parallel Processing, pages 480–487, 1997. 4. A. Arora and M. Gouda. Distributed reset. IEEE Transactions on Computers, 43(9):1026– 1038, 1994. 5. B. Awerbuch, B. Patt-Shamir, and G. Varghese. Self-stabilization by local checking and correction (extended abstract). In IEEE Symposium on Foundations of Computer Science, pages 268–277, 1991. 6. Z. Collin and S. Dolev. Self-stabilizing depth-first search. Information Processing Letters, 49(6):297–301, 1994. 8. E. W. Dijkstra. Self-stabilizing systems in spite of distributed control. Communications of the ACM, 17:643–644, 1974. 9. S. Dolev, A. Israeli, and S. Moran. Self-stabilization of dynamic systems assuming only read/write atomicity. In Proc. of the ninth annual ACM symposium on Principles of Distributed Computing, pages 103–117. ACM Press, 1990. 10. S. Huang and N. Chen. A self stabilizing algorithm for constructing breadth first trees. Information Processing Letters, 41:109–117, 1992. 11. C. Johnen. Memory efficient, self-stabilizing algorithm to construct bfs spanning trees. In Proc. of the sixteenth annual ACM symposium on Principles of Distributed Computing, page 288. ACM Press, 1997. 12. E. H. Neville. The codifying of tree-structure. Proceedings of Cambridge Philosophical Society, 49:381–385, 1953.

More Related