Abstract
We develop a linear time algorithm for the following problem: given an ordered sequence of n real weights, construct a binary tree on n leaves labelled with those weights when read from left to right minimizing the maximum value of w i plus the depth of the corresponding leaf. This improves the previously known O(nlogn) time solutions [3,10,12]. Assuming that the integer and the fractional part of each weight is given separately, our solution works in the linear decision tree model, i.e., we use only the basic arithmetical operations on the input numbers. To decide (efficiently) which operations to perform we need the word RAM model, though. We provide a simplified \(\mathcal{O}(nd)\) version of the algorithm, where d is the number of distinct integer parts, which does not require the full power of the word RAM model in order to decide which operations to perform. Nevertheless, it improves the previously known \(\mathcal{O}(nd\log\log n)\) solution of Gagie [5].
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Bartoschek, C., Held, S., Maßberg, J., Rautenbach, D., Vygen, J.: The repeater tree construction problem. Inf. Process. Lett. 110(24), 1079–1083 (2010)
Blum, M., Floyd, R., Pratt, V., Rivest, R., Tarjan, R.: Time bounds for selection. Journal of Computer and System Sciences 7(4), 448–461 (1973)
Coppersmith, D., Klawe, M., Pippenger, N.: Alphabetic Minimax Trees of Degree at Most t. SIAM Journal on Computing 15, 189 (1986)
Parker Jr., D.S.: Combinatorial Merging and Huffman’s Algorithm. IEEE Transactions on Computers, 365–367 (1979)
Gagie, T.: A new algorithm for building alphabetic minimax trees. Fundam. Inf. 97, 321–329 (2009), http://portal.acm.org/citation.cfm?id=1735991.1735995
Gawrychowski, P., Gagie, T.: Minimax trees in linear time with applications. In: Fiala, J., Kratochvíl, J., Miller, M. (eds.) IWOCA 2009. LNCS, vol. 5874, pp. 278–288. Springer, Heidelberg (2009)
Golumbic, M.C.: Combinatorial merging. IEEE Trans. Comput. 25, 1164–1167 (1976), http://dx.doi.org/10.1109/TC.1976.1674574
Hoover, H.J., Klawe, M.M., Pippenger, N.J.: Bounding fan-out in logical networks. J. ACM 31, 13–18 (1984), http://doi.acm.org/10.1145/2422.322412
Hu, T., Kleitman, D., Tamaki, J.: Binary trees optimum under various criteria. SIAM Journal on Applied Mathematics 37(2), 246–256 (1979)
Hu, T., Tucker, A.: Optimal computer search trees and variable-length alphabetical codes. SIAM Journal on Applied Mathematics 21(4), 514–532 (1971)
Huffman, D.: A method for the construction of minimum-redundancy codes. Proceedings of the IRE 40(9), 1098–1101 (1952)
Kirkpatrick, D., Klawe, M.: Alphabetic minimax trees. SIAM Journal on Computing 14, 514 (1985)
Larmore, L.L., Przytycka, T.M.: The optimal alphabetic tree problem revisited. J. Algorithms 28(1), 1–20 (1998)
van Leeuwen, J.: On the construction of Huffman trees? In: ICALP, pp. 382–410 (1976)
Yeung, R.: Alphabetic codes revisited. IEEE Transactions on Information Theory 37(3), 564–572 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gawrychowski, P. (2013). Alphabetic Minimax Trees in Linear Time. In: Bulatov, A.A., Shur, A.M. (eds) Computer Science – Theory and Applications. CSR 2013. Lecture Notes in Computer Science, vol 7913. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38536-0_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-38536-0_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-38535-3
Online ISBN: 978-3-642-38536-0
eBook Packages: Computer ScienceComputer Science (R0)