network flow - utkweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › network flow.pdf ·...

56
Network Flow Helia Zandi [email protected] 4/20/2016 1

Upload: others

Post on 05-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Network Flow Helia Zandi

[email protected]

4/20/2016

1

Page 2: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

2

Page 3: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

3

Page 4: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Definition

Flow Network N is a directed graph where each edge has a capacity and

each edge receives a flow. The amount of flow on an edge cannot exceed

the capacity of the edge.

In a network, the vertices are called nodes and the edges are called arcs.

The capacity function c of network N is a nonnegative function on E(D).

If a = (u, v) is an arc of D, then c(a) = c(u, v) is called the capacity of a.

The diagraph D is called the underlying diagraph of N.

There are two special vertices in a network s and t, called source and

sink, respectively. Source has only outgoing flow and sink has only

incoming flow.

4

Page 5: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Definition

5

Page 6: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Definition

In the next 20 minutes we will learn:

How much more flow the above network can take? 6

Page 7: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

7

Page 8: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Motivation The original inspiration comes from

the Cold War.

During the Cold War, the US

military was interested in knowing

what was the minimum number of

places on the railroad system they

could bomb that would completely

and accurately prevent movement

between the Soviet Union and

Eastern Europe.

8

Page 9: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Motivation The US Air Force requested a

secret report which was written in

1955 by T.E. Harris and F.S. Ross

entitled Fundamentals of a Method

for Evaluating Rail Net Capacities.

The max flow problem was

formally defined in this report.

Harris and Ross did not find a

method that was guaranteed to find

an optimal solution. The technique

they described is to use a greedy

algorithm of pushing as much flow

as possible through the network

until there is a bottleneck( a vertex

that has more flowing coming in to

it than is able to leave) 9

Page 10: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Theodore Edward "Ted" Harris

• 11 January 1919 – 3 November 2005

• An American Mathematician known for his

research in stochastic process

• Mathematics department head at RAND

corporation

• Professor at University of Southern California

• Harris inequality in statistic physic and

percolation theory is named after him

• In 1989 he received an honorary doctorate from

Chalmers Institute of Technology, Sweden

10

Page 11: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Frank S. Ross

• Chief of the Army’s Transportation Corps in

Europe

11

Page 12: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Lester Randolph Ford, Jr

• Born September 23, 1927, Huston

• An American Mathematician specializing

in network flow problems

• Developed Ford-Fulkerson algorithm for solving

max flow problem

• Ford also developed the Bellman-Ford

algorithm for finding shortest path in graphs

12

Page 13: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Delbert Ray Fulkerson

• August 14, 1924 – January 10, 1976

• An American Mathematician

• Co-developed Ford-Fulkerson algorithm

• In 1979, Fulkerson prize was established which

is now awarded every three years for outstanding

papers in discrete mathematics

• Remained at Cornell until he committed suicide

13

Page 14: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

14

Page 15: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Residual Network

15

Page 16: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Residual Network

16

Page 17: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Augmenting Path

17

Page 18: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Augmenting Path In other words it is a path which can admit additional flow from

the source to the sink (all edges along the path have residual capacity)

Augmenting Path

We will prove that if there is NO

augmenting path in a network The flow is maximum

18

Page 19: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Cut A Cut is a partition of V into sets S and T such that s ∈ S and T = V - S has t ∈ T.

The net flow across the cut is f(S,T) and the capacity of the cut is c(S,T).

19

Page 20: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Cut

20

Page 21: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

21

Page 22: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut

22

Page 23: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

23

Page 24: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

24

Page 25: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

25

Page 26: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

26

Page 27: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

27

Page 28: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

28

Page 29: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

29

Page 30: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-cut

30

Page 31: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Theorem

31

Page 32: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut

32

Page 33: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm

33

Page 34: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

34

Page 35: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

35

Page 36: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

2,1

4,4 3,3 1,1

36

Page 37: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

2,1

4,4 3,3 1,1

37

Page 38: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

2,2

4,4 3,3 1,1

38

Page 39: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm 2,1

4,4 3,3 1,1

2,2

4,4 3,3 1,1

Max flow value = 6 39

Page 40: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Max-Flow Min-Cut Algorithm

40

Page 41: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Multiple sources and Sinks Problems with multiple sources and sinks can be reduced to the

single source/sink case.

In these cases a supersource is introduced. This consists of a vertex

connected to each of the sources with edges of infinite capacity. The

same definition applies to supersink.

41

Page 42: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

42

Page 43: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Applications Modelled after transportation in a network

The power is in efficient solutions to problems:

bipartite matching

edge-disjoint paths

vertex-disjoint paths

Communication network

scheduling

circulation

image segmentation

weighted bipartite matching

several “easier” proofs in graph theory

Theorem of Hall

Theorem of Menger

43

Page 44: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Maximum Bipartite Matching The solution to the maximum flow problem gives us a solution to the

maximum bipartite matching problem

44

Page 45: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Edge-disjoint Paths Given a digraph G=(V,E) and two nodes s and t , what is the maximum

number of edge-disjoint s-t paths.

The maximum flow is equal to the maximum number of edge-disjoint paths.

45

Page 46: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Graph Connectivity Given a digraph G=(V,E) and two nodes and t , what is the minimum

number of edges whose removal disconnects s and t

Menger’s Theorem. The maximum number of edge-disjoint s-t

paths is equal to the minimum number of edges that disconnects s

from t

Theorem. A graph is n-edge-connected, if and only if every two

vertices of G is connected by at least n edge-disjoint path.

46

Page 47: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Circulation

47

Page 48: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Circulation

The original circulation problem has a solution iff its network flow problem has

a maximum flow value D

48

Page 49: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Circulation

49

Page 50: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

50

Page 51: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Open Problems • Every 2-edge connected graph has a 5-flow. Tutte(1954)

• Every 2-edge- connected graph with no Peterson minor has a 4-

flow. Tutte(1966)

• Every 2-edge- connected graph without 3-edge cuts has a 3-flow.

Tutte(1972)

51

Page 52: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Table of Contents

Basic Definitions

Motivation and History

Theory

Max-Flow Min Cut

Applications

Open Problems

Homework

References

52

Page 53: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Homework

3,3

4,3 5,3 4,4

3,3

53

Page 54: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

Homework

3. Let N be a network and f a flow in N. Prove that the value of flow in N

equals the net value into the sink t of network N.

54

Page 55: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

References • Applied and Algorithmic Graph Theory, Gary Chartland, Orturd R. Oellermann, 1993

• Graph Theory, J.A. Bondy, U.S.R. Murty, 2008

• https://en.wikipedia.org/wiki/Flow_network

• http://www.me.utexas.edu/~jensen/network_02/announce.html

• http://blogs.cornell.edu/info4220/2015/03/10/the-origin-of-the-study-of-network-flow/

• https://courses.cs.washington.edu/courses/csep521/13wi/video/archive/html5/video.ht

ml?id=csep521_13wi_9

• http://faculty.ycp.edu/~dbabcock/PastCourses/cs360/lectures/lecture24.html

• http://slideplayer.com/slide/4705331/

• http://homepages.cwi.nl/~lex/files/histtrpclean.pdf

• http://courses.cs.vt.edu/~cs4104/murali/Fall09/lectures/lecture-20-network-flow.pdf

• http://www.cs.princeton.edu/courses/archive/spr04/cos226/lectures/maxflow.4up.pdf

• http://staff.ustc.edu.cn/~csli/graduate/algorithms/book6/chap27.htm

• http://www.me.utexas.edu/~jensen/network_02/topic_pages/sbayti/history.html#Genera

lized Network Applications

55

Page 56: Network Flow - UTKweb.eecs.utk.edu › ~cphill25 › cs594_spring2016 › Network Flow.pdf · Definition Flow Network N is a directed graph where each edge has a capacity and each

References • http://www.es.ele.tue.nl/education/5MC10/9flow.pdf

• http://www.geeksforgeeks.org/find-edge-disjoint-paths-two-vertices/

• https://en.wikipedia.org/wiki/Circulation_problem

• http://www2.hawaii.edu/~nodari/teaching/s15/Notes/Topic-20.html

56