DM-UNIT-6
DM-UNIT-6
Basic concepts
Representation of Graphs
Isomorphism and Sub graphs
Spanning trees
Planar graphs
Multi graphs and Euler Circuits
Hamiltonian graphs
Chromatic number
Basic concepts and notations.
A Graph G is a pair of sets (V, E)
where V = A set of vertices (nodes) and
E = A set of edges (lines)
V(G) = Set of vertices in G.
E(G) = Set of edges in G.
V(G) = Number of vertices in graph G = Order of G.
E(G) = Number of edges in graph G = Size of G .
Types of graphs
Non Directed Graph (Undirected graph): The elements of E
are unordered pairs (sets) of vertices. In this case an edge {u, v} is
said to join u and v or to be between u and v.
Directed Graph: In a digraph the elements of E are ordered pairs
of vertices. In this case an edge (u, v) is said to be from u to v.
Sum of Degrees Theorem: If V = {v1, v2, ….., vn} is the vertex set
of a non directed graph G then
deg (vi) = 2. E
n
iProof:
=1 When the degrees are summed, each edge contributes a
count of one to the degree of each of the two vertices on which
the edge is incident.
Hence, the theorem follows.
Corrollories
Ex. A non directed graph contains 16 edges and all vertices are of
degree 2. Find the number of vertices in G ?
Solution: By Sum of degrees theorem, if degree of each vertex is k,
then
k. V = 2. E
2. V = 2.(16)
V = 16
Example
deg (vi) = 2. E
n
i=1 3.(4) + (n – 3 ). 2 = 2.(21)
n = 18.
Ex.What is the number of vertices in an undirected connected graph
with 27 edges, 6 vertices of degree 2, 3 vertices of degree 4 and
remaining vertices of degree 3?
Solution: Let V = n . By Sum of degrees theorem,
deg (vi) = 2. E
Ex. Let G be a simple graph with n vertices. Then show that the
number of edges in G is less than or equal to {n.(n – 1)} / 2.