# Graph_theory

Document Sample

```					                       Graph Theory
Simple Graph:
A simple Graph G=(V,E) consists of V, a non-empty set
of vertices and E a set of unordered pairs of distinct
elements of v called edges.
Eg:
A           B      C          D

E                   F
Multi Graph:
A Multi graph G=(V,E) consists of set V of
vertices, a set E of edges and a function f from E to
{(u,v)/u,v € V,u ≠ v }. The edges e1 and e2 are called Multiple
or parellel edges if f(e1) ≠ f(e2).
A              B
C
This graph denotes the Multi graph. (i.e.)      Multi
telephone lines between in network.
Directed Graph:
A Directed Graph (V,t) consists of set of vertices V
and set of edges E that are ordered pairs of elements of V.
(Arrow pointing from u to v to indicate direction of
edge(u,v)).
A                     B

D                     C
Telelines in computer network cannot operate in
both directions.

SubGraph:
When edges and vertices are removed from a graph
without removing endpoints of any remaining edges a
smaller graph is obtained which is subgraph.
A subgraph of a graph G=(V,E) is a graph H=(w,f)
where w subset of v and F subset E.

a                  a
e               b     e            b
d       c                  c
Union:
Union of two simple graphs G1=(V1,E1) G2=(V2,E2) is
the simple graph with vertex set V1UV2 and edge set E1UE2.
The Union of G1 and G2 is denoted by G1UG2.
a      b       c     a       b   c
a     b           c

d          e             d       f   d         e   f

Carrying out graph algorithms using representation of
graphs by lists of edges, or by adjacency lists,can be
cumbersome if there are many edges in the graph. To
simplifycomputation, graphs can be respresented using
Matrices.

The two way to represent graphs using Matrices are
ii)Incidence Matrix.
Suppose that G=(V,E) is simple graph where |V|=n.
Suppose that the vertices of G are listed arbitrarily as
V1,V2,.... The adjacency Matrix A ( or AG) of G with respect to
listing of vertices is the n n zero-one Matrix. It is denoted
by A=[aij] where,
1 if {Vi,Vj} is an edge of G         a               b
aij =
0 otherwise                         c           d

0     1   1   1

1         0   1   0

1         1   0   0

1         0   0   0

Incidence Matrices:
Another common way to represent graphs is to use
incidence matrix.Let
G=(V,E) be undirected graphs, supose that V1,V2...Vn are
vertices and e1,e2,...em are edges of G. Then incidence
matrix with represent to this ordering of V and E is matix
M= mij when
1 when edge ej is incident with Vi
mij =
0 otherwise

V1 e2 V2                                   e1 e2 e3 e4 e5
e1             e5    e3                       V1 1 1    0           0   1
V4         e4 V3                             V2 0 1    1           0   0
V3 0 0    1           1   1
V4 1 0    0           1   0
Isomorphism:
The mathematical definition of graph equivalency is
isomorphism two graphs are equialent to each other if there
is mapping function from first to second graph.
u1       u4          V1     V3

u2         u3        V2      V4
V1=f(u1) V2=f(u2) V3=f(u3) V4=f(u4)
Two graphs are isomorphic if mapping from first to
second is,
i)one-to-one ii) onto iii)for each pair of vertices u,v € G,
{u,v} € E iff {f(u),f(v)} €E'.
This condition is called mapping of adjacency of nodes
from first to second.

EXERCICES:
1)Find the number of vertices,edges,degree of each vertex,
isolated and pendant vertex.
i)        a    b         c

f    e         d
Vertices: 6 , Edges:6, deg(a)=2, deg(b)=4,
deg(c)=1, deg(d)=0, deg(e)=2, deg(f)=3
Pendant vertex is 'd', isolated vertex is 'c'

ii)              a            b

c        d            e
Vertices:5,edges:13 deg(a)=6, deg(b)=6, deg(c)=3,
deg(d)=5,deg(e)=6 and there is no pendant &
isolated vertex.

iii)        a    b    c       d

f     I    h    g       e
Vertices:9,Edges:9,deg(a)=2,deg(b)=3,deg(c)=3,deg(d)=0
deg(e)=4,deg(f)=0,deg(g)=2,deg(h)=2,deg(i)=3,Pendant
vertices are 'd' and 'f' and there is no isolated vertex.
iv)          a         b           Vertices: 4, Edges:4,deg(a)=1,
deg(b)=1,deg(c)=3,deg(d)=0
c              d       Pendant vertex is 'd' and
isolated vertices are 'b' and 'a'.
2)Can a simple graph exist with 15 vertices each of
degree 5?
Yes. The simple graph can exist with 15 vertices with each of
degree 5.
Because, Maximum degree of a vertex is n-1=14.

3)Does a simple graph exist with 5 vertices of the following

degrees exist?
Maximum degree is 5-1=4.

a) 3,3,3,3,2   exist. B) 3,4,3,4,3         exist.
b) 5,8,1,0,1   not exist.
4) Draw all subgraphs of G.
a              b

c              d

a             b           a               a                b

d                        d

a                  b           a       b       a

d           c               c        d
5)How many vertices does a regular graphs of degree 4
With 10 edges have?
∑ d(Vi)=2e, i=1 to n . Here V=4,i=1 t0 n and e=10
4n=20 =>n=5. A regular graph have 5 vertices.
6) Find Union of all graphs?
i)            a                                                  a
b           c         f               b            b       c

d           e                                 =>       d               e
f                     d                            f

ii)       a           b         a       f           b            a       f           b

e                         e               =>                           e
c           d         c       g           d            c           g       d

7) Draw a graph with Adjacency Matrix.
a           b       c
a                   b     a 0             1       0
=> b 1            0       1
c                      c 0            1       0
a       b        c d

a 0           0        1 1
a              b         b 0           0        1 1
=> c 1              1        0 1
d              c         d 1           1        1       0

a        b        c    d

b              a        a 0       0        0        0
b 1 0              1        0
d             c        c 0 0              0        1
d 0 0              0        0

8) Check whether given pair of graphs are isomorphic.
Condition for isomorphic: i)V(G)=V(H) ii) E(G)=E(H)
iii)An equal number of vertices with a given degree
u2                                   v2
u1            u3                 v1                v3       Hence, it is
u5            u4                 v5                    V4   isomorphic.
u1                           v1
u2 u3 u4 u5        u6 v2    v3    v4     v5   v6
Hence, it is not isomorphic.

Cut Vertices:
A Vertex V in a graph G is said to be a cut-vertex if
w(G-V) > w(G). Thus a vertex V of a grqaph G is a Cutvertex
iff G-V is disconnected.

Cut edges:
An edge e in a graph G is said to be a Cutedge if
w(G-e) > w(G). Thus if G is connected, then an edge e is a
cutedge iff G-e is disconnected.

```
DOCUMENT INFO
Categories:
Tags:
Stats:
 views: 4 posted: 12/7/2011 language: pages: 10
How are you planning on using Docstoc?