Monday, 23 July 2012

Donkey and Carrots

Question: A donkey had to carry 3000 carrots to the market which was 1000 miles away and the donkey can only carry 1000 carrots at a time and he eats one carrot every mile he walks but this is only when he is carrying carrots. How many carrots can get to the market with the donkey carrying them?

Answer: Maximum of 833 carrots

Here is how to get 833 carrots to market. Take 1000 carrots and transport them 334 miles. The donkey has eaten 334 carrots so drop off the remaining 666 at this point. Repeat this trip twice more so that now you have 3 x 666 = 1998 carrots at the 334 mile position. Now take 1000 of the carrots and transport them 499 miles to the 334 + 499 = 833 mile position. The donkey will eat 499 carrots and hence you can drop 501 carrots. Go back to mile 344, get the remaining 998 carrots and bring them the 499 miles to mile 833. Again the donkey will eat 499 carrots so you have 998 - 499 = 499 carrots to add to the 501 that are already there. Finally take the 499 + 501 = 1000 carrots and transport them the remaining 1000 - 833 = 167 miles to market. The donkey will eat 167 carrots leaving you 833 to sell at the market.
  
To see why this is the best you can do imagine that there is a marker at each mile along the road. Since the donkey can only carry 1000 carrots at a time, to get to the first mile marker you must make at least 3 trips and hence the donkey will eat at least 3 carrots. Likewise you must make at least 3 trips from the first to the second marker which means the donkey will eat at least 3 more carrots. The donkey will eat at least 3 carrots for each mile until the number of carrots remaining is 2000 or less. The first time this can happens is at mile 334 since 3 x 334 = 1002. Thus the most carrots you can have at mile 334 is 3000 - 1002 = 1998.
  
Once the number of carrots is 2000 or less the donkey can move them in two trips and hence you will lose at least 2 carrots per mile until the number of carrots is 1000 or less. If you have your maximum of 1998 carrots at mile 334 then the donkey will eat at least 2 carrots per mile for the next 499 miles since this is the first time that the number of carrots can be 1000 or less, 1998 - (2 x 499) = 1000. Hence the most carrots that you can have at mile 334 + 449 = 883 is 1000. At this point the best you can do is have the donkey carry all the remaining carrots the 1000 - 833 = 167 miles to market in one trip and eat 167 carrots leaving you at most 833.

No comments:

Post a Comment

Your comment will be atttend by admin soon, thank you.