edited by
228 views
0 votes
0 votes
Consider the following table :

$\begin{array}{|c|c|c|c|c|} \hline X & A & B & C & D \\ \hline Y & 14 & 3 & 6 & 10 \\ \hline \end{array}$

Here, X represents character and Y represents frequency.

The total number of bits needed to encode a string which has $14$ a's, $3$ b's, $6$ c's and $10$ d's using Huffman Code is _______.
edited by

1 Answer

Best answer
1 votes
1 votes
no. of Bits required to encode 'a' =1,'b'=3,'c'=3,'d'=2.

total number of bits= f1*b1+f2*b2+...

where f stands for frequency and b stands for no. of bits for particular character.

therefore total=14*1+3*3+3*6+10*2= 61
selected by
Answer:

Related questions

2 votes
2 votes
2 answers
2
Bikram asked May 26, 2017
374 views
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
1 votes
2 answers
3
Bikram asked May 26, 2017
495 views
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.
0 votes
0 votes
1 answer
4
Bikram asked May 26, 2017
338 views
Consider the following instance of the knapsack problem :$\begin{array}{|c|c|c|c|c|c|} \hline \text{Item} & a & b & c & d & e \\ \hline \text{Benefit} & 15 & 12 & 9 & 16 ...