A Tight Threshold Bound for Search Trees with 2-way Comparisons (2312.03896v1)
Abstract: We study search trees with 2-way comparisons (2WCST's), which involve separate less-than and equal-to tests in their nodes, each test having two possible outcomes, yes and no. These trees have a much subtler structure than standard search trees with 3-way comparisons (3WCST's) and are still not well understood, hampering progress towards designing an efficient algorithm for computing minimum-cost trees. One question that attracted attention in the past is whether there is an easy way to determine which type of comparison should be applied at any step of the search. Anderson, Kannan, Karloff and Ladner studied this in terms of the ratio between the maximum and total key weight, and defined two threshold values: $\lambda-$ is the largest ratio that forces the less-than test, and $\lambda+$ is the smallest ratio that forces the equal-to test. They determined that $\lambda- = 1/4$, but for the higher threshold they only showed that $\lambda+\in [3/7,4/9]$. We give the tight bound for the higher threshold, by proving that in fact $\lambda+ = 3/7$.
- Thresholds and optimal binary comparison search trees. Journal of Algorithms, 44:338–358, 2002.
- Structural properties of search trees with 2-way comparisons. CoRR, abs/2311.02224, 2023.
- The Knuth-Yao quadrangle-inequality speedup is a consequence of total monotonicity. ACM Trans. Algorithms, 6(1):17:1–17:22, 2009.
- A simple algorithm for optimal search trees with two-way comparisons. ACM Trans. Algorithms, 18(1):2:1–2:11, December 2021.
- On Huang and Wong’s algorithm for generalized binary split trees. Acta Informatica, 59(6):687–708, December 2022.
- D. E. Knuth. Optimum binary search trees. Acta Informatica, 1:14–25, 1971.
- D. E. Knuth. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley Publishing Company, Redwood City, CA, USA, 2nd edition, 1998.
- D. Spuler. Optimal search trees using two-way key comparisons. Acta Informatica, 31(8):729–740, 1994.
- D. A. Spuler. Optimal search trees using two-way key comparisons. PhD thesis, James Cook University, 1994.
- F. Frances Yao. Efficient dynamic programming using quadrangle inequalities. In Raymond E. Miller, Seymour Ginsburg, Walter A. Burkhard, and Richard J. Lipton, editors, Proceedings of the 12th Annual ACM Symposium on Theory of Computing, April 28-30, 1980, Los Angeles, California, USA, pages 429–435. ACM, 1980.