This has been project created as a Programming project submission for CSE -5311- 001 Design and analysis of algorithm. From the given project choices, I have chosen to implement and compare Minimum Spanning Trees Algorithm. This is a GUI python-based application that allows a user to perform create a Minimum Spanning Tree using either prims or Kruskal algorithm.
- Python(3.7)
- PyCharm Community
- Tkinter python framework for GUI
- Calculate a minimum spanning tree using Prim’s algorithm for a text file selected by the user.
- Calculate a minimum spanning tree using Kruskal’s algorithm for a text file selected by the user.
- Assists the user in comparing and deciding between Prim’s algorithm and Kruskal’s algorithm depending upon the number of vertices and edges.
- A GUI driven program .
- DataStructures.py: This file contains the classes and methods used to implement the data structures used in both the algorithms.
- PrimsAlgo.py: This python file contains the implementation of prims algorithm.
- KruskalAlgo.py: This python file contains the implementation of Kruskal algorithm.
- View.py: This python file uses all the above files and links it with view or GUI components of the program.
- Run.py: This python file is used to run the project.
- dataSet1.text : First data set.
- dataSet2.text : Second data set.
- random.py : Generate random graph data.
- Extract the files in a folder, make sure everything is the same directory.
- Install Python on your computer (ver 3.x) is needed.
- You can use any python IDE or command line to run “Run.py” file .
- You need to create a dataset file , you can follow the instructions below to create one.
- Create a new text file , you can name it anything you like.
- Every line in your text file is an edge.
- The format of each line should be – StartVertex,EndVertex,Weight
- No need to enter any number of edges or vertices.
- Make sure there is no mistakes in the file. You can use random.py file to create a random list of values and the format it according to the requirement.