So far the best explanation I've seen of this algorithm on UA-cam as most people leave out the fact that you need to store the best parent node of how you got to the node, then follow the parents backwards from the end to the beginning to actually find the path you wanted. Good work.
I have posted a second example of Dijkstra's algorithm, using modified notation that is slightly less cumbersome. : ) It is called "Dijkstra's Algorithm: Another example."
Excellent explanation! What was lacking in the previous videos I checked from different sources is the final explanation of how to backtrack the road from point a to g! Great!
Thanks, such a great explanation. Wish if youtube brings this video as a first result when searching for Dijkstra-Algorithm because it concludes everything.
Best one, if wants an algorithm for this and make a quick code solving it. I just create my C++ implementation using this and works well. Was easy to implement because you described it the way computer thinks. Thanks.
Thank you so much for posting such a great, easy to follow, and very clear interpretation of Dikra's Algorithm! This was very useful in studying for tests!
omg so helpful!!! I have been looking for this kind of teaching video for few hours and this one is the most helpful one!! clear and really really helpful!! thank you!
Excellent method and notations. However, does this method have a limitation? By this method I can know that there exist multiple shortest paths in some examples but I can determine just one of them by backtracking from destination. I am able to find their length too but just one path is resulted. Am I missing something?
The algorithm finds the shortest (minimum weight) path, but it does not find multiple paths. As you go along, you may find places where alternate paths also of minimum length are indicated, but you are right that only one path results from the algorithm as it stands.
OK my friend iam mohamed atallah and iam 29 years old from Egypt i see your two examples but i can`t understand how you finally reach from node to other node?
+133major The algorithm must be repeated to find minimum paths from a different starting point. Once through the algorithm only works for a specified starting point. As for how to get from specified start to specified end, watch the very end of the video about how to compute the path and the length....
Hello. Sir, why do you do not have "e" at vertices column? You have vertices as follows: a,b,c,d,f in vertices column, but you do not have "e" there. Why it is so?
While I understand the explanation, what would the algorithm do, would it be iterative or recursive, when would it decide it is done, sorry I am starting back into understanding data structures, if this question seems trifle.
It's all good, but your algorithm doesn't know when you've found the least cost for all nodes. The algorithm should only stop after having looked at each vertex and thus verifying that it truly is the lowest cost possible. (and for detection of edges with negative costs)
Very good video, one of the best I have seen on this topic, but it would be helpful if you use a color that is more contrast to black ( instead of blue) because on some screens ( combined with bad eyes ) blue looks like black :)
It may sound like a stupid question, but shouln´t b/b be = 0, Just like a/a? (1:53) If anyone know the answer, could you please give a brief explanation. All the best.
The table we build shows distances to the various vertices starting from vertex a. The left-hand column is not indicating where paths start, but through which vertices the path from vertex a progresses. Of course the shortest distance from b to b is zero, but the table is not going to give us that. If we want distances beginning with vertex b, we would have to make a new table. : )
I didn't take ACG.....I took ACFG, which is the best (as you say). Look at the last entry in the last row....The length from A to G that is shortest has weight 9, and the vertex it hits right before G is F.....
I like how you went straight to an example. Another video talked about Dijkstra's Algorithm. Not much to talk about though. I liked your video better. Learn by doing as they say.
That's not what the Dijkstra Algorithm was built for. You would have to use a different algorithm to answer your question....It also would depend on where you started from. Your question is not specific enough....
The last two rows we could have added (including vertices g and e in the left-hand column) would not change anything in the "f" row, so we decided not to write them in. It would just be a waste of ink, as we already have all the answers we need.
I guess I'm not sure what you're worried about....That last row in the video shows the completion for every destination, starting at point "a"....What is missing? If we wrote the row twice more, we would have three copies of the same row at the end. This seems like a waste of ink to me and unnecessary.
yes this is one of the best explaining video on UA-cam ..other videos just messed me up
Yah you are correct
So far the best explanation I've seen of this algorithm on UA-cam as most people leave out the fact that you need to store the best parent node of how you got to the node, then follow the parents backwards from the end to the beginning to actually find the path you wanted. Good work.
The best explanation I have seen so far. Much better than many other lengthen and cumbersome tutorials.
I have posted a second example of Dijkstra's algorithm, using modified notation that is slightly less cumbersome. : ) It is called "Dijkstra's Algorithm: Another example."
barngrader
This is absolutely the best example I've come across. Thank you!
Excellent explanation! What was lacking in the previous videos I checked from different sources is the final explanation of how to backtrack the road from point a to g! Great!
3:19 Thank you for showing that if you find a longer path, you keep the old number instead.
Really there has no doubt on that it is the best explanation on the Dijkstra's Algorithm. Thanks
Thanks, such a great explanation.
Wish if youtube brings this video as a first result when searching for Dijkstra-Algorithm because it concludes everything.
I watched a lot of videos to understand this algo. I found this one to be the most clear and concise. Very nice. Please post more!
You are a wonderful human being. I thank you enormously for this. Stay well!
Very well done. Explained clearly. Thank you! :D
This is the best explanation I found after a lot of searching.
Best one, if wants an algorithm for this and make a quick code solving
it. I just create my C++ implementation using this and works well. Was
easy to implement because you described it the way computer thinks.
Thanks.
The best explanation I could find. Thank you
Thank you so much! This example is great. I was wondering what to do if the path isn't continuous.
I've seen many Dijkstra's algorithm tutorials on youtube and this is by far the best in my opinion :) thanks!
Thanks for the pick me up, nothing I was looking at was outlining this as well as your example did.
thanks a lot sir you explained in such an easy way i was not able to understand it in my class thanks a lot sir you made my day
Thank you so much for posting such a great, easy to follow, and very clear interpretation of Dikra's Algorithm! This was very useful in studying for tests!
Thank you for this. Has completely de-mystified the whole algorithm for me.
This is a much better way to explain this in comparison to my Comp Sci classes way.. Thanks!
CanadianRepublican shut up
omg so helpful!!! I have been looking for this kind of teaching video for few hours and this one is the most helpful one!! clear and really really helpful!! thank you!
Finally a smooth explanation. Why every other video as to look so messy?
Finally someone who showed how to find the shortest path!
Best explanation on UA-cam!
barngrader Thank you! THANK YOU!! Nice pace and very clear.
very well explained sir... thank you.... helps for last minute preparations.. best one
Thanks Man, i think this is the best explanation ive come across so far. Great job !
Good job man! Really nice video. Beautiful explanation of Dijkstra!
this was the simplest explanation one can hope for. thanx :-)
Just helped me get another 5 marks in my final exams. Cheers bro!
bro where are e and g gone
thank you for the clear explanation! did my homework using your examples and they're a bigger help compared to the book! ^^
Clear explanation and nice voice.
Thanks a lot!!!
Short,clear,concise!!!
The best explanation for dijkstra's!
Nice tutorial just plain simple and easy to understand!
God bless you Sir and this is the best and most helpful for this algorithm thank you very much for the help
This explanation was amazing! So clear and easy.
Excellent method and notations.
However, does this method have a limitation? By this method I can know that there exist multiple shortest paths in some examples but I can determine just one of them by backtracking from destination. I am able to find their length too but just one path is resulted. Am I missing something?
The algorithm finds the shortest (minimum weight) path, but it does not find multiple paths. As you go along, you may find places where alternate paths also of minimum length are indicated, but you are right that only one path results from the algorithm as it stands.
@@barngrader exactly what I was thinking. Thanks!
How are you weighting them? Are the weight numbers arbitrary or is there a method to determine the weight of said numbers?
Your video was too good, i learned a lot, Thanks for ur efforts!
my man thanks for this
insanely good explnation skills
Excellent and clear explanation. Thank you!
Precise and clear. Very helpful video. Thanks sir!
how to creat an animation like that ? what app did you used ?
So useful.Thank you very much! In a very simple way explained.
its fantastic way of explanation
best explanation on youtube. thanks!
this is SOOOO clear; thanks very much!
sorry , i can`t understand last step that you explaining how to reach from a to other nodes
***** Try watching my other video about the same algorithm. If that doesn't help, post here again and maybe I can try to explain....
OK my friend iam mohamed atallah and iam 29 years old from Egypt
i see your two examples but i can`t understand how you finally reach from node to other node?
+133major
The algorithm must be repeated to find minimum paths from a different starting point. Once through the algorithm only works for a specified starting point. As for how to get from specified start to specified end, watch the very end of the video about how to compute the path and the length....
wow...so nice way to explain....Thanks...
Hello.
Sir, why do you do not have "e" at vertices column?
You have vertices as follows: a,b,c,d,f in vertices column, but you do not have "e" there.
Why it is so?
While I understand the explanation, what would the algorithm do, would it be iterative or recursive, when would it decide it is done, sorry I am starting back into understanding data structures, if this question seems trifle.
This explanation is great!
All i can say is thank you very much❤
It's all good, but your algorithm doesn't know when you've found the least cost for all nodes. The algorithm should only stop after having looked at each vertex and thus verifying that it truly is the lowest cost possible. (and for detection of edges with negative costs)
Thank you so much... awesomely explained...cheers
thank you for this explanation it clear and easy !
Very good video, one of the best I have seen on this topic, but it would be helpful if you use a color that is more contrast to black ( instead of blue) because on some screens ( combined with bad eyes ) blue looks like black :)
thank u so much, wonderful method for shortest path
Such a great explanation thank you very much sir!
That was awesome. Great work and thanks a ton...............
Legend
This helped me through. thank you alot buddy! :)
This is a great video, thank you. I'd say it's much better than the other ones. =)
It may sound like a stupid question, but shouln´t b/b be = 0, Just like a/a? (1:53) If anyone know the answer, could you please give a brief explanation.
All the best.
The table we build shows distances to the various vertices starting from vertex a. The left-hand column is not indicating where paths start, but through which vertices the path from vertex a progresses. Of course the shortest distance from b to b is zero, but the table is not going to give us that. If we want distances beginning with vertex b, we would have to make a new table. : )
The best way to reach to G is ACFG. Why did you take ACG ?
I didn't take ACG.....I took ACFG, which is the best (as you say). Look at the last entry in the last row....The length from A to G that is shortest has weight 9, and the vertex it hits right before G is F.....
Your voice has an ASMR effect
I have question for graph theory Can you help me ?
I can try....What is your question?
Excellent work Thank you
3R ima li nas?
I appreciate the work!
this is gold!! thank you so much!
Thanks a lots, it was really useful explanation
Wow thank you so much! This was very helpful to me!!!
I like how you went straight to an example. Another video talked about Dijkstra's Algorithm. Not much to talk about though. I liked your video better. Learn by doing as they say.
Amazing Explanation!
Thx dude. It helped me a lot.
Thank you Matthew McConaughey
Great video, perfect solution
Thank you. It was really usefull :)
deveras, estou louco com este vídeo !
ahah xD
Great explanation!
excellent video
Thank you so much! I think I finally get it
guys can anyone tell me what's the usage of this alghoritm ,how it helps to code everyday programms and sites
its used in the Open Shortest Path First (OSPF) routing protocol
That's the best .. Thanks alot
What if I want to travel to A but going through all other points only once
That's not what the Dijkstra Algorithm was built for. You would have to use a different algorithm to answer your question....It also would depend on where you started from. Your question is not specific enough....
Prims algorithm
barngrader and i think tat one travelling salesman algo
awesome !!!! clear concept !! thank u
Sorry you are right well my question was actually out of context. I was searching for an algorithm to solve a TSP.
best explanation on youtube ty :*
can u give us the code ?
+Moh Ameera
What do you mean by "the code?" I have explained the algorithm; there is no "code"....
im just asking if u have a java code for it ?
... code is problemspecific
Thank u sooooooooooooooooooooooo much, Crystal clear.....
Thanks alot for this usefull video!
Nice and clear, thanks.
Too good...Thank you so much :)
very good explanation!!
Is there a reason why he stopped at f, he should have gone all the way to e right?
The last two rows we could have added (including vertices g and e in the left-hand column) would not change anything in the "f" row, so we decided not to write them in. It would just be a waste of ink, as we already have all the answers we need.
Right, but as a part of a algorithm the checking should have taken place right?
I guess I'm not sure what you're worried about....That last row in the video shows the completion for every destination, starting at point "a"....What is missing? If we wrote the row twice more, we would have three copies of the same row at the end. This seems like a waste of ink to me and unnecessary.
you could assign the value of g from d as 5+1 = 6 but you chose 12. why?
Very helpful! Thanks!