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

Similar documents
6. Lecture notes on matroid intersection

5. Lecture notes on matroid intersection

1. Lecture notes on bipartite matching

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Theorem 2.9: nearest addition algorithm

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

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

1. Lecture notes on bipartite matching February 4th,

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

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

Notes for Lecture 20

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

5 MST and Greedy Algorithms

5 MST and Greedy Algorithms

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

1 Minimum Spanning Trees (MST) b 2 3 a. 10 e h. j m

8 Matroid Intersection

Introduction to Graph Theory

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

22 Elementary Graph Algorithms. There are two standard ways to represent a

Shannon Switching Game

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

Steiner Trees and Forests

Notes for Lecture 24

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Lecture 3: Graphs and flows

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

Figure 2.1: A bipartite graph.

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Solutions for the Exam 6 January 2014

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

We ve done. Introduction to the greedy method Activity selection problem How to prove that a greedy algorithm works Fractional Knapsack Huffman coding

Basics of Graph Theory

22 Elementary Graph Algorithms. There are two standard ways to represent a

Rigidity, connectivity and graph decompositions

Combinatorial Optimization

Matching Theory. Figure 1: Is this graph bipartite?

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

Introduction to Graph Theory

CS261: Problem Set #2

Lecture Orientations, Directed Cuts and Submodular Flows

Graphs and Network Flows ISE 411. Lecture 7. Dr. Ted Ralphs

1 Digraphs. Definition 1

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

Bipartite Matching & the Hungarian Method

Algorithm Design and Analysis

by conservation of flow, hence the cancelation. Similarly, we have

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

Lecture 11: Maximum flow and minimum cut

Notes on Minimum Cuts and Modular Functions

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

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

Solving problems on graph algorithms

3 No-Wait Job Shops with Variable Processing Times

Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching. A maximal matching cannot be enlarged by adding another edge.

PTAS for Matroid Matching

Paths, Flowers and Vertex Cover

In this lecture, we ll look at applications of duality to three problems:

Lecture 7: Bipartite Matching

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

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

Exam problems for the course Combinatorial Optimization I (DM208)

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Chapter 9 Graph Algorithms

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

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Matching and Planarity

Chain Packings and Odd Subtree Packings. Garth Isaak Department of Mathematics and Computer Science Dartmouth College, Hanover, NH

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Dual-fitting analysis of Greedy for Set Cover

Assignment 4 Solutions of graph problems

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Notes on Minimum Spanning Trees. Red Rule: Given a cycle containing no red edges, select a maximum uncolored edge on the cycle, and color it red.

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

CS 598CSC: Approximation Algorithms Lecture date: March 2, 2011 Instructor: Chandra Chekuri

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

LECTURES 3 and 4: Flows and Matchings

Basic Graph Theory with Applications to Economics

The Encoding Complexity of Network Coding

Integer Programming Theory

8.2 Paths and Cycles

1 Matchings in Graphs

Mathematical Tools for Engineering and Management

Jörgen Bang-Jensen and Gregory Gutin. Digraphs. Theory, Algorithms and Applications. Springer

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Approximation Algorithms

The minimum cost spanning tree problem

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

1 Matching in Non-Bipartite Graphs

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees

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

Lecture 8: The Traveling Salesman Problem

Lecture Notes for IEOR 266: Graph Algorithms and Network Flows

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

18 Spanning Tree Algorithms

Graphs: Introduction. Ali Shokoufandeh, Department of Computer Science, Drexel University

1 The Traveling Salesperson Problem (TSP)

Polynomial time approximation algorithms

Transcription:

Graphs and Network Flows IE411 Lecture 21 Dr. Ted Ralphs

IE411 Lecture 21 1 Combinatorial Optimization and Network Flows In general, most combinatorial optimization and integer programming problems are difficult to solve. Some classes of combinatorial optimization problems have direct, efficient combinatorial algorithms. Many of these are somehow related to network flows. For example, we will see the connections between all of these problems. Shortest Path Problem Maximum Flow Problem Matching Problem Minimum Spanning Tree Problem Minimum Cut Problem Assignment Problem Postman Problem

IE411 Lecture 21 2 IP Formulation of MST Let A(S) be the set of arcs contained in the subgraph of G = (N, A) induced by the node set S. Let x ij be a 0-1 variable that indicates whether we select arc (i, j) to be in the spanning tree. Minimize subject to c ij x ij (1) (i,j) A (i,j) A (i,j) A(S) x ij = n 1 (2) x ij S 1 S N (3)

IE411 Lecture 21 3 LP Relaxation For any LP, we can use reduced costs and complementary slackness optimality conditions to assess whether a given feasible solution is optimal. Notice that when S = N, constraint (3) is redundant. We associate a potential µ S with every S N. From the dual, we find that µ N is free but µ S 0. Then, the reduced cost of arc (i, j) is c µ ij = c ij + A(S):(i,j) A(S) µ S.

IE411 Lecture 21 4 Results Lemma 1. A solution x of the MST problem is an optimal solution to the LP relaxation of the IP formulation if and only if we can find potentials µ S defined on node sets S so that c µ ij = 0 if x ij > 0 c µ ij 0 if x ij = 0 Theorem 1. [13.9] If x is the solution generated by Kruskal s Algorithm, then x solves both the integer program and its LP relaxation.

IE411 Lecture 21 5 Defining Potentials Set µ N to the negative cost of the last arc added to the tree. Let S(i, j) be the component created by adding arc (i, j) to the tree. As the algorithm progresses, when it adds arc (p, q) to the tree, it combines component S(i, j) with one or more other nodes to define a larger component. Set µ S(i,j) = c pq c ij.

IE411 Lecture 21 6 Proving Optimality Check reduced cost of every arc. What do we find? Theorem 2. [13.10] The polyhedron defined by the LP relaxation of the packing formulation of the MST problem has integer extreme points.

IE411 Lecture 21 7 Matroids Notice the algorithms for finding minimum weight spanning trees depend on two properties: Any acyclic subgraph with fewer than n 1 edges can always be extended to a spanning tree. If we have two acyclic subgraphs, one of which includes more edges, the smaller can be extended with an edge from the larger. We can generalize these properties to other combinatorial problems.

IE411 Lecture 21 8 Submodular Functions Definition 1. A set function f : 2 N R is submodular if f(a) + f(b) f(a B) + f(a B) for all A, B N. Definition 2. A set function f is nondecreasing if f(a) f(b) for all A, B with A B N. Proposition 1. A set function f is nondecreasing and submodular if and only if f(a) f(b) + [f(b {j}) f(b)]. j A\B

IE411 Lecture 21 9 Submodular Polyhedra We now consider a submodular polyhedron defined by P(f) = {x R n + j S x j f(s) for S N}. We are interested in solving the associated submodular optimization problem min{cx : x P(f)} Consider the following greedy algorithm. Order the variables so that c 1 c 2 c r > 0 c r+1 c n. Set x i = f(s i ) f(s i 1 ) for i = 1,..., r and x j = 0 for j > r, where S i = {1,..., i} for i = 1,..., r and S 0 =.

IE411 Lecture 21 10 The Greedy Algorithm and Matroids Surprisingly, the greedy algorithm solves all submodular optimization problems! Furthermore, when f is integer-valued, the greedy algorithm provides an integral solution. In the special case when f(s {j}) f(s) {0, 1}, we call f a submodular rank function. Definition 3. Given a submodular rank function r, a set A N is independent if r(a) = A. The pair (N, F), where F is the set of independent sets is called a matroid.

IE411 Lecture 21 11 Properties of Matroids Given a matroid (N, F). 1. If A is an independent set and B A, then B is an independent set. 2. If A and B are independent sets with A > B, then there exists some j A \ B such that B {j} is independent. 3. Every maximal independent set has the same cardinality. Pairs (N, F) with property 1 are independence systems. In fact, properties 1 and 2 are equivalent to our original definition and properties 2 and 3 are equivalent.

IE411 Lecture 21 12 Common Matroids Matric Matroids Ground set is the set of columns/rows of a matrix. Independent sets are the sets of linearly independent rows/columns. Graphic Matroid The ground set is the set of edges of a graph. Independent sets are the sets of edges of the graph that do not form a cycle. Partition Matroid Ground set is the union of m finite disjoint sets E i for i = 1,..., r. Independent sets are sets formed by taking at most one element from each set E i.

IE411 Lecture 21 13 Generalizing from Spanning Trees Everything we learned from spanning trees can be generalized. All maximal independent sets have the same cardinality and are called bases. A spanning tree is a basis of the graphic matroid. A fundamental property of matroids is that it is always possible to find a basis of minimum weight using a greedy algorithm. In fact, an independence system is a matroid if and only if the greedy algorithm always finds a basis of minimum weight.

IE411 Lecture 21 14 Red-Blue Algorithm for the Minimum Spanning Tree Problem Start with all edges uncolored. The Blue Rule Find a cut with no BLUE edges. Pick an edge of minimum weight and color it BLUE. The Red Rule Find a cycle containing no RED edges. Pick an uncolored edge of maximum weight and color it RED. Arbitrary application of the RED and BLUE rules result in a minimum weight spanning tree.

IE411 Lecture 21 15 Generalizing to Matroids A cycle is a setwise minimal dependent set. A cut is a setwise maximal subset that intersects all maximal independent sets. The Red-Blue Algorithm can be applied to any matroid to find a basis of minimum weight. Matroids arise naturally in many contexts. We will see them later in the assignment problem context.

IE411 Lecture 21 16 Matching Problems MST and Matching Problems are two combinatorial optimization problems that are defined over graphs with a weight associated with each arc. A matching in a graph is a set of edges with the property that no two share a common endpoint. Two well-known matching problems Find a matching that has as many edges as possible. Given weights for each edge, find a matching with the largest total weight. Matching algorithms use the concept of augmentations, but detecting and performing augmentations efficiently is more complicated here.

IE411 Lecture 21 17 Definitions Given a graph G = (N, A), the objective of the matching problem is to find a maximum matching M of G. We say that the matching is complete or perfect when the cardinality of M is N 2. Given a matching M in G, edges in M are called matched edges; others are free edges. Nodes that are not incident upon any matched edge are called exposed; remaining are matched.

IE411 Lecture 21 18 Definitions (con t) A path p = [u 1, u 2,, u k ] is called alternating if edges (u 1, u 2 ), (u 3, u 4 ) are free and (u 2, u 3 ), (u 4, u 5 ) are matched. An alternating path p is called augmenting if both u 1 and u k are exposed.

IE411 Lecture 21 19 Augmenting a Matching Lemma 2. Let P be the set of edges on an augmenting path p = [u 1, u 2,, u 2k ] in a graph G with respect to the matching M. Then M = M P is a matching of cardinality M + 1. Proof:

IE411 Lecture 21 20 Maximum Matching Theorem 3. A matching M in a graph G is maximum if and only if there is no augmenting path in G with respect to M. Theorem characterizes maximum matchings in terms of augmenting paths. Like maximum flow, it suggests an algorithm: Start with any matching. Repeatedly discover augmenting paths. All known algorithms for matchings are based on this idea, but the details are quite involved...except for the case of bipartite graphs.

IE411 Lecture 21 21 Bipartite Matching and Network Flow A graph G = (N, A) is a bipartite graph if we can partition its node set into two subsets N 1 and N 2 so that for each arc (i, j) A either (i) i N 1 and j N 2 or (ii) i N 2 and j N 1. We can reduce bipartite matching problem to maximum flow problem for simple networks and solve efficiently by making use of any algorithm for maximum flow. How can we convert the bipartite matching problem into an equivalent maximum flow problem?

IE411 Lecture 21 22 Maximum Matching Lemma 3. The cardinality of the maximum matching in a bipartite graph equals the value of the maximum flow in the corresponding maximum flow network. Proof: 1. Given any matching M, we can construct a feasible flow in N(G) with value M. 2. Given a maximum flow in N(G), we can construct a matching with cardinality of the maximum flow value.

IE411 Lecture 21 23 Notes on Maximum Cardinality Matching We can solve the bipartite matching problem in O( n m) time. Asymptotically fastest algorithm for bipartite matching. Non-Bipartite Matching Reduction to maximum flow does not seem to carry over. Augmenting path theorem holds for general graphs, so idea of repeatedly augmenting can be extended. Finding augmenting paths is more difficult with non-bipartite structure.

IE411 Lecture 21 24 Weighted Matching Given the graph G = (N, A) with a corresponding weight w ij for each arc (i, j), the objective of the weighted matching problem is to find a matching with the largest possible sum of weights. Assumptions Underlying graph is complete. Underlying graph has even number of nodes. Bipartite case Additionally assume underlying graph has node sets that are equal in size. This problem is also known as the Assignment Problem.

IE411 Lecture 21 25 Assignment Problem Write the IP formulation for the Assignment Problem. Assignment Problem is a special case of which network flow problem? How can we solve the Assignment Problem?

IE411 Lecture 21 26 Matching and the Postman Problem Given an undirected graph (G, A), the postman problem is to find the shortest tour that traverses each edge at least once. A graph for which it is possible to do this while traversing each edge exactly once is called Eulerian. An undirected graph is Eulerian if and only if every node has even degree. How can we use this fact to solve the postman problem? How can we extend this to directed graphs?

IE411 Lecture 21 27 Back to Matroids: Matroid Intersection Consider two matroids M 1 = (N, F 1 ) and M 2 = (N, F 2 ) defined on the same ground set N and with the same rank k. The cardinality of the maximum cardinality set in F 1 F 2 is min r 1(S) + r 2 (N \ S) S N Thus, M 1 and M 2 admit a common basis if and only if for every S N, we have r 1 (S) + r 2 (N \ S) k. A perfect matching in a bipartite graph is a common basis for two partition matroids, one associated with each set of nodes. From this, we can derive that G has a perfect matching if and only if the minimum vertex cover is of size at least k. Note that this is also a consequence of the max flow-min cut theorem.

IE411 Lecture 21 28 More on Matroid Intersection Associated problems are that of finding the largest common independent set of M 1 and M 2 and that of finding the common independent set of minimum/maximum weight. These problems can be solved efficiently in general for two matroids (but not for three or more). Associated problems

IE411 Lecture 21 29 Back to Matroids: Max Flow and Min Cut Matroids The maximum flow problem can be viewed as a combinatorial problem as follows. Let us consider a network G = (N, A) with associated cost vector c and capacities u, as usual. We designate one edge e as a special edge. We consider a collection F of (not necessarily distinct) cycles, each including the special edge. Any collection in which no more than u ij cycles include arc (i, j) for all (i, j) A is called feasible. Then the maximum flow problem is to find a feasible collection with the largest cardinality. We can define an analog of the minimum cut problem similarly. This problem can be interpreted in terms of general matroids, but the max flow-min cut does not hold in this more general setting.