Hydra game

From HandWiki
Short description: Single-player iterative mathematical game played on a mathematical tree

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, usually, the goal is to cut off the hydra's "heads" while the hydra simultaneously expands itself. Hydra games can be used to generate large numbers or infinite ordinals or prove the strength of certain mathematical theories.[1]

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 can be defined as follows:

  • A hydra is a finite rooted tree, which is a connected graph with no cycles and a specific node designated as the root [math]\displaystyle{ R }[/math] of the tree. In a rooted tree, each node has a single parent (with the exception of the root, which has no parent) and a set of children, as opposed to an unrooted tree where there is no parent-child relationship and we simply refer to edges between nodes.
  • The player selects a leaf node [math]\displaystyle{ x }[/math] from the tree and a natural number [math]\displaystyle{ n }[/math] during each turn. A leaf node can be defined as a node with no children, or a node of degree 1 which is not [math]\displaystyle{ R }[/math].
  • Remove the leaf node [math]\displaystyle{ x }[/math]. Let [math]\displaystyle{ a }[/math] be [math]\displaystyle{ x }[/math]'s parent. If [math]\displaystyle{ a = R }[/math], return to stage 2. Otherwise if [math]\displaystyle{ a \neq R }[/math], let [math]\displaystyle{ b }[/math] be the parent of [math]\displaystyle{ a }[/math]. Then create [math]\displaystyle{ n }[/math] leaf nodes as children of [math]\displaystyle{ b }[/math] such that the new nodes would appear after any existing children of [math]\displaystyle{ b }[/math] during a post-order traversal (visually, these new nodes would appear to the right side of any existing children). Then return to stage 2.

Even though the hydra may grow by an unbounded number [math]\displaystyle{ n }[/math] of leaves at each turn, the game will eventually end in finitely many steps: if [math]\displaystyle{ d }[/math] is the greatest distance between the root and the leaf, and [math]\displaystyle{ w }[/math] the number of leaves at this distance, induction on [math]\displaystyle{ d }[/math] can be used to demonstrate that the player will always kill the hydra. If [math]\displaystyle{ d = 1 }[/math], removing the leaves can never cause the hydra to grow, so the player wins after [math]\displaystyle{ w }[/math] turns. For general [math]\displaystyle{ d }[/math], we consider two kinds of moves: those that involve a leaf at a distance less than [math]\displaystyle{ d }[/math] from the root, and those that involve a leaf at a distance of exactly [math]\displaystyle{ d }[/math]. Since moves of the first kind are also identical to moves in a game with depth [math]\displaystyle{ d-1 }[/math], the induction hypothesis tells us that after finitely many such moves, the player will have no choice but to choose a leaf at depth [math]\displaystyle{ d }[/math]. No move introduces new nodes at this depth, so this entire process can only repeat up to [math]\displaystyle{ w }[/math] times, after which there are no more leaves at depth [math]\displaystyle{ d }[/math] and the game now has depth (at most) [math]\displaystyle{ d-1 }[/math]. 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. Pick the rightmost leaf and set [math]\displaystyle{ n = 1 }[/math] the first time, [math]\displaystyle{ 2 }[/math] the second time, and so on, always increasing [math]\displaystyle{ n }[/math] by one. If a hydra has a single [math]\displaystyle{ y }[/math]-length branch, then for [math]\displaystyle{ y = 1 }[/math], the hydra is killed in a single step, while it is killed in three steps if [math]\displaystyle{ y = 2 }[/math]. There are 11 steps required for [math]\displaystyle{ y = 3 }[/math]. There are 983038 steps required for [math]\displaystyle{ y = 4 }[/math]. Neither the amount of steps for [math]\displaystyle{ y = 5 }[/math] or higher, nor the growth rate of this function, have been calculated, though the growth rate is likely much greater than [math]\displaystyle{ f_3(n) }[/math] in the fast-growing hierarchy.

Kirby–Paris and Buchholz hydras

The Kirby–Paris hydra is defined by altering the fourth rule of the hydra defined above.

4KP: Assume [math]\displaystyle{ b }[/math] is the parent of [math]\displaystyle{ a }[/math] if [math]\displaystyle{ a \neq R }[/math]. Attach [math]\displaystyle{ n }[/math] copies of the subtree with root [math]\displaystyle{ a }[/math] to [math]\displaystyle{ b }[/math] to the right of all other nodes connected to [math]\displaystyle{ b }[/math]. Return to stage 2.[2]

Instead of adding only new leaves, this rule adds duplicates of an entire subtree. Keeping everything else the same, this time [math]\displaystyle{ y = 1 }[/math] requires [math]\displaystyle{ 1 }[/math] turn, [math]\displaystyle{ y=2 }[/math] requires [math]\displaystyle{ 3 }[/math] steps, [math]\displaystyle{ y=3 }[/math] requires [math]\displaystyle{ 37 }[/math] steps and [math]\displaystyle{ y=4 }[/math] requires more steps than Graham's number. This functions growth rate is massive, equal to [math]\displaystyle{ f_{\varepsilon_0}(n) }[/math] in the fast-growing hierarchy.

This is not the most powerful hydra. The Buchholz hydra is a more potent hydra.[3] It entails a labelled tree. The root has a unique label (call it [math]\displaystyle{ R }[/math]), and each other node has a label that is either a non-negative integer or [math]\displaystyle{ \omega }[/math].[4]

  1. A hydra is a labelled tree with finite roots. The root should be labelled [math]\displaystyle{ R }[/math]. Label all nodes adjacent to the root [math]\displaystyle{ 0 }[/math] (important to ensure that it always ends) and every other node with a non-negative integer or [math]\displaystyle{ \omega }[/math].
  2. Choose a leaf node [math]\displaystyle{ x }[/math] and a natural number [math]\displaystyle{ n }[/math] at each stage.
  3. Remove the leaf [math]\displaystyle{ x }[/math]. Let [math]\displaystyle{ a }[/math] be [math]\displaystyle{ x }[/math]'s parent. Nothing else happens if [math]\displaystyle{ a = R }[/math]. Return to stage 2.
  4. If the label of [math]\displaystyle{ x }[/math] is [math]\displaystyle{ 0 }[/math], Assume [math]\displaystyle{ b }[/math] is the parent of [math]\displaystyle{ a }[/math]. Attach [math]\displaystyle{ n }[/math] copies of the subtree with root [math]\displaystyle{ a }[/math] to [math]\displaystyle{ b }[/math] to the right of all other nodes connected to [math]\displaystyle{ b }[/math]. Return to stage 2.
  5. If x's label is [math]\displaystyle{ \omega }[/math], replace it with [math]\displaystyle{ n+1 }[/math]. Return to stage 2.
  6. If the label of [math]\displaystyle{ x }[/math] is a positive integer [math]\displaystyle{ u }[/math]. go down the tree looking for a node [math]\displaystyle{ c }[/math] with a label [math]\displaystyle{ \lt u }[/math]. Such a node exists because all nodes adjacent to the root are labelled [math]\displaystyle{ 0 }[/math]. Take a copy of the subtree with root [math]\displaystyle{ c }[/math]. Replace [math]\displaystyle{ x }[/math] with this subtree. However, relabel [math]\displaystyle{ x }[/math] (the root of the copy of the subtree) with [math]\displaystyle{ u-1 }[/math]. Call the equivalent of [math]\displaystyle{ x }[/math] in the copied subtree [math]\displaystyle{ x' }[/math] (so [math]\displaystyle{ x }[/math] is to [math]\displaystyle{ x' }[/math] as [math]\displaystyle{ c }[/math] is to [math]\displaystyle{ x }[/math]), and relabel [math]\displaystyle{ x' }[/math] it 0. Go back to stage 2.[5]

Surprisingly, even though the hydra can grow enormously taller, this sequence always ends.[6]

More about KP hydras

For Kirby–Paris hydras, the rules are simple: start with a hydra, which is an unordered unlabelled rooted tree [math]\displaystyle{ T }[/math]. At each stage, the player chooses a leaf node [math]\displaystyle{ c }[/math] to chop and a non-negative integer [math]\displaystyle{ n }[/math]. If [math]\displaystyle{ c }[/math] is a child of the root [math]\displaystyle{ r }[/math], it is removed from the tree and nothing else happens that turn. Otherwise, let [math]\displaystyle{ p }[/math] be [math]\displaystyle{ c }[/math]'s parent, and [math]\displaystyle{ g }[/math] be [math]\displaystyle{ p }[/math]'s parent. Remove [math]\displaystyle{ c }[/math] from the tree, then add [math]\displaystyle{ n }[/math] copies of the modified [math]\displaystyle{ p }[/math] as children to [math]\displaystyle{ g }[/math]. The game ends when the hydra is reduced to a single node.

To obtain a fast-growing function, we can fix [math]\displaystyle{ n }[/math], say, [math]\displaystyle{ n=1 }[/math] at the first step, then [math]\displaystyle{ n=2 }[/math], [math]\displaystyle{ n=3 }[/math], and so on, and decide on a simple rule for where to cut, say, always choosing the rightmost leaf. Then, [math]\displaystyle{ \operatorname{Hydra}(k) }[/math] is the number of steps needed for the game to end starting with a path of length [math]\displaystyle{ k }[/math], that is, a linear stack of [math]\displaystyle{ k+1 }[/math] nodes. [math]\displaystyle{ \operatorname{Hydra}(k) }[/math] eventually dominates all recursive functions which are provably total in Peano arithmetic, and is itself provably total in [math]\displaystyle{ \mathrm{PA} + (\varepsilon_0\text{ is well-ordered}) }[/math].[7]

This could alternatively expressed using strings of brackets:

  • Start with a finite sequence of brackets such as [math]\displaystyle{ (()(()(())((())))) }[/math].
  • Pick an empty pair [math]\displaystyle{ () }[/math] and a non-negative integer [math]\displaystyle{ n }[/math].
  • Delete the pair, and if its parent is not the outermost pair, take its parent and append [math]\displaystyle{ n }[/math] copies of it.

For example, with [math]\displaystyle{ n=3 }[/math], [math]\displaystyle{ (()(()\mathbf{()})) \implies (()(())(())(())(())) }[/math]. Next is a list of values of [math]\displaystyle{ \operatorname{Hydra}(k) }[/math]:

  • [math]\displaystyle{ \operatorname{Hydra}(0) = 0 }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(1) = 1 }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(2) = 3 }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(3) = 37 }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(4) \gt f_{\omega \cdot 2 + 4}(5) \gg \text{Graham's number} }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(5) \gt f_{\omega^{2 + 4}}(5) }[/math]
  • [math]\displaystyle{ \operatorname{Hydra}(6) \gt f_{\underbrace{\omega ^ {\cdots ^ \omega}}_6}(5) }[/math]

More about Buchholz hydras

Main page: Buchholz hydra

The Buchholz hydra game is a hydra game in mathematical logic, a single player game based on the idea of chopping pieces off a mathematical tree. The hydra game can be used to generate a rapidly growing function [math]\displaystyle{ BH(n) }[/math], which eventually dominates all provably total recursive functions. It is an extension of Kirby-Paris hydras. What we use to obtain a fast-growing function is the same as Kirby-Paris hydras, but because Buchholz hydras grow not only in width but also in height, [math]\displaystyle{ BH(n) }[/math] has a much greater growth rate of [math]\displaystyle{ f_{\psi_0(\varepsilon_{\Omega_\omega + 1})}(n) }[/math]:

  • [math]\displaystyle{ BH(1) = 0 }[/math]
  • [math]\displaystyle{ BH(2) = 1 }[/math]
  • [math]\displaystyle{ BH(3) \lt f_{\varepsilon_0}(3) }[/math]

This system can also be used to create an ordinal notation for infinite ordinals, e.g. [math]\displaystyle{ \psi_0(\Omega_\omega) = +0(\omega) }[/math].

See also

References

External links