Cp5151 Advanced Data Structures and Algorithims
Cp5151 Advanced Data Structures and Algorithims
M. E.lN{.Tech. D EGREE
EXAMINATIO N, JANUARY 20 1 8
First Semester
Bio Metrics and Cyber Security
_
CP 5 1 5 1 ADVANCED DATA STRUCTURES AND ALGORITHMS
(Common to M.E. Computer Science and Engineering/Nl.E. Computer Science
and Engineering With Specialization in Networks)/Ul.E. Multimedia Technology/
M. E. Soft ware E nginee ring/Nl. Tech. I nformatio n Technolo gy)
(Regulations 2AIT
r coill
Time :Three Hours $ww, recentquestion paper Maximum: 100 Marks
AnswerALL questions
s',Qd*
nt,d$o$
r.1V
iaJ'
/.*Jh'
r
-tl
l
-2- I llllll lllll lllll lllll lllll llll llll
47LL4
design you
11. a) write the advant*g"" of dirride-and.-conquer d.esign approach. How
do
using d.ivid.e-and-conquer approach.
(13)
a sorting
"igorlttri,
(oR)
is atleast
b) 1) Explain why the statement, "The running time of algorithm A (5)
O(n2)" is meaningless.
ii) what is a recurrence ? List the methods for solving recurrence' Describe
the steps involved in substitution method to solve recurrence.
(2+2+4=8)
i) write the procedure for deleting a given node z from a binary search
tree' (6)
t2. a)
write pseudocod.e foTRIGHT-ROTATE operation in red-black trees'
(7)
ii)
(oR)
b) show how d.o you decrease the key of a node in a Fibonacci heap in o(1)
Fibonacci heap in
amortized time and how to delete any node from an n-node (13)
O(D(n) amortized' time.
using DFS and
13. a) Write an algorithm tocompute stlongly connected components
prove that the algorithm correctly computes the strongly connected
(13)
components of a d'irected graph d'
(oR)
and
b) write an algorithm to rnultiply matrices using- shortest path approach (13)
show that tf,e multiplication is association'
problem must have in
14. a) Elucidate the two key ingredients that an optimization (13)
ord.er for d'ynamic program*l"g to be appticable'
(oR)
(6)
b) i) Discuss the general properties of Greedy method'
(7)
ii) Iltustrate the construction of a Huffman code using an example'
15. a) Write a short note on :
rillvw . recentquesti on pape r, coti' (6)
1) ReducibilitY ;
(7)
ii) Formal-language framework'
(oR)
NP and also
b) Prove that the circuit-satisfiability problem belongs to the class (13)
NP-Hard.
I 1ilil lill lllll lllll lllll llll llil -3- 47LL4
1.6. a) i) For the set of keys {1, 4, 5,10, 16, 77 ,2!\ draw binary search trees of height
2,3, 4 and 5. (8)
ii) Give an algorithm that determines whether or not a given undirected graph
G = (V, E) contains a cycle. Your algorithm should run in o(v; time,
(7)
independentoflEl.
(oR)
b) t) The salesman wishes to make a tour, or Hamiltonian cycle, visiting each
city exactly once and finishing at the city he starts from. There is an integer
cost c(i, j) to travel from city i to city j, and the salesman wishes to make the
tour whose total cost is minimum, where the total cost is the sum of the
ind.ividual costs along the edges of the tour. Prove that the travelling
(8)
salesman problem is NP-comPlete.
(7)
ii) Show that the Hamiltonian-path problem is NP-complete.
,t'
TS
s'
-"s"
.?F-
.n$
{v
*$'