Full binary trees naturally represent commutative non-associative products. There are many important examples of these products: finite-precision floating-point addition and NAND gates, among others. Balance in such a tree is highly desirable for efficiency in calculation. The best balance is attained with a divide-and-conquer approach. However, this may not be the optimal solution, since the success of many calculations is dependent on the grouping and ordering of the calculation, for reasons ranging from the avoidance of rounding error, to calculating with varying precision, to the placement of calculation within a heterogeneous system. We introduce a new class of computational trees having near-best balance in terms of the Colless index from mathematical phylogenetics. These trees are easily constructed from the binary decomposition of the number of terms in the problem. They also permit much more flexibility than the optimally balanced divide-and-conquer trees. This gives needed freedom in the grouping and ordering of calculation, and allows intelligent efficiency trade-offs.
翻译:完整的二进制树自然代表非通货性非通货性产品。 这些产品有许多重要的例子: 有限精度浮点添加和 NAND 门等。 这种树的平衡对于计算效率非常可取。 最佳平衡是通过分裂和征服方法实现的。 但是,这也许不是最佳解决办法,因为许多计算的成功取决于分类和排序,原因从避免四舍五入错误到精确计算,到将计算放入一个混合系统。 我们引入了新型的计算树,从数学血压指数的分母指数来看,这些树的平衡接近最佳。这些树很容易从问题术语数的二进制分解中构建。它们还允许比最佳平衡的分解树具有更大的灵活性。 这为分组和排序提供了必要的自由,并允许明智的效率交易。