Professional Documents
Culture Documents
DAA Questions
DAA Questions
DAA Questions
2. State the fundamental differences between divide and conquer and greedy strategies.
4. Discuss merge sort algorithm with an example. Explain the time complexity of merge sort.
5. Implement the concepts of Iteration Methods of Recurrence Relation with suitable example.
6. Derive a state space tree for LIFO and FIFO Branch and Bound.
7. How to generate a state space tree for Least cost Branch and Bound?
9. Apply Branch and Bound to solve the following 0/1 knapsack problem.
10. Write down the recursive function for Tower of Hanoi problem.
11. Write an algorithm using recursive function to generate Fibonacci series. Mention time
complexity also.
12. Define different type of time complexity analysis- Big-O, Omega, Theta notations.
14. Binary search, bubble sort, insertion sort, selection sort, quick sort and merge sort
algorithms, complexity analysis and illustrations.
15. Prove that, [log1 + log 2 + log 3 + ...... + log n] ∈ Θ(n log n)
16. Explain the effectiveness property of an algorithm with two example algorithms where one
algorithm takes a finite amount of time while the other takes an infinite amount of time.
19. Algorithms are usually generated independent of primary languages. Explain with proper
example.
22. Find the largest & smallest element from an array of elements with the help of State
Space Methods.
23. Discuss the concepts of Objective, Candidate, Selection, Solution and Feasibility Functions
of Greedy Algorithm.
24. Distinguish the differences between fractional knapsack and 0/1 knapsack with example.
26. A newspaper agent daily drops the newspaper to the area assigned in such a manner that he
has to cover all the houses in the respective area with minimum travel cost.
28. What are the differences between the top-down approach and the bottom-up approach?
30. Discuss the steps to get the minimum cost for the following matrices under matrix chain
multiplication using dynamic programming. The matrices have size 2x3, 3x4, 4x5, and 5x7.
31. Explain all pair shortest path algorithm or Floyd Warshall using dynamic programming for a
given graph.
32. Get the maximum profit with item sequence using 0/1 knapsack, where container size = 25,
Item: A B C D, Profit: 24 18 18 10, Weight: 24 10 10 7
35. Solve the 15-puzzle problem with branch and bound technique.
36. Solve the 8-puzzle problem with branch and bound technique.
37. Prove that 2-coloring problem for any graph is polynomial time solvable.
39. Find the optimal schedule that gives maximum profit. What is the maximum earned profit?
41. “Topological sorting is not possible for graphs which are not DAGs”. Justify.
42. Explain Kahn’s Algorithm for Topological Sorting and find out its time complexity.
45. Consider the following data: A B C By the use of Backtracking algorithm, organize the
structure of the arrangements of numbers. Write the algorithm of this problem and also
write the pseudo code. After that calculate the complexity analysis.
47. Given a solution to n-queen problem as {2, 4, 1, 3} find the number of queens that can be
placed in a given chessboard of dimensions N x N (where the value of N is provided as an
input by the user) such that no two queens have their influence on each other.
49. Given a linear array of n elements, find the number of individual subsets of the array that can
be formed in such a way that the sum of the subset is equal to an user-defined value K.
50. Write the algorithm of this problem and also write the pseudo code. After that calculate the
complexity analysis.
52. “We can write a polynomial time 2-approximation algorithm for any given problem” Explain.
57. NP, NP hard, and NP complete – define, differentiate and Venn diagram.
3. Write Kahn’s algorithm for topological sorting and derive its time complexity.Time
Complexity: O(V+E). Applications of Topological sorting. Explain why topological sorting is not
possible for the graph which is not DAG.
4. Study correctness proof of Prim’s and Kruskal’s algorithm. Study time complexity also. Prim’s
or Kruskal which algorithm is better and why? Why minimum cost spanning tree is important?
5. What is 8-puzzle problem? what is 15-puzzle problem? Solve 8-puzzle and 15 puzzle using
branch and bound techniques.
9. What is Live node, E node, success node and dead node in backtracking algorithm?