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

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

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