In mathematics, specifically in graph theory and number theory, a hydra game is a single-player iterative mathematical game played on a mathematical tree called a "hydra" where the player's goal is to "kill" the hydra by removing its nodes ("heads") one-by-one while the hydra simultaneously expands itself (this resembles a battle between Hercules and the Lernaean Hydra, hence the name). The rules of the game allow the player to eventually win, but the number of steps required to reach the goal grows very rapidly as the size of the initial tree increases, so the game can be used to generate large numbers or infinite ordinals or prove the strength of certain mathematical theories. Unlike their combinatorial counterparts like TREE and SCG, no search is required to compute these fast-growing function values—one must simply keep applying the transformation rule to the tree until the game says to stop.
Introduction A simple hydra game consists of a sequence of iterations that modify the hydra, a finite rooted tree graph with the root R. Each iteration is labeled with a sequential number n, starting with 1, and consists of two steps:
The player selects a leaf node x from the tree during each turn. Remove the leaf node x. Let a be x's parent. If a=R, return to stage 1. Otherwise if a≠R, let b be the parent of a. Then create n leaf nodes as children of b such that the new nodes would appear after any existing children of b during a post-order traversal (visually, these new nodes would appear to the right side of any existing children). Then return to stage 1. Even though the hydra may grow by an unbounded number n of leaves at each turn, the game will eventually end in finitely many steps: if d is the greatest distance between the root and the leaf, and w the number of leaves at this distance, induction on d can be used to demonstrate that the player will always kill the hydra. If d=1, removing the leaves can never cause the hydra to grow, so the player wins after w turns. For general d, we consider two kinds of moves: those that involve a leaf at a distance less than d from the root, and those that involve a leaf at a distance of exactly d. Since moves of the first kind are also identical to moves in a game with depth d−1, the induction hypothesis tells us that after finitely many such moves, the player will have no choice but to choose a leaf at depth d. No move introduces new nodes at this depth, so this entire process can only repeat up to w times, after which there are no more leaves at depth d and the game now has depth (at most) d−1. Invoking the induction hypothesis again, we find that the player must eventually win overall. While this shows that the player will win eventually, it can take a very long time. As an example, consider the following algorithm for both the player's moves and the hydra's responses. Pick the rightmost leaf (i.e., the newest leaf which will be on the level closest to the root) and set n=1 the first time, 2 the second time, and so on, always increasing n by one. If a hydra has a single y-length branch, then hydra(y) is defined as the number of steps used to kill it. Then for hydra(1)=1, since a single length one hydra is killed in a single step. The next three values are hydra(2)=3, hydra(3)=11, and hydra(4)=1114111. Although hydra(5) has also been calculated exactly, it is too large to display all the digits here. Instead, let F(x)=2x(x+2)−1 and let Fn be F iterated n times (that is, composed with itself n times). Then hydra(5) can be written as 2FF2(3)+1(F2(3)+1)+1 or 2F22539988369408(22539988369408)+1.
General solution The general solution to the hydra game (played with the algorithm of the previous section) is as follows: Let Fi(x) denote the number of steps required to decrement a head of depth n when the heads closer to the roots are all singular (no further "right" branches). Then Fi+1(x)=Fix(x+1) and F1(x)=2⋅(x+1)−1=2x+1. The answer to hydra(n) is: F1(F2(F3(…Fn−1(Fn(1))…))) The growth rate of this function is faster than the standard fast-growing hierarchy, as Fi(x) alone grows at the rate of the fast-growing hierarchy, and the solution is the nth nesting of Fi(x).
Kirby–Paris and Buchholz hydras The Kirby–Paris hydra is defined by altering the rule of the simple hydra defined above:
Assume b is the parent of a if a≠R. Attach n copies of the subtree with root a to b to the right of all other nodes connected to b. Return to stage 2. Instead of adding only new leaves, this rule adds duplicates of an entire subtree. Keeping everything else the same, this time y=1 requires 1 turn, y=2 requires 3 steps, y=3 requires 37 steps and y=4 requires more steps than Graham's number. This functions growth rate is massive, equal to fε0(n) in the fast-growing hierarchy, where ε0 is the smallest epsilon number. This is not the most powerful hydra. The Buchholz hydra is a more potent hydra. It entails a labelled tree. The root has a unique label (call it R), and each other node has a label that is either a non-negative integer or ω.
A hydra is a labelled tree with finite roots. The root should be labelled R. Label all nodes adjacent to the root 0 (important to ensure that it always ends) and every other node with a non-negative integer or ω. Choose a leaf node x and a natural number n at each stage. Remove the leaf x. Let a be x's parent. Nothing else happens if a=R. Return to stage 2. If the label of x is 0, Assume b is the parent of a. Attach n copies of the subtree with root a to b to the right of all other nodes connected to b. Return to stage 2. If x's label is ω, replace it with n+1. Return to stage 2. If the label of x is a positive integer u. go down the tree looking for a node c with a label <u. Such a node exists because all nodes adjacent to the root are labelled 0. Take a copy of the subtree with root c. Replace x with this subtree. However, relabel x (the root of the copy of the subtree) with u−1. Call the equivalent of x in the copied subtree x′ (so x is to x′ as c is to x), and relabel it (x′)0. Go back to stage 2. Surprisingly, even though the hydra can grow enormously larger, this sequence always ends.
… excerpt ends here. Continue reading the full article.
