maximal independent set distributed algorithms for multi-agent networks instructor: k. sinan...

14
Maximal Independent Set Distributed Algorithms for Multi- Agent Networks Instructor: K. Sinan YILDIRIM

Upload: osborne-rich

Post on 22-Dec-2015

222 views

Category:

Documents


0 download

TRANSCRIPT

Maximal Independent Set

Distributed Algorithms for Multi-Agent Networks

Instructor: K. Sinan YILDIRIM

Independent Set• Given an undirected Graph G = (V,E ) an independent set is a

subset U of nodes V, such that no two nodes in U are adjacent. – An independent set is maximal if no node can be added without violating

independence. (MIS)– An independent set of maximum cardinality is called maximum.

• Computing a maximum independent set (MaxIS) is NP-Hard

• There is a relation between independent sets and node coloring since each color class is an independent set– however, not necessarily a MIS.

1

2 3

1

2 3

Maximal Independent Set

Maximum Independent Set

Slow MIS Require: Node IDs Every node v executes the following code:1: if all neighbors of v with larger identifiers have decided not to join the MIS then2: v decides to join the MIS3: end if

1

3

4

5

2

THEOREM: Algorithm features a time complexity of O(n) and a message complexity of O(|E|) .

Coloring – MIS Relation• Starting with a coloring, one can easily derive a MIS

algorithm:– First choose all nodes of the first color. – Then, for each additional color add “in parallel" (without conflict) as

many nodes as possible.

• Thus, given a coloring algorithm that needs C colors and runs in time T, we can construct a MIS in time C + T.– A distributed deterministic MIS algorithm for trees with time

complexity O (log*n). – What about general graphs?

Randomized MIS AlgorithmThe algorithm operates in synchronous rounds, grouped into phases.A single phase is as follows:1) Each node v marks itself with probability 1/2d(v), where d(v) is the current degree of v .2) If no higher degree neighbor of v is also marked, node v joins the MIS. If a higher degree neighbor of v is marked, node v unmarks itself again. (If the neighbors have the same degree, ties are broken arbitrarily, e.g., by identifier).3) Delete all nodes that joined the MIS and their neighbors, as they cannot join the MIS anymore.

Steps 1 and 2 make sure that if a node v joins the MIS, then v 's neighbors do not join the MIS at the same time. Step 3 makes sure that v's neighbors will never join the MIS. Likewise the algorithm eventually produces a MIS, because the node with the highest degree will mark itself at some point in Step 1.

1

3

4

2

5

Analysis - ILEMMA 1: A node v joins the MIS in Step 2 with probability p ≥ 1/4d(v).

M: The set of marked nodes in Step 1. H(v): The set of neighbors of v with higher degree, or same degree and higher identifier.

P[v is not in MIS|v is marked] = P[There exists a neighbor w in H(v) that is marked]Since node v will be removed in step 3 of the algorithm!

v

w

Since for all w we have d(w) ≥ d(v) and also v has at most d(v) neighbors:

P[v is in MIS]=P[v is in MIS|v is marked]P[v is marked]

Analysis - II

3

4

5

1

2

Directed Auxiliary Graph: Direct each edge towards the higher degree node (if both nodes have the same degree direct it towards the higher identifier).

3

4

1

2

5

A bad node has outdegree d+ (number of edges pointing away from bad node) at least twice its indegree d- (number of edges pointing towards bad node). Otherwise it is called a good node. Good nodes have low probability to mark themselves at step 1.

In fact outdegree d+ represents |H(v)|. Thus, d+≥ 2(d(v)-d+) for bad any node v. Consequently, for good nodes we have d+< 2(d(v)-d+) that yield d-≥ 1/3d(v) since d(v)=d++d-. Denote S=N(v)\H(v). As a result, we have for good nodes that d(v)≥|S|≥1/3d(v). Since for all nodes w in S we have d(w) ≤ d(v), we get:

LEMMA 2: For any good node v it holds that

Analysis - IIILEMMA 3: A good node will be removed in Step 3 with probability p ≥ 1/36.

P[Good node v is removed] ≥ P[There exists any neighbor u that is in MIS]

Since we have

Using inclusion-exclusion principle, the lower bound can be obtained by:

Inclusion-exclusion principle:

Case 1: There is a neighbor w with degree d(w) ≤ 2. By Lemma 1, w joins the MIS in step 2 (and v is removed in step 3) with probability at least 1/8.Case 2: All neighbors of v have degree 3 or more. Let S denote S=N(v)\H(v) therefore for all w in S we have 3≤d(w)≤d(v). For good nodes we have d(v)≥|S|≥1/3d(v).

since For |S|=2 we get the lower bound.

Analysis - IVLEMMA 4: An edge e = (u,v) is called bad if both u and v are bad; else the edge is called good. At any time at least half of the edges are good.

The number of edges directed into bad nodes is at most half the number of edges directed out of bad nodes. This implies that at least half of the edges are directed into good nodes, rendering them good edges.

THEOREM: Algorithm terminates in time O(log n) with constant probability.

By Lemma 3, a good node (and therefore a good edge!) will be deleted with constant probability. Due to Lemma 4, we know that at least half of the edges are good. Consequently, a constant fraction of the edges is deleted in each phase.

After O(log|E|) phases, all edges are deleted. Because |E|≤n2 and hence, log|E|≤2logn, it follows that the algorithm requires O(log|E|) = O(log n) phases.

Finally, each phase consists of a constant number of communication rounds.

Another Randomized MIS AlgorithmThe algorithm operates in synchronous rounds, grouped into phases.A single phase is as follows:1) Each node v chooses a random value r(v) in [0,1] and sends it to its neighbors.2) If r(v) < r(w) for all neighbors, node v enters the MIS and informs its neighbors.3) If v or a neighbor of v entered the MIS, v terminates (v and all edges adjacent to v are

removed from the graph), otherwise v enters the next phase.

Steps 1 and 2 make sure that if a node v joins the MIS, then v 's neighbors do not join the MIS at the same time. Step 3 makes sure that v 's neighbors will never join the MIS.

Likewise the algorithm eventually produces a MIS, because the node with the globally smallest value will always join the MIS, hence there is progress.

0.5

0.6

0.2

0.3

0.1

AnalysisLEMMA 1: In a single phase, we remove at least half of the edges in expectation.

Consider an edge (v,w) in G. (v->w): The event that r(v) is smaller than that of all of its neighbors and all of w's neighbors. No other neighbor will remove w!

Pr[event (v->w)] ≥ 1/(d(v)+d(w)) (v and w may share some neighbors).

Probability of r(v) is the smallest inside its neighborhood: 1/(d(v)+1). Hence, d(v) edges will be removed with this probability. But, if we count like this, we will count some edges twice! How to count edges?

For each edge (v,w); we have two events (v->w) and (w->v):

Since we have |E| edges, in expectation |E| directed edges will be removed from digraph in a single phase! Lemma holds since we doubled the edge count!

Double edges: Replace each undirected edge by the two directed edges

Xv->w: Random variable that has the value d(w) if event (v->w) occurs, if not it has value 0.

v

w

v

w

THEOREM 1: Algorithm terminates after at most O(log|E|), i.e. O(logn), phases in expectation.

Matching• Matching

– Given a graph G=(V,E) a matching is a subset M of edges E, such that no two edges in M are adjacent• A matching is maximal if no edge can be added without violating the above

constraint. – A matching of maximum cardinality is called maximum.

• An independent set algorithm is also a matching algorithm– The auxiliary graph G’ is defined as follows

• For every edge in G there is a node in G’• Two nodes in G’ are connected by an edge if their respective edges in G are

adjacent. • A (maximal) independent set in G’ is a (maximal) matching in G, and vice

versa.

Different matchings for the same graph:

General Δ+1 Graph ColoringGiven a graph G=(V,E) we virtually build a graph G’ =(V’,E’) as follows:

Every node v in V clones itself d(v)+1 times (v0,…,vd(v) in G’) The edge set E’ of G’ is as follows:

All clones are in a clique: (vi,vj) in E’, for all v in V and all 0 ≤i<j≤ d (v )All ith clones of neighbors in the original graph G are connected:

(ui,vi) in E’, for all (u,v) in E and all 0 ≤ i ≤ min(d(u),d(v)).Now we simply run (simulate) the MIS Algorithm on G’ .If node vi is in the MIS in G’, then node v gets color i

v

wk

l

v0

v1

v2

w1

w0

l0

l1

k0

k1

k2 v

0

v1

v2

w1

w0

l0

l1

k0

k1

k2

THEOREM 1: Algorithm terminates after at most O(logn2)=O(2logn) phases in expectation.

Each clique enters the MIS and chooses the colors in the range 1…Δ+1!

Dominating Sets

• A dominating set is a subset of the nodes such that each node is in the set or adjacent to a node in the set.– A minimum dominating set is a dominating set containing the least

possible number of nodes.

• Any MIS is a dominating set– if a node was not covered, it could join the independent set. – O(logn)

Dominating set = MIS