# BipartiteMatching hangs with floating-point weights in Mathematica 7 (package Combinatorica)

I am trying to use Combinatorica's BipartiteMatching algorithm on a weighted graph. I need to use real numbers as weights. If I try the following

graph = CompleteGraph[1, 1]
graph = SetEdgeWeights[graph, {1}]
BipartiteMatching[graph]


it correctly gives the perfect matching {{1,2}}.

But if instead I try this

graph = CompleteGraph[1, 1]
graph = SetEdgeWeights[graph, {1.}]
BipartiteMatching[graph]


(the only difference being the decimal point), it hangs, apparently forever. Am I missing something obvious? Any help would be much appreciated!

-

## migrated from stackoverflow.comJun 28 '12 at 23:54

This question came from our site for professional and enthusiast programmers.