huffmanDecodePRO.initJSAV() Khan.randRange(0,1) ["sequence of bits", "letter"] sequenceNames[type] ["series of 1s or 0s", "letter"] answerNames[type] huffmanDecodePRO.getIndices(type) huffmanDecodePRO.genQandA(indices, type, 0) huffmanDecodePRO.genQandA(indices, type, 1)

For the Huffman tree shown below, what is the corresponding sequence represented by question? Type its representation as a answer.

ANS

To decode a letter, trace the path down the tree to the letter. Add a 0 for each left branch or 1 for right branch, until you get to the leaf node. For example, the code for Z is 1+1+1+1+0+0.

To find the corresponding letter for a code, trace a path through the tree according to the 0s (left) or 1s (right) until you get to a letter. For example, for 1110 you would go left (1), left (1), left (1), and then right (0) to find the letter C.