I was thinking on this question and came to the solution $3(x-2)$ (where $x$ is the depth of the hole and $x\ge3$) which I am fairly confident in. Although, I wanted to prove it for any hole that is $n$ blocks deep, could anyone illustrate how I could formally do this using something like induction?
1 Answers
You are correct, and you can prove this by induction. Let's do it!
Let $a_n$ be this sequence, and let $A$ be the subset of elements in $\{ 3, 4, ... \}$ for which the statement $a_n = 3 (n - 2)$ holds.
Base Case
We first show that it holds for $n = 3$. In this case, you need to dig $2$ blocks in the column directly in front of the hole, and $1$ block in the next column. The total is $3$, which is equal to $3 (3 - 2) = 3 (1)$.
Inductive Step
Suppose the statement is true for $n$; we show it is true for $n + 1$. Since we have already shown it to be true for $n = 3$, we will assume that $n \ge 4$. In this case, one must again dig $2$ blocks in the column in front of the hole. But in order to continue moving upwards (assuming no other paths, of course), an additional block above those $2$ must be removed. Now, the player moves to the new column and her elevation increases by $1$. The situation at this point is the same as if the player had started in a hole with depth $n$ (you should convince yourself of why this is true). Therefore, the total number should be $a_{n + 1} = 3 + a_n = 3 + 3 (n - 2) = 3 n - 3 = 3 ((n + 1) - 2)$, as desired.
Therefore, we have shown that $A = \{ 3, 4, ... \}$; i.e., $a_n = 3 (n - 2)$ holds for all $n \ge 3$.
It might be worth extending the sequence to include $0, 1, 2$. For $n = 0$, $a_n = 0$ obviously. For $n = 1$, $a_n = 0$ too, since you mentioned that the player can simply jump out of $1$-high holes. For $n = 2$, $a_n = 1$. It turns out to be this sequence, for what it's worth.
- 7,210
-
1It was really cool to see it formally proven, thank you for taking the time to write this! :) – tothemax Apr 06 '23 at 00:59
So your character has a height of two blocks. Say you are in a deep hole. To get out you must break a block in front of you to form a step up, a second block above that one so your player will fit, and finally the block directly above your head to jump to the first step of your stair. This would continue in all cases but a 2 deep hole (where you just need to break the block in front of you as the surface is above you and not blocking you) and a 1 block hole which you can just jump out of.
– tothemax Apr 05 '23 at 21:25