We give a complexity dichotomy for the problem of computing the partition
function of a weighted Boolean constraint satisfaction problem. Such a problem
is parameterized by a set of rational-valued functions, which generalize
constraints. Each function assigns a weight to every assignment to a set of
Boolean variables. Our dichotomy extends previous work in which the weight
functions were restricted to being non-negative. We represent a weight function
as a product of the form (-1)^s g, where the polynomial s determines the sign
of the weight and the non-negative function g determines its magnitude. We show
that the problem of computing the partition function (the sum of the weights of
all possible variable assignments) is in polynomial time if either every weight
function can be defined by a "pure affine" magnitude with a quadratic sign
polynomial or every function can be defined by a magnitude of "product type"
with a linear sign polynomial. In all other cases, computing the partition
function is FP^#P-complete.Comment: 24 page