Content deleted Content added
Removing table & irrelevant ref tags in the image caption - tables do not appear to be able to be rendered in image captions and prevented any caption text displaying. |
Correction to previous edit: Table for caption correctly reinserted. |
||
Line 1:
{{Short description|Technique to compress data}}{{Use dmy dates|date=May 2019|cs1-dates=y}}
[[Image:Huffman tree 2.svg|thumb|Huffman tree generated from the exact frequencies of the text "this is an example of a huffman tree". Encoding the sentence with this code requires 135 (or 147) bits, as opposed to 288 (or 180) bits if 36 characters of 8 (or 5) bits were used (This assumes that the code tree structure is known to the decoder and thus does not need to be counted as part of the transmitted information).
{| class="wikitable sortable"
!Char!!Freq!!Code
|-
|space||7||111
|-
|a ||4||010
|-
|e ||4||000
|-
|f ||3||1101
|-
|h ||2||1010
|-
|i ||2||1000
|-
|m ||2||0111
|-
|n ||2||0010
|-
|s ||2||1011
|-
|t ||2||0110
|-
|l ||1||11001
|-
|o ||1||00110
|-
|p ||1||10011
|-
|r ||1||11000
|-
|u ||1||00111
|-
|x ||1||10010
|}
]]
In [[computer science]] and [[information theory]], a '''Huffman code''' is a particular type of optimal [[prefix code]] that is commonly used for [[lossless data compression]]. The process of finding or using such a code is '''Huffman coding''', an algorithm developed by [[David A. Huffman]] while he was a [[Doctor of Science|Sc.D.]] student at [[Massachusetts Institute of Technology|MIT]], and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".<ref>{{Cite journal | last1 = Huffman | first1 = D. |author-link1=David A. Huffman| title = A Method for the Construction of Minimum-Redundancy Codes | doi = 10.1109/JRPROC.1952.273898 | journal = [[Proceedings of the IRE]]| volume = 40 | issue = 9 | pages = 1098–1101 | year = 1952 | url = http://compression.ru/download/articles/huff/huffman_1952_minimum-redundancy-codes.pdf}}</ref>
|