Assignment 3,4,5-1
Assignment 3,4,5-1
7. Explain Prim’s Algorithm for finding minimal spanning tree with an example.
8.
9. Explain Kruskal’s Algorithm for finding minimal spanning tree with an example.
10.
UNIT-2
7.
8.
9.
UNIT 3:
1. Write the control flow of a Backtracking Algorithm and explain in detail the problems that
can be solved using this approach.
2. Solve the 8-Queen problem with the help of Backtracking. Show the complete set of
possible cases in this approach.
3. Solve the following Sum of Subsets problem. Let w = {5,7,10,12,15,18,20} and m = 35. Find
all possible subsets of w that sum to m.
4. Solve sum of subsets problem using back tracking for n = 4 (w1,w2,w3,w4) = (11,13,24,7) &
m = 31. Find all possible subsets of w that sum to m using the backtracking algorithm for
sum of subsets problem.
5. Briefly explain the function that is used to find the next color in graph coloring problem.
6. Describe graph coloring problem. Give an example.
7.
8. Write an algorithm to determine the Hamiltonian Cycle in a given graph using backtracking
9. Explain FIFO Branch and Bound solution.
10. Discuss various methodologies of Branch and Bound technique.
11. Draw the portion of the state space tree generated by LC Branch and Bound for the
knapsack instance: n=5, (p1, p2, ..., p5) = (10, 15, 6, 8, 4), (w1, w2, ..., w5) = (4, 6, 3, 4, 2),
and m = 12.
12. "Generate LC branch and bound solution for the given knapsack problem, m = 15,
13. n = 4, (P1, P2, P3,P4) = (10, 10,12,18) and (w1, w2, w3,w4) = (2,4,6,9)."
14.
15. By taking your own 5x5 cost matrix explain the working of Travelling sales person problem
using Branch and Bound.
16. Explain the differences between NP complete and NP-hard problems.
17. How to determine whether a problem is NP-Hard or P? Illustrate with an example.