• 1 day ago
Transcript
00:00Now let's talk about Graph's very interesting applications. Graph has such a data structure, which is not only in interviews,
00:06coding tests, but actually in real life has a lot of implementation.
00:10The first and most common implementation of graphs is in the form of maps. In the map you will have
00:16seen a Google map, the map on Uber, the map on Ola, which are our cab booking systems. They are
00:23using all of the graphs internally. So the map is a short path called short path. What does Google do?
00:31It shows you the shortest path from one place to the destination. It shows you the shortest path from one
00:37place to the other.
00:40So, the shortest path algorithm is also in the graph. With this, the time is calculated. The cost is calculated
00:49by one place to another. So, the applications are also used in the graph. Let's say, one is Delhi airport,
01:00one is Bangalore airport, one is Hyderabad airport,
01:05I can go directly to Chennai and then go to Hyderabad. I can go to Bangalore and then go to
01:11Hyderabad. The weight of this edge is 1 and 2.
01:20Here is 3 and here is 4. How much distance will go here? 3 plus 4 is equal to 7.
01:27If I go through this path, this will be equal to 1 plus 2. This path will be small. My
01:33aircraft or airplane will be less fuel. The cost will be less. In this way, the shortest path is real
01:40-life applications and real-life systems. We use graphs. The second common implementation of graphs is social network.
01:49Social Networks, we use Snapchat, Instagram, LinkedIn, Facebook, Twitter, Quora. There are many networks where we can connect with each
01:58other, make a profile, make a community. So, these networks, we can use Graphs. Here, every single person will become
02:09a vertex. And there will be a connection between two friends. This will be formed in the form of an...
02:16So, this is why many social networking sites are used to implement the connection that is formed between profiles. So,
02:24billions of people's profiles are created on social media. Your mutual friends are given to you on different platforms. Your
02:33friends like posts or recommendations. All the implementations can be created in a graph. Next implementation is the delivery network.
02:42Delivery network, you will see that Amazon has a big truck and in this truck there are a lot of
02:50resources stored in this truck. What do you want to do with a delivery guy? They have to stop stops
02:55and deliver a different way. They want to go down the truck and deliver every place to the original place.
03:04So they follow a cyclic route.
03:10That is going to be finished. So let's say I got from A point. Here is my warehouse. I got
03:16a truck from my warehouse. I want to deliver it to B point. I want to deliver it to C
03:20point. I want to deliver it to D point. And then I want to travel back.
03:30In this way, the problem is the shortest cyclic route. In a cycle, we travel to the original point and
03:39visit all the nodes. What do we do? The truck will go to each node and deliver it to each
03:46node. And we will travel to the original point.
03:48So Amazon Flipkart delivery trucks, how do they decide which shortest path to which they can go back? We use
03:56the shortest cyclic route or similar graph algorithms to which data can also be implemented in the graph. Plus one
04:04more practical example is the school van. What do you have to do with the school bus? When you leave
04:10school, you drop them from one place, and you drop them from one place.
04:16to drop the children here, to drop the children again, to drop the children again, to drop the children back
04:20to school. So, how can we reach the minimum cost of all the points? How can we reach the minimum
04:26cost of all the points? How can we reach the minimum cost of all the less routes? Or how can
04:30we reach the less fuel consumption? So, let's visualize the situation in the form of a graph.
04:37The fourth practical case is the physics and chemistry of molecules. If we come from PCM's background, we will see
04:45that different molecules form different molecules. For research purposes, scientifically the applications develop these molecules, when we visualize these molecules
04:55in the form of a graph.
04:59We visualize a molecule in a graph, where my atoms become nodes and the connection between them, which is a
05:08bond, we visualize in the form of an edge. Next common application is our routing algorithms.
05:15If I talk about Internet, what is Internet? Internet is a connection of networks. What happens everywhere? Data packets are
05:22traveling everywhere. If you can see my video on the Internet, Internet is a network. What happened in this network?
05:31Data packets, which was stored in the video, were routers through your house and after your systems. In this way,
05:42the routers are routers.
05:43How do we transmit data packets from one place to another? We use routing algorithms for that. As soon as
05:52we transfer data packets, we use routing algorithms for the minimum cost. And we use these algorithms to visualize and
06:00implement them.
06:02Next practical example is machine learning. In machine learning, deep learning is a type of machine learning in which we
06:08do advanced algorithms. What is it? We visualize neurons in our network. In deep learning, we form a neural network
06:17and that neural network is in the graph. In machine learning, we have to do many calculations. Usually, if we
06:26use a graph in our algorithm, then we...
06:31optimizations can be very fast calculations due to our processing time. In machine learning, we use computational graphs in machine
06:40learning.
06:43Besides, there is another application called Dependency Graph. There are some real-life situations. If you have to use VS
06:52Code on your system, which we code in Java, you should have to install the VS Code. You should have
06:56to install Windows. There will be a empty system in which you have no operating system inside.
07:03You will not install software in that way. First of all, you will install an operating system in a laptop.
07:09First of all, you will install Windows and then you will install VS Code. And then what do we do?
07:13Then we will install a plug-in or an extension of VS Code.
07:20We will install it in this way. It becomes a dependency. You will depend on one or the other. So,
07:26there is a dependency to implement an extension. It should be VS Code to install it. It should be VS
07:30Code to install it. It should be Windows. So, there are such situations. Usually, if you have A software, then
07:37I can install B software and then I can install C. And if you have B and C, then I
07:42can install D software. So, first, I need to install A, then I need to install B and then C.
07:49Then I will do D. So the situation in these situations, we represent them using dependency graphs. Dependency graphs are
07:56very important. There are many situations where our servers are also in their dependency form. Or the software that we
08:04install, they also have dependency form. So for dependency graphs, we use graph data structure. There is another application for
08:14computer vision. In computer vision, there are many branches in computer vision.
08:18There is a particular case of image segmentation. Image segmentation means that we have a picture in which we have
08:25different
08:27to identify the objects. How will we identify the objects? To segment the objects in an image. This will be
08:34a different object. In this object there are also sub-objects. This umbrella will be a different object. The clothes
08:43have detected it as a single object. The human has detected it as a different object. The hair has detected
08:49it as a different object. The hair has detected it as a different object.
08:56AIML field is used in which we use graphs. Besides, flood-fill algorithm is also a very good use case.
09:06Flood-fill algorithm is also
09:09We use graphs to implement it. Flood fill means that I will give a photo of a flood fill. In
09:14this photo, I will identify where there is a dark place and I will color it. I will identify that
09:20the dark place is in the face and I will color it slowly and slowly and slowly and slowly. So
09:27the whole face will be filled with color.
09:32This is also a use case of graphs. This is also a use case of graphs. Also, there are graph
09:39types of databases. We have heard that in school and in college there are SQL databases. There are no SQL
09:45databases. There are also a graph database. The information is stored in graph. There are many examples. One of them
09:57is nebula.
09:59We also call Neo4G and there are many graph data structures that exist. We can visualize our data in the
10:07vortices and edges in this way. These databases usually work in fraud detection or recommendation engine for your social media.
10:20Besides, graphs are very heavily implemented in research.
10:27The research is related to psychology and biology in which we have to map the human brain into the software.
10:35What are neurons inside the human brain? What are neurons inside the human brain? What are neurons inside the human
10:39brain? Neurons are basically nodes inside our brain, which are actually inside our brain, which form one neuron to the
10:46other neurons. So the connection is stronger, the memory will be stronger, the reflexes will be stronger. So neurons work
10:55in this way.
10:56So, to map neurons, we create a graph-type data structure inside our computer, and then use the graph for
11:03research purposes. Besides, there are many applications that are not in real life, just in computer science, not in our
11:11psychology, biology, or machine learning. There are many different fields in which we have to work with tech-related, then
11:19the real-life situation
11:21we can visualize it in the graph. So, it's a very good practical application for Graphs.