Question 5144 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023
Question 16320 – UGC NET Dec-2020 and June-2021 Paper-2
December 2, 2023
Question 5144 – UGC NET CS 2018 JUNE Paper-2
December 1, 2023
Question 16320 – UGC NET Dec-2020 and June-2021 Paper-2
December 2, 2023

UGC NET CS 2018 JUNE Paper-2

Question 25
A text is made up of the characters A, B, C, D, E each occurring with the probability 0.08, 0.40, 0.25, 0.15 and 0.12 respectively. The optimal coding technique will have the average length of :
A
2.4
B
1.87
C
3.0
D
2.15
Question 25 Explanation: 

Step 1: Select two characters with smallest probabilities and merge them.

Step 2: Select two characters from Step 1 with smallest probabilities and merge them.

Step 3: Select two characters (from Step 2) with smallest probabilities and merge them.

Step 4: Merge the remaining two probabilities.

A = 1000 (4-bits)
E = 1001 (4-bits)
D = 101 (3-bits)
C = 11 (2-bits)
B = 0 (1-bit)
Average length = ((0.08×4)+(0.12×4)+(0.15×3)+(0.25×2)+(0.40×1)) / (0.08+0.12+0.15+0.25+0.40)
=2.15/1.0
= 2 .15
Correct Answer: D
Question 25 Explanation: 

Step 1: Select two characters with smallest probabilities and merge them.

Step 2: Select two characters from Step 1 with smallest probabilities and merge them.

Step 3: Select two characters (from Step 2) with smallest probabilities and merge them.

Step 4: Merge the remaining two probabilities.

A = 1000 (4-bits)
E = 1001 (4-bits)
D = 101 (3-bits)
C = 11 (2-bits)
B = 0 (1-bit)
Average length = ((0.08×4)+(0.12×4)+(0.15×3)+(0.25×2)+(0.40×1)) / (0.08+0.12+0.15+0.25+0.40)
=2.15/1.0
= 2 .15

Leave a Reply

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