Huffman Coding MCQ
Huffman Coding MCQ
Huffman Coding MCQ
Lossless
Lossy
2. Lossy compression removes data that isn't needed...
True
False
3. Compression makes file sizes...
Bigger
Smaller
Keeps them the same
4. An advantage of lossless compression is...
All data is lost
The file size stays the same
All of the important data is kept
5. A disadvantage of lossless compression is...
There is a big reduction in file size
There is only a slight reduction in file size
There is no reduction in quality
Cannot be used on text or software files
6. The correct encoding of the letter C in this tree is...
11
10
01
00
7. Huffman trees use the _______________ of each character to work out their
encoding.
Frequency
Order in ASCII
Number value
8. How do you move through a Huffman tree?
0 = right 1= left
1 = left 2 = right
0 = left 1 = right
0 = middle 1 = back
9. How do you calculate the number of bits of a body of text in ASCII?
Number of characters * 7
Number of characters (including spaces) *7
bits in Huffman * 7
bits in Huffman / 7
10. Which formula shows how to work out the percentage a file has been
compressed by?
bits in (Huffman *7) /100
bits in ASCii - bits in Huffman
difference in bits / bits in ASCII * 100
Which of the following algorithms is the best approach for solving Huffman codes?
a) exhaustive search
b) greedy algorithm
c) brute force algorithm
d) divide and conquer algorithm
How many printable characters does the ASCII character set consists of?
a) 120
b) 128
c) 100
d) 98
Which bit is reserved as a parity bit in an ASCII set?
a) first
b) seventh
c) eighth
d) tenth
How many bits are needed for standard encoding if the size of the character set is X?
a) log X
b) X+1
c) 2X
2
d) X
The code length does not depend on the frequency of occurrence of characters.
a) true
b) false
In Huffman coding, data in a tree always occur?
a) roots
b) leaves
c) left sub trees
d) right sub trees
From the following given tree, what is the code word for the character ‘a’?
SHOW ANSWER
a) 011
b) 010
c) 100
d) 101
From the following given tree, what is the computed codeword for ‘c’?
a) 111
b) 101
c) 110
d) 011
What will be the cost of the code if character c i is at depth di and occurs at frequency fi?
a) cifi
b) ∫cifi
c) ∑fidi
d) fidi
What is the running time of the Huffman algorithm, if its implementation of the priority queue
is done using linked lists?
a) O(C)
b) O(log C)
c) O(C log C)
d) O(C2)
A. 1.9 bit
B. 8.0 bit
C. 2.1 bit
D. 2.0 bit
A Huffman encoder takes a set of characters with fixed length and produces a set of characters of
A. fixed length
B. variable length
C. random length
D. constant length
B. broadband systems
A. compress data by using more bits to encode more frequently occuring characters
B. compress data by using fewer bits to encode fewer frequently occuring characters
C. compress data by using fewer bits to encode more frequently occuring characters
D. expand data by using fewer bits to encode more frequently occuring characters
Huffman coding technique is adopted for constructing the source code with
________ redundancy.
a. Maximum
b. Constant
c. Minimum
d. Unpredictable
3. What is compression?
A. To compress something by pressing it very hardly
B. To minimize the time taken for a file to be downloaded
C. To reduce the size of data to save space
D. To convert one file to another Answer
Correct option is C
10. compression is generally used for applications that cannot tolerate any difference
between the original and reconstructed data.
A. Lossy
B. Lossless
C. Both
D. None of these
Correct option is B
12. Suppose storing an image made up of a square array of 256×256 pixels requires
65,536 bytes. The image is compressed and the compressed version requires 16,384
bytes. Then the compression ratio is .
A. 1:4
B. 4:1
C. 1:2
D. 2:1
Correct option is B
13. Lossy techniques are generally used for the compression of data that originate as
analog signals, such as
A. Speech
B. Video
C. Both
D. None of these
Correct option is C
14. If fidelity or quality of a reconstruction is , then the difference between the
reconstruction and the original is .
A. High, small
B. Small, small
C. High, high
D. None of the above Answer
Correct option is D
15. The development of data compression algorithms for a variety of data can be
divided into
A. 2
B. 3
C. 4
D. 5
Correct option is A
16. Which of the following is true of lossy and lossless compression techniques?
A. Lossless compression is only used in situations where lossy compression techniques
can’t be used
B. Lossy compression is best suited for situations where some loss of detail is tolerable,
especially if it will not be detectable by a human
C. Both lossy and lossless compression techniques will result in some information being
lost from the original file
D. Neither lossy nor lossless compression can actually reduce the number of bits
needed to represent a file
Correct option is B
17. Which of the following would not be suitable for Lossy Compression?
A. Speech
B. Video
C. Text
D. Image
Correct option is C
. Lempel-Ziv algorithm is
a) Variable to fixed length algorithm
b) Fixed to variable length algorithm
c) Fixed to fixed length algorithm
d) Variable to variable length algorithm
Entropy of a random variable is
a. 0
b. 1
c. Infinite
d. Cannot be determined