Splitting 1000 Coins: The Sum of Products Is Always the Same

Brain Teaser · Easy · Free problem

You start with a single pile of $1000$ coins. In each step you choose any pile with at least two coins and split it into two smaller piles of sizes $x$ and $y$ (with $x + y$ equal to the size of the pile you split, $x, y \ge 1$), and you write down the product $xy$. You keep splitting piles until every pile contains exactly one coin, then add up all the products you wrote down.

(a) Show that the final sum does not depend on the order or the sizes of the splits you chose.

(b) What is the final sum for $1000$ coins?

Hints

  1. Try small cases. With 3 coins, splitting $3 \to 1 + 2$ then $2 \to 1 + 1$ gives $2 + 1 = 3$. With 4 coins, try $2 + 2$ and $1 + 3$ and compare.
  2. Let $f(n)$ be the total for $n$ coins. Guess a formula from $f(1) = 0$, $f(2) = 1$, $f(3) = 3$, $f(4) = 6$ and prove it by strong induction using $f(n) = xy + f(x) + f(y)$.
  3. Alternatively, count pairs of coins: each pair of coins is separated into different piles exactly once, at which point it contributes exactly 1 to some product $xy$. There are $\binom{n}{2}$ pairs.

Worked Solution

How to Think About It: When a process seems to depend on many choices but the problem claims the result is fixed, look for a quantity that each step changes by exactly the amount recorded. Here the natural candidate is the number of pairs of coins that have already been separated: a split of a pile of size $x + y$ into $x$ and $y$ separates precisely $xy$ pairs.

Quick Estimate: For $n = 4$, splitting $2 + 2$ then $1 + 1$ twice gives $4 + 1 + 1 = 6$; splitting $1 + 3$, then $1 + 2$, then $1 + 1$ gives $3 + 2 + 1 = 6$. Both equal $\binom{4}{2} = 6$. For $n = 1000$ this suggests $\binom{1000}{2} = 499{,}500$.

Formal Solution:

Part (a): Path independence.

*Method 1 -- Counting pairs.* Consider any two specific coins. At the start they sit in the same pile; at the end they are in different piles. Exactly one split moves them apart: the split of the last pile that contained both, into two parts with one coin in each. When a pile of $x + y$ coins is split into parts of sizes $x$ and $y$, the pairs that are separated are exactly those with one coin in each part, and there are $xy$ of them. Thus each recorded product $xy$ counts the pairs separated at that step, and over the whole process every pair is counted exactly once. The final sum is therefore the total number of pairs, $\binom{n}{2}$, independent of the splitting sequence.

*Method 2 -- Strong induction.* Let $f(n)$ denote the total for a pile of $n$ coins under any splitting strategy. Claim: $f(n) = \frac{n(n-1)}{2}$ for all $n \ge 1$.

Base case: $f(1) = 0$ (no splits), and $\frac{1 \cdot 0}{2} = 0$.

Inductive step: assume $f(k) = \frac{k(k-1)}{2}$ for all $k < n$. The first split of the $n$-coin pile produces piles of sizes $x$ and $y = n - x$ with $1 \le x \le n - 1$, and afterwards the two piles evolve independently, so $$f(n) = xy + f(x) + f(y) = x(n-x) + \frac{x(x-1)}{2} + \frac{(n-x)(n-x-1)}{2}.$$ Expanding, $x(n-x) + \frac{x^2 - x + (n-x)^2 - (n-x)}{2} = \frac{2xn - 2x^2 + x^2 - x + n^2 - 2nx + x^2 - n + x}{2} = \frac{n^2 - n}{2}$. The choice of $x$ cancels out, so $f(n) = \frac{n(n-1)}{2}$ no matter how the first (or any later) split is made.

Part (b): The value.

$$f(1000) = \frac{1000 \times 999}{2} = 499{,}500 .$$ (A simulation of 2000 random splitting sequences of 1000 coins returns 499,500 every time.)

Answer: (a) Each split of a pile into sizes $x$ and $y$ separates exactly $xy$ pairs of coins, and every pair is separated exactly once, so the total is always $\binom{n}{2} = \frac{n(n-1)}{2}$ (equivalently, $f(n) = xy + f(x) + f(y)$ has the unique solution $n(n-1)/2$ by strong induction). (b) $\frac{1000 \times 999}{2} = 499{,}500$.

Intuition

Every split of a pile into sizes $x$ and $y$ separates exactly $xy$ pairs of coins that were together and are now apart, and each pair of coins gets separated exactly once over the whole process. So the running total simply counts pairs, and the answer is $\binom{n}{2}$ regardless of the splitting strategy. The induction proof says the same thing algebraically: $xy + \binom{x}{2} + \binom{y}{2} = \binom{x+y}{2}$. Spotting a path-independent quantity behind a seemingly path-dependent process is a core research instinct, whether the process is a splitting rule, a rebalancing schedule, or an accounting identity.

Open the full interactive solver →