Lecture 3: Totally Unimodularity and Network Flows

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

4 Integer Linear Programming (ILP)

Integer Programming Theory

Mathematical and Algorithmic Foundations Linear Programming and Matchings

6.854J / J Advanced Algorithms Fall 2008

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

LECTURES 3 and 4: Flows and Matchings

Introduction to Mathematical Programming IE406. Lecture 20. Dr. Ted Ralphs

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

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

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

6. Lecture notes on matroid intersection

CSE 417 Network Flows (pt 4) Min Cost Flows

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

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

The Shortest Path Problem. The Shortest Path Problem. Mathematical Model. Integer Programming Formulation

MA4254: Discrete Optimization. Defeng Sun. Department of Mathematics National University of Singapore Office: S Telephone:

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

In this chapter we introduce some of the basic concepts that will be useful for the study of integer programming problems.

Lecture Notes 2: The Simplex Algorithm

Dual-fitting analysis of Greedy for Set Cover

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

Lecture 3: Graphs and flows

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

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

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

Network flows and Menger s theorem

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

CSC 8301 Design & Analysis of Algorithms: Linear Programming

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs

Iterative Methods in Combinatorial Optimization. R. Ravi Carnegie Bosch Professor Tepper School of Business Carnegie Mellon University

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

Applications of Linear Programming

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

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

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

Artificial Intelligence

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

Submodularity Reading Group. Matroid Polytopes, Polymatroid. M. Pawan Kumar

12 Introduction to LP-Duality

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

1. Lecture notes on bipartite matching February 4th,

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

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

Solution for Homework set 3

Some Advanced Topics in Linear Programming

Steiner Trees and Forests

Lecture and notes by: Sarah Fletcher and Michael Xu November 3rd, Multicommodity Flow

Network Design and Optimization course

Lecture 18 Solving Shortest Path Problem: Dijkstra s Algorithm. October 23, 2009

Network optimization: An overview

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

Minimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Conic Duality. yyye

Characterizations of Trees

1. Lecture notes on bipartite matching

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

Introduction to Mathematical Programming IE406. Lecture 16. Dr. Ted Ralphs

Lecture 19. Broadcast routing

and 6.855J March 6, Maximum Flows 2

The Simplex Algorithm

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

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

Practice Final Exam 1

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

Solutions for Operations Research Final Exam

Shortest path problems

Chapter 15 Introduction to Linear Programming

MAXIMAL FLOW THROUGH A NETWORK

Notes for Lecture 20

Approximation Algorithms

Lecture 11: Maximum flow and minimum cut

Lecture 3. Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets. Tepper School of Business Carnegie Mellon University, Pittsburgh

Artificial Intelligence

NATCOR Convex Optimization Linear Programming 1

Module 10. Network Simplex Method:

CMPSCI 311: Introduction to Algorithms Practice Final Exam

Solutions for the Exam 6 January 2014

NOTES ON COMBINATORIAL OPTIMIZATION

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

Solving problems on graph algorithms

Primal-Dual Methods for Approximation Algorithms

Minimum Cost Edge Disjoint Paths

COMP 182: Algorithmic Thinking Prim and Dijkstra: Efficiency and Correctness

Introduction to Graph Theory

Math 5490 Network Flows

What is linear programming (LP)? NATCOR Convex Optimization Linear Programming 1. Solving LP problems: The standard simplex method

1 Linear programming relaxation

Graphs that have the feasible bases of a given linear

An example of LP problem: Political Elections

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

Introduction to Mathematical Programming IE406. Lecture 4. Dr. Ted Ralphs

Introduction to Operations Research

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

CS420/520 Algorithm Analysis Spring 2009 Lecture 14

Geometric Steiner Trees

5.3 Cutting plane methods and Gomory fractional cuts

Week 11: Minimum Spanning trees

Transcription:

Lecture 3: Totally Unimodularity and Network Flows (3 units) Outline Properties of Easy Problems Totally Unimodular Matrix Minimum Cost Network Flows Dijkstra Algorithm for Shortest Path Problem Ford-Fulkerson Algorithm for Max-flow Problem Minimum Spanning Tree and Minimum Steiner Tree 1 / 27

Properties of Easy Problems Consider a graph G = (V, E) with n nodes and m edges (m n). An algorithm for the graph is efficient if the algorithm requires O(m p ) elementary calculations in the worst case. Separation Problem. For COP problem max{c T x x X R n }. Given x R n, is x conv(x )? If not, find a cutting plane: π T x π 0, separating X and x. Four properties for an easy problem: (P) max{c T x x X }. 2 / 27

Efficient optimization property: there exists an efficient algorithm for (P). Strong duality property: there exists a strong dual problem (D) min{ω(u) u U}, with which we can check the optimality condition quickly: x X is optimal to (P) iff there exists u U with c T x = ω(u ). Efficient separation property: there exists an efficient algorithm for the associated separation problem. Explicit convex hull property: A compact description of conv(x ) is known. So (P) is equivalent to linear program: max{c T x x conv(x )}. 3 / 27

Totally Unimodular Matrix Consider the linear integer programming: (IP) min c T x s.t. Ax b x 0, x integer. Let X = {x Ax b, x Z n +}. Consider the following linear program: (LP) min c T x s.t. Ax b, x R n +. Question: When are the extreme points of the feasible region (polyhedron) in (LP) all integral? 4 / 27

Sufficient condition: If the optimal basis B of (A, I ) satisfies det(b) = ±1, then (LP) is equivalent to (IP). (A, I ) = (B, N), the optimal solution of (LP): x = (B 1 b, 0). Cramer s rule: B 1 = B /det(b), where B is the adjoint matrix with entries being products of terms of B. Totally unimodular matrix: A matrix A is TU if every square submatrix of A has determinant +1, 1 or 0. If A is TU, then a ij {+1, 1, 0}. A is TU if and only if A T is TU; or (A, I ) is TU. 5 / 27

A useful sufficient condition for TU: A is TU if (i) a ij {+1, 1, 0}; (ii) m i=1 a ij 2; (iii) partition (M 1, M 2 ) of rows {1, 2,..., m} such that each column j containing two nonzero coefficients satisfies i M 1 a ij = i M 2 a ij. Proof: Assume that A is not TU and let B be the smallest square submatrix of A for which deta(b) 0, 1, 1. B cannot contain a column with a single nonzero entry (otherwise B would not be minimal). So B contains two nonzero entries in each column. Adding the rows in M 1 and subtracting the rows in M 2 gives the zero vector and so det(b) = 0, a contradiction. The linear program max{c T x Ax b, x R+} n has an integral optimal solution for all integral b for which it has a finite optimal value iff A is TU. Strong duality, explicit convex hull and efficient separation properties all holds when A is TU. 6 / 27

Minimum cost network flows A digraph G = (V, A) with arc capacity h ij (integer), for (i, j) A, demand b i at node i V, unit flow cost c ij for (i, j) A. min s.t. (i,j) A k V + i c ij x ij x ik k V i x ki = b i, i V 0 x ij h ij, x ij integer. 7 / 27

An example with 6 nodes and 11 arcs. 0 2 3 0 3 1 6 5 2 4 5 4 Figure: A digraph G with 6 nodes and 11 arcs 8 / 27

The node-arc adjacent matrix of G: x 12 x 14 x 23 x 31 x 32 x 35 x 36 x 45 x 51 x 53 x 65 b 1 1 1 0 1 0 0 0 0 1 0 0 =3 2 1 0 1 0 1 0 0 0 0 0 0 =0 3 0 0 1 1 1 1 1 0 0 1 0 =0 4 0 1 0 0 0 0 0 1 0 0 0 = 2 5 0 0 0 0 0 1 0 1 1 1 1 =4 6 0 0 0 0 0 0 1 0 0 0 1 = 5 The constraint in Minimum Cost Flow Problem is TU. If the demands b i and the capacities h ij are integral, then each extreme point is integral. The constraints describe the convex hull of the integer feasible flow. 9 / 27

Shortest path. Given two nodes s, t V and nonnegative arc costs c ij for (i, j) A, find a minimum cost flow from s to t. min s.t. (i,j) A k V + i k V + i k V + i c ij x ij x ik k V i x ik k V i x ik k V i x ij Z +, (i, j) A. x ki = 1, i = s x ki = 0, i V \ {s, t} x ki = 1, i = t Theorem: z is the length of a shortest s t path iff there exist π i for i V such that π s = 0, π t = z and π j π i c ij for (i, j) A. 10 / 27

Proof. The dual of the shortest path problem is: max π t π s s.t. π j π i c ij, (i, j) A. Replacing π j by π j + α for all j V does not change the dual value, we can fix π s = 0. The theorem is true by the strong duality (because of TU). Maximum flow problem. Given two nodes s, t V and nonnegative arc capacities h ij for (i, j) A, find a maximum flow from s to t. Adding a backward arc from t to s. where h ts = +. max x ts s.t. x ik x ki = 0, i V, k V + i k V i 0 x ij h ij, (i, j) A, 11 / 27

The dual is: min (i,j) A h ij w ij s.t. u i u j + w ij 0, (i, j) A, u t u s 1, w ij 0, (i, j) A. The dual optimal solution is also integral because the constraint matrix is TU. Since replacing u j by u j + α does not change the dual, we can assume u s = 0. Given such a solution (u, w), let X = {j V u j 0}, X = V \ X = {j V u j 1}. Obviously, s X and t X. When i X, j X, we have w ij u j u i 1. So h ij w ij h ij w ij h ij. (i,j) A (i,j) A,i X,j X (i,j) A,i X,j X The lower bound is attained at the solution u j = 0 for j X and u j = 1 for j X, w ij = 1 for (i, j) A and i X, j X. 12 / 27

Theorem: The dual to the maximum s t flow problem is the minimum s t cut problem: min {h ij s X V \ {t}}. X (i,j) A,i X,j X 13 / 27

Dijkstra Algorithm for shortest path problem Given digraph G = (V, A). For edge e = (i, j), w e 0 is the cost of the direct route between nodes i and j. Problem: find shortest paths from a starting point to all other nodes. Suppose k is an intermediate node on a shortest 1 i path p i. Then the 1 k subpath p k of p i is a shortest 1 k path. Dijkstra s shortest path algorithm Step 1(Initialization): g(1) = 0, U = {1}, h(j) = w1j if (1, j) A, h(j) = otherwise. Step 2: Let i = arg minj V \U h(j). Set U U {i} and g(i) = h(i). If U = V. stop. Step 3: For all j U with (i, j) A, h(j) min(g(i) + w ij, h(j)). Return to Step 2. Complexity: O( V 2 ). 14 / 27

An example with 8 nodes: The iteration process of Dijkstra algorithm is illustrated as follows. 15 / 27

Ford-Fulkerson Algorithm for Max-flow Problem Ford-Fulkerson algorithm is also called Augmentation Path algorithm. This is an iterative method. At each iteration, the algorithm is searching for a path from the source node to the sink node along which it can send a positive flow. Such a path is referred to as augmenting path. After a flow is sent along an augmenting path the capacities of the links on that path are adjusted. These adjusted capacities are referred to as residual capacities. Correspondingly, the resulting network is referred to as residual network. The algorithm terminates when an augmenting path cannot be found 16 / 27

A max-flow example Consider the following network: Note that clearly f 24 (the smaller of the capacities leaving the source or entering the sink). 17 / 27

Iteration 1: Choose the augmenting path p 1 =< s, 1, 3, t > which has c f (p 1 ) = 12 (due to c(1, 3)) giving the residual network: 18 / 27

Iteration 2: Choose the augmenting path p 2 =< s, 2, 4, t > which has c f (p 2 ) = 4 (due to c(4, t)) giving the residual network: 19 / 27

Iteration 3: Choose the augmenting path p 3 =< s, 2, 4, 3, t > which has c f (p 3 ) = 7 (due to c(4, 3)) giving the residual network: 20 / 27

At this point there are no other augmenting paths (since vertex 3 is the only vertex with additional capacity to the sink but has no flow in from other vertices). Hence the max-flow network (=min-cut) is The maximal flow is f = 19 + 4 = 23. 21 / 27

Minimum spanning tree A tree is a connected graph without cycles. Properties of trees: A graph is a tree if and only if there is one and only one path joining any two of its vertices. A connected graph is a tree if and only if every one of its edges is a bridge. A connected graph is a tree if and only if it has N vertices and N-1 edges. A subgraph that spans (reaches out to ) all vertices of a graph is called a spanning subgraph. A subgraph that is a tree and that spans (reaches out to ) all vertices of the original graph is called a spanning tree. Among all the spanning trees of a weighted and connected graph, the one (possibly more) with the least total weight is called a minimum spanning tree (MST). The minimum spanning tree of a graph defines the cheapest subset of edges that keeps the graph in one connected component. 22 / 27

Kruskal s Algorithm Step 1 Find the cheapest edge in the graph (if there is more than one, pick one at random). Mark it with any given colour, say red. Step 2 Find the cheapest unmarked (uncoloured) edge in the graph that doesn t close a red circuit. Mark this edge red. Step 3 Repeat Step 2 until you reach out to every vertex of the graph (or you have N 1 coloured edges, where N is the number of vertices.) The red edges form the desired minimum spanning tree. 23 / 27

Figure: Minimum spanning tree 24 / 27

Minimum Steiner tree minimum Steiner Tree: Given a graph G = (V, E), and a subset of vertices T V as terminals. Find the smallest tree connecting all the vertices of T. Suppose we are given a set of sites that must be connected by wires as cheaply as possible. The minimum Steiner tree is to connect them using the smallest amount of wire. Other examples: networks of water pipes, heating ducts in buildings, VLSI circuit layout. The difference between the Steiner tree problem and the minimum spanning tree problem is that, in the Steiner tree problem, extra intermediate vertices and edges may be added to the graph in order to reduce the length of the spanning tree. These new vertices introduced to decrease the total length of connection are known as Steiner points or Steiner vertices. 25 / 27

Figure: Solution to Steiner tree tree with 3 points 26 / 27

Steiner tree often arises in network design and wiring layout problems. T = 2 shortest path, T = E optimal tree. In general minimum weight steiner tree problem is NP-hard. Steiner ratio conjecture: Let P be a set of n points on the Euclidean plane. Let L s (P) and L m (P) denote the lengths of the Steiner minimum tree and the minimum spanning tree on P, respectively. In 1968, Gilbert and Pollak conjectured that: L m (p) L s (P) 2. 3 Du and Hwang s proof (Proc. Nat. Acad. Sci., 1990; Algorithmica, 1992). N. Innami, B. H. Kim, Y. Mashiko and K. Shiohama, The Steiner Ratio Conjecture of Gilbert-Pollak May Still Be Open. Algorithmica, 2008. 27 / 27