Prim's algorithm
Loading...
29,310
Uploader Comments (bodil)
see all
All Comments (20)
-
dick head#
-
@bodil yupp sure does Thank you!!! :D
-
@1258585 7 or in that case F is not in the tree so you can not make a connection EF becouse F is not in the tree, the smallest one that is connected to the tree is 12, so it's BE
-
The circled ones at the top, are ones that were added to the tree. After adding it cross it's row. So when you look at a row horizontally you need to chose the smallest value that is in the column of the circled ones...easy
-
@1258585 isn't 7 the smallest weight in row E?! how is it 12?
-
I dont understand this AT ALL! >(
-
@Johannady They were both already connected in, so that would have made a cycle.
Loading...
At the bottom where you have drawn the minimun spanning tree, Can you draw that in any way you want? This is the bit i am struggling with, When you get a question which says from the matrix use prims and draw the tree? does the tree have to draw in any specific way? Thanks!
lktutzi 3 months ago
@lktutzi You need to connect the new node to the node it came from, so basically connect it to the column letter when you cross it off. E.g. at 0:27 when you cross off D, it's because you've chosen weight 9 from column C. So draw D coming off C in the tree. Draw it as you go, not all at the end. Hope that makes sense :D
bodil 3 months ago