Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. (40 points) Program HW. Huffman source compression for two sequences. (a) (5 points) Generate Source A with length 1000 which is an IID
5. (40 points) Program HW. Huffman source compression for two sequences. (a) (5 points) Generate Source A with length 1000 which is an IID sequence, each with X~ Bern(1/4) for Vt (b) (5 points) Generate Source B with length 1000, which is an Markov source gen- erated with transition probabilities po,o = 3/4, po,1 = 1/4, p1,0 = 1/4, and P1,1 = 3/4. Use an uniform distribution for the initial distribution. (c) (10 points) Write a computer program to compress and decompress the source of A using Huffman coding. Encode 4 bits at a time, i.e., there are 4-bit sym- bols. Print out the pseudo code and the output of the encoder as a binary string. What is the compression ratio? (Hint: You need to compute p(0000), ..., p(1111).) (d) (10 points) Repeat 1 for Source Y. (Hint: You need steady state distribution) (e) (10 points) Compare two results.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
a Generating Source A with length 1000 as an IID sequence with each symbol being X which follows a Bernoulli distribution with probability 14 python i...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started