a₁ A source has an alphabet with probabilities (0.1, 0.23, 0.25, 0.05, 0.15, 0.22). 1. Find the entropy of this source. 2. Compare this entropy with the entropy of a uniformly distributed source with the same alphabet. 3. Compute the compression ratio and the coding efficiency. a₂ a3 a4 26 a5 Alphabet Probabilities 0.1 0.23 0.25 0.05 0.15 0.22 Equal Probabilities 1/6 1/6 1/6 1/6 1/6 1/6 Code 1 Code 2

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
I need help with this problem, please provide step by step process to better understand your solution. Thanks
a₁
a₂
A source has an alphabet with probabilities (0.1, 0.23, 0.25, 0.05, 0.15, 0.22).
1. Find the entropy of this source.
2.
Compare this entropy with the entropy of a uniformly distributed source with
the same alphabet.
3. Compute the compression ratio and the coding efficiency.
a3
a4
a5
a6
Alphabet
Probabilities
0.1
0.23
0.25
0.05
0.15
0.22
Equal
Probabilities
1/6
1/6
1/6
1/6
1/6
1/6
Code 1
Code 2
Transcribed Image Text:a₁ a₂ A source has an alphabet with probabilities (0.1, 0.23, 0.25, 0.05, 0.15, 0.22). 1. Find the entropy of this source. 2. Compare this entropy with the entropy of a uniformly distributed source with the same alphabet. 3. Compute the compression ratio and the coding efficiency. a3 a4 a5 a6 Alphabet Probabilities 0.1 0.23 0.25 0.05 0.15 0.22 Equal Probabilities 1/6 1/6 1/6 1/6 1/6 1/6 Code 1 Code 2
Expert Solution
Step 1
Huffman Coding

Huffman coding assigns variable-length codes to input characters. The assigned code length is based on the frequency of the corresponding letter. The most common characters get the lowest codes, and the rarest characters get the highest codes.
Variable-length codes assigned to input characters are prefix codes. That is, codes (bit strings) are assigned such that the code assigned to one character is not a prefix of the code assigned to another character.

Steps to build a Huffman tree
- The input is an array of unique characters and their frequencies and the output is a Huffman tree.

- Create a leaf node for each unique character and create a min-heap of all leaf nodes (min-heap is used as priority queue. The value of the frequency field is used to compare two nodes within the min heap. First, the least common characters are at the root)
- Extract two nodes from the minimum heap with minimum frequency.

- Creates a new internal node with a frequency equal to the sum of the frequencies of the two nodes. Make the first extracted node the left child and the other extracted nodes the right child. Add this node to the minimum heap. Repeat steps 2 and 3 until only one node remains in the heap. The rest of the nodes are root nodes and complete the tree.

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY