max flow min cut. theorem the maximum value of an st-flow in a digraph equals the minimum capacity...

45
Max Flow Min Cut

Upload: celeste-barnett

Post on 31-Mar-2015

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

Max Flow Min Cut

Page 2: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

Theorem

The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut.

Theorem

If every arc has integer capacity, then in a maximum flow every arc has integer flow.

Page 3: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Page 4: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Find a maximum st-flow and a minimum st-cut

s t

Page 5: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

Page 6: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS

1

3

5

2

4

8

6

9

7

0f

Page 7: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

0f

Page 8: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

Page 9: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

}9,7,4,{sS

Page 10: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

}9,7,4,{sS },9,7,4,{ tsS

Page 11: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

}9,7,4,{sS },9,7,4,{ tsS

STOP St

Page 12: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

}9,7,4,{sS },9,7,4,{ tsS

STOP St

Page 13: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS

}9,7,4,{sS },9,7,4,{ tsS

STOP St 3),9()9,7(

)7,4()4,(

tff

fsf

Page 14: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS

}9,7,4,{sS },9,7,4,{ tsS

STOP St 3),9()9,7(

)7,4()4,(

tff

fsf

Page 15: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

Page 16: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf}{sS }1,{sS }2,1,{sS

},6,8,5,2,1,{ tsS

STOP St

Page 17: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf}{sS }1,{sS }2,1,{sS

},6,8,5,2,1,{ tsS

STOP St

1),6(...

)2,1()1,(

tf

fsf

Page 18: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf}{sS }1,{sS }2,1,{sS

},6,8,5,2,1,{ tsS

STOP St

1),6(...

)2,1()1,(

tf

fsf

Page 19: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

Page 20: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS

Page 21: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS }6,{sS

Page 22: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS }6,{sS

},6,{ tsS STOP St

Page 23: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

331

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS }6,{sS

},6,{ tsS STOP St

2),6(,1)6,( tfsf

Page 24: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

332

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS }6,{sS

},6,{ tsS STOP St

2),6(,1)6,( tfsf

Page 25: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

332

3

1

11

1 21

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),9()9,7(

)7,4()4,(

tff

fsf

1),6(...

)2,1()1,(

tf

fsf

}{sS }6,{sS

},6,{ tsS STOP St

2),6(,1)6,( tfsf

5)( fv

Page 26: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

332

3

1

11

1 21

3

30

Minimum Cut

s t1

3

5

2

4

8

6

9

7

5)( fv

Page 27: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

332

3

1

11

1 21

3

30

Minimum Cut

s t1

3

5

2

4

8

6

9

7

5)( fv

Page 28: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

21

3

2

1

2 31

332

3

1

11

1 21

3

30

Minimum Cut

s t1

3

5

2

4

8

6

9

7

5)( fv5113),( SSc

Page 29: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

1

31

1

2

3

1

1

3

3

s t1

3

5

2

4

8

6

9

7

So f is a max flow

Page 30: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

Page 31: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS 0f

},6,8,7,4,{ tsS

Page 32: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t

}{sS }4,{sS

1

3

5

2

4

8

6

9

7

}7,4,{sS

},6,8,7,4,{ tsS

3),6()6,8()8,9(

)9,7()7,4()4,(

tfff

ffsf

Page 33: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),6()6,8()8,9(

)9,7()7,4()4,(

tfff

ffsf

Page 34: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),6()6,8()8,9(

)9,7()7,4()4,(

tfff

ffsf}{sS }6,{sS

}8,6,{sS

},9,8,6,{ tsS

Page 35: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),6()6,8()8,9(

)9,7()7,4()4,(

tfff

ffsf}{sS }6,{sS

}8,6,{sS

},9,8,6,{ tsS

2)9,8()8,6(

1),9()6,(

ff

tfsf

Page 36: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1

2

3

2

1

2 32

323

31

1

11

1 2

3

30

Algorithm

s t1

3

5

2

4

8

6

9

7

3),6()6,8()8,9(

)9,7()7,4()4,(

tfff

ffsf}{sS }6,{sS

}8,6,{sS

},9,8,6,{ tsS

2)9,8()8,6(

1),9()6,(

ff

tfsf

Page 37: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

Hall’s Theorem from

Max Flow Min Cut

Page 38: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,
Page 39: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

1 11

1

1

Direct all edges from s to t and assign all arcs unit capacity

Adds and t, adjacent to all of A and B respectively.

Page 40: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

We have to show that Hall’s Condition XX )(gives a 1-factor.

Page 41: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

A flow of value is enough to guarantee a 1-factor.

A

Page 42: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

So all we have to do is show for each cut S.

ASSc ),(

Page 43: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

So all we have to do is show for each cut S.

ASSc ),(

Page 44: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,
Page 45: Max Flow Min Cut. Theorem The maximum value of an st-flow in a digraph equals the minimum capacity of an st-cut. Theorem If every arc has integer capacity,

),()\,()\,(),( tSBeSBSAeSAseSSc )\,(\ SBSAeSBSA

)(\ SASA

ASASA \