We study matchings on sparse random graphs by means of the cavity method. We
first show how the method reproduces several known results about maximum and
perfect matchings in regular and Erdos-Renyi random graphs. Our main new result
is the computation of the entropy, i.e. the leading order of the logarithm of
the number of solutions, of matchings with a given size. We derive both an
algorithm to compute this entropy for an arbitrary graph with a girth that
diverges in the large size limit, and an analytic result for the entropy in
regular and Erdos-Renyi random graph ensembles.Comment: 17 pages, 6 figures, to be published in Journal of Statistical
Mechanic