P. 1
Suggestion Paper for CS503 - Design and Analysis of Algorithm

Suggestion Paper for CS503 - Design and Analysis of Algorithm

|Views: 3,559|Likes:
Suggestion Paper for CS503 - Design and Analysis of Algorithm, for more papers, visit - http://www.mywbut.com/
Suggestion Paper for CS503 - Design and Analysis of Algorithm, for more papers, visit - http://www.mywbut.com/

More info:

Published by: MyWBUT - Home for Engineers on Dec 03, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/04/2015

pdf

text

original

CS 503 – DESIGN & ANALYSIS OF ALGORITHM

Multiple Choice Questions
1. i) O-notation provides an asymptotic a) upper bound b) lower bound

c) light bound d) none of these

ii) The minimum number of colors needed to color a graph having n>3 vertices and 2 edges is a) 2 b) 3 iii) Kruskal algorithm is a a) Asymptotically loose b) Asymptotically tight iv) Which one of the following is true? a) b) c) d) c) 4 d) 1

v) Time complexity for recursive relation T(n) = 2T ( a) b) ) c) d)

yw

bu
) + 1 is c) O ( V3 ) d) O ( E3 ) c) -1 d) both 0 and 1 c) Quick sort

All NP hard problems are NP complete All NP complete are NP hard Some NP complete problems are NP hard None of these

vii) Time complexity for the Floyd’s algorithm to find all parts of shortest path of a graph G with V vertices and E edges using dynamic programming method is a) O ( V2 ) b) O ( E2 )

viii) The diagonal of the adjacency matrix of a graph with a self loop contains a) 1 b) 0

ix) In which sorting technique at every step each element is placed in its proper position? a) Bubble sort

m

t.c

om
c) same as big oh d) none of these

b) Merge sort x) Optimal substructure property is exploited by a) Dynamic programming b) Greedy method

d) Heap sort

c) Both (a) & (b) d) None of these

Short Answer Type Questions
2. Write down the difference between : a) Prim’s algorithm and Kruskal’s algorithm b) Linear search and binary search 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 constant. 4. Find the minimum number of operations requird for the following matrix chain multiplication using dynamic programming: A(10 х 20) * B (20 50) * C (50 х 1) * D (1 х 100) 5. Write the algorithm of Quick sort. Find the best case, worst case and average case time complexities of this algorithm. 6. Compare and contrast BFS vis-à-vis DFS.

Long Answer Type Questions

7. a) Define the classes P and NP. b) Discuss what you mean by polynomial reductions. c) Discuss diagrammatically the relations among P class, NP class, NP hard and NP complete. d) Describe Clique Decision Problem (CDP). e) Prove that CDP is NP complete.

m

yw

bu

t.c

om

8. a) Find out the minimum cost spanning tree using any algorithm:

11. Write short notes on any three of the following: a) Recursion Tree b) FFT algorithm c) Approximation algorithms d) 0/1 knapsack problem

m

yw

10. a) Differentiate between greedy method and dynamic programming. b) What do you mean by non-deterministic algorithms? c) A newspaper agent daily drops te newspaper to the area assigned in such a manner that he has to cover all the houses in the respective area with minimum travel cost. Compute the minimum travel cost. The area assigned to the agent where he has to drop the newspaper is shown in the figure below:

bu

t.c

9. a) Find out the worst case time complexity of merge sort. b) Design a back tracking algorithm to find all the Hamiltonian cycles in a Hamiltonian graph. What is the worst-case time complexity of the algorithm?

om

b) Let (u, v) be a minimum weight edge in a graph G. Show that (u, v) belongs to some minimum spanning tree of G. c) What is union-find algorithm?

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->