1 maximal independent set. 2 independent set (is): in a graph, any set of nodes that are not...

82
1 Maximal Independent Set

Post on 18-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

1

Maximal Independent Set

Page 2: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

2

Independent Set (IS):

In a graph, any set of nodes that are not adjacent

Page 3: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

3

Maximal Independent Set (MIS):

An independent set that is nosubset of any other independent set

Page 4: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

4

Applications in Distributed Systems

•In a network graph consisting of nodes representing processors, a MIS defines a set of processors which can operate in parallel without interference

•For instance, in wireless ad hoc networks, to avoid interference, a conflict graph is built, and a MIS on that defines a clustering of the nodes enabling efficient routing

Page 5: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

5

A Sequential Greedy algorithm

Suppose that will hold the final MISI

Initially I

G

Page 6: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

6

Pick a node and add it to I1v

1v

Phase 1:

1GG

Page 7: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

7

Remove and neighbors )( 1vN1v

1G

Page 8: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

8

Remove and neighbors )( 1vN1v

2G

Page 9: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

9

Pick a node and add it to I2v

2v

Phase 2:

2G

Page 10: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

10

2v

Remove and neighbors )( 2vN2v

2G

Page 11: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

11

Remove and neighbors )( 2vN2v

3G

Page 12: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

12

Repeat until all nodes are removed

Phases 3,4,5,…:

3G

Page 13: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

13

Repeat until all nodes are removed

No remaining nodes

Phases 3,4,5,…,x:

1xG

Page 14: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

14

At the end, set will be an MIS of I G

G

Page 15: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

15

Worst case graph (for number of phases):

n nodes

Running time of algorithm: m)O(n

Number of phases of the algorithm: )(nO

Page 16: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

16

A General Algorithm For Computing MIS

Same as the sequential greedy algorithm,but at each phase we may select any independent set (instead of a single node)

Page 17: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

17

Suppose that will hold the final MISI

Initially I

Example:

G

Page 18: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

18

Find any independent set 1I

Phase 1:

And insert to :1I I 1III

1GG

Page 19: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

19

1I )( 1INremove and neighbors

1G

Page 20: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

20

remove and neighbors 1I )( 1IN

1G

Page 21: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

21

remove and neighbors 1I )( 1IN

2G

Page 22: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

22

Phase 2:

Find any independent set 2I

And insert to :2I I 2III

On new graph

2G

Page 23: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

23

remove and neighbors 2I )( 2IN

2G

Page 24: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

24

remove and neighbors 2I )( 2IN

3G

Page 25: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

25

Phase 3:

Find any independent set 3I

And insert to :3I I 3III

On new graph

3G

Page 26: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

26

remove and neighbors 3I )( 3IN

3G

Page 27: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

27

remove and neighbors 3I )( 3IN

No nodes are left

4G

Page 28: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

28

Final MIS I

G

Page 29: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

29

The number of phases depends on the choice of independent set in each phase:

The larger the independent set at eachphase the faster the algorithm

Observation:

Page 30: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

30

Example:If is MIS, 1 phase is needed

1I

Example:If each contains one node, phases are needed

kI)(nO

(sequential greedy algorithm)

Page 31: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

31

A Randomized Sync. Distributed Algorithm

Same with the general MIS algorithm

At each phase the independent setis chosen randomly so that it includesmany nodes of the remaining graph

Page 32: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

32

Let be the maximum node degree in the whole graph

d

1 2 d

Suppose that is known to all the nodesd

Page 33: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

33

Elected nodes are candidates forindependent set

Each node elects itself with probability

At each phase :k

kI

dp

1

1 2 d

kGz

z

Page 34: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

34

However, it is possible that neighbor nodes may be elected simultaneously

Problematic nodeskG

Page 35: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

35

All the problematic nodes must be un-elected. The remaining elected nodes formindependent set kI

kGkI

kIkI

kI

Page 36: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

36

Success for a node in phase : disappears at end of phase(enters or )

Analysis:

kGz

kI

1 2 y

No neighbor elects itself

z

z

k)( kIN

k

A good scenariothat guaranteessuccess

elects itself

Page 37: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

37

Basics of Probability

E: finite universe of events; let A and B denote two events in E; then:

1. A B is the event that either A or B occurs;

2. A B is the event that both A and B occur.

Page 38: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

38

Probability of success in phase:

1 2 y

p

p1

p1p1

dy pppp )1(1

z

No neighbor should elect itself

At least

elects itself

Page 39: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

39

Fundamental inequalities

tn

t ent

nt

e

11

21n

nt ||

10 p

1k

k

kp

p

11

Page 40: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

40

Probability of success in phase:

ed

ded

dd

ppppd

dy

2

1

11

1

11

1

)1(1

At least

For 2d

First ineq. with t =-1

Page 41: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

41

Therefore, node will enterand disappear at the end of phasewith probability at least

1 2 y

z

z kI

ed21

k

Page 42: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

42

Expected number of phases until nodedisappears:

at most ed2phase in success of yprobabilit

1 phases

z

Page 43: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

43

after phases

Bad event for node :

ned ln4

node did not disappear

Probability (First ineq. with t =-1 and n=2ed):

2ln2

ln411

21

1need n

ned

z

z

Page 44: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

44

after phases

Bad event for any node in :

ned ln4

at least one node did not disappear

Probability:

nnnx

Gx

11) for event bad of ty(probabili 2

G

Page 45: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

45

within phases

Good event for all nodes in :

ned ln4

all nodes disappear

Probability:

n1

-1event] bad of yprobabilit[1

(high probability)

G

Page 46: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

46

Total number of phases:

)log(ln4 ndOned

Time duration of each phase: )1(O

Total time: )log( ndO

with high probability

Page 47: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

47

Luby’s MIS Distributed Algorithm

Runs in time in expected case)(lognO

)log(log ndO with high probability

this algorithm is asymptoticallybetter than the previous

Page 48: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

48

Let be the degree of node)(vd

1 2 )(vd

v

v

Page 49: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

49

Each node elects itselfwith probability

At each phase :k

kI

)(21

)(vd

vp

kGv

1 2 )(vd

v

degree ofin

Elected nodes are candidates for theindependent set

v

kG

Page 50: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

50

)(vd

v

z

)(zd

If two neighbors are elected simultaneously,then the higher degree node wins

Example:

)(vd

v

z

)(zd

12

1

2

12

1

2)()( vdzd

if

Page 51: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

51

)(vd

v

z

)(zd

If both have the same degree, ties are broken arbitrarily

Example:

)(vd

v

z

)(zd

12

1

2

12

1

2)()( vdzd

if

Page 52: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

52

Problematic nodeskG

Using previous rules, problematic nodesare removed

Page 53: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

53

kG

The remaining elected nodes formindependent set kI

kI

kIkI

kI kI

kI

Page 54: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

54

at least one neighbor enters

Analysis

2z

A good event for node

1 2)(vd

v

1z)(vdz

kI:vH

Consider phasek

v

Page 55: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

55

1z)(vdz

At end of phasek

If is true, then andwill disappear at end of current phase

v)( kINv vH

Page 56: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

56

At least one neighbor ofelects itself with probability at least

2z

1 2)(vd

v

1z)(vdz

LEMMA 1: v

)(~

2

)(

1 vd

vd

e

)(max)(~

)(zdvd

vNz maximum neighbor degree

Page 57: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

57

2z

1 2)(vd

v

1z)(vdz

No neighbor of elects itself with probability

)(

))(1(vNz

zp

vPROOF:

(the elections are independent)

Page 58: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

58

)(~

2

)()(

~2

)()(~

2)(

)(~

2

11

)(~

2

11 vd

vdvd

vdvdvd

evdvd

)()( )(21

1))(1(vNzvNz zd

zp

maximum neighbor degree)(max)(~

)(zdvd

vNz

Page 59: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

59

2z

1 2)(vd

v

1z)(vdz

Therefore, at least one neighbor of Elects itself with probability at least

v

)(~

2

)(

1 vd

vd

e

END OF PROOF

Page 60: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

60

If a node elects itself,then it enters with probabilityat least

z

1 2

)(zdz

1 2

)(zdzv v

LEMMA 2:

kI

21

Page 61: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

61

1 2

)(zdz

)()( 1 zdud

1u

u)()( zdud

Node enters if no neighbor of same or higher degree elect itself

zkI

PROOF:

Page 62: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

62

1 2

)(zdz

Probability that some neighbor of with same or higher degree elects itself

)()( 1 zdud

1u

u

neighbors of same or higher degree

2

1

)(2

)(

)(2)(

itself)] elects (node[

1i

k

zd

zd

zdup

uP

i

k

)()( zdud

z

Page 63: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

63

Probability that that no neighbor ofwith same or higher degree elects itself

21

21

-1itself)] elects (nodeP[-1

itself)] elects node (no[

k

k

kk

u

uP

neighbors of same or higher degree

z

1 2

)(zdz

)()( 1 zdud

1u

u

)()( zdud

Page 64: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

64

1 2

)(zdz

Thus, if elects itself, it enterswith probability at least

z kI

21

1 2

)(zdzv

v

END OF PROOF

Page 65: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

65

2z

1 2)(vd

v

1z)(vdz

at least one neighbor of enters kI:vH v

)(

~2

)(

121

][ vd

vd

v eHPLEMMA 3:

Page 66: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

66

and no node is elected

neighbor is iniz kI

121 ,,, izzz

2z

12

)(vdv

1z)(vdz

New event

iz1iz kI

1ii

:iY

PROOF:

Page 67: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

67

)(21 ,,, vdYYY The events

are mutually exclusive

)(

1)(1][

vd

iii

vdiYPYP

Page 68: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

68

i

vdiv YPHP

)(1][

It holds:

)(

1)(1][][

vd

iii

vdiv YPYPHP

Therefore:

Page 69: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

69

and no node elects itself

elects itselfiz

kI

121 ,,, izzz

2z

12

)(vdv

1z)(vdz

iz1iz

1ii

:iA

][][][ iii BPAPYP

:iB izafter elects itself, it enters

1u 2u ku

Page 70: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

70

21

][ iBP (from Lemma 2)

2z

12

)(vdv

1z)(vdz

iz1iz

1ii

2z

12

)(vdv

1z)(vdz

iz1iz kI

1ii

1u 2u ku1u 2u ku

kI:iB izafter elects itself, it enters

Page 71: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

71

)(

1

)(

1

)(

1

][21

][][][][vd

ii

vd

iii

vd

iiv APBPAPYPHP

21

][ iBP

Page 72: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

72

and no node elects itself

elects itselfiz

121 ,,, izzz :iA

)(

1d(v)i1][]P[

elected] is of neighbor one least at[vd

iii APA

vP

The events are mutually exclusive)(21 ,,, vdAAA

Page 73: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

73

)(~

2

)(

1elected] is of neighbor one least at[ vd

vd

evP

We showed earlier (Lemma 1) that:

Therefore:

)(~

2

)()(

1

1][ vd

vdvd

ii eAP

Page 74: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

74

)(

~2

)()(

1

121

][21

][ vd

vdvd

iiv eAPHP

Therefore node disappears in phasewith probability at least

v k

END OF PROOF

Page 75: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

75

Let be the maximum node degree in the graph

kd

kG

Suppose that in : 2

)( kdvd

Then, )(2)(~

vdvd

ceeHP vd

vd

v

41

)(~

2

)(

121

121

][constant

kG

Page 76: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

76

(thus, nodes with high degreewill disappear fast)

2)( kd

vd a node with degree

with probability at least c

Thus, in phasek

disappears

Page 77: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

77

Suppose that the degree of remains at least for the next phases

Consider a node which in initial graphhas degree

2)(

dvd

Gv

v

2d

Node does not disappear within phases with probability at most

v

)1( c

Page 78: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

78

nc

1log3 1Take

Node does not disappear within phases with probability at most

v

3

1log3 1

)1()1( 1

ncc nc

Page 79: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

79

Thus, within phases nc

1log3 1

v either disappears or its degree gets less than

with probability at least

2d

3

11

n

Page 80: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

80

by the end of phases nc

1log3 1

there is no node of degree higher than2d

with probability at least (ineq. 2)

Therefore,

23

11

11

nn

n

Page 81: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

81

In every phases,nc

1log3 1

the maximum degree of the graphreduces by at least half, with probability at least

2

11

n

Page 82: 1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent

82

)log(log1

log3log 1 ndOn

d c

Maximum number of phases until degreedrops to 0 (MIS has formed)

with probability at least (ineq. 2)

nnn

nd 11

11

11

22

log