PDA

View Full Version : prime number algorithm


khotsofalang
Apr15-09, 11:12 AM
i am sorry guys, the last time i posted this problem it was completely different but this time if we
Let x12+x22=1 be a unit circle upon a finite field Zp where p is prime. Is there any algorithm which can give all the possible solutions (x1,x2) an element of Zp*Zp as well as the total number of such solutions? If exists, what is the complexity of it?

CRGreathouse
Apr15-09, 11:58 AM
You could check all possibilities. That takes something like O(p^2 log^2 p).

Now you just need a *good* way to solve it.

khotsofalang
Apr15-09, 04:00 PM
all right, but what i actually need is that good way of solving it

khotsofalang
Apr19-09, 03:16 PM
i need a solution to such an equation for stregthening my extended essay,anibody with a gud way of solving it?

Dodo
Aug16-11, 04:39 PM
If I understood correctly, you are looking for two quadratic residues that add up to 1. It may be easier for primes congruent to 1 modulo 4, because quadratic residues for those primes are 'symmetric': r is a quadratic residue iif p-r is. In this case you just look for contiguous quadratic residues on the lower half, from 2 to (p-1)/2: if r and r+1 are quadratic residues, then p-r also is, and (p-r)+(r+1) add to 1. My 2 cents.