Method to solve for a number in modulus equation.

64 Views Asked by At

If you had an equation of 12 = (8000 + B) mod 13

You could guess and check a little and arrive at B = 7.

My question is what is the best way to solve these? Is there a defined method to get B?

1

There are 1 best solutions below

3
On BEST ANSWER

You can reduce $8000 \equiv 5\pmod{13}$ and get $12 \equiv (5 + B) \pmod{13}$ then subtract $5$ from each side.

Added: You can use long division to find the remainder of $8000$ divided by $13$ is $5$. In other words, $8000 = 615 * 13 + 5$, so $8000 \equiv 5 \pmod{13}$