From c50f233fc3e6a7446133446fbbef9e3525c7681d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiana=20=F0=9F=9A=80=20=20Campanari?= <113218619+FabianaCampanari@users.noreply.github.com> Date: Wed, 14 May 2025 13:14:17 -0300 Subject: [PATCH] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabiana 🚀 Campanari <113218619+FabianaCampanari@users.noreply.github.com> --- ... Algorithm to the Shortest Path Problem.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 class__12- Shortest Path-Dijkstra's Algorithm/Exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem/exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem.md diff --git a/class__12- Shortest Path-Dijkstra's Algorithm/Exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem/exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem.md b/class__12- Shortest Path-Dijkstra's Algorithm/Exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem/exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem.md new file mode 100644 index 0000000..cdf5e2a --- /dev/null +++ b/class__12- Shortest Path-Dijkstra's Algorithm/Exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem/exerc_3-Applying Dijkstra's Algorithm to the Shortest Path Problem.md @@ -0,0 +1,96 @@ + +```markdown +## Example 3: Step-by-Step Tableau for Dijkstra's Algorithm + +Below are the tableaus (tabulações) representing each iteration of Dijkstra's algorithm for Example 3, as described in the PDF[^1]. + +### **Network Data** + +- Nodes: A (source), B, C, D, E (destination) +- Arc weights (in seconds): + - A→B: 25 + - A→C: 28 + - B→D: 22 + - D→E: 18 + +### **Tableau 1: Initialization** + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | ∞ | - | Temporary| +| C | ∞ | - | Temporary| +| D | ∞ | - | Temporary| +| E | ∞ | - | Temporary| + +### **Tableau 2: After Visiting A** + +- Update B: 0 + 25 = 25 (Predecessor: A) +- Update C: 0 + 28 = 28 (Predecessor: A) + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | 25 | A | Temporary| +| C | 28 | A | Temporary| +| D | ∞ | - | Temporary| +| E | ∞ | - | Temporary| + +### **Tableau 3: After Visiting B** + +- Update D: 25 + 22 = 47 (Predecessor: B) + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | 25 | A | Permanent| +| C | 28 | A | Temporary| +| D | 47 | B | Temporary| +| E | ∞ | - | Temporary| + +### **Tableau 4: After Visiting C** + +- No updates (C has no outgoing arcs). + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | 25 | A | Permanent| +| C | 28 | A | Permanent| +| D | 47 | B | Temporary| +| E | ∞ | - | Temporary| + +### **Tableau 5: After Visiting D** + +- Update E: 47 + 18 = 65 (Predecessor: D) + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | 25 | A | Permanent| +| C | 28 | A | Permanent| +| D | 47 | B | Permanent| +| E | 65 | D | Temporary| + +### **Tableau 6: After Visiting E (Final)** + +| Node | Distance | Predecessor | Status | +|------|----------|-------------|----------| +| A | 0 | - | Permanent| +| B | 25 | A | Permanent| +| C | 28 | A | Permanent| +| D | 47 | B | Permanent| +| E | 65 | D | Permanent| + +--- + +### **Optimal Path and Cost** + +- **Path:** A → B → D → E +- **Total Time:** 65 seconds + +These tableaus follow the standard Dijkstra's procedure, allowing step-by-step verification and understanding of the shortest path calculation in the network. +``` + + +[ \ No newline at end of file