Skip to main content

Fast compilation of graph substructures for counting and enumeration


In this paper, we propose a new compilation method called merging frontier-based search for st simple paths on a graph. Recently, Nishino et al. proposed a top-down construction algorithm, which compiles st simple paths into a zero-suppressed SDD (ZSDD), and they showed that this method is more efficient than simpath by Knuth. However, since the method of Nishino et al. uses ZSDD as a tractable representation, it requires complicated steps for compilation. In this paper, we propose structured Z-d-DNNF, which is a super set of ZSDD. Though this representation relaxed the restriction of ZSDD, it supports important queries like model counting and model enumeration. Using this representation instead of ZSDD, we show that more efficient compilation can be realized for st simple paths.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22


  1. Since, in our paper, the elements that appears in a vtree are edges, they are denoted by E instead of I.


  3. The implementation was obtained from


  • Bordeaux L, Hamadi Y, Kohli P (eds) (2014) Tractability practical approaches to hard problems. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  • Bryant RE (1986) Graph-based algorithms for Boolean function manipulation. IEEE Trans Comput 35(8):677–691

    Article  Google Scholar 

  • Chavira M, Darwiche A (2008) On probabilistic inference by weighted model counting. Artif Intell 172(6–7):772–799

    MathSciNet  Article  Google Scholar 

  • Cook W, Seymour PD (2003) Tour merging via branch-decomposition. Informs J Comput 15(3):233–248

    MathSciNet  Article  Google Scholar 

  • Darwiche A (1999) Compiling knowledge into decomposable negation normal form. In: IJCAI, pp 284–289

  • Darwiche A (2004) New advances in compiling CNF into decomposable negation normal form. In: ECAI, pp 328–332

  • Darwiche A (2011) SDD: A new canonical representation of propositional knowledge bases. In: IJCAI, pp 819–826

  • Darwiche A (2001a) Decomposable negation normal form. J ACM 48(4):608–647

    MathSciNet  Article  Google Scholar 

  • Darwiche A (2001b) On the tractable counting of theory models and its application to truth maintenance and belief revision. JANCL 11(1–2):11–34

    MathSciNet  MATH  Google Scholar 

  • Darwiche A, Marquis P (2002) A knowledge compilation map. J Artif Intell Res 17:229–264

    MathSciNet  Article  Google Scholar 

  • Hardy G, Lucet C, Limnios N (2005) Computing all-terminal reliability of stochastic networks with binary decision diagrams. In: ASMDA, pp 1469–74

  • Kawahara J, Inoue T, Iwashita H, Minato S (2017) Frontier-based search for enumerating all constrained subgraphs with compressed representation. IEICE Trans 100–A(9):1773–1784

    Article  Google Scholar 

  • Knuth DE (2011) The art of computer programming, volume 4A: combinatorial algorithms, part 1. Addison-Wesley Professional, Boston

    MATH  Google Scholar 

  • Maehara T, Suzuki H, Ishihata M (2017) Exact computation of influence spread by binary decision diagrams. In: WWW, pp 947–956

  • Minato S (1993) Zero-suppressed bdds for set manipulation in combinatorial problems. In: DAC, pp 272–277

  • Nishino M, Yasuda N, Minato S, Nagata M (2016) Zero-suppressed sentential decision diagrams. In: AAAI, pp 1058–1066

  • Nishino M, Yasuda N, Minato S, Nagata M (2017) Compiling graph substructures into sentential decision diagrams. In: AAAI, pp 1213–1221

  • Oztok U, Darwiche A (2015) A top-down compiler for sentential decision diagrams. In: IJCAI, pp 3141–3148

  • Pipatsrisawat K, Darwiche A (2008) New compilation languages based on structured decomposability. In: AAAI, pp 517–522

  • Pipatsrisawat K, Darwiche A (2010) Top-down algorithms for constructing structured DNNF: theoretical and practical implications. In: ECAI, pp 3–8

  • Robertson N, Seymour PD (1991) Graph minors. X. Obstructions to tree-decomposition. J Comb Theory Ser B 52(2):153–190

    MathSciNet  Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Teruji Sugaya.

Additional information

Communicated by Joe Suzuki.

About this article

Verify currency and authenticity via CrossMark

Cite this article

Sugaya, T., Nishino, M., Yasuda, N. et al. Fast compilation of graph substructures for counting and enumeration. Behaviormetrika 45, 423–450 (2018).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


  • Knowledge compilation
  • ZSDD
  • Frontier-based search
  • Structured Z-d-DNNF