You are given a tree, and each node is initially assigned a non-negative amount of tokens, . In each second, if a node has at least as many tokens as its degree, , it gives exactly one token to each of its neighbors. Prove that eventually, the configuration is either constant or periodic with period 2.

12345

For instance, in this tree, if node 1 starts with 3 tokens and the others start with none, the token counts will evolve as follows:

which has period 2, as desired.

Let’s color nodes with black and nodes with white.

Observation 1

For every black node , is non-increasing. Moreover, if in a given second, is adjacent to at least one white node, must decrease.

Proof: In each second, a black node gives away exactly tokens, and receives at most tokens in return. Every adjacent white node decreases the amount of tokens received.

Observation 2

For every node in the long run, there are two possibilities:

  1. ends up black and always surrounded only by black nodes.
  2. becomes white.

Proof: Assume 1 is not true. Then, by Observation 1, will continue to decrease until node becomes white.

Note that if possibility 1 is true for one node, it must be true for all nodes. Therefore, the only case which satisfies possibility 1 is if all nodes end up black, which leads to a constant configuration.

Thus, from here we can assume that every node eventually becomes white.

Observation 3

Let be the first time node hits its minimum . For all seconds , is black iff all its neighbors were black in second .

Proof: If all neighbors of are black in second , increases by and thus must be black in second .

In the opposite direction, assume not all neighbors were black in second . Then, increases by , and node becomes black. However, once becomes white again (which, per our assumption above, must happen) will decrease by , which means it will have decreased overall from the last time it was white. This contradicts are assumption that was the time of minimum .

Considering only times greater , we have simplified our problem model to the following:

  1. Every node is either black or white.
  2. If all a node’s neighbors are black in second , that node is black in second . Otherwise, it must be white.
12345
12345

The two possible states of our initial example.

Observation 4

If there are ever two adjacent white nodes, all nodes will eventually become white.

Proof: Exercise to the reader.

Note that any configuration with only white nodes is also constant. Therefore, we now only need to consider configurations where there are never adjacent white nodes.

Observation 5

Any configuration (with at least one white node) that never has adjacent white nodes will also end up with no adjacent black nodes.

Proof: Consider any white node . Per our condition, it must be surrounded by all black nodes. Notice that after 2 seconds, node will still be white, all nodes adjacent will still be black, but now the nodes two steps away from node will be white as well.

Therefore, the black and white nodes form a bipartition of the tree. Showing that any such configuration has period 2 is left as an exercise to the reader.

12345
12345

A possible ending configuration.