42
$\begingroup$

All numbers $1$ to $155$ are written on a blackboard, one time each. We randomly choose two numbers and delete them, by replacing one of them with their product plus their sum. We repeat the process until there is only one number left. What is the average value of this number?

I don't know how to approach it: For two numbers, $1$ and $2$, the only number is $1\cdot 2+1+2=5$ For three numbers, $1, 2$ and $3$, we can opt to replace $1$ and $2$ with $5$ and then $3$ and $5$ with $23$, or $1$ and $3$ with $7$ and then $2$, $7$ with $23$ or $2$, $3$ with $11$ and $1$, $11$ with $23$ so we see that no matter which two numbers we choose, the average number remains the same. Does this lead us anywhere?

$\endgroup$
7
  • 8
    $\begingroup$ You have started the problem the right way, by looking at small similar questions. Perhaps if you work out the next case, keeping track of the way you got to each number (so write the $5$ as $1\times 2 + 1 + 2$) , a pattern and a reason will emerge. $\endgroup$ Dec 27, 2018 at 16:14
  • 3
    $\begingroup$ Note that the resulting number has 636 digits, so it's not easy to compute even if you understand the trick and can do it 'quickly' (unless you use a computer). $\endgroup$ Dec 27, 2018 at 16:18
  • 20
    $\begingroup$ Denote the process of replacing two numbers $a,b$ by another one by $a*b \equiv ab+a+b$. Show that $(a*b)*c = a*(b*c)$ and $a*b = b*a$ (i.e. the binary operation $*$ is both associative and commutative). This would prove that order is not important. $\endgroup$
    – Winther
    Dec 27, 2018 at 16:22
  • 2
    $\begingroup$ The same question has previously been asked on the Puzzling StackExchange: Ten numbers on a blackboard. $\endgroup$
    – theosza
    Dec 28, 2018 at 7:53
  • 1
    $\begingroup$ The question is phrased rather oddly. It seems that the number is fixed; so how can it have an average value? $\endgroup$
    – TonyK
    Dec 29, 2018 at 1:41

2 Answers 2

51
$\begingroup$

Claim: if $a_1,...,a_n$ are the $n$ numbers on the board then after n steps we shall be left with $(1+a_1)...(1+a_n)-1$.

Proof: induct on $n$. Case $n=1$ is true, so assume the proposition holds for a fixed $n$ and any $a_1$,...$a_n$. Consider now $n+1$ numbers $a_1$,...,$a_{n+1}$. Suppose that at the first step we choose $a_1$ and $a_2$. We will be left with $ n$ numbers $b_1=a_1+a_2+a_1a_2$, $b_2=a_3$,...,$b_n=a_{n+1}$, so by the induction hypothesis at the end we will be left with $(b_1+1)...(b_n+1)-1=(a_1+1)...(a_{n+1}+1)-1$ as needed, because $b_1+1=a_1+a_2+a_1a_2+1=(a_1+1)(a_2+1)$

Where did I get the idea of the proof from? I guess from the n=2 case: for $a_1,a_2$ you are left with $a_1+a_2+a_1a_2=(1+a_1)(1+a_2)-1$ and I also noted this formula generalises for $n=3$

So in your case we will be left with $156!-1=1\times 2\times...\times 156 -1$

$\endgroup$
4
  • 2
    $\begingroup$ Superb, really smart proof $+1$! $\endgroup$ Dec 27, 2018 at 16:28
  • 2
    $\begingroup$ A really good one, +1 $\endgroup$
    – Saša
    Dec 27, 2018 at 16:35
  • 2
    $\begingroup$ Quite impressive! Just so that it doesn't mislead anyone, because the lowest number is $1$ shouldn't the result equal to: $$2\cdot 3\cdot \dots \cdot 156-1=156!-1?$$ Of course this doesn't change anything. $\endgroup$
    – Zacky
    Dec 27, 2018 at 16:38
  • $\begingroup$ Yes, sure @Zacky ;) the 1 was added by me just to respect the formula for the factorial $\endgroup$
    – Sorin Tirc
    Dec 27, 2018 at 16:50
46
$\begingroup$

Another way to think of Sorin's observation, without appealing to induction explicitly:

Suppose your original numbers (both the original 155 numbers and later results) are written in white chalk. Now above each white number write that number plus one, in red chalk. Write new red companions to each new white number, and erase the red numbers when their white partners go away.

When we erase $x$ and $y$ and write $x+y+xy$, the new red number is $x+y+xy+1=(x+1)(y+1)$, exactly the product of the two red companions we're erasing.

So we can reformulate the entire game as:

Write in red the numbers from $2$ to $156$. Keep erasing two numbers and writing their product instead. At the end when you have one red number left, subtract one and write the result in white.

Since the order of factors is immaterial, the result must be $2\cdot 3\cdots 156-1$.

$\endgroup$
4
  • 2
    $\begingroup$ Great point! I guess this proof belongs to one of those cases in which induction hides a little how obvious the result is. $\endgroup$
    – Sorin Tirc
    Dec 27, 2018 at 16:53
  • $\begingroup$ Nice. I hate it when I know something but can't put it into words. $\endgroup$ Dec 28, 2018 at 2:17
  • $\begingroup$ @SorinTirc: Or, you can think of such proofs as falling into the category of induction proofs that use a loop invariant. Naturally, the loop invariant has one less quantifier than the property under induction, so it feels and looks cleaner. =) $\endgroup$
    – user21820
    Dec 28, 2018 at 3:35
  • 4
    $\begingroup$ It’s maybe worth also noting that Henning Makholm’s proof is setting up an isomorphism between ($\mathbb{R},•$) and ($\mathbb{R}, *$) where $a*b=a+b+ab$ and the isomorphism is given by $f(x)=x-1$ $\endgroup$
    – Sorin Tirc
    Dec 28, 2018 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .