Question: Exam question just give precise answer Cowboy Prescott is helping run cattle drives in Texas. There are n cattle drives he could see to and

Exam question just give precise answer


Cowboy Prescott is helping run cattle drives in Texas. There are n 
cattle drives he could see to and he can visit one a 
day, but he only has 20 days available. Assume travel time is 

Cowboy Prescott is helping run cattle drives in Texas. There are n cattle drives he could see to and he can visit one a day, but he only has 20 days available. Assume travel time is neglible because his horse is very fast. In order to persuade him, the ranchers leading cattle drive i offer Prescott D, dollars to visit their drive (1 i n). However, the amount decreases by ten dollars each day. So he gets the original amount from the drive he visits on day 1, the original amount minus ten from the drive he visits on day 2, the original amount minus twenty from the drive he visits on day 3, and so on. Prescott would like to determine which drives to visit on which days so that he makes as much money as possible. You can assume every drive is originally offering more than $200. (a) Describe an algorithm to solve this problem. State the type of algorithm it is. You shouldn't write pseudocode. For full credit your algorithm should run in O(n) time.

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 Algorithms Questions!