Question Constellation Sign up for free

AQA · GCSE · Computer Science · Higher

Huffman bit-pattern decoding

Q09.1 2 marks

Figure 7 contains a Huffman tree.

Figure 7
Figure 7

Figure 7

Enlarged question image

Figure 7

The Huffman tree in Figure 7 was used to encode a string, which resulted in the following bit pattern:

00010110010001011001

State the string that this bit pattern represents.

Write your answer first. You can study the marking guidance whenever you need it.

Study the marking See what earns credit and compare it with a full-mark answer.

Marking points

  1. 1 The decoded string begins with the credited part A.
  2. 2 The decoded string continues with the credited part DDED.

Full-mark answer

ADDED

Why this answer loses marks

I decoded the first leaf and then stopped.

After reaching a leaf, restart at the root and continue until the entire bit pattern has been decoded.