Skip to content

Commit 5a2abab

Browse files
Add files via upload
Signed-off-by: Fabiana 🚀 Campanari <[email protected]>
1 parent 9dfcb1d commit 5a2abab

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
3+
## Exercise 3: Step-by-Step Tableau for Dijkstra's Algorithm
4+
5+
Below are the tableaus (tabulações) representing each iteration of Dijkstra's algorithm for Example 3, as described in the PDF[^1].
6+
7+
### **Network Data**
8+
9+
- Nodes: A (source), B, C, D, E (destination)
10+
- Arc weights (in seconds):
11+
- A→B: 25
12+
- A→C: 28
13+
- B→D: 22
14+
- D→E: 18
15+
16+
### **Tableau 1: Initialization**
17+
18+
| Node | Distance | Predecessor | Status |
19+
|------|----------|-------------|----------|
20+
| A | 0 | - | Permanent|
21+
| B || - | Temporary|
22+
| C || - | Temporary|
23+
| D || - | Temporary|
24+
| E || - | Temporary|
25+
26+
### **Tableau 2: After Visiting A**
27+
28+
- Update B: 0 + 25 = 25 (Predecessor: A)
29+
- Update C: 0 + 28 = 28 (Predecessor: A)
30+
31+
| Node | Distance | Predecessor | Status |
32+
|------|----------|-------------|----------|
33+
| A | 0 | - | Permanent|
34+
| B | 25 | A | Temporary|
35+
| C | 28 | A | Temporary|
36+
| D || - | Temporary|
37+
| E || - | Temporary|
38+
39+
### **Tableau 3: After Visiting B**
40+
41+
- Update D: 25 + 22 = 47 (Predecessor: B)
42+
43+
| Node | Distance | Predecessor | Status |
44+
|------|----------|-------------|----------|
45+
| A | 0 | - | Permanent|
46+
| B | 25 | A | Permanent|
47+
| C | 28 | A | Temporary|
48+
| D | 47 | B | Temporary|
49+
| E || - | Temporary|
50+
51+
### **Tableau 4: After Visiting C**
52+
53+
- No updates (C has no outgoing arcs).
54+
55+
| Node | Distance | Predecessor | Status |
56+
|------|----------|-------------|----------|
57+
| A | 0 | - | Permanent|
58+
| B | 25 | A | Permanent|
59+
| C | 28 | A | Permanent|
60+
| D | 47 | B | Temporary|
61+
| E || - | Temporary|
62+
63+
### **Tableau 5: After Visiting D**
64+
65+
- Update E: 47 + 18 = 65 (Predecessor: D)
66+
67+
| Node | Distance | Predecessor | Status |
68+
|------|----------|-------------|----------|
69+
| A | 0 | - | Permanent|
70+
| B | 25 | A | Permanent|
71+
| C | 28 | A | Permanent|
72+
| D | 47 | B | Permanent|
73+
| E | 65 | D | Temporary|
74+
75+
### **Tableau 6: After Visiting E (Final)**
76+
77+
| Node | Distance | Predecessor | Status |
78+
|------|----------|-------------|----------|
79+
| A | 0 | - | Permanent|
80+
| B | 25 | A | Permanent|
81+
| C | 28 | A | Permanent|
82+
| D | 47 | B | Permanent|
83+
| E | 65 | D | Permanent|
84+
85+
#
86+
87+
### **Optimal Path and Cost**
88+
89+
- **Path:** A → B → D → E
90+
- **Total Time:** 65 seconds
91+
92+
These tableaus follow the standard Dijkstra's procedure, allowing step-by-step verification and understanding of the shortest path calculation in the network.
93+
94+
95+
96+
[

0 commit comments

Comments
 (0)