0%

Problem 426


Problem 426


Box-ball system

Consider an infinite row of boxes. Some of the boxes contain a ball. For example, an initial configuration of 2 consecutive occupied boxes followed by 2 empty boxes, 2 occupied boxes, 1 empty box, and 2 occupied boxes can be denoted by the sequence (2, 2, 2, 1, 2), in which the number of consecutive occupied and empty boxes appear alternately.

A turn consists of moving each ball exactly once according to the following rule: Transfer the leftmost ball which has not been moved to the nearest empty box to its right.

After one turn the sequence (2, 2, 2, 1, 2) becomes (2, 2, 1, 2, 3) as can be seen below; note that we begin the new sequence starting at the first occupied box.

A system like this is called a Box-Ball System or BBS for short.

It can be shown that after a sufficient number of turns, the system evolves to a state where the consecutive numbers of occupied boxes is invariant. In the example below, the consecutive numbers of occupied boxes evolves to [1, 2, 3]; we shall call this the final state.

We define the sequence {ti}:

  • s0 = 290797
  • sk+1 = sk2 mod 50515093
  • tk = (sk mod 64) + 1

Starting from the initial configuration (t0, t1, …, t10), the final state becomes [1, 3, 10, 24, 51, 75].
Starting from the initial configuration (t0, t1, …, t10 000 000), find the final state.
Give as your answer the sum of the squares of the elements of the final state. For example, if the final state is [1, 2, 3] then 14 ( = 12 + 22 + 32) is your answer.


盒子与球系统

考虑一行无限多个盒子,其中一些盒子放了球。其中一种放置方法是,前两个放球,然后紧跟着两个空箱子,然后再两个放球,再一个空箱子,再两个放球,这样的放置方法可以表示为序列(2, 2, 2, 1, 2),连续的数轮流表示放球和不放球。

每一轮,按照下面所述的规则,移动每一个球恰好一次:将最左侧的没有移动过的球移动到右边最近的空格。

经过一轮后,序列(2, 2, 2, 1, 2)将会变成(2, 2, 1, 2, 3),如下图所示。注意新序列将从第一个放了球的盒子开始计数。

一个这样的系统被称为盒子与球系统或者简称BBS

可以看出,经过足够多轮之后,这个系统将会进化到一个不变的状态。在下面的例子中,所有放球的盒子的序列最终将会进化成[1, 2, 3];我们称之为最终状态。

我们按如下方式定义序列{ti}:

  • s0 = 290797
  • sk+1 = sk2 mod 50515093
  • tk = (sk mod 64) + 1

从初始状态(t0, t1, …, t10)开始,最终状态将是[1, 3, 10, 24, 51, 75]。
从初始状态(t0, t1, …, t10 000 000)开始,求最终状态。
你的答案将以最终状态各元素的平方和的形式给出,例如,如果最终状态是[1, 2, 3],那么你的答案应当是14 ( = 12 + 22 + 32)。