a) Define and discuss concepts “fixed-length codes” and “variable-length codes”. b) What is the main problem to be solve
Posted: Thu Jun 02, 2022 7:54 am
a) Define and discuss concepts “fixed-length codes” and
“variable-length codes”.
b) What is the main problem to be solved when interpreting coded
information, which is coded using variable size codes?
Justify.
c) Design Huffman code for frequencies of letters in an average
Norwegian text (see Appendix 1). Draw a tree for Huffman code.
d) Given a file with Norwegian text, which contains 8396 letters
divided by frequencies shown in List 3.1, reflects on the
difference between the size of an encoded version of the file using
fixed-length code and variable-length code (Huffman code). You will
get extra payoff, if you calculate the difference as accurately as
possible
List3.1
Appendix 1
'W' -> 3, 'Z' -> 0, 'j' -> 70, 'e' -> 1332, 'f' -> 131, 'p' -> 185, 't' -> 552, '₁' -> 577, 'n' -> 629, 'r' -> 837, '1' -> 452, 'æ' -> 62, 'V' -> 229, 'x' -> 0, 'q' -> 0, 'o' -> 427, '' -> 79, 'd' -> 338, 'b' -> 94, 'k' -> 415, 'à' -> 146, 'h' -> 92, 'a' -> 419, 's' -> 551, 'y' -> 52, 'u' -> 114, 'm' -> 229, 'C' -> 7, 'g' -> 374, 0.04 prosent 0.00 prosent 0.83 prosent 15.86 prosent 1.56 prosent 2.20 prosent 6.57 prosent 6.87 prosent 7.49 prosent 9.97 prosent 5.38 prosent 0.74 prosent 2.73 prosent 0.00 prosent 0.00 prosent 5.09 prosent 0.94 prosent 4.03 prosent 1.12 prosent 4.94 prosent 1.74 prosent 1.10 prosent 4.99 prosent 6.56 prosent 0.62 prosent 1.36 prosent 2.73 prosent 0.08 prosent 4.45 prosent
a b с d e (D f 9 h JO i j k I m n 0 р 9 r S t u V W X y Z 80.00 å 6,07% 1,47 % 0,34% 4,21 % 15,38 % 2,02 % 3,90 % 1,64 % 6,16 % 1,02 % 3,83 % 5,26 % 3,40 % 7,81 % 5,03 % 2,06 % 0,02 % 8,53 % 6,36 % 7,84 % 1,80 % 2,40 % 0,15 % 0,05 % 0,74% 0,04 % 0,20 % 0,76 % 1,50 %
“variable-length codes”.
b) What is the main problem to be solved when interpreting coded
information, which is coded using variable size codes?
Justify.
c) Design Huffman code for frequencies of letters in an average
Norwegian text (see Appendix 1). Draw a tree for Huffman code.
d) Given a file with Norwegian text, which contains 8396 letters
divided by frequencies shown in List 3.1, reflects on the
difference between the size of an encoded version of the file using
fixed-length code and variable-length code (Huffman code). You will
get extra payoff, if you calculate the difference as accurately as
possible
List3.1
Appendix 1
'W' -> 3, 'Z' -> 0, 'j' -> 70, 'e' -> 1332, 'f' -> 131, 'p' -> 185, 't' -> 552, '₁' -> 577, 'n' -> 629, 'r' -> 837, '1' -> 452, 'æ' -> 62, 'V' -> 229, 'x' -> 0, 'q' -> 0, 'o' -> 427, '' -> 79, 'd' -> 338, 'b' -> 94, 'k' -> 415, 'à' -> 146, 'h' -> 92, 'a' -> 419, 's' -> 551, 'y' -> 52, 'u' -> 114, 'm' -> 229, 'C' -> 7, 'g' -> 374, 0.04 prosent 0.00 prosent 0.83 prosent 15.86 prosent 1.56 prosent 2.20 prosent 6.57 prosent 6.87 prosent 7.49 prosent 9.97 prosent 5.38 prosent 0.74 prosent 2.73 prosent 0.00 prosent 0.00 prosent 5.09 prosent 0.94 prosent 4.03 prosent 1.12 prosent 4.94 prosent 1.74 prosent 1.10 prosent 4.99 prosent 6.56 prosent 0.62 prosent 1.36 prosent 2.73 prosent 0.08 prosent 4.45 prosent
a b с d e (D f 9 h JO i j k I m n 0 р 9 r S t u V W X y Z 80.00 å 6,07% 1,47 % 0,34% 4,21 % 15,38 % 2,02 % 3,90 % 1,64 % 6,16 % 1,02 % 3,83 % 5,26 % 3,40 % 7,81 % 5,03 % 2,06 % 0,02 % 8,53 % 6,36 % 7,84 % 1,80 % 2,40 % 0,15 % 0,05 % 0,74% 0,04 % 0,20 % 0,76 % 1,50 %