Tarea Grafos
-
Upload
marshalleitor -
Category
Technology
-
view
14 -
download
0
Transcript of Tarea Grafos
![Page 1: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/1.jpg)
“Ejercicios de algoritmos”
Alumno: José MartínezDocente: Pilar Pardo
![Page 2: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/2.jpg)
Ejercicio 1. Construya la matriz de adyacencia del siguiente grafo no dirigido:
A=
0 1 1 11 0 1 11 1 0 11 1 1 0
E={ (1,3),(1,5),(1,8),(3,1),(3,5),(3,8),(5,1),(5,3),(5,8),(8,1), (8,3),(8,5)}
V= { 1,3,5,8}
Matriz
![Page 3: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/3.jpg)
Ejercicio 2. Construya la matriz de adyacencia del siguiente grafo dirigido:
A=
0 1 1 10 1 1 00 0 0 10 0 0 0
E={ (1,2),(1,3),(1,4),(2,2),(2,3),(3,4)}
V= { 1,2,3,4}
Matriz
![Page 4: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/4.jpg)
A=E=
V=
Ejercicio 3. Construya la Matriz de adyacencia, Lista de adyacencia y vector del siguiente grafo dirigido:
{ a,b,c,d }
{ (a,b),(a,c),(b,c),(b,d),(c,d)}
0 8 40 00 0 15 300 0 0 150 0 0 0
Matriz
![Page 5: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/5.jpg)
a
b
c
d
b 8
c 15
d 15
c 40
d 30
Null
ListaVector
a
b
c
d
8
40
0
15
30
0
15
0
0
=
=
=
![Page 6: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/6.jpg)
A=
E=
V= { a,b,c,d }
{ (a,b),(a,c),(b,a),(b,c),(b,d),(c,a),(c,b),(c,d),(d,b),(d,c)}
0 120 40 0120 0 5 10 40 5 0 15 0 10 15 0
Matriz
Ejercicio 4. Construya la Matriz de adyacencia, Lista de adyacencia y vector del siguiente grafo no dirigido:
![Page 7: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/7.jpg)
a
b
c
d
b 120
a 120
a 40
c 40
c 5
Lista
=
=
=
d 10
b 5 d 15
b 10 c 15=
120
40
0
120
5
10
0
40
5
15
0
10
15
0
Vector
a
b
c
d
![Page 8: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/8.jpg)
Ejercicio 5. A partir de las siguientes Matrices, construir sus respectivos Grafos si es que es posible.
No se puede.
Grafo No Dirigido
![Page 9: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/9.jpg)
Grafo no conexo y no dirigido
1 2
3 4
5 6
7 8
![Page 10: Tarea Grafos](https://reader036.fdocuments.es/reader036/viewer/2022071907/55c9e941bb61ebac548b4666/html5/thumbnails/10.jpg)