The Max Flow
The Max Flow
Is a classic optimization problem in graph theory that involves finding the maximum amount of
flow that can be sent through a network of pipes, channels, or other pathways, subject to capacity
constraints. The problem can be used to model a wide variety of real-world situations, such as
transportation systems, communication networks, and resource allocation.
In the max flow problem, we have a directed graph with a source node s and a sink node t, and
each edge has a capacity that represents the maximum amount of flow that can be sent through it.
The goal is to find the maximum amount of flow that can be sent from s to t, while respecting the
capacity constraints on the edges.
One common approach to solving the max flow problem is the Ford-Fulkerson algorithm, which is
based on the idea of augmenting paths. The algorithm starts with an initial flow of zero, and
iteratively finds a path from s to t that has available capacity, and then increases the flow along
that path by the maximum amount possible. This process continues until no more augmenting
paths can be found.
Another popular algorithm for solving the max flow problem is the Edmonds-Karp algorithm, which
is a variant of the Ford-Fulkerson algorithm that uses breadth-first search to find augmenting
paths, and thus can be more efficient in some cases.
Advantages:
• The max flow problem is a flexible and powerful modeling tool that can be used to
represent a wide variety of real-world situations.
• The Ford-Fulkerson and Edmonds-Karp algorithms are both guaranteed to find the
maximum flow in a graph and can be implemented efficiently for most practical cases.
• The max flow problem has many interesting theoretical properties and connections to
other areas of mathematics, such as linear programming and combinatorial optimization.
Disadvantages:
• In some cases, the max flow problem can be difficult to solve efficiently, especially if the
graph is very large or has complex capacity constraints.
• The max flow problem may not always provide a unique or globally optimal solution,
depending on the specific problem instance and algorithm used.
minimum spanning tree (MST)
Or minimum weight spanning tree for a weighted, connected, undirected graph is a spanning tree
with a weight less than or equal to the weight of every other spanning tree.
Below are the steps for finding MST using Kruskal’s algorithm:
Kruskal’s algorithm to find the minimum cost spanning tree uses the greedy approach. The Greedy
Choice is to pick the smallest weight edge that does not cause a cycle in the MST constructed so
far. Let us understand it with an example:
Illustration:
The graph contains 9 vertices and 14 edges. So, the minimum spanning tree formed will be having
(9 – 1) = 8 edges.
Critical Path Method (CPM)
is a method used in project planning, generally for project scheduling for the on-time completion
of the project. It helps in the determination of the earliest time by which the whole project can be
completed. There are two main concepts in this method namely critical task and critical path.
Critical task is the task/activity which can’t be delayed otherwise the completion of the whole
project will be delayed. It must be completed on-time before starting the other dependent tasks.
Critical path is a sequence of critical tasks/activities and is the largest path in the project network.
It gives us the minimum time which is required to complete the whole project. The activities in the
critical path are known as critical activities and if these activities are delayed then the completion
of the whole project is also delayed.