Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. In a greenhouse, several plants are planted in a row. You can imagine this row as a long line segment. Your task is to

image text in transcribed

7. In a greenhouse, several plants are planted in a row. You can imagine this row as a long line segment. Your task is to install lamps at several places in this row so that each plant receives 'sufficient' light from at least one lamp. A plant receives 'sufficient' if it is within 4 meters of one of the lamps. Design an algorithm that achieve this goal and uses as few numbers of lamps as possible. Prove the correctness of your algorithm. 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,c3cn 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sql All In One For Dummies 7 Books In One

Authors: Allen G Taylor ,Richard Blum

4th Edition

1394242298, 978-1394242290

More Books

Students also viewed these Databases questions

Question

What could the team have done to avoid the situation described?

Answered: 1 week ago

Question

Discuss the key people management challenges that Dorian faced.

Answered: 1 week ago

Question

How fast should bidder managers move into the target?

Answered: 1 week ago