Monday, 23 March 2015

mathematics - Ten numbers on a blackboard


The numbers 1 through 10 are written on a blackboard. You erase two numbers of your choice, and write their product plus their sum



$$a,b \to ab+a+b$$


So, now there are nine numbers on the board. You repeat this process until a single number remains. What is the largest this number can be?


(I can't stop you from writing code to brute-force this, but I assure you there's a nice solution and coding isn't needed.)



Answer



Let the combining operation be $\otimes$, i.e. $a \otimes b = ab + a + b$.


Observe the following for $\otimes$: $$a \otimes b + 1\\ = ab + a + b + 1\\ = (a + 1)(b + 1)$$ So the ordinary multiplication operation is equivalent to $\otimes$ just offset by $+1$. This suggests an equivalent formulation of the problem where instead of working on the original values 1 through 10, we work with 2 through 11 and just use multiplication. Our answer will end up being 1 larger than that required by the original problem.


Since multiplication is commutative and associative, the ordering doesn't matter and all possible sequences will give us the same answer.


The solution to this transposed problem is then $2 \times 3 \times 4 \times \ldots \times 11 = 11! = 39916800$.


And so the solution to the original problem is $1 \otimes 2 \otimes 3 \otimes \ldots \otimes 10 = 11! - 1 = 39916799$.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...