You are on page 1of 5

ADVANCE DISCRETE MATHEMATICS AND STRUCTURE (6ADMS)

Module Title: Graph Models Page 1 of 5


Faculty: Week 9 Midterm Period

Learning Outcome(s):
a. Enlist the various types of graphs
b. Understand information in graphs by getting various inputs with specific object
c. Recognize the complex graphs and understand the intricacy of information or complexity of problem

Graph Models
- Graph is also one of the forms of symbolic representation of descriptive data in terms of points
(verticals) and line segments (edges).
- It is widely used in many fields like Electrical Engineering, telecommunication, genetics, computer
science etc.
- A graph is simply a collection of finite points (called vertices) and line segments (called edges) in which
each edge is assigned to pair of points called end vertices or terminal (not necessarily distinct).
Informally, a graph is a bunch of dots connected by lines. Here is an example of a graph:
Example:

Formally, a graph is a pair of sets (V, E), where:


• V is a non-empty set whose elements are called vertices.
• E is a collection of two-element subsets of V called edges.
The vertices correspond to the dots in the picture, and the edges correspond to the lines.
Thus, the dots-and-lines diagram above is a pictorial representation of the graph (V, E) where:
V = {A, B, C, D, E, F, G, H, I}
E = {{A, B}, {A, C}, {B, D}, {C, D}, {C, E}, {E, F}, {E, G}, {H, I}}.

Terminologies in Graph
- Graph: A graph G is an ordered pair (V,E) where V is the non-empty set of vertices and E is the set of
edges in
which each element of E is assigned to a unique unordered pair of elements (not
necessarily distinct) of V. An element of a set E is generally denoted as e – (u, v) or e =
(v, u) where u, v ∈ V. Here u, v are called end vertices of edge e.
Example:

1|Page
AY 2020-2021
ADVANCE DISCRETE MATHEMATICS AND STRUCTURE (6ADMS)
Module Title: Graph Models Page 2 of 5
Faculty: Week 9 Midterm Period

- Loop: If both the end vertices of an edge are same then the edge is called a loop.

- Parallel edges: If two or more edges have same terminal vertices, then these edges are called as
parallel edges.
- Simple graph: A graph without loops and parallel edges is called simple graph.

- Compound graph: A graph which contains loops or parallel edges is called compound graph or
multigraph.

2|Page
AY 2020-2021
ADVANCE DISCRETE MATHEMATICS AND STRUCTURE (6ADMS)
Module Title: Graph Models Page 3 of 5
Faculty: Week 9 Midterm Period

Degree of a vertex: The number of edges incident on a vertex v is called degree of vertex v,
with loop being counted twice.
Notation: Degree of v = d (v)
Example:

- Isolated vertex: A vertex with degree zero is called as isolated vertex.

- Pendent vertex: A vertex with degree one is called as pendent vertex.

Representation of Graph
Graph can be represented in following methods:

Directed Graph Undirected Graph

A graph with directed edges is called A graph with no directed edges is


a directed graph. Since the edges called an undirected graph. Here,
are directed, you can traverse the you can traverse the edges both
edge only from one vertex to ways between two vertices.
another, but not the other way
around.

3|Page
AY 2020-2021
ADVANCE DISCRETE MATHEMATICS AND STRUCTURE (6ADMS)
Module Title: Graph Models Page 4 of 5
Faculty: Week 9 Midterm Period

- Ordered pair representation


o A graph G can be represented in ordered pair (V, E) where V is non-empty set of vertices and E is set of
edges.
Example:

- Structure representation
o A graph can be represented by structure with points and lines each line has two end points.
Example:

- Matrix representation (i. Adjacency, ii. Incidence)


o Depending on adjacency of vertices and incidence of an edge, a graph can be represented
in two types of matrices:
▪ Adjacency matrix: If G is a graph on n vertices say v1, v2, v3, .... vn then
adjacency matrix of G is the n× n matrix A(G) = [aij] n x n
Where, aij =number of edges between vi and vj

Example:
Possible paths; Adjacency Matrix
P→ Q, Q→P P Q R S T
P→ R, R→P, P→ T, T→P P 0 1 1 0 1
R→ T, T→R, R→ S, S→R Q 1 0 0 0 0
S→ T, T→S, P→ T, T→P R 1 0 0 1 1
S 0 0 1 0 1
T 1 0 1 1 0

Example:
Adjacency Matrix
P Q R S T
P 0 1 0 0 1
Q 0 0 0 0 0
R 1 0 0 1 0
S 0 0 0 0 0
T 0 0 1 1 0

4|Page
AY 2020-2021
ADVANCE DISCRETE MATHEMATICS AND STRUCTURE (6ADMS)
Module Title: Graph Models Page 5 of 5
Faculty: Week 9 Midterm Period

▪ Incidence matrix: Let G be a graph in structural form with n vertices v1, v2 ...vn
and m edges e1, e2, ...em then the incidence matrix of G denoted by I(G) is, I(G) =
= [aij] n x n
Where:
aij = 0 if vi is not incident with ej
1 if vi is incident with ej
2 if ej is loop
Example:
Incidence Matrix
e1 e2 e3 e4 e5
V1 1 1 0 0 1
V2 1 1 2 1 0
V3 0 0 0 1 1

Observations for incidence matrix for undirected graph


• Any column’s sum must be 2.
• If two columns are identical, then the corresponding edges are parallel edges.
• If a row contains only zero’s then the corresponding vertex must be an isolated vertex.
• If a row contains a single ‘1’ the corresponding vertex must be pendent vertex.
• If an edge is a loop there will be a single ‘2’ in the column remaining entries being zero’s.

5|Page
AY 2020-2021

You might also like