Basic skills are of great importance in theory of computer science (by many people).
Given a matrix, how to select a row using matrix languages?
Example 1
Given
M=⎝⎛147258369⎠⎞
If we want to select the second row. Let 1s=(0,1,0) be the indicator vector.
Then,
(0,1,0)⋅⎝⎛147258369⎠⎞=(4,5,6)
We successfully do it!
Similarly, if we want to select the second column.
M=⎝⎛147258369⎠⎞
Let 1t=(0,1,0)T.
Then,
⎝⎛147258369⎠⎞⋅⎝⎛010⎠⎞=⎝⎛258⎠⎞
In summary, if we want to select the row, we use
1s⋅M
if we want to select the column, we use
M⋅1t
Example 2
Now, consider M to be an adjacency matrix ( 0-1 matrix).
By Example 1, we can easily how to select a set S from M.
Let 1s be the indicator vector of S, e.g.,, 1s=(0,1,⋯,1)
But what does it mean?
1s×M[:1]:
if v1 has an incident edges to any node in S, then the above result is not zero. It means the number of edges incident from S to v1. So, the multiplication result means the vector of the number of edges from v1,v2,⋯,vn to S
Example 3
Let E(A,B) denote the number of edges from A to B. How to denote that using the matrix language.
To solve this problem, we can divide it into two steps.
Find the edges from V to S.
Choose T from V.
We use 1s⋅M to denote step 1. Then, we times 1tT to select T from V. In total, we use 1s⋅M⋅1tT
Expander Mixing Lemma
Lemma. Let G be a d-regular graph with n vertices and let λ=λ(G)=max(∣λ2∣,∣λn∣). Then, for any A,B⊆V, we have
∣∣∣E(A,B)∣−nd∣A∣∣B∣∣∣≤λ∣A∣∣B∣
What does the expander mixing lemma mean?
nd∣A∣∣B∣
means that in a random graph, the number of edges between A and B in expectation.
Therefore, the expander mixing lemma means that the number of edges between A and B in the d-regular graph is close to that in a random graph!
Proof. The first thing we need to do is that we use the matrix language to denote E(A,B).
E(A,B)=1aM1bT
Since M is an adjacency matrix, it is symmetric, which means that
M=QT∧Q
where Q is an orthogonal matrix.
Then,
∧=QMQT
We have the indicator vectors (or characteristic vectors) as follows.
1a=i∑αiqi,1b=j∑βjqjT,
where qi=n1(0,0,0,⋯,1,0,0) (the i-th place is 1).
The reason we do not use (0,0,0,⋯,1,0,0) to denote the 1a is that we will make an orthogonal vector in use.
Therefore,
E(A,B)=∑iαiqiM∑jβjqjT,
Notice that
i∑qiMj∑qjT=∧⋅E
Then,
∣E(A,B)∣=i∑λiαiβi
What is λ1, α1,β1?
After computing eigenvector (eigenvalues) of a d-regular graph, we will obtain that
λ1=d,q1=(1/n,⋯,1/n)
It is not that obvious. Let us prove that.
Formally, we need to prove the following lemma.
Lemma. Given a d-regular graph, we have two properties on the eigenvalues:
λ1=d, u1=(/1/n,⋯,1/n)
∣λi∣≤d for all i.
Proof.
The first property can be check by the definition, Au1=λ1u1. It is true.
[1]. Hoory, S., Linial, N. and Wigderson, A., 2006. Expander graphs and their applications. Bulletin of the American Mathematical Society, 43(4), pp.439-561.