Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
aa:tema_1_2018 [2018/11/03 02:33] cmihaela |
aa:tema_1_2018 [2018/11/06 19:25] (current) cmihaela |
||
---|---|---|---|
Line 4: | Line 4: | ||
''Responsabili tema'': Mihaela Catrina, Teodor Popescu | ''Responsabili tema'': Mihaela Catrina, Teodor Popescu | ||
- | * Pentru fiecare din urmatoarele recurente aplicati teorema Master (sau argumentati de ce nu poate fi aplicata, daca este cazul): | + | * I. (//0.5 x 6 = 3p//) Pentru fiecare din urmatoarele recurente aplicati teorema Master (sau argumentati de ce nu poate fi aplicata, daca este cazul): |
* $math[T(n) = T(\frac{n}{2}) + 2^n] | * $math[T(n) = T(\frac{n}{2}) + 2^n] | ||
* $math[T(n) = 2^nT(\frac{n}{2}) + n^n] | * $math[T(n) = 2^nT(\frac{n}{2}) + n^n] | ||
Line 13: | Line 13: | ||
- | * Determinati $math[f(n)] astfel incat $math[T(n) = \theta(f(n))]: | + | * II. (//1p//) Determinati $math[f(n)] astfel incat $math[T(n) = \theta(f(n))]: |
* $math[T(n) = \frac{1}{4}T(\frac{n}{4}) + \frac{3}{4}T(\frac{3n}{4}) + 1] | * $math[T(n) = \frac{1}{4}T(\frac{n}{4}) + \frac{3}{4}T(\frac{3n}{4}) + 1] | ||
- | * Rezolvati urmatoarea recurenta, presupunand ca n este o putere a lui 2: | + | * III. (//1p//) Rezolvati urmatoarea recurenta, presupunand ca n este o putere a lui 2: |
* $math[T(n) = \displaystyle\sum_{i=1}^{log_2n} T(\frac{n}{2^i}) + n] | * $math[T(n) = \displaystyle\sum_{i=1}^{log_2n} T(\frac{n}{2^i}) + n] | ||
- | * Determinati $math[f(n)] astfel incat $math[T(n) = \theta(f(n))]: | + | * IV. (//2p//) Determinati $math[f(n)] astfel incat $math[T(n) = \theta(f(n))]: |
* $math[T(n) = \sqrt{2n}T(\sqrt{2n}) + n^2] | * $math[T(n) = \sqrt{2n}T(\sqrt{2n}) + n^2] | ||
- | * Analizati complexitatea urmatorului algoritm, | + | * V. (//3p//) Analizati complexitatea urmatorului algoritm, |
<code cpp> | <code cpp> | ||
s = 0; | s = 0; | ||
Line 35: | Line 35: | ||
- <code> f(i,j) = (j-1) & j </code> | - <code> f(i,j) = (j-1) & j </code> | ||
- <code> f(i,j) = (j-1) & i </code> | - <code> f(i,j) = (j-1) & i </code> | ||
+ | |||
+ | |||
+ | |||
+ | === PRECIZARI === | ||
+ | * Tema va fi redactata individual. | ||
+ | * Tema va fi predata la cursul din data de **23 noiembrie 2018**. | ||
+ | * Tema valoreaza **1** punct din nota finala. | ||
+ | |||