Results 1 to 4 of 4

Thread: Is this huffman encoding correct ?

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Is this huffman encoding correct ?

    Is the huffman encoding below correct, given the weight of the letters....

    Code:
    D = 0.32
    B = 0.25
    G = 0.2
    A = 0.1
    F = 0.07
    C = 0.05
    E = 0.01
    
    
    
    
                             ( 1 )
                           /       \
                          /         \
                         /           \
                        /             \
                    (.57)            (.43)
                    /  \              /  \
                   /    \            /    \
                  /      \          /      \
                (D)      (B)       (G)      \
               0.32     0.25       0.2       \ 
                                             (0.23)
                                               /  \
                                              /    \
                                             /      \
                                           (A)       \
                                           0.1        \
                                                       \
                                                       (0.13)
                                                         / \
                                                        /   \
                                                       /     \
                                                     (F)      \
                                                     0.7       \
                                                                \
                                                               (0.06)
                                                                 /  \
                                                                /    \
                                                               /      \
                                                              (C)      (E)
                                                             0.05      0.01
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    <bump>
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Lively Member
    Join Date
    Jun 2001
    Location
    Banana Republic
    Posts
    115
    Wrong !

    The Right Way is...

    |
    0.25|
    /\ / |0.25
    |
    |
    | 0
    /\ /0.25
    \ /
    \/
    \/\ /
    0.25 \ /
    \/
    0.25 \
    \ / |
    | 0.25
    /\ /
    \ \\/
    0.25\ |
    | 0.25
    /\ / |0.25
    |
    0.25/\ /
    \ /0.25
    \/
    0.25 \
    \0.25 /
    \/
    \0.25

  4. #4

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You dont happen to have a properly laid out copy of that do you ?
    And there also seem to be a lot of .25s there....
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width