Professional Documents
Culture Documents
•Shubham Choudhary
•Shivam Tikhe
•Shivam Dangwal
Note: At each node, other than the source or the sink, the total flow of all
arcs leading in to the node equals the total flow of all arcs leading out of
it.
The max flow problem is to find a flow for which the sum of the flow
amounts for the entire network is as large as possible.
AddArcWithCapacity
Return type: ArcIndex
Arguments: NodeIndex tail, NodeIndex head, FlowQuantity
capacity
Solve
Return type: Status
Arguments: NodeIndex source, NodeIndex sink
OptimalFlow
Return type: FlowQuantity
Returns the maximum flow we can send from the source to
the sink in the last OPTIMAL Solve() context.
Conclusion
The maximum flow path from both the methods, i.e., by
Ford-Fulkerson Algorithm and by Python programming, is
the same.
• Arc [0-1] has flow 20.
• Arc [0,2] has flow 30.
• Arc [0,3] has flow 10.
• Arc [1,4] has flow 20.
• Arc [2,3] has flow 10.
• Arc [2,4] has flow 20.
• Arc [3,4] has flow 20.