| |
 |
Problem H4 | |
a. | This extension will change the way the table is constructed. The first 6 meters will all take 1 minute, the next 4 will take 3 minutes, the next 4 will take 5 minutes, and so forth. This happens because the frog gains 4 meters in each 2-minute cycle of jumping and resting. So it will take 24 2-minute cycles for the frog to get within the 6-meter range for its escape, and it will take a total of 49 minutes for the frog to make it all the way out of a 100-meter well. | |
b. | Now the frog will take only 1 minute to escape if the well is n meters or less, and each extra minute the frog can climb (n 2) more meters. The full formula here requires the greatest integer function, but a quick calculation would be to subtract 2, divide by (n 2), round the answer up to the nearest whole number, double it, then subtract 1. The subtraction by 2 is done because the frog doesnıt slip right away, and the dividing by (n 2) is done because it is the total height gained by the frog in one cycle of climbing and slipping. The doubling is done because one cycle takes 2 minutes, and the subtracting by 1 is done because the frog doesnıt slip in the cycle that he manages to escape. | |
c. | Let's call the climbing rate C, the slippage rate S, and the height H. It's pretty difficult to create a formula for T, the time for the frog to escape, but first a few observations:
| If the given height H is less than or equal to C, the answer should be 1 minute. |
| Every 2 minutes after the first, if the frog is still stuck, it gains (C - S) meters. |
|
This means that we'll need to calculate (H - C) / (C - S) to find how many 2-minute cycles the frog will need to go through to get within C meters of the top, then 1 more minute to escape. Additionally, because (H - C) / (C - S) often gives a fraction, we have to include instructions to round that number up to the next integer. (This is usually called the "ceiling" function, and is denoted by the oddly shaped brackets seen below. We used this function when we talked about Eric the Sheep.) Additionally (!), because (H - C) might be negative, we have to make an exception for those times that the frog can just hop on out. So, having done all that, here's the formula for T, the time that it takes the frog to escape:

Test it out on the previous problems if you like.
<< back to Problem H4
|
|
|