0% found this document useful (0 votes)
18 views

MCS-211 June 2024

Uploaded by

jakhardelhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

MCS-211 June 2024

Uploaded by

jakhardelhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

No.

of Printed Pages : 5 MCS-211


MASTER OF COMPUTER
APPLICATION
(MCA–NEW)
Term-End Examination
June, 2024
MCS–211 : DESIGN AND ANALYSIS OF
ALGORITHMS
Time : 3 Hours Maximum Marks : 100
Weightate : 70%

Note : Question No. 1 is compulsory. Attempt any


three questions from the rest.

1. (a) Use mathematical induction to prove that :


5
n
n(n  1) (2n  1)
 i2  6
i 1

(b) Write recursive binary search algorithms


and analyse its complexity in worst case
scenario. 5

(c) What is an algorithm ? Explain


characteristics of an algorithm with the
help of an example. 5

P. T. O.
[2] MCS-211

(d) Multiply the following two matrix using


Strassen’s algorithm : 5

 5 6  – 7 6
 – 4 3 and  5 9 
   

(e) What are P and NP class of problems ?


Differentiate between NP-Hard and NP-
Complete problems. 5

(f) Explain quick sort algorithm using


suitable example. 5

(g) Multiply the following two numbers using


Karatsuba’s algorithm. 5

(h) What is string matching algorithm ?


Derive its best case time complexity. 5

2. (a) What is Minimum Spanning Tree ? Write


Prim’s algorithm for finding Minimum
Spanning Tree and find its time
complexity. Also find MST of the following
graph using Prim’s algorithm : 10
[3] MCS-211

(b) Write an algorithm for topological sort.


Obtain a topological ordering for the
following graph : 10

3. (a) “The best-case analysis is not as important

as the worst-case analysis of an algorithm.”

Yes or No. Justify your answer with the

help of an example. 10

(b) Sort the following sequence of numbers,

using selection sort. Also find the number

of comparisons and copy operations

required by the algorithm is sorting this

list : 10

28, 13, 12, 28, 35, 11, 15, 9, 36


P. T. O.
[4] MCS-211

4. (a) Explain the 0/1 Knapsack problem. Solve


the following 0/1 Knapsack problem : 10

Given number of objects n = 6

Capacity of Knapsack (M) = 12

(P1, P2, P3, P4, P5, P6) = (1, 6, 18, 22, 28, 43)
and (W1, W2, W3, W4, W5, W6) = (1, 2, 5, 6,
7, 10), where Pi’s and Wi’s are the profit
and weights of the corresponding objects.

(b) Give a divide and conquer based algorithm


to find the ith smallest element in an array
of size n : 10

Trace your algorithm to find 3rd smallest


in the array :

A = (10, 2, 5, 15, 50, 6, 20, 25)

5. (a) Write Dijkstra’s algorithm to find the


shortest path in a graph. Apply Dijkstra’s
algorithm on the following graph : 10
[5] MCS-211

(b) Apply Floyd Warshall Algorithm (FWA) to


find the shortest path distance between
every pair of vertices in the following
directed weighted on graph : 10

Also, find the time complexity of an


algorithm.

MCS–211

P. T. O.

You might also like