Question: 8. We are back again at the same greenhouse from problem- 1 , but this time our task is to water the plants. Each plant

 8. We are back again at the same greenhouse from problem-

8. We are back again at the same greenhouse from problem- 1 , but this time our task is to water the plants. Each plant in the greenhouse has some minimum amount of water (in L) per day to stay alive. Suppose there are n plants in the greenhouse and let the minimum amount of water (in L) they need per day be 11,12,13,ln. You generally order n water bottles (1 bottle for each plant) of max(11,12,13,.ln) capacity per day to water the plants, but due to some logistics issue on a bad day, you received n bottles of different capacities (in L). Suppose c1, c2,c3c be the capacities of the water bottles, and you are required to use one bottle completely to water one plant. In other words, you will allocate one bottle per plant, and use the entire water present (even if it is more than the minimum amount of water required for that plant) in that bottle to water a particular plant. You cannot use more than one bottle (or partial amount of water) to water a single plant (You need to use exactly one bottle per plant). Suggest an algorithm to determine whether it is possible to come up with an arrangement such that every plant receives more than or equal to its minimum water requirement. Prove the correctness of your algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!