Transito Closetful Graffiti is a graffiti that seems out of artists, and if there is a bathroom anywhere,
because I do work in graffiti and there is an edge from work, I do what graffiti?
You have two attractive graphs, and these are the transitive clauses.
Now, in this crowd, we don't have any thrombolytics, one, two, three, so there is no astronautics,
one to three in this transitive closer.
Similarly, we don't have any Battenberg three to zero, so we don't have any extra or zero.
Now we have a patrol, but 021 x2, so we have an edge from what it takes to.
So whenever we have a bad.
In the graphy, however, agenda positive Grusin.
Now, let's see what is about metrics, but metrics of a graph having is this is the end by end boolean
metrics and the elements of this metrics can be defined like this.
An element is one.
If there is a bathroom X, I do X two and it is zero.
Otherwise that is it is zero.
If there is no bathroom breaks, I do X to.
Now, this is about the metrics of this static graph, we have a Battenberg 02 Burdick's one.
So this Endris one, similarly, we have a bathroom vortex vortex, too, so we have a one here, we
have a bathroom at 023.
So this entry is one that we don't have any bathroom or takes one to zero.
So this entry's zero.
Now, we don't have any pets going out from this vortex, so all these entries in this robot zero.
This is another graph, and this is it's spot matrix, all the entries in this part matrix are one,
which means that there is apart from any vertex of the graph to any other vertex of the graph.
Not bad metrics is also called reliability metrics, as it tells us that their work exists reachable
from other vertex or not.
And it is also called the Transito Matrix, as it is actually the DNC matrix of the transitive closer
of the graph.
Now, let's see what conclusions we can draw by looking at the path metrics.
If you have to find whether there is a bathroom overexcitable next year, we can look at the ADRO and
get them in the bath matrix.
If that element is one, it means that there is a bathroom or excitable texture.
And if it is zero, it means that there is no I do.
For example, in this graph, if we have to find whether there is a bathroom where three to one we look
at this element.
Now, this element is zero.
It means that there is no path from three to X one.
Now, if you have to find whether the graph is cyclical or not, you can look at the main Bagnell elements.
If any of the element in the main diagonal is one, it means that there is a cycle in the graph.
This graph does not contain a circle because all the main elements are zero.
And this graph is cyclic.
Now we can find whether the graph is strongly connected or not, we are looking at the path matrix.
If all the elements of the Matrix are one, it means that the graph is strongly connected, otherwise
it does not.
But this graph is strongly connected because all the entries in the bathmat jigsaw one.
Now we'll see two ways of computing the path of objects.
First is by powers of adjacency matrix and the second is by using washings algorithm.
Plus, we'll see how we can find the path matrix for the powers of adjacency matrix.
And in the next video, we learn about quotients algorithm.
Suppose we have a graphic and Waters's and Aiza adjacency matrix of that graph, you can put the mattresses
is quite AQ illustrative of for up to illustrate the power.
And this is what we get by.
Multiply it by itself.
You will get by multiplying a square by it and so on.
Now, after this, you add all these mattresses, you get the Matrix X.
In this Matrix X will replace all non zero entries by one, and you'll get both metrics.
Now, let's take an example and see this procedure.
This is a detective graph and this is its adjacency matrix.
Must we compute iskra by multiplying matrix it by itself?
So we get this matrix a next we matrix ague and matrix illustrative of it for.
In any metrics, it is to be the element it to the power represents a number of parts of land B because
I don't work, for example, in this matrix, this element is two.
It means that there are two parts of Lent to thrombotic zero two.
But because these are the two parts, this is one part from zero to work x2 of land to and this is the
another part of lenth to.
Now, this element is one, it means that that is one part of lent to no big zero two or three.
So we have this one part of land to convert to more extreme now in this matrix, this element is one.
It means that there is one part of land, three number zero two where it's two.
So we have this one part of land, three zero six two.
Now, in this matrix, it is powerful, all the elements of zero, it means that there are no parts
of badland for.
Now we can build this Matrix X by adding all the mattresses.
So this is the Matrix X.
And this Matrix X, any Element X denotes the number of plots of length in less than an X, I do X to.
Now, we know that in apartment six, an element is one, if there is a path forward to next year and
this Botkin have length and listening.
So in this matrix, if you replace all non-zero entries by one, we get the mathematics.
So this is the path matrix.
What?
This graph.
Let's take another example.
This is a detective draft and this is a distancing matrix, and these are the mattresses, Asakawa Akaba,
it is just about four.
By adding these mattresses, we get this Matrix X and by replacing all non-zero entries in this matrix
by Y, you get this mathematics.
Now, this graph is strongly connected, since all the elements in this part matter except one.
Now, let's see the program for finding the metrics we have seen the implementation of very good graph,
you can copy that code in a new way and adequate for finding path metrics.
So here we have the word structure where X list adjacency metrics, these variables and E and we have
these functions where we added this new function, name, find path metrics.
In Maine, we have created a drought that we've seen in the report and we have called this function
by but metrics here.
So now let's see the definition of this function.
This function will compute and display department breaks, we have declared these three two dimensional
areas that represent madrases of size Max Biomax.
This Eddie and this Eddie Eddie JP are initialized with elements of Eddie Eddie, which represents the
adjacency matrix.
Now, inside this fall, we find all the powers of adjacency matrix and add them to get the Matrix X,
this variable B here goes wrong to do.
And this is the code for multiplying two mattresses.
We are multiplying matrix ADP, that matrix added.
And we get the result in Matrix temp.
Now, in this new copy, Mavericks Attempt to Mavericks AJP.
And in this loop, we are adding elements of AJP to corresponding elements of ex.
Now, after this for Loop Stops, we display this Matrix X here.
And after that, in The Matrix, it replace all non-zero zero entries by one.
And so now Matrix X is the ultimate fix and we displayed here.
The definition of all of the functions you have seen in the implementation of graph.
So now let's run this program.
So this is the fourth matrix of the graph.