0% found this document useful (0 votes)
222 views7 pages

DAA Important Questions

Uploaded by

futureceovivek
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)
222 views7 pages

DAA Important Questions

Uploaded by

futureceovivek
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/ 7

DAA IMPORTANT QUESTIONS

MODULE – 1

1. Define algorithm with specifications for writing algorithm. (6) (IMP)


(OR) What is an algorithm? explain the criteria to be satisfied by algorithm? (8)
2. What are the various basic Asymptotic efficiency classes? Explain big – O, big – Ω, Big – Θ notations
with examples. (10)
3. Give the mathematical analysis of non-recursive matrix multiplication algorithm. (5)
4. Write an algorithm to find uniqueness of elements in an array and give the mathematical analysis of
this non recursive algorithm with steps? (8)
5. Write an algorithm to find maximum of N elements and obtain its time complexity (8)
6. Write the Tower of Hanoi algorithm and steps for analysis of recursive algorithm. Show the analysis of
above algorithm. (8)
(OR) Give the general plan for analyzing time efficiency of recursive algorithms and also Analyze the
Tower of Hanoi recursive algorithm. (10) (IMP)
7. Explain with example how a count variable is introduced in a program to find the number of steps
required by a program to solve the problem. (6)
8. Prove the following theorem, t1(n) € O(g1(n)) and t2(n) € O(g2(n)),then t1(n) + t2(n) € O(max{g1(n),g2(n)}).
9. The factorial function n! as value 1 when n<=1 and value n*(n-1)! when n>1. Write both are recursive
and iterative algorithm to compute n! (6)
10. Problem on listing functions according to their order of growth and stating proper reasons (4)
11. Design an algorithm for performing sequential search and compute best case, worst case and average
case efficiency. (10)

MODULE – 2
1. Explain divide and conquer technique with general algorithm. (6)
2. Compare the straightforward method and divide and conquer method of finding maximum and minimum
elements of the list. (8)
(OR) Give the recursive algorithm to find maximum and minimum element from the list (10)
3. Write Merge sort algorithm for sorting using divide and conquer. (6)
(OR) Write merge sort algorithm with example, also calculate the efficiency. (12)
(OR) Design an algorithm for performing merge sort. Analyze its time efficiency. Apply the same to
sort the following set of numbers 4, 9, 0, -1, 6, 8, 9, 2, 3, 12 (10)
4. Sort the following keyword “ALGORITHM” by applying Quick sort method. (6)
(OR) Write quick sort algorithm with example, also calculate the efficiency. (12)
(OR) Design an algorithm for performing quick sort. Apply the same to sort the following set of
numbers 5, 3, 1, 9, 8, 2, 4, 7 (10)
(OR) Apply both mergesort and quicksort algorithm to sort the character’s VTUBELAGAVI. (10)
5. Apply topological sorting algorithm for the following graph, shown in figure and find the topological
sequence? (6)

(OR) Apply topological sort on the following graph using source removal and DFS based method (10)

(OR) Obtain the topological sort for the graph using i) source removal method ii) DFS method (10)

(OR) Discuss topological sorting. (8)

MODULE – 3

1. Find the optimal solution using greedy for the job sequencing with deadline problem with following
values? n = 5. (6)
Profit = {10, 3, 33, 11, 40}
Dead line = {3, 1, 1, 2, 2}
2. Explained coin change problem with example. (6)
3. Apply greedy method to obtain an optimal solution to the knapsack problem given M = 60. (4)
W = {5, 10, 20, 30, 40}
P = {30, 20, 100, 90, 160} Find total profit earned.
(OR) Write an algorithm to solve the Knapsack problem using greedy approach and apply the same
to find an optimal solution to the knapsack instance n =5, m = 6 (10) (IMP)
(OR) Explain greedy knapsack problem with example. (8)
4. Find the optimal solution for the Greedy job sequencing problem, given n = 4 , profits [10, 30, 60, 40],
deadlines [2, 3, 1, 3]. (5)
5. Apply the Prim’s algorithm to obtain minimum cost spanning tree for the given weighted connected
graph? (6)

(OR) Define minimum spanning tree. Write Prim’s algorithm to find a minimum spanning tree.
Apply the same on the following graph: (10)

6. Apply Prims and Kruskal’s algorithm to find the minimum cost spanning tree for the graph given in fig:

(6)

7. Write an algorithm for minimum spanning tree using Prim’s and Kruskal’s (8) + (8)
8. Apply single source shortest path algorithm to the following graph. Assume vertex ‘a’ as source (8)

(OR) What is Dijkstra’s algorithm used for? Apply Dijkstra’s algorithm on the following graph. Initial
node is G
(10)

9. Construct the Huffman tree and resulting code word for the following set of values? (8)
(OR)

(OR)

10. Explain Huffman coding concept. (6)


11. Explain bottom-up heap construction algorithm with example. (6)
12. Apply Heapsort for the list [9, 7, 1, 8, 3, 6, 2, 4, 10, 5] using bottom-up approach. (10)
13. Explain Heap sort technique. (6)

MODULE – 4

1. Explain multistage graph with an example. Write backward multistage graph algorithm. (10)
(OR) Define a multistage graph. Give an example. Explain the technique of finding the minimum cost
path in a multistage graph. (10)
2. Apply Warshall’s algorithm to find the transitive closure of the following graph shown in the figure (10)

(OR) Define transitive closure of a directed graph, write Warshall’s algorithm to find transitive
closure. Apply the same to find transitive closure of the digraph given below the figure. (10)

(OR) Explain transitive closure of a directed graph and find the transitive closure for the given graph
3. Apply Floyd’s algorithm to solve all pair shortest path for the given graph (10)

(OR) Design an algorithm to find all pairs of shortest paths given a weighted connected path using
dynamic programming technique. Apply the same algorithm to compute all pairs of shortage paths
for the following weighted connected graph. (10)

(OR) Apply Floyd’s algorithm to find the all-pairs shortest path for the given adjacency matrix. (10)

4. Apply dynamic programming approach to solve the given travelling salesman problem. (10)

(OR) Solve the following travelling sales person problem using dynamic programming technique

5. Design an algorithm to solve knapsack problem using dynamic programming. Apply the same to solve
following knapsack problem where W = 50. (10)
(OR) Solve the instance of 0/1 knapsack problem using dynamic programming approach. (10) (IMP)

MODULE – 5

1. What is backtracking list out to advantages of backtracking strategy. Considering 4-Queens problem,
provide two possible solutions to this problem using backtracking technique. (10)
(OR) With the help of state space tree, solves the 4- Queens problem by using backtracking approach.
(OR) Explain N-Queen problem with example. (10)
2. Apply backtracking method to solve sum of subset problem for the instance. D = 30, S = {5, 10, 12, 13,
15, 18}. Give all possible solution with state space for construction. (10)
3. Color the regions in the map given in the figure by applying backtracking graph color algorithm.
Color = ( R G B & Y ).

4. Find a Hamiltonian circuit for the following graph, shown in figure using backtracking technique. (10)

(OR) Explain Hamiltonian cycles with example. (10)


5. Apply best first branch and bound algorithm to solve the instance of the given job assignment problem.

6. Solve the travelling sales person problem using branch and bound technique. (10)
7. Apply branch and bound method for knapsack problem C = 10. (10) (IMP)

8. Write short note on the following: (10)


i) P
ii) NP
iii) NP-complete
iv) NP-Hard class problems
9. Explain the following concepts: (10)
i) Tractable and intractable problems
ii) P problems
iii) Non deterministic algorithm
iv) NP problem
v) NP complete problems

You might also like