{"id":19664559,"url":"https://github.com/sancakerkan/mst_primsalgorithm","last_synced_at":"2026-05-15T10:08:18.495Z","repository":{"id":246832919,"uuid":"822305725","full_name":"sancakerkan/MST_PrimsAlgorithm","owner":"sancakerkan","description":"This project implements the solution to find the Minimum Spanning Tree (MST) of an undirected graph using Prim's algorithm. ","archived":false,"fork":false,"pushed_at":"2024-06-30T22:01:37.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T02:20:16.175Z","etag":null,"topics":["graphs","java","minimum-spanning-trees","mst","prims-algorithm","undirected-graphs"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sancakerkan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T21:39:41.000Z","updated_at":"2024-06-30T22:01:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f28ddbff-bcb7-4979-a3e9-c0ec4fa12a0a","html_url":"https://github.com/sancakerkan/MST_PrimsAlgorithm","commit_stats":null,"previous_names":["sancakerkan/mst_primsalgorithm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sancakerkan%2FMST_PrimsAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sancakerkan%2FMST_PrimsAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sancakerkan%2FMST_PrimsAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sancakerkan%2FMST_PrimsAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sancakerkan","download_url":"https://codeload.github.com/sancakerkan/MST_PrimsAlgorithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240974367,"owners_count":19887296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphs","java","minimum-spanning-trees","mst","prims-algorithm","undirected-graphs"],"created_at":"2024-11-11T16:18:06.348Z","updated_at":"2026-05-15T10:08:13.460Z","avatar_url":"https://github.com/sancakerkan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MST_PrimsAlgorithm\n\nThis project implements the solution to find the Minimum Spanning Tree (MST) of an undirected graph using Prim's algorithm. The graph consists of a source (0) and four load points (1, 2, 3, 4). The program reads the graph data from a text file, constructs the graph, and then finds the MST.\n\n## Project Structure\n\nThe project consists of three main Java classes and one text file:\n\n1. **HW3_Q1_solution.java**: The main program that solves the MST problem.\n2. **FileRead.java**: A class that reads graph data from a text file.\n3. **ValueFinder.java**: A class that converts values from the text file into integers and creates the undirected graph.\n4. **HW3_Q1.txt**: A text file containing the graph data.\n\n## How to Run\n\n1. **FileRead Class**:\n   - Reads the graph data from a text file.\n   - Stores the data in an adjacency list representation.\n\n2. **ValueFinder Class**:\n   - Converts string values to integers.\n   - Creates an adjacency matrix representation of the undirected graph.\n\n3. **HW3_Q1_solution Class**:\n   - Uses the `FileRead` class to read the graph data.\n   - Finds the Minimum Spanning Tree (MST) using Prim's algorithm.\n   - Prints the MST and its total weight.\n\n## Important Note\n- If the path contains 0, it should be written as `0 4 450` instead of `4 0 450`.\n- If the connection does not contain zero, the lowest number should be written in the path (e.g., `2 3 420` instead of `3 2 420`).\n\n## How to Compile and Run\n\n1. **Compile the Java files**:\n   ```sh\n   javac HW3_Q1_solution.java FileRead.java ValueFinder.java\n\n2. **Run the main program**:\n   ```sh\n   javac HW3_Q1_solution.java FileRead.java ValueFinder.java\n### Important : Make sure text file is readable\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/sancakerkan/MST_PrimsAlgorithm/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsancakerkan%2Fmst_primsalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsancakerkan%2Fmst_primsalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsancakerkan%2Fmst_primsalgorithm/lists"}