We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
TCS-503 250 Printed Pages : 4
Paper Code & Roll No. to be filled in your Answer Book
rotNo._[ | TTT TT TTT |
Odd Semester Examination-2016
B.Tech (Semester-V)
DESIGN & ANALYSIS OF ALGORITHM
[Time : 3 Hours] [Maximum Marks : 100]
Note : Attempt all questions.
1. Attempt any four questions : [5x4=20] ‘
(a) | What do you understand by analysis of algorithms.
Also explain the cases considered during the
analysis of algorithm?
(b) Prove that n! = o(n”)
(c) Explain Master theorem. Solve the recurrence by
using Master method
T(n)=T(Vn)+1
(d) __ Illustrate the operation of Build max heap on the
airay = (7, 4,6, 5, 19, 12, 13, 17, 11, 10,3, 2)
TCS-503/1720 (1) [PTO](e)
2. Attempt any four questions :
(a)
(b)
(c)
@)
(e)
TCS-503/1720
How will the Quick sort algorithm sort an array
filled with numbers 10,2, 12, 7, 4, 6,9, 5, 1,3, 11,
0? Show all steps.
[5x4=20]
. <
Show the red black trees that result after
successively inserting the keys 41, 38, 31, 12,
19, 8 into an initially empty red black tree.
Explain the process of augmenting a data structure
with an example?
How the results of inserting the keys
F,S,Q,K,C,L,H, T, V, W, M, R, N, P,A, B, X, Y, D,
Z, E, G, lin order into an empty B tree only. Draw
the configuration of the tree just before some node
must split and also draw the final configuration. Use
t=3, where t is minimum degree of B-Tree.
Write algorithm for union of two binomial heaps.
Also explain the properties of Binomial trees?
Explain disjoint set operations. Also explain the
applications of Disjoint—set data structures?
Q)
3. Attempt any two questions : [10x2=20]
(a) Find the optimal solution for the knapsack 0/1
problem using the dynamic problem approach?
Consider, n=4,W=5, (w1,w2,w3,w4)=(2,3,4,5) and
(b1,b2,b3,b4)=(3,4,5,6)
(b) Compare Greedy versus Dynamic programming.
Explain travelling sales man problem with example.
if (c) Write a short note on Amortized analysis. Explain
the 4-Queen problem using backtracking?
4. Attempt any two questions : [10x2=20]
(a) Write DFS algorithm to determine whether or not
on undirected graph contains a cycle?
(b)
TCS-503/1720 @) [P.T.0.]Find the shortest path in the above graph from the
source vertex | to all other vertices by using
Dijkstra’s algorithm.
(c) Explain the Floyd Warshall algorithm with
example?
5. Attempt any two questions : [10x2=20]
(a) Define Rabinkarp algorithm for string matching
modulo q=11, how many spurious hit does the
Rabinkarp matcher counter in the text
T= 3141592653589793, when looking for pattern ,
P=26 ?
(b) Define NP, NP hard and NP complete. Give example
of each. :
(c) | Whatare approximation algorithms ? What is meant
TCS-503/1720
by a P(n) approximation algorithm? Give an
approximation algorithm for travelling sales
problem.
4)