Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Factorizing to prime numbers in Matlab

  1. Oct 4, 2007 #1
    My quantum professor, as an aside challenge, asked us if we could write a program in Matlab to factorize a 32 digit number into its prime number constituents. Can anyone direct me in the right direction to research how to do this?

  2. jcsd
  3. Oct 5, 2007 #2


    User Avatar
    Science Advisor
    Homework Helper

    Pollard's rho algorithm is easy to program, but I'm not sure if it's fast enough to handle numbers in that range. SQUFOF is decently fast, I think, and may be programmable as well. Most methods for large numbers are a little too hard to learn and write for a class assignment (IMO).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook