Your manager wants to send Important Text Information through network. But he sc
ID: 3662365 • Letter: Y
Question
Your manager wants to send Important Text Information through network. But he scared of Hackers, so he planned to send his text string after encoding. He will have two options, fixed length encoding and variable length encoding. In fixed length encoding he used five bits for each character. Assume that the text he wants to send consisting of 100 characters, the probability of occurrence of these characters is given in the table below:
A) Construct a variable coded string by Huffman’s tree.
B) For 100 characters Text string what will be the coded bit length by using fixed length method and variable length method.
C) Decode the bit string “1110101111000000011111110100111100“by using variable length method.
Character A B C E I L S T W - Probability 0.25 0.10 0.15 0.10 0.15 0.05 0.025 0.05 0.025 0.10Explanation / Answer
A) Construct a variable coded string by Huffman’s tree.
As per Huffman coding , character is converting into below encoding.
Character Encoding
A 10
I 111
C 110
- 10
E 1
B 0
L 1111
T 110
W 11101
S 11100
2)
With a fixed-length encoding, as given you could represent each character in that string using 5 bits. To represent 100 total characters, when using this method, the compressed string would be 500 bits long.
For 100 characters Text string will be 350, using the coded bit length by using variable length method.
3) By using variable length method for the given bit string “1110101111000000011111110100111100“ is : WBESBEL-AES
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.