Given the Diophantine equation: $\ ax^2-cy-d=0$ , the coefficients $\ c$ and $\ d$ are numbers in range of $\ 10^{300} $. Does exist an efficient way to find solution for it?
2026-04-01 04:16:51.1775017011
On
Does exist an efficient algorithm to solve the equation $\ ax^2-cy-d=0$?
103 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
It means $c|ay^2-d$ A requirement is that for any prime factor p of c, $\frac da$ is quadratic residue of p, or both a and d are multiple of $p^h$ where $p^h | c$. Given we have all prime factors of c and $\frac da$ is quadratic residue of all p, since there're efficient algorithm to solve square root in finite field, the equation could be solved efficently as soon as we could get all prime factors of c.
You want $ax^2 - d \equiv 0 \mod c$. If $(a, c) = 1$, that says $x^2 \equiv d/a \mod c$. So you need to solve the modular square root problem. If $c$ is prime, that can be solved using the Tonelli-Shanks algorithm. If not, you need to factor $c$. For a number on the order of $10^{300}$, that may be beyond the reach of current technology.