Title: Distributed%20Maintenance%20of%20Spanning%20Tree%20using%20Labeled%20Tree%20Encoding
1Distributed Maintenance of Spanning Tree using
Labeled Tree Encoding
- Vijay K. Garg
- Anurag Agarwal
- PDSL Lab
- University of Texas at Austin
2Outline
- Previous work and System model
- Core and Non-core strategy
- Nevilles code
- Self-stabilizing spanning tree algorithm
- Conclusion
3Motivation
- 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
4Previous 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
5Comparison 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
6System 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
7Core 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
8Core and Non-Core strategy for Self
Stabilization
- Strategy Always assume Non-Core structures got
corrupted and align it with Core structures
9Core and Non-Core strategy for Self
Stabilization
- Strategy Always assume Non-Core structures got
corrupted and align it with Core structures
10Core 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
11Nevilles Code Neville 53
- Similar to Prufer code
- Each labeled tree with n nodes has one to one
correspondence with a Nevilles code - Code is a sequence of n - 2 numbers from the set
1,,n - codei denotes the ith number in the code
sequence
12Nevilles Code Example
8
6
3
Code 7768338
4
7
5
1
2
13Spanning Tree ? Nevilles Code
- x least node with degree 1
- for i 1 to n-1
- codei parentx
- Delete edge between x and parentx
- if (degreeparentx 1 parentx ? n)
- x parentx
- else
- x least node with degree 1
14Nevilles Code Example
- x least node with degree 1
- for i 1 to n-1
- codei parentx
- Delete edge between x and parentx
- if (degreeparentx 1 parentx ? n)
- x parentx
- else
- x least node with degree 1
8
6
3
4
7
5
1
2
code 7
code 77
code 776
code 7768
code 7768338
x 1
x 2
x 7
x 6
15Self Stabilization using Nevilles code
- Need to maintain parent (Non-core) for each
node - Auxiliary data structures for efficiency
- codei Nevilles code
- fi Iteration in which node i is chosen as x
- zi 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
16Constraints
- Three constraint sets provide different
guarantees on the structure of the resulting
spanning tree with respect to the tree generated
by Nevilles code
Spanning Tree (R)
Isomorphic (C)
Identical
Efficiency
17Constraints for R
- (R1) For all i codefi parenti
- Follows from the code building procedure
- Node 7 was chosen as x in iteration 3. So f7
3 - codef7 code3 6 parent7
code 7768338
18Constraints for R
- Simple restrictions on the range of the
structures - (R2) For 1 i n 2 1 codei n
- and coden 1 n
- (R3) (i) For 1 i n 1 1 fi n 1
- (R4) For all i zi max j such that codej
i - Definition of z
19Constraints for R
- (R5) For all i zi ? 0 ? fi zi 1
- Captures preference given to parent when its
degree becomes one
- Node 7 occurs last in code at position 2. Hence,
z7 2. - Also, f7 3.
- f7 z7 1
code 7768338
20Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 2 3
2 3 4
3 0 1
4 0 1
5 2 5
2
3
5
4
21Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 2 3
2 3 4
3 0 1
4 0 1
5 2 5
4
2
3
(E1)
code ?
5
4
22Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 2 3
2 3 4
3 0 1
4 0 1
5 2 5
2
3
E1 violated !
(E1)
5
4
23Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 0 3
2 3 4
3 0 1
4 0 1
5 2 5
2
3
(E1)
5
4
24Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 0 3
2 3 4
3 0 1
4 0 1
5 2 5
2
3
check z 3
z max 0,3,4
(E2)
check z 4
5
4
25Maintaining R - Constraint R4
- For all i zi maximum j such that codej i
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
z code
1 4 3
2 3 4
3 0 1
4 0 1
5 2 5
2
3
(E2)
5
4
26Maintaining R - Other Constraints
- Local checks Can be checked and corrected
without contacting any other node - (R2) , (R3) (i), (R5)
- (R1) For all i codefi parenti
- Inquire node fi to get codefi and match
with parenti - On mismatch, reset parenti to agree with
codefi
27Analysis 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)
28Conclusion
- 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
29Future Work
- Remove the restriction on topology and labels
- Apply the strategy of core and non-core states to
other problems
30Questions ?
31Nevilles code ? Spanning Tree
- x least node with degree 1
- for i 1 to n-1
- parentx codei
- degreex-- degreeparentx--
- If (degreeparentx 1)
- x codei
- 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
33Self Stabilization using Nevilles code
- Need to maintain parent for each node
- Auxiliary data structures for efficient detection
- codei Nevilles code
- fi Iteration in which node i was selected as
x - zi 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
34Constraints
- (R1) For all i codefi parenti
- (R2) 1 lt i lt n-2, 1 lt codei lt n
- and coden 1 n
- (R3) (i) 1 lt fi lt n 1
- (ii) f is a permutation on 1n
- (R4) For all i zi max. j such that codej
i - (R5) For all i zi ! 0 gt fi zi 1
35Two 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
36One interesting constraint
- For all i zi maximum j such that codej I
- Split the constraint into two different
constraints - (E1) zi ? 0 ? codezi i
- (E2) codej i ? zi j
For (E1), node i queries the node zi to get
codezi and matches it against i For (E2),
every node j with codej i sends a message to
node i containing j Node i then sets zi max
zi, j
37References
- 1. Y. Afek, S. Kutten, and M. Yung.
Memory-efficient self stabilizing protocols for
general networks. - In Proc. of the 4th Intl Workshop on Distributed
Algorithms, pages 1528. 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 400410, 1993.
- 3. G. Antonoiu and P. Srimani. Distributed
self-stabilizing algorithm for minimum spanning - tree construction. In European Conference on
Parallel Processing, pages 480487, 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 268277, 1991.
- 6. Z. Collin and S. Dolev. Self-stabilizing
depth-first search. Information Processing
Letters, - 49(6)297301, 1994.
- 8. E. W. Dijkstra. Self-stabilizing systems in
spite of distributed control. Communications of - the ACM, 17643644, 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