DAA Questions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

DAA Endsem Questions

1. State the principle of optimality.

2. State the fundamental differences between divide and conquer and greedy strategies.

3. Solve the fractional knapsack problem for given condition:

N=5, knapsack capacity (W)=75, Profits (P1,P2,P3,P4,P5) = (35,20,25,60,50) and


weight (W1,W2,W3,W4,W5) = (5,20,45,15,50).

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?

8. Explain the concepts of Master Theorem of Recurrence Relation.

9. Apply Branch and Bound to solve the following 0/1 knapsack problem.

p = {10,10,12,18} w = {2,4,6,9} n= 4 m=15

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.

13. Time complexity of iterative and recursive algorithms – numerical problems.

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.

17. Differentiate Time Efficiency and Space Efficiency.

18. Solve this equation by substitution method: T (n) = T(n/2) + n

19. Algorithms are usually generated independent of primary languages. Explain with proper
example.

20. Discuss the concepts of Lower Bound Theory.

20. Implement a decision tree to produce the n! combinations of three numbers.


21. How Binary Search will be implemented in terms of Comparison Tree?

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.

25. What are the basic characteristics of dynamic programming?

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.

27. Compute the minimum travel cost (MST).

28. What are the differences between the top-down approach and the bottom-up approach?

29. Write down the steps of matrix chain multiplication.

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

33. Differentiate between Prim and Kruskal algorithms.

34. What is a 15-puzzle problem?

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.

38. Consider these 5 jobs with associated profits and deadline.


Jobs: J1 J2 J3 J4 J5, Profits: 20 15 10 5 1, Deadlines: 2 2 1 3 3

39. Find the optimal schedule that gives maximum profit. What is the maximum earned profit?

40. How to detect a negative cycle in a graph by Floyd - Warshall algorithm

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.

43. Can Dijkstra’s algorithm handle negative weights of edges? Justify.


44. Backtracking algorithm – define, properties, state-space tree, E Nodes, Success Nodes,
Dead Nodes, Implicit and Explicit constraints.

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.

46. N-queen problem – algorithm, 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.

48. Find a Hamiltonian circuit using Backtracking method on a given a graph.

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.

51. Define the Performance Ratio for an approximation algorithm.

52. “We can write a polynomial time 2-approximation algorithm for any given problem” Explain.

53. Approximation algorithm – properties.

54. What was the first problem proved as NP complete?

55. “P class belongs to NP class”. Explain.

56. Define intractable and tractable problems.

57. NP, NP hard, and NP complete – define, differentiate and Venn diagram.

58. State Cook’s theorem.

59. Prove that 3-CNF SAT problem is NP complete.

60. Prove that 3-Coloring problem is NP complete.

61. Prove that Clique decision problem is NP complete.


1. Why Dijkstra’s algorithm fail on negative weights?

2. What are the different ways of representing graph?

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.

How branch and bound technique is used to solve 15-puzzle problem.

6. Hamiltonian circuit using backtracking

7. Subset sum problem

8. Knight’s Tour problem:

9. What is Live node, E node, success node and dead node in backtracking algorithm?

You might also like