Saturday, 30 January 2016

elementary number theory - fastest method to solve a quadratic equation modulo p^N




What is the fastest method to solve a quadratic equation



ax2+bx+c=0(modpN)



where p is prime?


Answer



I'd start by multiplying by the inverse of a, to make your lead coefficient 1: x2+Bx+C0. Then you can complete the square, replacing your coefficient B with BpN if that helps you see how to understand B2.



This will tell you what number has to be a quadratic residue, and you can work on finding its square root. For that, you probably want to find the square root mod p first, and then use Hensel's lifting lemma until you get to pN.




Does that answer your question, or do you need more details on any of those steps?


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...