Skip to Main Content
We present a near-optimal reduction from approximately counting the cardinality of a discrete set to approximately sampling elements of the set. An important application of our work is to approximating the partition function Z of a discrete system, such as the Ising model, matchings or colorings of a graph. The standard approach to estimating the partition function Z(beta*) at some desired inverse temperature beta* is to define a sequence, which we call a cooling schedule, beta0 = 0 < beta1 < ldrldrldr < betal = beta* where Z(0) is trivial to compute and the ratios Z(betai+1)/Z(betai) are easy to estimate by sampling from the distribution corresponding to Z(betai). Previous approaches required a cooling schedule of length O*(ln A) where A = Z(0), thereby ensuring that each ratio Z(betai+1)/Z(betai) is bounded. We present a cooling schedule of length l = O*(radicln A). For well-studied problems such as estimating the partition function of the Ising model, or approximating the number of colorings or matchings of a graph, our cooling schedule is of length O* (radicln) and the total number of samples required is O*(n). This implies an overall savings of a factor of roughly n in the running time of the approximate counting algorithm compared to the previous best approach. A similar improvement in the length of the cooling schedule was recently obtained by Lovtisz and Vempala in the context of estimating the volume of convex bodies. While our reduction is inspired by theirs, the discrete analogue of their result turns out to be significantly more difficult. Whereas a fixed schedule suffices in their setting, we prove that in the discrete setting we need an adaptive schedule, i. e., the schedule depends on Z. More precisely, we prove any non-adaptive cooling schedule has length at least O*(ln A), and we present an algorithm to find an adaptive schedule of length O* (radicln - A) and a nearly matching lower bound.