Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

8-Text Processing

Practical exercises
Question 1. Write Java programs to perform the tasks related with Huffman coding algorithm as
follows:
1. Given a set of characters with frequencies (or probabilities), create the Huffman code binary
tree.
2. Calculate frequencies of all characters contained in the text file and create the Huffman code
binary tree for all characters contained in the text file.
3. Given a Huffman code tree. Print codewords of all leaf nodes.

Question 2. Write Java programs to implement the string matching by brute force and KMP.

Question 3. Implement the run-length encoding

You might also like