Design and Analysis of Algorithms20765 marksGreedy Algorithms
Explain the greedy algorithm for the fractional knapsack problem with its time complexity.
Explain the greedy algorithm for the fractional knapsack problem with its time complexity. [5]
A thief has a knapsack that can carry a maximum weight W. There are n items, where the i-th item has: - Weight: w[i] - Value: v[i] Any fraction of an item can be taken (unlike 0/1 knapsack). The objective is to maximize total profit by selecting items or fractions of items. --- The greedy approac...