Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Available online at www.sciencedirect.

com

Electronic Notes in Discrete Mathematics 43 (2013) 431–437


www.elsevier.com/locate/endm

Modularity in random regular graphs


and lattices

Colin McDiarmid 1 Fiona Skerman 2


Department of Statistics
University of Oxford
Oxford, United Kingdom

Abstract
Given a graph G, the modularity of a partition of the vertex set measures the extent
to which edge density is higher within parts than between parts; and the modularity
of G is the maximum modularity of a partition.
We give an upper bound on the modularity of r-regular graphs as a function of
the edge expansion (or isoperimetric number) under the restriction that each part in
our partition has a sub-linear numbers of vertices. This leads to results for random
r-regular graphs. In particular we show the modularity of a random cubic graph
partitioned into sub-linear parts is almost surely in the interval (0.66, 0.88).
The modularity of a complete rectangular section of the integer lattice in a fixed
dimension was estimated in Guimer et. al. [2]. We extend this result to any subgraph
of such a lattice, and indeed to more general graphs.
Keywords: edge expansion, isoperimetric number, lattices, regular graphs,
random regular graphs, random cubic graphs

1
Email: cmcd@stats.ox.ac.uk
2
Email: skerman@stats.ox.ac.uk

1571-0653/$ – see front matter © 2013 Elsevier B.V. All rights reserved.
http://dx.doi.org/10.1016/j.endm.2013.07.063
432 C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437

Example Calculations of Modularity

13 11 8 13
qAE1 = 1, qAD1 = qAE2 = 1, qAD2 = qAE3 = , qAD3 =
25 25 13 50
12 14 231
qA1 = = 0.48 qA2 = = 0.64 qA3 = ≈ 0.36
25 25 650
Modularity of K10 ∪K
˙ 6 ∪K
˙ 6 with partitions A1 , A2 and A3 (in colour).

1 Introduction
The definition of modularity was first introduced by Newman and Girvan in
[4]. The most popular algorithms used to find clusterings on large datasets
are based on finding partitions with high modularity [3].

The modularity function favours partitions in which a large proportion of the


edges fall entirely within the parts and biases against having too few or too
unequally sized parts. These two considerations form the edge contribution
qAE (G), and degree tax, qAD (G) in the expression for the modularity of a par-
tition A of the vertices of the graph G. Formally, for A = {A1 , . . . , Ak } a
partition of V (G) and E(Ai ) := {vw ∈ E(G) : v, w ∈ Ai }, we let

 |E(A)|  ( v∈A deg(v))


2

qAE (G) := A∈A m


, qAD (G) := A∈A 4m2

qA (G) := qAE (G) − qAD (G).


The (maximum) modularity q ∗ (G) of a graph G is then the maximum over all
possible partitions A of V (G)

q ∗ (G) := max qA (G).


A

To maximise modularity we want a partition with large edge contribution


C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437 433

subject to small degree tax.

2 Edge Expansion and Modularity


Our main result is Theorem 2.1 which bounds the modularity of an r-regular
graph in terms of its edge expansion. We define the edge expansion of a graph
G as in [1], and note it is also known as the isoperimetric number.

e(V1 , V2 )
i(G) := min
˙ 2
V (G)=V1 ∪V min{|V1 |, |V2 |}

Let G be an r-regular graph with n vertices, and edge-expansion i(G). Let


A = (A1 , . . . , Ak ) be a partition of V (G). Then the following upper bound
on the modularity is almost immediate.
(1) qA (G) ≤ max{1 − i(G)/r, 3/4}.
There are two cases to check. (a) Suppose
 that each |A i | ≤ n/2. Then the
number of edges between parts Ai is 12 i e(Ai , Āi ) ≥ 12 i |Ai |i(G) = 12 ni(G).
Hence qA (G) ≤ 1 − i(G)/r. (b) If say |A1 | > n/2 than the degree tax is at
least (|A1 |r/rn)2 > 1/4 and so qA (G) ≤ 3/4.

In Theorem 2.1 we improve the upper bound in (1) to 1 − 2i(G)/r, when the
maximum size of parts in our partition is restricted. We need new notation.
Given δ > 0, for a graph G with n ≥ δ −1 vertices we define qδ (G) to be the
maximum modularity of all partitions for G such that each part has size at
most δn.
Theorem 2.1 For any ε > 0 there exists δ > 0 such that the following holds.
Let r ≥ 3 and let G be an r-regular graph with at least δ −1 vertices. Then
2i(G)
qδ (G) < 1 −
+ ε.
r
The proof of the result hinges on the following Lemma, which we will state
and prove before returning to the proof of our theorem.

Lemma 2.2 Fix positive integers t and n, and consider the complete graph
Kn on the vertex set 1, . . . , n with non-negative vertex weights such that w(1) ≥
w(2) ≥ . . . ≥ w(n). Let M be a perfect matching on Kn such that |a − b| ≤ t
for each edge ab ∈ M. Construct a red-blue (improper) vertex-colouring c of
Kn by colouring one end of each edge in M red and the other end blue. Then,
434 C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437

   
 
(2)  w(v) − w(u) ≤ t (w(1) − w(n)).
v: c(v) red u: c(u) blue

Proof. Observe that the left side of (2) is at most


 
n−1
(w(a) − w(b)) = (w(j) − w(j + 1))nj
ab∈M, a<b j=1

where nj is the number of distinct edges ab ∈ M with a < b such that


j, j + 1 ∈ {a, . . . , b}.
Let ab ∈ M with a < b, and let j ∈ {a, . . . , b}. Then a ∈ {j − t, . . . , j}
and b ∈ {j, . . . , j + t}; since otherwise either a ≤ j − (t + 1) and b ≥ j,
or b ≥ j + t + 1 and a ≤ j, and so b − a ≥ t + 1. Thus if ab ∈ M then
a, b ∈ {j − t, . . . , j + t}. Hence, if we had j ∈ {a, . . . , b} for at least t + 1
distinct edges ab ∈ M with a < b then all 2t + 2 end vertices involved would
have to be in the set {j − t, . . . , j + t} of 2t + 1 vertices, a contradiction. It
follows that each nj ≤ t, and so

n−1 
n−1
(w(j) − w(j + 1))nj ≤ t · (w(j) − w(j + 1)) = t (w(1) − w(n)).
j=1 j=1

which completes the proof. 2

Proof. (of Theorem 2.1). Proof outline. Given a partition A , we pair up the
parts, and then (randomly) divide the parts into two groups by placing one
part from each pair in each group. Let U be the vertices in the parts of the
first group and V the rest. We use Lemma 2.2 to ensure that U and V have
approximately equal size. There are sufficiently many pairings available that
we can ensure that there are not many edges between each pair of parts. The
edge expansion parameter then gives us a lower bound on the expected num-
ber of edges between U and V , and hence an upper bound for the modularity.

Fix ε > 0. Let t = t(ε) = 2 1ε  + 1 and let δ = 2tε . Let r ≥ 3 and let G
be an r-regular graph with n ≥ δ −1 vertices. Let A = {A1 , . . . , Ak } be any
partition of G such that δn ≥ |A1 | ≥ · · · ≥ |Ak |.
Recall that the edge set of a complete graph on an even number of vertices
has a decomposition into perfect matchings. Let {Mα }tα=1 be a set of edge
disjoint perfect matchings in Kt+1 . To avoid parity problems when t + 1 |k,
set k  = k  (n) =
k/(t + 1) (t + 1) and let Q := {k  + 1, . . . , k}. For each
matching Mα we define a pairing Pα on the parts A1 , . . . , Ak in our partition
C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437 435

A . For 1 ≤ i = j ≤ k  ;
    i = u (mod t + 1)
(3) {Ai , Aj } ∈ Pα ⇔ uv ∈ E(Mα ), i
t+1
= j
t+1
, .
j = v (mod t + 1)
We choose a perfect matching Mα that minimises the total number of edges
between Ai and Aj for the pairs {i, j} ∈ Pα . Let Eα = ∪i,j∈Pα E(Ai , Aj ) and
set α = arg min |Eα |. Then |Eα | ≤ e(G)
t
.

Now construct a random bipartition of the parts of A : ∀ {i, j} ∈ Pα add Ai


to U and Aj to V with probability 12 and add Ai to V and Aj to U otherwise,
and ∀h ∈ Q, add Ah to U with probability 12 and to V otherwise. Now, because
|i − j| ≤ t, ∀{i, j} ∈ Pα (which means Lemma 2.2 applies) and |Q| ≤ t,

||U | − |V || ≤ t(|A1 | − |Ak |) + t|Ak +1 | ≤ t|A1 |.

Thus |U |, |V | ≥ n2 − 2t |A1 |. Hence by the definition of edge expansion we


always have e(U, V ) ≥ 12 i(G)(n − t|A1 |) and so
(4) E(e(U, V )) ≥ 12 i(G)(n − t|A1 |).
By construction of our random bipartition, any edge between non-paired parts
has probability one half to be between the random sets U and V . We denote
this set of edges by Eβ := ( ∪i=j E(Ai , Aj ))\Eα , so if e ∈ Eβ , then P(e ∈
E(U, V )) = 1/2. Note also that for e ∈ Eα , P(e ∈ E(U, V )) = 1. Thus
1
(5) E(e(U, V )) = |Eβ | + |Eα |.
2
Recall the definition of modularity implies;
1
 1
(6) qA (G) ≤ qAE (G) = e(G) A∈A E(A) = 1 − e(G) (|Eα | + |Eβ |).

We rearrange (5) and then apply our inequality (4);


(7) |Eβ | + |Eα | = 2E(e(U, V )) − |Eα | ≥ i(G)(n − t|A1 |) − e(G)
t
.
As G is r-regular, e(G) = rn/2 and hence by (6) and (7),
2i(G) 2t|A1 | 1
(8) qA (G) ≤ 1 − + + .
r rn t
Finally observe that
2t|A1 | 1 2tδ 1 ε ε
+ ≤ + < + < ε,
rn t r t r 2
to complete the proof. 2
436 C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437

3 Random regular graphs


Our Theorem 2.1 allows us to prove bounds for random regular graphs. Let
i∗ (r) be a lower bound of the isoperimetric number of random r-regular graphs
which holds asymptotically almost surely (a.a.s.).
Theorem 3.1 For any ε > 0 there is a δ > 0 such that the following holds.
Let r ≥ 3, and consider the random r-regular graph Gn,r on n vertices. Then
2 2i∗ (r)
(9) − ε < qδ (Gn,r ) < 1 − + ε a.a.s.
r r
For random cubic graphs,
(10) 0.66 < qδ (Gn,3 ) < 0.88 a.a.s.
Proof (Sketch) For (9), the upper bound is from Theorem 2.1. The lower
bound is obtained constructively using Robinson and Wormald’s result [5], [6]
that random r-regular graphs are almost surely Hamiltonian for r ≥ 3. Given
a Hamiltonian√cycle, take a partition A of √ the vertices which breaks the cycle
√ at most n paths of length about n. Observe that all edges in these
into
n paths fall within the parts√of A , which gives a lower bound for the edge

contribution, qAE (Gn,r ) ≥ 2r − 2rnn . Then, because all parts have size about n
√ √ 2
the degree tax is small, qAD (Gn,r ) ≈ n (r(rn)n)2 = √1n and the lower bound in (9)
follows. Bounds for the edge expansion (or isometric number) of random cubic
graphs by Bollobàs [1] then give (10). 2
The numerical bounds are important. In particular, any sub-linear partition
of a degree three network which achieves modularity greater than 0.88 has
found statistically significant clustering.

4 Lattice-like graphs
In the statistical mechanics community the maximum modularity of square
lattices has received attention in the paper [2]. Let Zdz be the infinite integer
lattice in d dimensions, where all axis-aligned edges of lengths 1, . . . , z have
been added. The theorem of Guimerà et. al. [2] gives a lower bound on
modularity for complete rectangular sections of Zdz .
Theorem 4.1 (R. Guimerà et. al. [2]) Fix positive integers d and z, and
let R be an n-vertex complete rectangular section of Zdz . Then
  d+1
d
z+1 1

q (R) ≥ 1 − (d + 1) n− d+1 .
2d
C. McDiarmid, F. Skerman / Electronic Notes in Discrete Mathematics 43 (2013) 431–437 437

Observe that in the complete lattice all vertex degrees are positive and bounded,
1
and so up to a constant this result says that q ∗ (R) = 1 − O(m− d+1 ), where
m denotes the number of edges in R. We extend this result to include any
subgraph of the square lattice.
Theorem 4.2 Fix positive integers d and z, and let L be an m-edge subgraph
of Zdz . Then
1
q ∗ (L) = 1 − O(m− d+1 ) as m → ∞.
Indeed this result extends to any graphs which have an embedding in Rd with
bounded edge length and bounded edge density.

References

[1] B. Bollobás, The isoperimetric number of random regular graphs, Europ. J.


Combinatorics 9 (1988), 241–244.

[2] R. Guimerà, M. Sales-Pardo and L.A. Amaral, Modularity from fluctuations in


random graphs and complex networks, Phys. Rev. E 70 (2) (2004) 025101.

[3] A. Lancichinetti and S. Fortunato, Limits of modularity maximization in


community detection, Phys. Rev. E 84 (2011) 066122.

[4] M.E.J. Newman and M. Girvan, Finding and evaluating community structure
in networks, Phys. Rev. E 69 (2004) 026 – 113.

[5] R.W. Robinson and N.C. Wormald, Almost all cubic graphs are hamiltonian,
Random Struct. Alg. 3 (1992) 117 – 126.

[6] R.W. Robinson and N.C. Wormald, Almost all regular graphs are hamiltonian,
Random Struct. Alg. 5 (1994) 363 – 374.

You might also like