- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 342
Dinics algo #261
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?
Dinics algo #261
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 adds Dinic's Maximum Flow Algorithm implementation to the repository, along with several other graph algorithms. The PR focuses on providing a comprehensive implementation of the maximum flow problem using Dinic's algorithm with blocking flows approach.
- Implements Dinic's maximum flow algorithm with BFS level graph construction and DFS blocking flow finding
- Adds supporting algorithms including graph coloring, bidirectional BFS, and Viterbi algorithm
- Provides extensive test cases and examples demonstrating various network flow scenarios
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description | 
|---|---|
| graph_algorithms/dinics_max_flow.r | Main implementation of Dinic's algorithm with network creation, flow computation, and minimum cut functions | 
| graph_algorithms/graph_coloring.r | Graph coloring algorithms using backtracking, greedy, and Welsh-Powell approaches | 
| graph_algorithms/bidirectional_bfs.r | Bidirectional breadth-first search implementation for shortest path finding | 
| dynamic_programming/viterbi.r | Viterbi algorithm for Hidden Markov Model decoding | 
| et --soft HEAD~1 | Git log output file that should not be included in the repository | 
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This file appears to be Git log output and should not be included in the repository. Only algorithm implementations and related documentation should be committed.
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This file appears to be an accidentally committed git log output. It should be removed from the repository as it contains no algorithmic implementation and was likely created due to a typo in a git command (appears to be 'git reset --soft HEAD~1' with 'res' missing).
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
• Finds maximum flow in a flow network from source to sink
• Uses blocking flows approach for efficient computation
• Builds level graphs using BFS (Breadth-First Search)
• Finds augmenting paths using DFS (Depth-First Search)
• Handles residual graph with forward and reverse edges
• Computes minimum cut and cut edges
• Supports bipartite matching and multi-source/sink problems
• Time complexity: O(V² × E), Space complexity: O(V + E)
• Includes network creation, edge addition, and flow validation
• Demonstrates 5 test cases: simple networks, bipartite matching, complex paths, bottlenecks, and multi-source/sink scenarios