Download presentation
Presentation is loading. Please wait.
Published byArthur Price Modified over 9 years ago
1
Linear Programming – Max Flow – Min Cut Orgad Keller
2
Orgad Keller - Algorithms 2 2 We have an objective function: Subject to constraints: Linear Programming
3
Orgad Keller - Algorithms 2 - 3 Given all parameters we want to find the optimal Linear Programming
4
Orgad Keller - Algorithms 2 - 4 It is easier to present the problem with a matrix and vectors: Linear Programming
5
Orgad Keller - Algorithms 2 - 5 Given the Primal Problem: It’s Dual Problem is defined as: The Dual Problem
6
Orgad Keller - Algorithms 2 - 6 Given a problem and it’s dual problem, then: In other words, the optimal objective function’s value for the primal problem, is equal to the optimal objective function’s value for the dual problem. Strong Duality Theorem
7
Orgad Keller - Algorithms 2 - 7 As you remember from Algorithms I Given a directed graph, two vertices and a capacity for each edge We want to find a flow function so that the flow value is maximal Maximum Flow
8
Orgad Keller - Algorithms 2 - 8 But, we are subject to some rules: What goes in must come out: Capacity restrictions: Maximum Flow
9
Orgad Keller - Algorithms 2 - 9 We’ll show by a simple example: Max Flow with Linear Programming 3 2 1 3 1
10
Orgad Keller - Algorithms 2 - 10 We want to present the example in the form: Subject to: Max Flow with Linear Programming
11
Orgad Keller - Algorithms 2 - 11 Formally: Max Flow with Linear Programming 3 2 1 3 1 But we don’t permit equalities
12
Orgad Keller - Algorithms 2 - 12 So we’ll add another edge, and change the problem’s representation a little. Max Flow with Linear Programming 3 2 1 3 1 ∞
13
Orgad Keller - Algorithms 2 - 13
14
Orgad Keller - Algorithms 2 - 14
15
Orgad Keller - Algorithms 2 - 15 As you remember from Algorithms I Given a directed graph, two vertices and a weight for each edge We want to find a minimal-weight subset of edges such that if we’ll remove them, we won’t be able to travel from to. Minimum Cut
16
Orgad Keller - Algorithms 2 - 16 In other words: We’ll choose, where:,, such that the cut value, is minimal. Minimum Cut
17
Orgad Keller - Algorithms 2 - 17 Going back to the example: Min Cut with Linear Programming 3 2 1 3 1
18
Orgad Keller - Algorithms 2 - 18 Min Cut with Linear Programming 3 2 1 3 1 What about: Is that enough? We haven’t ensured paths from to are cut. This look like And we know that
19
Orgad Keller - Algorithms 2 - 19 Min Cut with Linear Programming 3 2 1 3 1 Beside a variable for every edge, we’ll want a variable for every vertex, such that:
20
Orgad Keller - Algorithms 2 - 20 Min Cut with Linear Programming 3 2 1 3 1 Let’s take for instance: If is in the cut, that means that If is not in the cut, that means that either or or So it is the same to constrain:
21
Orgad Keller - Algorithms 2 - 21 Formally: Max Flow with Linear Programming 3 2 1 3 1 In order to ensure
22
Orgad Keller - Algorithms 2 - 22
23
Orgad Keller - Algorithms 2 - 23
24
Orgad Keller - Algorithms 2 - 24
25
Orgad Keller - Algorithms 2 - 25 We now see that the problems are dual So also according to the Strong Duality Theorem, Max Flow = Min Cut Max Flow – Min Cut Theorem
26
Orgad Keller - Algorithms 2 - 26 We want integer values for the variables, but this is LP, not IP! So how do we know that the solution will yield integer values for the variables? Theroem: If the constraints matrix is totally unimodular and the right hand side is comprised of integers, then it’s easy to find an integer solution. Integer Values
27
Orgad Keller - Algorithms 2 - 27 Definition: A Unimodular matrix is a square matrix whose determinant is 0, 1 or -1. Definition: A Totally Unimodular matrix is a matrix whose every non-singular square submatrix is unimodular. Unimodular / Totally Unimodular
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.