For this assignment, you will create a multithreaded Shannon-Fano-Elias encoder (https://en.wikipedia.org/wiki/Shannon–Fano–Elias_coding).
To determine the codes for the symbols using theShannon-Fano-Elias encoder, you must execute the following steps:
Given the symbols with their probabilities (sorted in decreasing order based on the probability value), you need to implement the Shannon-Fano-Elias encoding algorithm based on the following steps:
- A string representing the symbols. A single character represents each symbol, and a single white space separates the symbols.
- A list of double values representing the probabilities of the symbols
The symbols from the input are sorted (in decreasing order) based on their probabilities.
Given the previous format, the following file represents a valid input file:
A B C D E0.3 0.25 0.2 0.15 0.1
SHANNON-FANO-ELIAS Codes:Symbol A, Code: 001Symbol B, Code: 011Symbol C, Code: 1010Symbol D, Code: 1101Symbol E, Code: 11110
NOTES:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here