Vous êtes sur la page 1sur 5

GKM COLLEGE OF ENGINEERING & TECHNOLOGY

CS 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 algorithm’s 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 – Queen’s 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
Prim’s algorithm.
2. How will you find the shortest path between two given vertices using Dijkstra’s
algorithm? Explain.
3. Discuss the solution for traveling salesman problem using branch and bound technique.
4. Define spanning tree? Discuss the design steps in Prim’s 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 Dijkstra’s algorithm for single source shortest path problem
7. Explain Kruskal’s 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.

Vous aimerez peut-être aussi