Factorizing to prime numbers in Matlab

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 8K views
audreyh
Messages
11
Reaction score
0
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?

thanks,
Greg
 
Physics news on Phys.org
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).