Abstract
We study a wide generalization of two classical problems, the Huffman Tree and Alphabetic Tree Problem. We assume that the cost caused by the ith leaf is f i (d i ), where d i is its depth in the tree under consideration, and \(f_i:\mathbb{N}_0 \to \mathbb{R}^+_0\) is an arbitrary function. All solution methods known for the classical cases fail to compute the optimum here.
For the generalized Alphabetic Tree Problem, we give a dynamic programming algorithm solving it in time O(n 4), using space O(n 3). Furthermore, we show that the runtime can be reduced to O(n 3) if the cost functions are nondecreasing and convex. The improved algorithm can also be used in the setting where the cost functions are nondecreasing and the objective function is the maximum leaf cost.
We also prove that the Huffman Tree Problem in its full generality is inapproximable unless P=NP, no matter if the objective function is the sum of leaf costs or their maximum. For the latter problem, we show that the case where the cost functions are nondecreasing admits a polynomial time algorithm.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Huffman, D.A.: A Method for the Construction of Minimum-Redundancy Codes. In: Proceedings of the I.R.E., pp. 1098–1101 (1952)
Gilbert, E.N., Moore, E.F.: Variable Length Binary Encodings. Bell System Tech. J. 38, 933–968 (1959)
Knuth, D.E.: Optimum Binary Search Trees. Acta Informatica 1, 14–25 (1971)
Hu, T.C., Tucker, A.C.: Optimal Computer Search Trees and Variable-Length Alphabetical Codes. SIAM Journal on Applied Mathematics 21(4), 514–532 (1971)
Karp, R.M.: Reducibility among combinatorial problems. In: Complexity of Computer Computations, pp. 85–103. Plenum Press, New York (1972)
Flajolet, P., Prodinger, H.: Level Number Sequences for Trees. Discrete Mathematics 65(2), 149–156 (1987)
Klawe, M.M., Mumey, B.: Upper and Lower Bounds on Constructing Alphabetical Binary Trees. In: Proc. 4th ACM-SIAM Symposium on Discrete Algorithms, pp. 185–193 (1993)
Hu, T.C.: A New Proof of the T-C Algorithm. SIAM J. Appl. Math 25, 83–94 (1973)
Hu, T.C., Kleitman, D.J., Tamaki, J.K.: Binary Trees Optimum Under Various Criteria. SIAM Journal on Applied Mathematics 37(2), 246–256 (1979)
Carmo, R., Donaldelli, J., Kohayakawa, Y., Laber, E.: Searching in Random Partially Ordered Sets. Theor. Comp. Science 321, 41–57 (2004)
Chakaravarthy, V., Pandit, V., Roy, S., Awasthi, P., Mohania, M.: Decision Trees for Entity Identification: Approximation Algorithms and Hardness Results. In: Proceedings of PODS (2007)
Mozes, S., Onak, K., Weizmann, O.: Finding an Optimal Tree Searching Strategy in Linear Time. In: Proceedings of SODA (2008)
Adler, M., Heeringa, B.: Approximating Optimal Binary Decision Trees. In: Goel, A., Jansen, K., Rolim, J.D.P., Rubinfeld, R. (eds.) APPROX and RANDOM 2008. LNCS, vol. 5171, pp. 1–9. Springer, Heidelberg (2008)
Chakaravarthy, V., Pandit, V., Roy, S., Sabharwal., Y.: Approximating Decision Trees with Multiway Branches. In: Proceedings of ICALP (2009)
Baer, M.B.: Alphabetic Coding with Exponential Costs. Information Processing Letters 110(4), 139–142 (2010)
Cicalese, F., Jacobs, T., Laber, E., Molinaro, M.: On The Complexity of Searching in Trees: Average-case Minimization. In: Proceedings of ICALP 2010 (to appear, 2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fujiwara, H., Jacobs, T. (2010). On the Huffman and Alphabetic Tree Problem with General Cost Functions. In: de Berg, M., Meyer, U. (eds) Algorithms – ESA 2010. ESA 2010. Lecture Notes in Computer Science, vol 6346. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15775-2_38
Download citation
DOI: https://doi.org/10.1007/978-3-642-15775-2_38
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-15774-5
Online ISBN: 978-3-642-15775-2
eBook Packages: Computer ScienceComputer Science (R0)