拉普拉斯矩阵(Laplacian matrix) 也叫做导纳矩阵、基尔霍夫矩阵或离散拉普拉斯算子,是图论中用于表示图的一种重要矩阵。
定义
给定一个具有 n 个顶点的简单图
G
=
(
V
,
E
)
G=( V , E )
G=(V,E),V 为顶点集合,E 为边集合,其拉普拉斯矩阵可定义为:
L
=
D
−
A
L = D − A
L=D−A
其中 A ∈ R A \in R A∈R 为邻接矩阵(adjacency matrix), D ∈ R n × n D \in \mathbb{R}^{n \times n} D∈Rn×n 为度矩阵(degree matrix)。
注意,A 中的元素仅仅可能是 0 和 1,且其对角元素全为 0。D 是一个对角矩阵,其对角线上的元素计算方式为 D i i = ∑ j A i j D_{i i}=\sum_{j} A_{i j} Dii=∑jAij
进一步地,L 的每个元素值的具体计算方式如下所示:
L
i
j
=
{
D
i
i
if
i
=
j
−
1
if
i
≠
j
and
v
i
is adjacent to
v
j
0
otherwise
L_{ij}=\left \{\begin{array}{ll}D_{ii}\quad &\text{if}\; i=j\\-1 \quad &\text{if}\; i\ne j\;\text{and}\;v_i\;\text{is adjacent to}\; v_j\\0\quad &\text{otherwise}\end{array}\right.
Lij=⎩⎨⎧Dii−10ifi=jifi=jandviis adjacent tovjotherwise
示例
给定一个简单的图
G
=
(
V
,
E
)
G=(V, E)
G=(V,E),其示意图如下所示
根据该示意图,可以获得 G 对应的邻接矩阵 A ,如下所示:
A
=
(
0
1
0
0
1
0
1
0
1
0
1
0
0
1
0
1
0
0
0
0
1
0
1
1
1
1
0
1
0
0
0
0
0
1
0
0
)
A=\begin{pmatrix}0&1&0&0&1&0\\1&0&1&0&1&0\\0&1&0&1&0&0\\0&0&1&0&1&1\\1&1&0&1&0&0\\0&0&0&1&0&0\end{pmatrix}
A=⎝⎜⎜⎜⎜⎜⎜⎛010010101010010100001011110100000100⎠⎟⎟⎟⎟⎟⎟⎞
根据度矩阵的计算方式,可以获得 G 对应的度矩阵 D ,如下所示:
D
=
(
2
0
0
0
0
0
0
3
0
0
0
0
0
0
2
0
0
0
0
0
0
3
0
0
0
0
0
0
3
0
0
0
0
0
0
1
)
D=\begin{pmatrix}2&0&0&0&0&0\\0&3&0&0&0&0\\0&0&2&0&0&0\\0&0&0&3&0&0\\0&0&0&0&3&0\\0&0&0&0&0&1\end{pmatrix}
D=⎝⎜⎜⎜⎜⎜⎜⎛200000030000002000000300000030000001⎠⎟⎟⎟⎟⎟⎟⎞
根据拉普拉斯矩阵的定义
L
=
D
−
A
L = D − A
L=D−A,可以获得 G 对应的拉普拉斯矩阵 L,如下所示:
L
=
(
2
−
1
0
0
−
1
0
−
1
3
−
1
0
−
1
0
0
−
1
2
−
1
0
0
0
0
−
1
3
−
1
−
1
−
1
−
1
0
−
1
3
0
0
0
0
−
1
0
1
)
L=\begin{pmatrix}2&-1&0&0&-1&0\\-1&3&-1&0&-1&0\\0&-1&2&-1&0&0\\0&0&-1&3&-1&-1\\-1&-1&0&-1&3&0\\0&0&0&-1&0&1\end{pmatrix}
L=⎝⎜⎜⎜⎜⎜⎜⎛2−100−10−13−10−100−12−10000−13−1−1−1−10−130000−101⎠⎟⎟⎟⎟⎟⎟⎞
显然,拉普拉斯矩阵都是对称的。
性质
- 拉普拉斯矩阵是半正定矩阵;
- 特征值中0出现的次数就是图连通区域的个数;
- 最小特征值是0,因为拉普拉斯矩阵每一行的和均为0;
- 最小非零特征值是图的代数连通度。
变体
除了最普通的拉普拉斯矩阵形式 L = D − A L = D − A L=D−A 外,还具有多种常见的形式,如 Symmetric normalized Laplacian 和 Random walk normalized Laplacian。
Symmetric normalized Laplacian的定义如下:
L
s
n
=
D
−
1
2
L
D
−
1
2
=
I
−
D
−
1
2
A
D
−
1
2
L^{sn}=D^{-\frac{1}{2}}LD^{-\frac{1}{2}}=I-D^{-\frac{1}{2}}AD^{-\frac{1}{2}}
Lsn=D−21LD−21=I−D−21AD−21
L i j s n = { 1 if i = j and D i i ≠ 0 − 1 D i i D j j if i ≠ j and v i is adjacent to v j 0 otherwise L_{i j}^{s n}=\left\{\begin{array}{ll} 1 & \text { if } i=j \text { and } D_{i i} \neq 0 \\ -\frac{1}{\sqrt{D_{i i} D_{j j}}} & \text { if } i \neq j \text { and } v_{i} \text { is adjacent to } v_{j} \\ 0 & \text { otherwise } \end{array}\right. Lijsn=⎩⎪⎨⎪⎧1−DiiDjj10 if i=j and Dii=0 if i=j and vi is adjacent to vj otherwise
Random walk normalized Laplacian的定义如下:
L
r
w
=
D
−
1
L
=
I
−
D
−
1
A
L^{r w} =D^{-1} L=I-D^{-1} A
Lrw=D−1L=I−D−1A
L i j r w = { 1 if i = j and D i i ≠ 0 − 1 D i i if i ≠ j and v i is adjacent to v j 0 otherwise \begin{aligned} L_{i j}^{r w}=\left\{\begin{array}{ll} 1 & \text { if } i=j \text { and } D_{i i} \neq 0 \\ -\frac{1}{D_{i i}} & \text { if } i \neq j \text { and } v_{i} \text { is adjacent to } v_{j} \\ 0 & \text { otherwise } \end{array}\right. \end{aligned} Lijrw=⎩⎨⎧1−Dii10 if i=j and Dii=0 if i=j and vi is adjacent to vj otherwise