• Non ci sono risultati.

Algorithm Engineering 20 January 2021 – time 45 minutes

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 20 January 2021 – time 45 minutes"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering

20 January 2021 – time 45 minutes

Question #1 [ranks 4]. Simulate the behavior of the algorithm MultiKey-Quicksort on the following array of 5 strings S=[bus, bath, abacus, aargh, cat], by assuming that the pivot string is always the first one of the recursive set of strings.

Question #2 [ranks 5]. Given the integer sequence S = (1, 2, 3, 4, 6, 8, 9), show how Interpolative Coding compresses the “first three” integers according to its algorithm.

Question #3 [ranks 4]. Let us given the probabilities: p(a) = 1/2, p(b)=p(c)=1/4.

Decompress the first 2 symbols of the Arithmetic coded bit sequence: 111.

Question #4 [ranks 4]. Perform the intersection between the two sets S1 = {1, 8}

and S2 = {1, 2, 5, 7, 10, 15, 20} via the algorithm based on “binary search with exponential jumps” (or, doubling search).

Question #5 [rank 3+3+4+3]. Given the binary strings S={001, 10010, 10011, 101}.

- Build the Patricia Trie for S

- Show how to search for the lexicographic position of the string P=110 among the strings of the set S.

- Propose a succinct encoding of the Patricia Trie of S that allows navigation in constant time per traversed edge.

- Simulate the downward search for P=110 in this succinct encoding.

Riferimenti

Documenti correlati

Build the Patricia Tree for S and show how to search for the lexicographic position of the string P=aacbba among the strings of the

• Design a two-level storage scheme for S in which each disk page stores two strings which are Front-compressed, and the strings in internal memory are indexed via

Prove that, for any pair of positions i and j in the cuckoo table, the probability that the shortest path connecting ij has length L is c^{-L}/r, where r is the number of

Compress the text “AC” via Arithmetic coding, using ratios to make computations, and emitting the final sequence of bits.. You are given the graph below, in which the bold

Simulate the behavior of the algorithm MultiKey-Quicksort on the following array of 6 strings S=[zoo, horse, bath, abacus, bar, aargh].. Exercise

 Infer, via the formulas about (S,C)-dense codes, how many bits are needed for the

Exercise [rank 6] Prove that the Arithmetic coding algorithm is close to the empirical entropy of a text having length n symbols. Exercise [rank 5] Let us given symbols

[rank 4] Given the string T[1,9]=ddddaabbcc, compute the Canonical Huffman code for the letters of T assuming as probabilities their empirical frequencies in T.. [rank 5] Given