Professional Documents
Culture Documents
1 Encode the given DCT matrix by using JPEG procedure. Consider uniform 10
quantization with Q = 8. DC coefficient is converted into an 8 bit binary bit and AC
coefficients are encoded using Shannon Fano coding. Justify your answer by
measuring the compression ratio.
′ 𝟎𝟎𝟏𝟎𝟏𝟎𝟎𝟎𝟏𝟎𝟎𝟎𝟎𝟏𝟎𝟎𝟎𝟏𝟏𝟎𝟏𝟏𝟏𝟎𝟎𝟎𝟎𝟎𝟎𝟏𝟏𝟏𝟏𝟏𝟎𝟎𝟎𝟏𝟎𝟎𝟎 ′
c5 = d1 ⨁ d2 ⨁ d4
c6 = d1 ⨁ d2 ⨁ d3
c7 = d1 ⨁ d3 ⨁ d4
c8 = d2 ⨁ d3 ⨁ d4
SET B
1 Generate the tag for the encoder output 110110101100101 and decode a five letter string 10
for the given probability distribution shown in Table 1 using Arithmetic Coding.
Table 1: Probability distribution
Symbol Probability
A 0.2
B 0.1
C 0.2
D 0.05
E 0.3
F 0.05
! 0.1
2 Two young British soldiers during the First World War, who are ordered by General 10
Erinmore to deliver a message to Colonel Mackenzie during Operation Alberich in
1917. This message is especially important to one of the young soldiers, as his
brother is taking part in the pending attack. The message is encoded as
[𝟐, 𝟕, 𝟓, 𝟕, 𝟔, 𝟑, 𝟓, 𝟖, 𝟐, 𝟏, 𝟓, 𝟏𝟏, 𝟒, 𝟒, 𝟏𝟔, 𝟏𝟖, 𝟐𝟎, 𝟒] using LZW algorithm with
the following initial dictionary as shown in Table 2. Help Colonel Mackenzie to
decode the message.
𝐺(𝑃) = 𝑃10 + 𝑃8 + 𝑃5 + 𝑃2 + 𝑃 + 1
1 Construct an arithmetic code in real decimal number for the word “ 𝑩𝑨𝑫𝑪𝑨𝑩$ ” 10
for the given probability distribution shown in Table 1.
1 0 1 1 0 0
𝐻 = [1 1 0 0 1 0]
0 1 1 0 0 1
1 Encode the given DCT matrix by using JPEG procedure. Consider uniform 10
quantization with Q = 35. DC coefficient is converted into an 8 bit binary bit and
AC coefficients are encoded using Shannon Fano coding. Justify your answer by
measuring the compression ratio.
2 Decode the sequence from the output of the Lempel Ziv encoder as [0, V], [0, I], 10
[0, T], [0, -], [3, b], [1, I], [3, T], [2, b], [6, T], [4, b], [9, T], [8, V], [0, U], [13, b], [1,
U], [14, V], [13, U].
3 Design a feedback shift register encoder for a (8, 5) cyclic code with a generator 10
polynomial 𝐺(𝑃) = 𝑃3 + 𝑃2 + 𝑃 + 1 . Use the encoder to find the code word for
the message 1 0 1 0 1 in systematic form.