0% found this document useful (0 votes)
150 views27 pages

Principles of Mathematics and Biostatistics: PT02CBIC02 (Unit - I)

This document contains lecture notes on principles of mathematics and biostatistics. It covers topics on matrices including definitions of matrices, operations on matrices such as transpose and addition, matrix multiplication, determinants, inverses of matrices, and exercises. It also covers topics in graph theory including definitions of graphs and their components, paths and circuits in graphs, trees, matrix representations of graphs, and directed graphs. The document is authored by Dr. Jay Mehta from the Department of Mathematics at Sardar Patel University.

Uploaded by

dinesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views27 pages

Principles of Mathematics and Biostatistics: PT02CBIC02 (Unit - I)

This document contains lecture notes on principles of mathematics and biostatistics. It covers topics on matrices including definitions of matrices, operations on matrices such as transpose and addition, matrix multiplication, determinants, inverses of matrices, and exercises. It also covers topics in graph theory including definitions of graphs and their components, paths and circuits in graphs, trees, matrix representations of graphs, and directed graphs. The document is authored by Dr. Jay Mehta from the Department of Mathematics at Sardar Patel University.

Uploaded by

dinesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Principles of Mathematics and Biostatistics

PT02CBIC02 (Unit - I)

Dr. Jay Mehta


jay_mehta@spuvvn.edu
Department of Mathematics,
Sardar Patel University.

February 6, 2018
Contents

1 Matrices 5
1.1 Definition of a Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Some special matrices . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Operation on matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 Transpose and Addition of matrices . . . . . . . . . . . . . . . . . . 6
1.2.2 Multiplication of matrices . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Adjoint of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.2 Inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Graph Theory 13
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.1 Graph and its components . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.2 Incidence and Degree . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.3 Isolated vertex, Pendant vertex, Null Graph . . . . . . . . . . . . . 15
2.2 Paths and Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.1 Walks, Paths and Circuits . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.2 Connected Graphs, Disconnected Graphs and Components . . . . . 17
2.2.3 Euler Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.4 Hamiltonian Paths and Circuits . . . . . . . . . . . . . . . . . . . . 18
2.3 Trees and Fundamental Circuits . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3.1 Trees and its properties . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3.2 Distance and Centers in a Tree . . . . . . . . . . . . . . . . . . . . 20
2.3.3 Spanning Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.4 Fundamental Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4 Matrix representation of Graphs . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.1 Incidence matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.2 Circuit Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.3 Adjacency matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.5 Directed Graphs or Digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.5.1 Some types of Digraphs . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.2 Directed Paths and Connectedness . . . . . . . . . . . . . . . . . . 26
2.5.3 Matrices of digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3
Chapter
1
Matrices

1.1 Definition of a Matrix


Definition 1.1.1 (Matrix). A rectangular array of numbers is called a matrix.
The horizontal arrays of a matrix are called its rows and the vertical arrays are called
its columns.
Definition 1.1.2 (Order of a matrix). A matrix having m rows and n columns is said to
have the order m × n.
A matrix A of order m × n can be represented in the following form:
···
 
a11 a12 a1n
 a21

a22 ··· a2n 

A=
 .. .. .. ..  ,
 . . . . 

am1 am2 · · · amn m×n

where aij is the entry at the intersection of the ith row and j th column of the matrix A.
In more concise manner, we also denote the matrix A by A = (aij ) thereby suppressing
the order of A or (aij )m×n by specifying its order
A matrix having only one column is called a column matrix or simply a column vector.
Similarly, A matrix having only one row is called a row matrix or simply a row vector.
Definition 1.1.3 (Equality of two matrices). Two matrices A = (aij ) and B = (bij ) are
said to be equal if they have the same order m × n and if aij = bij for all i = 1, 2, . . . , m
and j = 1, 2, . . . , n.

1.1.1 Some special matrices


Definition 1.1.4. 1. A matrix in which each entry is zero is called a zero-matrix. It is
denoted by 0. For example,
" # " #
0 0 0 0 0
02×2 = , 02×3 = .
0 0 0 0 0

5
6 §1.2. Operation on matrices

2. A matrix having equal number of rows and columns is called a square matrix. Thus,
order of a square matrix is n × n, represented by n only. For example,
" #
2 3
A=
5 −4

is a square matrix of order 2.

3. In a square matrix A = (aij ) of order n, the entries a11 , a22 , . . . , ann are called
diagonal entries of A and they form principal diagonal of the matrix A.
(
1 if i = j
4. A square matrix A = (aij ) of order n in which aij = is called the
0 6 j
if i =
identity matrix and is denoted by In . For example,
 
" # 1 0 0
1 0
I2 = , I3 = 0 1 0 .
 
0 1
0 0 1

1.2 Operation on matrices


1.2.1 Transpose and Addition of matrices
Definition 1.2.1 (Transpose of a matrix). Let A = (aij ) be a matrix of order m × n.
The transpose of A is denoted by A0 or AT which is a n × m matrix obtained from A by
interchanging its rows and columns.
Thus, if A = (aij ) then A0 = (aji ). For example,
 
" # 1 0
1 4 5
If A = , then A0 = 4 1 .
 
0 1 2 2×3
5 2 3×2

Theorem 1.2.2. For any matrix A, we have (A0 )0 = A.


In other words, transpose of transpose of a matrix A is A itself, i.e. taking transpose
of A twice gives back the matrix A.
Proof. Let A = (aij ). If A0 = (bij ) then by definition of transpose, bij = aji . Now, if
(A0 )0 = (cij ), then
cij = bji = aij .
Thus, (A0 )0 = A. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Definition 1.2.3 (Addition of matrices). Let A = (aij ) and B = (bij ) be two matrices
of order m × n. Then the sum of A and B is denoted by A + B is the matrix C = (cij ),
where cij is given by
cij = aij + bij .
Thus, the addition of two matrices is defined as entry-wise.
Note: Note that, we can define the sum of two matrices only if the order of the two
matrices are same.
h i h i h i
Example 1.2.4. 1. 1 3 + −10 4 = −9 7 .

PT02CBIC02 (Unit-1) 2016-17


§1.2. Operation on matrices 7

! ! !
2 8 9 0 11 8
2. + = .
4 −3 −2 6 2 3

Definition 1.2.5 (Multiplication by a scalar). Let A = (aij ) be a m × n matrix. Then


for any real number k ∈ R, we define kA = (kaij ). For example, for k = 5, if
" # " #
1 4 5 5 20 25
A= , then 5A = .
0 1 2 0 5 10

1.2.2 Multiplication of matrices


Definition 1.2.6. Let A = (aij ) be a m × n matrix and B = (bij ) be a n × r matrix.
Then the product AB is a matrix C = (cij ), where
n
X
cij = aik bkj = ai1 b1j + ai2 b2j + · · · + ain bnj .
k=1

Note: Observe that the matrix multiplication AB is defined if only if


Number of Columns of A = Number of Rows of B
Similarly, the matrix multiplication BA is defined if only if
Number of Columns of B = Number of Rows of A
Example 1.2.7. For example, let
 
" # 1 2 1
1 2 3
A= and B = 0 0 3 .
 
2 4 1
1 0 4

Here, the matrix A is of order 2 × 3 and B is a 3 × 3 matrix. Hence, the matrix product
AB is defined and AB will be a 2 × 3 matrix. However, the matrix product BA is not
possible as the number of columns of B are 3 and number of rows of A are 2, not being
same. Now, " # " #
1 + 0 + 2 2 + 0 + 0 1 + 6 + 12 4 2 19
AB = = .
2 + 0 + 1 4 + 0 + 0 2 + 12 + 4 3 4 18
Definition 1.2.8. Two square matrices A and B are said to commute if AB = BA.
Remark 1.2.9. 1. If A is a square matrix of order n, then In A = A = AIn , where In
is the n × n identity matrix defined earlier.

2. In general matrix multiplication is not commutative, i.e. AB = BA is not true,


in general, for all square matrices A and B. For example, consider the two 2 × 2
matrices " # " #
1 1 1 0
A= and B = .
0 0 1 0
Check that the matrix product
" # " #
2 0 1 1
AB = 6= BA = .
0 0 1 1

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


8 §1.3. Determinant

1.3 Determinant
Notation: For a n × n matrix A, we denote the submatrix of A obtained by deleting ith
row and j th column by A(i|j).
 
1 2 3
Example 1.3.1. Consider the matrix A = 1 3 2. Then
 

2 4 7
   
1 2 3 " # 1 2 3 " #
1 2 1 3
A(1|2) = 1 3 2 = , A(1|3) = 1 3 2 = ,
   
2 7 2 4
2 4 7 2 4 7
whereas,
   
1 2 3 " # 1 2 3 " #
1 3 1 3
A(2|2) = 1 3 2 = , A(2|3) = 1 3 2 = .
   
2 7 1 2
2 4 7 2 4 7
Definition 1.3.2 (Determinant of a square matrix). Let A be a square matrix of order
n × n. With A we associate a number, called the determinant of A, denoted by det(A) or
|A| and defined inductively as
n
(−1)1+j a1j det(A(1|j)).
X
det(A) =
j=1

Note that determinant can be defined for any i instead of 1, i.e. for any fixed row i,
we have n
(−1)i+j aij det(A(i|j)).
X
det(A) =
j=1

Notation: For a square matrix A of order n, let Cij = det(A(i|j)), that is, Cij is the
determinant of the submatrix of A obtained by deleting the ith row and j th column.

Example 1.3.3.
" #
a a
1. For a 2 × 2 matrix A = 11 12 , its determinant is given by
a21 a22

a a12
11
det(A) or |A| = = a11 a22 − a12 a21 = a11 C11 − a12 C12 .
a21 a22

 
a11 a12 a13
2. For a 3 × 3 matrix A = a21 a22 a23 , its determinant is given by
 

a31 a32 a33



a a12 a13
11
det(A) or |A| = a21 a22 a23


a31 a32 a33
= a11 C11 − a12 C12 + a13 C13

a a23 a
21 a23
a
21 a22

= a11 22 − a12 + a13
a32 a33 a31 a33 a31 a32

= a11 (a22 a33 − a23 a32 ) − a12 (a21 a33 − a23 a31 ) + a13 (a21 a32 − a22 a31 ).

PT02CBIC02 (Unit-1) 2016-17


§1.4. Inverse of a matrix 9

 
1 2 3
Example 1.3.4. Consider the matrix A = 2 3 1 . Then determinant of A is given by
 

1 2 2

3 1 2 1 2 3
det(A) = 1 − 2 + 3

2 2 1 2 1 2

= 1(6 − 2) − 2(4 − 1) + 3(4 − 3)


= 4 − 6 + 3 = 1.

Notation: Aij = (−1)i+j Cij = (−1)i+j det(A(i|j)).


Thus, Aij is (−1)i+j times the determinant of the submatrix of A obtained by deleting
the ith row and j th column from A.

1.4 Inverse of a matrix


1.4.1 Adjoint of a matrix
Definition 1.4.1 (Adjoint of a matrix). Let A be a n × n matrix. Then the adjoint of A
is an n × n matrix denoted by Adj(A) and defined as the transpose of the matrix (Aij ),
i.e. Adj(A) = (Aji ).
Thus, for a 3 × 3 matrix A = (aij ), Adj(A) is the transpose of the following matrix:
 
A11 A12 A13
A21 A22 A23  .
 

A31 A32 A33


 
1 2 3
Example 1.4.2. Consider the matrix A = 2 3 1

 . Then to find Adj(A) first we
1 2 2
compute the following matrix.
 
A11 A12 A13
A21 A22 A23  .
 

A31 A32 A33



3 1 2 1
1+1 1+2
Now, A11 = (−1) = 6 − 2 = 4, A12 = (−1) = −1(4 − 1) = −3,

2 2 1 2


2 3 2 3
A13 = (−1)1+3 = 4 − 3 = 1, A21 = (−1)2+1 = −1(4 − 6) = −1(−2) = 2 and so

1 2 2 2
on . . ..    
A11 A12 A13 4 −3 1
Then the matrix A21 A22 A23  =  2 −1
  
0. Hence, the adjoint of A is the
A31 A32 A33 −7 5 −1
transponse of this matrix and is given by
 
4 2 −7
Adj(A) = −3 −1 5 

.
1 0 −1

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


10 §1.5. Exercises

1.4.2 Inverse of a matrix


Definition 1.4.3 (Inverse of a matrix). Let A be a n × n matrix. If det(A) 6= 0 then
inverse of A is defined. It is denote by A−1 and defined as
1 Adj(A)
A−1 = Adj(A) or .
det(A) |A|
Remark 1.4.4. If A is an n × n matrix which is invertible, then
AA−1 = In = A−1 A,
where In is the identity matrix of order n.
 
1 −1 0
Example 1.4.5. Let A = 0 1 1 . Check whether it is possible to find the inverse of
 

1 2 1
−1
A. If yes, then compute A .
Solution. (Exercise) Check that det(A) = −2 which is non-zero. Hence, A−1 exists, or in
other words, matrix A is invertible. Also, compute the adjoint of A. Check that
 
−1 1 −1
Adj(A) =  1

1 −1.
−1 −3 1
Then by above formula, check that,
1
− 12 12
   
−1 1 −1
1  21
A−1 =−  1 1 −1 = − 2 − 21 12  .

2 1 3 1
−1 −3 1 2 2
−2

1.5 Exercises
" # " # " #
1 2 −1 2 2 0 1
Exercise 1.5.1. Let A = ,B= ,C= . Do the following:
0 3 3 4 1 2 4
1. Compute A + B.
2. Find A0 , B 0 and C 0 , i.e. compute the transposes of matrices A, B and C.
3. Compute 4A − 2B.
4. C + C 0 is defined. (True or False). If True, then find C + C 0 . If False, then state
the reason.
5. A + C is defined. (True or False). If True, then find A + C. If False, then state the
reason.
6. Show that A and B do not commute. That is, compute AB and BA and show that
AB 6= BA.
   
h i 1 3 2 1 0
Exercise 1.5.2. Let A = 1 2 0 , B = 2 0, C =  0 1 −1. Compute the
   

0 1 −1 0 2
following product of matrices, if possible:

PT02CBIC02 (Unit-1) 2016-17


§1.5. Exercises 11

1. CB, A0 B and AB.

2. B 0 CA and BCA.
 
1 3 2
Exercise 1.5.3. Let A = −1 0 2 

. Compute Adj(A) and hence show that
3 1 −1

A · Adj(A) = 11 I3 .

Exercise 1.5.4. Find determinants of the following matrices.


 
! 2 −1 0
4 −2
A= and B = 0 3 −2 .
 
1 −3
1 0 1

Exercise 1.5.5. Check in the following cases, whether the matrices are invertible or not.
If yes, then compute their inverse.
!
2 7
1. A =
1 4
!
1 1
2. B =
1 1
 
−1 −3 1
 3
3. C =  6 0 .
1 0 1
! !
−1 − 13 2 1
Exercise 1.5.6. Show that is the inverse of the matrix A = .
−1 − 23 3 −3

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


Chapter
2
Graph Theory

2.1 Introduction
2.1.1 Graph and its components
Definition 2.1.1 (Graph). A graph G = (V, E) consists of a set of objects {v1 , v2 , . . .}
called vertices, and another set E = {e1 , e2 , . . .}, whose elements are called edges, such
that each edge ek is associated with an unordered pair of vertices (vi , vj ).
The vertices vi and vj associated with edge ek are called its end vertices.

e1

v1
b
e3 v2 b

b
v5
e5 e4 e2

e7
b b

v3 e6 v4

Figure 2.1: Graph with five vertices and seven edges

Definition 2.1.2 (Self-loop). An edge having the same vertex as both its end-vertices
is called a self-loop. Thus, an edge associated with the pair of vertices (vi , vi ) is called a
self-loop.

In Figure 2.1, the edge e1 is a self-loop having both its end-vertices as v2 .

13
14 §2.1. Introduction

Definition 2.1.3 (Parallel edges). If two edges have the same pair of end-vertices then
they are called parallel edges.

For example, in Figure 2.1, the edge e4 and e5 are parallel edges having end-vertices as
v1 and v3 .

Definition 2.1.4 (Simple graph). A graph that has neither parallel edges nor self loops
is called a simple graph.

2.1.2 Incidence and Degree


Definition 2.1.5. If a vertex vi is an end vertex of some edge ej , we say that vi is incident
on ej or ej is incident on vi , i.e. vi and ej are incident on each other.

Definition 2.1.6 (Adjacent edges). Two non-parallel edges are said to be adjacent if they
are incident on a common vertex.

Definition 2.1.7 (Adjacent vertices). Two vertices are said to be adjacent if they are the
end vertices of the same edge.

Definition 2.1.8 (Degree of a vertex). The number of edges incident on a vertex vi with
self-loops counted twice, is called the degree of the vertex vi . It is denoted by d(vi ).
For example, in Figure 2.1, d(v1 ) = d(v3 ) = d(v4 ) = 3, d(v2 ) = 4 and d(v5 ) = 1.

Remark 2.1.9. Let G be a graph with e edges and n vertices, v1 , v2 , . . . , vn . Since each
edge contributes two degrees, the sum of the degrees of all the vertices in G is twice the
number of edges in G, i.e. 2e. Thus,
n
X
d(vi ) = 2e. (2.1)
i=1

Theorem 2.1.10. The number of vertices of odd degree in a graph is always even.

Proof. Let us consider the vertices with odd and even degrees separately. Then the sum
in left hand side of equation 2.1 can be written as a sum of two sums, where each sum is
taken over the vertices of even and odd degrees, respectively, as follows:
n
X X X
d(vi ) = d(vi ) + d(vi ). (2.2)
i=1 even odd

The left hand side of above equation is 2e which is even number. The first sum on right
hand side of above equation is also even (being the sum of all even numbers). Hence, the
second sum in right hand side of above equation must also be even:
X
d(vi ) = an even number.
odd


Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

PT02CBIC02 (Unit-1) 2016-17


§2.2. Paths and Circuits 15

2.1.3 Isolated vertex, Pendant vertex, Null Graph


Definition 2.1.11 (Isolated vertex). A vertex having no incident edge is called an isolated
vertex. In other words, a vertex with 0 degree is called an isolated vertex.

Definition 2.1.12 (Pendant vertex). A vertex of degree one is called a pendant vertex.
For example, in Figure 2.1, v5 is a pendant vertex as d(v5 ) = 1.

Definition 2.1.13 (Null graph). A graph without edges is called a null graph. That is, a
graph G = (V, E) in which the set E is empty is called a null graph.
Note that, in null graph every vertex is isolated.

b v1

b v2 b v3 b v4 b v5

b v6

Figure 2.2: Null graph with six vertices

2.2 Paths and Circuits


2.2.1 Walks, Paths and Circuits

b v1 b v1

c g
a a
b b b b
v3 b v2 v3 b v2

d e f d

b b b b
v4 h v5 v4 v5

(a) An Open Walk (b) A Path of Length Three

Figure 2.3: A walk and a path

Definition 2.2.1 (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 and no edge appears (or is covered) more than once.

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


16 §2.2. Paths and Circuits

A vertex, however, may appear more than once in a walk. For example, in Figure 2.3(a),

v1 a v 2 b v 3 c v 3 d v 4 e v 2 f v 5

is a walk shown with heavy (dark) lines. A walk is also called edge train or a chain.
Vertices with which a walk begins and ends are called its terminal vertices. Here, v1
and v5 are the terminal vertices for the walk shown above.

Definition 2.2.2 (Closed walk). A walk that begins and ends at the same vertex is called
a closed walk. A walk which is not closed is called an open walk.

Definition 2.2.3 (Path). An open walk in which no vertex appears more than once is
called a path.
For example, in Figure 2.3,
v1 a v 2 b v 3 d v 4

is a path, whereas
v1 a v2 b v3 d v4 e v2 f v5

is an open walk but not a path (as v2 is repeated in the walk). In other words, a path
does not intersect itself.

Definition 2.2.4 (Length of a path). The number of edges appearing in a path is called
the length of the path. The path given in the above example has length 3.
Thus, it follows that, a single edge which is not a self-loop is a path of length 1.

The terminal vertices of a path are of degree one, whereas the rest of the vertices called
the intermediate vertices are of degree two. This degree is counted only with respect to
the edges included in the path and not the entire graph in which the path is contained.

Definition 2.2.5 (Circuit or Cycle). A closed walk in which no vertex (except the initial
and the final vertex) appears more than once is called the circuit. That is, a circuit is a
closed and non-intersecting walk. A circuit sometimes is also called a cycle.
For example, in Figure 2.3, v2 b v3 d v4 e v2 is a circuit. Clearly, every vertex is a
circuit is of degree 2.

b b

b
b

b
b

Figure 2.4: Three different circuits

PT02CBIC02 (Unit-1) 2016-17


§2.2. Paths and Circuits 17

2.2.2 Connected Graphs, Disconnected Graphs and Components


Informally speaking, a graph is connected if we can reach any vertex from any other vertex
by traveling along the edges. More precisely:
Definition 2.2.6 (Connected and disconnected graph). A graph G is said to be connected
if there is at least one path between every pair of vertices in G. A graph which is not
connected is called a disconnected graph.
For example, the graphs figures 2.1 and 2.3 are connected, where the one in Figure 2.5
is a disconnected graph.
Clearly, a null graph with more than one vertex is a disconnected graph.
Definition 2.2.7 (Components). A disconnected graph consists of two or more connected
graphs. Each of this connected subgraphs or connected parts is called a component.
Figure 2.5 is a disconnected graph with two components.

b b
b

b
b

b
b b

v1

Figure 2.5: A disconnected graph with two components

Theorem 2.2.8. A graph G is disconnected if and only if its vertex set V can be partitioned
into two nonempty, disjoint subsets V1 and V2 such that there exists no edge in G whose
one end vertex is in V1 and other in V2 .
Theorem 2.2.9. If a graph (connected or disconnected) has exactly two vertices of odd
degree, there must be a path joining these two vertices.

2.2.3 Euler Graphs


Definition 2.2.10 (Euler Graph). A closed walk which passes through (or covering) every
edge of a graph G exactly once is called an Euler line. In other words, a closed walk
containing all the edges of a graph is called an Euler line.
A graph that consists of an Euler line is called an Euler graph.
Note that vertex repetition is allowed in an Euler line. An Euler graph is always
connected, except if the graph has some isolated vertices. The following result, enables us
to tell immediately that whether a given graph is an Euler graph or not:
Theorem 2.2.11. A given connected graph G is an Euler graph if and only if all the
vertices of G are of even degree.
Theorem 2.2.12. A connected graph G is an Euler graph if and only if it can be decom-
posed into circuits.

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


18 §2.3. Trees and Fundamental Circuits

2.2.4 Hamiltonian Paths and Circuits


Definition 2.2.13 (Hamiltonian circuit). A closed walk in a connected graph G that
traverses every vertex of G vertex exactly once, except the starting vertex at which walk
also terminates, is called a Hamiltonian circuit or a Hamiltonian cycle.
In other words, a circuit in a connected graph G is said to be Hamiltonian if it includes
every vertex of G. Hence, a Hamiltonian circuit in a graph with n vertices contains n
edges.

b b

b b

b b

b b
b

b b

b b
b b

b b

Figure 2.6: Hamiltonian circuits

Definition 2.2.14 (Hamiltonian path). If we remove any one edge from a Hamiltonian
circuit, we are left with a path which is called a Hamiltonian path. Clearly, a Hamiltonian
path in a graph G traverses every vertex of G.
Definition 2.2.15 (Complete Graph). A simple graph in which there exists an edge
between every pair of vertices is called a complete graph. Complete graphs with two, three
and four vertices are shown in the following figure 2.7.

b b b

b b b b

Figure 2.7: Compete graphs with two, three and four vertices

Since every vertex is joined with every other vertex through one edge, the degree of
every vertex is n − 1 in a complete graph G with n vertices. Hence, the total number of
n(n − 1)
edges in G is .
2

2.3 Trees and Fundamental Circuits


2.3.1 Trees and its properties
Definition 2.3.1 (Tree). A tree is a connected graph without any circuits.

PT02CBIC02 (Unit-1) 2016-17


§2.3. Trees and Fundamental Circuits 19

A tree is usually denoted by T . Trees with one, two, three and four vertices are shown
in the figure 2.8 below.
b
b b

b b

b b b

b b
b

Figure 2.8: Trees with one, two, three and four vertices

Some properties of trees:


Theorem 2.3.2. There is one and only one path between every pair of vertices in a tree,
T.

Proof. Since T is a connected graph, there must exists at least one path between every
pair of vertices in T . Now suppose that between two vertices a and b in T there are two
distinct paths. The union of these two paths will contain a circuit and so T cannot be a
tree. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Theorem 2.3.3. If in a graph G there is one and only one path between every pair of
vertices then G is a tree

Proof. Existence of a path between every pair of vertices assures that G is a connected
graph. A circuit in a graph (with two or more vertices) implies that there is at least one
pair of vertices a and b such that there are two distinct paths between a and b. Since
G has one and only one path between every pair of vertices, G cannot have any circuit.
Hence, G is a tree. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Theorem 2.3.4. A tree with n vertices has n − 1 degrees.

Theorem 2.3.5. Any connected graph with n vertices and n − 1 edges is a tree.

Definition 2.3.6 (Minimally connected). A connected graph is said to be minimally


connected if removal of any one edge from it disconnects the graph.

Theorem 2.3.7. A graph is a tree if and only if it is minimally connected.

Proof. A minimally connected graph cannot have a circuit otherwise, we could remove one
of its edges in the circuit and still leave the graph connected. Thus, a minimally connected
graph is a tree.
Conversely, suppose a graph G is a tree. if a connected graph G is not minimally
connected then there must exists an edge ei in G such that G − ei is (still) connected.
Therefore, ei is in some circuit, which implies that G is not a tree. Hence, a tree is
minimally connected. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Theorem 2.3.8. In any tree (with two or more vertices), there are at least two pendant
vertices.

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


20 §2.3. Trees and Fundamental Circuits

2.3.2 Distance and Centers in a Tree


Definition 2.3.9 (Distance between two vertices). In a connected graph G, the distance
d(vi , vj ) between two of its vertices vi and vj is the length of the shortest path between
them, i.e. the number of edges in the shortest path between them.
In a tree, since there is only one path between every pair of vertices, the determination
of distance between two vertices in a tree becomes easier, i.e. it is the length of the
(number of edges in) path between them.
Definition 2.3.10 (Eccentricity and center). The eccentricity E(v) of a vertex v in a
graph G is the distance from v to the vertex farthest from v in G, that is
E(v) = max d(v, vi ).
vi ∈G

A vertex with minimum eccentricity in graph G is called a center of G.


Theorem 2.3.11. Every tree has either one or two centers.

2.3.3 Spanning Trees


Definition 2.3.12 (Spanning tree). A tree T is said to be a spanning tree of a connected
graph G if T is a subgraph of G and T contains all the vertices of G.

v1
b

a
e

b
f b v2
v5
h
b
d
g

b b

v4 c v3

Figure 2.9: Graph with 5 vertices and 8 edges

Consider the graph above (Figure 2.9) with 5 vertices and 8 edges. Some of the
spanning trees (not all) of the above graph are listed below.
• {a, b, c, d} • {h, f, a, g}
• {b, f, e, d} • {g, b, f, e}
• {g, c, f, e} • {f, b, g, d}
Theorem 2.3.13. Every connected graph has at least one spanning tree.
Proof. Let G be a connected graph. If G has no circuits, it is its own spanning tree. If G
has a circuit, delete an edge from the circuit. This will still leave the graph connected. If
there are more circuits, repeat the procedure till an edge from the last circuit is deleted.
This leaves a connected graph without any circuits that contains all the vertices of G.
Thus, every connected graph has at least one spanning tree. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Definition 2.3.14 (Branches and chords). An edge in a spanning tree T is called a branch
of T . An edge of graph G which is not in the spanning tree T is called a chord.

PT02CBIC02 (Unit-1) 2016-17


§2.4. Matrix representation of Graphs 21

2.3.4 Fundamental Circuits


Theorem 2.3.15. A connected graph G is a tree if and only if adding an edge between
two vertices in G creates exactly one circuit.

Proof. We know that, there is one and only one path between every pair of vertices in a
tree. Thus, adding an edge adds an additional path and hence a circuit. 
Dr. Jay Mehta,
Department of
Mathematics,
Sardar Patel
University.

Definition 2.3.16 (Fundamental circuit). Adding any chord (i.e. an edge not in a
spanning tree) to the spanning tree T will create exactly one circuit. Such a circuit formed
by adding a chord is called a fundamental circuit.

In the above graph given in Figure 2.9, consider the spanning tree T = {d, e, a, b}.
Note that the spanning tree has 4 edges which are branches and the remaining 4 edges in
the graph are chords. Thus, these 4 chords will give 4 fundamental circuits with respect
to T . They are {a, b, c, d, e}, {a, b, f }, {b, c, g}, {a, b, h, e} obtained by adding chords c, f ,
g and h respectively.

Exercise 2.3.17. Find fundamental circuits with respect to other spanning trees of the
graph 2.9.

2.4 Matrix representation of Graphs


2.4.1 Incidence matrix
Let G be a graph with n vertices, e edges and no self-loops. Define an n × e (n by e)
matrix A = (aij ), whose n rows correspond to the n vertices and the e columns correspond
to the e edges as follows:
(
1, if jth edge ej is incident on ith vertx vi and
aij =
0, otherwise.

Such a matrix A is called the vertx edge incidence matrix or simply incidence matrix.
Consider the graph given below. We find the incidence matrix of the same.

v3 b

a v6
b
h
e
b b
v2
v4 b
g
f
c

b b
v1 d v5

Figure 2.10: Graph with 6 vertices and 8 edges

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


22 §2.4. Matrix representation of Graphs

The incidence matrix A of the above graph is a 6 × 8 matrix given by

a b c d e f g h
v1 
0 0 0 1 0 1 0 0
v2 0 0 0 0 1 1 1 1
 
0 0 0 0 0 0 0 1
A = v3  .
v4 1 1 1 0 1 0 0 0
 
 
v5 0 0 1 1 0 0 1 0
v6 1 1 0 0 0 0 0 0

One can clearly make the following observations about the incidence matrix A:
1. Since every edge is incident on exactly two vertices (as there are no self-loops), each
column of A
2. The number of 1’s in each row equals the degree of the corresponding vertex.
3. A row with all 0’s represents an isolated vertex.
4. Parallel edges in a graph produce identical columns. In other words, two columns in
the incidence matrix are identical if the two edges represented by them are parallel.
5. If a graph G is disconnected with components g1 and g2 then the incidence matrix
A(G) of G can be written in the following form:
" #
A(g1 ) 0
A(G) = .
0 A(g2 )

6. Permutation of any two rows or columns in an incidence matrix simply corresponds


to relabeling the vertices and edges of the same graph.

2.4.2 Circuit Matrix


Let the number of different circuits in a graph G be q and the number of edges in G be e.
Then a circuit matrix B = (bij ) of G is a q × e binary matrix defined as follows:
(
1, if ith circuit includes jth edge and
bij =
0, otherwise.
The graph in the above Figure 2.10 has four different circuits, {a, b}, {c, e, g}, {d, f, g}
and {c, d, f, e}. Therefore, its circuit matrix is a 4 × 8 binary matrix and is given by

a b c d e f g h
1 1 1 0 0 0 0 0 0
B(G) = 2 
0 0 1 0 1 0 1 0.
3 0 0 0 1 0 1 0 0
4 0 0 1 1 1 1 0 0

The following observations can be made about a circuit matrix B(G) of a graph G:
1. A column of all zeros corresponds to a non-circuit edge, i.e. an edge that does not
belong to any circuit.
2. Each row of B(G) is a circuit vector.
3. Unlike incidence matrix, a circuit matrix is capable of representing a self-loop and
the corresponding row will have a single 1.

PT02CBIC02 (Unit-1) 2016-17


§2.4. Matrix representation of Graphs 23

4. The number of 1’s in a row is equal to the number of edges in the corresponding
circuit.
5. If graph G is disconnected with components g1 and g2 then the circuit matrix B(G)
can be written in a block-diagonal form as follows:
" #
B(g1 ) 0
B(G) = ,
0 B(g2 )

where B(g1 and B(g2 ) are circuit matrices of g1 and g2 .


6. Permutation of any two rows or columns in a circuit matrix simply corresponds to
relabeling the circuits and edges.

2.4.3 Adjacency matrix


The adjacency matrix of a graph G with n vertices and no parallel edges is an n by n
symmetric binary matrix X = (xij ) defined by
(
1, if there is an edge between ith and jth vertices
xij =
0, if there is no edge between them.

b v3
e8
v2 b
e4
b
e3 v4
e5
b
e1 v5 e7

e2
b

v6
b
e6
v1

Figure 2.11: A graph with 6 vertices

The adjacency matrix of the graph given in Figure 2.11 is a 6 × 6 matrix given as
follows:

v1 v2 v3 v4 v5 v6
v1 
0 1 0 0 1 1
v2 1 0 0 1 1 0
 
0 0 0 1 0 0
X = v3  .
v4 0 1 1 0 1 1
 
 
v5 1 1 0 1 0 0
v6 1 0 0 1 0 0

Observations about the adjacency matrix that can be made immediately are:
1. The entries along the principal (main) diagonal of X are all 0’s if and only if the
graph has no self-loops. A self-loop at the ith vertex corresponds to xii = 1.
2. The definition of adjacency matrix makes no provision of parallel edges.

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


24 §2.5. Directed Graphs or Digraphs

3. If the graph has no self-loops (and of course no parallel edges), the degree of a vertex
equals the number of 1’s in the corresponding row or column of X.
4. Permutation of row and of the corresponding columns imply reordering the vertices.
It must be noted that the rows and columns must be arranged in the same order.
Thus, if two rows are interchanged in X, the corresponding columns must also be
interchanged.
5. A graph G is disconnected with components g1 and g2 if and only if its adjacency
matrix X(G) can be partitioned as follows:
" #
X(g1 ) 0
X(G) = ,
0 X(g2 )

where X(g1 ) and X(g2 ) are the adjacency matrices of the components g1 and g2
respectively.
6. Given any square, symmetric, binary matrix Q of order n, one can always construct
a graph G of n vertices (and no parallel edges) such that Q is the adjacency matrix
of G.

2.5 Directed Graphs or Digraphs


Definition 2.5.1. A directed graph or digraph G consists of a set V = {v1 , v2 , . . .} of
vertices, a set E = {e1 , e2 , . . .} of edges and a mapping that maps every edge onto some
ordered pair of vertices (vi , vj ).

e5
v2 b

e4

v1 b
e1 b v3

e3 e2 e8 e9 e
10
e6

b b

v4 e7 v5

Figure 2.12: Directed graph with 5 vertices and 10 edges

In a digraph, an edge is not only incident on a vertex but also incident out of a vertex
and incident into a vertex. If edge ek is incident out of a vertex vi and incident into a
vertex vj , then vi is called the initial vertex and vj is called the terminal vertex of ek . For
example, in the above graph (Figure 2.12) v5 is the initial vertex and v4 is the terminal
vertex of the edge e7 .
An edge for which initial and terminal vertices are same is called a self-loop. For
example, e5 in the above graph. The number of edges incident out of a vertex vi is called

PT02CBIC02 (Unit-1) 2016-17


§2.5. Directed Graphs or Digraphs 25

the out-degree of vi and is denoted by d+ (vi ). The number of edges incident into a vertex
vi is called the in-degree of vi and is denoted by d− (vi ). For example,
d+ (v1 ) = 3, d− (v1 ) = 1,
d+ (v2 ) = 1, d− (v2 ) = 2,
d+ (v5 ) = 4, d− (v5 ) = 0.
Clearly, in a digraph G with n vertices and e edges, the sum of all in-degrees is equal
to the sum of all out-degrees and each sum is equal to the number of edges in G, that is,
n n
d+ (vi ) = e = d− (vi ).
X X

i=1 i=1
A vertex for which in-degree and out-degree are both equal to zero is called an isolated
vertex. A vertex v in a digraph is called a pendant vertex if it is of degree (in-degree or
out-degree) one, that is, if
d+ (v) + d− (v) = 1.
Two directed edges are said to be parallel if they are mapped onto the same ordered
pair of vertices. For example in Figure 2.12, e8 , e9 and e10 are parallel edges whereas e2
and e3 are not parallel.

2.5.1 Some types of Digraphs


Simple Digraphs A digraph that has no self-loop or parallel edges is called a simple
digraph.
Asymmetric Digraph Digraphs that have at most one directed (either no edge or one
edge) edge between a pair of vertices, but are allowed to have self-loops, are called
asymmetric or antisymmetric.
Symmetric Digraph Digraphs in which for every edge (a, b) (i.e. from vertex a to b)
there is also and edge (b, a) (i.e. from vertex b to a).
A digraph that is both simple and asymmetric is called a simple asymmetric digraph.
Similarly, a digraph which is both simple and symmetric is called a simple symmetric
digraph.
Complete Digraphs A complete symmetric digraph is a simple digraph in which there
is exactly one edge directed from every vertex to every other vertex.
A complete asymmetric digraph is an asymmetric digraph in which there is exactly
one edge between every pair of vertices. The following are the examples:
b b

b
b

b b
b b

Complete symmetric digraph of 4 vertices Complete asymmetric digraph with 4 vertices

Figure 2.13: Directed graph with 5 vertices and 10 edges

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu


26 §2.5. Directed Graphs or Digraphs

A complete asymmetric digraph of n vertices contains n(n−1)


2
edges, but a complete
symmetric digraph of n vertices contains n(n − 1) edges.
Balanced Digraph A digraph is said to be balanced if for every vertex vi the in-degree
equals the out-degree, that is, d+ (vi ) = d− (vi ).

2.5.2 Directed Paths and Connectedness


A directed walk from a vertex vi to vj is an alternating sequence of vertices and edges,
beginning with vi and ending with vj , such that each edge is directed from the vertex
preceding it to the vertex following it. A semiwalk in a directed graph is a walk in the
corresponding undirected graph, but is not a directed walk. A walk in a digraph can mean
either a directed walk or a semiwalk.
Similarly, the definitions of path, directed path, semipath, circuit, directed circuit,
semicircuit can be given in a digraph. For example, in Figure 2.12, the alternating sequence
v5 e8 v3 e6 v4 e3 v1
is a directed path from v5 to v1 , where as
v5 e7 v4 e6 v3 e1 v1
is a semipath (being a path in the corresponding undirected graph) but not a directed path.
Again in the same graph, the set of edges {e1 , e6 , e3 } is a directed circuit but {e1 , e6 , e2 } is
a semicircuit. Both of them are circuits.
Connected Digraphs Recall that, an undirected graph was defined to be connected if
there was at least one path between every pair of vertices. In the case of directed
graphs, there are two different types of paths. Consequently, there are two different
types of connectedness in the case of digraphs.
A digraph G is said to be strongly connected if there is at least one directed path
from every vertex to every other vertex. A digraph G is said to be weakly connected
if its corresponding undirected graph is connected but G is not strongly connected.
A digraph that is not connected (strongly or weakly) is said to be disconnected.
Euler Digraphs In a digraph G a closed directed walk which traverses (or covers) every
edge of G exactly once is called a directed Euler line. A digraph containing a directed
Euler line is called an Euler digraph. The following graph is an Euler digraph, in
which the walk a b c d e f is an Euler line.
c
b
v1
d
b v3
b
e

b
f
v2 b
v4
a

Figure 2.14: Euler digraph

PT02CBIC02 (Unit-1) 2016-17


§2.5. Directed Graphs or Digraphs 27

Definition 2.5.2 (Tree with directed edges). A tree is a connected digraph without any
circuits - i.e. neither a directed circuit nor a semicircuit.

2.5.3 Matrices of digraphs


1. Incidence Matrix: The incidence matrix of a digraph with n vertices, e edges and
no self-loops is an n × e matrix A = (aij ) whose rows correspond to vertices and
columns corresponds to edges, such that

1,
 if jth edge is incident out ith vertex and
aij = −1, if jth edge is incident into ith vertex and


0, if jth edge is not incident on ith vertex.

2. Circuit Matrix: Let G be a digraph with e edges and q circuits (directed circuits or
semicircuits). An arbitrary orientation (clockwise or counterclockwise) is assigned to
each of the q circuits. Then a circuit matrix B = (bij ) of the digraph G is a q × e
matrix defined as


 1, if ith circuit includes jth edge, and the orientation of the edge and circuit coincide
bij = −1, if ith circuit includes jth edge, but the orientation of the two are opposite,


0, if ith circuit does not include jth edge.

3. Adjacency Matrix: Let G be a digraph with n vertices, containing no parallel edges.


Then the adjacency matrix X = (xij ) of the digraph G is an n × n binary matrix
whose elements (or entries) are defined as
(
1, if there is an edge directed from ith vertex to jth vertex,
xij =
0, otherwise.

Exercise 2.5.3. Find the incidence matrix, circuit matrix and the adjacency matrix in
the following digraph.

v3
b
v6
b

a
h
e b
v2 b

v4

g
f c

b b
v1 d v5

Figure 2.15: Digraphs and its matrices

Lecturer: Dr. Jay Mehta jay_mehta@spuvvn.edu

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy