Huffman code
Informal description
Given. A set of symbols and their costs.Find. A prefix free binary character code (a sets of codewords) with minimum weighted path length.Note-1. A code wherein each character is represented by a unique binary string (codeword) is called a binary character code.Note-2. A prefix free code is a code having the property that no codeword is a prefix of any other codeword.Note-3. 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.











