Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 NEUTRALS 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?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

1. Explain how technology has changed the learning environment.

Answered: 1 week ago