Computer scienceAlgorithms and Data StructuresAlgorithmsString coding algorithmsData compression

Huffman coding

Compressions

Report a typo

The text "AAAABBBBCCCCDDDD" and "ABBBCCCCCDDDDDDD" need to be compressed using Huffman Coding.

What is their compressed coding?

Use the Huffman tree provided below:(Please note that there are multiple valid Huffman trees for this problem but we are using this variant for convenience)

Huffman tree

Which text can be compressed more?

A.

Compression for AAAABBBBCCCCDDDD is: 00000000010101011010101011111111

Compression for ABBBCCCCCDDDDDDD is: 10010110110111111111110000000

ABBBCCCCCDDDDDDD can be compressed more.

B.

Compression for AAAABBBBCCCCDDDD is: 10010110110111111111110000000

Compression for ABBBCCCCCDDDDDDD is: 00000000010101011010101011111111

ABBBCCCCCDDDDDDD can be compressed more.

C.

Compression for AAAABBBBCCCCDDDD is: 00000000010101011010101011111111

Compression for ABBBCCCCCDDDDDDD is: 10010110110111111111110000000

AAAABBBBCCCCDDDD can be compressed more.

D.

Compression for AAAABBBBCCCCDDDD is: 10010110110111111111110000000

Compression for ABBBCCCCCDDDDDDD is: 00000000010101011010101011111111

AAAABBBBCCCCDDDD can be compressed more.

Select one option from the list
___

Create a free account to access the full topic