A huffman-tree is looking like this:
# root # | # 30 # / \ # / \ # / \ # / \ # 10 20 # | | # A | # | # 20 # / \ # / \ # B C # extend the tree with a third child and encode the message using this ternary-tree. On Oct 5, 12:30 pm, Mridul Malpani <[email protected]> wrote: > its same. > > instead of taking min 2, select mnimum 3. > but since the no.of symbols may not form complete 3-ary tree, so add > some dummy variable with value=0 (highest priority). > > extend this logic for n symbols. > > On Oct 5, 12:21 pm, pre lak <[email protected]> wrote: > > > Hi all, > > Pls help me with the following problem.. > > Generalize Huffman s algorithm to ternary codewords(i.e codewords using the > > symbols 0,1,2) and prove tht it yeilds optimal ternary codes > > Thanks in advance -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
