Deterinine the average codeword length

Assignment Help MATLAB Programming
Reference no: EM132101182

Please write matlab codes and annotations for this question

HUFFMAN ALGORITHM

Step 1: Arrange the symbols in order of decreasing probability. If the probabilities are equal, break the tie randomly.

Step 2: Combine the two smallest values in the list to form a new entry whose probability is the sum of the two original entries.

Step 3: Continue combining two smallest values in the modified list (original untouched values and the new entry) until the root of the tree is reached.

Step 4: Assign bits from left to right on the tree: at each branch, assign a 0 to the higher valued branch and a 1 to the other.

Step 5: Form the codewords by reading from the root to the node of the symbol.

The Huffman coding algorithm is described in Prob. 2.40 (above). In this project, you will measure the average information, code the given message using the Huffman algorithm, transmit the coded message over a simple binary channel, reconstruct the message, and compare the performance to that without coding.

The following schematic diagram illustrates the sequence for implementing these operations.

1. Consider the following message for source coding and transmission:

APPARENTLY NEUTRAL'S PROTEST IS THOROUGHLY DISCOUNTED

AND IGNORED. ISMAN HARD HIT. BLOCKAGE ISSUE AFFECTS PRETEXT

FOR EMBARGO ON BY-PRODUCTS, EJECTING SUETS AND

VEGETABLE OILS.

(This message is included in the data package for this book as the file ‘msg.txt'.)

2. Determine the average information for this message. (You may ignore hyphens, spaces, and punctuation.)

3. Using the Huffman algorithm, code the above message.

4. Deterinine the average codeword length.

5. Transmit the codewords in binary form across the binary symmetric communication channel specified in Project 2.1.

6. Reconstruct the message from the received codewords.

7. Determine the average information of the received message. Would you expect it to be larger or smaller than that of the transmitted message?

Reference no: EM132101182

Questions Cloud

Write a mips program that will read in a base : Write a MIPS program that will read in a base (as an integer) and a value (nonnegative integer but as an ASCII string) in that base.
Give the state of the array after it is max heapified : Give the state of the array after 3 "removes" (we are not really deleting anything) have been performed from the heap in phase 2 of heapsort.
Write a program to ask for the chord : With one cut across the middle of a pizza you can cut off half, that is, 50% of the pizza. With one cut at a different place you can cut off.
Using recursion determine if the string is a palindrome : Using recursion, count how many times each of the letter "a" and "k" are repeated (There may be 0 a and 0 k in the string).
Deterinine the average codeword length : Determine the average information for this message. (You may ignore hyphens, spaces, and punctuation.)
How does the q cafe program aid : What do you see as the most important benefits of the program?
Different types of environmental variables : What are the different types of environmental variables and its importance?
Institute of business ethics : The Institute of Business Ethics has identified three simple ethical tests to use for a business decision, please name and explain them?
Write a c function that prints the minimum spanning tree : Write a C function that prints the minimum spanning tree of a graph. At the end, print the weight of the spanning tree.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Define the transformation matrix

Define the transformation matrix for each vertex that keeps the approach of the knife normal to the circumference and oriented toward the cut, and makes the cut 1 cm deep.

  Generate a sample of the exponential distribution

MS455/MS555 Project - Simulation in Finance. Use the inverse transforms method to generate a sample of the exponential distribution with parameter θ, which is given by its density

  Write a matlab program that plots x1(t)

Plot (by hand) the signal. Write a MatLab program that plots x1(t) , |t|

  Create an m-file that prompts the user to enter a value of x

Create an M-file that prompts the user to enter a value of x and then calculates the value of sin (x). Create an M-file that prompts the user to enter a matrix.

  Write an application to read in a noisy image

Write an application to read in a noisy image, filter the image and output the image to a new file for comparison with the original normal image.

  Develop a simulation program

Develop a simulation program

  Plot the pole-zero pattern, draw curves of m(w) versus

Use Matlab to check your work (pzmap). Also, use Matlab to create the Bode plot (use the “bode” command.) If this circuit were used as a filter, what type of filter would it be? Problem: For the following transfer function, plot the pole-zero pattern..

  Write a matlab function called newtons method

Write a MATLAB function called newtons Method that accepts two inputs and returns one output. The inputs should be a vector representation of a polynomial and an initial guess for the root.

  Determine the gain margin of the system

Determine the gain K so that the phase margin is 60 degree. For the gain K selected in part (a) determine the gain margin of the system.

  Determine a best fit model for the process

Comment on the stability of the system and Design a full state feedback controller for the system with poles at -3, and -2 ± j0.4 using the pole placement

  Write the matlab code to create the vector

Write the MATLAB code to create the vector [2,4,6,...,98,100] and store it in a variable named x(Hint: There is a shorthand notation for regularly spaced vectors)

  Write a matlab program to compute the kalman gain

Write a MATLAB program gain.m to compute the Kalman gain K(n) for a stationary process with x(n) = Ax(n - 1) + w(n)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd