Differences
This shows you the differences between two versions of the page.
| 
                    aa:exam:iv-cdiana [2021/06/05 15:53] pdmatei created  | 
                
                    aa:exam:iv-cdiana [2021/06/06 11:23] (current) pdmatei  | 
            ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| * $math[\exists w. f(w) = 0] | * $math[\exists w. f(w) = 0] | ||
| * $math[\exists w. f(w) = 1] | * $math[\exists w. f(w) = 1] | ||
| - | |||
| - | //Solutie: f apartine R, pentru ca este problema f(w) = 0. Masina M nu accepta niciodata// | ||
| 2. Fie $math[g] o problema NP-dura si $math[f \in P], astfel incat $math[g \leq_p f]. Care afirmatii sunt adevarate? | 2. Fie $math[g] o problema NP-dura si $math[f \in P], astfel incat $math[g \leq_p f]. Care afirmatii sunt adevarate? | ||
| Line 14: | Line 12: | ||
| * $math[f] este NP-completa. | * $math[f] este NP-completa. | ||
| - | //Solutie: toate// | ||
| 3. Dati un exemplu de **algoritm** care are timpul de executie in $math[\omega(n)]. | 3. Dati un exemplu de **algoritm** care are timpul de executie in $math[\omega(n)]. | ||
| 4. Care este complexitatea unui algoritm care simuleaza executia unei masini Turing $math[M] pe un cuvant $math[w], pentru 100 de pasi? | 4. Care este complexitatea unui algoritm care simuleaza executia unei masini Turing $math[M] pe un cuvant $math[w], pentru 100 de pasi? | ||
| - | |||
| - | //Solutie: Constanta - algoritmul va simula mereu cel mult 100 de tranzitii// | ||
| 5. Care este complexitatea simularii urmatoarei proceduri: | 5. Care este complexitatea simularii urmatoarei proceduri: | ||
| Line 30: | Line 25: | ||
| s = s + l[i] | s = s + l[i] | ||
| </code> | </code> | ||
| - | |||
| - | //Solutie: len(l)*len(l)// | ||
| 6. Care este diferenta intre un constructor de baza si un operator al unui TDA? Folositi un exemplu pentru a ilustra raspunsul. | 6. Care este diferenta intre un constructor de baza si un operator al unui TDA? Folositi un exemplu pentru a ilustra raspunsul. | ||