• Non ci sono risultati.

Algorithm Engineering 10 September 2015 Exercise [rank 3+3]

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 10 September 2015 Exercise [rank 3+3]"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering

10 September 2015 Exercise [rank 3+3]

Consider the SnowPlow technique:

 Prove that the average length of the formed runs is 2M, where M is the size of the available internal memory.

 Compute the average run length by assuming that the probability to insert an item in the in-memory-heap is 2/3 (instead of the classic 1/2).

Exercise [rank 2+2] Provide the motivation of introducing Universal Hashing, with respect to classic hash functions (such as mod, division,…) and an example of family of universal hash functions from U to [1,m], where m is an arbitrary integer.

Exercise [rank 4+5] Let us given the strings T[1,n]=abacabra and P=abr.

 Show the behavior of the 1-mismatch algorithm based on Suffix Trees, by assuming that you are given (for free) a data structure that solves LCA-queries over trees in O(1) time.

 Show how to turn the LCA-query over the Suffix Tree of T into an RMQ-query over a proper +-1 array of integers. [hint: only the transformation, not the details of the RMQ data structure.]

Exercise [rank 2+3+3+3] Let us given the string S=ababbacabb$

Compress via LZ77, with unbounded window

 Compress via LZ77, with bounded window of size 3

 Compress via LZ78

 Compress via LZW

Riferimenti

Documenti correlati

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

[r]

Write the pseudo-code of the Reservoir Sampling algorithm that random samples m items from a sequence of unknown length. Prove that the probability of extracting any element when

Exercise [rank 4] Describe the skip list data structure and state its time complexity for searching, inserting or deleting items in a set of size n..  Show a skip list over the

Exercise [rank 5] Discuss the optimality of the disk striping technique in combination with multi-way mergesort when sorting N items over D disks, in a model with.. internal memory

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

Exercise [points 4+4] Given the array A = [5, 2, 4, 8, 3, 1, 9, 6], build the RMQ data structure but ONLY for RMQ-queries which are either aligned to blocks or overlap

Prove that the expected reconstruction time of cuckoo hashing is O(n), if it is built over n items and we consider a sequence of a*n insertions, where a is