• Non ci sono risultati.

Algorithm Engineering 10 January 2020

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 10 January 2020"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering 10 January 2020

Exercise [rank 4] Construct a perfect hash for the set of 8 items S={1, 5, 11, 6, 10, 8, 2, 14}, by assuming that the table of the first level has size m=5, and choose all needed hash functions in the class of universal hashes.

Exercise [points 3+5] Given a sequence of integers S = (1, 6, 15, 18, 19, 20, 21), encode them using (by motivating which sequence is compressed):

 Rice code with k=3

 Interpolative coding (the first 3 integers only: the ones in positions 2, 4, 6)

Exercise [points 4+4] Given the probabilities p(a)=0.1; p(b)=0.15; p(c)=0.2;

p(d)=0.25; p(e)=0.3,

1. Construct the Canonical Huffman code, showing the steps followed by the algorithm.

2. Then use it to decode the bit sequence 1001001, showing each decoding step.

Exercise [rank 3+4+3]

1. 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 positions of the cuckoo table, n is the number of stored keys in that table, and r >= 2cn.

2. Given a sequence of n non-negative integers smaller than u, show what is the space occupancy of Elias-Fano coding and prove it.

3. Prove an upper bound to the variation induced by a truncation to k digits of a number smaller than 1 represented in binary as .b1 b2 b3 b4 …. where the bi are bits.

Riferimenti

Documenti correlati

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

For a real number x whose fractional part is not 1/2, let hxi denote the nearest integer

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

Let a, b, and c be the lengths of the sides of a triangle, and let R and r be the circumradius and inradius of the

analogously BB ′ and CC ′ are the bisectors of the angles ∠ABC

As an application, we prove tightness under diffusive rescaling for general pinning and wetting models based on random

Omitted variable bias means that technology is not truly exogenous but depends on various factors, that are omitted in the model.. - The factors explaining investments in R&D,