On the exactness of the cavity method for weighted b-matchings on arbitrary graphs and its relation to linear programs | Synapse