Max Flow Ford Fulkerson | Network Flow | Graph Theory

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 121

  • @sixtenmuller8823
    @sixtenmuller8823 Год назад +51

    Watching this in 2023 for my exam in Algorithm and Datastructures, love the explanation

    • @Iam_number_one
      @Iam_number_one 9 месяцев назад +1

      where do you study bro ?

    • @UndercoverDog
      @UndercoverDog 7 месяцев назад +1

      ​In so sure hes also German haha ​@@Iam_number_one

  • @ZantierTasa
    @ZantierTasa 3 года назад +39

    Good video, but there's a few things that could be improved.
    Residual edge is incorrectly defined at 6:00. At 4:20 he says you're probably wondering what a residual graph is, and then he proceeds to use the word residual before defining it!
    In Ford-Fulkerson, we assume each edge has an edge in the opposite direction. Where the capacity is only given in 1 direction, set the other direction's capacity to 0.
    Assign a flow of 0 to each edge, and then as the algorithm proceeds, the flow on each edge can be changed. But when you change the flow of an edge to x, you MUST assign -x to the flow in the opposite direction. This is NOT called a "residual". The residual exists in both directions.
    The residual (which means "quantity remaining") of an edge is what at 7:29 he calls "remaining capacity".
    It is simply the capacity of the edge minus the current flow. i.e. If the residual is > 0, there is still room for more flow. The residual graph is just the whole set of residual edges.
    The word saturate in general can mean "fill until no more can be held". In this case, a saturated edge has residual == 0.

    • @kaierliang
      @kaierliang 4 месяца назад +1

      thank you!

    • @marfa_rfa
      @marfa_rfa 2 месяца назад +1

      Thank you so much. I am struggling with this so much. Would you have a book or website that could explain this in a completely clear way. I still struggled with this video.

    • @ZantierTasa
      @ZantierTasa 2 месяца назад

      @@marfa_rfa I think the Wikipedia page on Ford-Fulkerson gives a pretty nice overview, although it does use some very mathsy notation. I'm sure there are other great resources out there, maybe lecture notes, but I don't know of any myself, sorry.

  • @sovathanaheng6673
    @sovathanaheng6673 5 лет назад +78

    You spent less time than my Prof to explain this and you nailed it. Awesome!

    • @yoavmor9002
      @yoavmor9002 Год назад +6

      My prof is so old and senile I swear to God he was out there helping Alan Turing crack the enigma back in the day

    • @kaiyueguo1624
      @kaiyueguo1624 6 месяцев назад +1

      @@yoavmor9002 lol

    • @gaurishgangwar
      @gaurishgangwar 4 месяца назад

      Sometimes it is also because at this point you already have some idea of algorithm and understand some of its key concepts, so when William teaches you this you have an easier time grasping it.

    • @zhongzhongclock
      @zhongzhongclock Месяц назад

      Oh! My god! I'm reading the famours book: "computational complexity", No matter how many times I've read the text about the "MAXIMUM FLOW" section, I couldn't understand it, until I found this video.
      Now I suspect those professors were trying to make the knowledge as difficult as possible in order to protect their power. Even I could fully understand this problem now, when I re-read the text about the "maximum flow" in this book, I still don't know what they are talking about.

  • @harshitshukla36
    @harshitshukla36 4 года назад +92

    My thoughts when I first saw this algorithm 4:17 - 4:23

    • @sagebaram5951
      @sagebaram5951 4 года назад +2

      Literally said it out-loud in zoom class last week ... accidentally.

    • @weaponkid1121
      @weaponkid1121 3 года назад +6

      @Archer Grayson lmao u really made two accounts for this

  • @siuhangchen8986
    @siuhangchen8986 2 года назад +11

    I would thank my professor explaining the algorithm so terriblely otherwise I won't find this awesome channel!

  • @famefurqan5937
    @famefurqan5937 5 лет назад +11

    I wonder why this video is not highlighted in the search results. This is a wonderful video with effective teaching. You have done a good job William. Please Keep it going for lot more people to benefit!

  • @hidayatkhan412
    @hidayatkhan412 5 лет назад +10

    This is the best algorithm channel on youtube, thank you for this video.

  • @ElisaTheCommie
    @ElisaTheCommie Год назад +3

    Only video that explains the concepts clearly without confusing the mess out of you🤣

  • @Uthalerebaba-nr4qi
    @Uthalerebaba-nr4qi 4 месяца назад +2

    Watching this in 2024 for my exam in Algorithms, love the explanation

  • @makii1715
    @makii1715 5 лет назад +8

    Best explanation!! I watched some videos but this one was really in detail, giving examples and again repeating what a risidual network acually is, how capacities work and the principle of augmenting paths. Thanks a bunch my assignment was even fun when I understood it thanks to you~

  • @salmanfariss
    @salmanfariss 3 года назад +24

    Amazing explanation and I love the animation as well! I think it is worth pointing out that the key observation that the sum of the bottlenecks (found in each augmenting path) equals the max flow is only true because we assumed the initial arc flow is 0 for each arc. If we do not assume this, then you need to add the initial value of the flow (of the graph) to the sum of bottlenecks as well.

  • @v0nnyboy
    @v0nnyboy 6 лет назад +35

    Amazing as always !! The impact these videos will have over time will be phenomenal ... Let my comment bear testimony to that prediction ...

  • @ericandrade3510
    @ericandrade3510 5 лет назад +17

    Love your network flow playlist, getting ready to watch it all again for the 2nd time. Great videos :D

  • @DzmitryKashlach
    @DzmitryKashlach Год назад

    Thanks William, your videos have already helped to get Tarjan's algorithm and this video is super clear, as well! ;-)

  • @yaelyacobovich397
    @yaelyacobovich397 9 месяцев назад

    Best series on youtube yet

  • @--..__
    @--..__ 3 года назад

    this is so clear. my professors explanation was over an hour & made no sense. and you didn't oversimplify either! cheers

  • @yuhao8430
    @yuhao8430 5 лет назад +9

    This is so awesome!! Thank you! How come people dislike it?? 18 university prof?

  • @rorywilliams7375
    @rorywilliams7375 2 года назад

    i have an exam in an hour , i just love u

  • @sumowll8903
    @sumowll8903 Год назад

    Really well done! Best video for Max flow i have seen so far!

  • @beibeixiong5660
    @beibeixiong5660 5 лет назад +1

    Your explanation is so clear! Also, I love the illustrations. Keep up the good work!

  • @tritruong9352
    @tritruong9352 Год назад

    Very nice explanation
    Very clear
    I love this so much

  • @tobiaslee6444
    @tobiaslee6444 3 месяца назад

    Thank you so much for this!

  • @adarshkishore6666
    @adarshkishore6666 2 года назад

    Great work on this! One of the clearest explanations I have seen

    • @adarshkishore6666
      @adarshkishore6666 2 года назад

      Can you make one video on Push-Relabel algorithm also?

  • @jenweatherwax7113
    @jenweatherwax7113 4 года назад +2

    I got totally lost around 4:47 when he starts talking about edges being saturated...? And what is a residual graph? And I don't remember depth first search... What if there are two bottlenecks in the graph?

    • @ZantierTasa
      @ZantierTasa 3 года назад +3

      Good video, but there's a few things that could be improved.
      Residual edge is incorrectly defined at 6:00. At 4:20 he says you're probably wondering what a residual graph is, and then he proceeds to use the word residual before defining it!
      In Ford-Fulkerson, we assume each edge has an edge in the opposite direction. Where the capacity is only given in 1 direction, set the other direction's capacity to 0.
      Assign a flow of 0 to each edge, and then as the algorithm proceeds, the flow on each edge can be changed. But when you change the flow of an edge to x, you MUST assign -x to the flow in the opposite direction. This is NOT called a "residual". The residual exists in both directions.
      The residual (which means "quantity remaining") of an edge is what at 7:29 he calls "remaining capacity".
      It is simply the capacity of the edge minus the current flow. i.e. If the residual is > 0, there is still room for more flow. The residual graph is just the whole set of residual edges.
      The word saturate in general can mean "fill until no more can be held". In this case, a saturated edge has residual == 0.

  • @robin6091
    @robin6091 4 года назад

    wached 3 videos before that didn't help me, I'm glad you did

  • @yungbando01
    @yungbando01 2 года назад

    Thanks William, that was the best video i have seen for Residual Graphs and Augmenting paths, and trust me i saw many. You managed to make me undestand what my professor's couldn't in 100 silides.

  • @jordanf3273
    @jordanf3273 6 лет назад +4

    Appreciate the videos! I'm in an operations research course and it's hard finding clips on some of these algorithms!

    • @kells9k
      @kells9k 2 года назад

      If Timotheus' pole has a network flow capacity of 8 units spunk along its edge, delta net, how much bottleneck maximum flow can Timotheus' hole take before it fissures?

  • @tttthomas
    @tttthomas 5 лет назад

    very good and clear video! I can now understand what is going on in the reverse operation!

  • @longflame4414
    @longflame4414 2 года назад

    This is beautiful, thank you so much!

  • @mere_illusion
    @mere_illusion 5 лет назад +53

    someone give this man a GOLD......wait this isn't reddit

  • @hymnish_you
    @hymnish_you 2 года назад

    Great Explanation

  • @xbz24
    @xbz24 Год назад

    love your stuff, now I need to rewatch it to sink it xd

  • @mukul3159
    @mukul3159 Год назад +2

    But what is a residual graph? You went straight to augmenting path.

  • @sharmaanuj334
    @sharmaanuj334 Год назад +1

    Residual edges is more like an undo
    In augmenting paths, we can only select the path whose remaining capacity is greater than zero

  • @stelioskossieris4530
    @stelioskossieris4530 3 года назад

    Thank you for your helpful explanation!!!

  • @0xJuIian
    @0xJuIian 2 года назад

    Great explanation!

  • @jaincoral25
    @jaincoral25 5 лет назад +4

    how did the 4th/last augmented path had bottleneck value - 6?

  • @gergeerew6811
    @gergeerew6811 4 года назад +3

    Maybe when people learn theses concepts by themselves rather than being forced by the college it will be easier for them to understand. Anyway this video is awesome. Brief and clear. Thank you so much.

  • @thomasip9938
    @thomasip9938 5 лет назад

    Awesome introduction, thanks!

  • @educationcurve8981
    @educationcurve8981 2 года назад

    teacher thanks. Muchas gracias con lo poco que entiendo ingles me ayudaste gracias profe.

  • @alimahmoud1441
    @alimahmoud1441 5 лет назад

    Awesome video man, life-saving. Very well explained

  • @ytec100
    @ytec100 5 лет назад

    Best explanation. Thanks!

  • @paretodeficiente9586
    @paretodeficiente9586 4 года назад +2

    I have a doubt: why we have to compute the augmenting path (s -> 0 -> 3 -> t), if the arrow goes from 3 to 0 (3 -> 0), and not from 0 to 3 (0 -> 3)? Thanks.

    • @ahlahous8128
      @ahlahous8128 4 года назад +2

      He said at ( 9:09 )that we can use the residual edge, we have created. So basically we used the residual edge 0->3

    • @paretodeficiente9586
      @paretodeficiente9586 4 года назад

      @@ahlahous8128 Thanks!

  • @bipinchowdary5251
    @bipinchowdary5251 3 года назад

    At 2:42, the max flow is 7. But I am not able to get any min-cut of value 7, the least I cab generate is 8. Can anyone find a mincut?

  • @peterulev5202
    @peterulev5202 5 лет назад

    Very useful. Makes good sense! :D

  • @man-kityau21
    @man-kityau21 4 года назад +1

    Is there a particular reason why the "maximum flow" calculated using the "sum of bottleneck values"? Instead of using the "sum of outflow from the source node"?
    I found the "sum of outflow from the source node" easier to interpret, that's all.

    • @Garentei
      @Garentei 4 года назад

      The bottleneck approach is more useful to understand min-cut. Looking at the capacities that are actually filled gives you more information on how to reconstruct the optimal answer than looking at the outflow from the source. Sometimes, designing network flows is also easier to come about if you think about it in terms of min-cut.

  • @boraaslan1890
    @boraaslan1890 Месяц назад

    damn now I understand it, my professor f.. failed to teach it at least to me

  • @UdayTejaOriginal
    @UdayTejaOriginal 4 года назад

    Could you explain how you came at 2/100 at 11:15 ?

  • @diskokaktus
    @diskokaktus 2 года назад

    great video! keep it up :D

  • @tjalferes
    @tjalferes 2 года назад

    Thank you.

  • @SG-kn2jl
    @SG-kn2jl 3 года назад

    Thanks mate appreciate it

  • @saulsalvadorhernandez9381
    @saulsalvadorhernandez9381 2 года назад

    thank you

  • @ShalokSharma-f2z
    @ShalokSharma-f2z 3 месяца назад

    does dfs really choose edges in random order

  • @osmankhalid2005
    @osmankhalid2005 4 года назад

    From what time the F-F algo actually starts on example?

  • @adventurer2395
    @adventurer2395 2 месяца назад

    10:48 Why random?

  • @aishwaryashrestha798
    @aishwaryashrestha798 3 года назад

    which tool do u use for animation ?

  • @ShakrinJahanMozumder
    @ShakrinJahanMozumder 11 месяцев назад

    Thanks!

  • @kells9k
    @kells9k 2 года назад

    great explanation. thanks for the video and quality explanation with the visualizations!

  • @milindprajapat7177
    @milindprajapat7177 2 года назад

    What about push relabel. Its not in the playlist!!

  • @anandiyer_iitm
    @anandiyer_iitm Год назад

    Not for someone who's trying to understand this for the first time. If one already knows, animations are nice.

  • @noelnakka1056
    @noelnakka1056 Год назад

    Can you please make videon busacker and gowen method for network flow

  • @lucianoinso
    @lucianoinso 5 лет назад +4

    You sound a bit like Ross Geller from time to time lol! Great material tho, much appreciated hah!

  • @arunkanjoor6542
    @arunkanjoor6542 4 года назад

    You are the guy from data structures crash course by freecodecamp right??

  • @narendraparmar1631
    @narendraparmar1631 5 лет назад

    thanks sir 😊

  • @boehan605
    @boehan605 Год назад

    was this video supposed to be revision or first time learning? bc if it was for learning it was terrible cant lie

    • @WilliamFiset-videos
      @WilliamFiset-videos  Год назад

      What is missing? Anything I can clarify?

    • @boehan605
      @boehan605 Год назад +2

      @@WilliamFiset-videos you skimmed past probably the most confusing part of all of this: residual flow

  • @ssshukla26
    @ssshukla26 5 лет назад

    Can you please teach the same thing to our professor who is teaching us the network flow. He is trying to explain the same thing to us from last 3 lectures and out of 250 not even 25 of us is able to understand the same.

  • @EL-KHABIR
    @EL-KHABIR 2 года назад

    Algorithme Ford-Fulkerson (Flot maximal) Méthode marquage
    ruclips.net/video/YnKXJAxUAu4/видео.html

  • @zitronensaft9110
    @zitronensaft9110 3 года назад

    if it weren't for youtube, i wouldn't be graduating college

  • @siminthesky
    @siminthesky 4 года назад

    we miss one or 2. checkout hieros gamos..

  • @gabrielpereiramendes3463
    @gabrielpereiramendes3463 4 года назад

    #Excelent!

  • @sourabhkandari80
    @sourabhkandari80 3 года назад +1

    8:08 😑😑

  • @cem9927
    @cem9927 8 месяцев назад +1

    poor explanation ! make an example and solve it instead of bla bla

  • @밑에시간누르면광고없
    @밑에시간누르면광고없 3 года назад

    13:25

  • @vijaykumarsah6255
    @vijaykumarsah6255 2 года назад

    He took an augmenting path and augmented all over the place

  • @Poutoksereiseimaigw
    @Poutoksereiseimaigw 4 года назад

    εσπασες μας

  • @ahmetnecipgorgulu4133
    @ahmetnecipgorgulu4133 5 лет назад

    I WANNA KISS THIS MAN HOLY FUCK THIS SAVED ME A LOT OF TIME

  • @reamabdulsalam524
    @reamabdulsalam524 23 дня назад

    Too fast !!!!I could not understand any word !!!! Your graph is very clear but too much detailed and confusing too much talking and poor explaining

  • @EmapMe
    @EmapMe 5 лет назад

    Why not just do the opposite of a shortest path algorithm? wouldn't that give the maximum flow?

  • @ll647
    @ll647 Месяц назад

    One simple example is asking too much, I suppose. Keep it simple and add complexity, not the inverse. Maybe next time.

  • @kroposman2302
    @kroposman2302 5 лет назад +3

    Great video, shitty algorithm

  • @Gabriel-yk4it
    @Gabriel-yk4it 2 года назад +2

    i dont understand shit

  • @Lalala_1701
    @Lalala_1701 2 месяца назад

    r u angel ?

  • @ljupcetrninkov4602
    @ljupcetrninkov4602 4 года назад +1

    i dont get it dude you explain too fast cant keep up disliked

  • @blade661
    @blade661 Год назад +2

    Useless explanation

  • @wirito
    @wirito 5 лет назад

    Hold on....isn’t this the guy from 3b1b?

  • @weaponkid1121
    @weaponkid1121 3 года назад +2

    makes no sense

  • @manjaribhavanasi9804
    @manjaribhavanasi9804 Месяц назад +1

    Worst Explanation

  • @Abhishek-fe3zs
    @Abhishek-fe3zs Месяц назад +1

    Terrible explanation

  • @ananyamenon8839
    @ananyamenon8839 2 года назад +12

    terrible explanation, not clear at all

    • @lucasmertens1625
      @lucasmertens1625 8 месяцев назад +3

      There is a lot good work in this video. At least give a hint on what is not clear to you. I think if you have your display and sound on, it is easy to follow and well explained

  • @jameskaiser7474
    @jameskaiser7474 2 года назад

    i now understand it less after watching, f***....

  • @saurabhvishwakarma4827
    @saurabhvishwakarma4827 3 года назад

    voice is copy of bill gates

  • @GANDHIXtv
    @GANDHIXtv Год назад

    Good try but wrong information in some parts.

  • @viralforeverr
    @viralforeverr Год назад

    thank you

  • @sybks
    @sybks 4 месяца назад

    11:34