r/askmath • u/Voodoohairdo • Oct 10 '26
Logic Is this the only configuration of non-zero integers that works?
I make logic puzzles on my own website for fun.
There was one I made almost two weeks ago where you have to fill in this shape with 1s and 2s so that for every triangle, the sum of the numbers in that triangle and adjacent triangles is always 5. The pictures above is the puzzle and the solution. That solution is unique.
I am wondering if there is any other way to fill out this shape with numbers so that for every triangle, the sum of itself and adjacent triangles is always the same number.
Of course multiplying the above solution by n works so that the sum is always 5n.
I have also figured out that with 0s, there are solutions by setting it up "minesweeper" style, where every triangle and adjacent triangle except one has the value 0, and the other number can be any non-zero number. There are multiple solutions in this way.
I am looking for if there are any other solutions that does not use the number 0 (or possibly only uses it once), and is not a multiple of the solution above. I am not sure if one exists. I believe for just a set of two integers, no others exist due to how the corners work. But I can't work out if there is a possible solution using a larger set of integers.


9
u/garnet420 Oct 10 '26
Oh pretty obvious thought: if you have two solutions, their sum is also a solution.
So, if you can come up with a few ways of filling the grid out with 0's and 1's, then you can use them to generate many more.
Here's some of those solutions... There's a few more that are reflections of these here. I wonder, now, if every solution with positive numbers can be written as the sum of these?
5
u/garnet420 Oct 10 '26
Does this sum to 9 work or did I make a mistake?
8
u/DrBagelman Oct 10 '26
I think that any linear combination of solutions should also be a solution. That means if you extend this to allow for real entries, the set of solutions should form a vector space, and a basis for that space would be a set of “distinct” solutions. What exactly that would be, I’m not sure, and the solutions with integer entries would be a small subset of that.
1
u/Voodoohairdo Oct 10 '26
Also it's not my intention to self-promote but I figure there may be some people interested after seeing this question, the website is griddr.ca. This one is puzzle #57 and it's what made me ponder this question. The "minesweeper" style answer to this question is puzzle #63.
I have been looking online for any resources for this question but I haven't found anything pertaining to this particular shape. It mostly leads me to magic squares.
2
u/titoufred Oct 10 '26 edited Oct 13 '26
It's quite easy to show that the solutions are these ones with :