1

I tried calculating the Shannon entropy for a which is 0.. I am confused how huffman would encode and store this, as it's programmatically impossible to store string "a" with 0 bits in a computer system.

1 Answer 1

1

Indeed the code for a single symbol would be zero bits. However you have to answer some other questions.

  1. How is the code itself transmitted to the receiver?
  2. How does the receiver know that it is done decoding?

To answer those questions, you'd need more bits in the stream for the receiver.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.