00:01
So for this question, we're trying to find the number of paths of length like two all the way to seven between vertices a and e on in a graph.
00:22
In a graph that was given an exercise two.
00:26
And so if we look at the graph, which is directed, we can create an adjacency matrix for the graph, right? you know that adjacency matrix a of the graph will be as follows.
00:46
And we, the way we create this is by, for each entry, we see, we give, um, the entry here gives the number of paths between two vertices.
01:00
So for example, this first column corresponds with a, first top row corresponds to a, second column b, second row b, etc.
01:11
So if we want to find the number of paths from vertex a to vertex e, then we look at the, then we look at this element of the adjacency matrix.
01:25
So for now, for one, paths of length one, there are no paths of length one between a and e because this is simply, this is the element we look at.
01:37
So the way i'm going to do this is not very elegant, but, but if we want to really find the number of pads of length 2, 3, 4, 5, 6, and 7 between vertices a and e in this graph, one way to do it is to calculate a squared, a cubed, a4, 8 to the 5th, 8 to the 6th, and a to the 7th, and look at this element in each of these matrices.
02:08
Because by theorem 2, we know that that will give us the number of paths of length 2, 3, 4, 5, 6, and 7, respectively between the two desired vertices.
02:18
And so i'm just going to give you the matrices.
02:22
I'm assuming that we all know how to do matrix multiplication here.
02:26
So when you're doing this problem and if you choose this solution path, then just matrix multiply it out and just check with the matrices that i list below to make sure that you're done correct matrix multiplication but here are the matrices as follows and i realize that this is not a very elegant solution but this is um of like this is a an algorithmic way of determining determining the number of paths which is what we want in this in this problem right so a squared will be this matrix here which means that for two for part a for a our answer is one a cubed is this matrix, 01120, 2 ,0 ,0 ,0 ,0 ,0 ,0 ,0, 1, 0 ,1.
03:36
So for part b, if we look at the top right element, see that there are zero paths of length, 3 between a and e, and we'll go down...