Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch.

Slides:



Advertisements
Similar presentations
Thursday, March 14 Introduction to Network Flows
Advertisements

Lecture 5: Network Flow Algorithms Max-Flow Min-Cut Single-Source Shortest-Path (SSSP) Job Sequencing.
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
Greed is good. (Some of the time)
Introduction to Algorithms
Chapter 5 Shortest Paths: Label-Correcting Algorithms
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
MIT and James Orlin © Introduction to Networks Eulerian Tours Hamiltonian Tours The Shortest Path Problem Dijkstra’s Algorithm for Solving the Shortest.
Computational Methods for Management and Economics Carla Gomes Module 9a Network Models Terminology (Slides adapted from J.Orlin’s)
Optimisation Methods Network Models.
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Routing algorithms, all distinct routes, ksp, max-flow, and network flow LPs W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 E.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
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.
Max-flow/min-cut theorem Theorem: For each network with one source and one sink, the maximum flow from the source to the destination is equal to the minimal.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
Chapter 4 Shortest Path Label-Setting Algorithms Introduction & Assumptions Applications Dijkstra’s Algorithm.
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
and 6.855J The Capacity Scaling Algorithm.
Network Optimization Models
1 ESI 6417 Linear Programming and Network Optimization Fall 2003 Ravindra K. Ahuja 370 Weil Hall, Dept. of ISE
Network Models (2) Tran Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology Tran Van Hoai.
Introduction to Operations Research
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.
Lecture 5: Network Flow Algorithms Single-Source Shortest-Path (SSSP) (Dijkstra's Algorithm) Max Flow - Min Cut (Ford-Fulkerson) Job Sequencing.
Chapter 1 Introduction Introduction  Networks: mathematical models of real systems like electrical and power/ telecom/ logistics/ highway/ rail/
1 Network Coding and its Applications in Communication Networks Alex Sprintson Computer Engineering Group Department of Electrical and Computer Engineering.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Network Optimization Network optimization models: Special cases of linear programming models Important to identify problems that can be modeled as networks.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
1 Prim’s algorithm. 2 Minimum Spanning Tree Given a weighted undirected graph G, find a tree T that spans all the vertices of G and minimizes the sum.
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Supplementary: Feasible Labels and Linear Programming  Consider the LP formulation of the shortest s-t path problem: (P) Minimize  (i, j)  A c ij x.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or.
Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘length’ c ij (cost, time, distance, …). Determine a path of shortest.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
Approximation Algorithms Duality My T. UF.
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.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
Minimum Cost Flow Algorithms and Networks. Algorithms and Networks: Minimum Cost Flow2 This lecture The minimum cost flow problem: statement and applications.
Part 3 Linear Programming
St. Edward’s University
Network Optimization J.B. Orlin
Network Simplex Animations
ENGM 535 Optimization Networks
Lecture 5 – Integration of Network Flow Programming Models
EMIS 8374 Dijkstra’s Algorithm Updated 18 February 2008
Lecture 5 – Integration of Network Flow Programming Models
1.3 Modeling with exponentially many constr.
Part 3 Linear Programming
Introduction Basic formulations Applications
1.3 Modeling with exponentially many constr.
Chapter 5 Transportation, Assignment, and Transshipment Problems
Uncapacitated Minimum Cost Problem in a Distribution Network
Flow Feasibility Problems
離散數學 DISCRETE and COMBINATORIAL MATHEMATICS
Trees-2, Graphs Data Structures with C Chpater-6 Course code: 10CS35
Part 3 Linear Programming
INTRODUCTION TO NETWORK FLOWS
Lecture 12 Network Models.
Presentation transcript:

Modeling and Evaluation with Graph Mohammad Khalily Dermany Islamic Azad University, Khomein branch.

2 Application  Graphs useful mathematical objects for representing many physical systems.  Communication  systematical analyze of electrical circuits  Relationship of data  Distributed Computing on a multi-Processor Computers  Cloud computing  Other science fields

3 basic questions  Shortest path problem  Maximum flow problem  Minimum cost flow problem  Assignment problem  Transportation problem  Circulation problem  Convex cost flow problems  Generalized flow problems  Multicommodity flow problems  Minimum spanning tree problem

4 Notation  Let G = (N, A) be a directed network defined by a set N of n nodes and a set A of m directed arcs. Each arc (i, j)EA has an associated cost Cij that denotes the cost per unit flow on that arc. We assume that the flow cost varies linearly with the amount of flow. We also associate with each arc (i, j)EA a capacity Uij that denotes the maximum amount that can flow on the arc and a lower bound lij that denotes the minimum amount that must flow on the arc. We associate with each node iEN an integer number b(i) representing its supply/demand. If b(i) > 0, node i is a supply node; if b(i) < 0, node i is a demand node with a demand of - b(i); and if b(i) = 0, node i is a transshipment node.

5 Definition  Tails and Heads  Degrees  Adjacency List  Multiarcs and Loops  Subgraph  Walk  Directed Walk  Path: A path is a walk without any repetition of nodes.  Directed Path  Cycle  Acyclic Graph  Connectivity  Strong Connectivity  Cut

6 Various Types of Shortest Path Problems  1. Finding shortest paths from one node to all other nodes when arc lengths are nonnegative  2. Finding shortest paths from one node to all other nodes for networks with arbitrary arc lengths  3. Finding shortest paths from every node to every other node  4. Various generalizations of the shortest path problem

7 SHORTEST PATHS

8 iterative algorithmic approaches  label setting (Dijkstra' s algorithm O(n 2 ))  several versions of Dijkstra's algorithm that improve upon its worst-case complexity.  implementations uses a heap (or priority queue) data structure  Knapsack Problem  label correcting (O(n 2 C) C on the maximum absolute value of any arc length)  reduces the distance label of one node at each iteration by considering only local information, namely the length of the single arc and the current distance labels of its incident nodes.  flexibility  Label-setting algorithms designate one label as permanent (optimal) at each iteration. In contrast, label-correcting algorithms consider all labels as temporary until the final step, when they all become permanent.  modified versions

9 Dijkstra' s algorithm

10 Label-Correcting Algorithm

11 Label-Correcting Algorithm (continue)

12 Label-Correcting Algorithm (continue)

13 Label-Correcting Algorithm (continue)

14 Label-Correcting Algorithm (continue)

15 Label-Correcting Algorithm (continue)

16 Label-Correcting Algorithm (continue)

17 OPTIMALITY CONDITIONS of Label-Correcting Algorithm  they must satisfy the following necessary optimality conditions

18 ALL-PAIRS SHORTEST PATH PROBLEM  repeated shortest path algorithm  If S(n, m, C) denotes the time needed to solve a shortest path problem  All-pairs shortest path problem in O(n S(n, m, C))time.  all-pairs label-correcting algorithm  especially well suited for dense networks  Floyd-Warshall algorithm

19 MAXIMUM FLOWS  The maximum flow problem and the shortest path problem are complementary  Shortest path problems model arc costs but not arc capacities; maximum flow problems model capacities but not costs.  we wish to send as much flow as possible between two special nodes, a source node s and a sink node t, without exceeding the capacity of any arc.  The max-flow min-cut theorem establishes an important correspondence between flows and cuts in networks.  Indeed, as we will see, by solving a maximum flow problem, we also solve a complementary minimum cut problem: From among all cuts in the network that separate the source and sink nodes, find the cut with the minimum capacity.

20 MAXIMUM FLOWS (continue)  s-t cut: a cut is a partition of the node set N into two subsets Sand S = N - S;  Capacity of an s-t cut: sum of the capacities of the forward arcs in the cut  Minimum cut: an s-t cut whose capacity is minimum among all s-t cuts as a minimum cut.

21 MAXIMUM FLOWS (continue)

22 MAXIMUM FLOWS (continue)

23 Finding Minimum Cuts Using Shortest Paths

24 MINIMUM COST FLOWS APPLICATIONS  Distribution Problems  Min energy routing  Resource allocation  TCP protocol  MAC Layer Fair Rate Control

25 MINIMUM COST FLOWS  shortest path problem contains no arc capacities

26 MINIMUM COST FLOWS

27 potential of node

28 potential of node  the node potentials do not change the shortest path between any pair of nodes k and I, since the potentials increase the length of every path by a constant amount  (l) -  (k).

29 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM  It maintains a solution x that satisfies the nonnegativity and capacity constraints, but violates the mass balance constraints of the nodes.

30 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM(continue)  A pseudofllow is a function x: A -> R+ satisfying only the capacity and nonnegativity constraints; it need not satisfy the mass balance constraints. For any pseudoflow x, we define the imbalance of node i as  If e(i) > 0 for some node i, we refer to e(i) as the excess of node i; if e(i) <0, we call - e(i) the node's deficit. We refer to a node i with e(i) = 0 as balanced.

31 SUCCESSIVE SHORTEST PATH ALGORITHM PRIMAL-DUAL ALGORITHM(continue)  Let E and D denote the sets of excess and deficit nodes in the network.  if the network contains an excess node, it must also contain a deficit node.  classical in the sense that researchers developed them in the 1950s and 1960s

32 RELAXATION ALGORITHM  a more recent vintage minimum cost flow algorithm

33 RELAXATION ALGORITHM(continue)  each flow variable Xij appears twice: once with a coefficient of -  (i) and the second time with a coefficient of  (j).

34 RELAXATION ALGORITHM(continue)

“ ” ؟