Databases Reference
In-Depth Information
11. (This problem was suggested by P.F. Swaszek.)
(a) For a binary source with probabilities P
(
0
) =
0
.
9, P
(
1
) =
0
.
1, design a Huffman
=
...
code for the source obtained by blocking m bits together, m
1, 2,
,8.Plotthe
average lengths versus m . Comment on your result.
(b) Repeat for P
(
0
) =
0
.
99, P
(
1
) =
0
.
01.
You can use the program huff_enc to generate the Huffman codes.
12. Encode the following sequence of 16 values using the Rice code with J
=
8 and one
split sample option:
32
,
33
,
35
,
39
,
37
,
38
,
39
,
40
,
40
,
40
,
40
,
39
,
40
,
40
,
41
,
40
For prediction use the previous value in the sequence
y i
ˆ
=
y i 1
and assume a prediction of zero for the first element of the sequence.
13. For an alphabet
A ={
a 1 ,
a 2 ,
a 3 }
with probabilities P
(
a 1 ) =
0
.
7, P
(
a 2 ) =
0
.
2, P
(
a 3 ) =
0
.
1, design a 3-bit Tunstall code.
14. Write a program for encoding images using the Rice algorithm. Use eight options,
including the fundamental sequence, five split sample options, and the two low-entropy
options. Use J
16. For prediction use either the pixel to the left or the pixel above.
Encode the Sena image using your program. Compare your results with the results
obtained by Huffman coding the differences between pixels.
=
Search WWH ::




Custom Search