![Greedy Knapsack Problem
Given: n=6, p=(18, 5, 9, 10, 12, 7), w=(7, 2, 3, 5, 3, 2), M=13
P 18 5 9 10 12 7
W 7 2 3 5 3 2
Pi/Wi 2.57 2.5 3 2 4 3.5
X X[4] X[5] X[3] X[6] X[1] X[2]](https://image.slidesharecdn.com/greedyknapsack-240402134621-01ea0a8b/75/Design-and-Analysis-of-Algorithms-Knapsack-Problem-1-2048.jpg)
This document describes the greedy knapsack problem where the goal is to maximize the value of items placed in a knapsack of limited capacity. It provides the values (p) and weights (w) of 6 items, as well as the knapsack capacity (M=13). The value to weight ratios (Pi/Wi) are also listed to help determine the optimal solution of maximizing value within the weight limit.