Discrete Mathematics Unit 5 Graph Theory
Discrete Mathematics Unit 5 Graph Theory
DEPARTMENT OF MATHEMATICS
Sub. Code: 18MAB302T
Sub. Tittle: Discrete Mathematics for Engineers
Definition 1.2.1.
Let GG be a simple graph, and let v∈V(G)v∈V(G) be a vertex of G.G. Then the degree of vv,
written d(v),d(v), is the number of edges e∈E(G)e∈E(G) with v∈e.v∈e. Alternatively, d(v)d(v) is the
number of vertices vv is adjacent to.
Example 1
Note that in the definition we require GG to be a simple graph. The notion of degree has a few pitfalls to be
careful of GG has loops or multiple edges. We still want to the degree d(v)d(v) to match the intuitive notion
of the “number of edges coming out of vv” captured in the drawing with a small circle. The trap to beware is
that this notion no longer agrees with “the number of vertices adjacent to vv” or the “the number of edges
incident to vv”
Example 2.
Graph Isomorphisms
Generally speaking in mathematics, we say that two objects are "isomorphic" if they are "the same" in terms of
whatever structure we happen to be studying. The symmetric group S3S3 and the symmetry group of an
equilateral triangle D6D6 are isomorphic. In this section we briefly briefly discuss isomorphisms of graphs.
🔗
Definition 1.3.3.
An isomorphism φ:G→Hφ:G→H of simple graphs is a biject φ:V(G)→V(H)φ:V(G)→V(H) between
their vertex sets that preserves the number of edges between vertices. In other
words, φ(v)φ(v) and φ(w)φ(w) are adjacent in HH if and only if vv and ww are adjancent in G.G.
Example 1.
Although solving the graph isomorphism problem for general graphs is quite difficult, doing it for small graphs
by hand is not too bad and is something you must be able to do for the exam. If the two graphs are actually
isomorphic, then you should show this by exhibiting an isomrophism; that is, writing down an explicit bijection
between their vertex sets with the desired properties. The most attractive way of doing this, for humans, is to
label the vertices of both copies with the same letter set.
If two graphs are not isomorphic, then you have to be able to prove that they aren't. Of course, one can do this
by exhaustively describing the possibilities, but usually it's easier to do this by giving an obstruction –
something that is different between the two graphs. One easy example is that isomorphic graphs have to have
the same number of edges and vertices. We'll discuss some others in the next section
Simple Graph
A simple graph is the undirected graph with no parallel edges and no loops.
A simple graph which has n vertices, the degree of every vertex is at most n -1.
Example
In the above example, First graph is not a simple graph because it has two edges
between the vertices A and B and it also has a loop. Second graph is a simple graph
because it does not contain any loop and parallel edges.
Undirected Graph
An undirected graph is a graph whose edges are not directed.
Example
In the above graph since there is no directed edges, therefore it is an undirected graph.
Directed Graph
A directed graph is a graph in which the edges are directed by arrows.
Example
In the above graph, each edge is directed by the arrow. A directed edge has an arrow
from A to B, means A is related to B, but B is not related to A.
Complete Graph
A graph in which every pair of vertices is joined by exactly one edge is called complete graph.
It contains all possible edges.
A complete graph with n vertices contains exactly nC2 edges and is represented by Kn.
Example
In the above example, since each vertex in the graph is connected with all the remaining
vertices through exactly one edge therefore, both graphs are complete graph.
Connected Graph
A connected graph is a graph in which we can visit from any one vertex to any other vertex. In
a connected graph, at least one edge or path exists between every pair of vertices.
Example
In the above example, we can traverse from any one vertex to any other vertex. It means there
exists at least one path between every pair of vertices therefore, it a connected graph.
Disconnected Graph
A disconnected graph is a graph in which any path does not exist between every pair of
vertices.
Example
The above graph consists of two independent components which are disconnected. Since it is not
possible to visit from the vertices of one component to the vertices of other components
therefore, it is a disconnected graph.
Regular Graph
A Regular graph is a graph in which degree of all the vertices is same.
Example
In the above example, all the vertices have degree 2. Therefore they are called 2- Regular
graph.
Bipartite Graph
A bipartite graph is a graph in which the vertex set can be partitioned into two sets such that
edges only go between sets, not within them.
A graph G (V, E) is called bipartite graph if its vertex-set V(G) can be decomposed into two non-
empty disjoint subsets V1(G) and V2(G) in such a way that each edge e ∈ E(G) has its one last
joint in V1(G) and other last point in V2(G).
Example 1
Example 2
Example
The above graph is known as K4,3.
Graph Isomorphism-
Graph Isomorphism is a phenomenon of existing the same graph in more than one forms.
Such graphs are called as Isomorphic graphs.
Solution-
Checking Necessary Conditions-
Condition-01:
Here,
• Both the graphs G1 and G2 have same number of vertices.
• So, Condition-01 satisfies.
Condition-02:
Here,
• Both the graphs G1 and G2 have different number of edges.
• So, Condition-02 violates.
Condition-01:
Here,
• Both the graphs G1 and G2 have same number of vertices.
• So, Condition-01 satisfies.
Condition-02:
Here,
• Both the graphs G1 and G2 have different number of edges.
• So, Condition-02 violates.
Problem-02
Condition-01:
Here,
• Both the graphs G1 and G2 have same number of vertices.
• So, Condition-01 satisfies.
Condition-02:
Here,
• Both the graphs G1 and G2 have same number of edges.
• So, Condition-02 satisfies.
Condition-03:
Here,
• Both the graphs G1 and G2 have same degree sequence.
• So, Condition-03 satisfies.
Condition-04:
Here,
• Both the graphs G1 and G2 do not contain same cycles in them.
• So, Condition-04 violates.
Kruskal’s Algorithm-
Step-1:
Take the edge with the lowest weight and use it to connect the vertices of graph.
If adding an edge creates a cycle, then reject that edge and go for the next least weight edge.
Step-03:
Keep adding edges until all the vertices are connected and a Minimum Spanning Tree (MST) is obtained.
Special Case-
If the edges are already sorted, then there is no need to construct min heap.
So, deletion from min heap time is saved.
In this case, time complexity of Kruskal’s Algorithm = O(E + V)
Problem-01:
Construct the minimum spanning tree (MST) for the given graph using Kruskal’s Algorithm-
Solution-
Step-02:
Step-03:
Step-04:
Step-05:
Step-06:
Step-07:
Since all the vertices have been connected / included in the MST, so we stop.
Weight of the MST
= Sum of all edge weights
= 10 + 25 + 22 + 12 + 16 + 14
= 99 units
Chromatic Number-
• Graph Coloring is a process of assigning colors to the vertices of a graph.
• It ensures that no two adjacent vertices of the graph are colored with the same color.
• Chromatic Number is the minimum number of colors required to properly color any graph.
Cycle Graph-
• A simple graph of ‘n’ vertices (n>=3) and n edges forming a cycle of length ‘n’ is called as a cycle graph.
• In a cycle graph, all the vertices are of degree 2.
Examples-
In these graphs,
• Each vertex is having degree 2.
• Therefore, they are cycle graphs.
Path
Four-Color Theorem. The four-color theorem states that any map in a plane can be colored using four-colors
in such a way that regions sharing a common boundary (other than a single point) do not share the same color.