4
$\begingroup$

Arrange numbers 1 to 9 into the octagon, so the operation is correct.
C is a constant.
Do the math operation in sequence, ($×$) and ($/$) is NOT HIGHER than ($+$) and ($-$).

enter image description here

$\endgroup$
  • $\begingroup$ Do we need to follow BODMAS rule? $\endgroup$ – Techidiot Apr 5 '17 at 8:40
  • $\begingroup$ @Techidiot : No (all operation are equal) $\endgroup$ – Jamal Senjaya Apr 5 '17 at 8:42
2
$\begingroup$

You could deduce things using the equations.

As mentioned by @Bojan B (with different notation), we can write down some equations:
(a - b) * c = C
(d * e) / f = C
(g - h) + i = C
(a + d) / g = C
(b + e) / h = C
(c * f) - i = C

Then we can start writing down knowns:
1. a != b != c != d != e != f != g != h != i
2. C is positive, because (d * e) / f will not produce less than 1.
3. C is an integer because (g - h) + i will not produce a fraction.
4. a > b. Otherwise, (a - b) * c produces a negative value and contradicts #2.
5. a != 1. Otherwise, b is not in our set of values. b != 9. Otherwise, a is not in our set of values.
6. If a + d is a prime number, then g = 1.
7. If b + e is a prime number, then h = 1.
8. a + d and b + e both cannot be prime, because both g and h would be 1. Contradicts #1.
9. g > h and/or i > g - h. Otherwise, (g - h) + i produces a negative and contradicts #2.
10. f != 5 and f != 7 because d or e would need to be 5 or 7 to satisfy (d * e) / f and contradict #1.
11. C < 17 because the largest value of (g - h) + i is (9 - 1) + 8 = 16.
12. c * f < 25 because (c * f) - i = C or (c * f) = C + i and the largest possible value of C + i is 16 + 9 = 25 (#11). In order for cf = 25, c = f = 5 (contradicts #1).
13. c * f multiplies to 2, 3, 4, 6, 8, 9, 12, 16, 18, or 24 (no multiplies of 5 or 7 because #10).
14. c * f > i. Otherwise, (c * f) - i produces 0 or less.

One could keep going with this strategy and (hopefully) eventually deduce a non-brute force solution.

Edit: continuing my efforts.

Is it possible to add two equations together if we aren't following BODMAS?
(g - h) + i = C
+ (c * f) - i = C
= (g - h) + (c * f) = 2C
which would tell us both g - h and c * f are multiples of 2. So g and h are both even or both odd, and from #13, c * f no longer multiplies to 3 or 9.
Also c * f > g - h because c * f = (g - h) + 2i.

We also have 3 ratios that equal C: (d * e) / f, (a + d) / g, and (b + e) / h. Ratios that could potentially satisfy these are:
1 = 6/6, 8/8, 9/9
2 = 2/1, 4/2, 6/3, 8/4, 12/6, 16/8, 18/9
3 = 3/1, 6/2, 9/3, 12/4, 18/6, 24/8
4 = 4/1, 8/2, 12/3, 16/4, 24/6
6 = 6/1, 12/2, 18/3, 24/4
8 = 8/1, 16/2, 24/3
I've excluded ones where the numerator can only be factored by the denominator. Since we need 3 unique denominators in a set, I also excluded sets with less than 3 ratios.
So we at least know C is 1, 2, 3, 4, 6 or 8.

$\endgroup$
4
$\begingroup$

I guess this might not be in the spirit of the puzzle, but there was no tag or rule specifying that we can't use computers for this.

So with a help of a computer program that I wrote the only possible solution would be:

9 8 2 for the top row, 1 6 3 for the middle row, 5 7 4 for the bottom row, the constant result would be 2 for all 6 equations.

EDIT:

Now that the OP has confirmed that it is ok to use computers, I have written down a short explanation as to how I got the solution. However, it is basically trial-error based, so I hope some one comes up with a more mathematical one (since my math-fu is not strong enough).

Explanation:

Based on the grid we can extrapolate these 6 equations:
(x1 - x2) * x3 = C;
x4 * x5 / x6 = C;
x7 - x8 + x9 = C;
(x1 + x4) / x7 = C;
(x2 + x5) / x8 = C;
x3 * x6 - x9 = C;

And we know that all equations produce the same result, so:
(x1 - x2) * x3 = x4 * x5 / x6
and so on.
From here on I just made a program that ran through all permutations of the numbers 1 - 9 as inputs for variables x1,x2,...

The algorithm produced the only possible solution to the grid, which is however a purely brute force solution.

$\endgroup$
  • $\begingroup$ Not sure if its allowed or not, but I got the answer by guessing as well. I was drafting it. But you already have it. +1 This is what I got as well. $\endgroup$ – Techidiot Apr 5 '17 at 9:13
  • $\begingroup$ @BojanB Its allowed, but green ticks just for answer with good explanation. $\endgroup$ – Jamal Senjaya Apr 5 '17 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.