A bit of context
I'm analyzing a type of cryptarithmetic puzzle that consist in the simultaneous resolution of 6 cryptarithms arranged in a magic square fashion.
Here's an example:
Solution:
7008, 612, 6396 // 584, 571, 13 // 12, 41, 492
My goal is possibly finding how many puzzles are there (with numbers up to $k$ digits) net of symmetries.
I've started calculating how many unique structures of operations are there up to symmetries.
Since (assuming the number $0$ is never used otherwise the puzzle would be trivialized) the result of each of the four operations can always be swapped with the first operand and the operation inverted
you can always swap the first column(row) with the last one and invert all the row(column) operations.
These four puzzles are equivalent + = - = * = / = / - + + - / * + - - + * - = + = - = + = = = = = = = = = = = = = * = / = + = - =
In addition
- if a column(row) consist of only $+$ and $\times$ you can swap the first column(row) with the second
- if a column(row) consist of only $-$ and $\div$ you can swap the second column(row) with the third
And of course
- you can always transpose the entire matrix
I've written a code that given a structure finds all the members of its equivalence class.
If my analysis and my code are correct, there are $433$ unique structures of operations.
Hence $433$ different systems of diophantine equations. ($9$ of them consist of only $+$ and $-$ and $9$ of them consist of only $\times$ and $\div$, those are trivial)
The question
A general form of this class of diophantine equations is:
$$ (a \star_1 b) \star_2 (c \star_3 d) = (a \star_4 c) \star_5 (b \star_6 d) $$
$a,\ b,\ c,\ d,\ (a \star_1 b),\ (c \star_3 d),\ (a \star_4 c),\ (b \star_6 d),\ (a \star_1 b) \star_2 (c \star_3 d) \in \mathbb{Z}^+$
How can I find the solutions or determine there are none? Is there a simple algorithm?
