Vous êtes sur la page 1sur 2

Sardar Vallabhbhai Patel Institute of Technology

Computer Engg. (Semester – V)


MID-SEM Test (Round 1) (2016-17)

Subject Code: 2150703


Subject Name: Analysis and Design of Algorithms Total Marks: 40

Q.1 Answer the followings:


(a) What is an algorithm? Explain various properties/ characteristics of an [05]
algorithm.
(b) Explain different asymptotic notations in brief. [04]
(c) Write down characteristics of greedy algorithms. [03]

Q.2 Write a greedy algorithm to solve the problem of fractional knapsack. [07]
Solve the following example:
Capacity of the given knapsack is W=13. There are four objects with weight
and value as given in below table.
Object i 1 2 3 4
vi 10 40 30 52
wi 2 5 7 3
OR
Explain how to apply the divide and conquer strategy for sorting the [07]
elements using merge sort with example. Give algorithm for merge sort
method along with its time complexity.

Q.3 Write down the Krushkal’s Algorithm to find out Minimum Spanning Tree. [07]
Illustrate the steps to find minimum spanning tree for the graph given below
using Krushkal’s algorithm.

OR
Write an algorithm of Bucket Sort Method. Explain it with example. [07]

Q.4 (a) Answer the followings: [04]


(1) Show n3 + 2n = θ(n3)
(2) Show 4n + 3 ≠ Ω(n2)
(b) Solve the following recurrence equation using Master’s method. [03]
T(n) = 2T(n/2) + n2
OR
(a) Using greedy algorithm find an optimal schedule for following 7 jobs [04]
with profits: (P1,P2,P3,P4,P5,P6,P7) = (3,5,18,20,6,1,38) and deadline
(d1,d2,d3,d4,d5,d6,d7) = (1,3,3,4,1,2,1) .
(b) Explain Binary search tree with example. Write down the steps for [03]
searching a number in the binary search tree.

Q.5 Explain Dijkstra’s algorithm to find minimum distance of all nodes from a [07]
given node. (Greedy algorithm).
OR
Give the algorithm for Binary Search Method using divide and conquer [07]
technique and do the analysis of algorithm.

Vous aimerez peut-être aussi