Graph
●A graph is a pictorial representation of a set of
objects.
● A graph is a collection of vertices and edges.
●A graph G is represented asG = ( V , E ), where V
is set of vertices and E is set of edges.
●Vertex: An individual data element of a graph is
called as Vertex.
Example − Let us consider, a Graph is G=(V,E) where V={a,b,c,d} and E={{a,b},{a,c},{b,c},{c
Terms related to graph
●End vertices: Two vertices u and v are said to be
end vertices of an edge (u,v) in a graph G=(V,E).
●Incidence : a vertex is an incident to an edge if
the vertex is one of the end vertices of the edge.
●Adjacent edge: edges are adjacent if the edges
share a common end vertex.
● Adjacent vertices: two vertices which are joined
Simple and multi graph
● Simple graph
●A graph is simple if it has no parallel edges and
loops
●Multi graph:A graph with multiple edges(parallel
edges) between the same set of vertices
Null graph
● A graph G(V,E) with no edges is a null graph.
Directed and undirected graph
●Directed Graphs A directed graph is a set of
vertices (nodes) connected by edges, with each
node having a direction associated with it.
●Edges are usually represented by arrows pointing
in the direction the graph can be traversed.
●Undirected Graphs:In an undirected graph the
edges are bidirectional, with no direction
associated with them.
●Hence, the graph can be traversed in either
direction.
Sub graph
● Sub graph
●A graph H=(V1,E1) is said to be a sub graph of
graph G=(V,E), if V1 is the subset of V and E1 is
the subset of E.
Connected & disconnected graph
●A graph is said to be connected if there is a path
between every pair of vertex. From every vertex to
any other vertex, there should be some path to
traverse.
●A graph G is said to be disconnected if there exist
at least two nodes in G such that no path in G has
those nodes as end points.
● Complete Graph
●A graph G is said to be complete if every vertex in
G is connected to every other vertex in G. Thus a
complete graph G must be connected. The
complete graph with n vertices is denoted by Kn.
● Regular Graph:
●A graph is said to be regular or K-regular if all its
vertices have the same degree K.
●A graph whose all vertices have degree 2 is
known as a 2-regular graph.
● A complete graph Kn is a regular of degree n-1.
● Bipartite Graph
●If the vertex-set of a graph G can be split into two
disjoint sets, V1 and V2, in such a way that each
edge in the graph joins a vertex in V1 to a vertex
in V2, and there are no edges in G that connect
two vertices in V1 or two vertices in V2, then the
graph G is called a bipartite graph.
● Complete Bipartite Graph
●A complete bipartite graph is a bipartite graph in
which each vertex in the first set is joined to every
single vertex in the second set.
●The complete bipartite graph is denoted by Kx,y
where the graph G contains x vertices in the first
set and y vertices in the second set.
● Planar Graphs
●A graph ‘G’ is said to be planar if it can be drawn
on a plane so that no two edges cross each other.
● Isomorphic Graph
●If two graphs G and H contain the same number
of vertices connected in the same way, they are
called isomorphic graphs .
●Any two graphs will be known as isomorphism if
they satisfy the following four conditions:
●There will be an equal number of vertices in the
given graphs.
●There will be an equal number of edges in the
given graphs.
● eg.
● Graph coloring
●Graph coloring can be described as a process of
assigning colors to the vertices of a graph.
● In this, the same color should not be used to fill
the two adjacent vertices.
● Chromatic number
●the chromatic number can be described as a
minimum number of colors that are needed to
color any graph in such a way that no two
adjacent vertices of a graph will be assigned the
●A graph G having chromatic number
gamma(G)=k is called a k-chromatic graph
● eg.
●Walk: A walk is defined as a finite alternating
sequence of vertices and edges, beginning and
ending with vertices, such that each edge is
incident with the vertices preceding and following
it.
● The length of a walk is the number of edges in it.
● So for a walk,
● Edges can be repeated
● Vertex can be repeated
●Path:A path is a type of open walk where neither
edges nor vertices are allowed to repeat.
●There is a possibility that only the starting vertex
and ending vertex are the same in a path.
●Circuit: A circuit is a sequence of adjacent nodes
starting and ending at the same node.
● Circuits never repeat edges.
●However, they allow repetitions of nodes in the
sequence.