Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need Matlab code that solves the example problems below. According to the probability values of the symbols I have given, the huffman code will

I need Matlab code that solves the example problems below. According to the probability values of the symbols I have given, the huffman code will find its equivalent, step by step.

I've put examples of this below. All of them have obvious solutions.

For example:

Symbol Probability

a1 enter probability value input

a2 enter probability value input

a3 enter probability value input

a4 enter probability value input

a5 enter probability value input

a6 enter probability value input

. .

. .

an enter probability value input

Output:

a1 1

a2 011

a3 01101

a4 10000

a5 11001

a6 10010

. .

. .

. .

an .

L average= .............................

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

for detailed explanation:

https://www.programmersought.com/article/34164094982/

http://canerozcan.net/files/CME429/CME429_Week10.pdf

Some Basic Compression Methods: Huffman Coding Original source Source reduction FIGURE 8.7 Huffman source reductions. Symbol Probability 1 2 3 4 02 0.6 0.4 0.3 0.4 0.3 0.4 06 a 0.4 0.3 0.1 0.1 0.1 0.2 0.4 0.3 0.1 0.1 0.06 0.04 0.3 0.1 014 d3 as Some Basic Compression Methods: Huffman Coding Source reduction Original source Symbol Probability Code 1 2 3 4 FIGURE 8.8 Huffman code assignment procedure. a2 -0.6 0 0.4 1 06 du 04 0.4 1 0.3 00 -0.3 01 0.4 0.3 0.1 0.1 0.06 0.04 1 00 011 0100 01010 01011 0.4 1 0.4 1 0.3 00 0.3 00 0.1 011 -0.2 010 0.1 0100+ 0.1 011 0.1 0101 d3 as The average length of this code is Lavg 0.4*1+0.3*2 +0.1*3+0.1* 4+0.06*5+0.04*5 = 2.2 bits/pixel = By finding the necessary coding for the symbols according to the given symbol probability table, calculate code symbol for "0110011000101001010011000". Note that in the initial state, the probability of 0,55 is expressed as 0 and the probability of 0,45 is 1. a2 Symbol Probability (Sembol) (Olaslk) ai 0.08 0.07 0.19 0.45 as 0.03 0.18 a4 ac Sembol 1 01 4 0.55 (0) 0.45 (1) 1 0.45 0.19 0.18 0.1 (0010) 0.08 (0011) 3 0.45 0.36 (00) 0.19 (01) 2 0.45 0.19 0.18 (000) 0.18 (001) Olaslk 0.45 0.19 0.18 0.08 0.07 (00100) 0.03 (00101) 000 ai 2 0011 00100 00101 as 01 1 0011 000 1 01 00101 0011 000 -al-al a6 4 a3 as a1 a6

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_2

Step: 3

blur-text-image_3

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions