In the previous video, we discussed the privacy.
All parts of the occupancy grid may be a bit of a stretch and instead opted for identifying the regions
that are actually calling for the robot to make a change in this direction.
Now, once we know what points are the points of interest, how do we store this information?
One very useful method of storing information and the connection between those information is cross.
Now graph formula are data structures that is used to represent connection between pairs of elements.
For example, the social network like Facebook can easily be represented using jobs.
Now graph primarily are divided into two components.
Starting with the first component that is the nodes, which is any entity like a person, object or
belief.
Then we have the edges, which represents the connection between these nodes.
Now if you look right here, we have a simple graph that has four nodes A, B, C and D, and as you
can see, it does have a connection with B.
And see what it does not have a connection with.
Dee Dee does have a connection with it.
So this is how of a simple graph is it presented here?
Now let us discuss the different types of graph, starting with the first type that is known as the
directed graph or directed graph.
Here, the edges show connection in a specific order.
For example, if we have Instagram followers when they follow you, it is their connection to you and
you haven't followed them back.
The next step is known as the undirected, where the connection between nodes is mutual.
By example, when you accept a friendship request on Facebook that friendship is mutual and not one
sided.
Hopefully now this can be represented by simply drawing a line between adjacent nodes or two opposite
arrows between edges and nodes.
Both representations are correct.
Speaking of representation, how do we represent a group?
There are two ways to represent a graph, starting with the first that is known as the ID just since
The Matrix.
Now this is a sequential representation as the nodes and the connection are represented by an end cross
and matrix.
So for example, if you look right here, we have an undirected graph, A, B, C, D, here is A has
connection with B, C and D, and this can be represented in and just in time matrix by simply writing
a one against each adjacent nodes for A, B, C, D, and because D does not have a connection.
Connection with DH.
So you can see we have a zero.
For B, for B against D.
And if you look at the second type of representation we have, that is the adjacency list.
This representation is a linked representation because it uses a link list to represent the connection
between nodes.
For example, if we look at the same example that we were studying earlier of an unattractive girl,
he had the connection of beer with B, c, d can be represented as follows in next is b.
B next is C and C.
Next is D.
So this is how a list keeps track of all the neighbor nodes of each particular node.
Now the question arises how do we represent graph for our kids?
Now we will be using adjacency list.
Primarily because of the reason we have a sparse crowd, meaning we have less points of interest to
store.
So adjacency list would be ideal, and it only stores the adjacent neighbors of each particular node
that's causing less overall spatial cost.
The second most important reason is that it just senseless provides a false iteration over all the neighbor
nodes of each particular note.
This property would be particularly useful in pathfinding if we are looking to find an efficient solution.
So this is the reason we'll be using adjacency list reputation for our graphs.