Outline: Finish uncapacitated simplex method Negative cost cycle algorithm The max-flow problem Max-flow min-cut theorem

Similar documents
Graphs and Network Flows IE411. Lecture 13. Dr. Ted Ralphs

CSE 417 Network Flows (pt 4) Min Cost Flows

Linear Programming. Course review MS-E2140. v. 1.1

CSC 8301 Design & Analysis of Algorithms: Linear Programming

x ji = s i, i N, (1.1)

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

LECTURES 3 and 4: Flows and Matchings

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

Network Design and Optimization course

Lecture 3: Totally Unimodularity and Network Flows

Notes for Lecture 20

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

Maximum flow problem CE 377K. March 3, 2015

Homework 3 Solutions

Math 414 Lecture 30. The greedy algorithm provides the initial transportation matrix.

Lecture 11: Maximum flow and minimum cut

and 6.855J March 6, Maximum Flows 2

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 14: Combinatorial Problems as Linear Programs I. Instructor: Shaddin Dughmi

Lecture 3: Graphs and flows

Outline. 1 The matching problem. 2 The Chinese Postman Problem

y i = S i ΠS y i + S i ΠN\S

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Discrete Optimization 2010 Lecture 5 Min-Cost Flows & Total Unimodularity

Mathematics for Decision Making: An Introduction. Lecture 18

Integer Programming Theory

Jessica Su (some parts copied from CLRS / last quarter s notes)

Network Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Tuesday, April 10. The Network Simplex Method for Solving the Minimum Cost Flow Problem

Artificial Intelligence

Generalized Network Flow Programming

Minimum Cost Edge Disjoint Paths

4 Integer Linear Programming (ILP)

Problem Set 7 Solutions

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms

1 Linear programming relaxation

Linear Programming. Linear programming provides methods for allocating limited resources among competing activities in an optimal way.

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 29

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

CS261: Problem Set #1

Material handling and Transportation in Logistics. Paolo Detti Dipartimento di Ingegneria dell Informazione e Scienze Matematiche Università di Siena

CS261: Problem Set #2

Algorithms for multiflows

1. What do you get as the integer and noninteger parts if you factor this as we did with our cutting planes:

5.4 Pure Minimal Cost Flow

12 Introduction to LP-Duality

Today. Maximum flow. Maximum flow. Problem

AM 121: Intro to Optimization Models and Methods Fall 2017

Outline. CS38 Introduction to Algorithms. Linear programming 5/21/2014. Linear programming. Lecture 15 May 20, 2014

Job Management & Network Flows

Read: H&L chapters 1-6

Network Flows. 1. Flows deal with network models where edges have capacity constraints. 2. Shortest paths deal with edge costs.

and 6.855J. The Successive Shortest Path Algorithm and the Capacity Scaling Algorithm for the Minimum Cost Flow Problem

Time dependent optimization problems in networks

Outline. Combinatorial Optimization 2. Finite Systems of Linear Inequalities. Finite Systems of Linear Inequalities. Theorem (Weyl s theorem :)

CMPSCI 311: Introduction to Algorithms Practice Final Exam

CS612 Algorithms for Electronic Design Automation

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Graphs and Network Flows IE411. Lecture 20. Dr. Ted Ralphs

Graphs and Network Flows IE411 Lecture 20

Algorithm Circle Extra Lecture: Solving the Assignment Problem with Network Flow

5. DUAL LP, SOLUTION INTERPRETATION, AND POST-OPTIMALITY

1. Let n and m be positive integers with n m. a. Write the inclusion/exclusion formula for the number S(n, m) of surjections from {1, 2,...

Dual-fitting analysis of Greedy for Set Cover

Network Flow. The network flow problem is as follows:

Graph Algorithms Matching

ORF 307: Lecture 14. Linear Programming: Chapter 14: Network Flows: Algorithms

Solution for Homework set 3

Linear Programming Motivation: The Diet Problem

Combinatorial Optimization

Module 10. Network Simplex Method:

Solving problems on graph algorithms

Easter Term OPTIMIZATION

DM515 Spring 2011 Weekly Note 7

ME 391Q Network Flow Programming

New Directions in Linear Programming

Incremental Algorithms for the Minimum Cost Flow Problem

Math 5490 Network Flows

Linear and Integer Programming :Algorithms in the Real World. Related Optimization Problems. How important is optimization?

Algorithms for Integer Programming

1 Bipartite maximum matching

Approximation Algorithms: The Primal-Dual Method. My T. Thai

The Simplex Algorithm for LP, and an Open Problem

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

6.854 Advanced Algorithms. Scribes: Jay Kumar Sundararajan. Duality

A Comparative study on Algorithms for Shortest-Route Problem and Some Extensions

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Graph Algorithms Maximum Flow Applications

On the Computational Behavior of a Dual Network Exterior Point Simplex Algorithm for the Minimum Cost Network Flow Problem

1. Lecture notes on bipartite matching February 4th,

Dynamic-Programming algorithms for shortest path problems: Bellman-Ford (for singlesource) and Floyd-Warshall (for all-pairs).

An example of LP problem: Political Elections

Practice Final Exam 1

Network optimization: An overview

LECTURE 13: SOLUTION METHODS FOR CONSTRAINED OPTIMIZATION. 1. Primal approach 2. Penalty and barrier methods 3. Dual approach 4. Primal-dual approach

Linear Programming. Linear Programming. Linear Programming. Example: Profit Maximization (1/4) Iris Hui-Ru Jiang Fall Linear programming

Duality. Primal program P: Maximize n. Dual program D: Minimize m. j=1 c jx j subject to n. j=1. i=1 b iy i subject to m. i=1

16.410/413 Principles of Autonomy and Decision Making

Transcription:

Outline: Finish uncapacitated simplex method Negative cost cycle algorithm The max-flow problem Max-flow min-cut theorem

Uncapacitated Networks: Basic primal and dual solutions Flow conservation constraints Af = b (rows nodes; columns arcs) delete last row: Ãf = b basic (feasible) solution (feasible) tree solution n 1 basic variables: flows that lie on the tree (easy to calculate given the tree) Calculation of dual basic solution p (one variable per node) [p 1 p n 1 ] Ã B(1) Ã B(n 1) =[c B(1) c B(n 1) ] [p 1 p n 1 0] A B(1) A B(n 1) =[c B(1) c B(n 1) ] i.e., use original columns (dimension n), but set p n =0 if (i, j) tree, i.e., f ij is basic, p i p j = c ij solve by starting at root node n, move down the tree p i p j = cost of path from i to j along the tree for (i, j) outside the tree: c ij = c ij (p i p j )= cost of cycle created by arc (i, j).

Uncapacitated Network Simplex Algorithm Algorithm: Start with a tree T, and flows f ij,(i, j) T p n =0;solve p i p j = c ij,(i, j) T For (i, j) / T, let c ij = c ij (p i p j ) If all c ij 0, then optimal, and the p i are a dual optimal solution Else pick (i, j) with c ij < 0 Consider cycle created by arc (i, j) Push flow around that cycle, until some arc flow is zeroed Zeroed arc exits the tree/basis If all b i are integer, basic (or optimal) f is integer If all c ij are integer, basic (or optimal) p is integer How to start the algorithm? Assume single source, single sink Auxiliary arc from source to sink, with high cost. Let that arc be in the tree, all flow goes through it.

The capacitated case Tree solution: Pick a tree. For (i, j) T, set f ij either to 0 or to u ij Calculate p i and c ij as before. If c ij < 0 and f ij =0,push flow around the cycle, in the direction of (i, j). If c ij > 0 and f ij = u ij, push flow in the opposite direction.

Optimality conditions Def: Pushing flow around a cycle: f ij f ij + δ for forward arcs f ij f ij δ for backward arcs (flow conservation equation is respected) Def: A cycle is unsaturated if we can push some flow around it. f ij <u ij for forward arcs f ij > 0 for backward arcs Def: Cost of a cycle: Sum of the c ij, with minus sign for backward arcs. Theorem: Optimal flow iff there is no unsaturated cycle with negative cost. Easy direction: If negative cost unsaturated cycle, can push some flow along that cycle cost reduction flow is not optimal Converse direction: proof is more involved

Negative Cost Cycle Algorithm Algorithm: 1. Start with a feasible flow f. 2. Search for an unsaturated cycle C with negative cost. 3. If none, stop (optimal) 4. Else, push as much flow as possible along C (if can push an infinite amount, optimal cost is ) Assume b i integer, and u ij integer or infinite Assume integer initial flow Integrality maintained throughout If the optimal cost is finite, terminates with integer optimal solution In noninteger case, not guaranteed to terminate! Number of iterations can be large Algorithm can be made efficient under special rules for choosing among negative cost cycles Searching for negative cost cycles can be done in O(n 3 ) time

The Maximum Flow problem Given capacities u ij ;nocosts maximize flow from source s to destination t Equivalent min-cost flow problem: c ts = 1 u ts = 8 s t Negative cost cycle: artificial arc and unsaturated path from s to t ( augmenting path ) along which flow can be pushed

Arcs that can be used: Augmenting paths can use arc (i, j) inforward direction if f ij <u ij can use arc (i, j) inbackward direction if f ij > 0 1 1 0 s 1 t 0 1 2 (all capacities are 1) flow pushed : min min (u ij f ij ), (i,j) F Ford-Fulkerson algorithm: search for augmenting path and push flow min (i,j) B f ij

Searching for an augmenting path Labeled node i: have determined that path from s to i, with f ij <u ij on forward arcs f ij > 0onbackard arcs Scanned node i: have looked at all neighbors of i and attempted to label them Labeling algorithm: Initialize: label s select labeled but unscanned node scan it, and label its neighbors, if possible repeat If t labeled, have found augmenting path If stuck, with t unlabeled, no augmenting path exists. Work: O(m)

Labeling algorithm example u = 6 f = 5 s f = 2 u = 3 1 f = 3 u = 3 u = 1 2 f = 1 f = 2 3 u = 4 f = 3 4 f = 1 f = 1 u = 1 u = 1 f = 3 u = 3 u = 5 t

Comments on overall algorithm Not guaranteed to terminate! Works with primal feasible solutions Max-flow is infinite iff path from s to t with infinite capacities (check ahead of time) Guaranteed to terminate if: max-flow is finite and u ij are all integer (or rational) Complexity (in integer case): [let U = max u ij ] nu O(m)

Max-flow min-cut theorem Cut S: s S, t/ S. cut capacity = C(S) = max-flow min S C(S) u ij {(i,j) A i S, j / S} Start algorithm with optimal flow. Fails to find augmenting path, algorithm terminates Consider set S of labeled nodes i j s S S t l k f ij = u ij, f kl =0 current flow= capacity C(S) of this cut Therefore: current flow is optimal this cut is minimal max-flow value = min-cut capacity Smacks of duality

Comments Size of problem: O(m log U) Ford-Fulkerson algorithm: O(mnU): exponential Can be modified to polunomial(m, n, log U) (Exercise 7.25) Better algorithms: look for shortest augmenting path augment flow on many paths simultaneously etc. etc. can get complexity O(mn log n)