Universal coding of integers~(UCI) is a class of variable-length code, such that the ratio of the expected codeword length to $\max\{1,H(P)\}$ is within a constant factor, where $H(P)$ is the Shannon entropy of the decreasing probability distribution $P$. However, if we consider the ratio of the expected codeword length to $H(P)$, the ratio tends to infinity by using UCI, when $H(P)$ tends to zero. To solve this issue, this paper introduces a class of codes, termed generalized universal coding of integers~(GUCI), such that the ratio of the expected codeword length to $H(P)$ is within a constant factor $K$. First, the definition of GUCI is proposed and the coding structure of GUCI is introduced. Next, we propose a class of GUCI $\mathcal{C}$ to achieve the expansion factor $K_{\mathcal{C}}=2$ and show that the optimal GUCI is in the range $1\leq K_{\mathcal{C}}^{*}\leq 2$. Then, by comparing UCI and GUCI, we show that when the entropy is very large or $P(0)$ is not large, there are also cases where the average codeword length of GUCI is shorter. Finally, the asymptotically optimal GUCI is presented.
翻译:整数 ~ (UCI) 通用编码 ~ (UCI) 是一个可变长代码的类别, 使预期的编码长度与 $max%1, H(P) ⁇ $ 的比值在一个恒定系数之内, 美元(P) 是概率分布下降的美元(P) 的香农 entropy 。 但是, 如果我们考虑预期的编码长度与 $H(P) 美元(UCI) 的比值, 则使用 UCI, 当 $H(P) 趋向于零时, 该比值的比值往往不那么大。 为了解决这个问题, 本文引入了一类代码, 称为整数( GUCI ) 的普遍通用编码比值与 $( GUCI ) 的比值是 $( GUCI ) 的比值是 $1\ le QQQQQQQLA 。 当我们用最大比值时, 我们的比值是 QQQQQLA 。