# What is a Huffman tree for a Block-Code?

We have the word "w = aabceefgeebdaabbceeffghdcbbeefbbbbghhie ".

I have created a Huffman tree for the string w.

We get the following table:

Now I want to create a Huffman tree for a Block-Code with length of block $4$.

Do we maybe take each consecutive 4 letters, i.e., {aabc, eefg, eebd, aabb, ceef, fghd, cbbe, efbb, bbgh, hie} to make the tree?

But then the last one is of length 3 and not 4.

So, do we choose in an other way the blocks?

In your context, a block code of length $\ell$ encodes $\ell$ letters at a time. The domain thus consists of all words over the alphabet of length $\ell$. Unless you're told otherwise, the assumption is that the individual letters are independent - the probability of a word $\sigma_1 \dots \sigma_\ell$ is the product of the probabilities of the individual letters.
• I am not taking that subject,... I am trying to learn it by myself, by looking at some examples/notes of the internet... Unfortunately, I haven't found an example for a Huffman tree for a block code.... So, do we have the following block?  idcf, idca, idce, idcb, idch, idcg, dcgh, dcgf, dcga, dcge, dcgb, cghf, cgha, cghe, cghb, ghfa, ghfe, ghfb, hfae, hfab, faeb  How do we know if we have found all the possibilities? – Mary Star Dec 7 '16 at 11:15