Reputation: 11
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.
Upvotes: 1
Views: 64
Reputation: 112414
Indeed the code for a single symbol would be zero bits. However you have to answer some other questions.
To answer those questions, you'd need more bits in the stream for the receiver.
Upvotes: 1