Design and Analysis of Algorithms - End Semester Examination - 2023
Design and Analysis of Algorithms
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
-
The fractional Knapsack problem can be solved by using
-
BFS on a graph \( G=(V,E) \) has running time
-
The minimum number of colors needed to color a graph having \( n>3 \) vertices and 2 edges is
-
Complexity the recurrence relation \( T(n)=8T(\frac{n}{2})+n^2 \) is
-
Travelling salesman problem belongs to
-
Kruskal's algorithm uses ___ and Prism' algorithm uses ___ in determining the MST
-
Level order traversal of a rooted tree can be done by starting from root and performing
-
An algorithm is made up of two independent time complexities \( f(n) \) and \( g(n) \). Then the complexities of the algorithm is in order of
-
Which of the following standard algorithms is not a greedy algorithm?
-
The node removal of which makes a graph disconnected is called
-
Write the algorithm for quick-sort and find its complexity.
-
Discuss the average, worst, best time complexity of the algorithm. Give suitable examples.
-
Construct the Huffman coding tree for the text of characters with given frequencies: T:43, I:38, V:16, K:8, L:56, E:12, O:41, Z:13, P:22, R:6.
-
State the general Knapsack problem. Write a greedy algorithm for this problem and derive its time complexity.
-
State master's theorem and find the time complexity for the following recurrence: \( T(n) = 2T(n^{1/2}) + \log n \)
-
What is negative weight-cycle? Write Bellman-Ford algorithm to find single source shortest distance of a directed graph.
-
Find the minimum number of operations required for the following matrix chain multiplication using dynamic programming: \( A(10 \times 20) * B(20 \times 50) * C(50 \times 1) * D(1 \times 100) \)
-
Write Knuth-Morris-Pratt algorithm for string matching problem.
-
Write an algorithm to find a minimum spanning tree (MST) for an undirected graph. Estimate the time complexity of your algorithm.
-
Using greedy strategy. Schedule the following jobs within deadline so as to maximize the profit. Deadline and profits are mentioned as follow:
Job i: 1, 2, 3, 4
Deadline d: 3, 2, 3, 1
Profit g: 9, 7, 7, 2
-
Write an algorithm for n-queen's problem find its time-complexity and explain the algorithm using an example.
-
Solve the single source shortest path problem for the following graph considering '1' as the source vertex using Dijkstra's algorithm.
-
Define the classes P and NP.
-
Discuss what you mean by polynomial reduction.
-
Discuss diagrammatically the relation among P class, NP class, NP hard and NP complete.
-
Describe Clique Decision Problem (CDP).
-
Explain the max-flow min-cut theorem with an example.