1 / 30

Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm

Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm. Mike Yuan CS 6/73201 Advanced Operating Systems Fall 2007 Dr. Nesterenko. Outline. Motivation Introduction Experiments Setup Results and Analysis Phenomenon Explanation Conclusion and Future Work Coding the Project References.

nedaa
Download Presentation

Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm

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. Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm Mike Yuan CS 6/73201 Advanced Operating Systems Fall 2007 Dr. Nesterenko

  2. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the Project • References

  3. Motivation • Time complexity of Awerbuch’s algorithm is theoretically better than Tarry’s algorithm • Message complexity of Tarry’s algorithm is theoretically better than Awerbuch’s algorithm • How do arbitrary topologies perform in practice? • In what scenarios does one algorithm perform better than the other?

  4. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the Project • References

  5. Introduction • Tarry’s Algorithm: • Initiator forwards the token to one of its neighbors, each neighbor forwards the token to all other nodes and when done returns the token. • Awerbuch’s Algorithm: • A node holding the token for the first time informs all neighbors except its father (and the node to which it will forward the token). • Prevents token forwarding over frond edges -each process knows which neighbors were visited before it forwards the token. • Measuring efficiency of algorithms: • time complexity: the number of messages in the longest chain of causally dependent events • Message complexity: number of messages it takes the algorithm to carry out specified task

  6. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the Project • References

  7. Experiments Setup • Measure time and message complexities while varying size and density of network • Graphs are usually random for these experiments • Random graphs are represented by adjacency matrices • Adjacency matrix for the example graph:

  8. Density and scale of graphs • Connection probability: probability of there is an edge between node i and j is p, e.g, 30%, 50%, 70% • Connectivity: generated random graphs must be connected • Sparse graph: connection probability= 30% • Moderate graph: connection probability= 50% • Dense graph: connection probability= 70% • Increase the scale of the graphs

  9. Number of nodes: 3-50 and metrics considered • Two nodes are trivial, at least three nodes • More accurate in range of 3 to 10 because the two algorithmsdifferentiate • Difference is more and more pronounced and stable in range 30-50 • Time complexity • Message complexity

  10. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the Project • References

  11. Time complexity of sparse graphs

  12. Analysis of time complexity of sparse graphs • Tarry’s algorithm is better than Awerbuch’s algorithm in range 3-9 nodes • Tarry’s algorithm’s complexity is almost same as Awerbuch’s algorithm’s complexity in range 10-11 nodes • Awerbuch’s algorithm is better than Tarry’s algorithm in range equal to or more than 12 nodes • The difference is more and more pronounced as scale of graphs increases • Awerbuch’s algorithm is more stable than Tarry’s algorithm

  13. Time complexity of moderate graphs

  14. Analysis of time complexity of moderate graphs • Tarry’s algorithm is better than Awerbuch’s algorithm in range 3-7 nodes • Tarry’s algorithm’s complexity is almost same as Awerbuch’s algorithm’s complexity in range 7-8 nodes • Awerbuch’s algorithm is better than Tarry’s algorithm in range equal to or more than 9 nodes • The difference is more pronounced than sparse graphs • The difference is more and more pronounced as scale of graphs increases • Awerbuch’s algorithm is more stable than Tarry’s algorithm, and almost same as sparse graph

  15. Time complexity of dense graphs

  16. Analysis of time complexity of dense graphs • Tarry’s algorithm is better than Awerbuch’s algorithm in range 3-4 nodes • Tarry’s algorithm’s complexity is almost same as Awerbuch’s algorithm’s complexity in range 4-5 nodes • Awerbuch’s algorithm is better than Tarry’s algorithm in range equal to or more than 6 nodes • The difference is most pronounced among the three graphs • The difference is more and more pronounced as scale of graphs increases • Awerbuch’s algorithm is more stable than Tarry’s algorithm, and almost same as sparse and moderate graphs

  17. Message complexity of sparse graphs

  18. Analysis of message complexity of sparse graphs • Tarry’s algorithm is always better than Awerbuch’s algorithm • The difference is not distinguishable in range 3 to 15 nodes • The difference is distinguishable in range more than 15 nodes • The difference is more and more pronounced as scale of graphs increases • Awerbuch’s algorithm increases almost twice speed of Tarry’s algorithm

  19. Message complexity of moderate graphs

  20. Analysis of message complexity of moderate graphs • Tarry’s algorithm is always better than Awerbuch’s algorithm • The difference is not distinguishable in range 3 to 10 nodes • The difference is distinguishable in range more than 10 nodes • The difference is more and more pronounced as scale of graphs increases • Both complexities increase faster than sparse graphs, and difference is more pronounced than sparse graphs • Awerbuch’s algorithm increases almost twice speed of Tarry’s algorithm

  21. Message complexity of dense graphs

  22. Analysis of message complexity of dense graphs • Tarry’s algorithm is always better than Awerbuch’s algorithm • The difference is not distinguishable in range 3 to 7 nodes • The difference is distinguishable in range more than 8 nodes • The difference is more and more pronounced as scale of graphs increases • Both complexities increase the quickest and difference is the most pronounced among the three graphs • Awerbuch’s algorithm increases almost twice speed of Tarry’s algorithm

  23. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the project • References

  24. Explanation of phenomenon Awerbuch’s algorithm’s time complexity is better than Tarry’s algorithm • Time complexity of Tarry’s algorithm: 2E (all processes have been visited and each channel has been used once in both directions) • Time complexity of Awerbuch’s algorithm: 4N-2 (token traverses N-1 edges twice and is delayed at every root node for two time units) • The denser the graph is, the more Tarry’s algorithm’s time complexity is, but Awerbuch’s algorithm is not influenced much.

  25. Explanation of phenomenon (cont) Tarry’s algorithm’s message complexity is better than Awerbuch’s algorithm • Message complexity of Tarry’s algorithm: 2E (same as time complexity) • Message complexity of Awerbuch’s algorithm: 4E (<vis> and <ack> are sent along each frond edge twice, <vis> from father to son, <ack> - from son to father, <tok> - twice along each tree edge) • The denser the graph is, the more both Tarry’s algorithm’s and Awerbuch’s algorithms’ message complexities are

  26. Outline • Motivation • Introduction • Experiments Setup • Results and Analysis • Phenomenon Explanation • Conclusion and Future Work • Coding the Project • References

  27. Conclusion and Future Work • Conclusion • Awerbuch’s algorithm is more effective than Tarry’s algorithm in time complexity • Tarry’s algorithm is more effective than Awerbuch’s algorithm in message complexity • Both time and message complexity of Tarry’s algorithm, and message complexity of Awerbuch’s algorithm are sensitive to the density of graph, but time complexity of Awerbuch’s algorithm is not sensitive to the density of graph • Future work • Experiment on real distributed systems, e.g., TinyOS, multihop networks, sensor networks, etc • Experiment on larger N • Explore influence of density of graphs on the algorithms

  28. Coding the Project • Generate random graphs • Represented by adjacency matrix • Initialize connection probability conprob=30%, 50%, 70%, and the network size • a[i,j]=1 if conprob>a random number between 0 and 1 • Write the result to “network.dat” • Tarry and Awerbuch’s algorithms • Implementation was mostly successful • Excel • Used to create graphics

  29. References • A. Baruch, "A New Distributed Depth-First-Search Algorithm", Information Processing Letters 20(1985) 147-150. • F. Kuhn, R. Wattenhofer, Y. Zhang, and A. Zollinger. Geometric ad-hoc routing: Of theory and practice. 22nd ACM Symposium on the Principles of Distributed Computing (PODC), July 2003. • M. Miyashita, M. Nesterenko "2FACE: Bi-Directional Face Traversal for Efficient Geometric Routing" technical report TR-KSU-CS-2006-06, Kent State University. • G. Tarry, “Le Problem Des Labyrinthes”, Nouvelles Annales de Mathematique 14 (1895). • G. Tel, Introduction to Distributed Algorithms (2000).

  30. References (cont) • A. Vora and M. Nesterenko. Void traversal for guranteed delivery in geometric routing. The 2nd IEEE International Conference on Mobile Ad-hoc and Sensor Systems (MASS 2005), pages 63–67, November 2005. • D. Watson, M. Nesterenko "MULE: Hybrid Simulator for Testing and Debugging Wireless Sensor Networks" Second International Workshop on Sensor and Actor Network Protocols and Applications, pp. 67-71, Boston, Massachusetts, August 2004. • Slides of advanced operating systems class, http://deneb.cs.kent.edu/~mikhail/classes/aos.f07/. • TOSSIM User Manual, http://deneb.cs.kent.edu/~mikhail/classes/aos.f06/aos_tos_tutorial/tos_tutorial.html,2006. • TinyOs mailing Archive, http://deneb.cs.kent.edu/~mikhail/classes/aos.f06/aos_tos_tutorial/tos_tutorial.html.

More Related