SlideShare uma empresa Scribd logo
1 de 67
Baixar para ler offline
Minimum Cut
    郭至軒(KuoE0)
   KuoE0.tw@gmail.com
        KuoE0.ch
Cut
cut (undirected)
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                  undirected graph
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                  undirected graph
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                  undirected graph
A partition of the vertices of a graph into two
disjoint subsets

              1                 4
              2                 6
              3                 7
              5                 8
                                9



                                    undirected graph
Cut-set of the cut is the set of edges whose
end points are in different subsets.


              1                  4
              2                  6
              3                  7
              5                  8
                                 9



                                     undirected graph
Cut-set of the cut is the set of edges whose
end points are in different subsets.


              1                  4
              2                  6
              3                  7
              5                  8
                                 9
                   Cut-set

                                     undirected graph
weight = number of edges or sum of weight
on edges


             1                  4
             2                  6
             3                  7
             5                  8
                                9
                  weight is 7

                                    undirected graph
cut (directed)
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                    directed graph
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                    directed graph
A partition of the vertices of a graph into two
disjoint subsets
                3

        1                     7


                4        6            9

        2                     8

                5
                                    directed graph
A partition of the vertices of a graph into two
disjoint subsets

              1                 4
              2                 6
              3                 7
              5                 8
                                9



                                    directed graph
Cut-set of the cut is the set of edges whose
end points are in different subsets.


              1                  4
              2                  6
              3                  7
              5                  8
                                 9



                                     directed graph
Cut-set of the cut is the set of edges whose
end points are in different subsets.


              1                  4
              2                  6
              3                  7
              5                  8
                                 9



                                     directed graph
Cut-set of the cut is the set of edges whose
end points are in different subsets.


              1                  4
              2                  6
              3                  7
              5                  8
                                 9
                   Cut-set

                                     directed graph
weight = number of edges or sum of weight
on edges


             1                 4
             2                 6
             3                 7
             5                 8
                               9
              weight is 5⇢ or 2⇠

                                   directed graph
s-t cut
1. one side is source


2. another side is sink


3. cut-set only consists of edges going
from source’s side to sink’s side
Source       Sink       Other

         3

1                   7


         4   6          9

2                   8

         5
                        flow network
Source       Sink

         3

1                   7


         4   6          9

2                   8

         5
                        flow network
Source       Sink

         3

1                   7


         4   6          9

2                   8

         5
                        flow network
cut-set only consists of edges going
from source’s side to sink’s side


              1                  4
              2                  6
              3                  7
              5                  8
                                 9



                                       flow network
cut-set only consists of edges going
from source’s side to sink’s side


              1                  4
              2                  6
              3                  7
              5                  8
                                 9
                  weight is 6

                                       flow network
Max-Flow Min-Cut Theorem
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                       4/4
                   2             4
           3/3                        4/4

       1         1/4                        6

           3/8                        2/3
                   3             5
                       2/2
       total flow = 6, flow on cut = 3 + 3 = 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                       4/4
                   2             4
           3/3                        4/4

       1         1/4                        6

           3/8                        2/3
                   3             5
                       2/2
       total flow = 6, flow on cut = 3 + 3 = 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                        4/4
                   2              4
           3/3                         4/4

       1         1/4                         6

           3/8                         2/3
                   3              5
                        2/2
      total flow = 6, flow on cut = 3 + 4 - 1 = 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                        4/4
                   2              4
           3/3                         4/4

       1         1/4                         6

           3/8                         2/3
                   3              5
                        2/2
      total flow = 6, flow on cut = 3 + 4 - 1 = 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                           4/4
                    2               4
            3/3                          4/4

       1          1/4                             6

            3/8                          2/3
                    3               5
                           2/2
           total flow = 6, flow on cut = 4 + 2= 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                           4/4
                    2               4
            3/3                          4/4

       1          1/4                             6

            3/8                          2/3
                    3               5
                           2/2
           total flow = 6, flow on cut = 4 + 2= 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                           4/4
                    2               4
            3/3                          4/4

       1          1/4                             6

            3/8                          2/3
                    3               5
                           2/2
           total flow = 6, flow on cut = 4 + 2= 6
Observation 1
The network flow sent across any cut is equal to the
amount reaching sink.
                           4/4
                    2               4
            3/3                          4/4

       1          1/4                             6

            3/8                          2/3
                    3               5
                           2/2
           total flow = 6, flow on cut = 4 + 2= 6
Observation 2
Then the value of the flow is at most the capacity of
any cut.
                            4
                   2                   4
           3                               4

       1       4                               6

           8                               3
                   3                   5
                            2
                       It’s trivial!
Observation 2
Then the value of the flow is at most the capacity of
any cut.
                            4
                   2                   4
           3                               4

       1       4                               6

           8                               3
                   3                   5
                            2
                       It’s trivial!
Observation 3
Let f be a flow, and let (S,T) be an s-t cut whose
capacity equals the value of f.
                           4/4
                    2               4
           3/3                              4/4

       1         1/4                              6

           3/8                              2/3
                    3               5
                             2/2
                  f is the maximum flow
                 (S,T) is the minimum cut
Observation 3
Let f be a flow, and let (S,T) be an s-t cut whose
capacity equals the value of f.
                           4/4
                    2               4
           3/3                              4/4

       1         1/4                              6

           3/8                              2/3
                    3               5
                             2/2
                  f is the maximum flow
                 (S,T) is the minimum cut
Max-Flow

EQUAL

Min-Cut
Example
4
        2       4
    3               4

1       4               6

    8               3
        3       5
            2
Maximum Flow = 6
                4/4
            2         4
    3/3                   4/4

1         1/4                   6

    3/8                   2/3
            3         5
                2/2
Residual Network
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
Minimum Cut = 6
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
Minimum Cut = 6
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
Minimum Cut = 6
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
Minimum Cut = 6
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
The minimum capacity
       limit
 the maximum flow!
find a s-t cut
Maximum Flow = 6
                4/4
            2         4
    3/3                   4/4

1         1/4                   6

    3/8                   2/3
            3         5
                2/2
Travel on Residual Network
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
start from source
                0/4
            2          4
    0/3                    0/4

1         3/4                    6

    5/8                    1/3
            3          5
                0/2
don’t travel through full edge
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
don’t travel through full edge
                0/4
            2         4
    0/3                   0/4

1         3/4                   6

    5/8                   1/3
            3         5
                0/2
no residual edge
                 0/4
            2          4
    0/3                       0/4

1         3/4                       6

    5/8                       1/3
            3          5
                 0/2
no residual edge
                 0/4
            2          4
    0/3                       0/4

1         3/4                       6

    5/8                       1/3
            3          5
                 0/2
s-t cut
                 0/4
            2             4
    0/3                       0/4

1         3/4                       6

    5/8                       1/3
            3             5
                 0/2
s-t cut
                 0/4
            2             4
    0/3                       0/4

1         3/4                       6

    5/8                       1/3
            3             5
                 0/2
result of starting from sink
                 0/4
             2         4
     0/3                   0/4

1          3/4                   6

     5/8                   1/3
             3         5
                 0/2
result of starting from sink
                 0/4
             2         4
     0/3                   0/4

1          3/4                   6

     5/8                   1/3
             3         5
                 0/2
Minimum cut is non-unique!
time complexity:
based on max-flow algorithm

 Ford-Fulkerson algorithm   O(EF)


 Edmonds-Karp algorithm     O(VE2)


     Dinic algorithm        O(V2E)
Stoer Wagner
  only for undirected graph

time complexity: O(N3) or O(N2log2N)
Practice Now
 UVa 10480 - Sabotage
Problem List
    UVa 10480
    UVa 10989
    POJ 1815
    POJ 2914
    POJ 3084
    POJ 3308
    POJ 3469
Reference
•   http://www.flickr.com/photos/dgjones/335788038/

•   http://www.flickr.com/photos/njsouthall/3181945005/

•   http://www.csie.ntnu.edu.tw/~u91029/Cut.html

•   http://en.wikipedia.org/wiki/Cut_(graph_theory)

•   http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem

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

•   http://www.cnblogs.com/scau20110726/archive/
    2012/11/27/2791523.html
Thank You for Your
    Listening.

Mais conteúdo relacionado

Mais de Chih-Hsuan Kuo

[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism
Chih-Hsuan Kuo
 
[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set
Chih-Hsuan Kuo
 
[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm
Chih-Hsuan Kuo
 
[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up
Chih-Hsuan Kuo
 

Mais de Chih-Hsuan Kuo (20)

Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in Rust
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36
 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
 
Pocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OSPocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OS
 
Necko walkthrough
Necko walkthroughNecko walkthrough
Necko walkthrough
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in Gecko
 
面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!
 
應徵軟體工程師
應徵軟體工程師應徵軟體工程師
應徵軟體工程師
 
面試心得分享
面試心得分享面試心得分享
面試心得分享
 
Windows 真的不好用...
Windows 真的不好用...Windows 真的不好用...
Windows 真的不好用...
 
Python @Wheel Lab
Python @Wheel LabPython @Wheel Lab
Python @Wheel Lab
 
Introduction to VP8
Introduction to VP8Introduction to VP8
Introduction to VP8
 
Python @NCKU CSIE
Python @NCKU CSIEPython @NCKU CSIE
Python @NCKU CSIE
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism
 
[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set
 
[ACM-ICPC] UVa-10245
[ACM-ICPC] UVa-10245[ACM-ICPC] UVa-10245
[ACM-ICPC] UVa-10245
 
[ACM-ICPC] Sort
[ACM-ICPC] Sort[ACM-ICPC] Sort
[ACM-ICPC] Sort
 
[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm
 
[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Último (20)

FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

[ACM-ICPC] Minimum Cut

  • 1. Minimum Cut 郭至軒(KuoE0) KuoE0.tw@gmail.com KuoE0.ch
  • 2. Cut
  • 4. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 undirected graph
  • 5. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 undirected graph
  • 6. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 undirected graph
  • 7. A partition of the vertices of a graph into two disjoint subsets 1 4 2 6 3 7 5 8 9 undirected graph
  • 8. Cut-set of the cut is the set of edges whose end points are in different subsets. 1 4 2 6 3 7 5 8 9 undirected graph
  • 9. Cut-set of the cut is the set of edges whose end points are in different subsets. 1 4 2 6 3 7 5 8 9 Cut-set undirected graph
  • 10. weight = number of edges or sum of weight on edges 1 4 2 6 3 7 5 8 9 weight is 7 undirected graph
  • 12. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 directed graph
  • 13. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 directed graph
  • 14. A partition of the vertices of a graph into two disjoint subsets 3 1 7 4 6 9 2 8 5 directed graph
  • 15. A partition of the vertices of a graph into two disjoint subsets 1 4 2 6 3 7 5 8 9 directed graph
  • 16. Cut-set of the cut is the set of edges whose end points are in different subsets. 1 4 2 6 3 7 5 8 9 directed graph
  • 17. Cut-set of the cut is the set of edges whose end points are in different subsets. 1 4 2 6 3 7 5 8 9 directed graph
  • 18. Cut-set of the cut is the set of edges whose end points are in different subsets. 1 4 2 6 3 7 5 8 9 Cut-set directed graph
  • 19. weight = number of edges or sum of weight on edges 1 4 2 6 3 7 5 8 9 weight is 5⇢ or 2⇠ directed graph
  • 20. s-t cut 1. one side is source 2. another side is sink 3. cut-set only consists of edges going from source’s side to sink’s side
  • 21. Source Sink Other 3 1 7 4 6 9 2 8 5 flow network
  • 22. Source Sink 3 1 7 4 6 9 2 8 5 flow network
  • 23. Source Sink 3 1 7 4 6 9 2 8 5 flow network
  • 24. cut-set only consists of edges going from source’s side to sink’s side 1 4 2 6 3 7 5 8 9 flow network
  • 25. cut-set only consists of edges going from source’s side to sink’s side 1 4 2 6 3 7 5 8 9 weight is 6 flow network
  • 27. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 3 + 3 = 6
  • 28. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 3 + 3 = 6
  • 29. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 3 + 4 - 1 = 6
  • 30. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 3 + 4 - 1 = 6
  • 31. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 4 + 2= 6
  • 32. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 4 + 2= 6
  • 33. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 4 + 2= 6
  • 34. Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 total flow = 6, flow on cut = 4 + 2= 6
  • 35. Observation 2 Then the value of the flow is at most the capacity of any cut. 4 2 4 3 4 1 4 6 8 3 3 5 2 It’s trivial!
  • 36. Observation 2 Then the value of the flow is at most the capacity of any cut. 4 2 4 3 4 1 4 6 8 3 3 5 2 It’s trivial!
  • 37. Observation 3 Let f be a flow, and let (S,T) be an s-t cut whose capacity equals the value of f. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 f is the maximum flow (S,T) is the minimum cut
  • 38. Observation 3 Let f be a flow, and let (S,T) be an s-t cut whose capacity equals the value of f. 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2 f is the maximum flow (S,T) is the minimum cut
  • 41. 4 2 4 3 4 1 4 6 8 3 3 5 2
  • 42. Maximum Flow = 6 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2
  • 43. Residual Network 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 44. Minimum Cut = 6 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 45. Minimum Cut = 6 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 46. Minimum Cut = 6 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 47. Minimum Cut = 6 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 48. The minimum capacity limit the maximum flow!
  • 49. find a s-t cut
  • 50. Maximum Flow = 6 4/4 2 4 3/3 4/4 1 1/4 6 3/8 2/3 3 5 2/2
  • 51. Travel on Residual Network 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 52. start from source 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 53. don’t travel through full edge 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 54. don’t travel through full edge 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 55. no residual edge 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 56. no residual edge 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 57. s-t cut 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 58. s-t cut 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 59. result of starting from sink 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 60. result of starting from sink 0/4 2 4 0/3 0/4 1 3/4 6 5/8 1/3 3 5 0/2
  • 61. Minimum cut is non-unique!
  • 62. time complexity: based on max-flow algorithm Ford-Fulkerson algorithm O(EF) Edmonds-Karp algorithm O(VE2) Dinic algorithm O(V2E)
  • 63. Stoer Wagner only for undirected graph time complexity: O(N3) or O(N2log2N)
  • 64. Practice Now UVa 10480 - Sabotage
  • 65. Problem List UVa 10480 UVa 10989 POJ 1815 POJ 2914 POJ 3084 POJ 3308 POJ 3469
  • 66. Reference • http://www.flickr.com/photos/dgjones/335788038/ • http://www.flickr.com/photos/njsouthall/3181945005/ • http://www.csie.ntnu.edu.tw/~u91029/Cut.html • http://en.wikipedia.org/wiki/Cut_(graph_theory) • http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem • http://www.cs.princeton.edu/courses/archive/spr04/cos226/lectures/ maxflow.4up.pdf • http://www.cnblogs.com/scau20110726/archive/ 2012/11/27/2791523.html
  • 67. Thank You for Your Listening.