-
-
Notifications
You must be signed in to change notification settings - Fork 342
Stoer wagner min cut #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Stoer wagner min cut #273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a comprehensive implementation of the Stoer-Wagner minimum cut algorithm, along with substantial additions to graph algorithms, dynamic programming solutions, and machine learning implementations in R. The PR adds multiple new directories and files covering fundamental computer science algorithms and data structures.
Key Changes
- Implementation of 11+ graph algorithms including Stoer-Wagner min cut, Kruskal's MST, Prim's MST, and various path-finding algorithms
- Addition of 7+ dynamic programming solutions covering classic problems like knapsack, LCS, and subset sum
- Implementation of gradient boosting and bridge detection algorithms with comprehensive R6 class structures
- Creation of machine learning documentation and tutorial resources
Reviewed Changes
Copilot reviewed 138 out of 217 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| graph_algorithms/stoer_wagner_min_cut.r | Core implementation of Stoer-Wagner algorithm for finding global minimum cut |
| graph_algorithms/kruskal_mst.r | Kruskal's MST with union-find data structure |
| graph_algorithms/prim_mst.r | Prim's algorithm for minimum spanning tree |
| graph_algorithms/dijkstra_shortest_path.r | Dijkstra's shortest path with priority queue |
| graph_algorithms/bellman_ford_shortest_path.r | Bellman-Ford algorithm supporting negative weights |
| graph_algorithms/floyd_warshall.r | All-pairs shortest path with R6 class structure |
| dynamic_programming/subset_sum.r | Subset sum problem with DP table visualization |
| dynamic_programming/longest_common_subsequence.r | LCS with multiple implementation variants |
| machine_learning/gradient_boosting.r | Complete gradient boosting implementation using R6 |
| graph_algorithms/bridge_detector.r | Tarjan's bridge detection algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have changed 217 files, check your changes
Algorithm: Stoer–Wagner Minimum Cut
Purpose: Finds the global minimum cut in an undirected weighted graph.
Theory: Repeatedly merges vertices while tracking the most tightly connected set, updating the minimum cut value.
Time Complexity: O(V³) for standard adjacency matrix implementation.
Space Complexity: O(V²) for adjacency matrix.
Input: Undirected weighted graph as an adjacency matrix or list.
Output: Minimum cut value and a representative vertex of the cut.