• Non ci sono risultati.

Algorithm Engineering27 July 2017Name:Surname:Matricola:

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering27 July 2017Name:Surname:Matricola:"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering 27 July 2017

Name: Surname: Matricola:

Exercise [rank 5] Given the undirected and weighted graph

G={ (A,B, 2), (A,F, 4), (A,E, 6), (B,C, 1), (B,F, 3), (C,D, 3), (C,F, 5) }.

compute the MST via the external-memory algorithm of Sybein switching to Kruskal when the graph consists of 3 nodes (hence M is able to host 3 nodes).

Exercise [rank 3+4] Given the BWT string S = “acm$aa”,

 show the LF mapping for S.

invert S and thus derive the original string.

Exercise [rank 5] Let us given symbols and probabilities: p(a) = 0.25, p(b)=0.25, p(c) = 0.50. Compress via Arithmetic coding the text ABCC, showing the final binary

sequence representing the compressed output.

Exercise [rank 3+3+2] Given a sequence S of items and an integer m < n/2,

show the pseudo-code of the reservoir sampling algorithm,

prove its correctness (i.e. it does a uniform sampling),

Simulate its execution over the sequence: (a, b, c, d, e, f) by assuming m=2 and that the random generator produces the sequence [1, 3, 2, 1]

Exercise [rank 5] Let us given the binary strings S={ 0001100, 0001110, 0011, 0010, 101, 111 }. Build the patricia trie for S and show how to search for the lexicographic position of P1=010000, and of P2=0101.

Riferimenti

Documenti correlati

Delamination is the major failure mechanism in composite laminates and eventually leads to material failure. An early-detection and a better understanding of this phenomenon, through

Based on neurological signs, recovery after altered food removing and results of 46  . food analysis, the diagnosis of tremorgenic intoxication

Gli Autori descrivono un caso, da loro osservato, in cui l’assunzione dell’antiandrogeno flutamide da parte di una donna nelle prime settimane di gravidanza ha interferito

We provided two algorithms computing a (entropy/run-length) compressed Burrows-Wheeler transform of the text, three algorithms computing the LZ77 factorization in

Importantly, this implies that any data structure based on string attractors is universal : given any dictionary-compressed text representation, we can induce a string attractor

Per certi aspetti era vero, ma, con quelle informazioni in più, Michele aveva capito come si poteva bloccare tutto, facendo collassare l’intera struttura dei sistemi collegati

• Scan the sorted list to find a match with the second half of the

•  Beta compute a hash of the file B and send it to alpha?. •  Alpha compute the hash of A and send back to beta either the hash (if the two hash are the same) or the content of