How to solve congruence modulo equations?

1.2k Views Asked by At

While studying Affine Cipher in cryptography it tells that we need to solve a system of modulo congruence equations.

The equations are:

  1. $8\alpha+\beta\equiv 15 \pmod{26}$
  2. $5\alpha+\beta\equiv 16 \pmod{26}$

Could anyone tell how to solve these equations.

2

There are 2 best solutions below

5
On

On subtraction, $$3\alpha\equiv-1\pmod{26}\equiv-1+2\cdot26$$

As $(3,26)=1,$ $$\alpha\equiv17\pmod{26}$$

and $$\beta\equiv15-8\alpha\pmod{26}\equiv?$$

0
On

Just making @labbhattacharjee's answer a bit more clear :

$$8\alpha + \beta \equiv 15 \pmod{26} \longrightarrow(1)$$ $$5\alpha + \beta \equiv 16 \pmod{26} \longrightarrow(2)$$

$(1) - (2) \implies 3\alpha \equiv -1 \pmod{26}$

Directly proceeding from here to get $3\alpha \equiv 25 \pmod{26}$ makes it difficult to isolate $\alpha$(unless we find a suitable value for the equation $3\alpha = 26n + 25$ or say, we are ready to work it out; but here, $n = 1$ is a suitable solution and hence you may choose this) , hence we take the nearest multiple of $26$ whose predecessor is a multiple of $3$, i.e., $52$.
So we get $3\alpha = 51$ and $\alpha = 17$.Plugging this in any of the two congruence equations will get you the path of solving for $\beta$.