Since three decades binary decision diagrams, representing efficiently Boolean functions, are widely used, in many distinct contexts like model verification, machine learning. The most famous variant, called reduced ordered binary decision diagram (ROBDD for short), can be viewed as the result of a compaction procedure on the full decision tree. In this paper we aim at computing the exact distribution of the Boolean functions in $k$~variables according to the ROBDD size, where the ROBDD size is equal to the size of the underlying directed acyclic graph (DAG) structure. Recall the number of Boolean functions is equal to $2^{2^k}$, which is of double exponential growth; hence a combinatorial explosion is to be expected. The maximal size of a ROBDD with $k$ variables is $M_k \sim 2^k / k$ and thus, the support of the ROBDD size distribution is also of length $M_k$, making $M_k$ a natural complexity unit for our problem. In this paper, we develop the first polynomial algorithm to derive the distribution of the Boolean functions with respect to their ROBDD sizes. The algorithm is essentially quartic in $M_k$ for the time complexity and quadratic for the space complexity. The main obstacle is to take into account dependencies inside the DAG structure, and we propose a new combinatorial counting procedure reminiscent of the inclusion-exclusion principle. As a by-product, we present an efficient polynomial unranking algorithm for ROBDDs, which in turn yields a uniform random sampler over the set of ROBDDs of a given size or of a given profile. This is a great improvement to the uniform sampler over the set of all Boolean functions in $k$ variables. Indeed, due to the Shannon effect, the uniform distribution over Boolean functions is heavily biased to extremely complex functions, with near maximal ROBDD size, thus preventing to sample small ROBDDs
翻译:由于在模型校验、机器学习等许多不同背景下广泛使用代表高效布尔函数的30年二进制决定图表,因此,在模型校验、机器学习等许多不同的背景下,广泛使用代表高效布尔函数的30年双进制决定图表。最著名的变体,称为减少排序双进制决定图表(ROBDD 简称简称ROBD),可以视为整个决策树上压缩程序的结果。在本文中,我们的目标是根据ROBDDD的大小计算布尔函数的精确分布($k$~可变),而ROBDD的大小与底部定向周期图(DAAG)的大小相等。在本文中,用双进制二进制双进制的二进制双进制双进制决定式决定图(ROBDDD), 以美元变量的最小值计算, ROBDDDS 的数值分布也等于一个硬化的数值, 将ODRA值的数值调整到我们的问题的数值, 以超级的数值计算。