Skip to main navigation Skip to search Skip to main content

A Simple Algorithm for Optimal Search Trees with Two-way Comparisons

  • Marek Chrobak
  • , Mordecai Golin
  • , J. Ian Munro
  • , Neal E. Young

Research output: Contribution to journalJournal Articlepeer-review

Abstract

We present a simple O(n4)-time algorithm for computing optimal search trees with two-way comparisons. The only previous solution to this problem, by Anderson et al., has the same running time but is significantly more complicated and is restricted to the variant where only successful queries are allowed. Our algorithm extends directly to solve the standard full variant of the problem, which also allows unsuccessful queries and for which no polynomial-time algorithm was previously known. The correctness proof of our algorithm relies on a new structural theorem for two-way-comparison search trees.

Original languageEnglish
Article number2
JournalACM Transactions on Algorithms
Volume18
Issue number1
DOIs
Publication statusPublished - 2 Dec 2021

Bibliographical note

Publisher Copyright:
© 2021 held by the owner/author(s).

Keywords

  • Data structures
  • algorithms
  • optimal search trees

Fingerprint

Dive into the research topics of 'A Simple Algorithm for Optimal Search Trees with Two-way Comparisons'. Together they form a unique fingerprint.

Cite this