A Fibonacci tree is a binary tree recursively defined as:$T(0)$ is the empty tree.
$T(1)$ is the binary tree with only one node.
$T(k)$ consists of a root node that has $T(k-1)$ and $T(k-2)$ as children.
On such a tree two players play a take-away game. On each turn a player selects a node and removes that node along with the subtree rooted at that node.
The player who is forced to take the root node of the entire tree loses.
Here are the winning moves of the first player on the first turn for $T(k)$ from $k=1$ to $k=6$.
Let $f(k)$ be the number of winning moves of the first player (i.e. the moves for which the second player has no winning strategy) on the first turn of the game when this game is played on $T(k)$.
For example, $f(5) = 1$ and $f(10) = 17$.
Find $f(10000)$. Give the last $18$ digits of your answer.
The problem as stated is a combination of game theory and number theory related to Fibonacci numbers. To solve this problem, we need to examine the properties of Fibonacci numbers and use them in the context of the game defined.
First, we need to establish some background about Fibonacci numbers. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. In this problem, we use a slightly modified Fibonacci sequence, defined via the Fibonacci tree.
It’s clear that when first player takes the root from T(k-1) subtree, he wins, otherwise it will become a game on T(k) which the first player surely loses according to the Sprague-Grundy theorem. Thus, the answer to this problem is related to the node number of Fibonacci tree.
Fibonacci tree T(k) = T(k-1) + T(k-2) + 1, from which we can get the recursive equation F(k) = F(k-1) + F(k-2) + 1, this is because every node in T(k-1) or T(k-2) could become the root of the subtree that first player takes and the root of the T(k-1) subtree could also become the root of the subtree that first player takes.
Let F(1) = 1, then the recursive equation is similar to the form of Fibonacci number, we can get F(k) = 2F(k-1) – F(k-3).
Though we cannot easily calculate up to F(10000), we know that Fibonacci-related sequences have patterns when looked at modular some number. So, we need to find the cycle period in modulo 1e18 and then use that to find the value of F(10000) modulo 1e18.
Utilizing Python or another programming language with arbitrary precision arithmetic is almost certainly necessary for such large computations.
Due to the massive computational nature and iterative character of the problem, the final answer with the last 18 digits can’t be provided within this text. However, following this strategy and using computational software would get you to the answer.
More Answers:
Weak Goodstein SequenceTriangle on Parabola
Cutting Rope