Listing All Maximal Cliques in Sparse Graphs in Near-Optimal Time - - PowerPoint PPT Presentation

listing all maximal cliques in sparse graphs in near
SMART_READER_LITE
LIVE PREVIEW

Listing All Maximal Cliques in Sparse Graphs in Near-Optimal Time - - PowerPoint PPT Presentation

Listing All Maximal Cliques in Sparse Graphs in Near-Optimal Time Darren Strash Department of Computer Science UC Irvine Joint work with David Eppstein and Maarten L offler What is a Maximal Clique? A clique that cannot be extended by


slide-1
SLIDE 1

Listing All Maximal Cliques in Sparse Graphs in Near-Optimal Time

Darren Strash Joint work with David Eppstein and Maarten L¨

  • ffler

Department of Computer Science UC Irvine

slide-2
SLIDE 2

What is a Maximal Clique? A clique that cannot be extended by adding more vertices

slide-3
SLIDE 3

What is a Maximal Clique? A clique that cannot be extended by adding more vertices Maximal Maximal, Maximum Not Maximal Not Clique

slide-4
SLIDE 4

Goal: Design an algorithm to list all maximal cliques

slide-5
SLIDE 5

Goal: Design an algorithm to list all maximal cliques

slide-6
SLIDE 6

Motivation

slide-7
SLIDE 7

Motivation Features in ERGM

slide-8
SLIDE 8

Motivation Features in ERGM Detect structural motifs from similarities between proteins

slide-9
SLIDE 9

Motivation Features in ERGM Detect structural motifs from similarities between proteins Determine the docking regions between biomolecules

slide-10
SLIDE 10

Motivation Features in ERGM Detect structural motifs from similarities between proteins Determine the docking regions between biomolecules Document clustering for information retrieval

slide-11
SLIDE 11

There may be many maximal cliques.

slide-12
SLIDE 12

There may be many maximal cliques.

slide-13
SLIDE 13

There may be many maximal cliques.

slide-14
SLIDE 14

There may be many maximal cliques.

slide-15
SLIDE 15

There may be many maximal cliques.

slide-16
SLIDE 16

There may be many maximal cliques.

slide-17
SLIDE 17

There may be many maximal cliques.

slide-18
SLIDE 18

There may be many maximal cliques. 3 ∗ 3 ∗ 3 ∗ 3

slide-19
SLIDE 19

There may be many maximal cliques. 3n/3 maximal cliques

slide-20
SLIDE 20

There may be many maximal cliques. 3n/3 maximal cliques (Moon–Moser bound)

slide-21
SLIDE 21

Maximal Clique Listing Algorithms Author Year Running Time Bron and Kerbosch 1973 ??? Tsukiyama et al. 1977 O(nmµ) Chiba and Nishizeki 1985 O(αmµ) Makino and Uno 2004 O(∆4µ) n = number of vertices m = number of edges µ = number of maximal cliques ∆ = maximum degree of the graph α = arboricity

slide-22
SLIDE 22

Tomita et al. (2006)

slide-23
SLIDE 23

Tomita et al. (2006) Worst-case optimal running time O(3n/3)

slide-24
SLIDE 24

Tomita et al. (2006) Worst-case optimal running time O(3n/3) Computational experiments:

slide-25
SLIDE 25

Tomita et al. (2006) Worst-case optimal running time O(3n/3) Computational experiments: fast! slow

slide-26
SLIDE 26

The Bron–Kerbosch Algorithm Its variations work well in practice. Easy to implement Confirmed through computational experiments Johnston (1976), Koch (2001), Baum (2003) There are many heuristics, which make it faster Easy to understand One variation is worst-case optimal (O(3n/3) time) Tomita et al. (2006)

slide-27
SLIDE 27

The Bron–Kerbosch Algorithm Its variations work well in practice. Easy to implement Confirmed through computational experiments Johnston (1976), Koch (2001), Baum (2003) There are many heuristics, which make it faster Easy to understand One variation is worst-case optimal (O(3n/3) time) Tomita et al. (2006)

slide-28
SLIDE 28

Finding one maximal clique

slide-29
SLIDE 29

Finding one maximal clique

slide-30
SLIDE 30

Finding one maximal clique

slide-31
SLIDE 31

Finding one maximal clique

slide-32
SLIDE 32

Finding one maximal clique

slide-33
SLIDE 33

Finding one maximal clique

slide-34
SLIDE 34

Finding one maximal clique

slide-35
SLIDE 35

The Bron–Kerbosch Algorithm

slide-36
SLIDE 36

The Bron–Kerbosch Algorithm

slide-37
SLIDE 37

The Bron–Kerbosch Algorithm

slide-38
SLIDE 38

The Bron–Kerbosch Algorithm

slide-39
SLIDE 39

The Bron–Kerbosch Algorithm

slide-40
SLIDE 40

The Bron–Kerbosch Algorithm

slide-41
SLIDE 41

The Bron–Kerbosch Algorithm

slide-42
SLIDE 42

The Bron–Kerbosch Algorithm

slide-43
SLIDE 43

The Bron–Kerbosch Algorithm

slide-44
SLIDE 44

The Bron–Kerbosch Algorithm

slide-45
SLIDE 45

The Bron–Kerbosch Algorithm

slide-46
SLIDE 46

The Bron–Kerbosch Algorithm

slide-47
SLIDE 47

The Bron–Kerbosch Algorithm

slide-48
SLIDE 48

The Bron–Kerbosch Algorithm

slide-49
SLIDE 49

The Bron–Kerbosch Algorithm

slide-50
SLIDE 50

The Bron–Kerbosch Algorithm proc BronKerbosch(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: for each vertex v ∈ P do 5:

BronKerbosch(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

6:

P ← P \ {v}

7:

X ← X ∪ {v}

8: end for

slide-51
SLIDE 51

The Bron–Kerbosch Algorithm

slide-52
SLIDE 52

The Bron–Kerbosch Algorithm

slide-53
SLIDE 53

The Bron–Kerbosch Algorithm

slide-54
SLIDE 54

The Bron–Kerbosch Algorithm

slide-55
SLIDE 55

The Bron–Kerbosch Algorithm

slide-56
SLIDE 56

The Bron–Kerbosch Algorithm

slide-57
SLIDE 57

The Bron–Kerbosch Algorithm

slide-58
SLIDE 58

The Bron–Kerbosch Algorithm with Pivoting proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-59
SLIDE 59

The Bron–Kerbosch Algorithm with Pivoting proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to minimize |P \ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-60
SLIDE 60

The Bron–Kerbosch Algorithm with Pivoting proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-61
SLIDE 61

The Bron–Kerbosch Algorithm with Pivoting T(n) ≤ max

k {kT(n − k)} + O(n2)

slide-62
SLIDE 62

The Bron–Kerbosch Algorithm with Pivoting T(n) ≤ max

k {kT(n − k)} + O(n2)

T(n) = O(3n/3)

slide-63
SLIDE 63

The Bron–Kerbosch Algorithm

slide-64
SLIDE 64

The Bron–Kerbosch Algorithm

slide-65
SLIDE 65

The Bron–Kerbosch Algorithm All cliques in planar graphs may be listed in time O(n)

Chiba and Nishizeki (1985), Chrobak and Eppstein (1991)

slide-66
SLIDE 66

The Bron–Kerbosch Algorithm Want to characterize the running time with a parameter. Let p be our parameter of choice. An algorithm is fixed-parameter tractable with parameter p if it has running time f(p)nO(1) The key is to avoid things like np.

slide-67
SLIDE 67

Parameterize on Sparsity

slide-68
SLIDE 68

Parameterize on Sparsity degeneracy:

slide-69
SLIDE 69

Parameterize on Sparsity degeneracy: The minimum integer d such that every subgraph of G has a vertex of degree d or less.

slide-70
SLIDE 70

Degeneracy

slide-71
SLIDE 71

Degeneracy d = 1

slide-72
SLIDE 72

degeneracy: The minimum integer d such that there is an

  • rdering of the vertices where each vertex has at

most d neighbors later in the ordering. Degeneracy

slide-73
SLIDE 73
slide-74
SLIDE 74

h

slide-75
SLIDE 75

h

slide-76
SLIDE 76

h d = 1

slide-77
SLIDE 77
slide-78
SLIDE 78

Planar graphs have degeneracy at most 5

slide-79
SLIDE 79

Degeneracy is easy to compute

slide-80
SLIDE 80
slide-81
SLIDE 81
slide-82
SLIDE 82
slide-83
SLIDE 83
slide-84
SLIDE 84
slide-85
SLIDE 85
slide-86
SLIDE 86

d-degenerate graphs...

slide-87
SLIDE 87

d-degenerate graphs... cannot contain cliques with more than d + 1 vertices

slide-88
SLIDE 88

d-degenerate graphs... cannot contain cliques with more than d + 1 vertices

slide-89
SLIDE 89

d-degenerate graphs... cannot contain cliques with more than d + 1 vertices

slide-90
SLIDE 90

d-degenerate graphs... cannot contain cliques with more than d + 1 vertices > d later neighbors.

slide-91
SLIDE 91

d-degenerate graphs... cannot contain cliques with more than d + 1 vertices > d later neighbors.

slide-92
SLIDE 92

d-degenerate graphs...

slide-93
SLIDE 93

d-degenerate graphs... have fewer than dn edges.

slide-94
SLIDE 94

d-degenerate graphs... have fewer than dn edges. ≤ d later neighbors.

slide-95
SLIDE 95

A few more facts about degeneracy... Degeneracy is within a constant factor of other popular sparsity measures.

slide-96
SLIDE 96

A few more facts about degeneracy... Degeneracy is within a constant factor of other popular sparsity measures. Graphs generated by the preferential attachment mechanism of Barab´ asi and Albert have low degeneracy.

slide-97
SLIDE 97
slide-98
SLIDE 98
slide-99
SLIDE 99
slide-100
SLIDE 100
slide-101
SLIDE 101
slide-102
SLIDE 102
slide-103
SLIDE 103
slide-104
SLIDE 104
slide-105
SLIDE 105

proc BronKerboschDegeneracy(V , E)

1: for each vertex vi in a degeneracy ordering v0, v1, v2, . . . of (V, E)

do

2:

P ← vi’s later neighbors

3:

X ← vi’s earlier neighbors

4:

BronKerboschPivot(P, {vi}, X)

5: end for

slide-106
SLIDE 106

|P|≤ d X

slide-107
SLIDE 107

Computing the pivot

X P

Pick u ∈ X ∪ P that maximizes |P ∩ Γ(u)|.

slide-108
SLIDE 108

X P

Computing the pivot Pick u ∈ X ∪ P that maximizes |P ∩ Γ(u)|.

slide-109
SLIDE 109

X P

O(|P|(|X| + |P|)) Computing the pivot Pick u ∈ X ∪ P that maximizes |P ∩ Γ(u)|.

slide-110
SLIDE 110

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-111
SLIDE 111

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-112
SLIDE 112

X P

Find subgraph induced by v’s neighbors.

slide-113
SLIDE 113

X P

v Find subgraph induced by v’s neighbors.

slide-114
SLIDE 114

X P

v Find subgraph induced by v’s neighbors.

slide-115
SLIDE 115

X ∩ Γ(v) P ∩Γ(v)

Find subgraph induced by v’s neighbors.

slide-116
SLIDE 116

X ∩ Γ(v) P ∩Γ(v)

O(|P|(|X| + |P|)) Find subgraph induced by v’s neighbors.

slide-117
SLIDE 117

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-118
SLIDE 118

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-119
SLIDE 119

X P

v Remove v from P and add it to X.

slide-120
SLIDE 120

X P

v Remove v from P and add it to X.

slide-121
SLIDE 121

X P

v Remove v from P and add it to X.

slide-122
SLIDE 122

X P

v O(|P|(|X| + |P|)) Remove v from P and add it to X.

slide-123
SLIDE 123

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-124
SLIDE 124

proc BronKerboschPivot(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: choose a pivot u ∈ P ∪ X to maximize |P ∩ Γ(u)| 5: for each vertex v ∈ P \ Γ(u) do 6:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

7:

P ← P \ {v}

8:

X ← X ∪ {v}

9: end for

slide-125
SLIDE 125

O(|P|2(|X| + |P|))

slide-126
SLIDE 126

T(n) ≤ max

k {kT(n − k)} + O(n2)

= O(3n/3)

slide-127
SLIDE 127

T(n) ≤ max

k {kT(n − k)} + O(n2)

D(p, x) ≤ max

k {kD(p − k, x)} + O(p2(p + x))

= O(3n/3)

slide-128
SLIDE 128

T(n) ≤ max

k {kT(n − k)} + O(n2)

D(p, x) ≤ max

k {kD(p − k, x)} + O(p2(p + x))

≤ (d + x)

  • maxk
  • kD(p−k,x)

d+x

  • + O(p2)
  • = O(3n/3)
slide-129
SLIDE 129

T(n) ≤ max

k {kT(n − k)} + O(n2)

D(p, x) ≤ max

k {kD(p − k, x)} + O(p2(p + x))

≤ (d + x)

  • maxk
  • kD(p−k,x)

d+x

  • + O(p2)
  • ≤ (d + x)
  • maxk{kT(p − k)} + O(p2)
  • = O(3n/3)
slide-130
SLIDE 130

T(n) ≤ max

k {kT(n − k)} + O(n2)

D(p, x) ≤ max

k {kD(p − k, x)} + O(p2(p + x))

≤ (d + x)

  • maxk
  • kD(p−k,x)

d+x

  • + O(p2)
  • ≤ (d + x)
  • maxk{kT(p − k)} + O(p2)
  • = O((d + x)3p/3)

= O(3n/3)

slide-131
SLIDE 131

T(n) ≤ max

k {kT(n − k)} + O(n2)

D(p, x) ≤ max

k {kD(p − k, x)} + O(p2(p + x))

≤ (d + x)

  • maxk
  • kD(p−k,x)

d+x

  • + O(p2)
  • ≤ (d + x)
  • maxk{kT(p − k)} + O(p2)
  • = O((d + x)3p/3)

= O(3n/3) = O((d + x)3d/3)

slide-132
SLIDE 132
  • v∈V

O(d + |Xv|)3d/3)

slide-133
SLIDE 133
  • v∈V

O(d + |Xv|)3d/3) = O((dn + m)3d/3)

slide-134
SLIDE 134
  • v∈V

O(d + |Xv|)3d/3) = O((dn + m)3d/3) = O(dn3d/3)

slide-135
SLIDE 135
  • v∈V

O(d + |Xv|)3d/3) = O((dn + m)3d/3) = O(dn3d/3) where f(d) = d3d/3 = O(f(d)n)

slide-136
SLIDE 136

Our running time: O(dn3d/3)

slide-137
SLIDE 137

Our running time: O(dn3d/3) Worst-case output size: O(d(n − d)3d/3)

slide-138
SLIDE 138

Our running time: O(dn3d/3) Worst-case output size: O(d(n − d)3d/3) When n − d = Ω(n), our algorithm is worst-case optimal.

slide-139
SLIDE 139

≤ d later neighbors. An upper bound

slide-140
SLIDE 140

≤ d later neighbors. An upper bound

slide-141
SLIDE 141

≤ d later neighbors. An upper bound

slide-142
SLIDE 142

≤ d later neighbors. at most O(3d/3) maximal cliques An upper bound

slide-143
SLIDE 143

≤ d later neighbors. at most O(3d/3) maximal cliques An upper bound

slide-144
SLIDE 144

n − d − 3 vertices d + 3 vertices An upper bound

slide-145
SLIDE 145

n − d − 3 vertices d + 3 vertices (n − d − 3)3d/3 3

d+3 3

An upper bound

slide-146
SLIDE 146

n − d − 3 vertices d + 3 vertices (n − d − 3)3d/3 3

d+3 3

at most (n − d)3d/3 maximal cliques An upper bound

slide-147
SLIDE 147

Kn−d,3,3,3,... A lower bound

slide-148
SLIDE 148

Kn−d,3,3,3,... n − d d d d . . . A lower bound

slide-149
SLIDE 149

Kn−d,3,3,3,... n − d d d d . . . A lower bound

slide-150
SLIDE 150

Kn−d,3,3,3,... n − d d d d . . . (n − d)3d/3 maximal cliques A lower bound

slide-151
SLIDE 151

Kn−d,3,3,3,... n − d d d d . . . (n − d)3d/3 maximal cliques has degeneracy d when (n − d) ≥ 3 A lower bound

slide-152
SLIDE 152

at most (n − d)3d/3 maximal cliques each clique is of size at most d + 1 O(d(n − d)3d/3) worst-case output size.

slide-153
SLIDE 153

The Bron–Kerbosch Algorithm

proc BronKerbosch(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: for each vertex v ∈ P do 5:

BronKerbosch(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

6:

P ← P \ {v}

7:

X ← X ∪ {v}

8: end for

slide-154
SLIDE 154

The Bron–Kerbosch Algorithm

proc BronKerbosch(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: for each vertex v ∈ P (in degeneracy order) do 5:

BronKerbosch(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

6:

P ← P \ {v}

7:

X ← X ∪ {v}

8: end for

slide-155
SLIDE 155

The Bron–Kerbosch Algorithm

proc BronKerbosch(P, R, X)

1: if P ∪ X = ∅ then 2:

report R as a maximal clique

3: end if 4: for each vertex v ∈ P (in degeneracy order) do 5:

BronKerboschPivot(P ∩ Γ(v), R ∪ {v}, X ∩ Γ(v))

6:

P ← P \ {v}

7:

X ← X ∪ {v}

8: end for

slide-156
SLIDE 156

Experiments Linux Workstation: 3.00Ghz Pentium 4, 1GB RAM

slide-157
SLIDE 157

Experimental results for UCI data sets

graph d BK BK-pivot BK-hybrid BK-degen Uno karate 4 < 1sec < 1sec < 1sec < 1sec <1sec∗ dolphins 4 < 1sec < 1sec < 1sec < 1sec < 1sec power 5 < 1sec < 1sec < 1sec < 1sec < 1sec polbooks 6 < 1sec < 1sec < 1sec < 1sec < 1sec adjnoun 6 < 1sec < 1sec < 1sec < 1sec < 1sec football 8 < 1sec < 1sec < 1sec < 1sec < 1sec lesmis 9 < 1sec < 1sec < 1sec < 1sec < 1sec celegens 9 < 1sec < 1sec < 1sec < 1sec

  • seg. fault∗

netscience 19 2.8sec < 1sec < 1sec < 1sec < 1sec internet 25 19.4sec 10.3sec < 1sec < 1 sec <1sec∗ condmat 29 > 3min 65sec 1.6sec 2.61sec < 1sec polblogs 36 > 3min 2sec 1.5sec 1.2sec 1.8sec astro 56 > 3min 12.3sec 1.4sec 3.14sec < 1sec

slide-158
SLIDE 158

Experimental results for BIOGRID data sets (PPI Networks)

graph d BK BK-pivot BK-hybrid BK-degen Uno mouse 6 < 1sec < 1sec < 1sec < 1sec < 1sec worm 10 < 1sec < 1sec < 1sec < 1sec < 1sec plant 12 < 1sec < 1sec < 1sec < 1sec < 1sec fruitfly 12 < 1sec 2.2sec < 1sec < 1sec < 1sec human 12 1.4sec 3.3sec < 1sec < 1sec < 1sec fission-yeast 34 2.8sec 1.1sec < 1sec < 1sec < 1sec yeast 64 > 3min 81sec 44.3sec 20.5sec 121.1sec∗

slide-159
SLIDE 159

Experimental results for Pajek data sets

graph d BK BK-pivot BK-hybrid BK-degen Uno foldoc 12 4.2sec 9sec < 1sec 1sec < 1sec patents 24 > 5min > 5min 4.3sec 5.3sec 2.2sec eatRS 34 19.8sec 53sec 12.3sec 9.12sec 14.9sec hep-th 37 > 5min 69.6sec 22.6sec 17.2sec 41.5sec∗ days-all 73 > 5min 379.1sec 206.5sec 51.4sec 10min 25sec ND-www 155 > 5min > 5min 27.8sec 41.11sec 9.7sec∗

slide-160
SLIDE 160

Thank you!