Sie sind auf Seite 1von 2

DAA Unit wise important questions

Unit-I
1) If f1(n) =O(g1(n)) and f2(n)=O(g2(n)) then show that f1(n) * f2(n)=O(g1(n)*g2(n)) 2) If f1(n) =O(g1(n)) and f2(n)=O(g2(n)) then show that f1(n)+f2(n)=O(max(g1(n),g2(n))) 3) Derive the function f(n)=12n2+6n is (i) O(n3) and (ii) (n). 4) Write the non-recursive algorithm for finding the nth Fibonacci number and derive its time complexity. 5) Describe the performance analysis in detail 6) Explain the asymptotic notations with an example for each. 7) Show that f(n)+g(n)=O(n2) where f(n)=3n2-n+4 and g(n)=nlogn+5 Unit-II 1) Develop the algorithm for Find using collapsing rule with an example. 2) Develop the algorithm for Union using weighting rule with an example. 3) For the following graph identify the articulation points and draw the bi connected components.

1 1 2 1 5 3 1 6

4 8

4) Explain the usefulness of the following fundamental operations on set i) Find ii) Delete iii) Union iv) Insert 5) Two sets S1 and S2 are given below a) Draw disjoints sets S1 and S2 using trees. b) Draw disjoint sets S3 using trees such that S3=s1 U S2 c) Draw disjoint sets S4 using trees such that S4=S2 U S1 d) Give pointer representation of S1, S2 , S3 and S4. Unit-IV 1) Find the optimal solution to the job sequencing with deadlines for the following n=5, (P1,P2,P3,P4,P5)=(20,15,10,5,1) (d1,d2,d3,d4,d5)=(2,2,1,3,3). 2) Find an optimal solution to the knapsack instance n=7, M=15, (P1.P7)=(10,5,15,7,6,18,3) (W1.W7)=(2,3,5,7,1,4,1). 3) Differentiate between prims algorithm and kruskals algorithm for finding the minimum cost spanning tree. 4) Write the Dijkstras algorithm for finding the single source shortest path problem. 5) Write the control abstraction for the greedy method.

7 1

Unit-VI
1) Describe the Backtracking technique to m-coloring graph. Explain with an example. 2) Draw the portion of the state space tree for m-colorings of a graph. 3) Differentiate between Backtracking and Branch & Bound technique by considering 4queen problem. Explain how nodes are generated and numbered in state space tree in the above two techniques. 4) Explain the 4-Queen problem using backtracking? Draw the permutation tree by taking implicit constraint, explicit constraint and bounding functions? 5) Define the following terms: state space, explicit constraints, implicit constraints, problem state, solution states, answer states, live node, E-node, dead node, bounding functions.

UNIT-VIII
1) What are differences between NP-Hard and NP-Complete classes? Explain with examples. 2) Briefly explain the concepts of the NP-Hard and NP-Complete? 3) Explain non deterministic algorithms? Give some examples? 4) Explain the P, NP, NP-Hard and NP- complete classes? Give relationship between them 5) Write short notes on Cooks theorem. 6) Explain about different types of NP problem.

Das könnte Ihnen auch gefallen