关于最优搜索树的条件分支
On Conditional Branches in Optimal Search Trees
摘要:
有效地找到最佳字母决策树的算法--如Hu-Tucker算法--已经建立并普遍使用。然而,这样的算法通常假设每个决策的成本是均匀的,因此与决策的结果无关。少数没有这个假设的算法,如果决策结果是“小于”,则使用一个成本,否则使用另一个成本。在实践中,这两个假设都不适用于为今天的微处理器优化的软件。这样的软件通常有一个成本为更可能的决策结果和一个更大的成本-往往更大-为不太可能的决策结果。因此,该问题及其推广适用于软件中的硬编码静态决策树实例,例如,用于优化程序瓶颈或用于编译switch语句。一个O(n^3)-时间O(n^2)-空间动态规划算法可以解决这个最优二进制决策树问题,并且这种方法有许多推广,可以优化具有预测分支能力的处理器的行为,包括静态和动态。这种公式化的解决方案在实践中通常比文献中公式化的“最优”决策树更快。不同的搜索范式有时可以产生更好的性能。
英文摘要:
Algorithms for efficiently finding optimal alphabetic decision trees -- such as the Hu-Tucker algorithm -- are well established and commonly used. However, such algorithms generally assume that the cost per decision is uniform and thus independent of the outcome of the decision. The few algorithms without this assumption instead use one cost if the decision outcome is ``less than'' and another cost otherwise. In practice, neither assumption is accurate for software optimized for today's microprocessors. Such software generally has one cost for the more likely decision outcome and a greater cost -- often far greater -- for the less likely decision outcome. This problem and generalizations thereof are thus applicable to hard coding static decision tree instances in software, e.g., for optimizing program bottlenecks or for compiling switch statements. An O(n^3)-time O(n^2)-space dynamic programming algorithm can solve this optimal binary decision tree problem, and this approach has many generalizations that optimize for the behavior of processors with predictive branch capabilities, both static and dynamic. Solutions to this formulation are often faster in practice than ``optimal'' decision trees as formulated in the literature. Different search paradigms can sometimes yield even better performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。