Question 7132 – NVS PGT CS 2019 Part-A
November 23, 2023Question 5149 – Data-Structures
November 23, 2023Question 5001 – Data-Structures
A text is made up of the characters α,β,γ,δ and σ with the probability 0.12, 0.40, 0.15, 0.08 and 0.25 respectively. The optimal coding technique will have the average length of
Correct Answer: B
Question 452 Explanation:
Step-1: Sort in descending order according to their probabilities.
Step-2: Perform optimal merge pattern
Step-2: Perform optimal merge pattern
0.40, 0.25, 0.15, 0.12, 0.08
Step-4: Multiply with length of the code
= (0.40*1) + (0.25*2) + (0.15*3) + (0.12*4) + (0.08*4)
= 2.15
1.7
2.15
3.4
3.8
Subscribe
Login
0 Comments