The Shannon-Fano Algorithm
A Shannon-Fano tree is built according to a specification designed to define an effective code table. The actual algorithm is simple: For a given list of symbols, develop a corresponding list of probabilities or frequency counts so that each symbol’s relative frequency of occurrence is known Sort the lists of symbols according to frequency, with … Read more