Bounded treewidth is one of the most cited combinatorial invariants, which was applied in the literature for solving several counting problems efficiently. A canonical counting problem is #SAT, which asks to count the satisfying assignments of a Boolean formula. Recent work shows that benchmarking instances for #SAT often have reasonably small treewidth. This paper deals with counting problems for instances of small treewidth. We introduce a general framework to solve counting questions based on state-of-the-art database management systems (DBMS). Our framework takes explicitly advantage of small treewidth by solving instances using dynamic programming (DP) on tree decompositions (TD). Therefore, we implement the concept of DP into a DBMS (PostgreSQL), since DP algorithms are already often given in terms of table manipulations in theory. This allows for elegant specifications of DP algorithms and the use of SQL to manipulate records and tables, which gives us a natural approach to bring DP algorithms into practice. To the best of our knowledge, we present the first approach to employ a DBMS for algorithms on TDs. A key advantage of our approach is that DBMS naturally allow to deal with huge tables with a limited amount of main memory (RAM), parallelization, as well as suspending computation.
翻译:绿色树枝是被引用最多的组合式变量之一,用于在文献中有效解决数数问题。卡通式计数问题是#SAT,它要求计算布林公式的满意分配。最近的工作表明,#SAT的基准实例往往具有相当小的树枝。本文涉及小树枝案例的计数问题。我们引入了一个基于最新数据库管理系统(DBMS)解决计数问题的一般框架。我们的框架通过在树分解(TD)方面使用动态程序(DP)解决案例,明显地利用小树枝。因此,我们把DP的概念应用到DBMS(PostgreSQL)中,因为DP的算法往往在理论上的表格操纵方面给出。这样可以对DP算法进行优雅的规范,并使用SQL来操纵记录和表格,这使我们有自然的方法将DP的算法纳入实践。我们最了解的是,我们用DBMS(DPS)的第一个方法在树分解法上应用DBMS概念,将DBMS和主要计算法的精度都允许在DBIS上进行高的自动的模拟。