00:02
We're given a length, and we're asked to find the number of paths between points c and d in the graph in figure 1 of this length.
00:13
So the graph of figure 1 is the beginning of this section, and in part a, we're asked to find the number of paths between c and d of length 2.
00:27
In order to find the number of paths of length 2, first we'll find the adjacency matrix of this graph.
00:35
We'll identify the entry in this adjacency matrix, which corresponds to the number of paths of length 1 between c and d.
00:48
Then we'll square the adjacency matrix, hence the 2, and then we'll look at the same entry, and this will be the number of paths of length 2 between c and d.
01:01
So first let's find the adjacency matrix.
01:04
Well, i'm not going to write the whole thing out here for you, but find adjacency matrix.
01:13
First of all, notice that our graph has six vertices, and therefore the adjacency matrix is going to be a six -by -six matrix.
01:27
So i'm going to make an adjacency matrix where the entries correspond to the vertices as follows.
01:38
So we'll have six rows, a row for a, b, c, d, e, and f, and six columns.
01:52
One for a, one for b, one for c, one for d, one for e, and one for f.
02:04
And now we simply write down the entries.
02:09
We know automatically that the entries in the main diagonal are going to be zero since we have a simple graph.
02:20
The rest of the entries, simply look at the graph and see how it's connected.
02:27
So this is our adjacency matrix.
02:31
I'll call this matrix a.
02:35
Now again, because we're looking for the number of path between c and d of length 2, well first of all, the corresponding entry, which i'll circle in red, since this is an undirected graph, could be either this entry or this entry.
02:53
If you look at both of those, but to find the number of pads of length 2, we need to find a squared.
03:03
For the purposes of this exercise, we really need this entry.
03:10
We see that it's clearly zero, and therefore the number of pads of length 2 between c and d is zero.
03:20
For later, parts of this exercise, though, you're going to need to know what a squared is to calculate higher powers of a...