You are on page 1of 8

Group 8:

•Shubham Choudhary
•Shivam Tikhe
•Shivam Dangwal

Maximum •Subhamoy Shit


•Sayan Kr Shaw
flow problem •Sreedhar Viswas
•Pavan Kumar
Introduction
Network Modeled with nodes and directed edges.
Components: Edges have capacities, indicating maximum flow.

Objective: Find the maximum flow from a source to a sink.

Flow Total inflow equals total outflow at each node.


Conservation:
Capacity Flow on an edge can't exceed its capacity.
Constraints:
Ford-Fulkerson Iteratively augments flow along paths.
Algorithm: Terminates when no more augmenting paths exist.

Residual Used in Ford-Fulkerson algorithm.


Graph: Represents available capacity after flow updates.
Max Flow Problem

The problem is defined by the following graph,


which represents a transportation network:
• You want to transport material from node 0
(the source) to node 4 (the sink). The numbers
next to the arcs are their capacities — the
capacity of an arc is the maximum amount that
can be transported across it in a fixed period of
time. The capacities are the constraints for the
problem.
A flow is an assignment of a non-negative number to each arc (the flow
amount) that satisfies the following flow conservation rule:

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.

The following sections present 2 different methods to find the maximum


flow from the source (0) to the sink (4).
Ford-Fulkerson Algorithm Solution
Problem FAP 1
Ford-Fulkerson Algorithm Solution contd.
FAP 2 FAP 3
Python Program
SimpleMaxFlow
The constructor takes no size. New node indices will be
created lazily by AddArcWithCapacity().

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.

You might also like