I'm trying to find all perfect matching in bipartite graph and then do some nontrivial evaluations of each solution (nontrivial means, I can not use Hungarian algorithm). I use Prolog for this, is there any not exponential solution? (If the result is not exponential of course..)
Asked
Active
Viewed 346 times
1
-
One approach that may work is to formulate your problem using [tag:clpb] constraints, and then to use enumeration predicates like `labeling/1` to enumerate all solutions. [tag:clpfd] constraints may also work for this. You can introduce a Boolean variable for each edge between the vertices and state the constraint that among certain edges, exactly one must be chosen. – mat May 11 '16 at 22:25