The Adjacency Matrix
The Adjacency Matrix
Christi Shiner
Math 308
Professor King
12/03/01
The Adjacency Matrix
Crystal lattice structure is an important concept in materials science and
engineering. Crystals have certain packing structures; the packing structure is made up of
lattice sites that are occupied by atoms. If the crystal has a defect, one or more lattice
sites may be empty. The atoms can then randomly move, or walk, through the crystal
lattice by jumping from an occupied site to a neighboring unoccupied site. The
adjacency matrix can be used to determine how many walks there are between any two
lattice sites.
To diagram a lattice, points are drawn for the sites and lines connecting those
sites. This is called a graph, and an atom can move from one point to another if a line
joins the two sites. Figure 1 below shows a graph with 6 points labeled
1
through
6
.
(Note, points will be labeled on hard copy.)
Figure 1: Graph.
In Figure 1, an atom at
6
could move to
4
or
5
directly if the sites are unoccupied, but
would have to move through other points before getting to
1,
2,
or
3
. A walk is the
possible path of an atom through a crystal. A walk of length n in a graph is a sequence t
1
,
tn
+1
of points with each t
j
a neighbor of t
j+1
.
Here is the problem: Given a crystal with n sites labeled
1
,
n
, how many
different walks of length k are there between any two sites? We must use the adjacency
matrix to help solve this problem. The adjacency matrix of a graph with n points
1
,
n
, is
the n x n matrix where the i, j element is equal to 1 if
i
and
j
are neighbors, and zero
otherwise. For example, Figure 1 has the adjacency matrix:
0 1 1 1 0 0
1 0 1 0 0 0
A = 1 1 0 1 0 0
1 0 1 0 1 1
0 0 0 1 0 1
0 0 0 1 1 0
We see that the 1, 2 element of A is 1 because
1
and
2
are neighbors, but the 2, 4
element is 0 because there is no line between
2
and
4
.
The theorem that addresses the random walk problem is this:
Let A =[a
ij
] be the adjacency matrix of a graph G having points
1
, ,
n
. Let k be any
positive integer. Then the number of distinct
1
-
j
walks of length k in G is equal to the i,
j element of A
k
.
For example, let G be the graph of Figure 1, and has the adjacency matrix A from
Figure 1 above. What is the number of
2
-
6
walks of length 3 in G? First, find A
3
.
4 5 5 7 2 2
5 2 5 2 2 2
A
3
= 5 5 4 7 2 2
7 2 7 4 5 5
2 2 2 5 2 3
2 2 2 5 3 2
The 2, 6 element of A
3
equals 2, thus there are two distinct
2
-
6
walks of length 3 in G.
These are
2,
1,
4,
6
and
2
,
3,
4
,
6
.
We are able to count the number of walks of a given length k by calculating the
k
th
power of the adjacency matrix and reading its elements. Computing the number of
walks is easier and more efficient than counting the number of walks. There is less room
for error.
Bibliography
ONeil, Peter V. Advanced Engineering Mathematics. Brooks/Cole 1995: 329-332.
http://www.cs.oberlin.edu/classes/dragn/labs/graphs/graphs33.html
http://www.utc.edu/~cpmawata/petersen/lesson7.htm