Bad Encoding 1

Which of the choices cannot be encoded as 01110 under the following encoding scheme?

A 0
B 10
C 1
D 11

Note : Recall from Huffman encoding that ambiguous encodings are generally bad encodings.

ADB ACCCA ADBA ADCA ACCB

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Karleigh Moore
May 11, 2016

Remember ambiguous codes are generally not what we want — so since this encoding can encode multiple strings of letters as the same binary string, that isn't good!

By translating each letter into the corresponding binary code, we can check to see which choices are equal to 01110 and then find the one that is not.

ADBA 011100
ACCCA 01110
ADB 01110
ADCA 01110
ACCB 01110

ADBA is encoded as 011100, so that is the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...