Kumar-laxmi / Algorithms

A Repository for algorithms in C, C++, Python and Java
Apache License 2.0
326 stars 367 forks source link

Improve Ford-Fulkerson Algorithm's Efficiency and Scalability (Using C++) #713

Closed neeraj542 closed 1 year ago

neeraj542 commented 1 year ago

Topic: Graphs in DSA Difficulty Level of Algorithm: Medium Level Time Complexity: O(E * maxFlow)

Problem Description: The current implementation of the Ford-Fulkerson algorithm in the GitHub repository lacks efficiency and scalability for larger networks. The algorithm needs to be optimized to handle larger graphs and reduce time complexity. Suggestions include exploring advanced data structures and algorithms like Edmonds-Karp or Dinic's algorithm, which offer better performance in terms of time complexity. Additionally, the codebase could benefit from refactoring and code optimization to improve readability and maintainability. Enhancing the algorithm's efficiency and scalability will make it more suitable for real-world applications with large network flow problems.

Approach: Certainly! The Ford-Fulkerson algorithm is used to find the maximum flow in a network or a graph. It starts with an initial flow of 0 and incrementally finds augmenting paths from the source to the sink, increasing the flow along these paths until no more augmenting paths exist.

Alternative (Depends on the situation):

It's worth noting that the Ford-Fulkerson algorithm can still be useful and effective for smaller networks or situations where the performance requirements are not critical. However, if you are dealing with larger networks and need more efficient solutions, exploring alternatives like Edmonds-Karp or Dinic's algorithm would be beneficial.

Functional Objective:

Optimize the Ford-Fulkerson algorithm implementation for improved efficiency and scalability, considering alternative algorithms like Edmonds-Karp or Dinic's algorithm, and refactor the codebase for better readability and maintainability. Add any other context or screenshots about the feature request here.

Expected Outcome:

neeraj542 commented 1 year ago

Hello @96vksingh @rohitbabugaddeti @Hannibal404 ,

I recently created an issue titled "Improve Ford-Fulkerson Algorithm's Efficiency and Scalability Using C++ Functionality" in the GitHub repository. I am writing to express my keen interest in working on this issue, specifically as part of the Social Summer of Code'23 program, and request its assignment to me.

Thank You Neeraj Meena

Kumar-laxmi commented 1 year ago

@neeraj542 Since this is an intermediate issue you need to implement this in 2 languages. Along with C++ which language would you like to work on?

neeraj542 commented 1 year ago

@Kumar-laxmi Thank you for your response. I am delighted to have the opportunity to contribute to this project. Besides C++, I would like to work on implementing the solution in Python as the additional language.

Kumar-laxmi commented 1 year ago

Assigned! @neeraj542 : C++ & Python

neeraj542 commented 1 year ago

Thanks, @Kumar-laxmi, for assigning it to me.

neeraj542 commented 1 year ago

Please provide more specific details about the context in which you wish to merge, such as the nature of the entity or project you are referring to. What specific steps should I take to move ahead? @Kumar-laxmi