We describe a generative model for graph edges under specific degree distributions which admits an exact and efficient inference method for recovering the most likely structure. This binary graph structure is obtained by reformulating the inference problem as a generalization of the polynomial time combinatorial optimization problem known as b-matching, which recovers a degree constrained maximum weight subgraph from an original graph. After this mapping, the most likely graph structure can be found in cubic time with respect to the number of nodes using max flow methods. Furthermore, in some instances, the combinatorial optimization problem can be solved exactly in cubic time by loopy belief propagation and max product updates. Empirical results show the method’s ability to recover binary graph structure with appropriate degree distributions from partial or noisy information.