Belief Propagation, Bethe Approximation and Polynomials