Sei sulla pagina 1di 12

DISTRIBUTED GRAPH COLORING

Project Report Submitted


By
Abhijeet Sharma (14535001)
Ajay Yadav (14535002)
Amala Thampi (14535003)
Amit Kewal (145350004)
Ankur Tagra (14535005)
Anoop Kumar Singh(14535006)
Master of Technology ( 1st year ) CSE
Under the guidance of
Dr. Rajdeep Niyogi
Department of Computer Science and Engineering
Indian Institute of Technology Roorkee

Department of Computer Science and Engineering


Indian Institute of Technology , Roorkee
Roorkee-247667, India

Acknowledgement
The satisfaction and euphoria that accompanies the successful completion of this task would be
Incomplete without the mention of the people who made it possible. Their constant guidance and
encouragement crowned our effort with success
It is a great pleasure to express our sincere thanks to Prof. Rajdeep Niyogi, Department of
Computer Science and Engineering, IIT Roorkee, for her encouragement valuable suggestions,
intellectual, influence and constant support during the course of the project.
We would like to express our gratitude toward our fellow classmates who helps us to complete
this project.

Date: 27 October 2014


Place: Roorkee

Abhijeet Sharma (14535001)


Ajay Yadav (14535002)
Amala Thampi (14535003)
Amit Kewal (145350004)
Ankur Tagra (14535005)
Anoop Kumar Singh(14535006)

[DISTRIBUTED GRAPH COLORING] 2014

Distributed Graph Coloring


Abstract:
We consider generalized colouring of a weighted Graph in a distributed setting, where each
node in the graph is represented by an independent agent. The target is to minimize the
weight of edges connecting same-colour nodes. To avoid Getting stuck in a not-too-good
local optimum, we approach this Problem by finding the colourable subgraph with the
maximum Weight subset of edges. The agents run a basic distributed Graph colouring
algorithm, and an algorithm for adding and removing edges, operating on different time
scales. As basic Distributed algorithms to colour graphs we use distributed local Search
algorithms enabling plateau walks, together with a noise Strategy to escape local minima. We
evaluate performance in a setting inspired by self-organized resource allocation in a wireless
network, and show that a distributed algorithm finding a colourable subgraph can outperform
distributed greedy local search. As a related sub-problem, we investigate a procedure of
adding edges to random planar graphs, keeping the colourability.

Randomized distributed coloring:[2]


It has been proved that Randomized algorithm does not help in distributed coloring of graph.
However It is implicitly assumed that a k-round randomized coloring algorithm colors a
graph with s colors if algorithm always stops with a proper s-coloring after at most k rounds.
The proof does not hold if number of color is s in expectation or more probability or number
of rounds is exactly k. if we assume that number of color i.e. m is function of n then
randomization can help. Algorithm 1 describes a randomized algorithm which colors a given
network graph in one round.

Algorithm 1
Randomized coloring in one round (code for node v)
1: choose color tv uniformly at random from {1, . . . , /ln n};
2: send ID(v) and tv to all neighbours;
3: let Gtv be the graph induced by all nodes u with tu = tv;
4: let tv be the maximum degree of Gtv ;
5: compute O(2tv logm)-coloring of Gtv => color yv;
6: color xv := yv[/ ln n] + tv 1

Distributed Graph Coloring in a few rounds[1]


The paper focuses on the problem that how many colors would be required by a Distributed
Graph Coloring algorithm to color a graph when only k rounds are available. The paper
proposes an algorithm that runs in O(k) rounds where k is bounded below by (log log n) and
bounded above by O(log n) and uses O(a.n1/k) colors where n is the number of vertices and a
is the arboricity of the graph.
Graph coloring concerns the problem of assigning colors to the nodes of a graph such that
adjacent nodes do not share the same color. This problem is at the heart of several problems
Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


arising in wireless ad hoc networks. Examples are TDMA slot assignment, wakeup
scheduling, and data collection. In these cases, time required to arrive at the solution is given
higher priority compared to the optimality of the solution so that higher- order tasks such as
routing and scheduling are minimally affected. The algorithm is presented that, for any k 2
log log n, runs in O(k) rounds on G to produce an (i) O(delta )-coloring when delta (max{k
n2/k^2 log1+1/k n, 2k}) and an (ii) O(deltan 2/k^2)-coloring when delta (max{k log1+1/k n, 2k})
and the solution is more effective when delta << delta. The algorithm assumes the undirected
graph to be acyclically edge-oriented. A graph is said to be edge-oriented if each undirected
edge {u,v} E(G) can be replaced by either (u,v) or (v,u).
The algorithm presented is based on Lubys Maximal Independent Set algorithm which yields
a (delta + 1) coloring in O(log n) time. The focus of the algorithm is on the arboricity rather
than the maximum degree of the graph. Let the density of a graph G = (V,E), |V | 2, be the
ratio |E|/(|V | 1). Let the density of a single-vertex graph be 1. The arboricity of a graph G
= (V, E), denoted a(G), can be defined as a(G) := max{ density(G) | G is a subgraph of G}.
The paper derives and analyzes a version of the Kothapalli et al. algorithm that runs in O(k)
rounds, for any k, instead of in O(log n) rounds. It also shows how this algorithm could use
only O(delta ) colors (under certain circumstances) instead of O(delta) colors, where delta is
an upper bound on the out-degree of vertices in the oriented graph G.
Theorem:Let G be an edge-oriented n-vertex graph with maximum vertex out-degree delta.
(i)
For any positive integer k, G can be colored using O(k delta 1+1/k n2/k^2)
colors in O(k) rounds.
(ii)
If k 2 log log n and delta = (max{kn2/k^2log1+1/k n,2k}), G can be colored
using O(delta ) colors in O(k) rounds.
(iii) If k 2 log log n and delta = (max{k log1+1/k n, 2k}), G can be colored using
O(delta n2/k^2) colors in O(k) rounds.
(iv)
If k < 2 log log n and delta 22^k log n, then G can be colored using O
(n2/k^2delta 1+1/k 1/22^k) colors in O(k) rounds.
Algorithm 2
Computation proceeds in synchronous rounds, and in each round, each node can, (i) receive a
(possibly) different message from each neighbor, (ii) perform some finite amount of local
computation, and (iii) send a (possibly) different message to each neighbor. The algorithm
assumes the graph to be oriented. Suppose (u,v) is an edge in the oriented graph G, then v is
the out-neighbor of vertex u. The Luby-like algorithm proposed is as follows:

Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014

Algorithm OrientedRandColor (k, Cu)


Comment: Cu is node us palette of colors
Begin-Algorithm
1. for i := 1 to k do
2. Node u chooses a color cu from Cu, uniformly at random.
3. Node u sends cu to all of its uncolored in-neighbors
4. if every color received by node u from an out-neighbor is distinct from cu, then
5.
u makes cu its permanent color. Otherwise node u remains uncolored.
6. if u is permanently colored in Step 5 then
7.
u sends it color choice to all uncolored in-neighbors
8. Node u deletes from Cu all colors assigned permanently to out-neighbors
9. end-for
End-Algorithm
Consider two neighbors v and w such that w is an out-neighbor of v. In each round of the
algorithm each node tentatively picks a color from its palette and then coordinates with
neighbors to resolve conflicts in color choices. Suppose that both nodes v and w tentatively
choose the same color c. After one round of communication, node v detects an out-neighbor
with a conflicting color choice and uncolors itself. Node w ignores choices made by inneighbors and can finalize its choice of color c provided it has no out-neighbor that has
chosen color c in this round. Node u updates its palette by removing the colors permanently
chosen by its out-neighbors in the current round and communicates with its in-neighbors.
When OrientedRandColor terminates, the coloring may be partial, i.e., not all nodes may
have been assigned a color because k rounds may not suffice to color all vertices in G. It may
also result in improper coloring where 2 neighbors in the graph are colored with the same
color.

Example for OrientedRandColor Algorithm:


1
2
4
3

X
5|X

1st Round :
Now 5 is randomly selected from Cu={1,2,3,4,5} and 5 will select color X then it will send X
to all the adjacent nodes. and let 2 and 4 already have different color Y and Z therefore they
will make Y and Z permanent and 2 will send Y to its adjacent uncolored nodes but all
adjacent nodes of 2 are colored hence it will not send any color and 4 will send Z to its
adjacent uncolored nodes i.e. 1 . 5, 2 and 4 will be deleted from Cu and hence Cu={1,3}.

Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


Z
1
2|Y
4|Z
3

X
5|X

Now 1 will receive Z since now 1 has no color therefore it will uncolored again.
2nd Round:
Now we randomly select u i.e. 3 and Cu={1,3}. Let 3 also select Y then it will send color Y
to uncolored adjacent nodes i.e. 1 since 1 is uncolored therefore it will not assign any color to
it and 3 will be deleted from Cu ,now Cu=={1}.

Z
1
2|Y
Y

4|Z
3|Y

5|X

3rd Round:
Now we select 1 and send color X and will not send to anyone since all adjacent nodes are
permanently colored.
Z
1|X
2|Y
4|Z
3|Y

X
5|X

Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


2 Important lemmas are stated regarding the partial and improper coloring of vertices
during OrientedRandColor algorithm.
Lemma 1: If OrientedRandColor assigns the same color to two neighbors in G, then it does
so in different rounds.
Lemma 2: Suppose that initially |Cu| delta 1+1/k n2/k^2 for all nodes u. After
OrientedRandColor has terminated, w.h.p., every oriented uncolored path in G has length at
most k.

Palette Inflation Technique[1]


Let the k rounds of OrientedRandColor algorithm have completed and still some nodes are
left uncoloured. According to Lemma 2, each acyclic oriented path in graph have length
atmost k. After 1 round, every oriented uncoloured path has length atmost k-1. Similarly after
t rounds, oriented uncoloured path has length atmost k-t. Thus atmost k extra rounds are
required after the algorithm completes to color the graph thus leading to a total of 2k rounds
and can be colored using a(kdelta 1+1/k n2/k^2) colors. Palette inflation technique leads to
an additional k factor to appear in the palette size. Technique employed in Grable and
Panconesi can be used to reduce the k-factor in palette size.
Each node starts the dozing phase with the palette {1, 2, . . . ,delta/k}. In each round, each as
yet uncolored node chooses to wake up with a probability p and if the node wakes up, it picks
a tentative color from amongst the available colors in its palette uniformly at random and
independent of the choices of other nodes. Color conflicts are resolved in the usual manner
and palettes are updated. The dozing phase runs for O(k) rounds. The key innovation of
Grable and Panconesi is to start the wake-up probability p at 1/k and then increase it in each
round. This ensures that in each round an appropriate fraction of the vertices are competing
for the colors in the color palettes. The manner in which p increases ensures that p equals 1 in
e * k rounds and this brings the algorithm to the trivial phase.

Distributed Generalized Graph Colouring[4]


Introduction:
The problem of generalized graph coloring is defined on a weighted graph with integer
weights assigned to the edges. The target is to find a coloring that minimizes the total weight
of edges connecting nodes with the same color. Local search methods can be used to solve
the generalized graph coloring problem. We search for the minimum weighted coloring by
solving the maximum weight colourable subgraph problem. This problem is defined as:
Given a number of color, and a complete graph, find the maximum subgraph that is
colourable with this number of colors.

System model:
The generalized graph vertex coloring problem can be formulated as follows. Let a graph (V,
E) of vertices, v belong to V and edges e belong to E connecting two vertices be given. The
vertices consist, for example, of collections of wireless network elements which are able to
Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


determine their resource usage on a much shorter time scale than that of the inter- node
communication, and may be interchangeably called nodes, or cells. An edge connects two
nodes if there is a conflict between the nodes when they use the same resource. In other
words ,the edge(u,v) belong to E if communication within the nodes v belong to V and u
belong to V would interfere with each other if they use the same channel. there is fixed
number of resources or color ,which are considered indistinguishable. The objective of
generalized graph coloring is to find the allocation of resources so that the total interference
in the colored network is minimized.

Semi greedy Distributed Local Search (SDLS)


Algorithm 4:
In SDLS each node periodically a routine which works as follows
1. Compute the number of neighbours Nold using the same resources.
2.Pick a resource not currently used uniformly at random.
3.Compute the number of neighbours Nnew using this newly picked resource .
4. If Nnew<=Nold, then switch to use the randomly picked resource.otherwise do nothing.
The fact that SDLS gets stuck in the global minimum is a desirable feature; once a good
assignment of resources for a given case is found, discarding that assignment does not make
sense. This property is called an absorbing minimum.
On the other hand, SDLS does get stuck in local minima or at least may get driven into a
large plateau from which the progress to the global minimum is extremely slow. To remedy
this, one should add the possibility to make bad Decisions, increasing the number of
conflicts, just as the Random moves. Simply adding such moves do not work satisfactorily
since then the global minimum would no longer be an absorbing state. An algorithm with first
three step of SDLS and another step as follows:
If Nnew<=Nold,then switch to use the randomly picked resource.
Otherwise if Nold > 0
Then
With probability P switch to use the randomly picked resources and with the
probability 1-P do nothing.
If P=0 ,the method corresponds exactly to SDLS ,When 0<P<1 however, the method is able
to do bad decisions locally and end up in better local and global state than when only
minimizing local energy.

The neighbourhood graph:[2]


For the analysis of deterministic algorithms, we use the concept of neighbourhood graphs.
The nodes of a k-neighbourhood graph are all possible distance k views of the nodes of a
network. Two nodes of a neighbourhood graph are adjacent if the corresponding views can
occur at adjacent nodes of a given network. If two views are adjacent in the neighbourhood
graph, the corresponding nodes have to choose different colors because otherwise two
adjacent nodes having the given views would choose the same color. If two nodes have views
Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


which are not adjacent in the neighbourhood graph. They may choose the same color. In a
one-round algorithm, every node can send its initial color to all its neighbours. All nodes then
have to decide on a new color. Hence, every node has to choose a color based on its own
color and the colors of its neighbours only. After one round, the view of each node is a pair
(xv, x(v)) where xv is the initial color of v and where x(v) is the multi-set of the colors of
the neighbours of v. The value of xv and all elements of x(v) are integers between 1 and m.
If we only consider graphs with degrees at most , we have |x(v)| and because we start
with a valid coloring, we also have xv belong to x(v). There is a network graph with initial
coloring in which two one-hop views (xu, x(u)) and (xv, x(u)) are the one-hop views of
adjacent nodes if and only if xu belong to x(v) and xv belong to x(u).

Figure: Looking into one round neighbourhood graph N1(6,3) of 6-colored degree 3 graphs .
Nodes {x,{x1,x2,x3}} depicted as star graphs with centre color x and leaf color x1,x2,x3.
we will discuss here the vertex coloring problem in a distributed network. in a distributed
network, we know that there is no shared memory. each node communicates to other nodes
via message passing. We want these nodes to compute a coloring of the associated graph.

A better approach to Distributed graph coloring :[3]


Algorithm 3:
Each vertex has three parameters:
degree: deg(v),
random value: rndvalue(v),
palette of forbidden colors, which were used by its neighbors: usedcolor(v) (initially
empty).
Parameters: deg(v) and rndvalue(v) determine the order of coloring. Let v1; v belong to V .
We say that v1 has a higher priority then v2 if:
deg(v1)>deg(v2)
or
deg(v1)=deg(v2) and rndvalue(v1)>rndvalue(v2)

Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014

During each round every uncolored vertex v executes the following five steps:
1. Choose parameter rndvalue(v) 2 [0::1].
2. Send to all neighbors the following parameters: deg(v), rndvalue(v), and the first legal
color (not on the list of forbidden colors).
3. Compare its own parameters with these received from the neighbors and check which
vertex has the highest priority.
4. If vertex v has the highest priority, keep the proposed color and stop.
5. If not, update list usedcolor(v).

Example:
Initially:

After round 1:

Department of Computer Science and Engineering , IIT Roorkee

[DISTRIBUTED GRAPH COLORING] 2014


After round 2:

After round 3:

In this example, initially all the nodes and their links are given. First of all degree of every
node is calculated.
Then in first round node with highest degree is calculated and then it is assigned a color in
forbidden list of colors. i-e V1. Now adj.(V1)=V2,V3,V4,V5,V6 update their forbidden
colors.
In second round, V2,V4,V5 has degree 3. Rndvalue breaks the tie. And V5 is selected. Color
assigned to V5 is 2. V2 and V4 update their forbidden list of colors by 2. Also V3 and V6 are
independent so they are assigned color 2.
In third round, V2 and V4 are independent, so they update their color as 3.

Department of Computer Science and Engineering , IIT Roorkee

Bibliography:
[1] K. Kothapalli, and S. Pemmaraju. Distributed graph coloring in a few rounds. In Proc. Of
the 30th ACM Symp. on Principles of Distributed Computing, pages 31-40,2011.
[2] F. Kuhn, and R. Wattenhofer. On the complexity of distributed graph coloring. In Proc. of
the 25th ACM Symp. on Principles of Distributed Computing , pages 715 ,2006.
[3] Kubale, M. and Kuszner, L.: A better practical algorithm for distributed graph coloring.
Proc. of IEEE International Conference on Parallel Computing in Electrical Engineering
(2002) 7275.
[4] J.-M. Koljonen, M. Alava, M. Peltomki, and O. Tirkkonen, Distributed generalized
graph coloring, in Proc. 4th IEEE Int. Conf. Self- Adapt. Self-Organizing Syst. , Sep. 2010,
pp. 174183.

Potrebbero piacerti anche