Why is the running time of the trial division $O(f \cdot (log N)^2)$?

122 Views Asked by At

I saw this being cited in a few paper,but none of them seems to explain why this is the case. Maybe because it is quite trivial, but I am not sure why exactly... Here $f$ is the size of the factor. I see there are $f$ steps until we find a factor, where does $(log N)^2$ come from? Each step require $(log N)^2$ calculation? Why?

1

There are 1 best solutions below

1
On

Division requires 2 numbers. Therefore when we do that operation over and over again we obtain a square table. The area of that square is the cost of operation, I believe.