When we want to reach some goal, we need to carry out some activities, right? Initially some may think that a set of different activities need to be done one after another. That may be true if you are the only person doing those activities. But if you think a bit more and especially if you have people to delegate work to, you will find that you can get a few activities to be done in parallel.
But then you also would realize that some activities can ONLY be done if some important activity earlier is completed. For example; in construction I cannot make the plinth of a building BEFORE the foundations were ready.
Hence a network diagram is used to capture how these activities are done one after another or in parallel, and which activity is dependent on which previous one, etc. It also would show how much time is allotted for each activity to be done
In that diagram, there would be one sequence of activity which weaves what is called a critical path That means the activities on that path has consumed their entire allotted time and even if any of the activity stretches out in time, it would delay the entire project.
Therefore a calculation of a critical path in a network of activities is extremely useful and is always done when managing projects.
This was inspired by this Youtube video that explains the algorithm we used:
https://www.youtube.com/watch?v=4oDLMs11Exs