# Recent questions tagged huffman-code

1
Huffman tree is constructed for the following data :$\{A,B,C,D,E\}$ with frequency $\{0.17,0.11,0.24,0.33\ \text{and} \ 0.15 \}$ respectively. $100\ 00\ 01101$ is decoded as $BACE$ $CADE$ $BAD$ $CADD$
2
in Huffman Code, we get extract the minimum at each time, but my minimum is creating duplicate, then which one i choose? i am getting the same avg.no.of bits for every Huffman tree, but the problem is my tree is changing therefore representing the character also changed, if some one asks convert the message ... $\frac{12}{30}$
3
Consider the following message: The number of bits required for huffman encoding of the above message are __________? My Strategy:- But the answer given is 52bits i used standard Algorithem Made Easy Solution :-
1 vote
4
what is Space complexity of Huffman coding?
1 vote
5
Which of the following statements is/are correct? P:In Huffman Coding, the item with the second lowest probability is always at the leaf that is furthest from the root Q: In Huffman Coding, the item with the highest probability is always at the leaf that is closest to the root R: In ... at a leaf that is the child of the root Edit :Answer is P and Q R is not always true and always word i missed :(
1 vote
6
************ ****** is trying to send a message to Anand. The following message is: GATE2018GAATTTEEEE22000011188 What is the average length of bits required for encoding each letter using Huffman coding___? given solution : My solution using min heap ? I am ... char have same frequency ,does we get more than one tree and hence more than one solution? sorry if it is naive and already discussed
7
question based on huffman coding for symbol A with probability 0.3 , B with 0.15 ,c with 0.1 ,D with 0.25 ,E with 0.2 (with the convention 0 labeled for left branch and 1 for right) the minimum no of bits required to represent all the symbols together is?? a)1 b)2 c)3 d)4 which bit this question asking??
1 vote
8
The following message is: GATE2018GAATTTEEEE22000011188 What is the average length of bits required for encoding each letter using Huffman coding___?
1 vote
9
how to find the comparision complexities in huffman coding algorithm?
1 vote
10
What would be huffman coding for following : Character Frequency a 10 l 15 i 12 o 3 u 4 s 13 t 1 Explain this with suitable diagram..
1 vote
11
A zero memory source emits six messages with probabilities 0.3, 0.25, 0.15, 0.12, 0.1 and 0.08. If binary Huffman coding is used, what will be the average code length? a) 2.45 bits b) 3.45 bits c) 2.54 bits d) 3.54 bits
12
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:$\begin{array}{|c|c|}\hline \textbf{Character} & \textbf{Probability } \\\hline \text{$ ... $100$ characters over $X$ is encoded using Huffman coding, then the expected length of the encoded message in bits is ______.
13
What is the time complexity of Huffman coding using heap tree data structure ? a) O(n) b) O(n log n) c) O(log n) d) O(n2)
14
The following data contains 100 symbols. If Huffman coding is applied to the given data What is the code for the letter ‘E’ if ‘0’ as taken left and ‘1’ is right A. 101 B. 100 C. 110 D. 111
15
The following data contains 100 symbols. If Huffman coding is applied to the given data Calculate the number of bits occupies after compress the data. A. 128 B. 285 C. 200 D. 150
16
17
A language uses an alphabet of six letters, $\left\{a, b, c, d, e, f\right\}$ ... Design a prefix binary code for the language which would minimize the average length of the encoded words of the language.
18
19
Consider a source with symbols $A, B, C, D$ with probabilities $1/2, 1/4, 1/8, 1/8$ respectively. What is the average number of bits per symbol for the Huffman code generated from above information? $2$ bits per symbol $1.75$ bits per symbol $1.50$ bits per symbol $1.25$ bits per symbol
1 vote
20
Match the following: $\begin{array}{|ll|ll|} \hline a. & \text{Huffman Code} & i. & \text{$O(n^2)$} \\\hline b. & \text{Optical Polygon Tringulation} & ii. & \text{$\theta(n^2)$} \\ \hline c. & \text{Activity Selection Problem} & iii. & \text{$ ... a-i, b-ii, c-iv, d-iii a-i, b-iv, c-ii, d-iii a-iii, b-ii, c-iv, d-i a-iii, b-iv, c-ii, d-i
21
Given the symbols A, B, C, D, E, F, G and H with the probabilities$\frac{1}{30}, \frac{1}{30}, \frac{1}{30}, \frac{2}{30}, \frac{3}{30}, \frac{5}{30}, \frac{5}{30}$ and $\frac{12}{30}$respectively. The average Huffman code size in bits per symbol is $\frac{67}{30}$ $\frac{70}{34}$ $\frac{76}{30}$ $\frac{78}{30}$
1 vote
22
A data file of 1,00,000 characters contains only the characters g-1, with the frequencies as indicated in table: g h i j k i Frequency in thousand 45 13 12 16 9 5 ... using the variable-length code by Huffman codes, the file can be encoded with 2,52,000 bits 2,64,000 bits 2,46,000 bits 2,24,000 bits
23
Suppose the letters $a, \,b, \,c, \,d, \,e, \,f$ have probabilities $\dfrac{1}{2}, \dfrac{1}{4}, \dfrac{1}{8}, \dfrac{1}{16}, \dfrac{1}{32}, \dfrac{1}{32}$, respectively. What is the average length of the Huffman code for the letters $a, \,b, \,c, \,d, \,e, \,f$? $3$ $2.1875$ $2.25$ $1.9375$