MIT6_042JS10_lec24_sol

MIT6_042JS10_lec24_sol - Massachusetts Institute of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science April 5 Prof. Albert R. Meyer revised March 31, 2010, 41 minutes Solutions to In-Class Problems Week 9, Mon. Problem 1. An explorer is trying to reach the Holy Grail, which she believes is located in a desert shrine d days walk from the nearest oasis. In the desert heat, the explorer must drink continuously. She can carry at most 1 gallon of water, which is enough for 1 day. However, she is free to create water caches out in the desert. For example, if the shrine were 2 / 3 of a day’s walk into the desert, then she could recover the Holy Grail with the following strategy. She leaves the oasis with 1 gallon of water, travels 1 / 3 day into the desert, caches 1 / 3 gallon, and then walks back to the oasis— arriving just as her water supply runs out. Then she picks up another gallon of water at the oasis, walks 1 / 3 day into the desert, tops off her water supply by taking the 1 / 3 gallon in her cache, walks the remaining 1 / 3 day to the shine, grabs the Holy Grail, and then walks for 2 / 3 of a day back to the oasis— again arriving with no water to spare. But what if the shrine were located farther away?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

MIT6_042JS10_lec24_sol - Massachusetts Institute of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online