You are on page 1of 4

Question Bank

Unit I

1 Solve the following recurrence using Master method: T (n) = 4T (n/3) + n2

2. Name the sorting algorithm that is most practically used and also write its Time Complexity.

3. Find the time complexity of the recurrence relation

T(n)= n +T(n/10)+T(7n/5)

4. Compare Time Complexity with Space Complexity.

5. What are the characteristics of the algorithm?

6. Solve the following By Recursion Tree Method T(n)=n+T(n/5)+T(4n/5)

7. Explain HEAP-SORT on the array. Illustrate the operation of HEAP-SORT on the array A= {6, 14, 3, 25,
2, 10, 20, 7, 6}

8. The recurrence T (n) =7T (n/2) +n 2 describe the running time of an algorithm A.A competing
algorithm A has a running time of T’ (n) =aT’ (n/4) +n 2 .What is the largest integer value for a A’ is
asymptotically faster than A?

9. Solve the following recurrence relations a) x(n)=x(n -1) + 5 for n > 1 x(1)=0 b) x(n)=3x(n-1) for n > 1
x(1)=4 c) x(n)=x(n-1)+n for n > 0 x(0)=0 d) x(n)=x(n/2)+n for n > 1 x(1)=1 (e) x(n)=x(n/3)+1 for n >1 x(1)=1
10. Write the asymptotic notations used for best case ,average case and worst case analysis of
algorithms and Write an algorithm for finding maximum element of an array perform best , worst and
average case complexity with appropriate order notations

11. Explain quick sort algorithm and simulate it for the following data 20,35, 10, 16, 54, 21,

12. Illustratemerge sort algorithm and discuss time complexity.

13. Sort the list of numbers using merge sort: 78, 32, 42, 62, 98, 12, 34, 83.

14. Understand merge sort on letters H, K, P,C,S,K,R,A,B,L. 15. Show that the average case time
complexity of quick sort is O(nlogn)

Unit II

1. Insert the following information F,S,Q,K,C,L,H,T,V,W,M,R,N,P,A,B,X,Y,D,Z,E,G,I. Into an empty B-tree


with degree t=3.

2. What is Red-Black tree? Write an algorithm to insert a node in an empty red-black tree explain with
suitable example.
3. Explain Convex –Hull problem.

4. Explain properties of Binomial Heap in .Write an algorithm to perform uniting two Binomial Heaps.
And also to find Minimum Key.

5. Explain the algorithm for deleting element of Binomial Heaps. And give the Example for the same.

6. Draw the complete binary tree of height 3 on the keys {1, 2, 3... 15}. Add the NIL leaves and color the
nodes in three different ways such that the black heights of the resulting trees are: 2, 3 and 4.

7. Show the red-black trees that result after successively inserting the keys 41,38,31,12,19,8 into an
initially empty red-black tree.

8. In a previous example, we found that the red-black tree that results from successively inserting the
keys 41,38,31,12,19,8 into an initially empty tree. Now show the red-black trees that result from the
successful deletion of the keys in the order 8, 12, 19,31,38,41.

Unit III

1. Explain Single source shortest path.

2. What is Minimum Cost Spanning Tree? Explain Kruskal’s Algorithm and Find MST of the Graph. Also
write its Time-Complexity

3. Find the shortest path in the below graph from the source vertex 1 to all other vertices by using
Dijkstra’s algorithm.

4. Given the six items in the table below and a Knapsack with Weight 100, what is the solution to the
Knapsack problem in all concepts. I.e. explain greedy all approaches and find the optimal solution 254

5. Define Knapsack problem?

6. List the general plan in divide and conquer algorithm

7. Write an algorithm for merge sort

8. Write an algorithm for quick sort

9. How the operations performed in Strassen’s Matrix multiplication

10. What is the largest number of key comparisons made by binary search in searching for a key in the
following array? 3,14, 27, 31, 39, 42, 55, 70, 74, 81, 85, 93, 98

11. Apply the Quick sort to the list E , X , A , M , P , L , E 255

12. Solve the average case recurrence for quick sort.

13. Explain in detail quick sorting method. Provide a complete analysis of quick sort with example.
14. Explain in detail merge sort. Illustrate the algorithm with a numeric example. Provide complete
analysis of the same.

15. Write short notes on the following i. Strassen’s Matrix Multiplication ii. Multiplication of largest
integer.

16. Write the Huffman Algorithm.

17. Define prim’s Algorithm

18. What is Kruskal’s Algorithm?

19. Define Dijkstra’s Algorithm

20. Differentiate prim’s Algorithm and Kruskal’s Algorithm

21. What is Knapsack problem?

22. How to calculate the efficiency of Dijkstra’s Algorithm?

Unit IV

1. Difference between Greedy Technique and Dynamic programming

2. Define Graph Coloring.

3. Differentiate between Backtracking and Branch and Bound Techniques.

4. What is backtracking? Discuss sum of subset problem with the help of an example.

5. Write down an algorithm to compute Longest Common Subsequence (LCS) of two given strings and
analyze its time complexity.

6. What is principle difference between dynamic programming and divide and Conquer techniques?

7. Apply Warshall’s Algorithm to find the transitive closure of the digraph defined by the following
adjacency matrix 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0

8. Describe the Warshall’s algorithm with example and analyze its efficiency

9. Explain Floyd’s Algorithm for all pair shortest path algorithm with example and analyze its efficiency.
256

10. Apply the bottom up dynamic programming algorithm to the following instance of Knapsack Problem
Item Weight Value 1 7 $42 2 3 $12 3 4 $40 4 5 $25 Capacity W=10

11. Define N queens problem

12. Define branch and bound problem.


13. Describe the travelling salesman problem and discuss how to solve it using dynamic programming?
14. Explain all pairs shortest path problem with example

15. Write an algorithm for N-queens problem using backtracking.

16. Explain subset-sum problem and discuss the possible solution strategies using backtracking.

17. Write an algorithm for Hamiltonian cycle with an example

Unit V

1.Discuss the problem classes P, NP and NP –complete .with class relationship.

2. Compute the prefix function π for the pattern P= a b a c a b using KNUTH- MORRIS –PRATT Algorithm.
Also explain Naïve String Matching algorithm.

3. Explain Approximation and Randomized algorithms.

4. Define complexity theory

5. Define P and NP problems.

6. Give examples for NP Complete problems.

7. What is CNFs satisfiablity problem?

8. What is subset- sum problem?

9. Describe in detail about P and NP Problems.

10. Write short notes on NP Complete Problem.

11. Explain application of FFT.

12. What do you mean by polynomial time reduction. Describe the detail of The Knuth-Morris-Pratt
(KMP) for string matching algorithm. Compute Π for the pattern 'p' below:

You might also like