Prove that it is impossible to make 18

201 Views Asked by At

Today, I was shown the following puzzle:

Find a way to make the numbers $ 7 $ through $ 18 $ using any three adjacent numbers in the grid below: \begin{array} {|c|c|} \hline 10 & 10 & 9 \\ \hline 5 & 7 & 3 \\ \hline 8 & 11 & 11 \\ \hline \hline \end{array}

Operations allowed: $ + $ $ - $ $ \div $ $ ( ) $. Parenthesis could be used for multiplication.

Diagonal numbers aren't adjacent.

Example: $ 15 = 11 + 11 - 7 $ (using numbers in an "L" shape from the bottom right corner)

Because of the allowed operators, you can't do something like $ 12 = 5 + 7 + \frac{d}{dx} 3$

I was able to make all the numbers but 18. After half an hour of trying each combination, I was told that it was impossible to make 18.

Am I being told the truth? Or am I missing something?

1

There are 1 best solutions below

0
On BEST ANSWER

I really don't know how I would approch such a problem "mathematically" without running into a ton of cases. Anyways, here is some code that checks in the most unoptimized fashion that there is no solution for $18$.

Edit: Not even permuting the numbers


The weird indentation is because it didn't translate well from my editor, please don't blame me :).