MCS-031 J16 Compressed
MCS-031 J16 Compressed
MCS-031 J16 Compressed
06022
MCS-031 : DESIGN AND ANALYSIS OF
ALGORITHMS
MCS-031 1 P.T.O.
(e) Using Dijkstra's algorithm, find the
minimum distances of all the nodes from
node 'a' which is taken as the source node,
for the following graph : 10
fn fn - 1 - fn - 2 =
such that fo = 0 and f1 = 1.
MCS-031
3. (a) Using Prim's algorithm, find a minimal
spanning tree for the graph given below : 10
2 A 3
6
(b) Sort the following sequence of numbers,
using Selection Sort. Also find the number
of comparisons and copy operations
required by the algorithm in sorting this
list : 10
20 5 15 8 6 28
MCS-031 3 P.T.O.
(b) Define f2 notation used for comparing two
functions.
For ftx) = 2x3 + 3x2 + 1
h(x) = 2x3 — 3x2 + 2
show that
(1) f(x) = a (x3)
(ii) x2 f2 (h(x)) 5
MCS-031 4 7,000