We are given the following letters with the respective frequencies:
\begin{equation*}\begin{matrix}a/2 & b/4 & c/7 & d/6 & e/4 & f/5 & g/8 & h/10 & i/3 & j/11\end{matrix}\end{equation*}
For that I have applied the Huffman code and I got the following tree:
Now it is asked for the total weight of the code. How do we calculate that?
Do we maybe use the formula $\displaystyle\sum_{c\in C}f(c)d(c)$ ?
Then we have $$2\cdot 4+3\cdot 4+5\cdot 3+6\cdot 3+7\cdot 3+4\cdot 4+4\cdot 4+8\cdot 3+10\cdot 3+11\cdot 3=193$$ Is that correct?