Despite the fact that everybody wants to prove that they are so smart, the video is REALLY helpful. I have a final exam tomorrow and the text book didnt explain this well. YOU SAVED MY ASS
Very helpful. I "thought" I understood the algorithm, but when the time came to implement this in a project, I found I did not. This helped the logic of my code flow much better. Thank you!
Actually this algorithm works a bit differently. After we are done with A, we should have jumped to B rather than to C in 2nd step and then seen the shortest path. The reason is that in this algo, we are supposed to jump in an order of shortest path from a given node. So after 1st iteration, shortest from A is B and not C. The reason behind this is that there may be a shorter path to C via B, which you can see in this video is there. Still Thank you Profbbrown. This video was of great help.
The comments regarding the fact that you chose the wrong route to C are correct. Regardless, this is still the best explanation of Dijkstra's algorithm I've seen on the internet.
You have done this incorrectly. From A you should have gone to B first. The algorithm states that you use the smallest path from the 'current node'. From B to C is 6 as opposed to A to C which was 9.
Dijkstra should produce the shortest path to all vertices from A in this case. So how come C is having A9 when it can have a shorter path with B6 ? I think it is not correct to go to C after doing A. You need to do B since it has the minimum weight from A. Is this correct?
@maheekz I was going to post the same thing - you're correct. The algorithm clearly states that the next "current node" should be the one with the smallest distance from the current one.
It might have been because they were looking for the shortest path (not necessarily the lowest cost) and from A you only need to go through one point while from B you would have to go through two.
it is correct, you start with a node and see what directions you can go and take the smallest one and keep looking for better paths - watch?v=8Ls1RqHCOPw
There might be some errors but the video is very clear and helps explain the concept very well. Thanks
BangaloreGuy2010 1 week ago
yes it is very very helpful but it doesn`t mean they are wrong. that error may confuse someone
smlzgr12 2 months ago
Despite the fact that everybody wants to prove that they are so smart, the video is REALLY helpful. I have a final exam tomorrow and the text book didnt explain this well. YOU SAVED MY ASS
helibbc 2 months ago
Thanks for the upload it's very usefull and clear!
0rdon 2 months ago
Very helpful. I "thought" I understood the algorithm, but when the time came to implement this in a project, I found I did not. This helped the logic of my code flow much better. Thank you!
PlunderGames 2 months ago
Actually this algorithm works a bit differently. After we are done with A, we should have jumped to B rather than to C in 2nd step and then seen the shortest path. The reason is that in this algo, we are supposed to jump in an order of shortest path from a given node. So after 1st iteration, shortest from A is B and not C. The reason behind this is that there may be a shorter path to C via B, which you can see in this video is there. Still Thank you Profbbrown. This video was of great help.
008him 3 months ago
Comment removed
008him 3 months ago
You're all right about the errors in this video. I'll have to post a corrected one!
profbbrown 3 months ago 6
Why C not be B6, short than A9?
hle610 3 months ago
is there any tutorial for bellman ford algorithm in the same manner it was very good
zxcvbnm2641294 3 months ago
where is the fucking modification lowest cost of all vertices ??
nikhiljain103 3 months ago
anyway.. leaving the small mistake out.. its been a helpful video explaining the Dijkstra's algorithm, thanks
Potar4y 4 months ago
Despite the mistake, this explanation is very very clear! Thank you! So people, always choose the neighbour with the lowest cost to continue!
koensieben622 4 months ago
The comments regarding the fact that you chose the wrong route to C are correct. Regardless, this is still the best explanation of Dijkstra's algorithm I've seen on the internet.
TheHganavak 4 months ago
I love your vibrant voice. You must be a sexy professor.
ballark 8 months ago
thanks, very useful :)
Matizor 8 months ago
You have done this incorrectly. From A you should have gone to B first. The algorithm states that you use the smallest path from the 'current node'. From B to C is 6 as opposed to A to C which was 9.
masterchief9064 8 months ago 10
really good explanation it will help me for my algorithms exam
dark4o90 9 months ago
Dijkstra should produce the shortest path to all vertices from A in this case. So how come C is having A9 when it can have a shorter path with B6 ? I think it is not correct to go to C after doing A. You need to do B since it has the minimum weight from A. Is this correct?
maheekz 9 months ago 21
@maheekz I was going to post the same thing - you're correct. The algorithm clearly states that the next "current node" should be the one with the smallest distance from the current one.
Source: wikipedia
dbraun86 8 months ago
@maheekz
you are right
EGYgood 8 months ago 2
@maheekz : yes u are right, cost from a to b is 2, cost from a to g is 4 and cost from a to c is 9.
so the vertex b is to be chosen, and not c nor g.
kapilbhandari3012 7 months ago
@maheekz
It might have been because they were looking for the shortest path (not necessarily the lowest cost) and from A you only need to go through one point while from B you would have to go through two.
At least I think that's what he was going for. :P
gv2416 4 months ago
@maheekz i got your point. i was also confused the first time. i think you are right
scawfield07 4 months ago
it is correct, you start with a node and see what directions you can go and take the smallest one and keep looking for better paths - watch?v=8Ls1RqHCOPw
ShallowHeartNB 1 month ago
a very good explanation! thank you
djay08091986 9 months ago
love it!
fabiusIII 9 months ago
very nicely explained
caplunga 9 months ago
Cheers that was a fantastic explanation :). That has really helped me to understand it better
willclegg1 9 months ago