Kirby-Paris hydra

The Kirby-Paris hydra game is a one-player game played on a tree that can last a very large number of turns. The game is played as follows:


 * We start with a rooted tree \(T\). Call its root \(r\).
 * At step \(n\) (starting with 1), Hercules picks a leaf vertex of the tree. Call the leaf \(a\) and its parent \(b\):
 * \(a\) is deleted from T.
 * If \(b = r\), nothing happens. Otherwise, let \(c\) be the parent of \(b\). Consider the subtree consisting of \(b\) and all its children; copy this subtree \(n\) times. Attach all these copies to \(c\).

This can be expressed equivalently using strings of parentheses:


 * Start with a sequence of parentheses such as.
 * At step \(n\) (starting with 1), pick an empty pair.
 * Delete it.
 * If its parent is not the outermost pair, take its parent and append \(n\) copies it.

For example, at step 3 we can transform  into.

The hydra grows very rapidly at first, but regardless of what strategy Hercules uses, the hydra will eventually reduce to just a single node. Kirby and Paris proved this, and also showed that it is independent of Peano arithmetic.

Define \(\text{Hydra}(n)\) as the number of turns it takes Hercules to defeat a hydra consisting of a path of length \(n\), assuming he always cuts the rightmost edge each step. Then

\begin{eqnarray*} \text{Hydra}(0) &=& 0\\ \text{Hydra}(1) &=& 1\\ \text{Hydra}(2) &=& 3\\ \text{Hydra}(3) &=& 37\\ \text{Hydra}(4) &>& f_{\omega*2 +4}(5) \approx \{5,5,4,3\} >> \text{Graham's number}\\ \text{Hydra}(5) &>& f_{\omega^{\omega*2 + 4}}(5) \approx \{5,5 (1) (1) 5,5,5,5,5\}\\ \end{eqnarray*}

In general, \(\text{Hydra}(n) > f_{\omega^{\omega^{\cdots^{\omega*2+4}}}}(5) > X \uparrow\uparrow (n-4) \&\ 5\) (where are \(n-3\) copies of \(\omega\)). This means that \(\text{Hydra}(n)\) has a growth rate of around, which is not surprising because \(\varepsilon_0\) is the proof-theoretic strength of Peano arithmetic. This puts the hydra function on order of Goodstein sequences or tetrational BEAF arrays.