SlideShare a Scribd company logo
Estructuras de Datos y
Algoritmos
M.Sc. Franco Guamán Bastidas
Universidad Técnica Particular de Loja
Departamento de Ciencias de la Computación y Electrónica
Sección Departamental de Inteligencia Artificial
GRAFOS
Estructuras de Datos y Algoritmos - Franco Guamán 2
Contenidos
 Definición
 Usos
 Ejemplos
 Tipos
 Dirigidos
 No dirigidos
 Características
 Representación (matriz de adyacencia)
 Recorrido de un grafo
 Anchura
 Profundidad
Definición
Estructuras de Datos y Algoritmos - Franco Guamán 3
La teoría de grafos estudia las propiedades de los grafos, que son
colecciones de objetos llamados vértices (o nodos) conectados por
líneas llamadas aristas (o arcos) que pueden tener orientación
(dirección asignada). Típicamente, un grafo está diseñado por una serie
de puntos (los vértices) conectados por líneas (las aristas).
Un grafo es una pareja G
= (V, A), donde V es un
conjunto de puntos, llamados
vértices, y A es un conjunto de
pares de vértices, llamadas
aristas.
Definición
Estructuras de Datos y Algoritmos - Franco Guamán 4
Un grafo está formado por dos elementos:
1. Vértices (nodos, elementos) Almacenan información
2. Aristas (bordes, arcos, enlaces) Relaciones entre la
información de los vértices
b
e
a
d
c
Grafo etiquetado con cinco vértices y seis aristas
Uso de grafos
Estructuras de Datos y Algoritmos - Franco Guamán
5
Grafos ejemplos
Estructuras de Datos y Algoritmos - Franco Guamán
6
• Los vértices representan ciudades y almacenan el nombre de la
ciudad
• Las aristas representan la ruta y la distancia kilométrica entre las
ciudades que unen
Grafos tipos
Estructuras de Datos y Algoritmos - Franco Guamán
7
Tipos básicos de grafos: Dirigidos y no Dirigidos
• Grafos Dirigidos.- Los arcos en el grafo tienen una
dirección asociada. Cada arista está asociada a un par
ordenado (𝑢,𝑣) de vértices
• Grafos no Dirigidos.- Los arcos en el grafo no tienen
una dirección particular, es decir, son bidireccionales.
Sus aristas son pares no ordenados de vértices, el
camino del vértice 𝑢 al vértice 𝑣 es el mismo que de 𝑣 a
al vértice 𝑢
Grafos tipos
Estructuras de Datos y Algoritmos - Franco Guamán
8
¿Qué tipo de grafo representa la siguiente figura?
a) Binario
b) Dirigido
c) No dirigido
d) Orientado
Grafos tipos
Estructuras de Datos y Algoritmos - Franco Guamán
9
Grafos características
Estructuras de Datos y Algoritmos - Franco Guamán
10
Grafos, características
Estructuras de Datos y Algoritmos - Franco Guamán
11
Grafos, representación
Estructuras de Datos y Algoritmos - Franco Guamán
12
Grafos, representación
Estructuras de Datos y Algoritmos - Franco Guamán
13
Grafos, representación
Estructuras de Datos y Algoritmos - Franco Guamán
14
Grafos, recorridos
Estructuras de Datos y Algoritmos - Franco Guamán
15
Grafos, recorridos
Estructuras de Datos y Algoritmos - Franco Guamán
16
Algoritmos para encontrar caminos
Estructuras de Datos y Algoritmos - Franco Guamán
17
Estructuras de Datos y Algoritmos - Franco Guamán 18
Preguntas

More Related Content

Similar to Estructuras de datos grafos

seminar.pptx
seminar.pptxseminar.pptx
seminar.pptx
DilkashMittal1
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structure
Mahmoud Alfarra
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
pournima055
 
Chp 4
Chp 4Chp 4
Chp 4
stanbridge
 
Geometric model & curve
Geometric model & curveGeometric model & curve
Geometric model & curve
sai surendra veerla
 
Eamcet engineering syllabus by entranceindia
Eamcet engineering syllabus by entranceindiaEamcet engineering syllabus by entranceindia
Eamcet engineering syllabus by entranceindia
Entranceindia.com
 
Topoloical sort
Topoloical sortTopoloical sort
Topoloical sort
sahilnarvekar
 
Graphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programGraphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ program
Muhammad Danish Badar
 
Four data models in GIS
Four data models in GISFour data models in GIS
Four data models in GIS
Prof. A.Balasubramanian
 
Graphs data structures
Graphs data structuresGraphs data structures
Graphs data structures
Jasleen Kaur (Chandigarh University)
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkX
Benjamin Bengfort
 
Graph 1
Graph 1Graph 1
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
Andres Mendez-Vazquez
 
Graphs, Trees, Paths and Their Representations
Graphs, Trees, Paths and Their RepresentationsGraphs, Trees, Paths and Their Representations
Graphs, Trees, Paths and Their Representations
Amrinder Arora
 
Geospatial Database.pptx
Geospatial Database.pptxGeospatial Database.pptx
Geospatial Database.pptx
MariamKariam1
 
Lecture co1 math 21-1
Lecture co1 math 21-1Lecture co1 math 21-1
Lecture co1 math 21-1
Lawrence De Vera
 
Graphs in datastructures
Graphs in datastructuresGraphs in datastructures
Graphs in datastructures
LikhithaGunturi
 
Techniques for graph
Techniques for graphTechniques for graph
Techniques for graph
SOWNDARYASUGCOMPUTER
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
Victor Palmar
 
09_Graphs_handout.pdf
09_Graphs_handout.pdf09_Graphs_handout.pdf
09_Graphs_handout.pdf
Israr63
 

Similar to Estructuras de datos grafos (20)

seminar.pptx
seminar.pptxseminar.pptx
seminar.pptx
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structure
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Chp 4
Chp 4Chp 4
Chp 4
 
Geometric model & curve
Geometric model & curveGeometric model & curve
Geometric model & curve
 
Eamcet engineering syllabus by entranceindia
Eamcet engineering syllabus by entranceindiaEamcet engineering syllabus by entranceindia
Eamcet engineering syllabus by entranceindia
 
Topoloical sort
Topoloical sortTopoloical sort
Topoloical sort
 
Graphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programGraphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ program
 
Four data models in GIS
Four data models in GISFour data models in GIS
Four data models in GIS
 
Graphs data structures
Graphs data structuresGraphs data structures
Graphs data structures
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkX
 
Graph 1
Graph 1Graph 1
Graph 1
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 
Graphs, Trees, Paths and Their Representations
Graphs, Trees, Paths and Their RepresentationsGraphs, Trees, Paths and Their Representations
Graphs, Trees, Paths and Their Representations
 
Geospatial Database.pptx
Geospatial Database.pptxGeospatial Database.pptx
Geospatial Database.pptx
 
Lecture co1 math 21-1
Lecture co1 math 21-1Lecture co1 math 21-1
Lecture co1 math 21-1
 
Graphs in datastructures
Graphs in datastructuresGraphs in datastructures
Graphs in datastructures
 
Techniques for graph
Techniques for graphTechniques for graph
Techniques for graph
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
09_Graphs_handout.pdf
09_Graphs_handout.pdf09_Graphs_handout.pdf
09_Graphs_handout.pdf
 

More from Franco Guamán

Abb diferencias entre c++ y java
Abb diferencias entre c++ y javaAbb diferencias entre c++ y java
Abb diferencias entre c++ y java
Franco Guamán
 
Arbol binario de busqueda java
Arbol binario de busqueda   javaArbol binario de busqueda   java
Arbol binario de busqueda java
Franco Guamán
 
03 uni1-estructuras de datos-arreglos 2 d
03 uni1-estructuras de datos-arreglos 2 d03 uni1-estructuras de datos-arreglos 2 d
03 uni1-estructuras de datos-arreglos 2 d
Franco Guamán
 
02 uni1-estructuras de datos-arreglos
02 uni1-estructuras de datos-arreglos02 uni1-estructuras de datos-arreglos
02 uni1-estructuras de datos-arreglos
Franco Guamán
 
01 uni1-estructuras de datos-introduccion a las ed
01 uni1-estructuras de datos-introduccion a las ed01 uni1-estructuras de datos-introduccion a las ed
01 uni1-estructuras de datos-introduccion a las ed
Franco Guamán
 
Uni6 a series
Uni6 a seriesUni6 a series
Uni6 a series
Franco Guamán
 
Programacion Modular
Programacion ModularProgramacion Modular
Programacion Modular
Franco Guamán
 
Uni4 estructuras-selectivas
Uni4 estructuras-selectivasUni4 estructuras-selectivas
Uni4 estructuras-selectivas
Franco Guamán
 
Uni5 estructuras-repetitivas
Uni5 estructuras-repetitivasUni5 estructuras-repetitivas
Uni5 estructuras-repetitivas
Franco Guamán
 
Uni3 estructura-general-de-un-programa-cont
Uni3 estructura-general-de-un-programa-contUni3 estructura-general-de-un-programa-cont
Uni3 estructura-general-de-un-programa-cont
Franco Guamán
 
Estructura General de un Programa
Estructura General de un ProgramaEstructura General de un Programa
Estructura General de un Programa
Franco Guamán
 
Fundamentos de Programación. Unidad I
Fundamentos de Programación. Unidad IFundamentos de Programación. Unidad I
Fundamentos de Programación. Unidad I
Franco Guamán
 

More from Franco Guamán (12)

Abb diferencias entre c++ y java
Abb diferencias entre c++ y javaAbb diferencias entre c++ y java
Abb diferencias entre c++ y java
 
Arbol binario de busqueda java
Arbol binario de busqueda   javaArbol binario de busqueda   java
Arbol binario de busqueda java
 
03 uni1-estructuras de datos-arreglos 2 d
03 uni1-estructuras de datos-arreglos 2 d03 uni1-estructuras de datos-arreglos 2 d
03 uni1-estructuras de datos-arreglos 2 d
 
02 uni1-estructuras de datos-arreglos
02 uni1-estructuras de datos-arreglos02 uni1-estructuras de datos-arreglos
02 uni1-estructuras de datos-arreglos
 
01 uni1-estructuras de datos-introduccion a las ed
01 uni1-estructuras de datos-introduccion a las ed01 uni1-estructuras de datos-introduccion a las ed
01 uni1-estructuras de datos-introduccion a las ed
 
Uni6 a series
Uni6 a seriesUni6 a series
Uni6 a series
 
Programacion Modular
Programacion ModularProgramacion Modular
Programacion Modular
 
Uni4 estructuras-selectivas
Uni4 estructuras-selectivasUni4 estructuras-selectivas
Uni4 estructuras-selectivas
 
Uni5 estructuras-repetitivas
Uni5 estructuras-repetitivasUni5 estructuras-repetitivas
Uni5 estructuras-repetitivas
 
Uni3 estructura-general-de-un-programa-cont
Uni3 estructura-general-de-un-programa-contUni3 estructura-general-de-un-programa-cont
Uni3 estructura-general-de-un-programa-cont
 
Estructura General de un Programa
Estructura General de un ProgramaEstructura General de un Programa
Estructura General de un Programa
 
Fundamentos de Programación. Unidad I
Fundamentos de Programación. Unidad IFundamentos de Programación. Unidad I
Fundamentos de Programación. Unidad I
 

Recently uploaded

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

Estructuras de datos grafos

  • 1. Estructuras de Datos y Algoritmos M.Sc. Franco Guamán Bastidas Universidad Técnica Particular de Loja Departamento de Ciencias de la Computación y Electrónica Sección Departamental de Inteligencia Artificial GRAFOS
  • 2. Estructuras de Datos y Algoritmos - Franco Guamán 2 Contenidos  Definición  Usos  Ejemplos  Tipos  Dirigidos  No dirigidos  Características  Representación (matriz de adyacencia)  Recorrido de un grafo  Anchura  Profundidad
  • 3. Definición Estructuras de Datos y Algoritmos - Franco Guamán 3 La teoría de grafos estudia las propiedades de los grafos, que son colecciones de objetos llamados vértices (o nodos) conectados por líneas llamadas aristas (o arcos) que pueden tener orientación (dirección asignada). Típicamente, un grafo está diseñado por una serie de puntos (los vértices) conectados por líneas (las aristas). Un grafo es una pareja G = (V, A), donde V es un conjunto de puntos, llamados vértices, y A es un conjunto de pares de vértices, llamadas aristas.
  • 4. Definición Estructuras de Datos y Algoritmos - Franco Guamán 4 Un grafo está formado por dos elementos: 1. Vértices (nodos, elementos) Almacenan información 2. Aristas (bordes, arcos, enlaces) Relaciones entre la información de los vértices b e a d c Grafo etiquetado con cinco vértices y seis aristas
  • 5. Uso de grafos Estructuras de Datos y Algoritmos - Franco Guamán 5
  • 6. Grafos ejemplos Estructuras de Datos y Algoritmos - Franco Guamán 6 • Los vértices representan ciudades y almacenan el nombre de la ciudad • Las aristas representan la ruta y la distancia kilométrica entre las ciudades que unen
  • 7. Grafos tipos Estructuras de Datos y Algoritmos - Franco Guamán 7 Tipos básicos de grafos: Dirigidos y no Dirigidos • Grafos Dirigidos.- Los arcos en el grafo tienen una dirección asociada. Cada arista está asociada a un par ordenado (𝑢,𝑣) de vértices • Grafos no Dirigidos.- Los arcos en el grafo no tienen una dirección particular, es decir, son bidireccionales. Sus aristas son pares no ordenados de vértices, el camino del vértice 𝑢 al vértice 𝑣 es el mismo que de 𝑣 a al vértice 𝑢
  • 8. Grafos tipos Estructuras de Datos y Algoritmos - Franco Guamán 8 ¿Qué tipo de grafo representa la siguiente figura? a) Binario b) Dirigido c) No dirigido d) Orientado
  • 9. Grafos tipos Estructuras de Datos y Algoritmos - Franco Guamán 9
  • 10. Grafos características Estructuras de Datos y Algoritmos - Franco Guamán 10
  • 11. Grafos, características Estructuras de Datos y Algoritmos - Franco Guamán 11
  • 12. Grafos, representación Estructuras de Datos y Algoritmos - Franco Guamán 12
  • 13. Grafos, representación Estructuras de Datos y Algoritmos - Franco Guamán 13
  • 14. Grafos, representación Estructuras de Datos y Algoritmos - Franco Guamán 14
  • 15. Grafos, recorridos Estructuras de Datos y Algoritmos - Franco Guamán 15
  • 16. Grafos, recorridos Estructuras de Datos y Algoritmos - Franco Guamán 16
  • 17. Algoritmos para encontrar caminos Estructuras de Datos y Algoritmos - Franco Guamán 17
  • 18. Estructuras de Datos y Algoritmos - Franco Guamán 18 Preguntas