wu :: forums
« wu :: forums - Transporting apples from Appleland to Bananaville »

Welcome, Guest. Please Login or Register.
Jun 2nd, 2024, 3:25am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   easy
(Moderators: Grimbal, william wu, Eigenray, towr, SMQ, ThudnBlunder, Icarus)
   Transporting apples from Appleland to Bananaville
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Transporting apples from Appleland to Bananaville  (Read 12659 times)
goprel
Newbie
*





   


Posts: 49
Transporting apples from Appleland to Bananaville  
« on: Apr 13th, 2014, 12:13am »
Quote Quote Modify Modify

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?
IP Logged
playful
Junior Member
**




meet me at the second fork in the road

   


Gender: male
Posts: 100
Re: Transporting apples from Appleland to Bananavi  
« Reply #1 on: Apr 13th, 2014, 2:04pm »
Quote Quote Modify Modify

Borrowing from the famous xkcd formula for the volume of a sphere, it would seem to me that you can get int(pi) apples to Bananaville.
IP Logged

my favorite puzzles
rloginunix
Uberpuzzler
*****





   


Posts: 1029
Re: Transporting apples from Appleland to Bananavi  
« Reply #2 on: Apr 13th, 2014, 11:22pm »
Quote Quote Modify Modify

My answer is 833 apples.
 
My solution path.
 
Overall algorithm with sample numbers that are not the intended solution and are used here for demonstration purposes only:
 
Step 1). Load the maximum allowed capacity of apples (1000) into the truck.
Step 2). Drive 500 meters. Stop. Pay 500-apple tax. Unload the remaining 500 apples into a Storage Facility (SF). Drive back with no cargo, pay no tax.
Step 3). Repeat the above steps 2 more times. At which point there will be 1500 apples in the SF @500-meter mark.
Step 4). Load the maximum allowed capacity of apples (1000) into the truck.
Step 5). Drive the remaining 500 meters to Bananaville. Pay 500-apple tax. Deliver 500 apples.
Step 6). Get yelled at for losing 39.975% of potential profits.
 
Quick Analysis.
Realize that on the third iteration of the steps 1) and 2) you've moved the last 1000 apples for nothing - after you've departed from the 500-meter mark with 1000 apples there's no point in coming back for the remaining 500 apples - you will have to pay them as tax after you cover the last 500 meters upon arrival to Bananaville. Conclusion - here lies the optimization opportunity. Design your trips in such a way that all the apples are moved. Instead of one SF use two.
 
Real solution.
 
In the "Devil, Swans and 2 Eggs" trilogy we've learned that the Reverse Order is a useful tool in solving the optimization problems. Apply it here. Imagine that you are at the last SF. It should be obvious by now that the number of the intermediate stops (SFs) and the distance between them must be picked in such a way that on the last trip the number of all the remaining apples must be very close or equal to truck's maximum load capacity or 1000 apples in this case. And at the previous SF it must be close or equal to 2000 apples. And on the one before that it must be close or equal to 3000 apples and so on. Here, by the way, you see why there should be 2 SFs.
 
It is clear that the number of trips a truck makes between two stops is 2*(W/C) - 1, where W is the Weight in apples and C is the truck's maximum Capacity in apples. Moving W=3000 apples between the Appleville and SF1 you will make 2*(3000/1000) - 1 = 5 trips. However, according to the problem statement, you are paying for only "away from Appleville" trips, not towards it. You will have 3 of those. So you have to move 3000 apples over the distance 3*X so that close to 2000 apples remain:
 
 
3000 - 3*X = 2000
1000 = 3*X
X = 333
 
I've rounded it down - the first SF is 333 meters away from Appleville. Moving 1000 apples at a time will cost you 333 apples, 667 will remain, 3*667 = 2001 apples are at SF1 @333-meter mark.
 
At this point I will gladly eat one apple (for the effort) and now we have to make 2*(2000/1000) - 1 = 3 trips but you pay for only 2 - the "away from Appleville" ones. So you're moving 2000 apples over 2*Y meters and 1000 or so apples must be left:
 
2000 - 2*Y = 1000
Y = 500
 
So the second SF is 333+500 = 833 meters away from Appleville. Moving 1000 apples at a time will cost you 500 apples, 500 will remain, 2*500 = 1000 apples are at SF2 @833-meter mark.
 
Now you just load 1000 apples into the truck, drive the remaining 167 meters to Bananaville, pay 167 apples in taxes, deliver 833 apples.
 
P.S.
In my modest opinion it should not be really called "Bananaville" but rather "WeGonnaRobYouBlindVille" for collecting a 72.23333% sales tax.
IP Logged
UgoLocal02
Newbie
*





   


Gender: male
Posts: 31
Re: Transporting apples from Appleland to Bananavi  
« Reply #3 on: Jun 12th, 2014, 12:09am »
Quote Quote Modify Modify

it should be called "WeGonnaRobYouBlindVille" for taking that much taxes. Tongue
IP Logged
Annettagiles
Junior Member
**





   


Gender: male
Posts: 67
Re: Transporting apples from Appleland to Bananavi  
« Reply #4 on: Oct 21st, 2014, 4:43am »
Quote Quote Modify Modify

2997
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

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