Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Prim's algorithm

Loading...

Sign in or sign up now!
29,310
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 16, 2007

An example of using Prim's algorithm on a matrix.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (bodil)

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

see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • 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...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more