Graphs can be very complicated. We can associate a matrix with
each graph storing some of the information about the graph in that matrix. This matrix can be used to obtain more detailed information about the graph. If a graph has vertices, we may associate an
matrix
which is called vertex matrix or adjacency matrix. The vertex matrix
is defined by
Example: The following is a simple example of a graph with vertices . We want to find the vertex matrix for this graph.
Define the vertex matrix as follow:
Example: Find the vertex matrix for the following graph.
Assigning 1 to all that there is directed edge from
to
and
to the other entries we obtain the vertex matrix.
Note: :
It can be proved that if M is the vertex matrix of a digraph, then the entry
will show the number of r-step connections from
to
.
Example: Consider the following graph.
a) Find the vertex matrix M of the following graph.
b) Find the number of 3 step connection (or paths of length 3) from to
.
c) Find the number of 1, 2 or 3-step connections from to
.
a) Find the vertex matrix M of the following graph.
solutions a) Find the vertex matrix M of the following graph.
b) Find the number of 3 step connection (or paths of length 3) from to
.
Here is a list of 3-step connection from to
.
But the number can be obtained by computing .
i)
ii)
iii)
iv)
Since the entry , there is four 3-step connection from
to
.
You can find the number of all 3-step connections from any point to other points just from looking at .
Similarly you can compute for
, to find the number of
-step path.
c) Find the number of 1, 2 or 3-step connections from to
.
1-step connection - none, because , or just simply from the graph.
2-step connection - none, because , or just simply from the graph.
3-step connection - 2, because . Or just simply from the graph.