00:01
Hello student, the graph is given to us in this graph there are five nodes a, b, c, d, e.
00:06
So here i have taken the value for the edges w1, w2, w3, w4, w5.
00:13
These are taken, these are assumed.
00:15
So because i have to create the adjacency matrix and the adjacency list that's why i assume their weights.
00:21
And now i have to write the adjacency matrix for this given graph.
00:27
As we know very well there are five nodes.
00:29
These are a, b, c, d and e.
00:31
So here i write the five nodes a, b, c, d, e and here also on the vertical side and on the horizontal side.
00:39
Now as in the given graph there is no connectivity between a, a, b, a, a, b, b, c, c, d, d, e, e.
00:47
That's why i put zero here for a, a, for b, b, for c, c, for d, d, for e, e.
00:53
And now from a to b there is an edge that is w1.
01:00
So this is the w1 between a and b.
01:03
So ab having the weight w1 that's why in the adjacency matrix i write w1 here.
01:10
And in the similar way from a to c there is an edge which is w2.
01:15
That's why i write here w2.
01:17
So here is the graph and in the graph from a to c this is w2.
01:24
That's why i write the w2 here.
01:26
And now a is connected to only b and c and for a is not connected to d and e that's why i put here zero.
01:34
Now come to the node number b.
01:36
The node number b connected to a by the w1 because this is the undirected graph that's why abba is the same value.
01:44
So ba value will be here w1 for b, b to zero and for b to c there is a path b to c there is an edge which is w3.
01:55
That's why i put the value w3 here and after that b is not connected to d, b is not connected to e.
02:02
In the similar way for the c, c from a to c there is a path w2 from c to a there is also the path w2.
02:10
From b to c there is a path w3 there is an edge w3.
02:14
So for c to b w3 because of undirected graph and from c to c zero from c to d...