Daa Question Paper Winter 2024
Daa Question Paper Winter 2024
Daa Question Paper Winter 2024
NSTRUCTIONS TO CANDIDATES
(1) All questions carry marks as indicated.
(2) Solve Question No. 1 OR Question No. 2.
(3) Solve Question No. 3 OR Question No. 4.
(4) Solve Question No. 5 OR Question No. 6.
(5) Solve Question No. 7 OR Question No. 8.e
(6) Solve Question No. 9 OR Question No. 10.
Unit 1
1. What are the different asymptotic notations? Explain them briefly.
2. Solve the following recurrence relation using characteristic equation
Unit 2
1. Solve Job sequencing with deadlines n =4, P = (100,10, 15, 27) and d = (2, 1, 2, 1) find optimal
solution. Also write algorithm for the same.
2. Write an algorithm for Huffman code? Implement it on the following data and variable length
encoding. A : 45 B :13 C :12 D :16 E :09 F :05
3. Find the multiplication of following matrices A &B given below using Strassen's matrix
multiplication algorithm and calculate its complexity.
4. Solve the following using partial knapsack. n =7 and M= 15 (P1, P2..P7)=(15,20, 10,7,6,18,3) (w1,
w2....w7) =(2,3,5,7,1,4,1)
5. Give stepwise operation on Heap sort on the following input array and also explain the
complexity of heap sort: 4, 8, 20, 17, 7, 25, 2, 13, 5
6. Write an algorithm for binary search. Find its complexity. Also find out average number of
successful and unsuccessful comparison on the following array : -12,23, 31, 45, 56, 78, 90, 103,
113, 126, 157.
7. Schedule the following jobs using job scheduling algorithm. Also write an algorithm for same:
9. Find out a average number of comparisons required for successful and unsuccessful binary
search on following array. 12, 23, 31, 45, 56, 78, 90, 103, 113, 126, 157
10. Schedule the following Jobs using Job Scheduling algorithm. Also write algorithm for the same.
11. Discuss Strassen’s matrix multiplication algorithm in detail. Also discuss its complexity.
12. Using Strassen's algorithm for matrix multiplication solve the following:
13. Write an algorithm for Huffman code? Implement it on the following data and variable length
encoding a:25, b:10, c:12, d:30, e:35.
14. For the following knapsack sequence of objects find profit by three methods. Capacity =11, n=
4w =(1, 2, 5, 8, 7), p =(1,6, 18, 25, 30)
15. Write an algorithm to find minimum spanning tree for the following graph using PRIM's
algorithm.
Unit 3
1. Write an algorithm to generates LCS. Apply algorithm for the following string and generate LCS
X =a, a, b, a, a, b, a, b, a, a. Y =b, a, b, a, a, b, a, b.
2. Find the minimum cost path from 's' to t' in multistage graph, shown using forward approach:
3. What is Travelling Salesman Problem? Implement it for the following Matrix
4. Find the longest common subsequence for the following. x= (1,0,0, 1,0, 1, 0, 1) y= (0, 1,0, 1, 1,
0, 1, 1,0)
5. Calculate the minimum number of scalar multiplications for following set of matrix using matrix
chain multiplication. A =4x5 B=5x3 C=3x2 D=2x7
6. What is Travelling salesman problem? Implement it for the following matrix:
7. Determine LCS of X=(AGGTABZ) Y =(GXTXAYB) Write the recurrence equation for LCS.
8. Find the minimum number of multiplications required to multiply the matrices of given
dimension using chained matrix multiplication. Dimension of matrices are A =13x5, B=5x89, C
=89x3, D=3x34
9. Determine the cost and structure of optimal Binary search tree for set of n= 7 keys with the
following probabilities.
10. What is TSP? Calculate the TSP tour for following matrix.
11. Write an algorithm for Floyd War shall and calculate distance and path matrix of following:
12. Using chained matrix multiplication method find out minimum no. of operation required to
multiply. Following matrices and also find the best sequence A =6x10 B=10x12 C= 12x5 D=5x8
13. Develop LCS by using Dynamic programming algorithm. x=(A,B,C,B,D,A,B) y=(B,D,C,A,B,A)
14. Distinguish between: (1) Dynamic Programming &Greedy Strategy (2) Dynamic Programming &
Divide& Conquer.
15. Identify shortest path using travelling salesman problem.
Unit 4
1. What is 8 Queen Problem? Explain implicit and explicit constraints associated with this problem.
Give at least two solution for the problem.
2. What is Hamiltonian Cycle? For the following graph generate Hamiltonian Cycle.
3. Explain how backtrackings appliedto4-Queen's problem also draw state space tree.
4. What is Graph Coloring? Implement on following graph and generate solution space tree if
number of permitted colors is 3.
5. Place 8 Queens in 8*8 matrix such that no two queens are in same row, same column or
diagonally opposite.
6. What is Explicit and Implicit constraints of 4 Queen Problem? Explain 4 Queen Problem in detail
and give at least two solutions of 8Queen problem.
7. Perform Graph Coloring on the given graph. State the total number of possible solutions
8. What is backtracking? Obtain BFS tree DFS tree for the following graph:
9. What is graph coloring? Color the following graph using graph coloring algorithm
10. What is the use of Hamiltonian cycle? Implement Hamiltonian cycle on following graph.
11. What is back tracking? Explain implicit &Explicit constraints. Also obtain DFS tree for following
graph.
12. Write the algorithm for Breadth First Search (BES). Also perform BFS on the given graph,
showing operations using stack. State the output sequence generated.
13. Find the Hamiltonian cycle in the given graph. Also draw the solution tree showing all possible
paths.
14. What is graph coloring? Color the following graph using graph coloring algorithm.
15. What is back tracking? Explain BFS and DFS tree for the following graph
16. Draw at least two different Hamiltonian cycles from the following graph. Also draw the solution
space tree that shows all possible solutions.
Unit 5