INTRODUCTION TO NETWORK FLOWS

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

Analysis of Algorithms CS 477/677
Network Flows. 2 Ardavan Asef-Vaziri June-2013Transportation Problem and Related Topics Table of Contents Chapter 6 (Network Optimization Problems) Minimum-Cost.
DMOR Networks. Graphs: Koenigsberg bridges Leonard Euler problem (1736)
Chapter 8, Part I Graph Algorithms.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Introduction to Graphs
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Facilities Planning Objectives and Agenda: 1. Different types of Facilities Planning Problems 2. Intro to Graphs as a tool for deterministic optimization.
Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects two different vertices. Edges are.
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
Graph. Data Structures Linear data structures: –Array, linked list, stack, queue Non linear data structures: –Tree, binary tree, graph and digraph.
Been-Chian Chien, Wei-Pang Yang, and Wen-Yang Lin 6-1 Chapter 6 Graphs Introduction to Data Structure CHAPTER 6 GRAPHS 6.1 The Graph Abstract Data Type.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Networks and the Shortest Path Problem.  Physical Networks  Road Networks  Railway Networks  Airline traffic Networks  Electrical networks, e.g.,
Network Optimization Models
1 ESI 6417 Linear Programming and Network Optimization Fall 2003 Ravindra K. Ahuja 370 Weil Hall, Dept. of ISE
Computer Science 112 Fundamentals of Programming II Introduction to Graphs.
Chapter 2 Graph Algorithms.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch.
1 ELEC692 Fall 2004 Lecture 1b ELEC692 Lecture 1a Introduction to graph theory and algorithm.
Minimum Cost Flows. 2 The Minimum Cost Flow Problem u ij = capacity of arc (i,j). c ij = unit cost of shipping flow from node i to node j on (i,j). x.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Data Structures & Algorithms Graphs
ITEC 2620A Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: 2620a.htm Office: TEL 3049.
Minimal Spanning Tree Problems in What is a minimal spanning tree An MST is a tree (set of edges) that connects all nodes in a graph, using.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Graphs Edge(arc) Vertices can be even or odd or undirected (two-way) Edges can be directed (one-way) This graph is connected. Degree(order) = 3 Odd vertex.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Topic 12 Graphs 1. Graphs Definition: Two types:
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Graphs 황승원 Fall 2010 CSE, POSTECH. 2 2 Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
Graphs Upon completion you will be able to:
Copyright © Curt Hill Graphs Definitions and Implementations.
1 Chapter 2 Notation and Definitions Data Structures Transformations.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Chapter 05 Introduction to Graph And Search Algorithms.
1 Maximum Flows CONTENTS Introduction to Maximum Flows (Section 6.1) Introduction to Minimum Cuts (Section 6.1) Applications of Maximum Flows (Section.
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
Graphs ORD SFO LAX DFW Graphs 1 Graphs Graphs
CS 201: Design and Analysis of Algorithms
Graphs Chapter 20.
School of Computing Clemson University Fall, 2012
Agenda Lecture Content: Introduction to Graph Path and Cycle
CS 3343: Analysis of Algorithms
CS120 Graphs.
Graph Operations And Representation
Refresh and Get Ready for More
Graphs & Graph Algorithms 2
Modeling and Simulation NETW 707
Graphs All tree structures are hierarchical. This means that each node can only have one parent node. Trees can be used to store data which has a definite.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Introduction Basic formulations Applications
What is a Graph? a b c d e V= {a,b,c,d,e} E= {(a,b),(a,c),(a,d),
Graph Operations And Representation
Graphs.
ITEC 2620M Introduction to Data Structures
A network problem is one that can be represented by...
Text Book: Introduction to algorithms By C L R S
Trees-2, Graphs Data Structures with C Chpater-6 Course code: 10CS35
Chapter 10 Graphs and Trees
Chapter 9 Graph algorithms
GRAPHS.
Presentation transcript:

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)

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

Some Common Physical Networks

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

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)

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

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

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

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)}

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

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.

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.

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.

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

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.

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.

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

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.

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

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

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.

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)

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

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

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