0% found this document useful (0 votes)
57 views

2023 June CST306-C

Uploaded by

ktusemester
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

2023 June CST306-C

Uploaded by

ktusemester
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

C 1200CST306052303 Pages: 3

Reg No.:_______________ Name:__________________________


APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
B.Tech Degree S6 (R, S) / S6 (PT) (R) Examination June 2023 (2019 Scheme)

Course Code: CST306


Course Name: ALGORITHM ANALYSIS AND DESIGN
Max. Marks: 100 Duration: 3 Hours
PART A
Answer all questions, each carries 3 marks. Marks

1 Show that for any real constants a and b, where b > 0, (n + a) b = O(n b ) (3)
2 Solve the following recurrence equations using Master theorem.
a. T(n) = 3T(n/2) + n2 (3)
b. T(n) = 2T(n/2) + n log n
3 Define AVL tree. Explain the rotations performed for insertion in AVL tree. (3)
4 Find the different topological ordering of the given graph. (3)

5 Write the control abstraction of divide and conquer strategy. (3)


6 Compare Strassen’s matrix multiplication with ordinary matrix multiplication. (3)
7 Differentiate backtracking technique from branch and bound technique. (3)
8 What is Principle of Optimality? (3)
9 Differentiate P and NP problems. Give one example to each. (3)
10 Define graph coloring problem. (3)
PART B
Answer one full question from each module, each carries 14 marks.
Module I
11 a) Define Big Oh, Big Omega and Theta notations and illustrate them graphically. (7)
b) Find the time complexity of following code segment (7)
(i) for (int i = 1; i <= n; i *= c) {
// some O(1) expressions
}

Page 1of 3
1200CST306052303

for (int i = n; i > 0; i /= c) {


// some O(1) expressions
}
(ii) for (int i = 1; i <= n; i += c) {
// some O(1) expressions
}
for (int i = n; i > 0; i -= c) {
// some O(1) expressions
}
OR
12 a) Find the best case, worst case and average case time complexity of binary search. (7)
b) Find the time complexity of following function using recursion tree method. (7)
(i) T(n) = 2 T(n/2) + n2
(ii) T(n) = T(n/3) + T(2n/3) +n
Module II
13 a) Construct AVL tree by inserting following elements appeared in the order. (7)
21, 26, 30, 9, 4, 14, 28, 18,15
b) Explain union and find algorithms in disjoint datasets. (7)
OR
14 a) Write DFS algorithm for graph traversal. Also derive its time complexity. (7)
b) Find the strongly connected components of the given directed graph. (7)

Module III
15 a) Explain 2- way merge sort algorithm with an example and derive its time (7)
complexity.
b) Find the optimal solution for the following Fractional Knapsack problem. (7)
Given the number of items(n) = 7, capacity of sack(m) = 15,
W={1, 3, 5, 4, 1, 3, 2} and P = {10, 15, 7, 8, 9, 4}
OR
16 a) Apply Kruskal’s algorithm for finding minimum cost spanning tree. (7)

Page 2of 3
1200CST306052303

b) Apply Dijikstra’s algorithm for finding the shortest path from vertex A to all (7)
other vertices.

Module IV
17 a) Find the optimal parenthesis of matrix chain product whose sequence of (8)
dimensions is 5 x 4, 4 x 6, 6 x 2, 2 x 7
b) Explain 4 queen problem. Draw the state space tree for 4 queen problem. (6)
OR
18 a) Define TSP problem. Apply branch and bound algorithm for solving TSP. (9)

b) Write Floyd Warshall’s algorithm for finding all pairs shortest path algorithm. (5)
Module V
19 a) Explain the first fit-decreasing strategy of bin packing algorithm. (7)
b) Prove that Clique Decision problem is NP-complete. (7)
OR
20 a) Differentiate Las Vegas and Monte Carlo algorithms (7)
b) Explain randomized quick sort with the help of suitable examples. (7)
****

Page 3of 3

You might also like