Implementation of the Shannon-Fano algorithm and randomisation strategies to determine privacy strength.
There were 2 tasks:
Question 1: Implement the Shannon-Fano algorithm to compress and decompress a given string. Output the result of the compressed and decompressed value to individual text files.
output:
- histogram with the probability and occurrence of each character of the the given string
- encoded value of the given string using Shannon-Fano coding
- decoded value of the encoded string
Question 2: Using the concept of mutual information, implement two randomisation strategies (uniformed and un-uniformed) to determine their privacy strength (information gain).
output:
- Implementation of 2 randomisation strategies successfully to determine the most efficient algorithm to use for privacy strength.