Professional Documents
Culture Documents
Instructions to Candidates:
Answer ALL the questions.
Missing data may be suitably assumed.
Page 1
8 What is a max tree and a max heap? Draw a max heap for the following set of 3
integers: 5, 4, 9, 2, 1, 7.
9 Define the terms spanning tree and minimum spanning tree? Draw the minimum 3
spanning tree for the following graph.
Page 2
MANIPAL INSTITUTE OF TECHNOLOGY
(A constituent Institute of Manipal University, Manipal)
I SEMESTER M.C.A.
ADVANCED DATA STRUCTURES AND ALGORITHMS (MCA 4102)
Sessional: II Date: 16-10-2017 Duration: 1 hour Max. Marks: 15
SCHEME OF EVALUATION
Page 3
Example of an AVL tree with 10 nodes is as follows:
7 What do you mean by adjacency matrix of an unweighted graph G = (V, E)? Write the
adjacency matrix for the following graph.
Adjacency matrix of an unweighted graph G = (V, E) is a |V| x |V| matrix A = (aij) such that
1 if (i, j) E
a ij =
0 otherwise
Page 4
Max heap for the given set of integers is as follows:
9 Define the terms spanning tree and minimum spanning tree? Draw the minimum
spanning tree for the following graph.
Let G = (V, E) be a connected undirected graph. A subgraph of G that is a tree and contains
all the vertices of G is a spanning tree of G.
Let G = (V, E) be a weighted, connected and undirected graph. For each edge (u, v) E, the
weight w (u, v) specifies the cost to connect u to v. The acyclic subset (tree) T E that
connects all of the vertices and whose total weight
Page 5