Mmdi U3 Ea Ulmh
Mmdi U3 Ea Ulmh
Matricula: ES1921005869
2
3 9
1 4 6
1 4 5
7
5 1
7
3
Aplicando el algoritmo de Floyd – Warshall, se va a realizar 2 matrices : una
de distancias y otra de recorridos:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 ∞ ∞
2 3 0 ∞ ∞ 9 ∞
3 5 ∞ 0 7 7 1
4 1 ∞ 7 0 ∞ 4
5 ∞ 9 7 ∞ 0 ∞
6 ∞ ∞ 1 4 ∞ 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 5 6
2 1 - 3 4 5 6
3 1 2 - 4 5 6
4 1 2 3 - 5 6
5 1 2 3 4 - 6
6 1 2 3 4 5 -
Y se realiza las opraciones de las 2 tablas para que te den la distancia minima:
Primer columna y primera fila:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 ∞ ∞
2 3 0 8 4 9 ∞
3 5 8 0 6 7 1
4 1 4 6 0 ∞ 4
5 ∞ 9 7 ∞ 0 ∞
6 ∞ ∞ 1 4 ∞ 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 5 6
2 1 - 1 1 5 6
3 1 1 - 1 5 6
4 1 1 1 - 5 6
5 1 2 3 4 - 6
6 1 2 3 4 5 -
Segunda columna y segunda fila:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 ∞
2 3 0 8 4 9 ∞
3 5 8 0 6 7 1
4 1 4 6 0 13 4
5 12 9 7 13 0 ∞
6 ∞ ∞ 1 4 ∞ 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 6
2 1 - 1 1 5 6
3 1 1 - 1 5 6
4 1 1 1 - 2 6
5 2 2 3 2 - 6
6 1 2 3 4 5 -
Tercer columna y tercer fila:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 6
2 3 0 8 4 9 9
3 5 8 0 6 7 1
4 1 4 6 0 13 4
5 12 9 7 13 0 8
6 6 9 1 4 8 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 3
2 1 - 1 1 5 3
3 1 1 - 1 5 6
4 1 1 1 - 2 6
5 2 2 3 2 - 3
6 3 3 3 4 3 -
Cuarta columna y cuarta fila
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 5
2 3 0 8 4 9 8
3 5 8 0 6 7 1
4 1 4 6 0 13 4
5 12 9 7 13 0 8
6 5 8 1 4 8 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 4
2 1 - 1 1 5 4
3 1 1 - 1 5 6
4 1 1 1 - 2 6
5 2 2 3 2 - 3
6 4 4 3 4 3 -
Quinta columna y quinta fila:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 5
2 3 0 8 4 9 8
3 5 8 0 6 7 1
4 1 4 6 0 13 4
5 12 9 7 13 0 8
6 5 8 1 4 8 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 4
2 1 - 1 1 5 4
3 1 1 - 1 5 6
4 1 1 1 - 2 6
5 2 2 3 2 - 3
6 4 4 3 4 3 -
Sexta columna y sexta fila:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 5
2 3 0 8 4 9 8
3 5 8 0 5 7 1
4 1 4 5 0 12 4
5 12 9 7 12 0 8
6 5 8 1 4 8 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 4
2 1 - 1 1 5 4
3 1 1 - 6 5 6
4 1 1 6 - 6 6
5 2 2 3 6 - 3
6 4 4 3 4 3 -
Por lo tanto, tenemos nuestra matriz de distancias minimas con sus reccorridos
modificados:
Matriz de distancias
1 2 3 4 5 6
1 0 3 5 1 12 5
2 3 0 8 4 9 8
3 5 8 0 5 7 1
4 1 4 5 0 12 4
5 12 9 7 12 0 8
6 5 8 1 4 8 0
Matriz de Recorridos
1 2 3 4 5 6
1 - 2 3 4 2 4
2 1 - 1 1 5 4
3 1 1 - 6 5 6
4 1 1 6 - 6 6
5 2 2 3 6 - 3
6 4 4 3 4 3 -
Ya se han hecho todas las iteraciones posibles. Por tanto, el camino mínimo
entre 2 vértices cualesquiera del grafo será el obtenido en la matriz final. En
este caso, el camino mínimo entre 3 y 4 vale 5.
Y se meustra durante el grafo: Camino
2 minimo
3 9
1 4 6
1 4 5
5 7 1
3 7
Primero se observa la tabla con sus caracteristicas, que se lleva los siguiente
pasos:
1. Se elabora el grafo con su cantidad de tiempo que serían las semanas:
3 𝑠𝑒𝑚 14 𝑠𝑒𝑚
𝐺
5 𝑠𝑒𝑚 𝐷
𝐴 𝐸 𝐹
0 𝑠𝑒𝑚 0 𝑠𝑒𝑚
E1 𝑠𝑒𝑚
Inicio 𝐶 4 𝑠𝑒𝑚 Fin
𝐼
4 𝑠𝑒𝑚 2 𝑠𝑒𝑚
𝐵 𝐻
6 𝑠𝑒𝑚
12 𝑠𝑒𝑚
2. Se calculan los términos e inicios lejanos y cercanos.
0 5 3 𝑠𝑒𝑚 5 8 14 𝑠𝑒𝑚
0 5 7 10 𝐺 10 24
0 0 5 𝑠𝑒𝑚 𝐷 5 6 10 24 26 26
0 0 5 6 26 26
𝐴 6 10
0 𝑠𝑒𝑚 5 9 𝐸 𝐹 0 𝑠𝑒𝑚
20 24 E 6 10
Inicio 1 𝑠𝑒𝑚 4 𝑠𝑒𝑚 Fin
0 6 𝐶
6 12 𝐼
4 𝑠𝑒𝑚 𝐻 2 𝑠𝑒𝑚
𝐵
6 18 24 26
6 𝑠𝑒𝑚 12 24 12 𝑠𝑒𝑚 24 26
3. Se calcula la holgura:
Bibliografía
Anonimo. (2012). Users. Obtenido de Grafos:
https://users.dcc.uchile.cl/~bebustos/apuntes/cc3001/Grafos/
Badia, J., Martnez, B., Morales, A., & Sanchiz, J. (2016). PDF. Obtenido de
Tema 11 Estructura de Grafos:
http://repositori.uji.es/xmlui/bitstream/handle/10234/119829/tema11.pdf
?sequence=1&isAllowed=y
Bonilla Garzón, A. (4 de Junio de 2017). YouTube. Obtenido de Algoritmo de
Dijkstra: Distancia mínima:
https://www.youtube.com/watch?v=w475Vm1ZgTk
Bustamante, K. (30 de Mayo de 2016). YouTube. Obtenido de CPM -
MÉTODO DE LA RUTA CRITICA:
https://www.youtube.com/watch?v=Fw0jhTu2G2U
Licencia Creative Commons Atribución. (18 de Noviembre de 2019). Wikipedia
La Enciclopedia Libre. Obtenido de Algoritmo de Floyd-Warshall:
https://es.wikipedia.org/wiki/Algoritmo_de_Floyd-Warshall
M, H. (8 de Noviembre de 2016). YouTube. Obtenido de algoritmo de Floyd-
Warshall: https://www.youtube.com/watch?v=h-nmexY9gtA
UnADM. (20 de Enero de 2020). PDF. Obtenido de Unidad 3 "Discretización":
file:///D:/UnADM/Clases%20Universidad/Semestre%202/Matem%C3%
A1ticas%20Discretas/U3_Contenido.pdf