Memory problem when solving a system of modular equations
FindInstance
easily finds one solution, and fails to find two, so there might not be more:
FindInstance[{Mod[6 a + 0 b + 1 c + 1 d + 0 e + 1 f + 0 g + 1 h + 0 i,
1235788] == 990685,
Mod[0 a + 3 b + 0 c + 0 d + 3 e + 0 f + 0 g + 0 h + 1 i,
1235788] == 404244,
Mod[4 a + 0 b + 0 c + 0 d + 0 e + 1 f + 1 g + 0 h + 0 i,
1235788] == 1228796,
Mod[1 a + 2 b + 1 c + 0 d + 1 e + 1 f + 1 g + 0 h + 0 i,
1235788] == 626461,
Mod[6 a + 0 b + 2 c + 0 d + 1 e + 1 f + 0 g + 0 h + 0 i,
1235788] == 814018,
Mod[4 a + 1 b + 1 c + 0 d + 1 e + 0 f + 0 g + 0 h + 1 i,
1235788] == 1052512,
Mod[1 a + 11 b + 0 c + 0 d + 0 e + 0 f + 0 g + 0 h + 0 i,
1235788] == 332360,
Mod[4 a + 2 b + 0 c + 2 d + 0 e + 0 f + 0 g + 0 h + 1 i,
1235788] == 417059,
Mod[7 a + 3 b + 1 c + 0 d + 0 e + 0 f + 1 g + 0 h + 0 i,
1235788] == 141258}, {a, b, c, d, e, f, g, h, i},
Integers][[1]] // TableForm
You can use the Modulus
option for Reduce
to get the general solution.
{ToRules[Reduce[{
6 a + 0 b + 1 c + 1 d + 0 e + 1 f + 0 g + 1 h + 0 i == 990685,
0 a + 3 b + 0 c + 0 d + 3 e + 0 f + 0 g + 0 h + 1 i == 404244,
4 a + 0 b + 0 c + 0 d + 0 e + 1 f + 1 g + 0 h + 0 i == 1228796,
1 a + 2 b + 1 c + 0 d + 1 e + 1 f + 1 g + 0 h + 0 i == 626461,
6 a + 0 b + 2 c + 0 d + 1 e + 1 f + 0 g + 0 h + 0 i == 814018,
4 a + 1 b + 1 c + 0 d + 1 e + 0 f + 0 g + 0 h + 1 i == 1052512,
1 a + 11 b + 0 c + 0 d + 0 e + 0 f + 0 g + 0 h + 0 i == 332360,
4 a + 2 b + 0 c + 2 d + 0 e + 0 f + 0 g + 0 h + 1 i == 417059,
7 a + 3 b + 1 c + 0 d + 0 e + 0 f + 1 g + 0 h + 0 i == 141258},
{a, b, c, d, e, f, g, h, i}, Modulus -> 1235788]]}
The constant C[1]
returned in the result may be set to any integer; however, there are only finitely many distinct solutions because of the modular arithmetic.