Minimum Cost Flow and Minimum Cut - PowerPoint PPT Presentation

About This Presentation
Title:

Minimum Cost Flow and Minimum Cut

Description:

Minimum Cost Flow and Minimum Cut Lecture 7: Jan 31 Minimum Cut An s-t cut is a set of edges whose removal disconnect s and t Minimum Cost Flow and Minimum Cut ... – PowerPoint PPT presentation

Number of Views:101
Avg rating:3.0/5.0
Slides: 27
Provided by: CSE
Category:
Tags: cost | cut | flow | mincut | minimum

less

Transcript and Presenter's Notes

Title: Minimum Cost Flow and Minimum Cut


1
Minimum Cost Flowand Minimum Cut
  • Lecture 7 Jan 31

2
Flows
  • An s-t flow is a function f on the edges
    which satisfies
  • (capacity constraint)
  • (conservation of flows)

Value of the flow
3
Minimum Cost Flows
Goal Build a cheap network to satisfy the flow
requirement.
Input
  • A directed graph G
  • A source vertex s
  • A sink vertex t
  • A capacity function c on the edges, i.e. cE-gtR
  • A cost function w on the edges, i.e. wE-gtR
  • A flow requirement k

Output an s-t flow f of value k which
minimizes Sf(e) w(e)
4
Special cases
  • Shortest path find a shortest path between s
    and t
  • A minimum cost flow with k 1
  • Maximum flow find a maximum flow between s and
    t
  • Every edge in the original graph has cost 0.
  • Disjoint paths connect s and t by k paths
    with min of edges
  • Every edge in the original graph has cost 1 and
    capacity 1.

5
Stuctures Recap
Negative cycle, Shorest augmenting path
M-augmenting paths
Bipartite matchings
Residual graph augmenting paths
Weighted Bipartite matchings
Maximum flows
Shortest paths
???
Minimum Cost Flows
6
Residual Graph
f(e) 2
c(e) 10
How about the cost of the flow?
c(e) 8
c(e) 2
7
Residual Graph
f(e) 2
f(e) 2
c(e) 10
c(e) 10, w(e)
c(e) 8
c(e) 8, w(e)
c(e) 2, -w(e)
c(e) 2
Min-cost Flow
Max Flow
8
Weighted Bipartite Matching
  • Bipartite (Weighted) Matchings
  • First find a perfect matching, and then
  • improve it using negative cycles in the
    residual graph.
  • Start from an empty matching, and then find a
    larger matching
  • using shortest augmenting paths in the
    residual graph.
  • Primal-Dual approach

9
Minimum Cost Flow Algorithm
  • Minimum cost flows
  • Strategy start with a maximum flow and improve
    the cost?
  • Proof idea consider the union of two maximum
    flows.

10
Finding the augmenting structure
Residual flow f -1
An s-t flow f of value k with total cost W
s
s
t
t
An s-t flow f of value k with total cost W
s
s
t
t
Idea Consider the union
11
Cycle decompositions
In the union of f -1 ? f, every vertex has
indegree outdegree.
Eulerian digraphs
Every Eulerian digraph can be decomposed into
directed cycles.
Since W gt W, we have W - W lt 0. Therefore,
there is a negative cost directed cycle.
12
Negative cycles
If we have a cheaper flow, then there exists a
negative cycle.
Suppose we have a negative cycle. By sending a
flow along the cycle, flow conservations are kept
in every vertex, and so the value of the flow is
the same. And the cost decreases!
Key A flow has minimum cost ? there is no
negative cycle in the residual graph!
13
Minimum Cost Flow Algorithm
  • A cheaper flow because
  • Flow conservations
  • Negative cost

No negative cost directed cycle ? The current
flow is of minimum cost.
14
Successive Shortest Path Algorithm
  • Minimum cost flows
  • Strategy 1 start with a maximum flow and
    improve the cost.
  • Strategy 2 keep flow cost minimum and increase
    the flow value.
  • Algorithm
  • Start with an empty flow
  • Always find an augmenting path with minimum cost.

15
Speeding Up
  • Maximum Flow
  • shortest augmenting path O(n2m)
  • capacity scaling O(nm n2
    log(C))
  • Minimum Cost Flow
  • min mean-length cycle O(n2m3 log(n))
  • capacity scaling O((m log(n))(m
    n log(n))

16
Weighted Bipartite Matchings
Goal Find a matching with maximum total weight
Reduce to min-cost flow by adding a source and a
sink.
17
The Transportation Problem
  • Input
  • p plants, each has supply s(i)
  • q warehouses, each has demand t(j)
  • cost of shipping from plant i to warehouse j
    is d(i,j)

Goal Find a cheapest shipping plan to satisfy
all the demands.
18
Optimal Delivery
1
2
3
4
n
  • a car with capacity p going from station 1 to
    n.
  • delivery request from station i to station j
    is r(i,j), each unit gains c(i,j) dollars.

Goal Find a delivery plan to maximize the profit.
19
Problems Recap
Minimum spanning trees
Stable matchings
Bipartite matchings
Weighted Bipartite matchings
General matchings
Maximum flows
Shortest paths
Minimum Cost Flows
Linear programming
20
Minimum Cut
  • An s-t cut is a set of edges whose removal
    disconnect s and t

Minimum s-t cut problem minimize this capacity
of a s-t cut
Image segmentation
21
Project Selection
  • Input
  • n equipments, each has cost c(i)
  • m projects, each has profit p(j)
  • given the equipment requirement for each project
  • Output
  • to maximize the profit
  • what equipments to buy
  • what projects to take

22
Global Min-Cut
Find a minimum cost subset of edges to disconnect
the graph.
n2 min s-t cut computation
n-1 min s-t cut computation is enough
23
Gomory-Hu Tree
A compact representation of all minimum s-t cuts
in undirected graphs!
To compute s-t cut, look at the unique s-t path
in the tree, and the bottleneck capacity is the
answer!
And furthermore the cut in the tree is the cut of
the graph!
24
Computing Gomory-Hu Tree
Divide and conquer, n-1 s-t cut computation.
25
Important Properties
submodular function
In undirected graphs, d(X)d(V-X), and so
26
Key Proof
Let U be a minimum s-t cut, and let u,v in
U. Then there exists a minimum u-v cut W with W
U.
Write a Comment
User Comments (0)
About PowerShow.com