Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
aa:tema_1 [2017/10/20 12:15]
fcatalin
aa:tema_1 [2018/11/06 23:44] (current)
cmihaela
Line 1: Line 1:
-Tema 1 - Mașina Turing+==== TEMA ==== 
 + 
 + 
 +''​Responsabili tema'':​ Mihaela Catrina, Teodor Popescu 
 + 
 +   * 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) = 2^nT(\frac{n}{2}) + n^n] 
 +      * $math[T(n) = 2T(\frac{n}{4}) + n^{0.51}] 
 +      * $math[T(n) = 64T(\frac{n}{8}) − n^2log n] 
 +      * $math[T(n) = T(\frac{n}{2}) + n(2 − cos n)] 
 +      * $math[T(n) = 16T(\frac{n}{4}) + 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] 
 + 
 +  * 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] 
 + 
 +  * IV. (//2p//) Determinati $math[f(n)] astfel incat $math[T(n) = \theta(f(n))]:​ 
 +      * $math[T(n) = \sqrt{2n}T(\sqrt{2n}) + n^2] 
 + 
 +  * V. (//3p//) Analizati complexitatea urmatorului algoritm, 
 +<code cpp> 
 +s = 0; 
 +for(i = 0; i < pow(2,n) ; i++) { 
 +    for(j = i; j > 0; j = f(i, j)) { 
 +        s++; 
 +    } 
 +
 +</​code>​ 
 +       
 + avand in vedere ca operatiiile aritmetice si operatiile pe biti (&) se realizeaza in timp constant, iar $math[pow(2,​n) = 2^n], pentru cazul in care : 
 +     <​code>​ f(i,j) = (j-1) & j </​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. 
 + 
  
-{{:​aa:​tema_1_-_enunt.pdf|Enunt}}