Está en la página 1de 14

GRAFO

ES UNA CONJUNCIÓN DE NODOS


RELACIONADOS ENTRE SI

LA RELACIOÓN EXISTE POR LA CONEXIÓN


QUE EXISTE ENTRE ELLOS

HAY GRAFOS DIRIGIDOS Y NO DIRIGIDOS


ESTO ES INDICADO POR LAS FLECHAS

LOS PROBLEMAS DE GRAFOS SE UTILIZAN


EN APLICACIONES DE TRANSPORTE
PRINCIPALMENTE
• ¿Existe una conexión entre A e I?
conexion(d,h,4).
conexion(h,f,9).
conexion(i,f,11).
conexion(f,g,10).
conexion(f,a,8).
conexion(a,b,7).
conexion(d,i,5).
conexion(d,h,4).
conexion(h,f,9).
conexion(i,f,11).
conexion(f,g,10).
conexion(f,a,8).
conexion(a,b,7).
conexion(d,i,5).
tieneArista(X):- conexion(X,_,_).
conexion(d,h,4).
conexion(h,f,9).
conexion(i,f,11).
conexion(f,g,10).
conexion(f,a,8).
conexion(a,b,7).
conexion(d,i,5).
tieneArista(X):- conexion(X,_,_).
llegar(Inicio, Destino, Int, Costo):-
conexion(Inicio, Int,C1) ,
conexion(Int, Destino, C2), Costo is
C1+C2.
Ejercicio.
Serie de Gauss
Ejercicio.
Serie de Gauss

También podría gustarte