Skip to content

Java program that factors a number N=p*q into p and q using the period finding approach.

Notifications You must be signed in to change notification settings

Aypac/PrimenumberFactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

This is a Java program, that decomposes a number N into two prime numbers p and q using a classical variant of Shor's algorithm (period finding approach).

Performance

Now it is working deterministically (checking all a's) and takes for a 31 bit N around 15 minutes on my 4x2.00GHz processor. For smaller numbers, the runtime decreases drastically!
If you want to make it faster, you can cheat (at least in the language of Quantum Computers) and set maxPeriode=2;

How to run

Download and compile with javac. Precompiled jar's might be added later.

TODO

  • Make p=q; N=p^2 work!
  • Use BigInteger for p, q and N (so that we can factor larger N's than 32bit!)
  • Allow inputs
  • Set conditions for failing cases (N can not be factorized in only two prime factors)
  • Better Documentation
  • Make a nice UI

change log

21.10.2016 - inital release
This is the intial working version. Not thoroughly tested yet.

About

Java program that factors a number N=p*q into p and q using the period finding approach.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages