Question: Consider a discrete memory - less source U with symbol alphabet U = { u 1 , u 2 , dots, u 8 } .

Consider a discrete memory-less source U with symbol alphabet U={u1,u2,dots,u8}. The
probabilities of symbols equal Pr(U=ui)=pi,i=1,cdots,8.
(1) Construct an optimal prefix-free code for the case p1=p2=0.03,p3=0.04,p4=0.1,
p5=0.15,p6=0.2,p7=0.2,p8=0.25. What is the average length of this code? (3 points)
(2) Construct another optimal prefix-free code for this source, not the same as the above. (1 point)
(3) Construct a non-singular code (all codewords should be different) such that the average length
Lav is less than the average length of the prefix-free codes above. (1 point)
Consider now a possibility of arbitrary p1,dots,p8. For a given code, let us denote lmin=mini=1,cdots,8li
and lmax=maxi=1,cdots,8li
(1) Is there a prefix free code with lengths l1=l2=l3=2,l4=3,l5=3,l6=l7=l8=5(explain,
construct it is exists)(2 points)
(2) Is there a prefix free code with lengths l1=l2=2,l3=l4=3,l5=4,l6=l7=l8=5(explain,
construct it is exists)(2 points)
(3) Find p1,dots,p8 and construct an optimal prefix-free code such that lmax is the largest possible.
(2 points)
(4) Find p1,dots,p8 and construct an optimal prefix-free code such that lmax is the smallest possible.
(2 points)
(5) Find p1,dots,p8 and construct a non-singular code such that lmax is the smallest possible. (2
points)
Show your solution.
Consider a discrete memory - less source U with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!