Acta Informatica 14, 119-133 (1980) 9 by Springer-Verlag 1980 Optimum Multiway Search Trees V.K. Vaishnavi 1, H.P. Kriegel 2 and D. Wood 3 1 Department of Computer Science,Concordia University,Montr6al, Qu6bec, Canada, H4B 1R6 2 Lehrstuhl InformatikVI, Universit~itDortmund, Postfach 500500, 4600 Dortmund 50, Germany (Fed. Rep.) 3 Unit for Computer Science,McMaster University,Hamilton, Ontario, Canada, L8S 4K1 Summary. The construction of optimum multiway search trees for n keys, n key weights and n + 1 gap weights, is investigated. A new general optimality principle is presented, which can be "tuned" for specific applications. Mo- reover we consider the affects of three additional constraints, namely height, structural and node search restrictions, which lead to a number of new construction algorithms. In particular we concentrate on the construction of optimum t-ary search trees with linear and binary search within their nodes for which we obtain O(n3t) and O(n310g2t) time algorithms, respectively. Whether these algorithms are or are not optimal remains an important open problem, even in the binary case. 1. Introduction Knuth [14] has shown that an optimum binary search tree for 2n+ 1 weights can be constructed in O(n2) time, where there are n key (node or successful search) weights and n + 1 gap (leaf or unsuccessful search) weights. In this paper we consider the construction of optimum multiway search trees for 2n+l weights divided into n key and n + 1 gap weights. We use a dynamic programming algorithm, which is a natural generalization for optimum multiway search trees of that for optimum binary search trees given by Knuth [14]. Surprisingly this simple observation has not been reported in the literature although Itai [13] briefly considers the case when node weights are zero, that is for alphabetic multiway code trees. However, this observation is not the main motivation for this paper but rather it consists in a demonstration of the following points: 1) A unified approach, based on dynamic programming, for a variety of optimum tree construction problems. We will describe a number of specific construction algorithms all of which are new. 2) The possibility of "tuning" the general optimality principle in the dy- namic programming algorithm for specific applications. 0001-5903/80/0014/0119/$ 03.00