Software—Practice & Experience
Adding compression to a full-text retrieval system
Software—Practice & Experience
Graph Algorithms
Coding and Information Theory
Hi-index | 0.89 |
A k-bit Hamming prefix code is a binary code with the following property: for any codeword x and any prefix y of another codeword, both x and y having the same length, the Hamming distance between x and y is at least k. Given an alphabet A=[a"1,...,a"n] with corresponding probabilities [p"1,...,p"n], the k-bit Hamming prefix code problem is to find a k-bit Hamming prefix code for A with minimum average codeword length @?"i"="1^np"i@?"i, where @?"i is the length of the codeword assigned to a"i. In this paper, we propose a general approximation algorithm for the k-bit Hamming prefix code problem. Let @a"k be an O(r"k(n))-time algorithm for calculating fixed-length codes with Hamming distances k whose codewords are d"k(n) bits longer than @?log"2n@?. Our algorithm uses @a"k to calculate a k-bit Hamming prefix code in O(r"k(n)+nlogn) time with an additive error of at most O(d"k(n)+log^*n) bits with respect to the optimal prefix code for A, under reasonable assumptions on the function d"k.