0
$\begingroup$

Lets $n=pq$ with $p$ and $q$ primes

If we know the result of $p+q$, can we factorize $n$ in polynomial time ?

Best regards.

  • 1
    polynomial time with respect to what?2017-01-02
  • 1
    Your thoughts please... (since this is not a 'do my homework for free' service).2017-01-02
  • 0
    Hope it was homework, but school is far far away..., I mean does knowing the sum of the two factors can help to factorize a number2017-01-02

1 Answers 1

3

Suppose $n=pq$ and $p+q=k$, then $p$ and $q$ are the roots of the polynomial $x^2-(p+q)x+pq$ and so they are equal to $\frac{p+q\pm \sqrt{p+q)^2-4pq}}{2}$

  • 0
    right, thanks.${}{}{}{}{}$2017-01-02
  • 0
    Great observation, but for completeness' sake, maybe including a conclusion about the polynomial time would be nice?2017-01-02
  • 1
    @SteamyRoot: the time will be polylog, at most $\log^2n$.2017-01-02
  • 0
    it is $\mathcal O(\log(n))$ as we need to find the square root of a number of size approximately $4n^2$.2017-01-02
  • 0
    @JorgeFernándezHidalgo: don't you mean like $O(\log n\log\log n\log\log\log n)$ ?2017-01-02
  • 0
    @YvesDaoust why is there an $n$ all by itself?2017-01-02
  • 0
    @JorgeFernándezHidalgo: I fixed the typo.2017-01-02
  • 0
    @YvesDaoust I guess that makes sense ;)2017-01-02