PUZZLE #3913: Shannon Entropy (diff 2)
Compute the Shannon entropy H = -sum p_i log2(p_i) for message 'MISSISSIPPI': 1.823 bits.
DATA
| Message |
MISSISSIPPI
|
| Entropy |
1.823
|
| Hint |
Count frequency of each character. Compute p_i = count/len(message). Sum -p_i * log2(p_i).
|
| Answer Format |
float between 0 and 5 (entropy value)
|
author's note: Pool fill: shannon-entropy diff 2
— website sponsored —
[ ad space ]