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

Post on 31-Mar-2015

217 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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, then in a maximum flow every arc has integer flow.

1

2

3

2

1

2 3

33

3

1

11

1 2

3

30

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Hall’s Theorem from

Max Flow Min Cut

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.

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

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

A

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

ASSc ),(

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

ASSc ),(

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

)(\ SASA

ASASA \

top related