• Non ci sono risultati.

Algorithm Engineering 29 October 2018

N/A
N/A
Protected

Academic year: 2021

Condividi "Algorithm Engineering 29 October 2018"

Copied!
1
0
0

Testo completo

(1)

Algorithm Engineering 29 October 2018

Exercise [rank 5+3]

The following linked list L is expressed as a sequence of pairs (i, succ(i)) and item 2 is its head: L= {(1,6), (2,4), (3,0), (4,8), (5,7), (6,3), (7,1), (8,5)}.

1. Simulate the Divide&Conquer algorithm for the computation of the list

ranking in the 2-level model, assuming that the independent sets are {4,5,1} at the first step, {8,6} at the second and {7} at the third step.

2. Show the asymptotic I/O complexity of the list-ranking algorithm.

Exercise [rank 5+4]

Given the two lists (1, 2, 4, 9, 10, 11, 15, 19, 20, 24) and (3, 20) show the result of their intersection by applying:

 The doubling algorithm

 The shuffling algorithm

Exercise [rank 5] Transform the following algorithm in such a way that its time complexity remains the same but its space complexity gets to O(log n).

Exercise [rank 3+2+3]

Answer the following questions:

 Explain why the Deterministic Coin Tossing algorithm takes O(log* n) steps.

 Recompute the average length of the sorted runs if the Snow Plow is executed over a sequence in which the probability of an item to go in the heap is 2/3 instead of 1/2.

 Show the lower bound for string sorting and how it is derived.

(2)

Riferimenti

Documenti correlati

Two families of non-overlapping coercive domain decomposition methods are proposed for the numerical approximation of advection dominated advection-di usion equations and

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

[r]

In this scenario individual major changes in energy prices and availability , cars and individual modes will evolve technologically but will still the major urban mobility

The resulting binary images are input into the spline-based algorithm for diameter estimates and the measurements performance against REVIEW is reported in Table 8.. The removal

Uno dei momenti del procedimento impositivo lasciato alla discrezionalità dell’Ente è certamente quello attinente alla riscossione: la potestà regolamentare degli enti

In that case, we could say that the external control, and in particular the accounting control entrusted to the external auditor, should not be mandatory, but it should be quite

Article 241 of the above mentioned Legislative Decree No.163/2006 makes an express reference to certain provisions of the Italian Code of Civil Procedure, references that make