Daa 18
Daa 18
Daa 18
com
(d) What is Red-Black tree? Write an algorithm to insert a node in an empty red-black tree
explain with suitable example.
(e) Explain HEAP-SORT on the array. Illustrate the operation of HEAP-SORT on the array
A= {6, 14, 3, 25, 2, 10, 20, 7, 6}
SECTION C
3. Attempt any one part of the following: (10 x 1=10)
(a) Explain Convex –Hull problem.
(b) Find the shortest path in the below graph from the source vertex 1 to all other vertices
by using Dijkstra’s algorithm.
www.aktuonline.com
www.aktuonline.com
(a) What is backtracking? Discuss sum of subset problem with the help of an
example.
(b) Write down an algorithm to compute Longest Common Subsequence
(LCS) of two given strings and analyze its time complexity.
(a) The recurrence T (n) =7T (n/2) +n 2 describe the running time of an algorithm A.A
competing algorithm A has a running time of T’ (n) =aT’ (n/4) +n 2 .What is the largest
integer value for a A’ is asymptotically faster than A?
www.aktuonline.com
(b) Discuss the problem classes P, NP and NP –complete .with class relationship.
(b) Given the six items in the table below and a Knapsack with Weight 100, what is the
solution to the Knapsack problem in all concepts. I.e. explain greedy all approaches and find
the optimal solution
www.aktuonline.com