assign1bfixed - Algorithms and Applications (15-499)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithms and Applications (15-499) Assignment #1b Due Date: 11 Feb 03 Problem 1: PPM (20pt) A. Suppose an encoder using PPM is currently at a context ab and the current state of the dictionary is given by figure 1. Calculate the amount of information, in bits, required to encode the following letter c. Assume that escape count is given by the number of different characters for each context, and exclusion is not used. Use . Context Counts Context Counts Context Counts empty Figure 1: Dictionary B. Calculate the number of bits required to encode d for the same context and dictionary as in the previous question. Also list the changes made to the dictionary during this step. Assume the alphabet has 26 characters. C. How does the answer to part (b) change if we use exclusion? D. Recompute the answer to part (a) and (b) using exclusion. instead of Problem 2: Lempel-Ziv (20pt) For this question, assume that Gamma codes are used to encode all integers. A. How many bits does the LZ77 algorithm use to encode the string a if the window size and the lookahead buffer is unbounded? Assume that the probability of character a is given by . B. How many bits does LZW take to encode the same string with an unbounded dictionary? 1 & '% £¡ #" §¨¡ ¥ £¡  §¨¡ ¥ § ¡ §¨¡ ¥ § ¡  § ¡  $   ¥   © ¥  ©¥ ¥ ¥ £¡ ¤¢ § !¡ § ¡   ¡  ¥ § ¡ § ¡  £¡  § ¨¡ ¥   ¥ ¦ ¡  £¡  ¦ ¤¡ ¥ , and without using Problem 3: Burrows Wheeler (40pt) Given a string , let be the set of all distinct character substrings of . For , let denote the string formed by each character that follows an occurrence of in . 1 Calculate the number of bits required to encode , using contexts of length . Express the answer in terms of , for . This is known as the th order conditional entropy . Assume that the cost of encoding character probabilities is negligible. The following questions give insight into why it is important to apply Move-To-Front to the output of BW before encoding it. Assume that the cost of encoding character probabilities is negligible. C. What is the output of the BW transform (before MTF) on the string aa(ba) bb? Roughly how many bits does Arithmetic Encoding take to encode this output? Give the answer to within an accuracy of bits. D. Compute the number of bits taken by Arithmetic Encoding on the BW output in part (c) after being processed using MTF. E. Let . [Manzini’99] proves that the number of bits in the Move-To-Front encoding of is roughly at most , where is some constant. Use this to prove that the number of bits taken to encode the output of BW with MTF on a string is at most for any value of . 2 RR Q T2UH RR Q TS3H I PH 1 For example, if mississippi, (ss) = ii and (si) = sp. ©¨ ('& B. Let be the output of the Burrows Wheeler algorithm on string . Show that for any (defined as above), (or a permutation of it) is a substring of . ¥  ©¨  ¥ ¥ ¡) $¥ ¥  ¥ ©¨ #" § @ E¤¢D B @ D¥CA9 ¥£ ¡ B @ 8 ¥ A. Let denote the entropy of a string known as the zeroth order entropy of . based on single character probabilities. This is ¥ §§ £  ¥£ !  ¦¤¡ §£    ¥ £0 © ¨ $ ¥ 7 444 ¥1 $ ¥ 665) 32¥ ¡ ¥ ¥ §¥ ¤¦£ © §£    ¥ $ %¥ § ¥£ ¡ ¤¦¤¢ §¥ GE£ © F Problem 4: Wavelets (20pt) A. Consider the interger range from to . Write down the following functions as a sum of the Haar Wavelets scaled to fit that range. ¥ otherwise B. For each step in the Haar transform the “low-pass” term (the average) and the “high-pass” them (the difference) each depend on two values. In particular: The (5-tap, 3-tap) integer wavelet transform used by the revesible version of JPEG2000 uses the following functions to calculate the low and high pass terms. ) It is called a (5-tap, 3-tap) since the low-pass term depends on five values and the high-pass term depends on three values. In practice it works much better than the Haar transform since it has broader coverage. Show that this is reversible by giving the function for generating the from the and . 3 5 ¦ £ @ 1@ ) @) ¥£ @) ¥ % §) ) £ §!1 @ ) ¥ @ ) ¥ £ ¡ @ £ !1 @ ¥ @ ¥ £ ¡ @ # 4       ! % # ( #  ¥ 2 3 & '   # $ § ¡§ £  ¥ ¦  ¤ 0 1( # @) ¥ ¡ @ 1 @) ¥ ¡ @ ©£ ¡ % ¨ © ¡§ £ " ¥ §  ¤ " §  ¢ £ @ ¡ @ " @  @¥ ...
View Full Document

Ask a homework question - tutors are online