2079 4

CSC325 · 2079 · 5 marks

Generate the prefix code for the string "CYBER CRIME" using Huffman algorithm and find the total number of bits required.

Generate the prefix code for the string "CYBER CRIME" using Huffman algorithm and find the total number of bits required. [5]

Design and Analysis of AlgorithmsChapter 4: Greedy AlgorithmsHuffman CodingNumerical: Huffman coding

String: CYBER CRIME (11 characters including one space) Character frequencies: Character Frequency ---------------------- C 2 Y 1 B 1 E 2 R 2 Space 1 I 1 M 1 Total = $2+1+1+2+2+1+1+1 = 11$ characters, 8 distinct symbols. --- Order the nodes by frequency. There are five nodes of frequency 1 and th...