Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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

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_2

Step: 3

blur-text-image_3

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

International Marketing And Export Management

Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr

8th Edition

1292016922, 978-1292016924

More Books

Students also viewed these Algorithms questions

Question

Contrast the traditional tort system and no-fault auto insurance?

Answered: 1 week ago