Perfect matchings of a graph