0% found this document useful (0 votes)
20 views3 pages

DAA - Part B&C

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

DAA - Part B&C

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PART B

1. Describe how to implement a stack using an array. What are the time
complexities for push, pop, and peek operations?
Compare Big O vs Big Theta Θ vs Big Omega Ω Notations

OR
For T(n)=7T(n/2)+18n2 Solve the recurrence relation and find the time
complexity.
What is the difference between a binary tree and a binary search tree?
Describe the properties of a binary search tree

2. Explain how Strassen's algorithm uses the Divide and Conquer approach
to multiply two matrices. What are the sub-problems solved in the divide
step?
Design an algorithm to find the maximum and minimum element in a
given list of n numbers using divide and conquer method.

OR
What is the average-case time complexity of Quick Sort? Explain briefly
how it achieves this efficiency
Write algorithm for Merge Sort and Trace 60, 50, 25, 10, 35, 25, 75, 30.

3. What are the steps involved in solving the 0/1 Knapsack Problem using
Dynamic Programming.
OR
What is the purpose of finding the Minimum Cost Spanning Tree in a
graph? Give an example of a real-world application.

4. Define the cost of a node in an OBST. How is the total cost of the tree
calculated?
OR
Find the optimal binary search tree for the identifier set:
(a1,a2,a3,a4)={for,else,if,while} with p[1]=1/20,p[2]=1/5,
p[3]=1/10,p[4]=1/20, and
q[0]=1/5,q[1]=1/10,q[2]=1/5,q[3]=1/20,q[4]=1/20.
5. Given an undirected graph determine whether the graph contains a
Hamiltonian cycle or not. If it contains, then prints the path.
Input: graph[][] = {{0, 1, 0, 1, 0},{1, 0, 1, 1, 1},{0, 1, 0, 0, 1},{1, 1, 0,
0, 1},{0, 1, 1, 1, 0}}

Explain Graph Colouring.

PART C

1. Explain Asymptotic notations in detail with example.


OR
Explain AND / OR graphs.
2. Sort the list E, X, A, M, P, L, E in alphabetical order using the Quick Sort algorithm. Drae the
tree of recursive call.
OR
Apply Strassen's matrix multiplication to multiply following matrices. Discuss method is
better than direct matrix multiplication method.
4 3 x 2 5
2 1 1 6
3. Find the optimal solution to the knapsacks instance, where n=7, m=17 using greedy methods.

Object 1 2 3 4 5 6 7
Weight 2 3 5 7 1 4 1
Profit 10 5 15 7 6 18 3
OR
Find the minimum spanning tree for the following graph using Kruskal’s
algorithms.

4. Describe Travelling Salesperson Problem (TSP) using Dynamic Programming


OR
Construct an optimal binary search tree for the following
Items A B C D
Probabilitie 5.1 0, 0.4 0.4
s 2

5. Apply the branch-and- bound technique in solving the travelling salesman


problem?
OR
6. Give the solution to the 8 queen’s problems using backtracking

You might also like