0% found this document useful (0 votes)
178 views

Assignment 2

This document provides instructions for an assignment on data compression and data retrieval techniques. It contains 7 questions related to probability models, arithmetic coding, LZ77 encoding and decoding, and LZW encoding and decoding. Students are asked to find probability tags, encode and decode sequences, and implement encoding and decoding algorithms using different compression schemes. They must submit their answers by 11/04/2018.

Uploaded by

vishva
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views

Assignment 2

This document provides instructions for an assignment on data compression and data retrieval techniques. It contains 7 questions related to probability models, arithmetic coding, LZ77 encoding and decoding, and LZW encoding and decoding. Students are asked to find probability tags, encode and decode sequences, and implement encoding and decoding algorithms using different compression schemes. They must submit their answers by 11/04/2018.

Uploaded by

vishva
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Date: 2nd April, 2018

A. D. Patel Institute of Technology


Information Technology Department
A. Y. 2017-18 Sem-II
Subject: Data Compression and Data Retrieval (2161603)
Assignment-2
Deadlines for submission: 11/04/2018
[1] The probability model is given by P(a1) = 0.2, P(a2) = 0.3 and P(a3) = 0.5. Find the real valued tag
for the sequence a1 a1 a3 a2 a3 a1.
[2] The probability model is given by P(a1) = 0.2, P(a2) = 0.3 and P(a3) = 0.5. Decode a sequence of
length 10 with the tag 0.63215699.
[3] Write encoding and decoding algorithm for integer implementation of arithmetic codding.
[4] Encode the following sequence using the LZ77 algorithm:
barrayar_bar_by_barrayar_bay
Assume you have a window size of 30 with a look-ahead buffer of size 15. Furthermore, assume
that C(a) = 1, C(b) = 2, C( _ ) = 3, C(r) = 4, and C(y) = 5.
[5] A sequence is encoded using the LZ77 algorithm. Given that C(a) = 1, C( _ ) = 2, C( r ) = 3, and
C(t) = 4, decode the following sequence of triples:
<0, 0, 3> <0, 0, 1> <0, 0, 4> <2, 8, 2> <3, 1, 2> <0, 0, 3> <6, 4, 4> <9, 5, 4>
Assume that the size of the window is 20 and the size of the look-ahead buffer is 10. Encode the
decoded sequence and make sure you get the same sequence of triples.
[6] A sequence is encoded using the LZW algorithm and the initial dictionary shown in below table.
Index Entry
1 a
2 /b
3 h
4 i
5 s
6 t

(a) The output of the LZW encoder is the following sequence:


6 3 4 5 2 3 1 6 2 9 11 16 12 14 4 20 10 8 23 13
Decode this sequence.
(b) Encode the decoded sequence using the same initial dictionary. Does your answer match
the sequence given above?
[7] A sequence is encoded using the LZW algorithm and the initial dictionary shown in below table.
Index Entry
1 a
2 /b
3 r
4 t
(a) The output of the LZW encoder is the following sequence:
3 1 4 6 8 4 2 1 2 5 10 6 11 13 6
Decode this sequence.
(b) Encode the decoded sequence using the same initial dictionary. Does your answer match
the sequence given above?
Course Coordinator

Prof. D. J. Prajapati
IT Department, ADIT.

You might also like