Answered step by step
Verified Expert Solution
Question
1 Approved Answer
neeed MATLAB code asap In this project, you will create a simulation using Huffman Code to calculate the average length and entropy H(X), given the
neeed MATLAB code asap
In this project, you will create a simulation using Huffman Code to calculate the average length and entropy H(X), given the number of symbols and probabilities of those symbols. A table for the symbols and probabilities is shown below: Symbol x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 Probability 0.4 0.2 0.1 0.1 0.05 0.05 0.025 0.025 0.025 0.025 Average length and entropy equations are given as: L = average length of the code Pili Length code H(x)= - Pi Log Pi Entropy For this project, you will need to: 1) Simulate Huffman Code to produce code words for each of the symbols in the table. 2) Find the entropy H(X), using its respective equation. 3) Find the average length, using its respective equation and the code word lengths found. 4) Compare entropy and average length, verifying that H(X) is less than or equal to average length. The code can either be written in C. Matlab, or python. In this project, you will create a simulation using Huffman Code to calculate the average length and entropy H(X), given the number of symbols and probabilities of those symbols. A table for the symbols and probabilities is shown below: Symbol x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 Probability 0.4 0.2 0.1 0.1 0.05 0.05 0.025 0.025 0.025 0.025 Average length and entropy equations are given as: L = average length of the code Pili Length code H(x)= - Pi Log Pi Entropy For this project, you will need to: 1) Simulate Huffman Code to produce code words for each of the symbols in the table. 2) Find the entropy H(X), using its respective equation. 3) Find the average length, using its respective equation and the code word lengths found. 4) Compare entropy and average length, verifying that H(X) is less than or equal to average length. The code can either be written in C. Matlab, or pythonStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started