0% found this document useful (0 votes)
89 views4 pages

CST306 Algorithm Analysis and Design, May 2024

The document outlines an examination paper for the B.Tech Degree in Algorithm Analysis and Design, scheduled for May 2024. It includes various questions divided into two parts: Part A consists of short answer questions, while Part B requires detailed answers from different modules. Topics covered include binary search trees, AVL trees, algorithm design strategies, graph algorithms, and complexity classes.

Uploaded by

Lekshmi R Nair
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)
89 views4 pages

CST306 Algorithm Analysis and Design, May 2024

The document outlines an examination paper for the B.Tech Degree in Algorithm Analysis and Design, scheduled for May 2024. It includes various questions divided into two parts: Part A consists of short answer questions, while Part B requires detailed answers from different modules. Topics covered include binary search trees, AVL trees, algorithm design strategies, graph algorithms, and complexity classes.

Uploaded by

Lekshmi R Nair
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/ 4

Reg No.

: Name:

APJ ABD uLKALffittqff Elfi$81'68t"o-"^IVERsIry


B.Tech Degree 56 (R,S) / 56 (PT) (R,S) Examination May 2024 (2019
h
o
-,
\r

Course Code: CST306


Course Name: ALGORITHM ANALYSIS AI\D DESIGN
Max. Marks: 100 Duration:3 Hours

PART A
Ansver oll questions, each carries 3 morlcs. Marks

Explain the best case and worst case of a search operation in a binary search tree. (3)
2 Is n2 e o(nz)? (Little o). Justiff your answer. (3)

3 Explain about any two cases of rotations in an AVL-Tree with proper example. (3)

4 Obtain the topological sort order ofthe given graph G=(V,E) (3)

Give the control abstraction of divide and conquer algorithm design strategy. (3)

Consider an instance of fractional knapsack problem rvith 3 objects and capaciq'' (3)

20Kg. The profit and weight vectors corresponding to the 3 objects respectively
are ( 10, 15, 20) and (8, 10, 20). Compute an optimal solution to this instance of
fractional knapsack problem. What will be the profit earned corresponding to
this solution?
J+ What are the main steps involved in solving a computational problem using the {3)
algorithm design strategy Dynamic Programming.
8 List any three diffenences between Backtracking and Branch and Bound (3)

strategies.

9 Let G = (V, E) be a graph with vertex set V and edge set E. Define the (3)

optiinization and decision versions of CLIQUE problem in G.


l0 Compare Las Vegas Algorithm and Monte Carlo algorithms. (3)

Page lof4
12(xrcsT306052302

PART B
Answer onefull queslionfrom each module, each curries Il nurks.
Module I
il a) Illushate the best case, wSrst case and average case of linear search algorithm (7)
with proper examples.

b) Solve the following recurrence using recursion tree method. (7)

T(n)= 2T(n/2) + |
OR
12 a) Solve the following recurrence using substitution method. (8)
r(n) = zt + cnz
Q)
b; Solve the following recurrences using Master's theorem. (6)
,{
Dr(n) =zr(i)+r
iD r(n) = zr (*) + ttn
Module II
13 a) Create an AVL tree by inserting the values from l to 8 in increasing order. (7)
b) Give an algorithm for computing connected components in a graph using (7)
Disjoint Set data structur€ operations. Explain the working of this algorithm on
thc graph given below.

oRr
14 a) Give an appropriate algorithm for Oefr First Search in a given connected (e)
graph. Derive the time complexity of the algorithm with proper justification.

b) What are strongly connected components of a directed graph? Explain with an (s)
example.

PageZof4
1200csT!to6052302

Module III
15 a) Apply Dijkstar's algorithm on the given graph to find the shortest path to all (6)
destinations starting from verQx with label I

b) Write Kruskal's algorithm to find the minimum cost spanning tree ofa given (8)
weighted connected graph. What is the time complexity of the algorithm? Justifr
your answer.

OR
16 a) Formally state the fractional knapsack problem. Give an algorithm for (9)
computing an optimal solution to this problem using greedy strategy. What is its
tirne complexity? Justify your answer.
b) Give the control abstraction of greedy algorithm design strategy. (5)

Module W
l7 a) Given a chain of 4 matrices < Al, A2, A3, A4 > with dimensions <5 x 4>, <4 (9)

t x 6>, <6 x 2>, and 4 x 7>. Fully parenthesisze the given matrices so that the

numbcr of scalar multiplications required to compute their product is minimum.


What is the value of optimum number of scalr multiplicationsto compute the
product ofthe given chain of matrices?

,b) Define the control abstraction for Backtracking (5)


oR<
18 a) Consider the weighted directed graph given in the following Figure. (8)

Page 3of4
12(xrcST3060.52302

Construct the weight adjacency matrix of the given graph. Apply the Floyd-
Warshall algorithm to construct the matrix Dzthat represents the shortest paths
distance between all vertices i and j (l <= i <: 5 and I <= j <= 5) through
intermediate vertices I and?.
b) Define n{ueens problan. Draw the state space diagram of 4nueens problem by (6)

applying backtrack method.


Module V
19 a) Let G : (V, E) be a graph with vertex set V and edge set E. Prove that the (5)
decision version of Clique problem in G belongs to the complexity class NP.
b) Give the randomized version ofQuick Sort and prove that the expected number (9)

of comparisons performed by this algorithm is O(nlog2n)


OR
20 a) Let G = (V, E) be a graph with vertex set V and edge set E. What is meant by a (8)

vertex cover of G? Also prove that the decision version of vertex cover problem
is NP-Hard.

b) Define Bin Packing problem. Give the First Fit heuristc approximation for this (6)

problem. What is the approximation ratio ofthis heuristic?


rl+!t*

Page 4of 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy