• Non ci sono risultati.

Algorithm Engineering 30

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 30"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering

30 June 2014

1. [rank 4] Describe the randomized algorithm for extracting I/O-efficiently an independent set from a list.

2. [rank 4] State and prove the main theorem that underlies the multi-pivot selection in external quicksort, which guarantees balancedness among the formed buckets.

3. [rank 4] Let us given the strings S = {abac, abra, bacco, bei, acat}, show the structure of a Ternary Search Tree built by inserting them in alphabetic order.

4. [rank 6+3] Let us given the string T = abababca

a. Compress via LZ77, LZ78, LZW, showing the auxiliary data structure possibly used by each one of these algorithms

b. Show the text that you obtain by decompressing the LZW sequence:

0 1 2 4 3 6, and assuming that the alphabet is {a,b} with codes {0,1}

5. [rank 3+3+3] Given the graph G = {(a,b) (a,d) (b,c) (c,a) (c,e) (d,b) (d,e) (e,c) }, set the weight of the edge (x,y) as rank(x) * rank(y) mod 7, where rank(x) is the rank in the alphabet of letter x, counting from 2.

a. Compute the MST of G via the Prim’s algorithm (showing all steps and used data structures)

b. Compute the Shortest Path Tree from node a using Dijkstra’s algorithm (showing all steps and used data structures)

c. Show how to compute the MST of G in the case of an internal memory able to store just 3 nodes (commenting the approach).

[rank *] State the Steiner Tree problem, describe an algorithm to 2-approximate it, and prove that approximation bound.

Riferimenti

Documenti correlati

We give an algorithm to compute primary decomposition of monomial ideals equigenerated in degree 2 and establish connections with minimal vertex covers of a simple graph.. We

In order to efficiently support transformation composition, three-dimensional graphics systems impose restrictions on the type of transformations used in a scene graph,

[r]

Compute the determinant of the matrix obtained from A by first interchanging the last two columns and then interchanging the first two

Since algebraic and geometric multiplicities differ and hence there is no basis of R 4 consisting of eigenvectors of A, the matrix A cannot be

If it is possible, compute such an orthogonal matrix A and explain its geometrical meaning... and use this information to write down the orthogonal projection of R 4

Compute the determinant of the matrix obtained from A by first interchanging the last two columns and then interchanging the first

 Split the input stream in batches of 5 seconds each and print on the standard output, for each batch, the occurrences of each word appearing in the batch. ▪ The pairs must