×

Minimax trees in linear time with applications. (English) Zbl 1254.05038

In a minimax tree for a multiset \(W=\{w_1,\dots,w_n\}\) of weights, each leaf has a weight \(w_i\), each internal node has weight equal to the maximum of its children’s weights plus 1, and the weight of the root is as small as possible. A minimax tree is thus similar to a Huffman tree which minimizes the weighted average of the leaves’ depths. Golumbic (1976) [M.C. Golumbic, “Combinatorial merging,” IEEE Trans. Comput. 25, 1164–1167 (1976; Zbl 0364.94037)] introduced minimax trees and gave a Huffman-like, \(\mathcal O(n\log n)\)-time algorithm for building them. Drmota and Szpankowski (2002) [M. Drmota and W. Szpankowski, “Generalized Shannon code minimizes the maximal redundancy,” Lect. Notes Comput. Sci. 2286, 306–318 (2002; Zbl 1068.94006)] gave another \(\mathcal O(n\log n)\)-time algorithm, which takes linear time when the weights are already sorted by their fractional parts.
Main result of this paper is the first linear-time algorithm for building minimax trees for unsorted real weights. This algorithm is based on Drmota and Szpankowski’s but, whereas their algorithm uses sorting and binary search, the new one uses generalized selection, as well as a new data structure to test the Kraft inequality. The paper concludes with an application of the presented algorithm to problems in adaptive and semi-static prefix coding and group testing.

MSC:

05C05 Trees
05C85 Graph algorithms (graph-theoretic aspects)
94A24 Coding theorems (Shannon theory)
Full Text: DOI

References:

[1] Ahlswede, R.; Wegener, I., Search Problems (1987), Wiley · Zbl 0647.90023
[2] Aigner, M., Combinatorial Search (1988), Wiley · Zbl 0663.68076
[5] Blum, M.; Floyd, R. W.; Pratt, V. R.; Rivest, R. L.; Tarjan, R. E., Time bounds for selection, Journal of Computer and System Sciences, 7, 4, 448-461 (1973) · Zbl 0278.68033
[6] Blumer, A.; McEliece, R. J., The Rényi redundancy of generalized Huffman codes, IEEE Transactions on Information Theory, 34, 5, 1242-1249 (1988) · Zbl 0665.94026
[7] Coppersmith, D.; Klawe, M. M.; Pippenger, N., Alphabetic minimax trees of degree at most \(t\), SIAM Journal on Computing, 15, 1, 189-192 (1986) · Zbl 0587.94019
[8] Cormen, T. H.; Leiserson, C. E.; Rivest, R. L.; Stein, C., Introduction to Algorithms (2001), MIT Press, McGraw-Hill · Zbl 1047.68161
[9] Cover, T. M.; Thomas, J. A., Elements of Information Theory (2006), Wiley · Zbl 1140.94001
[11] Drmota, M.; Szpankowski, W., Precise minimax redundancy and regret, IEEE Transactions on Information Theory, 50, 11, 2686-2707 (2004) · Zbl 1296.94065
[12] Evans, W. S.; Kirkpatrick, D. G., Restructuring ordered binary trees, Journal of Algorithms, 50, 2, 168-193 (2004) · Zbl 1067.68101
[16] Gagie, T., Dynamic Shannon coding, Information Processing Letters, 102, 2-3, 113-117 (2007) · Zbl 1189.94040
[17] Gagie, T., A new algorithm for building alphabetic minimax trees, Fundamenta Informaticae, 97, 3, 321-329 (2009) · Zbl 1200.68078
[19] Gallager, R. G., Variations on a theme by Huffman, IEEE Transactions on Information Theory, 24, 6, 668-674 (1978) · Zbl 0399.94012
[20] Golumbic, M. C., Combinatorial merging, IEEE Transactions on Computers, 25, 11, 1164-1167 (1976) · Zbl 0364.94037
[21] Hoover, H. J.; Klawe, M. M.; Pippenger, N., Bounding fan-out in logical networks, Journal of the ACM, 31, 1, 13-18 (1984) · Zbl 0626.94015
[22] Howard, P. G.; Vitter, J. S., Analysis of arithmetic coding for data compression, Information Processing and Management, 28, 6, 749-764 (1992)
[23] Hu, T. C.; Kleitman, D. J.; Tamaki, J., Binary trees optimum under various criteria, SIAM Journal on Applied Mathematics, 37, 2, 246-256 (1979) · Zbl 0412.68055
[24] Huffman, D. A., A method for the construction of minimum-redundancy codes, Proceedings of the IRE, 40, 1089-1101 (1952) · Zbl 0137.13605
[25] Karpinski, M.; Nekrich, Y., A fast algorithm for adaptive prefix coding, Algorithmica, 55, 1, 29-41 (2009) · Zbl 1172.94005
[26] Katona, G. O.H.; Nemetz, T. O.H., Huffman codes and self-information, IEEE Transactions on Information Theory, 22, 3, 337-340 (1976) · Zbl 0343.94014
[27] Kirkpatrick, D. G.; Klawe, M. M., Alphabetic minimax trees, SIAM Journal on Computing, 14, 3, 514-526 (1985) · Zbl 0565.94025
[29] Klawe, M. M.; Mumey, B., Upper and lower bounds on constructing alphabetic binary trees, SIAM Journal on Discrete Mathematics, 8, 4, 638-651 (1995) · Zbl 0837.05047
[30] Knuth, D. E., Dynamic Huffman coding, Journal of Algorithms, 6, 2, 163-180 (1985) · Zbl 0606.94007
[32] Milidiú, R. L.; Laber, E. S.; Pessoa, A. A., Bounding the compression loss of the FGK algorithm, Journal of Algorithms, 32, 2, 195-211 (1999) · Zbl 1111.94328
[33] Nakatsu, N., Bounds on the redundancy of binary alphabetical codes, IEEE Transactions on Information Theory, 37, 4, 1225-1229 (1991) · Zbl 0733.94010
[35] Parker, D. S., Combinatorial merging and Huffman’s algorithm, IEEE Transactions on Computers, 28, 5, 365-367 (1979) · Zbl 0403.94030
[37] Robbins, H., A remark on Stirling’s formula, American Mathematical Monthly, 62, 26-29 (1955) · Zbl 0068.05404
[38] Shannon, C. E., A mathematical theory of communication, Bell System Technical Journal, 27, 379-423 (1948), 623-645 · Zbl 1154.94303
[40] Vitter, J. S., Design and analysis of dynamic Huffman codes, Journal of the ACM, 34, 4, 825-845 (1987) · Zbl 0637.94002
[41] Yeung, R. W., Alphabetic codes revisited, IEEE Transactions on Information Theory, 37, 3, 564-572 (1991) · Zbl 0731.94008
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.