使用 thinning、记忆化和多项式的布尔函数 level-p-复杂度
Level-p-complexity of Boolean Functions using Thinning, Memoization, and Polynomials
AI总结:
本文提出一个结合 thinning、记忆化与多项式表示的纯函数式库,用于计算 Bernoulli(p) 输入下布尔函数的 level-p-复杂度,并改进两层迭代多数函数的已有结果。
摘要:
本文描述了一个用于计算布尔函数 level-p-复杂度的纯函数式库,并将其应用于两层迭代多数函数。布尔函数就是从 n 个比特映射到一个比特的函数,可用于描述数字电路、投票系统等。多数函数是布尔函数的一个例子:当 n 为奇数时,它返回 n 个输入比特中占多数的取值。布尔函数 f 的复杂度衡量求值它的成本:需要读取多少个输入比特才能确定 f 的结果。复杂度度量有许多相互竞争的方案,而本文关注 level-p-复杂度——它是某比特为 1 的概率 p 的函数。level-p-复杂度 D_p(f) 是当输入比特独立同分布且服从 Bernoulli(p) 分布时的最小期望成本。我们将该问题表述为在所有可能的决策树中选择最小期望成本——这可直接转化为一个显然正确但效率很低的实现。该库使用 thinning 和记忆化来提高效率,并使用类型类实现关注点分离。复杂度用多项式(的集合)表示,而 thinning 所用的序关系通过多项式因式分解和根计数来实现。最后,我们计算了两层迭代多数函数的复杂度,并改进了 J. Jansson 早先的结果。
英文摘要:
This paper describes a purely functional library for computing level-$p$-complexity of Boolean functions, and applies it to two-level iterated majority. Boolean functions are simply functions from $n$ bits to one bit, and they can describe digital circuits, voting systems, etc. An example of a Boolean function is majority, which returns the value that has majority among the $n$ input bits for odd $n$. The complexity of a Boolean function $f$ measures the cost of evaluating it: how many bits of the input are needed to be certain about the result of $f$. There are many competing complexity measures but we focus on level-$p$-complexity -- a function of the probability $p$ that a bit is 1. The level-$p$-complexity $D_p(f)$ is the minimum expected cost when the input bits are independent and identically distributed with Bernoulli($p$) distribution. We specify the problem as choosing the minimum expected cost of all possible decision trees -- which directly translates to a clearly correct, but very inefficient implementation. The library uses thinning and memoization for efficiency and type classes for separation of concerns. The complexity is represented using (sets of) polynomials, and the order relation used for thinning is implemented using polynomial factorisation and root-counting. Finally we compute the complexity for two-level iterated majority and improve on an earlier result by J.~Jansson.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。