Abstract
In this paper we describe a sequential importance sampling (SIS) procedure for counting the number of vertex covers in general graphs. The optimal SIS proposal distribution is the uniform over a suitably restricted set, but is not implementable. We will consider two proposal distributions as approximations to the optimal. Both proposals are based on randomization techniques. The first randomization is the classic probability model of random graphs, and in fact, the resulting SIS algorithm shows polynomial complexity for random graphs. The second randomization introduces a probabilistic relaxation technique that uses Dynamic Programming. The numerical experiments show that the resulting SIS algorithm enjoys excellent practical performance in comparison with existing methods. In particular the method is compared with cachet—an exact model counter, and the state of the art SampleSearch, which is based on Belief Networks and importance sampling.
Similar content being viewed by others
References
Asmussen, S., Glynn, P.W.: Stochastic Simulation: Algorithms and Analysis. Applications of Mathematics. Springer, New York (2007)
Blitzstein, J., Diaconis, P.: A sequential importance sampling algorithm for generating random graphs with prescribed degrees. Internet Math. 6, 487–520 (2010)
Bollobás, B.: Random Graphs. Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge (2001)
Botev, Z., Kroese, D.: Efficient Monte Carlo simulation via the generalized splitting method. Stat. Comput. 22, 1–16 (2012)
Chen, Y., Diaconis, P., Holmes, S.P., Liu, J.S.: Sequential Monte Carlo methods for statistical analysis of tables. J. Am. Stat. Assoc. 100, 109–120 (2005)
Cryan, M., Dyer, M.: A polynomial-time algorithm to approximately count contingency tables when the number of rows is constant. J. Comput. Syst. Sci. 67, 291–310 (2003)
Dechter, R., Gogate, V.: A new algorithm for sampling CSP solutions uniformly at random. In: Principles and Practice of Constraint Programming (May 2006)
Dyer, M.: Approximate counting by dynamic programming. In: Proceedings of the 35th ACM Symposium on Theory of Computing, pp. 693–699 (2003)
Dyer, M., Frieze, A., Jerrum, M.: On counting independent sets in sparse graphs. In: 40th Annual Symposium on Foundations of Computer Science, pp. 210–217 (1999)
Gogate, V., Dechter, R.: Approximate counting by sampling the backtrack-free search space. In: Proceedings of the 22nd National Conference on Artificial Intelligence, vol. 1. AAAI’07, pp. 198–203. AAAI Press, Menlo Park (2007)
Gomes, C.P., Hoffmann, J., Sabharwal, A., Selman, B.: From sampling to model counting. In: IJCAI, pp. 2293–2299 (2007)
Harary, F., Hayes, J.P., Wu, H.-J.: A survey of the theory of hypercube graphs. Comput. Math. Appl. 15(4), 277–289 (1988)
Jerrum, M., Sinclair, A.: The Markov chain Monte Carlo method: an approach to approximate counting and integration. In: Hochbaum, D. (ed.) Approximation Algorithms for NP-Hard Problems, pp. 482–520. PWS Publishing, Pacific Grove (1996)
Jerrum, M., Valiant, L.G., Vazirani, V.V.: Random generation of combinatorial structures from a uniform distribution. Theor. Comput. Sci. 43, 169–188 (1986)
Jerrum, M., Sinclair, A., Vigoda, E.: A polynomial-time approximation algorithm for the permanent of a matrix with non-negative entries. J. ACM 51(4), 671–697 (2004)
Karp, R.M.: Reducibility among combinatorial problems. In: Miller, R.E., Thatcher, J.W. (eds.) Complexity of Computer Computations, pp. 85–103. Plenum, New York (1972)
Karp, R.M., Luby, M.: Monte-Carlo algorithms for enumeration and reliability problems. In: Proceedings of the 24th Annual Symposium on Foundations of Computer Science, SFCS ’83, pp. 56–64. IEEE Computer Society, Washington, DC (1983)
Karp, R.M., Luby, M., Madras, N.: Monte-Carlo approximation algorithms for enumeration problems. J. Algorithms 10, 429–448 (1989)
Liu, J., Lu, P.: FPTAS for counting monotone CNF. CoRR. http://arxiv.org/abs/1311.3728 (2013)
Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: Engineering an efficient SAT solver. In: Annual ACM IEEE Design Automation Conference, pp. 530–535. ACM, New York (2001)
Rasmussen, L.E.: Approximately counting cliques. Random Struct. Algorithms 11(4), 395–411 (1997)
Rubinstein, R.: The Gibbs cloner for combinatorial optimization, counting and sampling. Methodol. Comput. Appl. Probab. 11, 491–549 (2009)
Rubinstein, R.: Stochastic enumeration method for counting NP-hard problems. Methodol. Comput. Appl. Probab. 15(2), 249–291 (2013)
Rubinstein, R., Kroese, D.: Simulation and the Monte Carlo Method, 2nd edn. Wiley, New York (2007)
Rubinstein, R., Dolgin, A., Vaisman, R.: The splitting method for decision making. Commun. Stat. Simul. Comput. 41(6), 905–921 (2012)
Sang, T., Bacchus, F., Beame, P., Kautz, H., Pitassi, T.: Combining component caching and clause learning for effective model counting. In: Seventh International Conference on Theory and Applications of Satisfiability Testing (2004)
Vadhan, S.P.: The complexity of counting in sparse, regular, and planar graphs. SIAM J. Comput. 31, 398–427 (1997)
Valiant, L.G.: The complexity of enumeration and reliability problems. SIAM J. Comput. 8(3), 410–421 (1979)
Acknowledgments
We are thoroughly grateful to the anonymous reviewers for their valuable and constructive remarks and suggestions. Radislav Vaisman’s work was supported by the Australian Research Council under grant number CE140100049. Zdravko Botev acknowledges support from the Australian Research Council under grant number DE140100993.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Rasmusen Algorithm for counting the number of cliques
Appendix 2: Proofs
Lemma 7.1
Given a simple graph \(G = G(V,E)\) with \(|V|=n\), and let \(\overline{G}=G(V,\overline{E})\) be its complement. Let \(\varvec{x}\in \{0,1\}^n\) be a binary \(n\)-tuple such that its associated vertex set is a vertex cover in \(G\); i.e., \(V(\varvec{x})\in \fancyscript{G}^\mathrm{vc}\), and denote its complement by \(\overline{\varvec{x}}\). Furthermore, \(f(\cdot )\) and \(g(\cdot )\) are PMF’s on binary \(n\)-tuples given by (16) and (17), respectively. Then \(f(\varvec{x})=g(\overline{\varvec{x}})\).
Proof
Note that \(V(\overline{\varvec{x}})\) is a clique in the complement graph \(\overline{G}\).
First we show that \(f(1)=g(0)\). This follows directly from their definitions:
where \(k_{+}=n-1\), and \(k_{-}=d_1\) (degree of vertex \(v_1\) in \(G\)), see Definition 2.1. And
where \(m_{-}=n-1\) and \(m_{+}=d_1\), see Definition 3.2.
Consider the vertex \(v_{i}\). The following cases are of interest.
-
1.
Suppose that in graph \(G\) there exists \(v_j, j<i\), such that \(x_j=0\) and \((v_j,v_i)\in E\). This means that \(v_i\) is adjacent to a certain vertex that is not part of the vertex cover. Thus, \(v_i\) must be chosen with probability 1; i.e., \(f_i(1|x_1,\ldots ,x_{i-1})=1\). Then, in the complement graph \(\overline{x}_j=1\) and \((v_j,v_i)\not \in \overline{E}\). This means \(v_i\) is not adjacent to a certain vertex that is part of the clique. Thus, \(v_i\) is not chosen with probability 1; i.e., \(g_i(0|\overline{x}_1,\ldots , \overline{x}_{i-1})=1\).
-
2.
Suppose that in graph \(G\) all vertices \(v_j, j<i\) that are part of the vertex cover, are adjacent to \(v_i\). Mathematically:
$$\begin{aligned} x_j=1\; (j\le i-1) \;\;\Rightarrow \;\; (v_j,v_i)\in E. \end{aligned}$$Thus \(v_i\) may or may be not part of the vertex cover in \(G\). Let
$$\begin{aligned} A \!&=\! \{v_k | k\ge i+1; \,\exists \, j\le i-1 \; x_j=0\;\text {and}\; (v_j,v_k)\!\in \! E\},\\ B&= \{v_k | k\ge i+1; v_k\not \in A;\text {and}\; (v_i,v_k)\in E\}. \end{aligned}$$Then \(v_i\) is chosen in the vertex cover with probability
$$\begin{aligned} f_i(1|x_1,\ldots ,x_{i-1})=\frac{E_{k_{+}}}{E_{k_{+}}+E_{k_{-}}}, \end{aligned}$$with, according to Definition 2.1:
$$\begin{aligned} k_{+}=n-i-|A|;\quad k_{-}=n-i-|A|-|B|. \end{aligned}$$In the complement graph \(\overline{G}\) it holds that
$$\begin{aligned} \overline{x}_j=0\; (j\le i-1) \;\;\Rightarrow \;\; (v_j,v_i)\not \in \overline{E}. \end{aligned}$$Thus \(v_i\) may or may be not part of the clique in \(\overline{G}\). Let
$$\begin{aligned} \overline{A}&= \{v_k | k\ge i+1; \,\exists \, j\le i-1 \; \overline{x}_j=1 \;\text {and}\; (v_j,v_k)\not \in \overline{E}\},\\ \overline{B}&= \{v_k | k\ge i+1; v_k\not \in \overline{A} \;\text {and}\; (v_i,v_k)\in \overline{E}\}. \end{aligned}$$Then \(v_i\) is not chosen in the clique with probability
$$\begin{aligned} g_i(0|\overline{x}_1,\ldots ,\overline{x}_{i-1})= \frac{E_{m_{-}}}{E_{m_{-}}+E_{m_{+}}}, \end{aligned}$$with, according to Definition 3.2:
$$\begin{aligned} m_{-}=n-i-|\overline{A}|;\quad m_{+}=|\overline{B}|. \end{aligned}$$We see immediately that the set \(A\) and \(\overline{A}\) are the same, and that \(\overline{B}=\{v_{i+1},\ldots ,v_n\}{\setminus }(\overline{A}\cup B)\). In other words, \(k_{+}=m_{-}\) and \(k_{-}=m_{+}\). \(\square \)
Lemma 7.2
Given a simple graph \(G = G(V,E)\) with \(|V|=n\), and let \(\overline{G}=G(V,\overline{E})\) be its complement. Let \(\varvec{x}\in \{0,1\}^n\) be a binary \(n\)-tuple such that its associated vertex set is a clique in \(G\); i.e., \(V(\varvec{x})\in \fancyscript{G}^\mathrm{cl}\), and denote its complement by \(\overline{\varvec{x}}\). Furthermore, \(f(\cdot )\) and \(g(\cdot )\) are PMF’s on binary \(n\)-tuples given by (16) and (17), respectively. Then \(g(\varvec{x})=f(\overline{\varvec{x}})\).
The proof goes similarly as the proof of the previous Lemma, and therefore it is omitted.
Rights and permissions
About this article
Cite this article
Vaisman, R., Botev, Z.I. & Ridder, A. Sequential Monte Carlo for counting vertex covers in general graphs. Stat Comput 26, 591–607 (2016). https://doi.org/10.1007/s11222-015-9546-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11222-015-9546-9