Gate2017 ss Q51

0. A message is made up entirely of characters from the set X= {P, Q, R, S, T}. The table of probabilities for each of the characters is shown below:
CharacterProbability
P0.22
Q0.34
R0.17
S0.19
T0.08
Total1.00



Note – Numerical Type question

  • Option : A
  • Explanation :
    By using haffman tree :

    So, number of bit required for each alphabet:
    T = 3 bit, R = 3 bit, Q = 2 bit, S = 2 bit, P = 2 bit
    Then, average length per character is = (number of bits * frequency of occurance of each alphabets)
    = 3 * 0.08 + 3 * 0.17 + 2 * 0.34 + 2 * 0.19 + 2 * 0.22 = 2.25 bits
    And, average length for 100 character = 2.25 * 100 = 225 bits.
    Hence, 225 bits is correct answer
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *