Computations in Trees Saturation Minimum Finding Eccentricity Center

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Computer Networking A Top-Down Approach Chapter 4.7.
Chapter 10: Trees. Definition A tree is a connected undirected acyclic (with no cycle) simple graph A collection of trees is called forest.
Greed is good. (Some of the time)
Exact Inference in Bayes Nets
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Junction Trees And Belief Propagation. Junction Trees: Motivation What if we want to compute all marginals, not just one? Doing variable elimination for.
Minimum Spanning Trees
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
A Query-Based Routing Tree in Sensor Networks In Chul Song Yohan Roh Dongjoon Hyun Myoung Ho Kim GSN 2006 (Geosensor Network) 1.
Chapter 6: Transform and Conquer
Chapter 3 The Greedy Method 3.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
1 Complexity of Network Synchronization Raeda Naamnieh.
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Instructors: C. Y. Tang and J. S. Roger Jang All the material are integrated from the textbook "Fundamentals of Data Structures in C" and some supplement.
Adaptive Topology Discovery in Hybrid Wireless Networks
More Graph Algorithms Weiss ch Exercise: MST idea from yesterday Alternative minimum spanning tree algorithm idea Idea: Look at smallest edge not.
The Complexity of Algorithms and the Lower Bounds of Problems
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other.
Broadcast & Convergecast Downcast & Upcast
Offline Algorithmic Techniques for Several Content Delivery Problems in Some Restricted Types of Distributed Systems Mugurel Ionut Andreica, Nicolae Tapus.
“On an Algorithm of Zemlyachenko for Subtree Isomorphism” Yefim Dinitz, Alon Itai, Michael Rodeh (1998) Presented by: Masha Igra, Merav Bukra.
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
13 – Routing Algorithms Network Layer.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
SIA: Secure Information Aggregation in Sensor Networks B. Przydatek, D. Song, and A. Perrig. In Proc. of ACM SenSys 2003 Natalia Stakhanova cs610.
Data Structure & Algorithm II.  In a multiuser computer system, multiple users submit jobs to run on a single processor.  We assume that the time required.
Binary Search Trees (BSTs) 18 February Binary Search Tree (BST) An important special kind of binary tree is the BST Each node stores some information.
Tree Constructions Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Exact Inference in Bayes Nets. Notation U: set of nodes in a graph X i : random variable associated with node i π i : parents of node i Joint probability:
Chapter 8 Maximum Flows: Additional Topics All-Pairs Minimum Value Cut Problem  Given an undirected network G, find minimum value cut for all.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Trees Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT
1 Chapter 11 Global Properties (Distributed Termination)
Tree - in “math speak” An ________ graph is a set of vertices/nodes and a set of edges, each edge connects two vertices. Any undirected graph in which.
B+-Tree Deletion Underflow conditions B+ tree Deletion Algorithm
2016/7/2Appendices A and B1 Introduction to Distributed Algorithm Appendix A: Pseudocode Conventions Appendix B: Graphs and Networks Teacher: Chun-Yuan.
Graph Algorithms Mathematical Structures for Computer Science Chapter 6 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesGraph Algorithms.
B/B+ Trees 4.7.
Proof technique (pigeonhole principle)
Connection System Serve on mutual connection processors and memory .
Leader Election Chapter 3 Observations Election in the Ring
A Distributed Algorithm for Minimum-Weight Spanning Trees
The Model & Basic Computations
Lecture 9: Asynchronous Network Algorithms
PROSE CS 218 Fall 2017.
Routing in Packet Networks Shortest Path Routing
Overview: Fault Diagnosis
MIN AND MAX TIMING PATHS
CSCI 5822 Probabilistic Models of Human and Machine Learning
Robustness of wireless ad hoc network topologies
Fault-tolerant Consensus in Directed Networks Lewis Tseng Boston College Oct. 13, 2017 (joint work with Nitin H. Vaidya)
CSE 4705 Artificial Intelligence
Robustness of wireless ad hoc network topologies
Lectures on Graph Algorithms: searching, testing and sorting
Trees.
Chapter 6: Transform and Conquer
High Performance Computing & Bioinformatics Part 2 Dr. Imad Mahgoub
Chapter 11 Limitations of Algorithm Power
Covering Uncertain Points in a Tree
Routing Chapter 4 Shortest path routing Gossip
Dynamic Routing Protocols part3 B
Circuit Switched Network
Heaps & Multi-way Search Trees
GRAPH TRAVERSAL.
Presentation transcript:

Computations in Trees Saturation Minimum Finding Eccentricity Center Ranking

Trees Acyclic graph n entities n - 1 links

Rooted Trees Acyclic graph n entities n - 1 links Rooted

Saturation Technique Bidirectional links Ordered messages Full Reliability Knowledge of the topology Each entity knows whether it is a leaf: or an internal node: Note:

SATURATION: A Basic Technique S = {available, awake, processing } At the beginning, all entities are available Arbitrary entities can start the computation (multiple initiators)

SATURATION: A General Technique Activation phase: started by the initiators: all nodes are activated wake-up Saturation Phase: started by the leaves: a unique pair of neighbours is identified (saturated nodes) Resolution Phase: started by the saturated nodes

1) 2) 3) leaf internal Saturated node init WAKE-UP WAKE-UP WAKE-UP SATURATION internal SAT SATURATION SAT SAT 3) NOTIFICATION Saturated node

S = {AVAILABLE, ACTIVE, PROCESSING, SATURATED} Sinit = AVAILABLE AVAILABLE Spontaneously send(Activate) to N(x); Neighbours:= N(x) if |Neighbours|=1 then M:=("Saturation"); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE; I haven’t been activated yet /* special case if I am a leaf */

Receiving(Activate) send(Activate) to N(x)– {sender}; Neighbours:= N(x); if |Neighbours|=1 then M:=("Saturation"); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE;

I haven’t started the saturation phase yet ACTIVE Receiving(M) Neighbours:= Neighbours - {sender}; if |Neighbours|=1 then M:=("Saturation"); parent  Neighbours; send(M) to parent; become PROCESSING; I have already started the saturation phase PROCESSING receiving(M) become SATURATED;

Exactly two processing nodes become saturated, and Property: Exactly two processing nodes become saturated, and they are neighbours. SAT SAT SAT SAT SAT SAT SAT SAT

TWO neighbouring entities become saturated A node becomes PROCESSING only after sending saturation to its parent SAT SAT SAT SAT SAT SAT SAT SAT A node become SATURATED only after receiving a message in the state PROCESSING from its parent TWO neighbouring entities become saturated

Which entities become saturated depends on the unpredictable delays Observations and Examples

Message Complexity Activation: Worst case - n initiators 2(n-1) Saturation: n Notification: n - 2 Tot: 2n -2+n+n-2=4n-4

Message Complexity Activation: In general - k* initiators n +k* -2 (wake-up in the tree) Saturation: n does not depend on number of initiators Notification: n -2 TOT: 2n+k*-2

Minimum Finding Put information in the saturation message 2 13 9 15 22 1 20 7 4 14 24 Entity x has in input value(x) At the end each entity should know whether it is the minimum or not.

States S {AVAILABLE, ACTIVE, PROCESSING, SATURATED} Sinit = AVAILABLE AVAILABLE Spontaneously send(Activate) to N(x); min := v(x); Neighbours:= N(x) if |Neighbours|=1 then M:=("Saturation", min); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE;

Receiving(Activate ) send(Activate) to N(x) – {sender}; min:=v(x); Neighbours:= N(x); if |Neighbours|=1 then M:=("Saturation", min); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE;

ACTIVE Receiving(M) min:= MIN{min, M} Neighbours:= Neighbours - {sender}}; if |Neighbours|=1 then M:=("Saturation", min); parent  Neighbours; send(M) to parent; become PROCESSING;

PROCESSING receiving(M) min:= MIN{min, M} Notification:= (“Resolution”, min) send (Notification) to N(x) -parent if v(x)=min then become MINIMUM else become LARGE receiving(Notification) send(Notification) to N(x) -parent if v(x)=Received_Value then become MINIMUM; become LARGE;

Finding Eccentricities d(x,y) = distance between x and y Max{d(x,y} = r(x) eccentricity of x r(x) = 4 y x How to find the eccentricity of all nodes

Idea 1: 1) Every node broadcasts a request, 2) the leaves send up a message to collect The distances. Complexity: O(n2)

Other Idea: Based on the saturation technique: Find the eccentricity of the two saturated nodes 2) Propagate the needed info so that the other nodes can find their eccentricity (in the notification phase) Complexity = saturation

Observations and Examples States S {AVAILABLE, ACTIVE, PROCESSING, SATURATED} Sinit = AVAILABLE

define Distance[ ] AVAILABLE Spontaneously send(Activate) to N(x); Distance[x]:= 0; Neighbours:=N(x) if |Neighbours|=1 then maxdist:= 1+ Max{Distance[*]} M:=("Saturation", maxdist); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE;

Receiving(Activate) send(Activate)to N(x) – {sender}; Distance[x]:= 0; Neighbours:= N(x); if |Neighbours|=1 then maxdist:= 1+ Max{Distance[*]} M:=("Saturation", maxdist); parent  Neighbours; send(M) to parent; become PROCESSING; else become ACTIVE;

ACTIVE Receiving(M) Distance[{sender}]:= Received_distance; Neighbours:= Neighbours - {sender}}; if |Neighbours|=1 then maxdist:= 1+ Max{Distance[*]} M:=("Saturation", maxdist); parent  Neighbours; send(M) to parent; become PROCESSING;

PROCESSING receiving(M) Distance[{ sender}]:= Received_distance; r(x):= Max { Distance[z]: z  N(x) } for all y  N(x)-{parent} do maxdist:= 1+ Max{Distance[z]: z N(x)- {y} send(“Resolution”, maxdist) to y endfor become DONE

Center Finding c is the center if r(c)  r(x) for all x belonging to V. Max distance is minimized. Diametral path: Longest path

Two diameters in this example: A-B, and A-C A B C

Find all the eccentricities 2) Find the smallest The center is the node with smallest eccentricity A B C One Idea: Find all the eccentricities 2) Find the smallest 4n-4 6n -6 2n-2

A better strategy can be devised exploiting properties of the center.

Property 1: In a tree there is a unique center, or there are two centers that are neighbours odd number of nodes on diameter even number of nodes on diameter Proposition 2: Centers are on diametral paths.

Property 3: A node x is a center iff d1[x] – d2[x]  1 d1[x] = max dist d2[x] = second max dist (through different neighbours) Property 3: A node x is a center iff d1[x] – d2[x]  1 (if d1[x]= d2[x] there is only one center). d1[y] = 3, d2[y]=2 y x d1[x] = 2, d2[x]=3 x d1[x] = 3, d2[x]=3 z d1[z] = 4, d2[y]=1

Find all the eccentricities 2) Each node can find out locally whether Another Idea: Find all the eccentricities 2) Each node can find out locally whether it is the center or not 4n-4

Yet another better idea: Find the eccentricities of the saturated nodes 2) Locally Check if I am the center (checking largest and second largest) 3) If I am NOT the center, propagate the distance information ONLY in the direction of the center 3n-2 ≤ n/2 How do I know the direction of the center ? Examples ....... ≤ 3.5 n-2

Ranking 2 2 8 12 13 22 11 6 5 9 15 11 20 1 1 10 4 7 4 3 12 24 14 7 13 9