180 likes | 309 Views
Discrete Structures – CNS2300. Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 8 Graphs. Section 8.3. Representing Graphs and Graph Isomorphism. Isomorphic Graphs.
E N D
Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5th Edition) Kenneth H. Rosen Chapter 8 Graphs
Section 8.3 Representing Graphs and Graph Isomorphism
Isomorphic Graphs When there is a one-to-one correspondence between their vertex sets of two graphs that preserves edges we say that the two graphs are isomorphic.
Representing Graphs A way to represent a graph with no multiple edges is to use an adjacenylist which specifies the vertices that are adjacent to each vertex of the graph.
e g a b d Vertex Adjacent Vertices a b,c b a, c, d c a, b d b, e, f, g e d,g f d, g f c Simple Graph Example
b c d Vertex Adjacent Vert a a, f b a, f,e c b, d d b e c, e f b, c, e e a f Directed Graph, Adjacency List
Adjacency Matrices The adjacency matrix A [aij] for a graph G is
e g a b d f c é ù 0 1 1 0 0 0 0 ê ú 1 0 1 1 0 0 0 ê ú ê ú 1 1 0 0 0 0 0 ê ú 0 1 0 0 1 1 1 ê ú ê ú 0 0 0 1 0 0 1 ê ú 0 0 0 1 0 0 1 ê ú ê ú 0 0 0 1 1 1 0 ë û
e g a b d f c
b c d e a f
Incidence Matrices Let G = (V,E) be an undirected graph. Suppose that v1, v2, …, vn are the vertices and e1, e2, …, em are the edges of G. Then the incidence matrix with respect to this ordering of V and E is the nxm matrix M = [mij] where
e1 e2 e3 e4 e5 e6 v1 v2 v3 v4 v5 v1 v2 v3 e6 e3 e4 e5 e1 e2 v4 v5
e6 a e3 b d e7 e4 e1 e8 e5 c e1 e2 e3 e4 e5 e6 e7 e8 e9 a b c d e2 e9
Isomorphisms of Graphs The simple graphs G1=(V1,E1) and G2=(V2,E2) are isomorphic if there is a one-to-one and onto function f from V1 to V2 with the property that a and b are adjacent in G1 if and only if f(a) and f(b) are adjacent in G2, for all a and b in V1. Such a function f is called an isomorphism.
Isomorphisms of Graphs Two graphs are isomorphic when there is a one-to-one correspondence between vertices of the two graphs that preserves the adjacency relationship.
r w a b c d e x z y r b w x a c z y e d Examples
a d r w c x z y b e r w a b x y e c d z More Examples