×

On the Huffman and alphabetic tree problem with general cost functions. (English) Zbl 1300.90059

Summary: We address generalized versions of the Huffman and Alphabetic Tree Problem where the cost caused by each individual leaf \(i\), instead of being linear, depends on its depth in the tree by an arbitrary function. The objective is to minimize either the total cost or the maximum cost among all leaves. We review and extend the known results in this direction and devise a number of new algorithms and hardness proofs.{ }It turns out that the Dynamic Programming approach for the Alphabetic Tree Problem can be extended to arbitrary cost functions, resulting in a time \(O(n^4)\) optimal algorithm using space \(O(n^3)\). We identify classes of cost functions where the well-known trick to reduce the runtime by a factor of \(n\) via a “monotonicity” property can be applied.
For the generalized Huffman Tree Problem we show that even the \(k\)-ary version can be solved by a generalized version of the Coin Collector Algorithm of L. L. Larmore and D. S. Hirschberg [Philadelphia, PA (USA): SIAM, 310–318 (1990; Zbl 0800.68499)] when the cost functions are nondecreasing and convex. Furthermore, we give an \(O(n^2\log n)\) algorithm for the worst case minimization variants of both the Huffman and Alphabetic Tree Problem with nondecreasing cost functions.
Investigating the limits of computational tractability, we show 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. The alphabetic version becomes NP-hard when the leaf costs are interdependent.

MSC:

90C35 Programming involving graphs or networks
90C39 Dynamic programming

Citations:

Zbl 0800.68499

References:

[1] Adler, M.; Heeringa, B., Approximating optimal binary decision trees, No. 5171, 1-9 (2008), Berlin · Zbl 1159.68662
[2] Baer, M.B.: Alphabetic coding with exponential costs. Inf. Process. Lett. 110(4), 139-142 (2010) · Zbl 1206.68365 · doi:10.1016/j.ipl.2009.11.008
[3] Bose, P.; Douïeb, K., Should static search trees ever be unbalanced?, No. 6506, 109-120 (2010), Berlin · Zbl 1310.68061
[4] Carmo, R., Donadelli, J., Kohayakawa, Y., Sany Laber, E.: Searching in random partially ordered sets. Theor. Comput. Sci. 321(1), 41-57 (2004) · Zbl 1068.68050 · doi:10.1016/j.tcs.2003.06.001
[5] Chakaravarthy, V. T.; Pandit, V.; Roy, S.; Awasthi, P.; Mohania, M. K., Decision trees for entity identification: approximation algorithms and hardness results, 53-62 (2007) · Zbl 1295.68210
[6] Chakaravarthy, V. T.; Pandit, V.; Roy, S.; Sabharwal, Y., Approximating decision trees with multiway branches, No. 5555, 210-221 (2009), Berlin · Zbl 1248.68553
[7] Garey, M.R.: Optimal binary search trees with restricted maximal depth. SIAM J. Comput. 3(2), 101-110 (1974) · Zbl 0288.68058 · doi:10.1137/0203008
[8] Garsia, A.M., Wachs, M.L.: A new algorithm for minimum cost binary trees. SIAM J. Comput. 6(4), 622-642 (1977) · Zbl 0366.68028 · doi:10.1137/0206045
[9] Gilbert, E.N., Moore, E.F.: Variable-length binary encodings. Bell Syst. Tech. J. 38, 933-966 (1959) · doi:10.1002/j.1538-7305.1959.tb01583.x
[10] Gotlieb, L.: Optimal multi-way search trees. SIAM J. Comput. 10(3), 422-433 (1981) · Zbl 0461.68069 · doi:10.1137/0210031
[11] Hu, T.C.: A new proof of the T-C algorithm. SIAM J. Appl. Math. 25(1), 83-94 (1973) · Zbl 0255.94008 · doi:10.1137/0125012
[12] Hu, T.C., Tucker, A.C.: Optimal computer search trees and variable-length alphabetical codes. SIAM J. Appl. Math. 21(4), 514-532 (1971) · Zbl 0228.94002 · doi:10.1137/0121057
[13] Hu, T.C., Kleitman, D.J., Tamaki, J.K.: Binary trees optimum under various criteria. SIAM J. Appl. Math. 37(2), 246-256 (1979) · Zbl 0412.68055 · doi:10.1137/0137015
[14] Hu, T. C.; Larmore, L. L.; Morgenthaler, J. D., Optimal integer alphabetic trees in linear time, No. 3669, 226-237 (2005), Berlin · Zbl 1162.68407
[15] Huffman, D. A., A method for the construction of minimum-redundancy codes, No. 40, 1098-1101 (1952) · Zbl 0137.13605
[16] Itai, A.: Optimal alphabetic trees. SIAM J. Comput. 5(1), 9-18 (1976) · Zbl 0328.68040 · doi:10.1137/0205002
[17] Jacobs, T.; Cicalese, F.; Laber, E.; Molinaro, M., On the complexity of searching in trees: average-case minimization, No. 6198, 527-539 (2010), Berlin · Zbl 1288.68125
[18] Karp, R. M.; Miller, R. E. (ed.); Thatcher, T. W. (ed.), Reducibility among combinatorial problems (1972), New York
[19] Karpinski, M., Larmore, L.L., Rytter, W.: Correctness of constructing optimal alphabetic trees revisited. Theor. Comput. Sci. 180, 309-324 (1997) · Zbl 0901.68144 · doi:10.1016/S0304-3975(96)00296-4
[20] Klawe, M.; Mumey, B., Upper and lower bounds on constructing alphabetic binary trees, 185-193 (1993) · Zbl 0801.68130
[21] Knuth, D.E.: Optimum binary search trees. Acta Inform. 1, 14-25 (1971) · Zbl 0233.68010 · doi:10.1007/BF00264289
[22] Kraft, L.G.: A device for quantizing, grouping, and coding amplitude modulated pulses. Master’s thesis, Massachusetts Institute of Technology (1949) · Zbl 0412.68055
[23] Larmore, L.L.: Height restricted optimal binary trees. SIAM J. Comput. 16(6), 1115-1123 (1987) · Zbl 0654.68076 · doi:10.1137/0216070
[24] Larmore, L. L.; Hirschberg, D. S., Length-limited coding, 310-318 (1990) · Zbl 0800.68499
[25] Larmore, L.L., Przytycka, T.M.: A fast algorithm for optimum height-limited alphabetic binary trees. SIAM J. Comput. 23, 1283-1312 (1994) · Zbl 0834.68020 · doi:10.1137/S0097539792231167
[26] Mozes, S.; Onak, K.; Weimann, O., Finding an optimal tree searching strategy in linear time, 1096-1105 (2008) · Zbl 1192.68242
[27] Wessner, R.L.: Optimal alphabetic search trees with restricted maximal height. Inf. Process. Lett. 4(4), 90-94 (1976) · Zbl 0319.68021 · doi:10.1016/0020-0190(76)90052-1
[28] Yeung, R.W.: Alphabetic codes revisited. IEEE Trans. Inf. Theory 37(3), 564-572 (1991) · Zbl 0731.94008 · doi:10.1109/18.79913
[29] Zhao, L., Nagamochi, H., Ibaraki, T.: Greedy splitting algorithms for approximating multiway partition problems. Math. Program. 102, 167-183 (2005) · Zbl 1177.90403 · doi:10.1007/s10107-004-0510-2
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.