• Non ci sono risultati.

Algorithm Engineering 16 July 2019

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 16 July 2019"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering 16 July 2019

Exercise [rank 3+5]

1. Build the suffix tree of the string T = BANANA$.

2. Determine the Lempel-Ziv parsing of T by using the suffix tree, and detailing the way every LZ-phrase is determined by visiting the Suffix Tree.

Exercise [rank 4+4] Given a set S of 2D points {(1,6), (2,7), (3,8), (4,1), (5,5), (6,3)}, 1) build a Treap (by max-priority in the root) assuming that the x-component

refers to the key and the y-component refers to the priority of every item.

2) Show how to determine via only splits, top and delete keys, the 2D-points that have x-component in the range [3,6], and y-component larger than 6.

Exercise [rank 3+3]

Given the set of strings S = {abaa, abca, abma, baa, bbb}, build a Patricia trie and show the steps for the lexicographic search of the strings P1 = aaa, P2 = abb.

Exercise [rank 4+4]

Given the sequence of integers (11, 14, 16, 17, 19, 20, 21, 31), show how to encode them based on

- Elias-Fano Code

- PForDelta with base = 11, and b=3

Riferimenti

Documenti correlati

Write the pseudo-code of the Reservoir Sampling algorithm that random samples m items from a sequence of unknown length. 2) design an algorithm that determines efficiently, via

Exercise [rank 4+4] Let us given two arrays: A[1,n] of items and [1,n] that denotes the permutation of the positions in the range [1,n], such that [i] is the position where the

 Show the pseudo-code of the variant of binary quicksort that reduces the extra- space used during recursive calls, and comments on its complexity

Compute the Shortest Path Tree from node a using Dijkstra’s algorithm (showing all steps and used data structures)b. Show how to compute the MST of G in the case of an internal memory

[rank 5] Given the string S=aaccacaacc, show the execution of the Skew algorithm for the first level of recursion, thus solving directly the construction of SA^{2,0}, as done

[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

Define the (s,c)-dense code, where assuming s+c=256, specify how many bytes it occupies to represent integer x as a function of s and c, and comment when it can be better

The parameter vector of the model is composed of the probabilities of each one of four events corresponding to respectively: speciation of the parasite together with a speciation of