Professional Documents
Culture Documents
0 1 0 0
MR =
1 0 1 0
=w
0 1
0
0 0
1 0 0 0
For a (b, a) (a, b) = (b, b)
(d, a) (a, b) = (d, b)
0 1 0 0
∴ wa
1 1 1 0
0 0 0 1
1 1 0 0
For b (a, b) (b, a) = (a, a)
(a, b) (b, c) = (a, c)
1 1 1 0
∴ wb =
1 1 1 0
0 0 0 1
1 1 0 0
For c (b, c) (c, d) = (b, d)
1 1 1 0
∴ wc =
1 1 1 1
0 0 0 1
1 1 0 0
For d (c, d) (d, a) (c, a)
1 1 1 0
∴ wd =
1 1 1 1
1 0 0 1
1 1 0 0
∴ R* = {(a, a), (a, b), (a, c), (b, a), (b, b),
(b, c), (b, d), (c, a), (c, d), (d, a), (d, b)}
Fig. 3-Q. 2(a)
Q. 2(b) The following is the Hasse diagram of the poset : { (a, b, c, d, e,), < } Is it a lattice ? Justify.
(2 Marks)
and
glb (b, e) = e glb (c, d) = e
Q. 2(c) In a class of 80 students, 50 students know English, 55 know French and 46 know German language,
37 students know English and French, 28 students know French and German, 25 know English and
German, 7 students know none of the languages. Find out :
(i) How many students know all the 3 languages ?
(ii) How many students know exactly 2 languages ?
(iii) How many students know only one language ?
(6 Marks)
Ans. :
|U| = 80
E Set of students that knows = |E| = 50 English
F Set of students that knows French = |F| = 55
G Set of students that knows = |G| = 46 German
––––––– –––––––
||EFG|=7|EFG|=|U|–|E F G |
= 80 – 7 = 73
| E F | = 37, |E G| = 7, |G F| = 28
Fig. 1 - Q. 2(c)
Q. 3(b) Determine which of the graphs below represents Eulerian circuit, Eulerian path, Hamiltonian circuit and
Hamiltonian path. Justify your answer.
(4 Marks)
Ans. :
(1) Eulerian path does exist as few vertices are having even degree and vertex 4 and 7 are having degree 3 i.e. odd
degree
(2) Eulerian circuit does not exist as all vertices are not having even degree.
(1) Euler path does not exist as 1 vertex is having odd degree.
(2) Euler circuit does not exist as all vertices does not have even degree.
Q. 3(c) Define the graph Kn and Kmn. (2 Marks)
Ans. : Kn Graph :
It is a graph called as complete graph a simple undirected graph in which every pair of distinct vertices is connected
by a unique edge. It is denoted by Kn where n is number of vertices.
Example K5 :
It is complete bipartite graph where vertex of the first set is connected to every vertex of other set. It is denoted by
Kmn where m is number of vertices in first set and n is number of vertices in other set.
Example K2,3
Q. 4(b) Use Dijkstra’s algorithm to find the shortest path between a and z. (6 Marks)
Ans. :
P = {} T={a, b, c, d, e, f, g, z}
(i) v = a P = {a} T={b, c, d, e, f, g, z}
∴ L(a) = 0
L(b) = min {L(b), L(a) + w(a, b)}
= min {, 0 + 2} = 2
L(c) = 4, L(d) = 5, L(e) = , L(f) = ,
L(g) = , L(z) =
(ii) v = c P = {a, c} T={b, d, e, f, g, z}
L(b) = min{L(b), L(c) + w(b, c)}
= min {2, 4 + 1} = 2
L(d) = 5, L(e) = , L(f) = 4, L(g) = , L(z) =
(iii) v = f p = {a, c, f} T = {b, d, e, g, z}
L(b) = 2, L(d) = 5, L(e) = 6, L(g) = 8, L(z) = 11.
(iv) v = b p = {a, c, f, b} T = {d, e, g, z}
L(d) = 5, L(e) = 5 L(g) = 8 L(z) = 11
(v) v = d, p = {a, c, f, b, d} T = {e, g, z}
L(e) = 5, L(g) = 7, L(z) = 11
(vi) v = e P = {a, c, f, b, d, e} T = {g, z}
L(g) = 7 L(z) = 8
(vii) v = g p = {a, c, f, b, d, e, g} T = {z}
L(z) = 8
∴ Minimum distance = 8
And Minimum path = a – d – g – z
Q. 5(a) Find maximum flow in the transport network using labeling procedure. Determine the corresponding
min cut. (7 Marks)
Ans. :
(ii)
(iii)
(iv)
(v)
(vi)
(vii)
Q. 5(b) Define :
(i) Forest
(ii) Height of a tree
(iii) Ordered tree
(iv) Properties of tree (4 Marks)
Ans. :
(i) Forest : A forest is a disjoint unior of trees.
(ii) Height of a tree : The length of the longest downward path to a leaf from root mode.
Example
(iii) Ordered tree : Tree in which the order of sub trees is significant.
Example : Binary search tree is a ordered tree because left subtree always have values less than root and eight subtree has
values greater than root.
(iv) Properties of trees : There is one and only one path between every pair of vertices. A tree with n vertices has n – 1
edges. A graph is a tree if and only if it is minimally connected. A graph G with n vertices,
n – 1 edges and no circuits is connected and it is a tree.
Q. 6(a) Give the stepwise construction of minimum spanning tree using Prim’s algorithm for the following
graph. Obtain the total cost of minimum spanning tree. (6 Marks)
Ans. :
Fig.24- Q. 6(b)
Fundamental cut sets w.r.t. T1
{e1} , {e2} , {e4}
Q. 6(c) Explain binary tree, binary search tree and ordered tree with suitable examples. (3 Marks)
Ans. : Binary Tree :
A binary tree is a tree which is rooted and in which each vertex has at most 2 children
Example
Fig. 25 - Q. 6(c)
Fig. 26 - Q. 6(c)