Loading [MathJax]/jax/output/SVG/jax.js
 

Bertie

avatar
UsernameBertie
Score893
Membership
Stats
Questions 1
Answers 198

 #5
avatar+893 
+15

Unless we are told something to the contrary, unknowns in equations such as this are always assumed to be integers.

 

If  d is the greatest common divisor (gcd) of a and n, the linear congruence  

axbmodn 

has a solution only if b is also divisible by d and in that case there will be an infinite number of solutions given by

x=x0+ntd,

where  x0  is any solution whatever, and t is an integer, (positive or negative), or zero.

For the equation in question,

7x=1mod26,d=1,

so the general solution will be

x=x0+26t1=x0+26t.

Finding a suitable  x0  is a trial and error thing, run through the multiples of 7 and 26 looking for the first pair for which the multiple of 7 is 1 greater than the multiple of 26 That happens to be 15 and 4, so the general solution is

x=15+26t,tZ. 

 

The result given earlier comes from the theory of linear Diophantine equations.

If

d=gcd(a,b),

the equation

ax+by=c

has integer solutions only if c is also divisible by d, and in that case there will be an infinite number of solutions given by

x=x0+btd,y=y0atd(tZ),

and where  x0,y0  is any particular solution.

(For large values of a and b, x0,y0  and d are usually found using Euclid's algorithm.)

( The equation

axbmodn

is equivalent to

axb=knaxkn=b,

which, with a change of letters and a change of sign, is the Diophantine equation above.)

May 8, 2015