Question 17
AQA Computer Science November 2021 Paper 2 (8520/2)GCSE6 marks
On the specification
- 17.1
- 3.3 Fundamentals of data representation
- 17.2
- 3.3 Fundamentals of data representation
Question text
17.1 Table 1 is a frequency table that contains the frequency of characters in a string. Table 1 A 6 B 2 C 3 Use the frequencies given in Table 1 to draw a Huffman tree that represents the string. [3 marks] 17.2 Table 2 shows the Huffman codes for the characters used in the string PIEDPIPER Table 2 Character Character Huffman code frequency P 3 10 I 2 11 E 2 01 D 1 000 R 1 001 Calculate how many bits would be saved if the phrase PIEDPIPER was encoded using the Huffman codes shown in Table 2, rather than using ASCII. You should show your working. [3 marks] Number of bits saved 9