Given a weighted, ordered query set $Q$ and a partition of $Q$ into classes, we study the problem of computing a minimum-cost decision tree that, given any query $q$ in $Q$, uses equality tests and less-than comparisons to determine the class to which $q$ belongs. Such a tree can be much smaller than a lookup table, and much faster and smaller than a conventional search tree. We give the first polynomial-time algorithm for the problem. The algorithm extends naturally to the setting where each query has multiple allowed classes.
翻译:考虑到加权的、定单的查询设定了美元,并将美元分成几类,我们研究计算最低成本决策树的问题,根据任何查询,以美元计,用平等测试和低于比较来确定美元所属的类别。这种树小得多于一个查看表,比传统的搜索树快和小得多。我们给出了这个问题的第一个多年度算法。算法自然延伸到每个查询都有多个允许的分类的设置。