conceptos basicos en la teoria de grafos

23

Upload: chavo-macias-intriago

Post on 03-Jul-2015

568 views

Category:

Technology


2 download

DESCRIPTION

arboles binarios

TRANSCRIPT

Page 1: Conceptos basicos en la teoria de grafos
Page 2: Conceptos basicos en la teoria de grafos

CONTENIDO

DEFINICION DE GRAFOS

SUBGRAFOS

GRADO DE UN VERTICE

CAMINOS, CICLOS

REPRESENTACION DE LAS GRAFICAS

RUTA MAS CORTA

Page 3: Conceptos basicos en la teoria de grafos

GRAFO

UN GRAFO ES UNA PAREJA DE CONJUNTOS (V, E)

DONDE:

V ES DISTINTO DE VACIO

E ES UN CONJUNTO DE PARES DE V

Page 4: Conceptos basicos en la teoria de grafos

TERMINOLOGIA

BASICA

GRAFOS NO DIRIGIDOS

LOS ELEMENTOS DE (V) SE LLAMAN VERTICES O NODOS.

LOS PARES DE (E) SON NO ORDENADOS, SE LLAMAN ARISTAS

SE REPRESENTAN CON PUNTOS Y LINEAS

Page 5: Conceptos basicos en la teoria de grafos

EJEMPLO

V5

V4

V2

V1

V3

V = {V1,V2,V3,V4,V5}

E =

{(V1,V1),(V1,V2),(V1,V5),(V2,V3),

(V2,V4),(V2,V5),(V3,V4),(V4,V5)}

PARES NO ORDENADOS DE

VERTICES

GRAFO NO DIRIGIDO

Page 6: Conceptos basicos en la teoria de grafos

TERMINOLOGIA

BASICA

GRAFOS DIRIGIDOS

LOS ELEMENTOS DE (V) SE LLAMAN VERTICES O NODOS.

LOS PARES DE (E) SON ORDENADOS, SE LLAMAN ARCOS

SE REPRESENTAN CON PUNTOS Y FLECHAS

Page 7: Conceptos basicos en la teoria de grafos

GRAFO DIRIGIDO

EJEMPLO

V2

V1

V4

V3

V5 V = {V1,V2,V3,V4,V5}

E =

{(V1,V2),(V2,V3),(V3,V1),(V3,V4),

(V4,V3),(V4,V4),(V4,V5),(V5,V1)}

PARES ORDENADOS DE

VERTICES

Page 8: Conceptos basicos en la teoria de grafos

MAS NOTACION

GRAFOS NO DIRIGIDOS

SI (Vi, Vj) REPRESENTAN UNA ARISTA

Vi Y Vj SON EXTREMOS DE (Vi,Vj)

Vi Y Vj SON ADYACENTES

(Vi, Vj) ES INCIDENTE EN Vi Y Vj

SI Vi = Vj, (Vi,Vj) SE LLAMA BUCLE O LAZO

UN GRAFO SIN BUCLES O LAZOS SE LLAMA SIMPLE

Page 9: Conceptos basicos en la teoria de grafos

EJEMPLO

V5

V4

V2

V1

V3

GRAFO NO DIRIGIDO

SI (Vi, Vj) REPRESENTAN UNA ARISTA

Vi Y Vj SON EXTREMOS DE (Vi,Vj)

Vi Y Vj SON ADYACENTES

(Vi, Vj) ES INCIDENTE EN Vi Y Vj

SI Vi = Vj, (Vi,Vj) SE LLAMA BUCLE O

LAZO

UN GRAFO SIN BUCLES O LAZOS SE

LLAMA SIMPLE

Page 10: Conceptos basicos en la teoria de grafos

MAS NOTACION

GRAFOS DIRIGIDOS

SI (Vi, Vj) REPRESENTAN UN ARCO

Vi ES EL EXTREMO INICIAL DE (Vi,Vj)

Vj ES EL EXTREMO FINAL DE (Vi,Vj)

SI Vi = Vj, (Vi,Vj) SE LLAMA BUCLE O LAZO

Page 11: Conceptos basicos en la teoria de grafos

GRAFO DIRIGIDO

EJEMPLO

V2

V1

V4

V3

V5

SI (Vi, Vj) REPRESENTAN UN ARCO

Vi ES EL EXTREMO INICIAL DE (Vi,Vj)

Vj ES EL EXTREMO FINAL DE (Vi,Vj)

SI Vi = Vj, (Vi,Vj) SE LLAMA BUCLE O LAZO

Page 12: Conceptos basicos en la teoria de grafos

MAS NOTACION

GRAFO COMPLETO

ES AQUEL GRAFO CON n VERTICES

EXISTE UNA ARISTA ENTRE CADA PAR DE VERTICES

V4

V2

V1

V3

Page 13: Conceptos basicos en la teoria de grafos

MAS NOTACION

GRAFO DE SIMILITUD O SUBGRAFO

SON AQUELLOS GRAFOS DE LOS QUE SE PUEDEN DERIVAR

SUBGRAFOS

V4

V2

V1

V3

V4

V3

V2

Page 14: Conceptos basicos en la teoria de grafos

GRADO DE UN VERTICE

V1 = 2 V6 = 0

V2 = 3 V7 = 2

V3 = 4

V4 = 3

V5 = 2

V4

V2

V1

V3

V5

EL GRADO DE UN VERTICE

COMPRENDEN AL NUMERO DE ARISTAS QUE

INCIDEN EN EL VERTICE

V6 V7

Page 15: Conceptos basicos en la teoria de grafos

CAMINO O

TRAYECTORIA

ES EL RECORRIDO DESDE UN Vo HASTA UN Vn

V4

V2

V1

V3

V5

V6

V1,V2,V3,V4,V5,V6

V1,V3,V2,V4,V5,V6

V1,V2,V3,V5,V4,V6

Page 16: Conceptos basicos en la teoria de grafos

CICLOS

CICLO DE EULER

CICLO DE HAMILTON

Page 17: Conceptos basicos en la teoria de grafos

CICLOS

CICLO DE EULER

RECORRE TODAS LAS ARISTAS DEL GRAFO SIN

REPETIRLAS

V4

V2

V1

V3

V5

V6

V1,V2,V3,V4,V2,V5,V4,V6,V5,V3,V1

Page 18: Conceptos basicos en la teoria de grafos

CICLOS

CICLO DE HAMILTON

RECORRER TODOS LOS VERTICES SIN

REPETIRLOS EXCEPTO EL Vi y EL Vf QUE SON EL

MISMO

V4

V2

V1

V3

V5

V6

V1,V2,V4,V6,V5,V3,V1

V1,V2,V5,V6,V4,V4,V3,V1

Page 19: Conceptos basicos en la teoria de grafos

TERMINOLOGIA

BASICA

REPRESENTACION DE GRAFICAS

MATRIZ DE ADYACENCIA

MATRIZ DE INCIDENCIA

Page 20: Conceptos basicos en la teoria de grafos

TERMINOLOGIA

BASICA

MATRIZ DE ADYACENCIA

V2

V1

V3

V1 V2 V3

V

1 2 1 1V

2 1 0 2

V

3 1 2 0

Page 21: Conceptos basicos en la teoria de grafos

TERMINOLOGIA

BASICA

MATRIZ DE INCIDENCIA

V1

V2

V3

e1

e3e2

e4

e5

e1 e2 e3 e4 e5

V1 1 1 1 0 0

V2 1 0 0 1 0

V3 0 1 1 1 1

Page 22: Conceptos basicos en la teoria de grafos

RUTA MAS CORTA

LOS MÉTODOS QUE VAMOS A VER SON:

ALGORITMO DE DIJKSTRA

ALGORITMO DE FLOYD-WARSHALL

Page 23: Conceptos basicos en la teoria de grafos