0% found this document useful (0 votes)
21 views7 pages

QUESTION BANK

The document consists of a series of questions and tasks related to algorithms, data structures, and their complexities across multiple modules. It covers topics such as asymptotic notation, sorting algorithms, time complexity, dynamic programming, graph algorithms, and NP-completeness. The questions are categorized into short and long questions, requiring definitions, proofs, algorithm writing, and analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views7 pages

QUESTION BANK

The document consists of a series of questions and tasks related to algorithms, data structures, and their complexities across multiple modules. It covers topics such as asymptotic notation, sorting algorithms, time complexity, dynamic programming, graph algorithms, and NP-completeness. The questions are categorized into short and long questions, requiring definitions, proofs, algorithm writing, and analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Module-I

Sort Question
1. Define the meaning of asymptotically tight upper bound? [CO-1][PO-1]
2. Is the running time of merge sort depends on the value of keys in input file? Explain [CO-2][PO-
2]
3. Find the growth order of n, log n, 1, n log n, 2 n , n 3 ,n 2 in increasing sequence.
[CO-2][PO-3]
4. When best case and worst case partitioning will occur in quick sort? [CO-2][PO-2]
n
5. Prove that n!=o(n ). [CO-1][PO-3]
6. Consider the recurrence T(n)=T(n-1)+1 and T(1)=1. Find its time complexity [CO-1][PO-3]
7. What are the characteristics of an algorithm? [CO-1][PO-1]
8. Define Worst case, Average case and Best case efficiency of an algorithm. [CO-1][PO-1]
9. Differentiate between priori & posteriori analysis of an Algorithm. [CO-1] [PO-2]
10. Arrange the following functions from the lowest asymptotic order to the highest. 2 n, 10n, n log
n, 4n3, log n, 5n2. [CO-2][PO-1]
11. What are the best case and worst case time complexity of Linear Search? [CO-2][PO-2]
12. What are the different ways of measuring the running time of an algorithm? [CO-1][PO-2]
13. Find the O-Notation for the following function f(n) = 27n2 + 16n + 25 [CO-2][PO-3]
14. State the different phases of an algorithm. [CO-1][PO-1]
15. Define asymptotically tightly bound notation. [CO-1][PO-2]
16. Draw the Venn diagram to establish the relationship between the different asymptotic notations
of an algorithm. [CO-4][PO-2]
17. What are the different ways of measuring the running time of an algorithm? [CO-1][PO-1]
18. Draw the Venn diagram to establish the relationship between the different asymptotic notations
of an algorithm. [CO-1][PO-2]
19. Define Worst case, Average case and Best case efficiency of an algorithm. [CO-1][PO-1]
20. What are the best case and worst case time complexity of Linear Search? [CO-1][PO-2]
21. Differentiate between Big-Oh and Big-Omega notation [CO-1][PO-1]
22. Define and Differentiate between time and space complexity. [CO-1][PO-1]
23. What is mean by growth between function [CO-1][PO-1]
24. n!=o(nn) True or false [CO-1][PO-2]
25. Prove that n!=o(2n) using limit theorem [CO-1][PO-2]
26. Write the Recurrence relation for binary search and solve it [CO-1][PO-2]
27. Is all the problem has recurrence relation. Explain [CO-1][PO-2]
Long Question:

1. T(n)=2T(n 1/2 )+log n solve by recursion tree method [CO-1][PO-3]


2. Write the Recurrence relation for binary search and solve it [CO-1][PO-2]
3. Find the growth order of n, log n, 1, n log n, 2 n , n 3 ,n 2 in increasing sequence. [CO-2][PO-3]
4. Arrange the following functions from the lowest asymptotic order to the highest. 2 n, 10n, n log
n, 4n3, log n, 5n2. [CO-2][PO-3]
5. Prove that n!=o(nn). [CO-1][PO-3]
6. Prove that n!=o(2n) using strilings formula [CO-1][PO-3]
7. T(n)=2T(n 1/2 )+log n solve by recursion tree method [CO-1][PO-3]
8. T(n) = 8T(n/2) + n2 by masters method [CO-1][PO-3]

9. T(n)=2T(n 1/2 )+log n, T(n)=3T(n/4)+n lg n [CO-1][PO-3]


10. For which recurrence masters method is not applicable. Give one example and find the solution
for that. [CO-1][PO-4]
11. T(n)=3T(n/4)+n lg n solve by Masters method [CO-1][PO-3]
12. T(n)=4T(n/4)+n lg n solve by Extension Masters method. Why Extension Masters method
required [CO-1][PO-3]

Module-II
Short Question
1. What is the time complexity for binary search [CO-2][PO-2]
2. What is heap. How max heap is different from min heap. [CO-2][PO-1]
3. Write the recurrence relation for binary search [CO-2][PO-2]
4. What is the use of partition in quick sort? [CO-2][PO-2]
5. Write the recurrence relation for quick sort [CO-2][PO-3]
6. What is the best case time complexity for quick sort [CO-2][PO-2]
7. Where the partition will occurs in quick sort if array elements are same [CO-2][PO-2]
8. Where the partition will occurs in quick sort if array elements are increasing order
[CO-2][PO-4]
9. Where the partition will occurs in quick sort if array elements are decreasing order
[CO-2][PO-4]
10. Define heap and heap size. [CO-2][PO-1]
11. Difference between max heap and min heap [CO-2][PO-1]

12. In ‘n’ element heap what will be the height [CO-2][PO-3]


13. If in a heap height is h, what is the maximum and minimum element can be there
[CO-2][PO-3]
14. Write the recurrence relation for merge sort [CO-2][PO-3]
15. Write the recurrence relation for heap sort. [CO-2] [PO-3]
16. Define priority queue. [CO-1][PO-1]
17. What is the time complexity to insert a node in priority queue [CO-2][PO-2]
18. What is the time complexity to increase a node in priority queue [CO-2][PO-2]
19. What is the time complexity to extract a node in priority queue [CO-2][PO-2]
13. How greedy is different from dynamic programming. [CO-2][PO-2]
20. Name any two dynamic programming problem and why. [CO-2][PO-2]
21. What is the time complexity for activity selection problem? [CO-2][PO-2]
22. Write the algorithm for optimal parenthesis. [CO-2][PO-1]
23. How fractional knapsack is different from 0/1 knapsack. [CO-2][PO-1]
24. Define the objective of Assembly-line scheduling. [CO-2][PO-1]
25. How Huffman code is used in data compression. [CO-2][PO-2]
26. What is the time complexity of Huffman code evaluation? [CO-2][PO-2]
27. What is the time complexity matrix chain ordering? [CO-2][PO-2]
28. What is the time complexity of Assembly-line scheduling? [CO-2][PO-2]

Long Question:

1. Difference between greedy and dynamic programming [CO-2][PO-2]


2. Write down the algorithms for QUICK-SORT and PARTITION procedure. Specify the best case and
worst case time complexity of quick sort [CO-2][PO-2]
3. Construct max heap from the following list: {16,14,10,8,7,9,3,2,4,1} and also sort the list of
element. [CO-2][PO-3]
4. Write down the algorithm of binary search. Show that the worst case time complexity of binary
search is O(lg n) [CO-2][PO-3]
5. Write down the algorithms for MERGE-SORT and MERGE procedure. Prove that the running
time of merge sort is ϴ(n lg n) [CO-2][PO-2]
6. What is the optimal Huffman code for the following set of frequencies based on the first eight
Fibonacci numbers a:1 b:1,c:2,d:3,e:5,f:8,g:13,h:21 [CO-2][PO-2]
7. Define LCS. Write down the algorithm for computing the length of an LCS. Find the LCS from the
given sequences X={A,B,C,B,D,A,B} and Y={B,D,C,A,B,A} [CO-2][PO-2]
8. What is Activity Selection Problem? Find the solution for the following set of activities
[CO-3][PO-3]

9. Find the order of multiplication for matrix whose dimension is given as A={ 10,20,15,10,5} which
can evaluate in minimum time [CO-2][ PO-3]
10. Define LCS. Write down the algorithm for computing the length of an LCS. Find the LCS from the
given sequences X={A,B,C,B,D,A,B} and Y={B,D,C,A,B,A} [CO-2][ PO-3]
11. Define Assembly-line scheduling. Write down the algorithms and analysis the Time complexity
[CO-2]
[PO-3]
12. What is the optimal Huffman code for the following set of frequencies based on the first eight
Fibonacci numbers a:1 b:1,c:2,d:3,e:5,f:8,g:13,h:21 [CO-2][PO-3]
13. Define Assembly-line scheduling. Write down the algorithms and analysis the Time complexity
[CO-2]
[PO-3]
14. Which problem can be applied in dynamic programming approch? Discuss any one. [CO-2]
[PO-4]

Module-III
Short Question
1. What is the job of disjoint data structure? [CO-3][PO-2]
2. Mention different operation on disjoint data structure with time complexity. [CO-3][PO-1]
3. White the algorithm to find connected component. [CO-3][PO-3]
4. How you can identify two node in the same component in disjoint data structure [CO-3]
[PO-2]
5. What is the time complexity for union in disjoint data structure? [Co-3][Po-2]
6. Mention different operation in disjoint forest. [CO-3][PO-1]
7. What is weight in graph algorithms? [CO-3][PO-1]
8. How DFS is different from DFS. [CO-3][PO-2]
9. Define minimum spanning tree. [CO-3][PO-1]
10. What is time complexity of kruskal and prims algorithms. [CO-3][PO-2]
11. What is negative weigh cycle? [CO-3][PO-1]
12. Define single source shortest path. [CO-3][PO-1]
13. What do you mean by initialization of single source shortest path? [CO-3][PO-3]
14. Write the pseudo code for relax for an edge. [CO-3][PO-3]
15. How Bellman fords algorithms is different from Dijkstra algorithms. [CO-3][PO-2]
16. How do you understand the all pair shortest path. [CO-3][PO-2]
17. The minimum number of comparisons required finding the minimum and the maximum of
100 numbers is _________________. [CO-2][PO-2]
Long Question

18. Write down Kruskal’s and Prim’s algorithm and also specify the running time of both
algorithms [CO-3] [PO-3]
19. Find the BFS of the following graph by considering u as the start node. [CO-3][PO-3]

20. Explain Prim’s algorithm and its complexities. Analyze it with an example. [CO-3][PO-2]
21. Find the DFS of the following graph by considering u as the start node [CO-3][PO-2]

22. Briefly describe working mechanism Dijkstra algorithms with suitable example. [CO-3][PO-3]
23. Briefly describe Bellman Ford algorithms with suitable example. [CO-3][PO-3]
24. Explain all pair shortest path algorithms. Evaluate the time complexity. [CO-3][PO-3]
Module: IV
Short question:

1. What is the different class of algorithms w.r.t time complexity? [CO-4][PO-1]


2. Define 8 queen problems. [CO-4][PO-1]
3. Define branch and bound technique to solve a problem [CO-4][PO-1]
4. Define back tracking technique to solve a problem. [CO-4][PO-1]
5. Define subset sum problem with example. [CO-4][PO-1]
6. Define clique problem with example. [CO-4][PO-3]
7. Define vertex cover problem with example. [CO-4][PO-2]
8. Subset sum problem is P, NP, NP=hard or NP complete justify. [CO-4][PO-4]
9. Clique problem is P, NP, NP=hard or NP complete justify. [CO-4][PO-4]
10. Vertex cover problem is P, NP, NP=hard or NP complete justify. [CO-4][PO-4]
11. TSP is P, NP, NP=hard or NP complete justify. [CO-4][PO-4]
12. What is approximation algorithms and why it needs? [CO-4][PO-2]
13. Using Back Tracking find the solution of subset sum problem taking one example. [CO-4][PO-2]
14. What are string matching and what time complexity by brute force approach is? [CO-4][PO-1]
15. Define P, NP, NP hard, NP complete. [CO-4][PO-1]
16. Write the Approximation algorithm for Traveling Seals man problem. Is it polynomial
computable? [CO-4][PO-2]

Long Question

17. Write the approximation algorithm for travelling salesman problem [CO-4][PO-3]
18. Explain how back tracking can be applied to N-Queen problem. [CO-4][PO-4]
19. Suppose we use two string matching problems, consisting of a text T and a string P Problem 1 is
as follows: T = aaabaadaabaaa P = aabaaa Apply the Knuth–Morris–Pratt pattern matching
algorithm to the first pattern [CO-4][PO-3]
20. Suppose we use two string matching problems, consisting of a text T and a string P , is as
follows: T = 9875623 P = 75 and q=7 find the position using Rabin Karp algorithms
[CO-4][PO-3]
21. What is Approximation algorithms and why we need it? Is it polynomial computable
[CO-4][PO-4]
22. Define P, NP, NP hard, and NP complete. Construct relational diagram among them.
[CO-4][PO-4]
23. Describe branch and bound technique for 8- queen problem. . Is it polynomial computable.
[CO-4][PO-4]
24. Describe branch and bound technique for Subset sum problem. . Is it polynomial computable.
[CO-4][PO-4]
25. Describe Back tracking technique for 8- queen problem. Is it polynomial computable.
[CO-4][PO-3]
26. Describe Back tracking technique for Subset sum problem. Is it polynomial computable. [CO-4]
[PO-3]
27. Suppose we use two string matching problems, consisting of a text T and a string P , is as
follows: T = 9875623 P = 75 and q=7 find the position using Rabin Karp algorithms. [CO-4][PO-3]
28. Give the failure function (or prefix function) of the Knuth–Morris– Pratt pattern matching
algorithm for the pattern P from the first pattern matching problem [CO-4][PO-3]

You might also like