Back to the 2024 paper
Similar questions
Design and Analysis of Algorithms The 0/1 Knapsack problem is traditionally solved using which approach to ensure an optimal solution? (i) Greedy Method (ii) Dynamic Programming (iii) Brute-Force only (iv) Linear Search20252mDesign & Analysis of AlgorithmsState the general Knapsack problem. Write a greedy algorithm for this problem and derive its time complexity.20237mDesign & Analysis of AlgorithmsThe fractional Knapsack problem can be solved by using: - (i) Greedy method - (ii) Divide and conquer method - (iii) Dynamic programming - (iv) None of these20232mDesign & Analysis of AlgorithmsExplain Knapsack Problem.20247m
PreviousAnswer the following: (i) Compare dynamic programming and greedy algorithms in terms of their problem-solving approaches, solution spaces, and efficiency. (ii) Discuss scenarios where dynamic programming is necessary because greedy strategies fail. Use suitable problem examples to support your explanation. (iii) Explain how overlapping subproblems and optimal substructure are utilized in dynamic programming.NextConsider a TSP with 4 cities A, B, C, D and the following distance matrix: | | A | B | C | D | |---|---|---|---|---| | A | 0 | 10 | 15 | 20 | | B | 10 | 0 | 35 | 25 | | C | 15 | 35 | 0 | 30 | | D | 20 | 25 | 30 | 0 | Answer the following: (i) Use the branch-and-bound algorithm to find the shortest possible route that visits all cities exactly once and returns to the starting city. (ii) Show the branching steps and calculate lower bounds for each partial solution. (iii) Identify how the bounding helps prune the search tree.