Counting Propositional Models

Abstract Given a propositional DNF or CNF formula F with m clauses on n variables, counting the number of models of F is, at the present state of the art, computationally intractable in a worst case. It is shown that an algorithm based on the Inclusion–Exclusion formula computes the exact number of models of F in average time that under reasonable assumptions in O(mcn), where c = O(logm).