A graph G consists of a set V of vertices and a set E of edges such that each edge e Î E is associated with an unordered pair of vertices.
Theorem :
If G is agraph with m edges and n vertices { vi : i = 1,.. n} , then
A graph with no parallel edges or loops.
Graphs G1 and G2 are isomorphic if there is a one-to-one, onto function f from the vertices of G1 to the vertices of G2 and a one-to-one , onto function g from the edges of G1 to the edges of G2 , so that an edge e is incident on v and w in G1 if and only if the edge g(e) is incident on f(v) and f(w) in G2. The pair of functions f and g is called an isomorphism of G1 onto G2.
Theorem : Graphs G1 and G2 are isomorphic if and only if for some ordering of their vertices, their adjacency matrices are equal.
Corollary : For simple graphs G1 and G2, they are isomorphic if and only if there is a one-to-one, onto function f from the vertex set of G1 to the vertex set of G2 satisfying the following: Vertices v and w are adjacent in G1 if and only if the vertices f(v) and f(w) are adjacent in G2.
A graph is planar if it can be drawn in the plane without its edges crossing.
Euler's Formula for Planar Graph
In any simple, connected, planar graph G , we always have e £ 3v - 6
K5 and K3,3 are not planar.
Kuratowski's Theorem : A graph G is planar if and only if G does not contain a subgraph homeomorphic to K5 or K3,3 .
1. procedure dijkstra(w,a,z,L) 2. L(a) := 0 3. for all vertices x ¹ a do 4. L(x) := ¥ 5. T := set of all vertices 6. // T is the set of vertices whose shortest distance from a has 7. // not been found 8. while z Î T do 9. begin 10. choose v Î T with minimum L(v) 11. T := T - {v} 12. for each x Î T adjacent to v do 13. L(x) := min{ L(x), L(v) + w(v,x)} 14. end 15. end dijkstra
For input consisting of n-vertex, simple, connected, weighted graph,
Dijkstra's Algorithm has worst-case run
time Q (n2) .
A cycle (path) in a graph G that includes all of the edges (as a consequence, also includes all the vertices) is called an Euler cycle (path).
The necessary and sufficient condition for a graph G to have a Euler cycle is
The necessary and sufficient condition for a graph G to have a Euler path is
A cycle in a graph G that contains each vertex in G exactly once, except for the starting and ending vertex that appears twice.
A path in a graph G that contains each vertex in G exactly once is called a Hamiltonian path.
There is no well-known necessary and sufficient condition for the exitence of a hamitonian cycle in a given graph G.
More about Hamiltonian circuits
Given a weighted graph G, find a minimum-length Hamiltonain cycle for G.