You are on page 1of 19
Reg. No. I Question Paper Code : 96314 M.C.A. DEGREE EXAMINATION, FEBRUARY/MARCH 2014: ‘Third Semester DMC 1933 - DESIGN AND ANALYSIS OF ALGORITHMS (Regulations 2009) ‘Time : Three hours ‘Maximum : 100 marks 10. iL Answer ALL questions. PART A— (10x 2= 20 marks) Define Asymptotic notation. What do you mean by recursive algorithm? Write a note on Greedy approach. Give any two properties of binary tree. Define dynamic programming. What is memory function? Define the term back tracking. Write a condition for possible moves of a queen from a position ({, J). Define NP-hard. List any two properties of NP problem. PART B — (6 x 16 = 80 marks) (a) Discuss in details about the efficiency of the algorithm with example. Or (b) Explain the procedure used to calculate time complexity of binary search using non recursive algorithm. 12. (@) Briefly explain the procedure used for strassen's matrix multiplication, ©) Discuss Prim's alj graph. 15. (@) Explain an algorithm used to calculate binomial coefficient. Or ©) Discuss various memory functions and its properties, 14. (@) Explain eum of sub set problem and its algorithmic implementation, Or () Discuss Knapsack problem using branch and bound approach. 1. (@) Brief traveling salesman problem using NP hard approach, Or (b) Implement an algorithm for knapsack problem using NP hard approach. 2 96314 mene (Eleleeee E Question Paper Code 86314 M.C.A. DEGREE EXAMINATION, AUGUST 2018. ‘Third Semester DMC 1933 - DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) ‘Time : Three hours Maximum : 100 marks 10. i. Answer ALL questions. PART A— (10 x.2= 20 marks) What are asymptotic notations? Differentiate recursive and non ~ recursive algorithms. Define divide and conquer strategy. Define greedy approach. List down the applications of binary search trees. What are memory functions? State the principle of backtracking. List down any two problems solved by branch and bound techniave Differentiate P and NP problems. Define knapsack problem. PART B— (6 x 16 10 marks) (@ Discuss in detail the important types of problems. Or (b) Explain how the general framework for analysis of algorithms can be applied for analyzing the recursive algorithms. Give an example. 12. 13. 14. (@) (b) (a) ) (@) (b) (@) (b) Differentiate the merge sort and quick sort algorithms with an example. Or Explain Strassen’s matrix multiplication with an example. With a suitable example, explain Floyd’s algorithm to solve the all-pairs shortest path problem. Or Explain in detail how dynamic programming can be applied to solve the knapsack problem Apply and explain the backtracking method to solve the following. () Hamiltonian circuit problem 8) (ii) Subset-sum problem. @) Or Apply branch and bound technique to solve the traveling salesperson problem. Write notes on NP-complete problems. Or Discuss the approximation algorithms for NP-hard problems. ei 86314 Reg.no.:( | LLL Question Paper Code : 86314 M.C.A. DEGREE EXAMINATION, FEBRUARY/MARCH 2013. Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS. (Regulation 2009) ‘Time : Three hours Maximum : 100 marks 10, HH, Answer ALL questions. PART A — (10 x 2 = 20 marks) Differentiate deterministic and Non deterministic algorithm. Write a note on measures used for finding efficiency of an algorithm. Define Divide and conquer strategy. How to find ‘Degree of a tree’? What do you mean by binomial coefficient? Write a note on any two memory functions. ‘Write short notes on Hamiltonian cycle. Define the term backtracking with an example. Define ‘P’ and ‘NP" problems. Write 2 examples for NP-Hard and NP-Complete Problem. PART B — (6 x 16 = 80 marks) (@) Implement an algorithm for Binary search. Discuss in detail about time complexity of binary search algorithm. Or (b) Briefly explain the mathematical analysis of recursive and non recursive algorithm. 12. (a) Explain binary tree and its properties. Implement an algorithm for binary tree traversal techniques for the following tree. Or (6) Implement Dijkstra algorithm to implement shortest path for the following graph. Ze oe. SS 13. (a) Implement an algorithm for Warshall’s and Floyd algorithm with an example. % a i/o ——— Or (&) Discuss in detail about optimal binary search tree algorithm with suitable éxample. 14. (a) Briefly explain an algorithm used for 8- Queens problem using back tracking. Or (®) Discuss in detail about Travelling salesman problem for the following graph. 2 86314 15, (a) Explain in detail about Approximation algorithm for NP-Hard problem with an example. Or (b) Discuss Knapsack problem using Polynomial and Non polynomial time method. 3 86314 ‘Time : Three hours 10. 11 Question Paper Code : 76713 M.C.A. DEGREE EXAMINATION, AUGUST 2012. Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) Maximum : 100 marks Answer ALL questions, PART A — (10 x 2= 20 marks) Define the term : Algorithm. What is space complexity? 4 f(n=1) +...a,n-+ ay anda, 2 0,then f(n) = O(n"). Prove If f(n)=a, +n" this result. Give two examples of divide and conquer method. What is Greedy technique? What is the purpose of Dijkstra's Algorithm? What is a Binary Search Tree? Define a Graph 'G'. Give examples, What is Dynamic programming? State : Planar Coloring graph problem. PART B— (6 x 16 = 80 marks) (a) Explain briefly Big oh Notation, Omega Notation and Theta Notations. Give examples. (16) Or (>) Write the MERGE SORT ALGORITHM to sort the following numbers 12, 14, 25, 27, 11, 12, 13, 16. Illustrate the algorithm. (16) 12 13, 14. 16. @ () f@) (b) (@) (b) (@) (by the steps in developing a Dynamic Programming Algorithm. Discuss (16) Mlustrate with an example. Or (@) Solve 0/1 knap-sack problem, @) (ii) Assume that m = 30 and n = 3. While weights are (10, 20, 30) and profit are (12, 20, 24). Then find the optimal solution using knap-sack technique. @) Solve the following recurrences. Assume T(1) = 1 and T(3) =1. @ Tm= 7(z}+ (2) +n ® ®) (ii) Tn) =3 Tn") + logs Or With example and illustration, explain the procedure involved in PRIMS. algorithm to find Minimum Spanning Tree (MS'T). 6) Write short notes on: () Randomised algorithm (ii) Approximation algorithm, (8+8) Or (i) Suppose each element e in a red-black tree has some positive value Viel stored with it. Can we augment the nodes in the red-black tree so that each node maintains the product of values in its subtree without affecting the asymptotic running times of any standard tree operations? Explain, a0) (ii) Discuss briefly : Travelling Sales Person Problem. ) What are P, NP, NP-complete and NP-Hard Problems? Explain briefly with suitable example of each class. (16) Or Prove that satisfiability of Boolean formula in 3-Conjunctive Normal Form (3-CNF) is NP-Complete. 6) 2 76713 Reg. No.: Question Paper Code : 87514 M.C.A. DEGREE EXAMINATION, FEBRUARY 2012. ‘Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) Time : Three hours Maximum : 100 marks Answer ALL questions. PART A — (10 x 2 = 20 marks) 1. What is the worst case, best case, average case for a linear search algorithm. 2. If f(n)=5n? +6n+4, then prove that f(n) is O(n®)? 3. What is Greedy technique? 4. Define In order and Post order tree traversal techniques. 5. What is the purpose of Dijkstra’s Algorithm? 6, Whats an optimal binary search tree? 7. What is Backtracking? i 8 What is a Hamiltonian circuit? Give example. 9. What is Chromatic number? 10. What is NP hard and NP complex problems? 11 12, 13, (a) (b) (@) (b) (i) Gi) (iii) @ Gi) @ (i) PART B — (5 x 16 = 80 marks) Write an algorithm for Computing Fibonacci series. © Give the tree recursive call for Fibonacci number for n = 5, ) What is the time complexity of the algorithm Fibonacci series? (5) Or Briefly explain the steps in mathematical analysis of recursive algorithms. ® Illustrate the Bigoh, Theta and Omega asymptotic notations graphically and explain. @ Write an Algorithm for Quick Sort and write its time complexity. (8) Apply quick sort to the list 5,3, 1,9, 8,2,4, 7. @) or Apply Prim’s and Kruskal's Algorithm to the following Graph. Write their time complexities. Find the minimum cost in each case. (16) (a) Write the pseudo code for Floyd's Algorithm, Apply Floyd’s Algorithm to find all pairs shortest path for the graph given below 2 87514 ) 14. (a) (b) 15, (a) ) Write algorithm for solving the Knapsack problem. Apply the algorithm to the instance given by Item Weight Value 1 18 25 2 15 4 3 10 15 4 20 20 Apply Branch-and Bound algorithm to solve the Travelling Salesman Problem for Ore ge (esl Or Apply Backtracking Algorithm to solve the following instance of the subset problem S={3,5,6,7} d=7. (Discuss in detail NP complete problems with examples. 8) (ii) Give the Cliques decision problem. 8) Or Explain the need for Approximation Algorithms and how they can be used for NP hard problems. 3 87514 Reg. No. : Question Paper Code 96751 M.C.A. DEGREE EXAMINATION, AUGUST 2011. ‘Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) ‘Time : Three hours Maximum : 100 marks 10. Answer ALL questions. PART A —(10 x 2 = 20 marks) ‘What are the two kinds of algorithm efficiency? Compare the order of growth: n and n?. What is the best case, worst case and average case efficiency of Binary search? How do you obtain a solution to an optimization problem using greedy technique? Write an algorithm for computing C(n,k) using dynamic programming. What is the space efficiency of optimal BST? What is the principal mechanism for backtracking and branch and bound algorithm? Define feasible solution and optimal solution. What are nondeterministic algorithms? What do you mean by accuracy ratio and performance ratio of approximation algorithm? 11. (a) (b) 12. (a) (b) 13. (a) PART B —(5 x 16 = 80 marks) Explain briefly about the sequence of steps involved in designing and analysis of an algorithm. ae) Or (@ Discuss about some of the important problem types used in the algorithm design. 8) (ii) Write a recursive algorithm for computing the factorial function F(n) = n! for an arbitrary non-negative integer n. @ Write a pseudo code for divide and conquer algorithm for merging two sorted arrays into a single sorted one. Explain with an example. Set up and solve a recurrence relation for the number of key comparisons made by the pseudo code. a6) Or Apply Prim’s algorithm and Kruskal algorithm to the following graph. Compare the results. (6) Write a. pseudo code for Floyd's algorithm. Apply Floyd’s algorithm to find all pairs shortest paths for the graph (16) 2 96751 (b) 14. (a) (b) 15. (a) (b) Write a pseudo code for memory function method for knapsack problem. Apply knapsack problem to the instance given by the following data: (16) Capacity W = 5 Item Weight —-Value 1 2 $12 2 1 $10 3 3 $20 4 A $15 Apply backtracking algorithm to solve the following instance of the subset problem S=(3,5,6,7},d=15. (a6) Or (@ Solve the following instance of the knapsack problem using branch and bound algorithm with W = 16 (8) Item Weight Value Value/weight 1 4 $40 10 2 Tee Ae 6 3 5 $25 5 4 3 $12 4 (i) Apply the ‘branch and bound algorithm to solve the Travelling Salesman Problem. Use suitable graph. @) Explain briefly about the Nearest Neighbor algorithms and Twice around the tree algorithm with example graph. ae) Or (Discuss about some of the best known problems under the category of deterministic algorithm. ® (i) Apply Sahni’ s approximation scheme for k= 2 to the given instance. Generate the subsets by using the algorithm and yield an optimal solution for the given instance. (8) Item Weight Value Value/weight 1 4 $40 10 2 7 $42 6 3 5 $25 5 4 1 $4 4 Capacity W = 10. 3 96751 neg Noi EET LET Question Paper Code 85814 M.C.A. DEGREE EXAMINATION, FEBRUARY 2011 ‘Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) ‘Time : Three hours Maximum : 100 marks Answer ALL questions. PART A— (10 x2 10 marks) 1, Define the term “algorithm”, 2, What is the need for analyzing an algorithm? 3. Whats a tautology? 4, List the properties of a binary tree. 5, What is a Catalan Number? 6. Define a graph ‘G’ and a Sub-Graph ‘GV’. 7. State the principle of optimality. 8, What is chained matrix multiplication? 9. What is NP hard problem? 10, What is non deterministic algorithm? uu. 12, 13. 14, 16. @ (b) (a) ) @) (b) (a) (b) @) (b) PART B — (5 x 16 = 80 marks) (i) State and prove the principle of Mathematical Induction. Illustrate with an example. ao) (ii) What is a contradiction? Give an example. © Or Explain briefly Big Oh notation, Omega Notation and Sigma notation. Give examples, (6) (List the characteristics of Greedy algorithm. 8) (i) Compare time complexity, and space complexity of merge sort and quick sort. 8) Or Define a Spanning Tree T and a Minimum Spanning Tree (MST). How will you find MST using Prim's algorithm and Kruskal’s algorithm? Illustrate with an example. (16) Define a Knapsack Problem. How will you solve knapsack problem using Dynamic Programming? Illustrate with example. (16) Or Explain briefly Warshall’s and Floyd's Algorithm. 6) Explain the concept of Backtracking and Branch and Bound Technique with suitable example. (16) Or How will you solve Travelling Salesman Problem? Explain the procedure involved in it, (6) ‘What are P and NP Problems? Give atleast five problems that can be classified as NP problem, Discuss the approximation algorithms for NP hard problems. (16) Or (What is a decision tree? Draw a decision tree for a game of three questions. 8) (i) What is the complexity in sorting? Draw a valid decision tree for sorting three items. 8) 2 85814 neg Noi EET LET Question Paper Code 85814 M.C.A. DEGREE EXAMINATION, FEBRUARY 2011 ‘Third Semester DMC 1933 — DESIGN AND ANALYSIS OF ALGORITHMS (Regulation 2009) ‘Time : Three hours Maximum : 100 marks Answer ALL questions. PART A— (10 x2 10 marks) 1, Define the term “algorithm”, 2, What is the need for analyzing an algorithm? 3. Whats a tautology? 4, List the properties of a binary tree. 5, What is a Catalan Number? 6. Define a graph ‘G’ and a Sub-Graph ‘GV’. 7. State the principle of optimality. 8, What is chained matrix multiplication? 9. What is NP hard problem? 10, What is non deterministic algorithm? uu. 12, 13. 14, 16. @ (b) (a) ) @) (b) (a) (b) @) (b) PART B — (5 x 16 = 80 marks) (i) State and prove the principle of Mathematical Induction. Illustrate with an example. ao) (ii) What is a contradiction? Give an example. © Or Explain briefly Big Oh notation, Omega Notation and Sigma notation. Give examples, (6) (List the characteristics of Greedy algorithm. 8) (i) Compare time complexity, and space complexity of merge sort and quick sort. 8) Or Define a Spanning Tree T and a Minimum Spanning Tree (MST). How will you find MST using Prim's algorithm and Kruskal’s algorithm? Illustrate with an example. (16) Define a Knapsack Problem. How will you solve knapsack problem using Dynamic Programming? Illustrate with example. (16) Or Explain briefly Warshall’s and Floyd's Algorithm. 6) Explain the concept of Backtracking and Branch and Bound Technique with suitable example. (16) Or How will you solve Travelling Salesman Problem? Explain the procedure involved in it, (6) ‘What are P and NP Problems? Give atleast five problems that can be classified as NP problem, Discuss the approximation algorithms for NP hard problems. (16) Or (What is a decision tree? Draw a decision tree for a game of three questions. 8) (i) What is the complexity in sorting? Draw a valid decision tree for sorting three items. 8) 2 85814

You might also like