Differences

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

Link to this comparison view

pa:laboratoare:laborator-09 [2023/03/15 16:55]
radu.nichita
pa:laboratoare:laborator-09 [2026/01/21 12:53] (current)
darius.neatu [Laborator 09: Drumuri minime în grafuri: surse / destinații multiple. (2/2)]
Line 1: Line 1:
 ====== Laborator 09: Drumuri minime în grafuri: surse / destinații multiple. (2/2) ====== ====== Laborator 09: Drumuri minime în grafuri: surse / destinații multiple. (2/2) ======
  
 +{{:​pa:​new_pa:​partners:​adobe-logo.png?​250 |}}
 +Adobe is a global technology leader with a mission to **change the world through personalized digital experiences**. For over four decades, Adobe has transformed how individuals,​ teams, businesses, and enterprises create, manage, and deliver content across every surface and channel.
  
-{{:​pa:​new_pa:​partners:​adobe-logo.png?​155 |}} +With **AI at the core**, tools like **Adobe Firefly** and AI-powered assistants make creativity faster, smarter, and more personalized—while keeping it safe and responsibleIn **Adobe Experience Cloud**, AI powers real-time personalization,​ predictive insights, ​and automated customer journeys, helping brands ​deliver exceptional experiences ​at scale. At Adobe**creativity meets productivity**, and AI is the catalyst for transformation.
-\\ \\ \\ Changing ​the world through digital experiences is what Adobe’s all aboutWe give everyone ​from emerging artists to global brands - everything they need to design ​and deliver exceptional ​digital ​experiences! We’re passionate about empowering people to create beautiful and powerful imagesvideos, and apps, and transform how companies interact with customers across every screen.+
  
 ===== Obiective laborator ===== ===== Obiective laborator =====
Line 131: Line 132:
  
  
-  * $d_2$ (matricea dupa primul pas din algoritm; se modifică doar **d[4][3]**)+  * $d_2$ (matricea dupa primul pas din algoritm; se modifică doar **d[4][3]** și **d[4][1]**)
  
 |-|1|2|3|4| \\ |-|1|2|3|4| \\
Line 137: Line 138:
 |2|4|0|2|+∞| \\ |2|4|0|2|+∞| \\
 |3|+∞|+∞|0|2| \\ |3|+∞|+∞|0|2| \\
-|4|+∞|-1|**1**|0| v+|4|**3**|-1|**1**|0| v
  
   * $d_3$ (matricea dupa primul pas din algoritm; se modifică doar **d[1][4]** și **d[2][4]**)   * $d_3$ (matricea dupa primul pas din algoritm; se modifică doar **d[1][4]** și **d[2][4]**)
Line 145: Line 146:
 |2|4|0|2|**4**| \\ |2|4|0|2|**4**| \\
 |3|+∞|+∞|0|2| \\ |3|+∞|+∞|0|2| \\
-|4|+∞|-1|1|0| \\+|4|3|-1|1|0| \\
  
  
Line 154: Line 155:
 |2|4|0|2|4| \\ |2|4|0|2|4| \\
 |3|**5**|**1**|0|2| \\ |3|**5**|**1**|0|2| \\
-|4|+∞|-1|1|0| \\+|4|3|-1|1|0| \\
  
  
Line 164: Line 165:
 ==== Complexitate ==== ==== Complexitate ====
  
-  * **complexitate temporală**:​ $T = O(n^3)\ sau\ O(|E|^3)$+  * **complexitate temporală**:​ $T = O(n^3)\ sau\ O(|V|^3)$
   * **complexitate spațială** : $S = O(1)$   * **complexitate spațială** : $S = O(1)$
  
Line 199: Line 200:
 Johnson(G=(nodes,​ adj)) { Johnson(G=(nodes,​ adj)) {
   // STEP 1: Compute adjustment distances h (using Bellmand-Ford).   // STEP 1: Compute adjustment distances h (using Bellmand-Ford).
-  has_cycle, h = ComputerH(G);+  has_cycle, h = ComputeH(G);
   if (has_cycle) {   if (has_cycle) {
     return true, null, null;     return true, null, null;
Line 437: Line 438:
 </​note>​ </​note>​
  
-==== Roy-Floyd ====+==== Task-1: ​Roy-Floyd ====
  
 Se dă un graf **orientat** cu **n** noduri. Graful are **costuri strict pozitive**. Se dă un graf **orientat** cu **n** noduri. Graful are **costuri strict pozitive**.
Line 460: Line 461:
 </​note>​ </​note>​
  
-==== Johnson ====+==== Task-2: ​Johnson ====
  
 Se dă un graf **orientat** cu **n** noduri. Graful are **costuri oarecare** (pot fi și negative). Se dă un graf **orientat** cu **n** noduri. Graful are **costuri oarecare** (pot fi și negative).
Line 484: Line 485:
  
 </​note>​ </​note>​
 +
 +=== Task-3: Orașul care poate accesa cele mai puține noduri (dându-se o distanță limită) ===
 +Rezolvați problema [[ https://​leetcode.com/​problems/​find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/​description/​ | Find the City With the Smallest Number of Neighbors at a Threshold Distance ]] pe LeetCode.
 +
  
 ==== BONUS ==== ==== BONUS ====
pa/laboratoare/laborator-09.1678892129.txt.gz · Last modified: 2023/03/15 16:55 by radu.nichita
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0