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

btech-cse-9-sem-design-and-analysis-of-algorithms-2012

Uploaded by

sarkar50626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

btech-cse-9-sem-design-and-analysis-of-algorithms-2012

Uploaded by

sarkar50626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

www.makaut.

com
http://www.makaut.com

Name : ……………………………………………………………
Roll No. : ……………………………………………..…………..
Invigilator’s Signature : ………………………………………..
CS/B.Tech/CSE(O)/SEM-5/CS-503/2012-13
2012
DESIGN AND ANALYSIS OF ALGORITHMS
Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable

GROUP – A
( Multiple Choice Type Questions )
1. Choose the correct alternatives for the following : 10 × 1 = 10
i) Time complexity for recurrence relation T(n) = 2T( n) + 1
is
2
a) " (log n) b) "(n )
c) " (n og n) d) " (n) .
ii) Time comp exity for the Floyd's algorithm to find all
pairs of shortest path of a graph G with V vertices and E
edges using dynamic programming method is
2 2
a) O(V ) b) O(E )
3 3
c) O(V ) d) O(E ) .
iii) Ω-notation provides an asymptotic
a) upper Bound
b) lower Bound
c) one that is sandwiched between the two bounds
d) none of these.

5401(O) [ Turn over

http://www.makaut.com
www.makaut.com
http://www.makaut.com

CS/B.Tech/CSE(O)/SEM-5/CS-503/2012-13

iv) The Big O notation of the expression


2 log n
f (n) = n log n + n + e is
2
a) O(n) b) O(n )
log n
c) O ( n log n ) d) O(e ).
v) Travelling salesman problem belongs to
a) P class b) NP class
c) NP-hard d) NP-complete class
vi) Tight bound for building a max heap algorithm will be
2
a) O(log n) b) O(n )
c) O(n log n) d) O(n) .
vii) The node removal of which makes a graph disconnected
is called
a) Pendant vertex b) Bridge
c) Articulation point d) Coloured vertex.
viii) The diagonal of th adjacency matrix of a graph with a
self loop contains
a) 1 b) 0
c) –1 d) both (a) and (b).
ix) Lower b und of time complexity for any comparison
based sorting algorithm is
a) O(n) b) O(n log n)
2
c) O(log n) d) O(n ) .
x) Time complexity of non-deterministic algorithm is
always
a) less than deterministic algorithm
b) greater than deterministic algorithm
c) equal to deterministic algorithm
d) none of these.

5401(O) 2

http://www.makaut.com
www.makaut.com
http://www.makaut.com

CS/B.Tech/CSE(O)/SEM-5/CS-503/2012-13

GROUP – B
( Short Answer Type Questions )
Answer any three of the following. 3 × 5 = 15

2. What is heap property ? Write an algorithm for deletion of the


maximum element from a heap.

3. Use a recursion tree to give an asymptotically tight solution


to the recurrence T(n) = T(n " a) + T(a) + cn where a ≥ 1 and
c > 0 are constants.

4. Find out the worst case time complexity of merge sort.

5. Derive the time complexity of Tower of Hanoi problem.


n
6. Write an algorithm to compute x with O(log n) complexity.

GROUP – C
( Long Answer Type Questions )
Answer any thr e of the following. 3 × 15 = 45

7. a) Find the minimum number of operations required for

the following matrix chain multiplication using dynamic

programming :

A ( 10 × 20 ) * B ( 20 × 50 ) * C ( 50 × 1 ) * D ( 1 × 100 )

b) Write an algorithm of eight queen problem.

c) What is tail recursion ? Give an example. 5+5+5

5401(O) 3 [ Turn over

http://www.makaut.com
www.makaut.com
http://www.makaut.com

CS/B.Tech/CSE(O)/SEM-5/CS-503/2012-13

8. a) Find the optimal solution using greedy criteria for a


knapsack having capacity 100 kg for the following list of
items having values and weights as shown in table.
Item Value Weight
I1 10 15
I2 20 25
I3 30 35
I4 40 45
I5 50 55

b) What do you mean by Dynamic Programming ? What is


the difference between dynamic programming and
greedy method ? 10 + 2 + 3

9. a) Discuss the procedure for Stassen's matrix


multiplication to evaluate the product of n matrices.
Find the resulting re urrence relation for the same and
analyze its time complexity. Is this method an
improvement ver the conventional matrix
multiplication method ?

b) What is union-find algorithm ? 7+2+2+4

10. a) Design a backtracking algorithm to find all the


Hamiltonian cycles in a Hamiltonian graph.

b) Discuss activity selection problem for job sequencing.

c) Write the travelling salesman problem with an


algorithm. 5+5+5

5401(O) 4

http://www.makaut.com

You might also like