Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO NETWORK FLOWS

Similar presentations


Presentation on theme: "INTRODUCTION TO NETWORK FLOWS"— Presentation transcript:

1 INTRODUCTION TO NETWORK FLOWS
CONTENTS Introduction to Network Flows (Sections 1.1 and 1.2) Network Notation (Section 2.2) Network Representations (Section 2.3)

2 Directed and Undirected Networks
1 2 3 4 5 6 7 DIRECTED GRAPH: 1 2 3 4 5 6 7 UNDIRECTED GRAPH:

3 Some Common Physical Networks

4 Minimum Cost Flow Problem
Determine a least cost shipment of a commodity through a network in order to satisfy demands at certain nodes from available supplies at other nodes. Arcs have capacities and cost associated with them. 1 2 3 4 5 6 7 10 -5 -15 Distribution of products Flow of items in a production line Routing of cars through street networks Routing of telephone calls

5 Minimum Cost Flow Problem (contd.)
Mathematical Formulation: where Supply nodes (b(i) > 0); Demand nodes (b(i) < 0); Transhipment nodes (b(i) = 0) Mass balance constraints (flow in - flow out = supply/demand) Flow bound constraints (lower and upper bound constraints)

6 Shortest Path Problem Identify a shortest path from a given source node to a given sink node. 1 2 4 3 5 6 10 25 35 20 15 40 30 s t Applications: Finding a path of minimum length Finding a path taking minimum time Finding a path of maximum reliability

7 Maximum Flow Problem Determine the maximum flow that can be sent from a given source node to a sink node in a capacitated network. 1 2 4 3 5 6 10 25 35 20 15 40 30 s t Determining maximum steady-state flow of: petroleum products in a pipeline network cars in a road network messages in a telecommunication network electricity in an electrical network

8 Minimum Spanning Tree Problem
Find a spanning tree of an undirected network of minimum cost (or, length). 35 40 25 10 20 15 30 1 2 3 4 5 Constructing highways or railroads spanning several cities Designing local access network Making electric wire connections on a control panel Laying pipelines connecting offshore drilling sites, refineries, and consumer markets

9 Network Notation Network (or graph) G = (N, A)
1 2 3 4 5 6 7 Network (or graph) G = (N, A) N : Node Set = {1, 2, 3, 4, 5, 6, 7} A : Arc Set = {(1, 2), (1, 3), (2, 3), (2, 4), (3, 6), (4, 5), (4, 7), (5, 2), (5, 3), (5, 7), (6, 7)}

10 Tails and Head Nodes Tail Node : Node i is the tail node of arc (i, j)
1 2 3 4 5 6 7 Tail Node : Node i is the tail node of arc (i, j) Head Node : Node j is the head node of arc (i, j) Endpoints : Nodes i and j are endpoints of arc (i, j) Arc Adjacency List A(i) = {(i, j) : (i, j)  A} Observe that

11 Walks 1 2 3 4 5 6 7 Subgraph: G' = (N', A') is a subgraph of G = (N, A) if N'  N and A'  A. Spanning Subgraph: G' = (N', A') is a spanning subgraph of G = (N, A) if N' = N and A'  A. Walk: A walk in a directed graph G is a subgraph of G consisting of a sequence of nodes and arcs. Directed Walk: A directed walk in which all arcs have the same orientation.

12 Paths and Cycles Path : A walk without any repetition of nodes.
1 2 3 4 5 6 7 Path : A walk without any repetition of nodes. Directed Path: A directed walk without any repetition of nodes. Cycle: A closed path that starts and ends at the same node. Directed Cycle: A directed version of a cycle. Acyclic Network: A network is acyclic if it contains no directed cycle.

13 Network Connectivity 1 2 3 4 5 6 7 1 2 3 4 5 6 7 Connected Graph: If every pair of nodes is connected by a path. Strongly Connected Graph: If every pair of nodes is connected by a directed path. Disconnected Graph: If some pair of nodes is not connected by a path. Maximally connected subgraphs of a disconnected graph are called components.

14 Cuts Cut: A cut is a set of arcs whose deletion disconnects the network into two components S and and no subset of it has this property. A cut is represented by [S, ]. 1 2 3 4 5 6 7 S

15 Trees Tree: A tree is a connected graph that contains no cycle.
2 3 4 6 1 1 2 3 4 6 7 A tree on n nodes contains exactly (n-1) arcs. A tree has at least two leaf nodes. Every two nodes of a tree are connected by a unique path.

16 Spanning Trees Spanning Tree: A subgraph of a graph which is a tree and spans all nodes of the graph. 1 2 3 4 5 6 7 1 2 3 4 6 7 5 Forest: A graph that contains no cycle is a forest. A forest on n nodes and k components has n-k arcs.

17 Directed Out-Trees and In-Trees
Directed-out-tree: A tree in which the unique path in the tree from node s to every other node is a directed path. Directed-in-tree: A tree in which the unique path in the tree from any node to node s is a directed path. 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

18 Bipartite Graph Bipartite Graph: A graph G = (N, A) is a bipartite graph if node set N can be partitioned into the sets N1 and N2 such that each arc (i, j) has either (i) i  N1 and j  N2; or (ii) i  N2 and j  N1. 1 6 4 7 3 8 2 5 1 2 3 4 5 A graph G is a bipartite graph if and only if every cycle in it has even number of arcs.

19 Network Representations
Role of data structures is crucial in developing efficient algorithms. The manner in which networks are stored in a computer determines the performance of a network algorithm. We need to perform some of the following operations: Scan through the node list Scan through the arc list Determine all arcs emanating from a specific node i Determine all arcs entering a specific node i Determine all arcs emanating from or entering a specific node i

20 Common Network Representations
Node-arc incidence matrix Node-node adjacency matrix Adjacency list Forward star representation Reverse star representation Forward and reverse star representations

21 Node-Arc Incidence Matrix Representation
Stores the network G = (N, A) as an nxm matrix N = {mij}. (15,40) 2 4 (25,30) 1 (45,10) (15,30) (45,60) (35,50) (35,50) 3 5 (25,20) It is the constraint matrix for the minimum cost flow problem. Space and time inefficient.

22 Node-Node Adjacency Matrix Representation
Stores the network G = (N, A) as an nxn matrix H = {hij} with 1 2 3 4 (35,50) (25,30) (15,40) (25,20) (15,30) (45,10) (45,60) 5 Can store costs and capacities too Easy to construct and manipulate Space and time inefficient for sparse networks (that is, networks with m << n2)

23 Adjacency List Representation
We maintain each adjacency list A(i) as a linked list of cells. We maintain an n-dimensional array first, where first(i) stores a pointer to the first cell in A(i). 1 2 3 4 (35,50) (25,30) (15,40) (25,20) (15,30) (45,10) (45,60) 25 20 15 30 35 50 5 45 60 10 40 5 Space and time efficient Little complex to manipulate

24 Forward Star Representation
We first order the arcs in the increasing order of their tail nodes and store information in m-dimensional arrays in this order. We maintain an n-dimensional array point, where point(i) stores the index where information about arcs emanating from node i begins. 1 2 3 4 (35,50) (25,30) (15,40) (25,20) (15,30) (45,10) (45,60) 5 6 point 7 9 5

25 Forward and Reverse Star Representation
head trace point tail cost capacity rpoint 1 1 1 1 2 25 30 4 1 1 1 2 3 2 1 3 35 50 1 1 2 2 3 4 3 2 4 15 40 2 3 3 3 4 5 4 3 2 45 10 5 6 4 4 5 7 5 4 3 15 30 7 8 5 5 6 9 6 4 5 45 60 8 6 9 6 5 3 25 20 3 7 7 8 5 4 35 50 6 8


Download ppt "INTRODUCTION TO NETWORK FLOWS"

Similar presentations


Ads by Google