Graph matching

“Pairing a finite set of objects.

For a bipartite Graph the algorithm is a variant of the Hungarian method.”

“Nodes are objects. Edges are pairs of objects.”

A grid







 .        .        .        .        .        .
                                      
                                      
                                      
 .        .        .        .        .        .
                                      
                                      
                                      
 .        .        .        .        .        .
                                      
                                      
                                      
 .        .        .        .        .        .
                                      
                                      
                                      
 .        .        .        .        .        .








With an even number of pins







 .        ◯        .        .        .        .
                                      
                                      
                                      
 .        .        .        .        ◯        .
                                      
                                      
                                      
 .        .        ◯        .        .        .
                                      
                                      
                                      
 .        ◯        .        .        ◯        .
                                      
                                      
                                      
 .        .        ◯        .        .        .








We want to connect each pair with a string.







 .        ◯--------.--------.--------.        .
                                     |         
                                     |         
                                     |         
 .        .        .        .        ◯        .
                                      
                                      
                                      
 .        .--------◯        .        .        .
          |                                    
          |                                    
          |                                    
 .        ◯        .        .        ◯        .
                                     |         
                                     |         
                                     |         
 .        .        ◯--------.--------.        .








Unweighted graph matching