Skip to content

This project developed along the discipline of "Algorithms and Data Structures" at UFMG uses an implementation of the Krushkal algorithm to calculate the Minimum Spanning Tree of a graph. The file "entrada.txt" must contain the nodes and edges of the graph as follows: - The first line must contain the number of nodes and the number of edges of t…

License

Notifications You must be signed in to change notification settings

nandercarmo/My-MinimumSpanningTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌲 My-MinimumSpanningTree


This project developed along the discipline of "Algorithms and Data Structures" at UFMG uses an implementation of the Krushkal Algorithm to calculate the Minimum Spanning Tree of a graph.

The file "input.txt" must contain the nodes and edges of the graph as follows:

  • The first line must contain the number of nodes and the number of edges of the graph

  • Subsequent lines must contain the two nodes followed by the weight of the edge between them

The "output.txt" file receives the optimized graph in the same format.


📦 Install

To test this library, just make a clone of this repo and build using the commands below:

$ git clone https://github.com/NanderSantos/My-MinimumSpanningTree.git

$ cd My-MinimumSpanningTree

$ make

Or use this magical one-liner command to make it easiest:

$ git clone https://github.com/NanderSantos/My-MinimumSpanningTree.git && cd My-MinimumSpanningTree && make

🏃 Run

To run the program just use the following command line below:

$ ./MyMinimumSpanningTree input.txt output.txt

To see the results of other graphs, just change the "input.txt" file


🗑️ Clear

To clear the project just use the following command line below:

$ make clean

About

This project developed along the discipline of "Algorithms and Data Structures" at UFMG uses an implementation of the Krushkal algorithm to calculate the Minimum Spanning Tree of a graph. The file "entrada.txt" must contain the nodes and edges of the graph as follows: - The first line must contain the number of nodes and the number of edges of t…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published