0
$\begingroup$

Are there conditions under which given text $T$ that huffman code and arithmetic code will produce the exact encoding of $T$?

$\endgroup$
3
  • $\begingroup$ Of course. I assume it’s homework, so I’ll just say it’s really easy to show. $\endgroup$
    – gnasher729
    Jan 28, 2019 at 20:24
  • $\begingroup$ This is for preparation for the exam.A friend told me that the exact opposite. Meaning that there are no conditions since Huffman is based on frequencies and the arithmetic takes the frequencies and uses them to find an interval. So if you say it's true what is the reason for that? $\endgroup$
    – Kate
    Jan 28, 2019 at 21:03
  • $\begingroup$ That's an argument why they are usually different. Figure out why arithmetic coding is usually more efficient. Then figure out in which situations is is not more efficient, but exactly as efficient as Huffman. And there you get your conditions. $\endgroup$
    – gnasher729
    Jan 28, 2019 at 21:30

1 Answer 1

0
$\begingroup$

yes, if all probabilities are in form of $2^{-k}$ then the arithmetic encoding will be the same as huffman encoding. both achieving the expected length of $H(X)$ (entropy).

In such conditions branching in arithmetic coding will be exact and behave the same way huffman coding does.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.