wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> You have been given the task of transporting 3,000
(Message started by: oceanvibe on Dec 9th, 2015, 11:01pm)

Title: You have been given the task of transporting 3,000
Post by oceanvibe on Dec 9th, 2015, 11:01pm
You have been given the task of transporting 3,000 apples 1,000 miles from Appleland to Bananaville. Your truck can carry 1,000 apples at a time. Every time you travel a mile towards Bananaville you must pay a tax of 1 apple but you pay nothing when going in the other direction (towards Appleland).

What is highest number of apples you can get to Bananaville?

Title: Re: You have been given the task of transporting 3
Post by rmsgrey on Dec 10th, 2015, 6:25am
It depends whether distance is discrete or continuous.

If you can only travel in integer numbers of miles, but can cache apples at any milepost, then [hide]833 apples[/hide]; if you can cache apples anywhere on the way (and can pay the tax in fractions of an apple) then [hide]an extra third of an apple for 833.333... apples[/hide]

Method:
[hideb]You have 3000 apples to start, which can be moved in three loads, so costs 3 apples per mile to move until you drop to 2000 apples remaining. From there, you can repack to two load, costing 2 apples per mile until you can finally consolidate everything down to one load costing 1 apple per mile for the last 1000 apples. So that's 333.333... miles to spend the first thousand apples, 500 miles for the second, and you complete the trip before using up the last thousand.[/hideb]

Of course, if the apples you pay don't need to come from your load, you can get 1000 apples there (pay 1000 apples before setting off with a full load).

The other variation is to assume that you're required to get at least 3,000 apples there, not that you're given 3,000 and required to deliver as many as you can. In order to deliver 3,000 apples, you need to start with at least [hide]9,044 apples, assuming continuous consumption rather than discrete apples[/hide]

Title: Re: You have been given the task of transporting 3
Post by oceanvibe on Dec 10th, 2015, 7:22am
That is correct  rmsgrey



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board