Huffman coding: Difference between revisions

Content deleted Content added
GreenC bot (talk | contribs)
m Huffman coding with unequal letter costs: Convert external links into citations, find open access source
Line 260:
In the standard Huffman coding problem, it is assumed that each symbol in the set that the code words are constructed from has an equal cost to transmit: a code word whose length is ''N'' digits will always have a cost of ''N'', no matter how many of those digits are 0s, how many are 1s, etc. When working under this assumption, minimizing the total cost of the message and minimizing the total number of digits are the same thing.
 
''Huffman coding with unequal letter costs'' is the generalization without this assumption: the letters of the encoding alphabet may have non-uniform lengths, due to characteristics of the transmission medium. An example is the encoding alphabet of [[Morse code]], where a 'dash' takes longer to send than a 'dot', and therefore the cost of a dash in transmission time is higher. The goal is still to minimize the weighted average codeword length, but it is no longer sufficient just to minimize the number of symbols used by the message. No algorithm is known to solve this in the same manner or with the same efficiency as conventional Huffman coding, though it has been solved by [[Richard M. Karp]]<ref>{{Cite journal |last=Karp |first=Richard M. |author-link=Richard M. Karp |title=Minimum-redundancy coding for the discrete noiseless channel |url=https://ieeexplore.ieee.org/xpldocument/articleDetails.jsp1057615?arnumber=1057615&newsearch |journal=true&queryTextIRE Transactions on Information Theory |publisher=MinimumIEEE |publication-redundancy%20coding%20for%20the%20discrete%20noiseless%20channeldate=31 Karp]January 1961 |volume=7 |issue=1 |pages=27 - 38 |doi=10.1109/TIT.1961.1057615 |url-access=subscription |via=IEEE}}</ref> whose solution has been refined for the case of integer costs by [Mordecai J. Golin.<ref>{{Cite journal |last=Golin |first=Mordekai J. |date=January 1998 |publication-date=1 September 1998 |title=A Dynamic Programming Algorithm for Constructing Optimal Prefix-Free Codes with Unequal Letter Costs |url=https://ieeexplorepage.ieeemi.orgfu-berlin.de/xplrote/articleDetails.jsp?arnumber=705558&queryText=Papers/pdf/A+dynamic%20programming%20golin%20constructing%20optimal%20prefix+programming+algorithm+for+constructing+optimal+prefix-free&newsearch+codes+for+unequal+letter+costs.pdf |access-date=true10 Golin]September 2024 |s2cid=2265146 |doi=10.1109/18.705558 |journal=IEEE Transactions on Information Theory |volume=44 |issue=5 |pages=1770-1781}}</ref>
 
=== {{anchor|Hu-Tucker coding|Alphabetic Huffman coding|Alphabetic Huffman tree}}Optimal alphabetic binary trees (Hu–Tucker coding) ===