Тёмный

Ford-Fulkerson in 5 minutes 

Michael Sambol
Подписаться 126 тыс.
Просмотров 929 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 414   
@ceedob
@ceedob 8 лет назад
This 5 min video made more sense than 2 weeks of university lectures
@n4thanfv
@n4thanfv 8 лет назад
+Chris Dobson in my case it made sense, whereas the two hour class I had about the subject, didn't.
@joshua50101
@joshua50101 8 лет назад
There's sth called "redoublement". That's French. Don't be decieved. it's not that the two weeks of university lectures didn't have any effect on you. Think this through dude. :)
@WeMakeSuperLuckyFace
@WeMakeSuperLuckyFace 7 лет назад
^ That explanation is so goddamn true!
@WeMakeSuperLuckyFace
@WeMakeSuperLuckyFace 7 лет назад
The teachers know the material very well, but they don't understand it, so they don't teach their students to understand it, the class just throw students in a meatgrinder that tests them on whether they "know" it.
@takieddine1341
@takieddine1341 7 лет назад
yep indeed xD
@conflate1990
@conflate1990 5 лет назад
Tried doing this by hand and then watched this video. I have no words to describe how much work you saved me
@georgekarras56
@georgekarras56 8 лет назад
Found it really helpful to watch your video-algorithm examples for my operations research exam . Thanks for uploading it
@jialiliang3606
@jialiliang3606 2 года назад
dude, your videos are gold!
@n1nj4sp4rt4n
@n1nj4sp4rt4n 4 года назад
u saved me in uni dude ty so much
@dragoshtoader6062
@dragoshtoader6062 3 года назад
Congratulations for the clear example !
@SequinBrain
@SequinBrain 3 года назад
You did more than the textbook, which didn't mention enough to even as much as know what was going on at all. Thx!
@focusedstudent7233
@focusedstudent7233 Год назад
great video sir. found it to be very helpful
@孙栋梁-f3d
@孙栋梁-f3d 6 лет назад
A very intuitive explanation, thank you
@shadmansakib9831
@shadmansakib9831 2 года назад
Very good for someone just before exam.
@vali.dragon
@vali.dragon 7 лет назад
Amazing explanation. Subscribed, thank you!
@ABMHosneeMobashir
@ABMHosneeMobashir 7 лет назад
keep up the good work mate :) Michael Sambol
@nathanx.675
@nathanx.675 5 лет назад
3 lectures, 4 and a half hours of material, covered in 5 minutes, and in a better way. Sometimes I wonder how did my professors get the job...
@souptikpanja3735
@souptikpanja3735 3 года назад
Michael you out did yourself brother
@megh354
@megh354 7 лет назад
Awesome! Helped me out a lot!
@nimamaleki1595
@nimamaleki1595 8 лет назад
Dear Michael, I really took advantage of this video. Can you please tell me how to determine the min cut in the final graph?
@trevorg5938
@trevorg5938 7 лет назад
Wow this was excellent
@MrCopyCopy
@MrCopyCopy 7 лет назад
FINALLY I understood this! Thanks a lot!
@haosmark
@haosmark 8 лет назад
Why biggest problem here is, why are we subtracting flow for backwards edges? Why does it work?
@yuanzhibao7078
@yuanzhibao7078 8 лет назад
+Denis St cuz sometimes we need to go back..that's the capacity of going back of this edge.
@utoobwa
@utoobwa 7 лет назад
When you go back let's say from D to A , you are just telling the node A to reduce the flow by 4 units and send it via a different network, to B in this case.
@kikokimo2
@kikokimo2 6 лет назад
Can we go backwards just on edges that already reached full cap? I mean like 8/8 or 4/4 or 6/6 egdes? Or any edges can take us back, we just have to substract, and the number we're sending is already available on the edge: I mean for example if I have an edge which has 5/12 and I want to go backwards on this edge with 3 units. Can I do that, and I just write the new capacity of 2/12 or as long as it's not a 12/12 edge, I cannot go back? Thx in advance!!
@tmatchusquela
@tmatchusquela 8 лет назад
I did not understand why that path (A- D) could be used three times, and it was full in the first time !
@utoobwa
@utoobwa 7 лет назад
It is important to not fall into any mental calculations (or confusion) until you are done with the complete algorithm. Yes he chose A to D thrice but if you see the final effect, A receives 10 units passes 6 to D and 4 to B. When you go back from D to A, its as if you are saying to A that you need to reduce 4 units and send them somewhere else.
@SujeetKumar-cd4cc
@SujeetKumar-cd4cc 6 лет назад
How you can apply this backward flow in real life problem if we consider flow of water from motor to tank ??
@zhengrui315
@zhengrui315 4 года назад
What about undirected graph, I think the max flow should be 20 in that case
@Mercio2
@Mercio2 8 лет назад
Thank you!
@jeffmao2008
@jeffmao2008 6 лет назад
best music video 2017
@axelalatorre621
@axelalatorre621 8 лет назад
i just done it! i didn´t take into account the backward edge step and i got 19 in three iterations (1: S-C-D-T= 9.....2: S,A,B,T=9+4=13.....3: S,A,D,B,T=13+6=19) is it still ok ?
@MichaelSambol
@MichaelSambol 8 лет назад
+Axel Alatorre Yep, that's fine! There is more than one way. I just wanted to show a backwards edge.
@guobaorou
@guobaorou 7 лет назад
thanks!
@jupfnova
@jupfnova 8 лет назад
I'm trying to catch up with the current semester in businessengineering and your video helped me get through ~ 50 pages of lecture in no time. Big thanks from Germany
@allanjoseph3164
@allanjoseph3164 Год назад
whats is business engineering? Isn't that just business?
@jonikasemi
@jonikasemi Год назад
Thats the name for industrial engineering in German@@allanjoseph3164
@me-it9jn
@me-it9jn 10 месяцев назад
50 pages on ford fulkerson is crazy
@dn9981
@dn9981 9 месяцев назад
​@@allanjoseph3164Not sure, but based on context it probably has to do with logistics technology.
@PorkBoy69
@PorkBoy69 7 месяцев назад
@@allanjoseph3164 Engineering lite for people who can't do engineering but have too much pride to just study BA
@ucheiam
@ucheiam 6 лет назад
As well as his rules about equillibrium and making sure to update the flow by the value of the bottleneck. Remember these two hard and fast rules. 1. You can only go Forward (in the correct direction of a path) if the path has FLOW TO ADD e.g 8/10 still has 2 more to add so you can use it but 4/4 is capped. 2. You can only go Backward (in the opposite direction of a path) if the path has FLOW TO GIVE e.g 6/8 has 6 to give but you can't go backwards on 0/4 because it has 0 flow to subtract.
@dingdongskie
@dingdongskie 4 года назад
if it has 4/4 can i go back to make it 0/4? or how about 2/4 to make it 0/4?
@jurajmarincic8715
@jurajmarincic8715 4 года назад
@@dingdongskie sure you can but only if the arrow goes the opposite way from where you need to go
@zacisrael4380
@zacisrael4380 4 года назад
Thank you
@EpochIsEpic
@EpochIsEpic 3 года назад
Godsend, thank you
@okko7788
@okko7788 22 дня назад
That's what he meant by "non full" forward path and "non empty" backward path but yeah
@abenstirling
@abenstirling 3 месяца назад
The single reason why I am graduating college!
@WeMakeSuperLuckyFace
@WeMakeSuperLuckyFace 7 лет назад
Wow, finally someone who actually understands how to meaningfully communicate ideas to other people (what's that word called... "teaching"? But I thought that's what my university was supposed to do? hmmm........)
@lolmonkyboi
@lolmonkyboi 8 лет назад
my god you are amazing please please make more videos your clarity is beyond words
@MichaelSambol
@MichaelSambol 8 лет назад
+Lindel L Working on some now. Thanks for the support!
@lolmonkyboi
@lolmonkyboi 8 лет назад
+Michael Sambol :))))) keep up the work man! this definietly gona help me pass an exam tommorow lol
@professor-ricardo-ifsuldeminas
He have implemented the Naive Greedy Algorithm Approach (May not produce optimal or correct result) and not the Ford-Fulkerson algorithm. See the details on the link: www.geeksforgeeks.org/max-flow-problem-introduction/. The Ford-Fulkerson algorithm uses the residual graph concept, see more details on the link: www.geeksforgeeks.org/ford-fulkerson-algorithm-for-maximum-flow-problem/.
@DC-dn2di
@DC-dn2di 3 года назад
I literally watched a million lectures and spent so much time trying to understand this residual graph thing, and you just explained it in 5 minutes. Thank you, you are doing the Lord's work
@manishpatki258
@manishpatki258 8 лет назад
i watched almost 10 videos of this algorithm, but only your one made me understand everything. Especially of the backward edge. Nice !
@Zucr_
@Zucr_ 2 года назад
step by step proceeds to modify half the edges at the same time.
@aahpandasrun
@aahpandasrun 3 года назад
The Ford Focus algorithm
@vincenguyen5793
@vincenguyen5793 4 года назад
The 227 dislikes are from profs that fail to explain how this works
@dariayakimovich7069
@dariayakimovich7069 8 лет назад
This was really useful, thank you. An example of the minimum cut edge would be ideal too though
@freefirelover618
@freefirelover618 3 месяца назад
Hlo
@freefirelover618
@freefirelover618 3 месяца назад
Hlo
@freefirelover618
@freefirelover618 3 месяца назад
Hlo
@freefirelover618
@freefirelover618 3 месяца назад
Hlo
@freefirelover618
@freefirelover618 3 месяца назад
Hlo
@rykerdaniels3117
@rykerdaniels3117 8 лет назад
this is beyond amazing it took my professor an hour to discuss this thank you
@MichaelSambol
@MichaelSambol 8 лет назад
+Erio Touwa Glad you enjoyed. Please share with your classmates, thanks!
@n4thanfv
@n4thanfv 8 лет назад
+Erio Touwa I bet you didn't understand as well as you did after watching the video :D
@zTomatez
@zTomatez 8 лет назад
+Pink Freud Estudante do CSGO, e quem diria, estudante de Grafos também hahaha Muito bom o seu canal Pink!
@karthikeyanvasukibalasubra5777
Please illustrate minimum-cut version of the same problem. It would be helpful
@lefterissofras
@lefterissofras 5 лет назад
its absolutely the same problem in reverse
@japjotsingh8210
@japjotsingh8210 5 лет назад
@@aristosgeorgiou6060 19, min cut = max flow
@mbv22311
@mbv22311 4 года назад
was literally thinking the same thing
@mbv22311
@mbv22311 4 года назад
@@lefterissofras not really
@larsmagnusjohnsen6106
@larsmagnusjohnsen6106 4 года назад
i think the minal cut in this case is to cut between S-A and C-D = 10+9=19
@irms7645
@irms7645 10 месяцев назад
i lost it at the backward edges
@zomnipotential
@zomnipotential 8 лет назад
I just did it using, SCDT (9) SCDBT (1) SABT (4) SADT(1) SADBT (5), with a sum of 20 which is the maximum possible. Is it wrong? Could someone please answer my question ASAP?
@patmtc477
@patmtc477 5 лет назад
i lost it when you reversed an edge with a 8/8 at 3:15...l couldnt follow anymore..but thanks!!!
@junovicz
@junovicz 3 года назад
same, gotta keep rewatching it until it's understood, since this is explained better here, compared to other sources.
@aishwaryasinghal6374
@aishwaryasinghal6374 8 лет назад
Amazing clarity. Question : Is there any criteria for finding augmentation path or is it random?
@GucciJohanne
@GucciJohanne 4 года назад
it is random. The only difference between going in a certain sequence rather than another sequence is it may take more iterations for some (the while loop doesn't care). But this algorithm always gets the MAX FLOW, which is what we need. The reason it never 'gets stuck' is with the use of backwards edges which allows you to essentially 'backtrack' when the edges get clogged up.
@DujiBuji
@DujiBuji 2 года назад
@@GucciJohanne It actually only works if all capacities are rational. If there are any irrational capacities, it might never terminate.
@ttimt96
@ttimt96 6 лет назад
This 5 min video made more sense than 14 weeks of university lectures.
@Warwipf
@Warwipf 5 лет назад
You had Ford Fulkerson for 14 weeks? We discussed this in like what... 30 minutes? + residual networks and the actual algorithm are missing here. Good video for what it's set out to do, no doubt, but 14 weeks..? lol
@arramad
@arramad 8 лет назад
I can see why you could choose a path that includes D->A even though the edge actually is A->D (2:36), but my question is: Could we also use use B->C in the path? How about the edge from D to walmart? or to my house? we still can do that too, right?
@huthayfa1723
@huthayfa1723 5 лет назад
I got the total capacity with 20 , with the following paths : S -> A -> D -> T = 8 S -> C -> D -> T = 2 S -> C -> D -> B -> T = 6 S -> A -> B -> T = 2 S -> C -> D -> A -> B -> T = 2 Total = 20 , with 7 saturated edges .
@l4rs047
@l4rs047 7 лет назад
Thanks for the great video. I still think this thing with the backward edge push is kinda strange. So I can push 1000 if the flow against is at least 992 (because 8 capacity?)
@zongzheli1283
@zongzheli1283 4 года назад
Omg this saved my life! Just kidding, I may still fail tomorrow 😅
@mehdibadaoui1658
@mehdibadaoui1658 4 года назад
so did you fail
@rolayounis6788
@rolayounis6788 4 года назад
DEAD!
@Shashi0012
@Shashi0012 4 года назад
We need UPDATE!
@zongzheli1283
@zongzheli1283 4 года назад
It was my first semester in master program. The course was CS6363 Design and Analysis of Algorithms. I probably failed and wouldn’t want to check my final grade. Really bad. I def will work hard next semester.
@joelarsen806
@joelarsen806 6 лет назад
This video is amazing! Recommendation: Edmonds-Karp Algorithm
@mattsprogramming7655
@mattsprogramming7655 5 лет назад
Bro, in 5 minutes I understand it, now let's pray that I pass my final.
@kontounterhaltung6893
@kontounterhaltung6893 3 года назад
And?
@chenyi-d5j
@chenyi-d5j Год назад
really learnt a lot! thank you so much!
@melaniebaumann6713
@melaniebaumann6713 5 лет назад
thank you so much. This explenation is pretty awesome and I finally understood that algorithm:)
@artnevka779
@artnevka779 2 года назад
wow that was the clearest ff algorithm explain i've ever seen
@JoshMacDonald
@JoshMacDonald 8 лет назад
Great video! Are you going to do videos about minimum cut and residual graph too?
@eggsscramblerzz4711
@eggsscramblerzz4711 6 лет назад
that would be great
@professor-ricardo-ifsuldeminas
You have implemented the Naive Greedy Algorithm Approach (May not produce optimal or correct result) and not the Ford-Fulkerson algorithm. See the details on the link: www.geeksforgeeks.org/max-flow-problem-introduction/. The Ford-Fulkerson algorithm uses the residual graph concept, see more details on the link: www.geeksforgeeks.org/ford-fulkerson-algorithm-for-maximum-flow-problem/.
@thechosenone7465
@thechosenone7465 11 месяцев назад
why can't use AC as a forward edge like AD?
@juliancontreras7533
@juliancontreras7533 11 месяцев назад
Because there is no flow going trough that edge
@laxmankishore5783
@laxmankishore5783 2 года назад
If we go through path S->A->D->B->T we can include more capacity right? as we have a bottle neck of 1 at this path which is making the max capacity to 20?? Can someone clarify my query Thanks in advance
@JustAweebsCD
@JustAweebsCD Год назад
I was going to check the sources for this video to mention them in my homework, only to find out you studied at TUe as well xdxd, I dont know why but I found that extremely funny. How small the world is
@ribashkarki126
@ribashkarki126 3 года назад
We can take augment path SABT,SADT,SCDT,SCDBT instead of going backward @3:04 which is confusing.
@miu869
@miu869 2 года назад
You just saved my life
@poseidonbroger1956
@poseidonbroger1956 3 года назад
The backward edge concept is hard to get. I don't understand what it is trying to do. I guess it helps even the flow in all edges. And the implementation is on another level of difficulty 😖. Then again i am a newbie.
@absence9443
@absence9443 2 года назад
for people looking at it and having a bipartite graph where an edge is either 0/1, you don't need to calculate bottlenecks, you just repeatedly trace a possible path.
@HassaanQ
@HassaanQ 2 года назад
Why did you not choose this path? (s-c-a-d-b-t) You could send a flow of 1 and maximize the flow to 20 overall?
@Kushal145
@Kushal145 2 года назад
Great explanation thanks
@sofianell2557
@sofianell2557 3 года назад
Please i really dont understand, why do you choose SADT first instead of SABT who seems the better ?? Anyone ?
@yuanzhibao7078
@yuanzhibao7078 8 лет назад
thank you so much!!! still a little confuse about when this algorithm stops. which edges should be decided to be considered that no backward value and full of capacity?
@tsp8855
@tsp8855 2 года назад
what about path S-C-A-D-B-T? the edges on this path still seem to have some capacity left?
@yosef6589
@yosef6589 2 года назад
legit life saver. if the sumery of the course would be as good as this video was legit would have get the easiest 100 of my life. ty so much
@omkarkale4876
@omkarkale4876 4 года назад
Fucking legendary
@alialibrahim8842
@alialibrahim8842 8 лет назад
Hey I have a problem about two phase network algrothim min flowI want you to show me how can I solve this a problem
@low_mans_lyric
@low_mans_lyric Год назад
Nice video. Thank you! Had been taught with using the residual graph and moving arrows. The idea of just using forward edges that are full or backward edges that are empty is so much easier to understand.
@epicmoffe
@epicmoffe 5 лет назад
Your videos are really good for introducing the concepts used in algorithms! Watching this together with videos from e.g. Abdul Bari is what is getting me through this AlgDat-course.
@comeberza
@comeberza 3 года назад
yes yes sure for all of you this made more sense than lectures. Have you tried trying to understand it on a deeper level following those lectures?
@agnesakne4409
@agnesakne4409 7 лет назад
Why is the algorithm terminated in minute 4:17, when the Path S-C-A-D-B-T is not saturated?
@adrijachakraborty2316
@adrijachakraborty2316 6 лет назад
C->A needs to be non-empty since it is a backward edge (in graph, A->C is the direction) to reach T. But it is empty. So the bottleneck being 1 (from S->C), we cannot decrease the flow in A->C from 0 to -1. That's why.
@kenshamir2113
@kenshamir2113 4 года назад
Note that if A to D was 2/8 then this would have been the bottleneck instead of A to B
@juicyclaws
@juicyclaws 8 лет назад
This is how teaching is done right. Not often you come across it. :)
@VHenrik007
@VHenrik007 2 года назад
Omg this is so good, it makes so much more sense now.
@벤터-b8y
@벤터-b8y 3 года назад
thx from korea
@saibarcafi
@saibarcafi 6 лет назад
I got a small question - if one somehow chooses the smallest paths throughout the entire iterations list, could it still count as Ford-Fulkerson, or that's automatically an Edmonds-Karp implementation? I assume not, since arbitrarily should also cover the shortest paths. Thanks.
@bangyanshi9713
@bangyanshi9713 2 года назад
goat!
@ByzCSGO
@ByzCSGO 5 лет назад
Thank you so much, you are awesome, I understand everything my prof couldn't explain in half a semester.
@Nick-qi3pv
@Nick-qi3pv 2 года назад
Just sitting here confused as to why you can't increase flow from (s,c) to 10/10, create a backwards edge from (c,a) and feed it 1/2, which effectively makes the output from (a,d) 7/8, outputting from (d,b) 6/6, which gives (b,t) 10/10 and a total maximum flow value of 20. Am I wrong?
@MichaelSambol
@MichaelSambol 2 года назад
You need to take away from backward edges. It's empty from C -> A (0/2), so there is nothing to take away.
@alanliang9538
@alanliang9538 2 года назад
thanks, the backward flow was confusing without a diagram
@costascosti3935
@costascosti3935 8 лет назад
you just explained simply in 5 mins what my lecturer couldn't in 50 mins
@qusaysoleman2366
@qusaysoleman2366 2 года назад
great , how did you get the total value (19) ?? thanks
@balajig7011
@balajig7011 7 лет назад
perfectly understood thanks a lot man......:-)
@vaclavriss2034
@vaclavriss2034 5 месяцев назад
Thank you very much, video is so short and easy to understand, so I just cannot believe it!! Guten Tag aus Reichenberg.
@MichaelSambol
@MichaelSambol 5 месяцев назад
Gern geschehen!
@akram4223
@akram4223 4 месяца назад
Been trying two days to get a maw flow of 20....😅😅
@tzu-minghuang7100
@tzu-minghuang7100 8 лет назад
this is an important algorithm where many other people explain it may go into detail and thus confused me. I looked for, like, 6~7 video explaining this algorithm, you are the best.
@MichaelSambol
@MichaelSambol 8 лет назад
+Huang Eric Thanks for watching.
@coordinator3039
@coordinator3039 6 месяцев назад
This helps when you elaborate on a reading
@ΣτέφανοςΒκς
@ΣτέφανοςΒκς Год назад
Thank you my friend, it was very good video :)
@Lyftic
@Lyftic 6 лет назад
Just a quesiton. Can't you use 1 flow capacity on this path? S-C C_A A-D D-B B-T?
@climb_this_world
@climb_this_world 3 месяца назад
苦労してここにたどり着いた世界中の同志89万人に挨拶します😂
@4cylinder481
@4cylinder481 4 года назад
its very useful for me thanks for your clear explanation
@orbitmarketing-usa
@orbitmarketing-usa 3 года назад
Michael is a beast
@kbhargavi4400
@kbhargavi4400 3 года назад
Awesome frnd!😀 Tq ! Really helpful
@ASealofApproval
@ASealofApproval 8 лет назад
Extremely clear overview of the algorithm. Have you considered making a separate video for the corresponding proof of correctness?
@prateekm6011
@prateekm6011 7 лет назад
Great video! Thanks!
@rulaan_xxvii
@rulaan_xxvii 2 месяца назад
Thank you for these videos, I'm currently studying for algorithms & data structures exam and you are very clear in explaining how these algorithms work!
@azeemhaniffa5205
@azeemhaniffa5205 Год назад
why is the bottleneck capacity 8 sir
@hcsquad7357
@hcsquad7357 Год назад
?
Далее
Analyzing algorithms in 6 minutes - Intro
6:29
Просмотров 9 тыс.
Max Flow Ford Fulkerson | Network Flow | Graph Theory
13:25
КОТЯТА В ОПАСНОСТИ?#cat
00:36
Просмотров 1,2 млн
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18
🦊🎀
00:16
Просмотров 235 тыс.
AVL trees in 5 minutes - Deletions
5:20
Просмотров 35 тыс.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Big-O notation in 5 minutes
5:13
Просмотров 1,1 млн
Bellman-Ford in 5 minutes - Step by step example
5:10
Maximum flow Minimum Cut Algorithm
14:02
Просмотров 40 тыс.