Anda di halaman 1dari 6

5153 DESIGN AND ANALYSIS OF ALGORITHMS anna university previous year question paper

CA5153 DESIGN AND ANALYSIS OF ALGORITHMS (REGULATION 2007) Time: Three hours Maximum: 100 marks Answer all questions. PART A [10 X 2 = 20 marks] 1.What is amortized efficiency? 2.Write the names of the basic asymptotic efficiency classes with their growth functions. 3.Define the internal path length of an extended binary tree. 4.State the Triomino Puzzle problem. 5.What are the differences between dynamic programming and divide-and-conquer techniques? 6.Give two reasons why the memory function approach is unattractive for the problem of computing a binomial coefficient. 7.Write the differences between backtracking and branch-and-bound techniques. 8.Write the three reasons to terminate a search path at the current node in a state-space tree of a branch-and-bound algorithm. 9.What are the two types to show a decision problem is NP-Complete? 10.What is halting problem? PART B [5 X 16 = 80 marks] 11.(a) Briefly discuss the sequence of steps typically required in designing and analyzing an algorithm. (10) (b) Design a recursive algorithm for computing 2n for any nonnegative integer n which is based on the formula 2n = 2n-1 + 2n-1. (6) Or 12.(a) Write a recursive algorithm for the Tower of Hanoi puzzle. Obtain the recurrence equation. (8) (b) Solve the recurrence equation which is to be obtained the above by the method of backward substitution. (8) 13.(a) Write a Mergesort algorithm and explain with an example using divide-and-conquer technique. (8) (b) Explain the working of binary search algorithm using divide-and-conquer with an example. (8) Or 14.(a) Write the Quicksort algorithm and illustrate the operation of the algorithm with an example. (8) (b) Describe the Strassens Matrix Multiplication technique. (8) 15.(a) Write and explain the dynamic programming algorithm for computing a binomial coefficient. Obtain the time efficiency of the algorithm. (8) (b) Explain the importance of optimal binary search tree. (8)

Or 16.(a) Explain the Warshalls algorithm for computing the transitive closure of a directed graph. (8) (b) Design a dynamic programming algorithm and explain for finding an optimal order of multiplying n matrices. (8) 17.(a) State and explain the n-Queen problem using backtracking. (8) (b) Apply the branch-and-bound technique in solving the Traveling Salesman Problem. (8) Or 18.(a) Illustrate the Branch-and-Bound approach of solving assignment problem. (8) (b) Solve the following instance of the knapsack problem by the branch-and-bound algorithm, with W = 16. (8) Item Weight Value 1 10 100 2 7 63 3 8 56 4 4 12 19.(a) Explain the procedure to solve the Traveling salesman Problem with approximation algorithms. (10) (b) Give short notes on decision problems, undecidable problem, and NP-Complete problem. (6) Or 20.(a) Explain how the knapsack problem is solved with approximation algorithm. (8) (b) Apply the nearest algorithm to the instance defined by the distance matrix below. Start the algorithm at the first city, assuming that the cities are numbered from 1 to 5. (8)

2251 Design and Analysis of Algorithms question bank


Unit 1 Algorithm Analysis Part A 1. What is an algorithm? 2. What is recursive algorithm? 3. What is space complexity? 4. What is time complexity? 5. Define Big oh notation. 6. Enumerate some important types of problems. 7. How will you measure Input size of algorithms? 8. What are algorithm design techniques? 9. How is an algorithms time efficiency measured? 10. Mention any four classes of algorithm efficiency? 11. Define order of an algorithm? 12. Define loop. 13. Give the syntax for FOR loop. 14. What is time space tradeoff? 15. What are the various asymptotic notations available? 16. What is a recurrence equations? 17. What is worst case efficiency? 18. What is best case efficiency? 19. What is average case efficiency? 20. Define Big Omega notation. 21. Define Big Theta notation. 22. What is recurrence equations?

Part B 1. Define the asymptotic notations used for best case average case and worst case analysis of algorithms. 2. Write an algorithm for finding maximum element of an array, perform best, worst and average case complexity with appropriate order notations. 3. Describe briefly the notations of complexity of an algorithm. 4. List the properties of various asymptotic notations. 5. Explain the various criteria used for analyzing algorithms. 6. Briefly explain how to solve recurrence equations with an example. 7. What are the loop control statements available in C++? 8. Describe about the analysis of linear search with an example, if any. 9. What are the various methods of solving recurrences? Explain them in Brief. 10. Derive the recurrence equation for Fibonacci series. Perform complexity analysis for the same. 11. Define Input Size. Write an algorithm for matrix addition and construct step table for it. 12. Explain with examples Big Oh, Omega, Theta and Little Oh asymptotic notations. 13.

Unit 2 Divide and Conquer & Greedy Algorithms Part A

1. Define merge sort. 2. Give the algorithm for merge sort. 3. Give the algorithm to merge two sorted arrays into one. 4. What is binary search? 5. Define the Divide and Conquer method. 6. What is the maximum and minimum problem? 7. Give the recurrence relation of divide and conquer. 8. What is the recurrence relation of merge sort? 9. What is meant by feasible solution? 10. Write any two characteristics of Greedy Algorithm. 11. Define optimal solution. 12. What is knapsack problem? 13. Give the time efficiency and drawback of merge sort algorithm. 14. What is the average case complexity of linear search algorithm?

Part B 1. Explain in detail merge sort. Illustrate the algorithm with a numeric example. Provide complete analysis of the same. 2. Give a detailed note on divide and conquer techniques. 3. Discuss the use of Greedy method in solving Knapsack problem and container loading. 4. Briefly explain about the binary search and write the algorithm using recursion and iteration for binary search. 5. Explain in brief about finding the maximum and minimum elements in a set of n elements. 6. Write a pseudo code for a divide and conquer algorithm for finding values of both the largest and the smallest elements in any array of n numbers 7. Write an algorithm for searching an element using binary search method. Give an example. 8. Mention any three search algorithms which are preferred in general? Why?

Unit 3 Dynamic Programming Part A 1. What is dynamic programming? 2. Define multistage graph. 3. Write the difference between the Greedy method and Dynamic programming. 4. What are the features of dynamic programming? 5. What are the drawbacks of dynamic programming? 6. Write the general procedure of dynamic programming. 7. Define principle of optimality. 8. Give an example of dynamic programming and explain. 9. Explain any one method of finding the shortest path. 10. Define 0/1 knapsack problem. 11. What is the formula to calculate optimal solution in 0/1 knapsack problem? 12. Write about travelling salesperson problem. 13. Write some applications of TSP. 14. Give the time complexity and space complexity of TSP. 15. How will you construct an optimal binary search tree? Part B 1. Describe the travelling salesman problem and discuss how to solve it using dynamic programming. 2. Write an algorithm for finding an optimal binary search tree. 3. What is dynamic programming? Explain in detail. 4. Explain in detail about the multistage graphs. 5. Explain the concepts of travelling salesperson problem. 6. How to insert and delete an element in a Binary Search Tree? 7. Write and explain the concepts of 0/1 knapsack problem using dynamic programming. 8. Write an algorithm of all pairs shortest path problem. 9. Solve the following 0/1 knapsack problem using dynamic programming m = 6, n = 3, (w1,w2,w3) = (2,3,3), (p1,p2,p3) = (1,2,4). 10. What is Travelling Sales person problem and what are its applications?

11. Write a pseudocode of the dynamic programming algorithm for solving Optimal Binary Search tree and determine its time and space efficiencies.

Unit 4 Backtracking Part A 1. What is backtracking? 2. What are the requirements that are needed for performing Backtracking? 3. What are the factors that influence the efficiency of the backtracking algorithm? 4. State the principle of backtracking? 5. What is n queens problem? 6. Draw the solution for the 4 queen problem. 7. State 8 queens problem. 8. How can the output of a backtracking algorithm be thought of? 9. What is knapsack problem? 10. Define the Hamiltonian circuit. 11. State Sum of Subsets problem. 12. State m - colorability decision problem. 13. Define chromatic number of the graph. Part B 1. Explain subset sum problem and discuss the possible solution strategies using backtracking. 2. Write short notes on n Queens problem. 3. Discuss the use of Greedy method in solving Knapsack problem and subset sum problem. 4. What is backtracking? Explain in detail. 5. Explain in detail about the graph coloring techniques. 6. Explain the applications of backtracking.

Unit 5 Graph Traversals and Branch & Bound Part A

1. What is minimum cost spanning tree? 2. When do you say a tree as minimum spanning tree? 3. What is Hamiltonian cycle in an undirected graph? 4. What is branch and bound? Explain in detail. 5. When can a search path be terminated in a branch and bound algorithm? 6. Compare backtracking and branch and bound. 7. What are the additional features required in branch and bound when compared to backtracking? 8. What are the searching techniques that are commonly used in branch and bound method? 9. What are NP hard and NP complete problems? 10. What is maxclique problem?

11. What is approximate solution? 12. What is decision problem? 13. What is traversal of a graph? What are the types of traversal? 14. What is a graph? How are the graphs represented? 15. Define the term strongly connected components.

Part B 1. Explain the method of finding the minimum spanning tree for a connected graph using Prims algorithm. 2. How will you find the shortest path between two given vertices using Dijkstras algorithm? Explain. 3. Discuss the solution for traveling salesman problem using branch and bound technique. 4. Define spanning tree? Discuss the design steps in Prims Algorithm to construct minimum spanning tree with an example. 5. Give a suitable example and explain the Breadth First search and Depth first search algorithms. 6. Write the Dijkstras algorithm for single source shortest path problem 7. Explain Kruskals algorithm. 8. Explain the difference between Breadth First search and Depth first search. 9. Explain in detail about NP hard Graph problems. 10. Write and explain the techniques in branch and bound method. 11. Write and explain the concepts of 0/1 knapsack problem. 12. Prove that any weighted connected graph with distinct weights has exactly one minimum spanning tree 13. Explain the terms: NP-Hard and NP Complete problems 14. Discuss with examples, various graph traversal techniques. 15. Explain how bi connected components can be determined for a given graph. What is its complexity. 16. Mention salient features of NP hard and NP complete classes. Discuss two examples for each case. 17. Differentiate between NP Complete and NP hard.

Anda mungkin juga menyukai