File:Huffman tree.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 850 × 460 pixels, file size: 40 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description

Huffman tree generated from the exact frequencies in the sentence "this is an example of a huffman tree". It encodes this sentence in 135 bits as "01101010100010111111000101111101000101110001001001001111001111001000111001101

1011110101111010001111101110101110100010111011011000000000", representing about a 53% compression over ASCII's 288 bits, not counting any space for representing the tree. Notice that the frequencies on each level fall between two adjacent powers of 2. The bit pattern and frequency of each character are shown by the table below. Notice that some symbols have different frequencies but the same encoding length; these particularly indicate places where arithmetic coding would do better.
Date
Source Own work
Author Dcoetzee
Char Freq Code
space 7 111
a 4 010
e 4 000
f 3 1101
h 2 1010
i 2 1000
Char Freq Code
m 2 0111
n 2 0010
s 2 1011
t 2 0110
l 1 11001
o 1 00110
Char Freq Code
p 1 10011
r 1 11000
u 1 00111
x 1 10010

Licensing

[edit]
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current07:26, 15 May 2007Thumbnail for version as of 07:26, 15 May 2007850 × 460 (40 KB)Dcoetzee (talk | contribs)Make the boxes opaque background
07:19, 15 May 2007Thumbnail for version as of 07:19, 15 May 2007850 × 460 (41 KB)Dcoetzee (talk | contribs)Update canvas size
07:16, 15 May 2007Thumbnail for version as of 07:16, 15 May 2007744 × 1,052 (38 KB)Dcoetzee (talk | contribs){{Information |Description=Huffman tree generated from the exact frequencies in the sentence "this is an example of a huffman tree". It encodes this sentence in 135 bits as "01101010100010111111000101111101000101110001001001001111001111001000111001101\ 10

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata