Discrete Mathematics - Assignment 3 With Solutions (Part B)
Discrete Mathematics - Assignment 3 With Solutions (Part B)
ASSIGNMENT – 3
PART B
1. If any disconnected graph has exactly two vertices of odd degree, show that there is a path joining these two vertices.
Sol:
Proof:
If G = (V, E) is an undirected graph with ‘E’ edges and ‘V’ vertices, then ∑( deg (𝑣( ) = 2𝑒.
viz., the sum of the degrees of all the vertices of an undirected graph is twice the number of edges of the graph and
hence even.
Proof:
Let G = (V, E) be an undirected graph with ‘E’ edges and ‘V’ vertices. Since every edge contributes 2 to the sum of the
degree of the vertices.
\ All the e edges contribute (2e) to the sum of the degrees of the vertices viz., ∑( deg (𝑣( ) = 2𝑒.
i) Eulerian Path ii) Eulerian Circuit iii)Hamiltonian Path iv) Hamiltonian Circuit
Ans:
(i) Eulerian Path :
A path of graph G is called an Eulerian Path, if it includes each edge of G exactly once. Also, a connected graph
contains an Euler Path, if and only if it has exactly two vertices of odd degree.
For example,
A B
D C
G1
As Graph G1 contains an Eulerian Path between B and D namely, B – D – C – B – A – D, since it includes each
of the edges exactly once and the vertices B and D are of degree 3 each. Hence an Eulerian Path existed between
B and D.
A circuit of graph G is called an Eulerian Circuit, if it includes each edge of G exactly once. Also, a connected
graph contains an Euler Circuit, if and only if each of its vertices is of even degree.
For example,
B C
E
A D
G2
As Graph G2 contains an Eulerian Circuit, namely, A – E – C – D – E – B – A, since it includes each of the edges
exactly once and all the vertices are of even degree. Hence an Eulerian Circuit existed.
A path of graph G is called a Hamiltonian Path, if it includes each vertex of G exactly once.
For example,
C D
B A
G1
The Graph G1 has a Hamiltonian Path, namely, A – B – C – D, but not a Hamiltonian Circuit.
A circuit of a graph G is called a Hamiltonian Circuit, if it includes each vertex of G exactly once, except the
starting and end vertices( which are one and the same) which appear twice.
For example,
B C
A D
G2
As Graph G2 has a Hamiltonian Circuit namely, A – B – C – D – A. We note that in this circuit all the vertices
appear (each only once), but not all edges.
Sol:
(i) A C
B
E D
G1
(ii)
B C
G2
(i) G1 contains the Eulerian Circuit A – B – C – D – B – E – A, but this circuit is not Hamiltonian, as the
vertex B is repeated twice.
(ii) G2 contains the Hamiltonian Circuit A – B – C – D – E – A. However, it does not contain Eulerian Circuit
as there are 4 vertices each of degree three.
Sol:
(i) Complete Graph :
A simple graph, in which there is exactly one edge between each pair of distinct vertices, is called a
complete graph.
The complete graph on n vertices is denoted by Kn.
For example,
K3 K4
If the vertex set V of a simple graph G = (V, E) can be partitioned into two subsets V1 and V2 such that
every edge of G connects a vertex in V1 and a vertex in V2 (so that no edge in G connects either two vertices in
V1 and a vertex in V2 (so that no edge in G connects either two vertices in V1 or two vertices in V2), then G is
called a bipartite graph.
If each vertex of V1 is connected with every vertex of V2 by an edge, then G is called a completely
bipartite graph. If V1 contains m vertices and V2 contains n vertices, the completely bipartite graph is denoted by
Km, n.
For example,
A1 A2
Bipartite
B1 B2 B3
A1 A2 A3 A4
Completely
Bipartite
B1 B2 B3 B4
6. Prove that in a graph, the number of odd degree vertices are always even.
Sol:
Since each deg(vj) is odd, the number of terms contained in ∑𝑣𝑖∈𝑉1 deg (𝑣/ ) or in V2 is even, i.e., the
number of vertices of odd degree is even.
A (G1) B B (G2) C
Ans:
By Defn. A graph containing a Hamiltonian Circuit is called a Hamiltonian Graph.
Since, graph G1 has a Hamiltonian Circuit namely, A – B – C – D – A and thus is a Hamiltonian Graph.
Since, graph G2 has a Hamiltonian Path, namely, C – B – A – D, but not a Hamiltonian Circuit and thus it’s not a
Hamiltonian Circuit.
If the subgraph T of a connected graph G is a tree containing all the vertices of G, then T is called a spanning
tree of G.
For example, Let’s consider the graph G shown in the below figure. Since G has 4 vertices, any spanning tree of
G will also have 4 vertices and hence, 3 edges. [by property (2) i.e., A tree with n vertices has (n-1) edges.]
Since G has 5 edges, removal of 2 edges may result in spanning tree. This can be done in 5C2 = 10 ways,
but 2 of these 10 ways result in disconnected graphs. All the possible spanning trees are shown below.
C D
Sol:
A B A B A B A B
D C D C D C D
C
A B A B A B A B
D C D C D C D
C
The property is true for n =1, 2, 3 as seen from the below figure.
Let us now use mathematical induction to prove the property completely. Accordingly, let the property be
true for all trees with less than n vertices.
\ T has (r – 1) + (n – r – 1) + 1 = n – 1 edges.
A B C
E D
Sol:
By Defn. When G is a simple graph with n vertices v1, v2, … vn, the matrix A (or AG) º [aij],
1, if 𝑣= v? is an edge of G
where, aij = 9 is called the adjacency matrix of G.
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
0 1 0 0 1
⎡1 0 0 1 1⎤
⎢ ⎥
The adjacency matrix for the given graph is, G = ⎢0 0 0 1 1⎥
⎢0 1 1 0 0⎥
⎣1 1 1 0 0⎦
1 1 1 0
1 0 0 1
12. Draw the graph represented by the adjacency matrix R S
0 0 1 0
0 1 0 1
Sol:
A B
D C
Sol:
Given,
(x + y) (x' + z)
=> xx' + xz + x’y + yz
=> xz + x’y + yz (Since, xx’ = 0)
Now, xz + x’y + yz
=> xz + x’y + yz(x + x’) (Since, x + x’ = 1)
=> xz + x’y + xyz + x’yz
=> (xz + xzy) + (x’y + x’yz)
=> xz + x’y
Sol:
//TODO
Sol:
Ans:
By Defn.
a Ù (b Ú c) = (a Ù b) Ú (a Ù c) and
a Ú (b Ù c) = (a Ú b) Ù (a Ú c).
In other words if the operations Ú and Ù distribute over each other in a lattice, it is said to be distributive.
Otherwise it is said to be non distributive.
17. Determine whether the posets represented by each of the following Hasse Diagrams are lattices.
(i) f (ii) f
e e
d
c d
b b c
a
a
Sol:
(i) The poset represented by the Hasse Diagram is a lattice, since every pair of elements of this poset has both an
LUB and GLB
(ii) Though the pair of elements {b, c} has 3 upper bounds d, e, f, none of these precedes the other two i.e.,
{b, c} does not have an LUB. Hence the poset is not a lattice.