Exact and Experimental Algorithms for a Huffman-Based Error Detecting Code
Even codes are Huffman based codes in which every encoding contains an even number of 1’s, thus having the ability of detecting the occurrence of an odd number of 1-bit errors in the message. The motivation for defining such codes comes from a problem posed by Hamming in 1980. Even codes have been studied for the case in which symbols have uniform probabilities. In this work, we consider the general situation of arbitrary probabilities. An exact algorithm for constructing an optimal even code is described with complexity O(n 3), where n is the number of symbols. Further, two heuristics for constructing nearly optimal even codes are presented, both requiring O(n logn) time. The cost of the even code constructed by the second heuristics is at most 16,7% higher than the cost of a Huffman code, for the same probabilities. However, computational experiments suggest that, for practical purposes, this value seems to be better: about 5% or less, for n large enough. This corresponds to the amount of redundancy to be added to the message in order to keep the ability of error detection. Concerning undetected errors, we obtain bounds on the probability of producing k consecutive erroneous symbols, suggesting that such a probability is small for large messages.
KeywordsData compression error detection even codes Huffman codes Hamming codes
Unable to display preview. Download preview PDF.
- 1.Huffman, D.A.: A Method for the Construction of Minimum Redundancy Codes. In: Proceedings of the IRE, vol. 40, pp. 1098–1101 (1951)Google Scholar
- 2.Faller, N.: An adaptative Method for Data Compression. In: Record of the 7th Asilomar Conference on Circuits, Systems and Computers, Naval Postgraduate School, Monterrey, Ca, pp. 593–597 (1973)Google Scholar
- 13.Pinto, P.E.D., Protti, F., Szwarcfiter, J.L.: A Huffman-based Error detecting Code. In: Ribeiro, C.C., Martins, S.L. (eds.) WEA 2004. LNCS, vol. 3059, pp. 446–457. Springer, Heidelberg (2004)Google Scholar