Skip to main content

On the Huffman and Alphabetic Tree Problem with General Cost Functions

  • Conference paper
Algorithms – ESA 2010 (ESA 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6346))

Included in the following conference series:

  • 1649 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Huffman, D.A.: A Method for the Construction of Minimum-Redundancy Codes. In: Proceedings of the I.R.E., pp. 1098–1101 (1952)

    Google Scholar 

  2. Gilbert, E.N., Moore, E.F.: Variable Length Binary Encodings. Bell System Tech. J. 38, 933–968 (1959)

    MathSciNet  Google Scholar 

  3. Knuth, D.E.: Optimum Binary Search Trees. Acta Informatica 1, 14–25 (1971)

    Article  MATH  Google Scholar 

  4. 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)

    Article  MATH  MathSciNet  Google Scholar 

  5. Karp, R.M.: Reducibility among combinatorial problems. In: Complexity of Computer Computations, pp. 85–103. Plenum Press, New York (1972)

    Google Scholar 

  6. Flajolet, P., Prodinger, H.: Level Number Sequences for Trees. Discrete Mathematics 65(2), 149–156 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  7. 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)

    Google Scholar 

  8. Hu, T.C.: A New Proof of the T-C Algorithm. SIAM J. Appl. Math 25, 83–94 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  9. 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)

    Article  MATH  MathSciNet  Google Scholar 

  10. Carmo, R., Donaldelli, J., Kohayakawa, Y., Laber, E.: Searching in Random Partially Ordered Sets. Theor. Comp. Science 321, 41–57 (2004)

    Article  MATH  Google Scholar 

  11. 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)

    Google Scholar 

  12. Mozes, S., Onak, K., Weizmann, O.: Finding an Optimal Tree Searching Strategy in Linear Time. In: Proceedings of SODA (2008)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. Chakaravarthy, V., Pandit, V., Roy, S., Sabharwal., Y.: Approximating Decision Trees with Multiway Branches. In: Proceedings of ICALP (2009)

    Google Scholar 

  15. Baer, M.B.: Alphabetic Coding with Exponential Costs. Information Processing Letters 110(4), 139–142 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  16. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics