contestada

A long string consists of the four characters a;c; g; t; they appear with frequency 31%; 20%; 9%, and 40%, respectively. what is the huffman encoding of these four characters?

Respuesta :

W0lf93
Huffman coding states that the item with the most frequency gets smallest code and the item with the least frequency gets the longest code. So the order of these letters would be t, a, c, g with t having the smallest code because it has the highest and then the code lengthening as the items decrease in frequency.