A poem to be used in our Huffman code experiment: You're my man, my mighty king, And I'm the jewel in your crown, You're the sun so hot and bright, I'm your light-rays shining down, You're the sky so vast and blue, And I'm the white clouds in your chest, I'm a river clean and pure, Who in your ocean finds her rest, You're the mountain huge and high, I'm the valley green and wide, You're the body firm and strong, And I'm a rib bone on your side, You're an eagle flying high, I'm your feathers light and brown, You're my man, my king of kings, And I'm the jewel in your crown. Nima Akbari
Character frencies in this poem: N 1 - 1 . 1 W 1 p 1 j 2 v 3 A 5 f 5 k 5 c 6 b 7 Y 7 I 8 w 8 l 11 g 15 ' 15 s 15 d 17 y 17 , 17 m 18 t 20 u 20 CR 21 a 22 h 24 i 26 o 30 r 30 n 38 e 39 SP 89
The corresponding Huffman code tree:
Write down the Huffman code for SP the most frequent character, and e the second most frequent character.
Check the Huffman code for any single character here:
| back to demos |