Bartleby Related Questions Icon

Related questions

Question
Question 2 (Huffman Coding, Greedy Algorithms
man algorithm and answer the following questions.
1.
2.
Consider the input that consists of the following characters and frequencies.
Frequency
Char
A
B
C
D
E
What is the optimal (minimum) encoded message length in bits that can be created using prefix-free codes?
H
I
25
15
37
20
32
Consider the following characters and frequencies.
Char Frequency
F
106
27
52
12
15
Now, check the following trie and choose all the apply.
F
Recall the prefir-free encoding problem and the Huff-
(H)
(I)
(J
(a) The trie represents a valid and optimal solution to the encoding problem.
(b) The trie represents a valid prefir-free encoding but not an optimal answer.
(c) The trie does not represent a valid prefir-free encoding.
(d) According to this trie, the character G would have a code of length 4 bits.
1
(e) If we use this trie to encode the message, the encoded message length will be more than 450 bits.
expand button
Transcribed Image Text:Question 2 (Huffman Coding, Greedy Algorithms man algorithm and answer the following questions. 1. 2. Consider the input that consists of the following characters and frequencies. Frequency Char A B C D E What is the optimal (minimum) encoded message length in bits that can be created using prefix-free codes? H I 25 15 37 20 32 Consider the following characters and frequencies. Char Frequency F 106 27 52 12 15 Now, check the following trie and choose all the apply. F Recall the prefir-free encoding problem and the Huff- (H) (I) (J (a) The trie represents a valid and optimal solution to the encoding problem. (b) The trie represents a valid prefir-free encoding but not an optimal answer. (c) The trie does not represent a valid prefir-free encoding. (d) According to this trie, the character G would have a code of length 4 bits. 1 (e) If we use this trie to encode the message, the encoded message length will be more than 450 bits.
Expert Solution
Check Mark