Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vertex Coloring Distributed Algorithms for Multi-Agent Networks

Similar presentations


Presentation on theme: "Vertex Coloring Distributed Algorithms for Multi-Agent Networks"— Presentation transcript:

1 Vertex Coloring Distributed Algorithms for Multi-Agent Networks
Instructor: K. Sinan YILDIRIM

2 Symmetry-breaking Symmetry-breaking Difficult to "break" the symmetry
Prohibit certain processor pairs, e.g. neighboring processors, from operating simultaneously. efficiently schedule processor groups Can be formalized as a vertex coloring or maximal independent set (MIS) problem. Difficult to "break" the symmetry All processors may be a priori alike In many cases, they may start the computation from the same initial state and execute the same local protocol. In other words, the "view" of the system from the various processors may be symmetric.

3 Vertex (Node) Coloring Problem
Given an undirected graph G = (V,E) assign a color cu to each vertex u in V such that the following holds: e = (v,w) in E implies that cv≠cw . The application often asks us to use few colors! In a TDMA MAC protocol, for example, less colors immediately imply higher throughput. Ware often happy with a solution which is suboptimal. There is a tradeoff between the optimality of a solution the work/time needed to compute the solution

4 Assumptions & Definitions
Each node has a unique identier, e.g., its IP address. each identier consists of only log n bits if the system has n nodes. The chromatic number Χ(G) Given an undirected Graph G = (V,E), the chromatic number of G is the minimum number of colors to solve vertex coloring problem.

5 A Greedy Algorithm (Centralized)
1: while there exists uncolored vertex v do 2: color v with the minimal color (number) that does not conflict with the already colored neighbors 3: end while The algorithm is correct and terminates in n steps. The algorithm uses at most Δ+1 colors such that Δ denotes the maximum degree in a graph G. PROOF: Since each node has at most Δ neighbors, there is always at least one color free in the range {1,…, Δ+1}.

6 Synchronous Distributed Algorithm
Nodes operate in synchronous rounds. In each round, each processor executes the following steps: Receive messages that were sent by neighbors Do some local computation of reasonable complexity do very simple computations (a comparison, an addition, Exponential-time computation is usually considered cheating in this context. Send messages to neighbors in graph of reasonable size Sending a message with a node ID, or a value is considered okay Sending really long messages is considered cheating.

7 A Simple Synchronous Algorithm
1: Assume that initially all nodes have IDs 2: Each node v executes the following code 3: node v sends its ID to all neighbors 4: node v receives IDs of neighbors 5: while node v has an uncolored neighbor with higher ID do 6: node v sends “undecided" to all neighbors 7: node v receives new decisions from neighbors 8: end while 9: node v chooses a free color 10: node v informs all its neighbors about its choice 1 1 1 1 1 1 2 2 2 2 2 2 4 4 4 4 4 4 3 3 3 3 3 3 5 6 5 6 5 6 5 6 5 6 5 6 THEOREM: This algorithm is correct and terminates in n steps. The algorithm uses at most Δ+1 colors such that Δ denotes the maximum degree in a graph G.

8 Asynchronously Coloring Trees
Theorem: Χ(Tree)≤2 If the distance of a node to the root is odd (even), color it 1 (0). 1: Color the root 0, root sends 0 to its children 2: Each node v concurrently executes the following code: 3: if node v receives a message x (from parent) then 4: node v chooses color cv = 1 - x 5: node v sends cv to its children (all neighbors except parent) 6: end if THEOREM: Algorithm is correct. If each node knows its parent and its children, the (asynchronous) time complexity is the tree height which is bounded by the diameter of the tree; the message complexity is |E|.

9 Log-Star Log* Log-star is an amazingly slowly growing function.
For all x ≤ 2: log*x = 1 For all x > 2: log*x = 1 + log*(log x) Log-star is an amazingly slowly growing function. Log-star of all the atoms in the observable universe (estimated to be 1080) is: Log*1080 = 1 + log*(80) = 2 + log*(1,…) = 3. So log-star increases indeed very slowly!

10 6-Coloring Trees 1: Assume that initially the vertices are legally colored (each label only has log n bits) 2: The root assigns itself the label 0. 3: Each other node v executes the following code (synchronously in parallel) 4: send cv to all children 5: repeat 6: receive cp from parent 7: interpret cv and cp as little-endian bit-strings: c(k);…; c(1); c(0) 8: let i be the smallest index where cv and cp differ 9: the new label is i (as bitstring) followed by the bit cv(i) itself 10: send cv to all children 11: until cw in {0,…,5} for all nodes w 10010 01010 111 10001 001

11 How it works Since initially all nodes have different IDs
0000 0001 Since initially all nodes have different IDs The new color value of it will be, for sure, different from its parent and its children CASE 1:The position of the bit that a node’s color differ from its parent and its children are different CASE2: The position of the bit that a node’s color differ from its parent and its children are the same, but the appended bit is different! For example: if you have 7-bit identifiers initially In the first round, the bit position that is different may be the 6th position The new identifiers should be 4-bits, something like 110X, 101X, 100X,011X,010X,001X,000X In the second round, the bit position that is different may be the 3rd position The new identifiers should be 3-bits, something like 11X, 10X, 01X,00X In the last round, the bit position that is different may be the 2nd position The new identifiers should be 3-bits, something like 10X, 01X,00X 0010 0011

12 Analysis Colors 11* (in binary notation, i.e., 6 or 7 in decimal notation) will not be chosen Because the node will then do another round. E.g., 011 and 111 differ at position 2 that will give 101 Colors in the range 0,…,5 always forms colors in this range This gives a total of 6 colors (i.e., colors 0,. . . , 5). THEOREM: Algorithm terminates in log*n time. If we have n nodes, we need log n bit for identifiers. First round: We get at most logn+1 bit string. Second round: We get log(logn+1) + 1 bit string. Until we have all colors in {0,…,5}

13 Six-to-Three Algorithm
1: Each node v concurrently executes the following code: 2: Run 6-Coloring for log* n rounds. 3: for x = 5, 4, 3 do 4: Perform subroutine Shift Down 5: if cv = x then 6: choose new color cv in {0,1,2} 7: end if 8: end for 1: Root chooses a new (different) color from {0,1,2} 2: Each other node v concurrently executes the following code: 3: Recolor v with the color of parent Colors: {Red, Green, Blue, Yellow, Orange, Purple} Shift-down ensures that all children are monochromatic. Hence, the any node v that has cv = x can choose a color in {0,1,2}! THEOREM: Algorithm terminates in log*n time and colors a tree with three colors.


Download ppt "Vertex Coloring Distributed Algorithms for Multi-Agent Networks"

Similar presentations


Ads by Google