English, asked by ajaychowdary414, 8 months ago

Arnold is planning to follow a diet suggested by his Nutritionist. The Nutritionist prescribed him the total protein, carbohydrates and fats, he should take daily. Arnold searches on an
online food store and makes a list of protein, carbohydrates and fats contained in a single unit of various food items.
His target is to have the maximum protein, carbohydrates and fats in his diet without exceeding the prescribed limit. He also wants to have as much diverse food items as much as
possible. That is, he does not want to have many units of one food item and 0 of others. Multiple combinations of 'units of food items are possible to achieve the target. Mathematically
speaking, diversity is more if the difference between the number of units of food item chosen the most and the number of units of another food item chosen the least, is as small as
possible.
To solve this problem, he uses maximum possible number of units of all the items so that total amount of protein, carbohydrates and fats is not more than prescribed limit. For example
- if total nutrition required is 100P, 130C and 130F (where P is Protein, C is Carbohydrates and Fis Fats) and 2 different food items, viz. Item A and Item B, have following amount of
nutrition:
Item A-10P, 200, 30F
Item B - 20P, 30C, 20F
then, he can have (maximum possible) 2 units of all the items as having 3 units will exceed the prescribed amount of Carbohydrates and fats.
Next, he chooses food items to fulfill the remaining nutrients. He chooses one more units of maximum number of food items. He continues this process till he cannot add a unit of any
food item to his diet without exceeding the prescribed limit. In this example, he can choose one more unit of item B or one more unit of item A. In case he has two sets of food items
then the priority is given to fulfill the requirements of Protein, Carbohydrates, and Fats in that order. So he chooses item B.
You will be provided the maximum nutrients required and the nutrients available in various food items. You need to find the amount of nutrients for which there is a shortfall as
compared to the prescription, after making his selection using the process described above. In the example he still needs 20P, OC, 10F to achieve his target.
23-10​

Answers

Answered by simpleboy36
2
Idk the answer I’m sry bro
Similar questions