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

Btech Cs 4 Sem Design and Analysis of Algorithms Btcoc401 May 2019

This document is an examination paper for the Design and Analysis of Algorithms course at Dr. Babasaheb Ambedkar Technological University, covering various topics such as Big O notation, algorithm analysis, merge sort, greedy methods, and dynamic programming. Students are instructed to attempt five questions from a selection of six, with specific instructions on how to illustrate their answers. The exam was conducted on May 14, 2019, and consists of questions that require both theoretical explanations and practical problem-solving.

Uploaded by

Amaan Khan
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)
24 views

Btech Cs 4 Sem Design and Analysis of Algorithms Btcoc401 May 2019

This document is an examination paper for the Design and Analysis of Algorithms course at Dr. Babasaheb Ambedkar Technological University, covering various topics such as Big O notation, algorithm analysis, merge sort, greedy methods, and dynamic programming. Students are instructed to attempt five questions from a selection of six, with specific instructions on how to illustrate their answers. The exam was conducted on May 14, 2019, and consists of questions that require both theoretical explanations and practical problem-solving.

Uploaded by

Amaan Khan
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

DR.

BABASAHEB AMBEDKAR TECHNOLOGICAL


UNIVERSITY LONERE RAIGAD -402 103
Semester Examination - Summer 2019

Branch: Computer Engineering Sem.:-V

Subject and Subject Code:- Design and Analysis of Algorithms (BTCOC401)

Date:- 14/05/2019 Marks: 600 Time: 3 Hrs.

Instructions to the Students


1. Each Question caries 12 marks.
2. Attempt Any Five Questions of the following.
3. Illustrate your answers with neat sketches, diagram etc., wherever
necessary.
4.If some part or parameter is noticed to be missing, you may appropriately
assume it and should mention it clearly.

Q.1. Attempt Any Three from the following questions. (04*03=12)


a) Define Big O notation? What is total time complexity of following code ?
int a,b.c,d,i

for (i 0is=l1; i++)


a = atb;

C+a;

b) Define algorithm. What is the need of algorithm analysis ? Which factors affect
runtime of algorithm?

c) Solve the following recurrence relation using characteristic polynomial.


n if n=0 or n=1
tn
n-+tn-2, otherwise
d) Solve the following recurrence using master method. Verify solution using
substitution method.
T(n) = 2T (n/2) + cn
Q.2.Attempt the following questions (06*02=12)
a) Write an algorithm of merge sort and illustrate the operation on an array
using Merge Sort.
A={5 2 4 7 I3 2 6)

b)Multiply following two matrices using Strassen's matrix multiplication


algorithm.
Matrix A=1 Matrix B=
Matrix A =
< Matrix B=

Q.3. Solve the following questions (06 02-12)


a) What is Greedy method? Explain elements of Greedy method.

b) Construct an optimal instance of Huffman Code for the following set of


frequencies_using Greedy method.
Characters Al A2 A3 A4 AS A6
"a" "b" "e" |"d" "e" P
|Frequency 45 13 12 |16 9 5

Q.4. Solve the following questions: (06*02=12)


a) Determine longest common subsequence using dynamic programming approach
for X and Y. What is the length of longest common subsequence?
X=<A. B, C, B. D, A, B> Y=<B, D, C, A, B,A>
b) Find the shortest path using Bellman Ford algorithm for the following graph.
Note that vertex z is source vertex.
Q.5. Solve the following questions (0602-12)
a) Solve the following 15-Puzzle Problem.

9 10 7

b) How 4-Queens problem is solved by backtracking approach? Explain with the

help of state space tree.

Q.6. Attempt any three Questions (04*03-12)

a) Explain Class P, Class NP and Class NPC problems in detail.


b) Insert the following keys into empty B-Tree with minimum degree 2. Show the
configuration of B-Tree after each insertion operation.
Keys: F S Q KCL HT V W MRNPAB X Y D ZE

c)What do you mean by Red Black Tree?. What are the characteristics of Red
Black tree?

d) Explain Polynomial time reduction withexample


********** ************

You might also like