0

I need to resolve the following system of linear congruences:

$9 = 3a+c \pmod m$
$11 = 9a+c \pmod m$
$1 = 11a+c \pmod m$

How can I proceed?
Is there anyway to input these equations in Wolfram alpha (or another tool)?

Shagnik
  • 3,613
Rafa
  • 127
  • 1
    Certainly one can proceed to try and solve these congruence modulo $m$ without knowing much about $m$. You might want to specify what values $m$ is allowed to take, though. – hardmath Jul 16 '16 at 21:18

2 Answers2

1

We note that (for a fixed $m$) we have three linear congruences in two variables, so there is no particular reason to suppose that a solution exists. Indeed, for most $m$, no solution exists...as what follows will show.

Subtracting the first from the second we get $$6a\equiv 2 \pmod m$$

Subtracting the second from the third gives $$2a\equiv -10 \pmod m$$

Combining these give $$6a\equiv 3\times 2a\equiv 3\times (-10)\equiv -30\equiv 2\pmod m$$

Thus, $m$ divides $32$, so $m=2^n$ for $n≤5$

We will consider the case $m=32$.

The congruence $6a\equiv 2 \pmod {32}$ has solutions $a=11,27$. These give rise to the solutions $$(a,c)\equiv (11,8)\;or\;(27,24)\pmod {32}$$

The other cases for $m$ are similar.

lulu
  • 70,402
  • 1
    In fact one can easily generate all solutions mod $,2^i < 32,$ by modular reduction and adding in the obvious homogeneous solution $,(a,c) = (m/2,m/2),,$ see my answer. – Bill Dubuque Jul 17 '16 at 01:02
  • 1
    Very clean, thanks! – lulu Jul 17 '16 at 01:09
  • I see but you had to pose a value fo m. Can't it be deducted? – Rafa Jul 17 '16 at 03:18
  • I did deduce it. All my initial work is for a general $m$. I get two values for $6a \pmod m$, namely $-30$ and $2$. It follows that $-30\equiv 2 \pmod m$. That immediately implies that $m$ is a divisor of $32$. No other $m$ will work. – lulu Jul 17 '16 at 10:34
  • @lulu I got a=3 c=0 and m=16, but I don't have any work to show for these values. – Rafa Jul 17 '16 at 20:58
  • You could repeat the steps in my method, only $\pmod {16}$ and you'll see that $(11,8)$ is also a solution. Or you could follow the method described by @BillDubuque below, which is quite a bit more elegant. To be clear: that method starts with $32$, as I did, but instead of repeating the calculation for $2^i$ he uses the $\pmod {32}$ solution to get them all. – lulu Jul 17 '16 at 21:07
  • To be clear: for any fixed modulus, it's just a calculation. If the numbers are small, as here, trial and error is just fine. For larger numbers, it's nice to have some theory to streamline the approach. – lulu Jul 17 '16 at 21:12
  • 1
    @Rafa Perhaps I should have stressed that the method I proposed to finish might require more effort if you are not already familiar with the relationship between nonhomogeneous and homogeneous solutions of linear equations (though it is very easy to learn even if you never studied linear algebra). But once you know that it will save you work, esp. if you have analogous larger systems with higher powers. – Bill Dubuque Jul 17 '16 at 21:16
  • 1
    @Rafa Moreover, this fundamental result on solutions of linear equations is ubiquitous so the sooner you learn it the better. You will need if for solutions of differential and difference equations (recurrences). linear Diophantine equations, etc. – Bill Dubuque Jul 17 '16 at 21:16
1

Given the solutions mod $2^5$ in lulu's answer, I explain how to very simply generate the solutions mod $\,2^i\,$ for all $\,i\le 4.\,$ Doing the same elimination lulu did for the homogeneous system with $9,11,1$ replaced by $\,0,0,0$ we get $\,0 \equiv 2a\equiv 6a \equiv 8a \!\iff\! 2a \equiv 0.\,$ So $\,a \equiv 0\pmod {\!m/2}$ and this implies $\,c\equiv 0\pmod{\!m/2}.\,$ Hence two solutions differ by multiple of $\,(m/2,m/2).\,$ So given any particular solution $\,(a,c),\,$ there will be one other solution $(a,c)+(m/2,m/2).\,$ But we already know a particular solution: $ $ reduce mod $\,m = 2^i$ the solution mod $\, 2^{i+1}.$

For example, the solutions $\,(a,c)\equiv (11,8),(27,24)\pmod{\!2^5}\,$ reduce to the solution $\,(11,8)\pmod{\!2^4}.$ The other solution(s) arise by adding multiples of $\,(m/2,m/2)=(8,8),\,$ hence there is one other solution $\,(11,8)+(8,8)\equiv (3,0)$.

These map to $\,(3,0)\pmod{\!2^3}\,$ with one other solution $\,(3,0)+(4,4)\equiv (7,4),\,$

These map to $\ \ \: \ldots\pmod{\!2^2}\, $ with $\ \ldots$

Bill Dubuque
  • 272,048