Skip to content

Implementation of Fork Fulkerson Algorithm #668

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bobbysharma05
Copy link

Fixes #477

Pseudocode

  • Verify s and t exist in graph
  • Initialize max_flow = 0, flow_pass = {}
  • While true:
    • Find augmenting path using DFS
    1. If no path found, break
    1. Add path_flow to max_flow
    1. Update flow_pass along path (add to forward edges, subtract from backward edges)
  • Return max_flow

Other comments

If there is any scope of improvement do tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network flow: fork Fulkerson algorithmn
1 participant