Skip to content

oripaso/Prim-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prim-Algorithm

A function that receives a graph and a weight function (list of edge nodes and weights for each edge) and returns a minimum spanning tree of that graph by running the PRIM algorithm. In the second part of the project, I wrote a function that accepts a minimum spanning tree, a newly added edge and its weight. The function updates the spanning tree with the addition of the new edge.

I ran the program with a graph with 20 nodes and 50 edges and weights. The program will find a minimal spanning tree and print it. I created a new edge and printed it - an edge which does not change the spanning tree. I found the updated spanning tree and printed it to the screen. I created an edge that will indeed change the spanning tree and printed it. I screen printed the updated spanning tree.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages