Bellman-Ford in 4 minutes — Theory

preview_player
Показать описание
The theory behind the Bellman-Ford algorithm and how it differs from Dijkstra's algorithm.

Рекомендации по теме
Комментарии
Автор

Its so hard to find concise but useful videos like this. Extremely useful for last minute revision.

DrTryloByte
Автор

got an exam on algorithms in two days. Your channel has helped me out a bunch throughout the semester, thank you!

owenmajor
Автор

It's basically a dp, you iterate v-1 times, first time 1 length edge, second time 2 length edge path, until v-1 length edge path, this is the most important part. You should mention this

yangmyfly
Автор

Please keep making videos, they're excellent.

ryancross
Автор

Thumbs up for showing difference between Dijkstra and Bellman-Ford in case of negative edge! :D

DeepanshuThakuriamgsak
Автор

At ~1:22, you say using Dijkstra would make it so no more updates could be done on the path to A. But if you ignore the input constraint saying no edge has a negative weight and you apply Dijkstra's anyways, it would actually work in this example.
Distance to A is 3 after updating from S. When we start checking the edges of B, we check its edge to A and see it is -2. Distance S -> B = 4. And 4+(-2)=2, which is less than the distance S -> A = 3. So now the shortest distance to A is correctly labeled as 2.

skateboarddude
Автор

Better explained than what I can pick up from a class! Nice explanation on why we need a max of V-1 iterations

danielyang
Автор

You are very articulate and the videos are well prepared.

UmairAkhtar
Автор

1:34 if we Dijkstra normaly, wouldn't we get the same result as Bellman-Ford? ? I mean you can't just close it after only 1 iteration bc Dijkstra visit all vertices, not stop when just only reach vertex A.

walterclementsjr.
Автор

Great videos :D. One correction @2:38. A Simple path is a path that has no repeating vertices (this condition includes no repeating edges as well). The statement that all paths are simple still stands.

thesvodnik
Автор

03:06
"This may be a little confusing, so lets look at the pseudo code."

* even more confused *
😂😂😂😂😂😂😂😂😂😂😂

professorpoke
Автор

Your videos are lifesavers !! Thanks a lot !

SuperNash
Автор

Simply Excellent. I am gonna nail my exam tomorrow.

withyuva
Автор

In 1:35, don't we get the same result if we use bellman? A is still 2 after v-1 iteration. What is the difference?

QmdVJKrCjUk
Автор

How subjects should be taught!! <7min video explaining a topic well enough

Leon-pnrb
Автор

SWEET!
Short and the most efficient 4 minutes of my life :P

rizwansworld
Автор

your explanations are really good and precise! and also your examples video are awesome!! Thank you, you made my finals much easier! :)

MrsConito
Автор

You've helped me pass many exams.

mary__jane
Автор

Thank you, this and your other video really helped me a lot!

mathiasbertorelli
Автор

great video! wonderful explanation! thank you so much.

yuanzhibao