Wednesday, July 12, 2006
Loose connectivity, factoring and residues
The factoring problem can be easily approached using simple algebra.
Start with
x^2 - y^2 = S - 2*x*k
where all are integers, as notice then you trivially have
x^2 + 2*x*k + k^2 = y^2 + S + k^2
so
x+k = sqrt(y^2 + S + k^2)
and finding y is just a matter of factoring (S+k^2)/4.
Now with just the explicit equation you end up with nothing but trivialities, but turning to congruences, you can now simply let
x^2 - y^2 = 0 mod T
which—this is important—now forces
S - 2*x_res*k = 0 mod T
where I put in x_res to emphasize that now it's congruences, so there is loose connectivity and an explicit value of x is not needed—just a residue.
But now I can just solve for k, assuming 2, S and x are coprime to T:
k = S*(2*x_res)^{-1} mod T
where (2*x_res)^{-1} is the modular inverse of (2*x_res) mod T.
That the modular inverse makes an appearance is critical, but more importantly I now have a way to find all the variables!!!
That can be done by simply picking a residue for x_res and then picking S, like x_res = 1, and S =1, to get k.
For instance if T=35, and I use x_res=S=1, then k = 18 mod 35, and k=18 will suffice.
Then y is found by factoring (1+18^2)/4 and then you have x as well.
Of course there will exist and x and y such that
x^2 - y^2 = 0 mod T
for any x_res you choose, which is trivial to prove, as that is equivalent to
x^2 - y^2 = kT
where k can be any integer.
So an equation that is useless explicitly becomes quite powerful with modular algebra—introducing loose connectivity—leading to a general method for factoring.
Start with
x^2 - y^2 = S - 2*x*k
where all are integers, as notice then you trivially have
x^2 + 2*x*k + k^2 = y^2 + S + k^2
so
x+k = sqrt(y^2 + S + k^2)
and finding y is just a matter of factoring (S+k^2)/4.
Now with just the explicit equation you end up with nothing but trivialities, but turning to congruences, you can now simply let
x^2 - y^2 = 0 mod T
which—this is important—now forces
S - 2*x_res*k = 0 mod T
where I put in x_res to emphasize that now it's congruences, so there is loose connectivity and an explicit value of x is not needed—just a residue.
But now I can just solve for k, assuming 2, S and x are coprime to T:
k = S*(2*x_res)^{-1} mod T
where (2*x_res)^{-1} is the modular inverse of (2*x_res) mod T.
That the modular inverse makes an appearance is critical, but more importantly I now have a way to find all the variables!!!
That can be done by simply picking a residue for x_res and then picking S, like x_res = 1, and S =1, to get k.
For instance if T=35, and I use x_res=S=1, then k = 18 mod 35, and k=18 will suffice.
Then y is found by factoring (1+18^2)/4 and then you have x as well.
Of course there will exist and x and y such that
x^2 - y^2 = 0 mod T
for any x_res you choose, which is trivial to prove, as that is equivalent to
x^2 - y^2 = kT
where k can be any integer.
So an equation that is useless explicitly becomes quite powerful with modular algebra—introducing loose connectivity—leading to a general method for factoring.