Generating all compact codes with constraint on the smallest codelength

Document Type : Original Article

Authors

1 Department of electrical and computer engineering, Isfahan university of technology, Isfahan, Iran

2 Department of electrical and computer engineering, Isfahan University of Technology, Isfahan, Iran

Abstract

Although by employing the Huffman algorithm one can construct the compact code (code with Kraft sum equal to 1) with minimum redundancy for an information source, in some problems it is required to first construct all possible compact codes and then select an appropriate one on the basis of a desired criterion. In particular, if the length of all codewords of an n-tuple compact code is λ or more, then the difference between the largest and the smallest codeword lengths is limited to n-2^λ, and as a result, by considering larger values for λ, the variation in delay of decoding different symbols of the source can be reduced. The main goal of this paper is construction of all such codes and an algorithm is introduced which generates only these codes (i.e., n-tuple compact codes with all codewords of length λ or more). Noting the correspondence between the multiplicity vectors of the compact codes and some sequences of numbers, we find the necessary and sufficient condition that a sequence of numbers is correspondent with a compact code with the shortest codeword at least λ bits long. This way by generating all suitable sequences, all the desired compact codes can be constructed without generating any other compact code. Using the proposed algorithm, less computational resources are required. For example, for λ=3, the required computational resources for generating only the desired compact codes are 5 percent of those when all compact codes are generated.

Keywords

Main Subjects