November 30, 2009 07:30 PM

Logic Puzzle – Crossing a Desert

Rating: (9)
SQL Server Magazine
InstantDoc ID #103215

I got this one from my father. You are currently in one of two towns separated by a desert. You need to cross the desert to get to the other town. It takes 6 days to cross the desert, but a single person can carry only 4 days worth of food supply. You can hire porters to help you carry your food supply, but naturally you want to minimize the costs as much as possible. What would be the plan that will enable you to cross the desert while paying for the minimum possible number of porter days?

I’ll post the solution next week.

Cheers,
BG

Add a Comment

I think you just need one porter for 2 days. After 2 days you take his supply and continue the trip alone, with a supply of 2 x 2 days.
(I know, the porter won't like it this way but it fulfills the requirements AND it is the cheapest plan. And it's not for real anyway. And also, maybe these porters have got a satellite phone to contact the office in case of emergency.)

Valentino12/7/2009 12:43:11 AM


No, they are not paid to get home. They get to keep any food supply that is not needed for their return trip.

Farrell12/3/2009 2:44:58 PM


Are you allowed to have 1 porter start from your destination and meet you part way? If so, I believe 2 porters for 2 days, each with 3 days food would work.

You take 4 days food and start the journey with 1 porter carrying 3 days worth of food. At the end of day 1, each of you has consumed 1 day's food. He splits his remaining food, restoring you to a 4 day supply while maintaining 1 day's worth of food for his return trip.

You have the second porter start out from your destination on day 4, 2 days before you are scheduled to arrive. He also takes enough food for 3 days. He consumes one day's worth travelling to meet you. You meet him at the end of day five as your food runs out and he has enough for 2 more days. He provides your final day of food and completes the journey with you on day six.

Calvin12/2/2009 7:37:58 AM


Your porters aren't paid to get home?

Peter11/30/2009 8:19:14 PM


I say 3 porter days using 2 porters.

You start out with yourself (carrying 4 days supply), Porter A ( also has 4 days supply), and Porter B (also has 4 days supply).

After the first day, Porter B gives You and porter A, 1 day supply each and then goes home. He gets paid for 1 day.

This gives You and Porter A 4 days supply each again.

After the second day Porter A gives you 1 days supply, and goes home. He gets paid for 2 days.

You now have 4 days supply left to finish the crossing in 4 days.

You paid one porter for 1 day, and another porter for 2 days.




After the second day

Farrell11/30/2009 1:32:29 PM


My answer is six porter days (two porters neede) and all are alive after crossing the desert.

Peter11/30/2009 9:11:42 AM


Is it a requirement that all porters are alive after crossing the desert?

Peter11/30/2009 8:51:52 AM


You must log on before posting a comment.

Are you a new visitor? Register Here
GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS