SlideShare uma empresa Scribd logo
1 de 70
Baixar para ler offline
Bipartite Matching
      郭至軒(KuoE0)
     KuoE0.tw@gmail.com
          KuoE0.ch
Bipartite Graph
                 two disjoint sets




every edge connects between them
Matching
A subset of edges, no two of which share an
                   endpoint.
Valid Matching
           not matching edge
           matching edge




              bachelor
Invalid Matching
            not matching edge
            matching edge




                       shared
Bipartite Matching


     objective: more matching
1         5

          2         6

          3         7

          4         8

not matching edge   9
matching edge
Alternating Path
A path in which the edges belong alternatively to the
         matching and not to the matching.
[1 - 5 - 2 - 9] is an alternating path.

          1                     5

          2                     6

          3                     7

          4                     8

not matching edge               9
matching edge
[1 - 5 - 2 - 9] is an alternating path.

          1                     5

          2                     6

          3                     7

          4                     8

not matching edge               9
matching edge
[1 - 5 - 2 - 6 - 3] is not an alternating path.

           1                     5

           2                     6

           3                     7

           4                     8

not matching edge                9
matching edge
[1 - 5 - 2 - 6 - 3] is not an alternating path.

           1                     5

           2                     6

           3                     7

           4                     8

not matching edge                9
matching edge
Alternating Cycle
A cycle in which the edges belong alternatively to
    the matching and not to the matching.
[1 - 5 - 2 - 9 - 1] is an alternating cycle.

           1                     5

           2                     6

           3                     7

           4                     8

not matching edge                9
matching edge
[1 - 5 - 2 - 9 - 1] is an alternating cycle.

           1                     5

           2                     6

           3                     7

           4                     8

not matching edge                9
matching edge
Reverse the alternating cycle, cardinality won’t change.

                1                    5

                2                    6

                3                    7

                4                    8

     not matching edge               9
     matching edge
Maximum Matching
Augmenting Path Algorithm
Augmenting Path
An alternating path that starts from and ends on
              unmatched vertices.
[2 - 5 - 1 - 9] is an augmenting path.

          1                   5

          2                   6

          3                   7

          4                   8

not matching edge             9
matching edge
[2 - 5 - 1 - 9] is an augmenting path.

          1                   5

          2                   6

          3                   7

          4                   8

not matching edge             9
matching edge
Reverse the augmenting path, cardinality will increase.

                1                    5

                2                    6

                3                    7

                4                    8

     not matching edge               9
     matching edge
Augmenting Path
• The length of an augmenting path
  always is odd.
• Reversing an augmenting path will
  increase the cardinality.
• If there is no augmenting path, the
  cardinality is maximum.
Algorithm
1. Try to build augmenting paths from all
   vertices in one side.
2. Travel on graph.
3. If an augmenting path exists, reverse
   the augmenting path to increase
   cardinality.
4. If no augmenting path exists, ignore
   this vertex.
5. Repeat above step until there no
   augmenting path exists.
[1 - 5] is an augmenting path.

               1                     5

               2                     6

               3                     7

               4                     8

current cardinality: 0
                                     9
    not matching edge
    matching edge
[1 - 5] is an augmenting path.

               1                     5

               2                     6

               3                     7

               4                     8

current cardinality: 0
                                     9
    not matching edge
    matching edge
Reverse it!

               1                   5

               2                   6

               3                   7

               4                   8

current cardinality: 1
                                   9
    not matching edge
    matching edge
[2 - 5 - 1- 9] is an augmenting path.

               1                      5

               2                      6

               3                      7

               4                      8

current cardinality: 1
                                      9
    not matching edge
    matching edge
[2 - 5 - 1- 9] is an augmenting path.

               1                      5

               2                      6

               3                      7

               4                      8

current cardinality: 1
                                      9
    not matching edge
    matching edge
Reverse it!

               1                   5

               2                   6

               3                   7

               4                   8

current cardinality: 2
                                   9
    not matching edge
    matching edge
[3 - 6] is an augmenting path.

               1                     5

               2                     6

               3                     7

               4                     8

current cardinality: 2
                                     9
    not matching edge
    matching edge
[3 - 6] is an augmenting path.

               1                     5

               2                     6

               3                     7

               4                     8

current cardinality: 2
                                     9
    not matching edge
    matching edge
Reverse it!

               1                   5

               2                   6

               3                   7

               4                   8

current cardinality: 3
                                   9
    not matching edge
    matching edge
[4 - 5 - 2 - 6 - 3 - 7] is an augmenting path.

                1                      5

                2                      6

                3                      7

                4                      8

current cardinality: 3
                                       9
    not matching edge
    matching edge
[4 - 5 - 2 - 6 - 3 - 7] is an augmenting path.

                1                      5

                2                      6

                3                      7

                4                      8

current cardinality: 3
                                       9
    not matching edge
    matching edge
Reverse it!

               1                   5

               2                   6

               3                   7

               4                   8

current cardinality: 4
                                   9
    not matching edge
    matching edge
Max cardinality is 4.
          1                  5

          2                  6

          3                  7

          4                  8

                             9
not matching edge
matching edge
Time Complexity
      O(V × E)

  V: number of vertices
  E: number of edges
Source Code
// find an augmenting path
bool find_aug_path( int x ) {
	   for ( int i = 0; i < ( int )vertex[ x ].size(); ++i ) {
	   	   int next = vertex[ x ][ i ];
	   	   // not in augmenting path
	   	   if ( !visit[ next ] ) {
	   	   	   // setup this vertex in augmenting path
	   	   	   visit[ next ] = 1;
	   	   	   /*
	   	   	     * If this vertex is a unmatched vertex, reverse
augmenting path and return.
	   	   	     * If this vector is a matched vertex, try to reverse
augmenting path and continue find an unmatched vertex.
	   	   	     */
	   	   	   if ( lnk2[ next ] == -1 || find_aug_path( lnk2[ next ] ) )
{
	   	   	   	    lnk1[ x ] = next, lnk2[ next ] = x;
	   	   	   	    return 1;
	   	   	   }
	   	   }
	   }
	   return 0;
}
Practice Now
 UVa 670 - The dog task
Maximum Weight Matching
Hungarian Algorithm
         (Kuhn-Munkres Algorithm)
5
1                4
    2   3
            1
2                5

3   5       -2   6
weight adjustment
If add (subtract) some value on all edges connected with
   vertex X, the maximum matching won’t be effected.

      1              4           1              4
             a                         a+d
             b                         b+d
      2              5           2              5
             c                         c+d
      3              6           3              6


          matching edge       not matching edge
vertex labeling
For convenient, add a variable on vertices to denote the
  value add (subtract) on edges connected with them.

      1              4           1              4
             a                         a+d
             b                         b+d
 d    2
             c
                     5    ≡      2
                                       c+d
                                                5

      3              6           3              6


          matching edge       not matching edge
vertex labeling
l(x)+l(y)≥w(x,y), for each edge(x,y)


                  5
   5   1                     4   0
             2    3
                      1
   3   2                     5   0

   5   3     5        -2     6   0
minimize vertex labeling
Admissible Edge: l(x)+l(y)=w(x,y)

                 5
  2    1                   4     3
            2    3
                      1
  0    2                   5     1

  4    3     5        -2   6     0
convert
   maximum weight problem
              to
minimum vertex labeling problem
Augmenting Path with Admissible Edge

                       5
       5   1                        4   0
                 2     3
                              1
       3   2                        5   0

       5   3      5          -2     6   0


[1 - 4] is an augment path with admissible edges.
Augmenting Path with Admissible Edge

                       5
       5   1                        4   0
                 2     3
                              1
       3   2                        5   0

       5   3      5          -2     6   0


[1 - 4] is an augment path with admissible edges.
Augmenting Path with Admissible Edge

                     5
     5   1                        4   0
               2     3
                           1
     3   2                        5   0

     5   3     5          -2      6   0


                 Reverse it!
             Current Weight = 5
Augmenting Path with Admissible Edge

                       5
      5   1                          4   0
                 2     3
                              1
      3   2                          5   0

      5   3      5           -2      6   0


  No augmenting path found start from vertex 2.
Augmenting Path with Admissible Edge

                       5
      5   1                          4   0
                 2     3
                              1
      3   2                          5   0

      5   3      5           -2      6   0


  No augmenting path found start from vertex 2.
Adjust Vertex Labeling

                    5
    5   1                         4   0
              2     3
                           1
   3    2                         5   0

    5   3     5            -2     6   0

relax value d = min(l(x)+l(y)-w(x,y))
    x: vertex in alternating path
    y: vertex y not in alternating path
Adjust Vertex Labeling

                   5
5    1                          4    0
           2       3
                         1
3    2                          5    0

5    3         5         -2     6    0

    R(1,6)=3
    R(2,5)=2           relax d = 2
    R(2,6)=5
Adjust Vertex Labeling

                  5
3   1                            4   2
            2     3
                        1
1   2                            5   0

5   3       5           -2       6   0

        l(x) subtract value d.
        l(y) add value d.
Continue to Find Augmenting Path

                       5
       3   1                        4   2
                 2     3
                              1
       1   2                        5   0

       5   3      5          -2     6   0


[2 - 5] is an augment path with admissible edges.
Continue to Find Augmenting Path

                       5
       3   1                        4   2
                 2     3
                              1
       1   2                        5   0

       5   3      5          -2     6   0


[2 - 5] is an augment path with admissible edges.
Continue to Find Augmenting Path

                   5
   3   1                        4   2
             2     3
                         1
   1   2                        5   0

   5   3     5          -2      6   0


               Reverse it!
           Current Weight = 6
Continue to Find Augmenting Path

                     5
    3   1                          4   2
               2     3
                            1
    1   2                          5   0

    5   3      5           -2      6   0


No augmenting path found start from vertex 3.
Continue to Find Augmenting Path

                     5
    3   1                          4   2
               2     3
                            1
    1   2                          5   0

    5   3      5           -2      6   0


No augmenting path found start from vertex 3.
Adjust Vertex Labeling

                   5
3    1                          4    2
           2       3
                         1
1    2                          5    0

5    3         5         -2     6    0

    R(1,6)=1
                       relax d = 1
    R(2,6)=3
Adjust Vertex Labeling

                  5
2   1                            4   3
            2     3
                        1
0   2                            5   1

4   3       5           -2       6   0

        l(x) subtract value d.
        l(y) add value d.
Continue to Find Augmenting Path

                      5
     2   1                          4   3
                2     3
                             1
     0   2                          5   1

     4   3      5            -2     6   0


[3 - 5 - 2 - 4 - 1 - 6] is an augment path with
               admissible edges.
Continue to Find Augmenting Path

                      5
     2   1                          4   3
                2     3
                             1
     0   2                          5   1

     4   3      5            -2     6   0


[3 - 5 - 2 - 4 - 1 - 6] is an augment path with
               admissible edges.
Continue to Find Augmenting Path

                   5
   2   1                         4   3
              2    3
                         1
   0   2                         5   1

   4   3      5          -2      6   0


                Reverse it!
           Current Weight = 10
Maximum Weight Matching = 10

              5
  2   1                4   3
          2   3
                  1
  0   2                5   1

  4   3   5       -2   6   0
Algorithm
1. Initial vertex labeling to fit l(x)+l(y)≥w(x,y)
2. Find augmenting paths composed with
   admissible edges from all vertices in one side.
3. If no augmenting path exists, adjust vertex
   labeling until the augmenting path found.
4. If augmenting path exists, continue to find next
   augmenting path.
5. Repeat above step until there no augmenting
   path exists.
6. Calculate the sum of weight on matching edges.
Practice Now
POJ 2195 - Going Home
Problem List
     UVa 670
     UVa 753
    UVa 10080
    UVa 10092
    UVa 10243
    UVa 10418
    UVa 10984
    POJ 3565
Reference
•   http://en.wikipedia.org/wiki/Bipartite_graph

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

•   http://www.flickr.com/photos/marceau_r/5244129689

•   http://www.sanfilippo-chianti.it/offerta-svalentino.html

•   http://www.csie.ntnu.edu.tw/~u91029/Matching.html
Thank You for Your
    Listening.

Mais conteúdo relacionado

Mais procurados

Rabin Carp String Matching algorithm
Rabin Carp String Matching  algorithmRabin Carp String Matching  algorithm
Rabin Carp String Matching algorithmsabiya sabiya
 
Rabin Karp Algorithm
Rabin Karp AlgorithmRabin Karp Algorithm
Rabin Karp AlgorithmSohail Ahmed
 
Ford Fulkerson Algorithm
Ford Fulkerson AlgorithmFord Fulkerson Algorithm
Ford Fulkerson AlgorithmMrMoliya
 
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方Kensuke Otsuki
 
A Maximum Flow Min cut theorem for Optimizing Network
A Maximum Flow Min cut theorem for Optimizing NetworkA Maximum Flow Min cut theorem for Optimizing Network
A Maximum Flow Min cut theorem for Optimizing NetworkShethwala Ridhvesh
 
Konigsberg bridge problem (3)
Konigsberg bridge problem (3)Konigsberg bridge problem (3)
Konigsberg bridge problem (3)JISHAMS4
 
Isomorphism (Graph)
Isomorphism (Graph) Isomorphism (Graph)
Isomorphism (Graph) Pritam Shil
 
The Hiring Problem
The Hiring ProblemThe Hiring Problem
The Hiring ProblemTinou Bao
 
Max flow min cut
Max flow min cutMax flow min cut
Max flow min cutMayank Garg
 
競技プログラミングでの線型方程式系
競技プログラミングでの線型方程式系競技プログラミングでの線型方程式系
競技プログラミングでの線型方程式系tmaehara
 
3.2 factoring polynomials
3.2   factoring polynomials3.2   factoring polynomials
3.2 factoring polynomialsNuch Pawida
 
Greedy method1
Greedy method1Greedy method1
Greedy method1Rajendran
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programmingmaharajdey
 
Laplace Distribution | Statistics
Laplace Distribution | StatisticsLaplace Distribution | Statistics
Laplace Distribution | StatisticsTransweb Global Inc
 

Mais procurados (20)

Rabin Carp String Matching algorithm
Rabin Carp String Matching  algorithmRabin Carp String Matching  algorithm
Rabin Carp String Matching algorithm
 
Rabin Karp Algorithm
Rabin Karp AlgorithmRabin Karp Algorithm
Rabin Karp Algorithm
 
Ford Fulkerson Algorithm
Ford Fulkerson AlgorithmFord Fulkerson Algorithm
Ford Fulkerson Algorithm
 
String matching algorithm
String matching algorithmString matching algorithm
String matching algorithm
 
一般グラフの最大マッチング
一般グラフの最大マッチング一般グラフの最大マッチング
一般グラフの最大マッチング
 
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方
二部グラフの最小点被覆と最大安定集合と最小辺被覆の求め方
 
A Maximum Flow Min cut theorem for Optimizing Network
A Maximum Flow Min cut theorem for Optimizing NetworkA Maximum Flow Min cut theorem for Optimizing Network
A Maximum Flow Min cut theorem for Optimizing Network
 
Konigsberg bridge problem (3)
Konigsberg bridge problem (3)Konigsberg bridge problem (3)
Konigsberg bridge problem (3)
 
Maximum flow
Maximum flowMaximum flow
Maximum flow
 
Graph theory
Graph  theoryGraph  theory
Graph theory
 
Isomorphism (Graph)
Isomorphism (Graph) Isomorphism (Graph)
Isomorphism (Graph)
 
Markov chains1
Markov chains1Markov chains1
Markov chains1
 
The Hiring Problem
The Hiring ProblemThe Hiring Problem
The Hiring Problem
 
Max flow min cut
Max flow min cutMax flow min cut
Max flow min cut
 
競技プログラミングでの線型方程式系
競技プログラミングでの線型方程式系競技プログラミングでの線型方程式系
競技プログラミングでの線型方程式系
 
Naive string matching
Naive string matchingNaive string matching
Naive string matching
 
3.2 factoring polynomials
3.2   factoring polynomials3.2   factoring polynomials
3.2 factoring polynomials
 
Greedy method1
Greedy method1Greedy method1
Greedy method1
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programming
 
Laplace Distribution | Statistics
Laplace Distribution | StatisticsLaplace Distribution | Statistics
Laplace Distribution | Statistics
 

Destaque

[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's AlgorithmChih-Hsuan Kuo
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree IsomorphismChih-Hsuan Kuo
 
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...Kostas Katrinis
 
ICPC 2015 - Welcome from the chairs
ICPC 2015 - Welcome from the chairsICPC 2015 - Welcome from the chairs
ICPC 2015 - Welcome from the chairsRocco Oliveto
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum CutChih-Hsuan Kuo
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in RustChih-Hsuan Kuo
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphsNabeel Ahsen
 
Knapsack Algorithm www.geekssay.com
Knapsack Algorithm www.geekssay.comKnapsack Algorithm www.geekssay.com
Knapsack Algorithm www.geekssay.comHemant Gautam
 
Application of local search methods for solving a quadratic assignment proble...
Application of local search methods for solving a quadratic assignment proble...Application of local search methods for solving a quadratic assignment proble...
Application of local search methods for solving a quadratic assignment proble...ertekg
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy AlgorithmWaqar Akram
 
01 knapsack using backtracking
01 knapsack using backtracking01 knapsack using backtracking
01 knapsack using backtrackingmandlapure
 

Destaque (20)

[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism
 
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...
Teaching Graph Algorithms in the Field - Bipartite Matching in optical datace...
 
[ACM-ICPC] Traversal
[ACM-ICPC] Traversal[ACM-ICPC] Traversal
[ACM-ICPC] Traversal
 
ICPC 2015 - Welcome from the chairs
ICPC 2015 - Welcome from the chairsICPC 2015 - Welcome from the chairs
ICPC 2015 - Welcome from the chairs
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in Rust
 
Graphs
GraphsGraphs
Graphs
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
Knapsack Algorithm www.geekssay.com
Knapsack Algorithm www.geekssay.comKnapsack Algorithm www.geekssay.com
Knapsack Algorithm www.geekssay.com
 
Application of local search methods for solving a quadratic assignment proble...
Application of local search methods for solving a quadratic assignment proble...Application of local search methods for solving a quadratic assignment proble...
Application of local search methods for solving a quadratic assignment proble...
 
Knapsack problem
Knapsack problemKnapsack problem
Knapsack problem
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
 
01 knapsack using backtracking
01 knapsack using backtracking01 knapsack using backtracking
01 knapsack using backtracking
 
Greedy
GreedyGreedy
Greedy
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Knapsack
KnapsackKnapsack
Knapsack
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
Knapsack Problem
Knapsack ProblemKnapsack Problem
Knapsack Problem
 

Mais de Chih-Hsuan Kuo

[Mozilla] content-select
[Mozilla] content-select[Mozilla] content-select
[Mozilla] content-selectChih-Hsuan Kuo
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。Chih-Hsuan Kuo
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Chih-Hsuan Kuo
 
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 GeckoChih-Hsuan Kuo
 
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 OSChih-Hsuan Kuo
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in GeckoChih-Hsuan Kuo
 
面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!Chih-Hsuan Kuo
 
Windows 真的不好用...
Windows 真的不好用...Windows 真的不好用...
Windows 真的不好用...Chih-Hsuan Kuo
 
[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint SetChih-Hsuan Kuo
 
[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient Algorithm[ACM-ICPC] Efficient Algorithm
[ACM-ICPC] Efficient AlgorithmChih-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-upChih-Hsuan Kuo
 

Mais de Chih-Hsuan Kuo (20)

Rust
RustRust
Rust
 
[Mozilla] content-select
[Mozilla] content-select[Mozilla] content-select
[Mozilla] content-select
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。
 
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] 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

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
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 17Celine George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
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.MaryamAhmad92
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
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)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
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
 

Último (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
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
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
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.
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
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)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
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...
 

[ACM-ICPC] Bipartite Matching

  • 1. Bipartite Matching 郭至軒(KuoE0) KuoE0.tw@gmail.com KuoE0.ch
  • 2. Bipartite Graph two disjoint sets every edge connects between them
  • 3. Matching A subset of edges, no two of which share an endpoint.
  • 4. Valid Matching not matching edge matching edge bachelor
  • 5. Invalid Matching not matching edge matching edge shared
  • 6. Bipartite Matching objective: more matching
  • 7. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 8. Alternating Path A path in which the edges belong alternatively to the matching and not to the matching.
  • 9. [1 - 5 - 2 - 9] is an alternating path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 10. [1 - 5 - 2 - 9] is an alternating path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 11. [1 - 5 - 2 - 6 - 3] is not an alternating path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 12. [1 - 5 - 2 - 6 - 3] is not an alternating path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 13. Alternating Cycle A cycle in which the edges belong alternatively to the matching and not to the matching.
  • 14. [1 - 5 - 2 - 9 - 1] is an alternating cycle. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 15. [1 - 5 - 2 - 9 - 1] is an alternating cycle. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 16. Reverse the alternating cycle, cardinality won’t change. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 18. Augmenting Path An alternating path that starts from and ends on unmatched vertices.
  • 19. [2 - 5 - 1 - 9] is an augmenting path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 20. [2 - 5 - 1 - 9] is an augmenting path. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 21. Reverse the augmenting path, cardinality will increase. 1 5 2 6 3 7 4 8 not matching edge 9 matching edge
  • 22. Augmenting Path • The length of an augmenting path always is odd. • Reversing an augmenting path will increase the cardinality. • If there is no augmenting path, the cardinality is maximum.
  • 23. Algorithm 1. Try to build augmenting paths from all vertices in one side. 2. Travel on graph. 3. If an augmenting path exists, reverse the augmenting path to increase cardinality. 4. If no augmenting path exists, ignore this vertex. 5. Repeat above step until there no augmenting path exists.
  • 24. [1 - 5] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 0 9 not matching edge matching edge
  • 25. [1 - 5] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 0 9 not matching edge matching edge
  • 26. Reverse it! 1 5 2 6 3 7 4 8 current cardinality: 1 9 not matching edge matching edge
  • 27. [2 - 5 - 1- 9] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 1 9 not matching edge matching edge
  • 28. [2 - 5 - 1- 9] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 1 9 not matching edge matching edge
  • 29. Reverse it! 1 5 2 6 3 7 4 8 current cardinality: 2 9 not matching edge matching edge
  • 30. [3 - 6] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 2 9 not matching edge matching edge
  • 31. [3 - 6] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 2 9 not matching edge matching edge
  • 32. Reverse it! 1 5 2 6 3 7 4 8 current cardinality: 3 9 not matching edge matching edge
  • 33. [4 - 5 - 2 - 6 - 3 - 7] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 3 9 not matching edge matching edge
  • 34. [4 - 5 - 2 - 6 - 3 - 7] is an augmenting path. 1 5 2 6 3 7 4 8 current cardinality: 3 9 not matching edge matching edge
  • 35. Reverse it! 1 5 2 6 3 7 4 8 current cardinality: 4 9 not matching edge matching edge
  • 36. Max cardinality is 4. 1 5 2 6 3 7 4 8 9 not matching edge matching edge
  • 37. Time Complexity O(V × E) V: number of vertices E: number of edges
  • 38. Source Code // find an augmenting path bool find_aug_path( int x ) { for ( int i = 0; i < ( int )vertex[ x ].size(); ++i ) { int next = vertex[ x ][ i ]; // not in augmenting path if ( !visit[ next ] ) { // setup this vertex in augmenting path visit[ next ] = 1; /* * If this vertex is a unmatched vertex, reverse augmenting path and return. * If this vector is a matched vertex, try to reverse augmenting path and continue find an unmatched vertex. */ if ( lnk2[ next ] == -1 || find_aug_path( lnk2[ next ] ) ) { lnk1[ x ] = next, lnk2[ next ] = x; return 1; } } } return 0; }
  • 39. Practice Now UVa 670 - The dog task
  • 40. Maximum Weight Matching Hungarian Algorithm (Kuhn-Munkres Algorithm)
  • 41. 5 1 4 2 3 1 2 5 3 5 -2 6
  • 42. weight adjustment If add (subtract) some value on all edges connected with vertex X, the maximum matching won’t be effected. 1 4 1 4 a a+d b b+d 2 5 2 5 c c+d 3 6 3 6 matching edge not matching edge
  • 43. vertex labeling For convenient, add a variable on vertices to denote the value add (subtract) on edges connected with them. 1 4 1 4 a a+d b b+d d 2 c 5 ≡ 2 c+d 5 3 6 3 6 matching edge not matching edge
  • 44. vertex labeling l(x)+l(y)≥w(x,y), for each edge(x,y) 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0
  • 45. minimize vertex labeling Admissible Edge: l(x)+l(y)=w(x,y) 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0
  • 46. convert maximum weight problem to minimum vertex labeling problem
  • 47. Augmenting Path with Admissible Edge 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 [1 - 4] is an augment path with admissible edges.
  • 48. Augmenting Path with Admissible Edge 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 [1 - 4] is an augment path with admissible edges.
  • 49. Augmenting Path with Admissible Edge 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 Reverse it! Current Weight = 5
  • 50. Augmenting Path with Admissible Edge 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 No augmenting path found start from vertex 2.
  • 51. Augmenting Path with Admissible Edge 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 No augmenting path found start from vertex 2.
  • 52. Adjust Vertex Labeling 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 relax value d = min(l(x)+l(y)-w(x,y)) x: vertex in alternating path y: vertex y not in alternating path
  • 53. Adjust Vertex Labeling 5 5 1 4 0 2 3 1 3 2 5 0 5 3 5 -2 6 0 R(1,6)=3 R(2,5)=2 relax d = 2 R(2,6)=5
  • 54. Adjust Vertex Labeling 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 l(x) subtract value d. l(y) add value d.
  • 55. Continue to Find Augmenting Path 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 [2 - 5] is an augment path with admissible edges.
  • 56. Continue to Find Augmenting Path 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 [2 - 5] is an augment path with admissible edges.
  • 57. Continue to Find Augmenting Path 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 Reverse it! Current Weight = 6
  • 58. Continue to Find Augmenting Path 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 No augmenting path found start from vertex 3.
  • 59. Continue to Find Augmenting Path 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 No augmenting path found start from vertex 3.
  • 60. Adjust Vertex Labeling 5 3 1 4 2 2 3 1 1 2 5 0 5 3 5 -2 6 0 R(1,6)=1 relax d = 1 R(2,6)=3
  • 61. Adjust Vertex Labeling 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0 l(x) subtract value d. l(y) add value d.
  • 62. Continue to Find Augmenting Path 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0 [3 - 5 - 2 - 4 - 1 - 6] is an augment path with admissible edges.
  • 63. Continue to Find Augmenting Path 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0 [3 - 5 - 2 - 4 - 1 - 6] is an augment path with admissible edges.
  • 64. Continue to Find Augmenting Path 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0 Reverse it! Current Weight = 10
  • 65. Maximum Weight Matching = 10 5 2 1 4 3 2 3 1 0 2 5 1 4 3 5 -2 6 0
  • 66. Algorithm 1. Initial vertex labeling to fit l(x)+l(y)≥w(x,y) 2. Find augmenting paths composed with admissible edges from all vertices in one side. 3. If no augmenting path exists, adjust vertex labeling until the augmenting path found. 4. If augmenting path exists, continue to find next augmenting path. 5. Repeat above step until there no augmenting path exists. 6. Calculate the sum of weight on matching edges.
  • 67. Practice Now POJ 2195 - Going Home
  • 68. Problem List UVa 670 UVa 753 UVa 10080 UVa 10092 UVa 10243 UVa 10418 UVa 10984 POJ 3565
  • 69. Reference • http://en.wikipedia.org/wiki/Bipartite_graph • http://en.wikipedia.org/wiki/Matching_(graph_theory) • http://www.flickr.com/photos/marceau_r/5244129689 • http://www.sanfilippo-chianti.it/offerta-svalentino.html • http://www.csie.ntnu.edu.tw/~u91029/Matching.html
  • 70. Thank You for Your Listening.