# Generalized Weighted Model Counting: An Efficient Monte-Carlo meta-algorithm (Working Paper)

## Abstract

In this paper, we focus on computing the prices of securities represented by logical formulas in combinatorial prediction markets when the price function is represented by a Bayesian network. This problem turns out to be a natural extension of the weighted model counting (WMC) problem [1], which we call *generalized weighted model counting (GWMC)* problem. In GWMC, we are given a logical formula *F* and a polynomial-time computable weight function. We are asked to compute the total weight of the valuations that satisfy *F*.

Based on importance sampling, we propose a Monte-Carlo meta-algorithm that has a good theoretical guarantee for formulas in disjunctive normal form (DNF). The meta-algorithm queries an oracle algorithm that computes marginal probabilities in Bayesian networks, and has the following theoretical guarantee. When the weight function can be approximately represented by a Bayesian network for which the oracle algorithm runs in polynomial time, our meta-algorithm becomes a *fully polynomial-time randomized approximation scheme (FPRAS)*.

## References

- 1.Sang, T., Bearne, P., Kautz, H.: Performing bayesian inference by weighted model counting. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), Pittsburgh, PA, USA, pp. 475–481 (2005)Google Scholar