3. Also known as a transportation network
It is a directed graph where each edge has a capacity and each
edge receives a flow
Often in operations research, a directed graph is called a
network, the vertices are called nodes and the edges are called
arcs
Network Flow
3
4. A network is a graph G = (V, E), where V are a set of
vertices and E are a set of edges
a non-negative function c: V × V → ℝ∞ is called the
capacity function
If two nodes in G are distinguished, a source s and a sink t,
then (G, c, s, t) is called a flow network
Definition
4
5. Source : no incoming edges
Sink : no outgoing edges
Slack : ( capacity – flow )
Augmented path : a path (u1, u2, ..., uk), where u1 = s, uk
= t, and cf (ui, ui + 1) > 0
Saturated : if flow = capacity
Unsaturated : if flow < capacity
Basic terms
5
6. Example: To find a maximum flow :
A network is at maximum flow if and only if there
is no augmenting path in the residual network Gf.
s → v → t
s → v → u → t
Fig: optimal solution 6
7. Used to model traffic in road system, circulation with diamonds, fluids in
pipes and anything similar in which sth travels through a network of nodes
Electrical distribution systems
Ecosystem network analysis
Maximum flow
Multi – commodity flow problem
Minimum cost flow problem
Circulation problem
Network with gains / generalised network
Source localization problem
Applications
7
8. For a simple graph G, Spanning tree is a subgraph of G.
It contains every vertex of G.
All the vertices are connected
The connected edges must not form a cycle
8
Spanning Tree
Simple graph Spanning tree
Not a tree since there
are small circuits and
closed cycles
It is a tree because
there is no closed cycle
and there is a single
path to every edge.
9. It is also a spanning tree
It has the smallest possible sum of weights of its edges
Algorithms used for constructing the minimum spanning tree
Prim's Algorithm
Kruskal's Algorithm
9
Minimum spanning tree
10. Step 1: Select the vertex at random
Step 2: Find all the edges that connect the tree to
new vertices, find the minimum and add it
to the tree
Step 3: Keep repeating step 2 until we get a
minimum spanning tree
10
Prim's AlgorithmPrim's Algorithm
12. Step 1:Sort all the edges from low weight to high
Step 2: Take the edge with the lowest weight and
add it to the spanning tree. If adding the
edge created a cycle, then reject this edge
Step 3: Keep adding edges until all
vertices are not included
12
Kruskal's Algorithm