Maximum number of different numbers, Huffman Compression
I want to compress many 32bit number using huffman compression. Each number may appear multiple times, and I know that every number will be replaced with some bit sequences: 111 010 110 1010 1000 etc... Now, the question: How many different numbers can be added to the huffman tree before the length of the binary sequence exceeds 32bits? The rule of generating sequences (for those who don't know) is that every time a new number is added you must assign it the smallest binary sequence possible that is not the prefix of another. You seem to understand the principle of prefix codes. Many people