Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
aa:lab:7 [2025/11/16 11:57]
aureliu.antonie
aa:lab:7 [2025/11/16 16:42] (current)
aureliu.antonie add ex
Line 1: Line 1:
 ====== Recurențe ====== ====== Recurențe ======
-1. Folosiți cele 3 metode (metoda arborilor, metoda substituției,​ teorema master) pentru a rezolva recurențele:​+1. Folosiți ​una dintre ​cele 3 metode (metoda arborilor, metoda substituției,​ teorema master) pentru a rezolva recurențele:​
  
    * $ T_a(n) = 2T_a(n-1) + 1$    * $ T_a(n) = 2T_a(n-1) + 1$
Line 13: Line 13:
    * $ T_{Quicksort}(n) = T_{Quicksort}(n-1) + O(n) $\\    * $ T_{Quicksort}(n) = T_{Quicksort}(n-1) + O(n) $\\
 Aceasta recurenta descrie [[https://​en.wikipedia.org/​wiki/​Quicksort| Algoritmul Quicksort]] Aceasta recurenta descrie [[https://​en.wikipedia.org/​wiki/​Quicksort| Algoritmul Quicksort]]
 +   ​* ​ $math[T(n) = T(] $math[n \over 4] $math[) + T(] $math[3n \over 4] $math[) + n] \\
  
 +2. Folosiți una dintre cele 3 metode (metoda arborilor, metoda substituției,​ teorema master) pentru a rezolva recurențele:​
 +
 +   * $ T_a(n) = T_a(\sqrt{n}) + 1 $
 +   * $ T_b(n) = 2T_b(\sqrt{n}) + \log n $
 +   * $ T_c(n) = \sqrt{n}T_c(\sqrt{n}) + n $
 <​note>​ <​note>​
 Soluțiile acestui laborator se găsesc [[https://​ocw.cs.pub.ro/​ppcarte/​doku.php?​id=aa:​lab:​sol:​7|aici]] Soluțiile acestui laborator se găsesc [[https://​ocw.cs.pub.ro/​ppcarte/​doku.php?​id=aa:​lab:​sol:​7|aici]]
 </​note>​ </​note>​