Optimal Search Trees with 2-Way Comparisons

2 May 2015  ·  Marek Chrobak, Mordecai Golin, J. Ian Munro, Neal E. Young ·

In 1971, Knuth gave an $O(n^2)$-time algorithm for the classic problem of finding an optimal binary search tree. Knuth's algorithm works only for search trees based on 3-way comparisons, while most modern computers support only 2-way comparisons (e.g., $<, \le, =, \ge$, and $>$)... Until this paper, the problem of finding an optimal search tree using 2-way comparisons remained open -- poly-time algorithms were known only for restricted variants. We solve the general case, giving (i) an $O(n^4)$-time algorithm and (ii) an $O(n \log n)$-time additive-3 approximation algorithm. Also, for finding optimal binary split trees, we (iii) obtain a linear speedup and (iv) prove some previous work incorrect. read more

PDF Abstract
No code implementations yet. Submit your code now


Data Structures and Algorithms 68P10, 68P30, 68W25, 94A45, E.4; G.1.6; G.2.2; H.3.1; I.4.2


  Add Datasets introduced or used in this paper