How Do You Calculate a Minimum Spanning Tree?

A story based on Kruskal's Algorithm
***
This video is part of a project I worked on in graduate school for Professor Karen Brennan's beautiful course T550: Designing for Learning by Creating. Spanning Tree is now an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com/
Spanning Tree is created by Brian Yu. brianyu.me/
Email me at brian@spanningtree.me to suggest a future topic.

Пікірлер: 40

  • @mahmoudalsayed1138
    @mahmoudalsayed11385 ай бұрын

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

  • @johetajava
    @johetajava Жыл бұрын

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

  • @antonstarostin4876
    @antonstarostin48762 жыл бұрын

    Great explanation video! Thank you!

  • @aliyuumargumel7869
    @aliyuumargumel78693 ай бұрын

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

  • @tachikoman9462
    @tachikoman9462 Жыл бұрын

    OMG the explanation is sooooo clear!

  • @ghostfjdgcsusvsgsj
    @ghostfjdgcsusvsgsj Жыл бұрын

    Thank you Brian!

  • @aidendelgado14
    @aidendelgado1419 күн бұрын

    fire vid keep posting, spanning tree!

  • @UnyimeUdoh-ny3lp
    @UnyimeUdoh-ny3lp4 ай бұрын

    This explanation is just too cool 😎😎😎😎

  • @mkd0x
    @mkd0x3 жыл бұрын

    Thanks great video

  • @granrey
    @granrey Жыл бұрын

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

  • @ultragamer969
    @ultragamer969 Жыл бұрын

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

  • @ThislsYusuf

    @ThislsYusuf

    Жыл бұрын

    Greatest 4th wall break

  • @user-uy1sl4sk3f
    @user-uy1sl4sk3f3 ай бұрын

    Thanks!

  • @jamesgatzz
    @jamesgatzz2 ай бұрын

    Greatest video ever

  • @AX-sq5vm
    @AX-sq5vm Жыл бұрын

    tnx now i got the proof

  • @Randy14512
    @Randy14512 Жыл бұрын

    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

    Жыл бұрын

    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.

  • @Ant3_14

    @Ant3_14

    Жыл бұрын

    From conceptual perspective it's useful to reduce problem

  • @qwarlockz8017
    @qwarlockz80172 жыл бұрын

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

  • @xiangli9588

    @xiangli9588

    2 жыл бұрын

    yes, you are wrong.

  • @qwarlockz8017

    @qwarlockz8017

    2 жыл бұрын

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

  • @xiangli9588

    @xiangli9588

    2 жыл бұрын

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

  • @1dan1609

    @1dan1609

    Жыл бұрын

    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

    6 ай бұрын

    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.

  • @blacklight683
    @blacklight683 Жыл бұрын

    This guy is fr trying to convince me that 6

  • @Bardomp

    @Bardomp

    10 күн бұрын

    Look at min 9:00 to 9:31

  • @diegoortega2374
    @diegoortega23748 ай бұрын

    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

    10 күн бұрын

    Look at minute 9:00 to 9:32

  • @parheliaa
    @parheliaa10 ай бұрын

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

  • @hariharanramamurthy9946
    @hariharanramamurthy99462 жыл бұрын

    How to practice?

  • @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.

  • @user-sl6gn1ss8p
    @user-sl6gn1ss8p Жыл бұрын

    what if two edges have the same weight?

  • @ferusskywalker9167

    @ferusskywalker9167

    Жыл бұрын

    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

    Жыл бұрын

    @@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 Жыл бұрын

    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.

  • @novmoon5760
    @novmoon57602 жыл бұрын

    Got lost

  • @UnyimeUdoh-ny3lp
    @UnyimeUdoh-ny3lp4 ай бұрын

    This explanation is just too cool 😎😎😎😎