English

Algorithmic counting of nonequivalent compact Huffman codes

Combinatorics 2024-10-17 v4 Computational Complexity Discrete Mathematics Symbolic Computation

Abstract

It is known that the following five counting problems lead to the same integer sequence~ft(n)f_t(n): the number of nonequivalent compact Huffman codes of length~nn over an alphabet of tt letters, the number of `nonequivalent' canonical rooted tt-ary trees (level-greedy trees) with nn~leaves, the number of `proper' words, the number of bounded degree sequences, and the number of ways of writing 1=1tx1++1txn1= \frac{1}{t^{x_1}}+ \dots + \frac{1}{t^{x_n}} with integers 0x1x2xn0 \leq x_1 \leq x_2 \leq \dots \leq x_n. In this work, we show that one can compute this sequence for \textbf{all} n<Nn<N with essentially one power series division. In total we need at most N1+εN^{1+\varepsilon} additions and multiplications of integers of cNcN bits, c<1c<1, or N2+εN^{2+\varepsilon} bit operations, respectively. This improves an earlier bound by Even and Lempel who needed O(N3)O(N^3) operations in the integer ring or O(N4)O(N^4) bit operations, respectively.

Keywords

Cite

@article{arxiv.1901.11343,
  title  = {Algorithmic counting of nonequivalent compact Huffman codes},
  author = {Christian Elsholtz and Clemens Heuberger and Daniel Krenn},
  journal= {arXiv preprint arXiv:1901.11343},
  year   = {2024}
}
R2 v1 2026-06-23T07:28:12.340Z