Imp Qns For DAA
Imp Qns For DAA
4
3. i) Explain the algorithm for the Maximum Matching Bipartite graph. 33. Give the purpose of the lower bound.
ii) Apply the maximum matching algorithm to the following Bipartite graph. 34. State Assignment problem.
35. Give the formula used to find the upper bound for the knapsack problem.
36. What is The Euclidean minimum spanning tree problem?
37. Define the accuracy ratio with an example.
38. Define the Performance ratio with an example.
39. Define the C-Approximation algorithm with an example.
40. What are the approximation algorithms used for TSP?
41. Write an algorithm for the Nearest Neighbor Problem.
4. i) Describe how you will find a stable marriage matching men’s and women’s preferences. 42. Write an algorithm for Twice around the Tree problem.
ii) Find a stable marriage matching for the instances defined by the following ranking matrix: PART B & C
1. i) Explain in detail about approximation algorithms.
ii) Prove that the twice- around-the-tree algorithm is a 2-approximation algorithm for the traveling
salesman problem with Euclidean distances.
2. Solve the following instance of the knapsack problem by the branch–and–bound algorithm:
Unit V
PART A
1. What are the tractable and intractable problems?
2. How does problem reduction find the lower bound?
3. What are the classes of computational complexity?
4. Differentiate between NP-hard and NP-complete problems
5. Define P and NP problems. 3. Apply the nearest–neighbor algorithm of the instance defined by the intercity distance matrix below.
6. List any three problems that have polynomial time algorithms. Start the algorithm at the first city, assuming that the cities are numbered from 1 to 5, and compute
7. What is meant by N – Queen’s Problem? the accuracy ratio of this approximate solution.
8. Differentiate feasible solutions and optimal solutions. 4. i) Justify how the backtracking technique is used to solve the sum of subsets problem with its
9. How does a Branch – and – Bound Algorithm work? pseudo code and complexity.
10. Write about information-theoretic lower bound. ii) Construct all possible subsets of weights that sum to M for the given instance n = 6. M = 30 and
11. State the Heuristic with an example. Weights(1:6) = (5,10,12,13,15,18).
12. What do you mean by polynomial time approximation algorithm? 5. i) Let w= {5, 7, 10, 12, 15, 18, 20} and m=35. Find all possible subsets of w whose sum is
13. Differentiate backtracking and Exhaustive search. equivalent to m. Draw the portion of the state space tree for this problem.
14. What factors influence the efficiency of the backtracking algorithm? ii) Describe how the backtracking works to solve the 8-Queens problem.
15. What is backtracking? 6. Write an algorithm to determine the Hamiltonian cycle in a given graph using backtracking. For the
16. Draw the solution for the 4-queen problem. following graph determine the Hamiltonian cycle.
17. What method is used to find the solution in the n-queen problem by symmetry?
18. Define the Hamiltonian cycle.
19. What is the subset-sum problem?
20. Give an example for the sum-of-subset problem.
21. When can a node be terminated in the subset-sum problem?
22. How can the output of a backtracking algorithm be thought of?
23. Give a template for a generic backtracking algorithm.
24. What are the two types of constraints used in Backtracking? Explain.
25. What is a promising and non-promising node in the state space tree?
26. What is a state space tree?
27. What do leaves in the state space tree represent?
28. Define live node and dead node. ---------------------------------------------ALL THE BEST-------------------------------------------------
29. Compare backtracking and branch and bound.
30. Define bounding.
31. When can a search path be terminated in a branch-and-bound technique?
32. State the reason for terminating the search path at the current node in the branch and bound
algorithm.