How Do You Calculate a Minimum Spanning Tree?

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

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

  • @mahmoudalsayed1138
    @mahmoudalsayed1138 Год назад +38

    Channel name checks out, I have never imagined I would say that in RUclips.
    Really great explanation.

  • @emilyhayes3155
    @emilyhayes3155 22 дня назад +5

    this video might save me from failing my math final tomorrow. I hope every day brings you joy king

  • @aliyuumargumel7869
    @aliyuumargumel7869 10 месяцев назад +2

    Wow! Using real life example is the best teaching strategy.
    Thank you very much.

  • @johetajava
    @johetajava Год назад +28

    You are a very good teacher, thank you for the video!

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

    The best explanation I have ever seen. Thank you!

  • @ultragamer969
    @ultragamer969 Год назад +23

    this is like when the main protagonist says the name of the movie

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

      Greatest 4th wall break

    • @redbigapplefloppa302
      @redbigapplefloppa302 3 месяца назад +2

      My favorite part of the video is where he says "It's minimal spanning time" and spans all over the place.

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

    OMG the explanation is sooooo clear!

  • @ghostfjdgcsusvsgsj
    @ghostfjdgcsusvsgsj Год назад +4

    Thank you Brian!

  • @antonstarostin4876
    @antonstarostin4876 3 года назад +7

    Great explanation video! Thank you!

  • @UnyimeUdoh-ny3lp
    @UnyimeUdoh-ny3lp 11 месяцев назад +1

    This explanation is just too cool 😎😎😎😎

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

    fire vid keep posting, spanning tree!

  • @qwarlockz8017
    @qwarlockz8017 3 года назад +38

    This sounds so much like a variation of Dijkstra... am I wrong?

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

      yes, you are wrong.

    • @qwarlockz8017
      @qwarlockz8017 3 года назад +100

      @@xiangli9588 thanks for the clarity and info packed response.

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

      @@qwarlockz8017 but prim's algorithm is very similar to dijkstra

    • @1dan1609
      @1dan1609 Год назад +23

      They are quite different. Kruskal's algorithm is used to find the minimum cost spanning tree, as depicted in the video, but Dijkstra is used in path finding from a given node in a graph, such that the result you get from dijkstra is the minimum distance and path required to reach all other nodes from a particular node.

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

      They are similar in that the greedy or locally optimum solution ends up yielding the globally optimum solution. They are also similar in that they add/follow the cheapest edge of all valid choices in each iteration.

  • @granrey
    @granrey Год назад +4

    I would like to see a variance of this video adding the removal of snow on each house and man power on each not being necesarily the same and comencing from a particular house.

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

      "Man power on each" is essentially the weight/number of people required
      I have no idea what you mean by "adding removing snow on each house" and "not being necesarily the same and comencing from a particular house"

    • @granrey
      @granrey 22 дня назад

      @@timothychinye6008 sorry, english is my second language but I meant to say adding the removal of snow at each place. Pretty much like an snow removal crew going to each location to remove snow. However, this message was a bit old. I was able to figure it out thanks to this video anyways.

  • @AX-sq5vm
    @AX-sq5vm Год назад +3

    tnx now i got the proof

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

    Greatest video ever

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

    Wouldn't a way to ensure maximum efficiency be first to check if any nodes only have one edge and if so connect those edges first thefore removing that edge from any future comparisons and lowering the number of connections needed to reach n-1 nodes once you start the algorithm?

    • @schoepp9966
      @schoepp9966 Год назад +10

      Not from an algorithmical standpoint. Since you'll need to account for those specific roads either way the only difference you introduce is when you account for them. And since you need to look them up separatly in your version you will need to look at all houses first to check if they have one connection. So you'll check houses which don't have only one connection in this step and then once again when you check them for the minimal weight path there.

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

    Thanks great video

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

    Excuse me broher, but I didn't get the cut property. If you take the 3-weight road and then the 6-weigth road, you will end up needing 19 volunteers rather than 18. But you mention that according to this property, you will end up still with a subset of a minimal spannin tree. Could you explain me further please?

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

      Look at minute 9:00 to 9:32

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

    Thanks!

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

    The more interesting example would be when some non-direct roads are optimal, instead of point-to-point connections.

  • @blacklight683
    @blacklight683 Год назад +10

    This guy is fr trying to convince me that 6

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

      Look at min 9:00 to 9:31

    • @timothychinye6008
      @timothychinye6008 22 дня назад

      It isn't. You're going for the smallest number route possible.
      If the road with a 6 existed, in order for the bottom left vertex to get to the top right vertex, they'd have to go +5, then +6.
      However, if you go the optimal way, you can just do +1, then +3. 4 is less than 11.

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

    Wait, do the roads need to be cleared for people to travel to the blocked roads?

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

      Yes.
      They start clearing the road they can get to before getting to the others.

  • @hariharanramamurthy9946
    @hariharanramamurthy9946 2 года назад +1

    How to practice?

  • @user-sl6gn1ss8p
    @user-sl6gn1ss8p Год назад +7

    what if two edges have the same weight?

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

      You go with both! Unless one of them creates a loop, then you skip it. If one would create a loop if the other is chosen, either is fine
      A loop is a path that starts and ends from the same place, ie the path 4-2-1 in the diagram in the video

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p Год назад +6

      @@ferusskywalker9167 oh, makes sense, going with both is kind of the same as going with one and then the other, in no specific order, and if taking both makes a loop, than taking either has the same effect on the total connections. Thanks.

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

    1. Connect a house to the other.
    2. Take any two houses and connect them if one and only one has not connected.
    3. Repeat 2.

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

    Yoooo

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

    Got lost

  • @UnyimeUdoh-ny3lp
    @UnyimeUdoh-ny3lp 11 месяцев назад

    This explanation is just too cool 😎😎😎😎