Verifying integer solutions to linear equations

47 Views Asked by At

Suppose I have the equation $B = \frac{8A - 29}{27}$, where $A$ and $B$ are integers. Then $27B = 8A - 29$, and so we have the linear Diophantine equation $8A - 27B = 29$.

Using the extended Euclidean algorithm we get $A = -290 + 27n$ and $B = -87 + 8n$.

Now, I can see that plugging the $A$ and $B$ directly into our original $B(A)$, we get $0=0$.

However, the author states that the solution to the problem is of the form $7 \mod 27$.

How can I see that the solution to the problem is of the form $7 \mod 27$?

2

There are 2 best solutions below

0
On

$A = \dfrac{27B+29}{8} = 3B+4 + \dfrac{3(B-1)}{8} \Rightarrow 8 \mid B-1 \Rightarrow B-1 = 8n \Rightarrow B = 8n+1 \Rightarrow A = 3(8n+1)+4+3n = 27n+7$. Check: $8A-27B = 8(27n+7) - 27(8n+1) = 56-27 = 29$.

0
On

Take your solution and let $n=m+11$. Then

$$A=-290+27n=-290+27(m+11)=7+27m$$

i.e., $A\equiv7$ mod $27$. (To say that "the solution to the problem is of the form $7$ mod $27$" must mean that the problem is to find all $A$ such that $B=(8A-29)/27$ is an integer.)