toysolver-0.6.0: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2016
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityexperimental
Portabilitynon-portable (ScopedTypeVariables, BangPatterns)
Safe HaskellSafe
LanguageHaskell2010

ToySolver.Combinatorial.BipartiteMatching

Contents

Description

This module provides functions for computing several kind of bipartite matching.

Reference:

Synopsis

Maximum cardinality bipartite matching

maximumCardinalityMatching Source #

Arguments

:: IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int)]

set of edges E⊆A×B

-> IntMap Int 

Maximum cardinality matching on a bipartite graph (A+B, E).

Maximum weight bipartite matching

maximumWeightMatching Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int, w)]

edges E⊆A×B and their weights

-> (w, IntMap Int) 

Maximum weight matching of a bipartite graph (A+B,E).

maximumWeightMatchingComplete Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> (Int -> Int -> w)

weight of edges A×B

-> (w, IntMap Int) 

Maximum weight matching of a complete bipartite graph (A+B,A×B).

Maximum/Minimum weight bipartite perfect matching

maximumWeightPerfectMatching Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int, w)]

edges E⊆A×B and their weights

-> Maybe (w, IntMap Int, (IntMap w, IntMap w)) 

Maximum weight perfect matching of a complete bipartite graph (A+B,E).

If no such matching exist, it returns Nothing.

minimumWeightPerfectMatching Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int, w)]

edges E⊆A×B and their weights

-> Maybe (w, IntMap Int, (IntMap w, IntMap w)) 

Minimum weight perfect matching of a bipartite graph (A+B, E).

If no such matching exist, it returns Nothing.

maximumWeightPerfectMatchingComplete Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> (Int -> Int -> w)

weight of edges A×B

-> (w, IntMap Int, (IntMap w, IntMap w)) 

Maximum weight perfect matching of a complete bipartite graph (A+B,A×B).

The two sets must be same size (|A| = |B|).

minimumWeightPerfectMatchingComplete Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> (Int -> Int -> w)

weight of edges A×B

-> (w, IntMap Int, (IntMap w, IntMap w)) 

Minimum weight perfect matching of a complete bipartite graph (A+B,A×B).

The two sets must be same size (|A| = |B|).

Misc

minimumCardinalityEdgeCover Source #

Arguments

:: IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int)]

edges E⊆A×B

-> Maybe (Set (Int, Int)) 

Minimum cardinality edge cover of bipartite graph (A+B, E).

minimumWeightEdgeCover Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> [(Int, Int, w)]

edges E⊆A×B and their weights

-> Maybe (Set (Int, Int)) 

Minimum weight edge cover of bipartite graph (A+B, E).

minimumWeightEdgeCoverComplete Source #

Arguments

:: Real w 
=> IntSet

vertex set A

-> IntSet

vertex set B

-> (Int -> Int -> w)

weight of edges A×B

-> Maybe (Set (Int, Int)) 

Minimum weight edge cover of complete bipartite graph (A+B, A×B).