You are on page 1of 67

MFC - CO-3 Graph Material

Phenomena represented as a Graph & types of Graphs


Introduction:
 Graph Theory is one of the most important tools in mathematics,
started from the problem of Konigsberg bridge which is written
by Leonhard Euler in 1736.

 Graph theory is becoming increasingly significant as it is applied


to other areas of mathematics, science and technology.
 Graph theory is rapidly moving into the mainstream of
mathematics mainly because of its applications in diverse fields
which include computer science (data mining, clustering, image
capturing, networking), operations research (scheduling,
traveling salesman problem), electrical engineering
(communications networks and coding theory) and biochemistry.
 The important concept of graph coloring is utilized in resource
allocation, scheduling. Paths, walks and circuits in graph theory
are used in applications of travelling salesman problem.
 Also, paths, walks and circuits in graph theory are used in
tremendous applications say traveling salesman problem,
database design concepts, resource networking.

Phenomena represented as Graphs:


1
2
3
4
5
6
7
8
REGULAR GRAPH:
A graph is regular if all the vertices of the graph has the same degree.
In a regular graph G of degree r, the degree of each vertex of G is r.

9
10
Problems:
1.Does there exists a simple graph with five vertices and degrees 3, 3, 3,3,4.?
2. Identify the degree sequence in graphical 2,2,2,2.
3. Identify the degree sequence in graphical 3,3,3,3.
4. Draw graph with four vertices of degree 1, 1, 2 and 3.
5. Draw graph with five vertices of degree 3, 3, 3, 3 and 2.
6. Construct the graph with this degree sequence (1,1,3,3,3,4,6,7) and identify what type of
graph it is (Simple graph or Non-Simple graph)?
7. How many edges does a graph have, if its degree sequence is 4, 3, 3, 2, 2. Draw such a
graph.
8. a. Explain the Handshaking property.
b. How many edges are there in a graph with 10 vertices each of degree 6.
9. Is there a simple graph with degree sequence (1,1,3,3,3,4,6,7)? Justify.
10. Is the following sequence 6, 5, 5, 4 ,3, 3, 2, 2, 2 is graphical? Justify.
11. Determine whether the following graph is a simple graph, multi graph and obtain the degree
of each vertex.

12. What are the degrees of the vertices in the graph H?

a b c

e d f
H
13. What are the degrees and what are the neighbourhoods of the vertices in the graph G?

11
14.What are the degrees and what are the
neighbourhoods of the vertices
in the graph H?

15.Find the in-degree and out-degree of the following graph and justify your Answer?

b
a c

e d f

16. Find the in-degree and out-degree of each vertex in the directed graph G?

17.Is these graphs with degree sequence (1, 3, 3, 3, 5, 6, 6)?

18. Is there a simple graph G with degree sequence (1,1,3, 3,3, 4, 6,7)?

12
19.Determine whether the graph shown has directed or undirected edges, whether
it has multiple edges, and whether it has one or more loops. Use your answers to
determine the type of graph in Table for the below graphs.

20. Determine the in-degree and out-degree of below graph.

13
Representation of Graphs (Adjacency and incident Matrices):

14
15
16
17
Problems:
1. Construct a graph whose adjacency matrix is given below.
0 1 1 0 0
1 0 1 0 1
A(G)= 1 1 0 1 0
 
0 0 1 0 1
0 1 0 1 0
2. Draw a Pseudograph with the adjacency matrix

0 3 0 2
3 0 1 1
0 1 1 2
2 1 2 0
3 Draw the undirected graph G corresponding to the adjacency matrix

1 0 1 1 0
0 0 2 0 1
1 2 0 0 0
1 0 0 1 1
0 1 0 1 0

4. Sketch the graph whose adjacency matrix is

0 1 1 1
[1 0 1 1]
1 1 0 1
1 1 1 0

5. Find the adjacency matrix for the given graph

6. Find the adjacency matrix for the given graph

18
7. Obtain the incidence matrix of the following graph

8. Draw these graphs. Represent each of these graphs with an adjacency matrix and incidence
matrix. And find the degree sequence of each of the graph.
a) K7 b) K2,8 c) C7 d) W5

9.Draw a graph with the adjacency matrix


1 1 1 0
[0 0 1 0]
1 0 1 0
1 1 1 0
1 2 0 1
10. Draw an undirected graph represented by the given adjacency matrix[2 0 3 0]
0 3 1 1
1 0 1 0
11.Find the adjacency matrix for the given graph

12. Find the incidence matrix of the following graph

13. Sketch the graph whose adjacency matrix is


0 1 1 1
[1 0 1 1]
1 1 0 1
1 1 1 0
14.Find the adjacency matrix for the given graph

19
15.For the following degree sequences, determine if there exists a simple graph whose degree
sequence is given. If possible, draw the graph or explain why such a graph does not exist. a)
(2,3,3,4,4,5) b) (1,3,34,5,6,6) c) (1,1,1,1,4)
1 1 1 0
16. Draw a graph with the adjacency matrix [0 0 1 0] with respect to the ordering of
1 0 1 0
1 1 1 0
the vertices a, b, c, d.

20
Applications of Bipartite graphs:

21
22
Problems:
1.Draw a graph representing the problem of three houses and three utilities water, gas and
electricity.

2.Can five houses be connected to two utilities without connections crossing?

3.Check whether the graphs G and H displayed are bipartite or not?

4.Company X has offices in cities B, D and K; Company Y in cities B and M; Company Z in


cities C and M. Represent this situation by a bipartite graph. Is this a complete bipartite
graph?

5.Verify that the following graphs are bipartite or not? Justify?

6.Worker W1 can do jobs J1 and J3, worker W2 job J4, worker W3 jobs J2 and J3. Represent
this by a bipartite graph

7. Draw the graph k 2, 5.

8.Can five houses be connected to two utilities without connections crossing?

23
9.Show that the following graph is bipartite.

10.Is the following graph a bipartite graph?

11. Is the following graph a complete bipartite graph?

12.Is this graph bipartite?

24
13.Is this graph bipartite?

14. Is the following graph a complete bipartite graph?

15.Is the following graph a complete bipartite graph?

25
GRAPH ISOMORPHISM:

26
27
28
29
Problems:
1.Verify graphs are isomorphic or not.

2.Is the graphs isomorphic or not.

3.Verify graphs are isomorphic or not.

4. Determine whether the following graphs are isomorphic or not

5. Are the following two graphs are isomorphic. Justify your answer.

30
6. Determine whether the graphs G and H are isomorphic.

7.Determine whether the graphs G and H are isomorphic.

G H

8.Verify that the following graphs are isomorphic?

9.Verify the graphs are isomorphic or not?

31
18. Verify graphs are isomorphic or not

32
Applications of Euler and Hamilton Paths

33
34
35
36
37
38
39
40
41
Problems:
1.Is there Hamilton path for the following graph

2.Which graphs have Euler’s path.

42
3.Verify that the graph is Eulerian and find a Eulerian circuit in G.

4.Draw a Hamiltonian graph.


5. Show that the graph G is Eulerian but not Hamiltonian.

6. Is the graph is Hamiltonian? If yes find the Hamiltonian cycle?

7. Draw a graph which is Hamiltonian but not Eulerian.


8.Find three distinct Hamiltonian circuits in the following graph.

9.Verify that the graph is Eulerian and find a Eulerian circuit in G:

43
10.Is the graph is Hamiltonian? If yes find the Hamiltonian cycle?

11.Give an example of a graph which is Hamiltonian but not Eulerian and vice-versa.
Does the graph have Hamilton path if so, obtain graph if not give an argument?

12.Verify that the complete bipartite graph K2,3 contains a Euler trail.

13.Give an example of a graph which is Eulerian but not Hamiltonian.


Identify which of the graphs have Hamilton circuit

14. Does the graph have Hamilton path if so, find graph if not given an argument to show
why no such path exists?

44
15.For which values of ‘n’ do these graphs have a Euler circuit?
Kn , Cn and Wn.

16. Which of the graphs have Hamilton circuit?

17. Is the graph was Euler circuit construct such if exists

18.Determine whether the given graph has an Euler circuit. Construct such a circuit when one
exists. If no Euler circuit exists, determine whether the graph has Euler path and construct
such a path if one exists.

45
19.Can someone cross all the bridges shown in this map exactly once and return to the
starting point?

20.Determine whether the given graph has a Hamilton circuit. If it does, find such a circuit. If
it does not,give an argument to show why no such circuit exists

.
A. Does the above graph have a Hamilton path? If so, find such a path. If it does not, give an
argument to show why no such path exists.

B. Does the above graph have a Hamilton path? If so, find such a path. If it does not, give an
argument to show why no such path exists.

Shortest-Path, Planar Graphs

46
47
48
49
Regions:
Every planar graph divides the plane into connected areas called
regions.

50
Remarks:
In planar graphs, the following properties hold good
1. In a planar graph with ‘n’ vertices, sum of degrees of all the
vertices is n ∑ deg(Vi) = 2|E|
2. According to Sum of Degrees of Regions Theorem, in a planar
graph with ‘n’ regions, Sum of degrees of regions is n ∑ deg(ri) =
2|E|
Where, |V| is the number of vertices, |E| is the number of edges, and
|R| is the number of regions.
Properties of Planar Graphs:
 If a connected simple planar graph G has e edges and r regions
then r≤ 2e/3
 If a connected planar graph G has e edges, r regions and n (≥3)
vertices, then n-e+ r = 2. (Euler’s formula)
 If a connected simple planar graph G has e edges and n (≥3)
vertices, then e ≤ 3n-6.
 A complete graph Kn is planar if n< 5.
 A complete bipartite graph Km,n is planar if and only if m<3 or
n>3.

51
Problems:
1.Prove that complete graph K4 is planar whereas complete graph K5 is not
planar.
2.Show that K3 , 3 is non planar.
3.Suppose that a connected planar graph has 30 edges. If a planar representation
of this graph divides the plane into 20 regions, how many vertices does this
graph have
4.Which of these non-planar graphs have the property that the removal of any
vertex and all edges incident with that vertex produces with planar graph?
a) K6 b) K3, 3

5.Suppose that a connected planar graph has six vertices, each of degree four.
Into how many regions is the plane divided by a planar representation of this
graph?
6.Which of these non-planar graphs have the property that the removal of any
vertex and all edges incident with that vertex produces with planar graph?
a) K5 b) K3, 4

7.Is K4 planar?
8.Suppose that a planar graph has k connected components, e edges, and v
vertices. Also suppose that the plane is divided into r regions by a planar
representation of the graph. Find a formula for r in terms of e, v and k.
9.Can five houses be connected to two utilities without connections crossing?
10.Draw the given planar graph without any crossings.

a. b.

52
11. Determine whether the given graph is planar. If so, draw it so that no edges
cross.

a. b.

12.Find the length of a shortest path between a and z in the given weighted
graph.

a.

b.
13. Find a route with the least total airfare that visits each of the cities in this
graph, where the weight on an edge is the least price available for a flight
between the two cities.

53
14.Solve the traveling salesperson problem for this graph by finding the total
weight of all Hamilton circuits and determining a circuit with minimum total
weight.

15 Solve the traveling salesperson problem for this graph by finding the total
weight of all Hamilton circuits and determining a circuit with minimum total
weight.

54
Euler’s formula

55
56
57
58
59
Problems:
1. A connected planar graph has 10 vertices each of degree 3. Into how
many regions does a representation of this planar graph split the plane.
2. Suppose that a connected planar simple graph has 20 vertices, each of degree
3. Into how many regions does a representation of this planar graph split the
plane?

3.Let G be a connected planar simple graph with n vertices, where n ≥ 3 and m


edges. Then m ≤ 3n - 6.

4.Let G be a connected planar simple graph with n vertices and m edges, and no
triangles. Then m ≤ 2n - 4.

5.Let G be a connected planar simple graph. Then G contains at least one


vertex of degree 5 or less.

60
Applications of Trees and spanning trees

Trees were introduced by Caley in the year 1857 to study the chemical
composition.

Trees form one of the most widely used and extensively study subclass of
graphs.

A connected graph that contains no cycles is called a tree. Its edges are
branches

A tree with n vertices has n – 1 edge.

EXAMPLES:

Spanning Tree

Definition: The spanning tree of a graph G is a subset of G that covers all of


its vertices using the minimum number of edges.

Some properties of a spanning tree:

• Since “a spanning tree covers all of the vertices”, it cannot be


disconnected.
• A spanning tree cannot have any cycles and consist of (n−1) edges
(where n is the number of vertices of the graph) because “it uses the
minimum number of edges”.
• A graph can have more than one spanning tree. In fact, a complete graph
can have a maximum of nn−2 spanning trees.

61
EXAMPLES:

Different possible spanning trees

62
EXAMPLES:

Different possible spanning trees

Minimum Spanning Trees


 Minimum spanning tree is the spanning tree where the cost is
minimum among all the spanning trees.
 The cost of the spanning tree is the sum of the weights of all the
edges in the tree.
 There can be many spanning trees.

63
Graph-Spanning Tree-Minimal spanning tree
Note:
• The number of edges in MST with n nodes is (n-1).
• The weight of MST of a graph is always unique. However there
may be different ways to get this weight (if there edges with
same weights).
• The weight of MST is sum of weights of edges in MST.
• Maximum path length between two vertices is (n-1) for MST
with n vertices.
• There exists only one path from one vertex to another in MST.

64
Applications of minimum spanning trees
 Building a connected network. There are scenarios where we have a
limited set of possible routes, and we want to select a subset that will
make our network. (e.g., electrical grid, computer network) fully
connected at the lowest cost.
 Travelling salesman problem, there is a straightforward way to use the
MST to get an optimal solution to the travelling salesman problem
• Cluster analysis: clustering points in the plane, single-linkage clustering,
graph-theoretic clustering, and clustering gene expression data.
• Constructing trees for broadcasting in computer networks. On Ethernet
networks this is accomplished by means of the Spanning tree protocol.
• Image registration and segmentation.
• Curvilinear feature extraction in computer vision.
• Handwriting recognition of mathematical expressions.
• Circuit design: implementing efficient multiple constant
multiplications, as used in finite impulse response filters.
• Regionalization of socio-geographic areas, the grouping of areas
into homogeneous, contiguous regions.
• Comparing ecotoxicology data.
• Topological observability in power systems.
• Measuring homogeneity of two-dimensional materials.
Minimum Spanning Trees
• A minimum spanning tree in a connected weighted graph is a
spanning tree that has the smallest possible sum of weights of it
edges.
• Two algorithms can be used:
• Kruskal’s Algorithm by Joseph Kruskal, 1956

• Prim’s Algorithm by Robert Prim, 1957.

65
66
67

You might also like