You are on page 1of 15

GRAPH

REPRESENTATION AND
ISOMORPHISM
OBJECTIVES
 By the end of this unit, you should be able to:
 represent graphs by using matrices
 explain the concept of isomorphism
 determine whether two graphs are isomorphic
GRAPH PRESENTATION

 To make it easier for us to analyse a graph, we need a more formal representation


that is by using matrices. There are two types of matrices that can be used to
represent graphs.
ADJACENCY MATRIX
 To obtain the adjacency matrix of this graph, we need to:
• Firstly, select an ordering of the vertices, say a, b, c, d, e.
• Next, we need to label the rows and columns of a matrix with the ordered vertices.
• The entry in this matrix in row i, column j, i≠ j, is the number of edges incident on i
and j. If i = j, the entry is twice the number of loops incident on i.

 Example:
 Consider the graph as illustrated below.

 The adjacency matrix of this graph is:

 Notice that we can obtain the degree of a vertex v in a graph G by summing row v or column
v in G’s adjacency matrix.
ADJACENCY MATRIX

 Example:
 The adjacency matrix of the simple graph of Figure below is:
ADJACENCY MATRIX

 We will show that if A is the adjacency matrix of a simple graph G, the powers of A,
A, A2, A3 ,…count the number of paths various lengths. More precisely, if the vertices of
G are labelled 1, 2 …the ijth entry in the matrix An is equal to the number of paths from i to j
of length n.
 Example 8.1c
 Suppose that we square the matrix A in Example above to obtain:
ADJACENCY MATRIX (Cnt)
 Consider the entry for row 1, column 3 in A2. Since the value of the
entry is 2, we can conclude that there are two paths of length 2 from
w1to w3. The two paths are

(w1, w2, w3) (w1, w4, w3)

 If G is a simple graph, the entries on the main diagonal of A2 give


the degrees of the vertices. Consider, for example, vertex w3. The
degree of w3 is 3 since w3 is incident on the three edges (w3, w2),
(w3, and w4), (w3, w5).
INCIDENCE MATRIX

 The adjacency matrix is not a very efficient way to represent a


graph. Since the matrix is symmetric about the main diagonal, so
the information, except that on the main diagonal, appears twice.
 To obtain the incident of the graph,

i. First, we have to label the rows with the vertices and the column
with the edges (in some arbitrary order).

ii. The entry for row v and the column e is 1 if e is incident on v


and 0 otherwise.
INCIDENCE MATRIX (Cnt)

 Example:
 The incident matrix for the graph above is:
INCIDENCE MATRIX (Cnt)

 Example:
 The incident of the graph is shown in the figure above is:

 From the incidence matrix, we get the following information about a graph.

• A column that has only one entry, such as e7 in Example 8.1e is representing a loop.
• The sum of a row gives the degree of the vertex identified with that row. For example,
the sum of row w2 in Example 8.1e is 4. This implies that deg (w 2) = 4
ISOMORPHISM
 Definition: Graphs G1and G2are isomorphic if there is a one-to-one, onto
functions 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, sp 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 isomorphic of G1 onto G2.
 Example:
 An isomorphic for the graphs G1 and G2 is defined by:

f(a) = B, f(b) = D, f(c) = A, f(d) = C, f(e) = E,

g(x1) = y1, g(x2) = y2, g(x3) = y3, g(x4) = y4, g(x5) = y5

 One helpful way to show that two graphs are isomorphic is by using the
adjacency matrices. To show two graphs G1 and G2 are isomorphic, we can
show that G1 and G2 have the same adjacency matrix.
ISOMORPHISM

 Example:

 Consider the two graphs above.

 The adjacency matrix for G1 is

 The adjacency matrix for G2 is

 By rearranging the matrix for G2 using row and column operations,


we will obtain a matrix that is similar to the matrix for G1. Hence, we
can conclude that they are isomorphic.
ISOMORPHISM
 It is often difficult to determine whether two graphs are isomorphic.
However, we can often show that two simple graphs are not
isomorphic by showing that they do not share an invariant.
 Definition: A property P is an invariant if whenever G1 and G2 are
isomorphic graphs: if G1 has property P, G2 also has property P.

 Examples of invariants are:

1. Has n edges
2. Has n vertices of degree k
3. Is connected
4. Has n simple cycle of length k
ISOMORPHISM

 Example:

 The graph G1 and G2 in Figure 8.7 are not isomorphic, since G1 has seven edges
and G2 has six edges.

 The two graphs in Figure above are not isomorphic, since G1 has four vertices
with degree 3 while G2 has only two edges with degree 3.
REFERENCES

 URL:
http://www.cise.ufl.edu/class/cot3100sp03/notes/Module-19-Graphs
.pdf
Accessed 16.12.16

You might also like