sec huffman coding trees letter frequency letter frequency figure relative frequencies for the letters of the alphabet as they appear in selected set of english documents "frequencyrepresents the expected frequency of occurrence per lettersignoring case if some characters are used more frequently than othersis it possible to take advantage of this fact and somehow assign them shorter codesthe price could be that other characters require longer codesbut this might be worthwhile if such characters appear rarely enough this concept is at the heart of file compression techniques in common use today the next section presents one such approach to assigning variable-length codescalled huffman coding while it is not commonly used in its simplest form for file compression (there are better methods)huffman coding gives the flavor of such coding schemes building huffman coding trees huffman coding assigns codes to characters such that the length of the code depends on the relative frequency or weight of the corresponding character thusit is variable-length code if the estimated frequencies for letters match the actual frequency found in an encoded messagethen the length of that message will typically be less than if fixed-length code had been used the huffman code for each letter is derived from full binary tree called the huffman coding treeor simply the huffman tree each leaf of the huffman tree corresponds to letterand we define the weight of the leaf node to be the weight (frequencyof its associated letter the goal is to build tree with the minimum external path weight define